]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - configure
Apply upstream fix 08968baec1122a58bb90d8f97ad948a75f8a5d69:
[FreeBSD/FreeBSD.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for unbound 1.13.0.
4 #
5 # Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
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 or
279 $0: https://github.com/NLnetLabs/unbound/issues about your
280 $0: system, including any error possibly output before this
281 $0: message. Then install a modern shell, or manually run
282 $0: the script under such a shell if you do have one."
283   fi
284   exit 1
285 fi
286 fi
287 fi
288 SHELL=${CONFIG_SHELL-/bin/sh}
289 export SHELL
290 # Unset more variables known to interfere with behavior of common tools.
291 CLICOLOR_FORCE= GREP_OPTIONS=
292 unset CLICOLOR_FORCE GREP_OPTIONS
293
294 ## --------------------- ##
295 ## M4sh Shell Functions. ##
296 ## --------------------- ##
297 # as_fn_unset VAR
298 # ---------------
299 # Portably unset VAR.
300 as_fn_unset ()
301 {
302   { eval $1=; unset $1;}
303 }
304 as_unset=as_fn_unset
305
306 # as_fn_set_status STATUS
307 # -----------------------
308 # Set $? to STATUS, without forking.
309 as_fn_set_status ()
310 {
311   return $1
312 } # as_fn_set_status
313
314 # as_fn_exit STATUS
315 # -----------------
316 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
317 as_fn_exit ()
318 {
319   set +e
320   as_fn_set_status $1
321   exit $1
322 } # as_fn_exit
323
324 # as_fn_mkdir_p
325 # -------------
326 # Create "$as_dir" as a directory, including parents if necessary.
327 as_fn_mkdir_p ()
328 {
329
330   case $as_dir in #(
331   -*) as_dir=./$as_dir;;
332   esac
333   test -d "$as_dir" || eval $as_mkdir_p || {
334     as_dirs=
335     while :; do
336       case $as_dir in #(
337       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
338       *) as_qdir=$as_dir;;
339       esac
340       as_dirs="'$as_qdir' $as_dirs"
341       as_dir=`$as_dirname -- "$as_dir" ||
342 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
343          X"$as_dir" : 'X\(//\)[^/]' \| \
344          X"$as_dir" : 'X\(//\)$' \| \
345          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
346 $as_echo X"$as_dir" |
347     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
348             s//\1/
349             q
350           }
351           /^X\(\/\/\)[^/].*/{
352             s//\1/
353             q
354           }
355           /^X\(\/\/\)$/{
356             s//\1/
357             q
358           }
359           /^X\(\/\).*/{
360             s//\1/
361             q
362           }
363           s/.*/./; q'`
364       test -d "$as_dir" && break
365     done
366     test -z "$as_dirs" || eval "mkdir $as_dirs"
367   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
368
369
370 } # as_fn_mkdir_p
371
372 # as_fn_executable_p FILE
373 # -----------------------
374 # Test if FILE is an executable regular file.
375 as_fn_executable_p ()
376 {
377   test -f "$1" && test -x "$1"
378 } # as_fn_executable_p
379 # as_fn_append VAR VALUE
380 # ----------------------
381 # Append the text in VALUE to the end of the definition contained in VAR. Take
382 # advantage of any shell optimizations that allow amortized linear growth over
383 # repeated appends, instead of the typical quadratic growth present in naive
384 # implementations.
385 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
386   eval 'as_fn_append ()
387   {
388     eval $1+=\$2
389   }'
390 else
391   as_fn_append ()
392   {
393     eval $1=\$$1\$2
394   }
395 fi # as_fn_append
396
397 # as_fn_arith ARG...
398 # ------------------
399 # Perform arithmetic evaluation on the ARGs, and store the result in the
400 # global $as_val. Take advantage of shells that can avoid forks. The arguments
401 # must be portable across $(()) and expr.
402 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
403   eval 'as_fn_arith ()
404   {
405     as_val=$(( $* ))
406   }'
407 else
408   as_fn_arith ()
409   {
410     as_val=`expr "$@" || test $? -eq 1`
411   }
412 fi # as_fn_arith
413
414
415 # as_fn_error STATUS ERROR [LINENO LOG_FD]
416 # ----------------------------------------
417 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
418 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
419 # script with STATUS, using 1 if that was 0.
420 as_fn_error ()
421 {
422   as_status=$1; test $as_status -eq 0 && as_status=1
423   if test "$4"; then
424     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
425     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
426   fi
427   $as_echo "$as_me: error: $2" >&2
428   as_fn_exit $as_status
429 } # as_fn_error
430
431 if expr a : '\(a\)' >/dev/null 2>&1 &&
432    test "X`expr 00001 : '.*\(...\)'`" = X001; then
433   as_expr=expr
434 else
435   as_expr=false
436 fi
437
438 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
439   as_basename=basename
440 else
441   as_basename=false
442 fi
443
444 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
445   as_dirname=dirname
446 else
447   as_dirname=false
448 fi
449
450 as_me=`$as_basename -- "$0" ||
451 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
452          X"$0" : 'X\(//\)$' \| \
453          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
454 $as_echo X/"$0" |
455     sed '/^.*\/\([^/][^/]*\)\/*$/{
456             s//\1/
457             q
458           }
459           /^X\/\(\/\/\)$/{
460             s//\1/
461             q
462           }
463           /^X\/\(\/\).*/{
464             s//\1/
465             q
466           }
467           s/.*/./; q'`
468
469 # Avoid depending upon Character Ranges.
470 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
471 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
472 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
473 as_cr_digits='0123456789'
474 as_cr_alnum=$as_cr_Letters$as_cr_digits
475
476
477   as_lineno_1=$LINENO as_lineno_1a=$LINENO
478   as_lineno_2=$LINENO as_lineno_2a=$LINENO
479   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
480   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
481   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
482   sed -n '
483     p
484     /[$]LINENO/=
485   ' <$as_myself |
486     sed '
487       s/[$]LINENO.*/&-/
488       t lineno
489       b
490       :lineno
491       N
492       :loop
493       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
494       t loop
495       s/-\n.*//
496     ' >$as_me.lineno &&
497   chmod +x "$as_me.lineno" ||
498     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
499
500   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
501   # already done that, so ensure we don't try to do so again and fall
502   # in an infinite loop.  This has already happened in practice.
503   _as_can_reexec=no; export _as_can_reexec
504   # Don't try to exec as it changes $[0], causing all sort of problems
505   # (the dirname of $[0] is not the place where we might find the
506   # original and so on.  Autoconf is especially sensitive to this).
507   . "./$as_me.lineno"
508   # Exit status is that of the last command.
509   exit
510 }
511
512 ECHO_C= ECHO_N= ECHO_T=
513 case `echo -n x` in #(((((
514 -n*)
515   case `echo 'xy\c'` in
516   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
517   xy)  ECHO_C='\c';;
518   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
519        ECHO_T=' ';;
520   esac;;
521 *)
522   ECHO_N='-n';;
523 esac
524
525 rm -f conf$$ conf$$.exe conf$$.file
526 if test -d conf$$.dir; then
527   rm -f conf$$.dir/conf$$.file
528 else
529   rm -f conf$$.dir
530   mkdir conf$$.dir 2>/dev/null
531 fi
532 if (echo >conf$$.file) 2>/dev/null; then
533   if ln -s conf$$.file conf$$ 2>/dev/null; then
534     as_ln_s='ln -s'
535     # ... but there are two gotchas:
536     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
537     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
538     # In both cases, we have to default to `cp -pR'.
539     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
540       as_ln_s='cp -pR'
541   elif ln conf$$.file conf$$ 2>/dev/null; then
542     as_ln_s=ln
543   else
544     as_ln_s='cp -pR'
545   fi
546 else
547   as_ln_s='cp -pR'
548 fi
549 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
550 rmdir conf$$.dir 2>/dev/null
551
552 if mkdir -p . 2>/dev/null; then
553   as_mkdir_p='mkdir -p "$as_dir"'
554 else
555   test -d ./-p && rmdir ./-p
556   as_mkdir_p=false
557 fi
558
559 as_test_x='test -x'
560 as_executable_p=as_fn_executable_p
561
562 # Sed expression to map a string onto a valid CPP name.
563 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
564
565 # Sed expression to map a string onto a valid variable name.
566 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
567
568 SHELL=${CONFIG_SHELL-/bin/sh}
569
570
571 test -n "$DJDIR" || exec 7<&0 </dev/null
572 exec 6>&1
573
574 # Name of the host.
575 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
576 # so uname gets run too.
577 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
578
579 #
580 # Initializations.
581 #
582 ac_default_prefix=/usr/local
583 ac_clean_files=
584 ac_config_libobj_dir=.
585 LIBOBJS=
586 cross_compiling=no
587 subdirs=
588 MFLAGS=
589 MAKEFLAGS=
590
591 # Identity of this package.
592 PACKAGE_NAME='unbound'
593 PACKAGE_TARNAME='unbound'
594 PACKAGE_VERSION='1.13.0'
595 PACKAGE_STRING='unbound 1.13.0'
596 PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues'
597 PACKAGE_URL=''
598
599 # Factoring default headers for most tests.
600 ac_includes_default="\
601 #include <stdio.h>
602 #ifdef HAVE_SYS_TYPES_H
603 # include <sys/types.h>
604 #endif
605 #ifdef HAVE_SYS_STAT_H
606 # include <sys/stat.h>
607 #endif
608 #ifdef STDC_HEADERS
609 # include <stdlib.h>
610 # include <stddef.h>
611 #else
612 # ifdef HAVE_STDLIB_H
613 #  include <stdlib.h>
614 # endif
615 #endif
616 #ifdef HAVE_STRING_H
617 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
618 #  include <memory.h>
619 # endif
620 # include <string.h>
621 #endif
622 #ifdef HAVE_STRINGS_H
623 # include <strings.h>
624 #endif
625 #ifdef HAVE_INTTYPES_H
626 # include <inttypes.h>
627 #endif
628 #ifdef HAVE_STDINT_H
629 # include <stdint.h>
630 #endif
631 #ifdef HAVE_UNISTD_H
632 # include <unistd.h>
633 #endif"
634
635 ac_subst_vars='LTLIBOBJS
636 date
637 version
638 INSTALLTARGET
639 ALLTARGET
640 SOURCEFILE
641 SOURCEDETERMINE
642 IPSET_OBJ
643 IPSET_SRC
644 IPSECMOD_HEADER
645 IPSECMOD_OBJ
646 DNSCRYPT_OBJ
647 DNSCRYPT_SRC
648 ENABLE_DNSCRYPT
649 ENABLE_DNSCRYPT_XCHACHA20
650 DNSTAP_OBJ
651 DNSTAP_SRC
652 DNSTAP_SOCKET_PATH
653 opt_dnstap_socket_path
654 ENABLE_DNSTAP
655 PROTOC_C
656 UBSYMS
657 EXTRALINK
658 COMMON_OBJ_ALL_SYMBOLS
659 LIBOBJ_WITHOUT_CTIME
660 LIBOBJ_WITHOUT_CTIMEARC4
661 WIN_CHECKCONF_OBJ_LINK
662 WIN_CONTROL_OBJ_LINK
663 WIN_UBANCHOR_OBJ_LINK
664 WIN_HOST_OBJ_LINK
665 WIN_DAEMON_OBJ_LINK
666 WIN_DAEMON_OBJ
667 WIN_DAEMON_SRC
668 WINAPPS
669 WINDRES
670 CHECKLOCK_OBJ
671 staticexe
672 PC_LIBEVENT_DEPENDENCY
673 UNBOUND_EVENT_UNINSTALL
674 UNBOUND_EVENT_INSTALL
675 SUBNET_HEADER
676 SUBNET_OBJ
677 PC_LIBBSD_DEPENDENCY
678 SSLLIB
679 HAVE_SSL
680 PC_CRYPTO_DEPENDENCY
681 CONFIG_DATE
682 NETBSD_LINTFLAGS
683 PYUNBOUND_UNINSTALL
684 PYUNBOUND_INSTALL
685 PYUNBOUND_TARGET
686 PYUNBOUND_OBJ
687 WITH_PYUNBOUND
688 PYTHONMOD_UNINSTALL
689 PYTHONMOD_INSTALL
690 PYTHONMOD_HEADER
691 PYTHONMOD_OBJ
692 WITH_PYTHONMODULE
693 swig
694 SWIG_LIB
695 SWIG
696 PC_PY_DEPENDENCY
697 PY_MAJOR_VERSION
698 PYTHON_SITE_PKG
699 PYTHON_LDFLAGS
700 PYTHON_CPPFLAGS
701 PYTHON
702 PYTHON_VERSION
703 DYNLIBMOD_EXTRALIBS
704 DYNLIBMOD_HEADER
705 DYNLIBMOD_OBJ
706 WITH_DYNLIBMODULE
707 PTHREAD_CFLAGS_ONLY
708 PTHREAD_CFLAGS
709 PTHREAD_LIBS
710 PTHREAD_CC
711 ax_pthread_config
712 ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ
713 SLDNS_ALLOCCHECK_EXTRA_OBJ
714 USE_SYSTEMD_FALSE
715 USE_SYSTEMD_TRUE
716 SYSTEMD_DAEMON_LIBS
717 SYSTEMD_DAEMON_CFLAGS
718 SYSTEMD_LIBS
719 SYSTEMD_CFLAGS
720 RUNTIME_PATH
721 LIBOBJS
722 PKG_CONFIG_LIBDIR
723 PKG_CONFIG_PATH
724 PKG_CONFIG
725 LT_SYS_LIBRARY_PATH
726 OTOOL64
727 OTOOL
728 LIPO
729 NMEDIT
730 DSYMUTIL
731 MANIFEST_TOOL
732 AWK
733 RANLIB
734 ac_ct_AR
735 DLLTOOL
736 OBJDUMP
737 LN_S
738 NM
739 ac_ct_DUMPBIN
740 DUMPBIN
741 LD
742 FGREP
743 SED
744 LIBTOOL
745 AR
746 host_os
747 host_vendor
748 host_cpu
749 host
750 build_os
751 build_vendor
752 build_cpu
753 build
754 libtool
755 STRIP
756 doxygen
757 YFLAGS
758 YACC
759 LEXLIB
760 LEX_OUTPUT_ROOT
761 LEX
762 debug_enabled
763 DEPFLAG
764 UNBOUND_USERNAME
765 UNBOUND_ROOTCERT_FILE
766 UNBOUND_ROOTKEY_FILE
767 UNBOUND_PIDFILE
768 UNBOUND_SHARE_DIR
769 UNBOUND_CHROOT_DIR
770 UNBOUND_RUN_DIR
771 ub_conf_dir
772 ub_conf_file
773 UNBOUND_LOCALSTATE_DIR
774 UNBOUND_SYSCONF_DIR
775 UNBOUND_SBIN_DIR
776 EGREP
777 GREP
778 CPP
779 OBJEXT
780 EXEEXT
781 ac_ct_CC
782 CPPFLAGS
783 LDFLAGS
784 CFLAGS
785 CC
786 LIBUNBOUND_AGE
787 LIBUNBOUND_REVISION
788 LIBUNBOUND_CURRENT
789 UNBOUND_VERSION_MICRO
790 UNBOUND_VERSION_MINOR
791 UNBOUND_VERSION_MAJOR
792 target_alias
793 host_alias
794 build_alias
795 LIBS
796 ECHO_T
797 ECHO_N
798 ECHO_C
799 DEFS
800 mandir
801 localedir
802 libdir
803 psdir
804 pdfdir
805 dvidir
806 htmldir
807 infodir
808 docdir
809 oldincludedir
810 includedir
811 localstatedir
812 sharedstatedir
813 sysconfdir
814 datadir
815 datarootdir
816 libexecdir
817 sbindir
818 bindir
819 program_transform_name
820 prefix
821 exec_prefix
822 PACKAGE_URL
823 PACKAGE_BUGREPORT
824 PACKAGE_STRING
825 PACKAGE_VERSION
826 PACKAGE_TARNAME
827 PACKAGE_NAME
828 PATH_SEPARATOR
829 SHELL'
830 ac_subst_files=''
831 ac_user_opts='
832 enable_option_checking
833 with_conf_file
834 with_run_dir
835 with_chroot_dir
836 with_share_dir
837 with_pidfile
838 with_rootkey_file
839 with_rootcert_file
840 with_username
841 enable_checking
842 enable_debug
843 enable_flto
844 enable_pie
845 enable_relro_now
846 enable_shared
847 enable_static
848 with_pic
849 enable_fast_install
850 with_aix_soname
851 with_gnu_ld
852 with_sysroot
853 enable_libtool_lock
854 enable_rpath
855 enable_largefile
856 enable_systemd
857 enable_alloc_checks
858 enable_alloc_lite
859 enable_alloc_nonregional
860 with_pthreads
861 with_solaris_threads
862 with_syslog_facility
863 with_dynlibmodule
864 with_pyunbound
865 with_pythonmodule
866 enable_swig_version_check
867 with_nss
868 with_nettle
869 with_ssl
870 with_libbsd
871 enable_sha1
872 enable_sha2
873 enable_subnet
874 enable_gost
875 enable_ecdsa
876 enable_dsa
877 enable_ed25519
878 enable_ed448
879 enable_event_api
880 enable_tfo_client
881 enable_tfo_server
882 with_libevent
883 with_libexpat
884 with_libhiredis
885 with_libnghttp2
886 enable_static_exe
887 enable_fully_static
888 enable_lock_checks
889 enable_allsymbols
890 enable_dnstap
891 with_dnstap_socket_path
892 with_protobuf_c
893 enable_dnscrypt
894 with_libsodium
895 enable_cachedb
896 enable_ipsecmod
897 enable_ipset
898 with_libmnl
899 enable_explicit_port_randomisation
900 with_libunbound_only
901 '
902       ac_precious_vars='build_alias
903 host_alias
904 target_alias
905 CC
906 CFLAGS
907 LDFLAGS
908 LIBS
909 CPPFLAGS
910 CPP
911 YACC
912 YFLAGS
913 LT_SYS_LIBRARY_PATH
914 PKG_CONFIG
915 PKG_CONFIG_PATH
916 PKG_CONFIG_LIBDIR
917 SYSTEMD_CFLAGS
918 SYSTEMD_LIBS
919 SYSTEMD_DAEMON_CFLAGS
920 SYSTEMD_DAEMON_LIBS
921 PYTHON_VERSION'
922
923
924 # Initialize some variables set by options.
925 ac_init_help=
926 ac_init_version=false
927 ac_unrecognized_opts=
928 ac_unrecognized_sep=
929 # The variables have the same names as the options, with
930 # dashes changed to underlines.
931 cache_file=/dev/null
932 exec_prefix=NONE
933 no_create=
934 no_recursion=
935 prefix=NONE
936 program_prefix=NONE
937 program_suffix=NONE
938 program_transform_name=s,x,x,
939 silent=
940 site=
941 srcdir=
942 verbose=
943 x_includes=NONE
944 x_libraries=NONE
945
946 # Installation directory options.
947 # These are left unexpanded so users can "make install exec_prefix=/foo"
948 # and all the variables that are supposed to be based on exec_prefix
949 # by default will actually change.
950 # Use braces instead of parens because sh, perl, etc. also accept them.
951 # (The list follows the same order as the GNU Coding Standards.)
952 bindir='${exec_prefix}/bin'
953 sbindir='${exec_prefix}/sbin'
954 libexecdir='${exec_prefix}/libexec'
955 datarootdir='${prefix}/share'
956 datadir='${datarootdir}'
957 sysconfdir='${prefix}/etc'
958 sharedstatedir='${prefix}/com'
959 localstatedir='${prefix}/var'
960 includedir='${prefix}/include'
961 oldincludedir='/usr/include'
962 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
963 infodir='${datarootdir}/info'
964 htmldir='${docdir}'
965 dvidir='${docdir}'
966 pdfdir='${docdir}'
967 psdir='${docdir}'
968 libdir='${exec_prefix}/lib'
969 localedir='${datarootdir}/locale'
970 mandir='${datarootdir}/man'
971
972 ac_prev=
973 ac_dashdash=
974 for ac_option
975 do
976   # If the previous option needs an argument, assign it.
977   if test -n "$ac_prev"; then
978     eval $ac_prev=\$ac_option
979     ac_prev=
980     continue
981   fi
982
983   case $ac_option in
984   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
985   *=)   ac_optarg= ;;
986   *)    ac_optarg=yes ;;
987   esac
988
989   # Accept the important Cygnus configure options, so we can diagnose typos.
990
991   case $ac_dashdash$ac_option in
992   --)
993     ac_dashdash=yes ;;
994
995   -bindir | --bindir | --bindi | --bind | --bin | --bi)
996     ac_prev=bindir ;;
997   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
998     bindir=$ac_optarg ;;
999
1000   -build | --build | --buil | --bui | --bu)
1001     ac_prev=build_alias ;;
1002   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1003     build_alias=$ac_optarg ;;
1004
1005   -cache-file | --cache-file | --cache-fil | --cache-fi \
1006   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1007     ac_prev=cache_file ;;
1008   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1009   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1010     cache_file=$ac_optarg ;;
1011
1012   --config-cache | -C)
1013     cache_file=config.cache ;;
1014
1015   -datadir | --datadir | --datadi | --datad)
1016     ac_prev=datadir ;;
1017   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1018     datadir=$ac_optarg ;;
1019
1020   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1021   | --dataroo | --dataro | --datar)
1022     ac_prev=datarootdir ;;
1023   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1024   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1025     datarootdir=$ac_optarg ;;
1026
1027   -disable-* | --disable-*)
1028     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1029     # Reject names that are not valid shell variable names.
1030     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1031       as_fn_error $? "invalid feature name: $ac_useropt"
1032     ac_useropt_orig=$ac_useropt
1033     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1034     case $ac_user_opts in
1035       *"
1036 "enable_$ac_useropt"
1037 "*) ;;
1038       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1039          ac_unrecognized_sep=', ';;
1040     esac
1041     eval enable_$ac_useropt=no ;;
1042
1043   -docdir | --docdir | --docdi | --doc | --do)
1044     ac_prev=docdir ;;
1045   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1046     docdir=$ac_optarg ;;
1047
1048   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1049     ac_prev=dvidir ;;
1050   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1051     dvidir=$ac_optarg ;;
1052
1053   -enable-* | --enable-*)
1054     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1055     # Reject names that are not valid shell variable names.
1056     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1057       as_fn_error $? "invalid feature name: $ac_useropt"
1058     ac_useropt_orig=$ac_useropt
1059     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1060     case $ac_user_opts in
1061       *"
1062 "enable_$ac_useropt"
1063 "*) ;;
1064       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1065          ac_unrecognized_sep=', ';;
1066     esac
1067     eval enable_$ac_useropt=\$ac_optarg ;;
1068
1069   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1070   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1071   | --exec | --exe | --ex)
1072     ac_prev=exec_prefix ;;
1073   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1074   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1075   | --exec=* | --exe=* | --ex=*)
1076     exec_prefix=$ac_optarg ;;
1077
1078   -gas | --gas | --ga | --g)
1079     # Obsolete; use --with-gas.
1080     with_gas=yes ;;
1081
1082   -help | --help | --hel | --he | -h)
1083     ac_init_help=long ;;
1084   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1085     ac_init_help=recursive ;;
1086   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1087     ac_init_help=short ;;
1088
1089   -host | --host | --hos | --ho)
1090     ac_prev=host_alias ;;
1091   -host=* | --host=* | --hos=* | --ho=*)
1092     host_alias=$ac_optarg ;;
1093
1094   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1095     ac_prev=htmldir ;;
1096   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1097   | --ht=*)
1098     htmldir=$ac_optarg ;;
1099
1100   -includedir | --includedir | --includedi | --included | --include \
1101   | --includ | --inclu | --incl | --inc)
1102     ac_prev=includedir ;;
1103   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1104   | --includ=* | --inclu=* | --incl=* | --inc=*)
1105     includedir=$ac_optarg ;;
1106
1107   -infodir | --infodir | --infodi | --infod | --info | --inf)
1108     ac_prev=infodir ;;
1109   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1110     infodir=$ac_optarg ;;
1111
1112   -libdir | --libdir | --libdi | --libd)
1113     ac_prev=libdir ;;
1114   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1115     libdir=$ac_optarg ;;
1116
1117   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1118   | --libexe | --libex | --libe)
1119     ac_prev=libexecdir ;;
1120   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1121   | --libexe=* | --libex=* | --libe=*)
1122     libexecdir=$ac_optarg ;;
1123
1124   -localedir | --localedir | --localedi | --localed | --locale)
1125     ac_prev=localedir ;;
1126   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1127     localedir=$ac_optarg ;;
1128
1129   -localstatedir | --localstatedir | --localstatedi | --localstated \
1130   | --localstate | --localstat | --localsta | --localst | --locals)
1131     ac_prev=localstatedir ;;
1132   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1133   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1134     localstatedir=$ac_optarg ;;
1135
1136   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1137     ac_prev=mandir ;;
1138   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1139     mandir=$ac_optarg ;;
1140
1141   -nfp | --nfp | --nf)
1142     # Obsolete; use --without-fp.
1143     with_fp=no ;;
1144
1145   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1146   | --no-cr | --no-c | -n)
1147     no_create=yes ;;
1148
1149   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1150   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1151     no_recursion=yes ;;
1152
1153   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1154   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1155   | --oldin | --oldi | --old | --ol | --o)
1156     ac_prev=oldincludedir ;;
1157   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1158   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1159   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1160     oldincludedir=$ac_optarg ;;
1161
1162   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1163     ac_prev=prefix ;;
1164   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1165     prefix=$ac_optarg ;;
1166
1167   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1168   | --program-pre | --program-pr | --program-p)
1169     ac_prev=program_prefix ;;
1170   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1171   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1172     program_prefix=$ac_optarg ;;
1173
1174   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1175   | --program-suf | --program-su | --program-s)
1176     ac_prev=program_suffix ;;
1177   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1178   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1179     program_suffix=$ac_optarg ;;
1180
1181   -program-transform-name | --program-transform-name \
1182   | --program-transform-nam | --program-transform-na \
1183   | --program-transform-n | --program-transform- \
1184   | --program-transform | --program-transfor \
1185   | --program-transfo | --program-transf \
1186   | --program-trans | --program-tran \
1187   | --progr-tra | --program-tr | --program-t)
1188     ac_prev=program_transform_name ;;
1189   -program-transform-name=* | --program-transform-name=* \
1190   | --program-transform-nam=* | --program-transform-na=* \
1191   | --program-transform-n=* | --program-transform-=* \
1192   | --program-transform=* | --program-transfor=* \
1193   | --program-transfo=* | --program-transf=* \
1194   | --program-trans=* | --program-tran=* \
1195   | --progr-tra=* | --program-tr=* | --program-t=*)
1196     program_transform_name=$ac_optarg ;;
1197
1198   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1199     ac_prev=pdfdir ;;
1200   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1201     pdfdir=$ac_optarg ;;
1202
1203   -psdir | --psdir | --psdi | --psd | --ps)
1204     ac_prev=psdir ;;
1205   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1206     psdir=$ac_optarg ;;
1207
1208   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1209   | -silent | --silent | --silen | --sile | --sil)
1210     silent=yes ;;
1211
1212   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1213     ac_prev=sbindir ;;
1214   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1215   | --sbi=* | --sb=*)
1216     sbindir=$ac_optarg ;;
1217
1218   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1219   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1220   | --sharedst | --shareds | --shared | --share | --shar \
1221   | --sha | --sh)
1222     ac_prev=sharedstatedir ;;
1223   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1224   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1225   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1226   | --sha=* | --sh=*)
1227     sharedstatedir=$ac_optarg ;;
1228
1229   -site | --site | --sit)
1230     ac_prev=site ;;
1231   -site=* | --site=* | --sit=*)
1232     site=$ac_optarg ;;
1233
1234   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1235     ac_prev=srcdir ;;
1236   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1237     srcdir=$ac_optarg ;;
1238
1239   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1240   | --syscon | --sysco | --sysc | --sys | --sy)
1241     ac_prev=sysconfdir ;;
1242   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1243   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1244     sysconfdir=$ac_optarg ;;
1245
1246   -target | --target | --targe | --targ | --tar | --ta | --t)
1247     ac_prev=target_alias ;;
1248   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1249     target_alias=$ac_optarg ;;
1250
1251   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1252     verbose=yes ;;
1253
1254   -version | --version | --versio | --versi | --vers | -V)
1255     ac_init_version=: ;;
1256
1257   -with-* | --with-*)
1258     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1259     # Reject names that are not valid shell variable names.
1260     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1261       as_fn_error $? "invalid package name: $ac_useropt"
1262     ac_useropt_orig=$ac_useropt
1263     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1264     case $ac_user_opts in
1265       *"
1266 "with_$ac_useropt"
1267 "*) ;;
1268       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1269          ac_unrecognized_sep=', ';;
1270     esac
1271     eval with_$ac_useropt=\$ac_optarg ;;
1272
1273   -without-* | --without-*)
1274     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1275     # Reject names that are not valid shell variable names.
1276     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1277       as_fn_error $? "invalid package name: $ac_useropt"
1278     ac_useropt_orig=$ac_useropt
1279     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1280     case $ac_user_opts in
1281       *"
1282 "with_$ac_useropt"
1283 "*) ;;
1284       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1285          ac_unrecognized_sep=', ';;
1286     esac
1287     eval with_$ac_useropt=no ;;
1288
1289   --x)
1290     # Obsolete; use --with-x.
1291     with_x=yes ;;
1292
1293   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1294   | --x-incl | --x-inc | --x-in | --x-i)
1295     ac_prev=x_includes ;;
1296   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1297   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1298     x_includes=$ac_optarg ;;
1299
1300   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1301   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1302     ac_prev=x_libraries ;;
1303   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1304   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1305     x_libraries=$ac_optarg ;;
1306
1307   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1308 Try \`$0 --help' for more information"
1309     ;;
1310
1311   *=*)
1312     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1313     # Reject names that are not valid shell variable names.
1314     case $ac_envvar in #(
1315       '' | [0-9]* | *[!_$as_cr_alnum]* )
1316       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1317     esac
1318     eval $ac_envvar=\$ac_optarg
1319     export $ac_envvar ;;
1320
1321   *)
1322     # FIXME: should be removed in autoconf 3.0.
1323     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1324     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1325       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1326     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1327     ;;
1328
1329   esac
1330 done
1331
1332 if test -n "$ac_prev"; then
1333   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1334   as_fn_error $? "missing argument to $ac_option"
1335 fi
1336
1337 if test -n "$ac_unrecognized_opts"; then
1338   case $enable_option_checking in
1339     no) ;;
1340     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1341     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1342   esac
1343 fi
1344
1345 # Check all directory arguments for consistency.
1346 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1347                 datadir sysconfdir sharedstatedir localstatedir includedir \
1348                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1349                 libdir localedir mandir
1350 do
1351   eval ac_val=\$$ac_var
1352   # Remove trailing slashes.
1353   case $ac_val in
1354     */ )
1355       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1356       eval $ac_var=\$ac_val;;
1357   esac
1358   # Be sure to have absolute directory names.
1359   case $ac_val in
1360     [\\/$]* | ?:[\\/]* )  continue;;
1361     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1362   esac
1363   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1364 done
1365
1366 # There might be people who depend on the old broken behavior: `$host'
1367 # used to hold the argument of --host etc.
1368 # FIXME: To remove some day.
1369 build=$build_alias
1370 host=$host_alias
1371 target=$target_alias
1372
1373 # FIXME: To remove some day.
1374 if test "x$host_alias" != x; then
1375   if test "x$build_alias" = x; then
1376     cross_compiling=maybe
1377   elif test "x$build_alias" != "x$host_alias"; then
1378     cross_compiling=yes
1379   fi
1380 fi
1381
1382 ac_tool_prefix=
1383 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1384
1385 test "$silent" = yes && exec 6>/dev/null
1386
1387
1388 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1389 ac_ls_di=`ls -di .` &&
1390 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1391   as_fn_error $? "working directory cannot be determined"
1392 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1393   as_fn_error $? "pwd does not report name of working directory"
1394
1395
1396 # Find the source files, if location was not specified.
1397 if test -z "$srcdir"; then
1398   ac_srcdir_defaulted=yes
1399   # Try the directory containing this script, then the parent directory.
1400   ac_confdir=`$as_dirname -- "$as_myself" ||
1401 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1402          X"$as_myself" : 'X\(//\)[^/]' \| \
1403          X"$as_myself" : 'X\(//\)$' \| \
1404          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1405 $as_echo X"$as_myself" |
1406     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1407             s//\1/
1408             q
1409           }
1410           /^X\(\/\/\)[^/].*/{
1411             s//\1/
1412             q
1413           }
1414           /^X\(\/\/\)$/{
1415             s//\1/
1416             q
1417           }
1418           /^X\(\/\).*/{
1419             s//\1/
1420             q
1421           }
1422           s/.*/./; q'`
1423   srcdir=$ac_confdir
1424   if test ! -r "$srcdir/$ac_unique_file"; then
1425     srcdir=..
1426   fi
1427 else
1428   ac_srcdir_defaulted=no
1429 fi
1430 if test ! -r "$srcdir/$ac_unique_file"; then
1431   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1432   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1433 fi
1434 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1435 ac_abs_confdir=`(
1436         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1437         pwd)`
1438 # When building in place, set srcdir=.
1439 if test "$ac_abs_confdir" = "$ac_pwd"; then
1440   srcdir=.
1441 fi
1442 # Remove unnecessary trailing slashes from srcdir.
1443 # Double slashes in file names in object file debugging info
1444 # mess up M-x gdb in Emacs.
1445 case $srcdir in
1446 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1447 esac
1448 for ac_var in $ac_precious_vars; do
1449   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1450   eval ac_env_${ac_var}_value=\$${ac_var}
1451   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1452   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1453 done
1454
1455 #
1456 # Report the --help message.
1457 #
1458 if test "$ac_init_help" = "long"; then
1459   # Omit some internal or obsolete options to make the list less imposing.
1460   # This message is too long to be a string in the A/UX 3.1 sh.
1461   cat <<_ACEOF
1462 \`configure' configures unbound 1.13.0 to adapt to many kinds of systems.
1463
1464 Usage: $0 [OPTION]... [VAR=VALUE]...
1465
1466 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1467 VAR=VALUE.  See below for descriptions of some of the useful variables.
1468
1469 Defaults for the options are specified in brackets.
1470
1471 Configuration:
1472   -h, --help              display this help and exit
1473       --help=short        display options specific to this package
1474       --help=recursive    display the short help of all the included packages
1475   -V, --version           display version information and exit
1476   -q, --quiet, --silent   do not print \`checking ...' messages
1477       --cache-file=FILE   cache test results in FILE [disabled]
1478   -C, --config-cache      alias for \`--cache-file=config.cache'
1479   -n, --no-create         do not create output files
1480       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1481
1482 Installation directories:
1483   --prefix=PREFIX         install architecture-independent files in PREFIX
1484                           [$ac_default_prefix]
1485   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1486                           [PREFIX]
1487
1488 By default, \`make install' will install all the files in
1489 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1490 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1491 for instance \`--prefix=\$HOME'.
1492
1493 For better control, use the options below.
1494
1495 Fine tuning of the installation directories:
1496   --bindir=DIR            user executables [EPREFIX/bin]
1497   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1498   --libexecdir=DIR        program executables [EPREFIX/libexec]
1499   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1500   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1501   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1502   --libdir=DIR            object code libraries [EPREFIX/lib]
1503   --includedir=DIR        C header files [PREFIX/include]
1504   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1505   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1506   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1507   --infodir=DIR           info documentation [DATAROOTDIR/info]
1508   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1509   --mandir=DIR            man documentation [DATAROOTDIR/man]
1510   --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1511   --htmldir=DIR           html documentation [DOCDIR]
1512   --dvidir=DIR            dvi documentation [DOCDIR]
1513   --pdfdir=DIR            pdf documentation [DOCDIR]
1514   --psdir=DIR             ps documentation [DOCDIR]
1515 _ACEOF
1516
1517   cat <<\_ACEOF
1518
1519 System types:
1520   --build=BUILD     configure for building on BUILD [guessed]
1521   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1522 _ACEOF
1523 fi
1524
1525 if test -n "$ac_init_help"; then
1526   case $ac_init_help in
1527      short | recursive ) echo "Configuration of unbound 1.13.0:";;
1528    esac
1529   cat <<\_ACEOF
1530
1531 Optional Features:
1532   --disable-option-checking  ignore unrecognized --enable/--with options
1533   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1534   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1535   --enable-checking       Enable warnings, asserts, makefile-dependencies
1536   --enable-debug          same as enable-checking
1537   --disable-flto          Disable link-time optimization (gcc specific option)
1538   --enable-pie            Enable Position-Independent Executable (eg. to fully
1539                           benefit from ASLR, small performance penalty)
1540   --enable-relro-now      Enable full relocation binding at load-time (RELRO
1541                           NOW, to protect GOT and .dtor areas)
1542   --enable-shared[=PKGS]  build shared libraries [default=yes]
1543   --enable-static[=PKGS]  build static libraries [default=yes]
1544   --enable-fast-install[=PKGS]
1545                           optimize for fast installation [default=yes]
1546   --disable-libtool-lock  avoid locking (might break parallel builds)
1547   --disable-rpath         disable hardcoded rpath (default=enabled)
1548   --disable-largefile     omit support for large files
1549   --enable-systemd        compile with systemd support
1550   --enable-alloc-checks   enable to memory allocation statistics, for debug
1551                           purposes
1552   --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1553                           purposes
1554   --enable-alloc-nonregional
1555                           enable nonregional allocs, slow but exposes regional
1556                           allocations to other memory purifiers, for debug
1557                           purposes
1558   --disable-swig-version-check
1559                           Disable swig version check to build python modules
1560                           with older swig even though that is unreliable
1561   --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1562                           support
1563   --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1564   --enable-subnet         Enable client subnet
1565   --disable-gost          Disable GOST support
1566   --disable-ecdsa         Disable ECDSA support
1567   --disable-dsa           Disable DSA support
1568   --disable-ed25519       Disable ED25519 support
1569   --disable-ed448         Disable ED448 support
1570   --enable-event-api      Enable (experimental) pluggable event base
1571                           libunbound API installed to unbound-event.h
1572   --enable-tfo-client     Enable TCP Fast Open for client mode
1573   --enable-tfo-server     Enable TCP Fast Open for server mode
1574   --enable-static-exe     enable to compile executables statically against
1575                           (event) uninstalled libs, for debug purposes
1576   --enable-fully-static   enable to compile fully static
1577   --enable-lock-checks    enable to check lock and unlock calls, for debug
1578                           purposes
1579   --enable-allsymbols     export all symbols from libunbound and link binaries
1580                           to it, smaller install size but libunbound export
1581                           table is polluted by internal symbols
1582   --enable-dnstap         Enable dnstap support (requires protobuf-c)
1583   --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1584   --enable-cachedb        enable cachedb module that can use external cache
1585                           storage
1586   --enable-ipsecmod       Enable ipsecmod module that facilitates
1587                           opportunistic IPsec
1588   --enable-ipset          enable ipset module
1589   --disable-explicit-port-randomisation
1590                           disable explicit source port randomisation and rely
1591                           on the kernel to provide random source ports
1592
1593 Optional Packages:
1594   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1595   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1596   --with-conf-file=path   Pathname to the Unbound configuration file
1597   --with-run-dir=path     set default directory to chdir to (by default dir
1598                           part of cfg file)
1599   --with-chroot-dir=path  set default directory to chroot to (by default same
1600                           as run-dir)
1601   --with-share-dir=path   set default directory with shared data (by default
1602                           same as share/unbound)
1603   --with-pidfile=filename set default pathname to unbound pidfile (default
1604                           run-dir/unbound.pid)
1605   --with-rootkey-file=filename
1606                           set default pathname to root key file (default
1607                           run-dir/root.key). This file is read and written.
1608   --with-rootcert-file=filename
1609                           set default pathname to root update certificate file
1610                           (default run-dir/icannbundle.pem). This file need
1611                           not exist if you are content with the builtin.
1612   --with-username=user    set default user that unbound changes to (default
1613                           user is unbound)
1614   --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1615                           both]
1616   --with-aix-soname=aix|svr4|both
1617                           shared library versioning (aka "SONAME") variant to
1618                           provide on AIX, [default=aix].
1619   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1620   --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1621                           compiler's sysroot if not specified).
1622   --with-pthreads         use pthreads library, or --without-pthreads to
1623                           disable threading support.
1624   --with-solaris-threads  use solaris native thread library.
1625   --with-syslog-facility=LOCAL0 - LOCAL7
1626                           set SYSLOG_FACILITY, default DAEMON
1627   --with-dynlibmodule     build dynamic library module, or
1628                           --without-dynlibmodule to disable it. (default=no)
1629   --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1630                           (default=no)
1631   --with-pythonmodule     build Python module, or --without-pythonmodule to
1632                           disable script engine. (default=no)
1633   --with-nss=path         use libnss instead of openssl, installed at path.
1634   --with-nettle=path      use libnettle as crypto library, installed at path.
1635   --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1636                           /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1637                           /usr)
1638   --with-libbsd           Use portable libbsd functions
1639   --with-libevent=pathname
1640                           use libevent (will check /usr/local /opt/local
1641                           /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1642                           an explicit path). Slower, but allows use of large
1643                           outgoing port ranges.
1644   --with-libexpat=path    specify explicit path for libexpat.
1645   --with-libhiredis=path  specify explicit path for libhiredis.
1646   --with-libnghttp2=path  specify explicit path for libnghttp2.
1647   --with-dnstap-socket-path=pathname
1648                           set default dnstap socket path
1649   --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1650   --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1651   --with-libmnl=path      specify explicit path for libmnl.
1652   --with-libunbound-only  do not build daemon and tool programs
1653
1654 Some influential environment variables:
1655   CC          C compiler command
1656   CFLAGS      C compiler flags
1657   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1658               nonstandard directory <lib dir>
1659   LIBS        libraries to pass to the linker, e.g. -l<library>
1660   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1661               you have headers in a nonstandard directory <include dir>
1662   CPP         C preprocessor
1663   YACC        The `Yet Another Compiler Compiler' implementation to use.
1664               Defaults to the first program found out of: `bison -y', `byacc',
1665               `yacc'.
1666   YFLAGS      The list of arguments that will be passed by default to $YACC.
1667               This script will default YFLAGS to the empty string to avoid a
1668               default value of `-d' given by some make applications.
1669   LT_SYS_LIBRARY_PATH
1670               User-defined run-time library search path.
1671   PKG_CONFIG  path to pkg-config utility
1672   PKG_CONFIG_PATH
1673               directories to add to pkg-config's search path
1674   PKG_CONFIG_LIBDIR
1675               path overriding pkg-config's built-in search path
1676   SYSTEMD_CFLAGS
1677               C compiler flags for SYSTEMD, overriding pkg-config
1678   SYSTEMD_LIBS
1679               linker flags for SYSTEMD, overriding pkg-config
1680   SYSTEMD_DAEMON_CFLAGS
1681               C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1682   SYSTEMD_DAEMON_LIBS
1683               linker flags for SYSTEMD_DAEMON, overriding pkg-config
1684   PYTHON_VERSION
1685               The installed Python version to use, for example '2.3'. This
1686               string will be appended to the Python interpreter canonical
1687               name.
1688
1689 Use these variables to override the choices made by `configure' or to help
1690 it to find libraries and programs with nonstandard names/locations.
1691
1692 Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
1693 _ACEOF
1694 ac_status=$?
1695 fi
1696
1697 if test "$ac_init_help" = "recursive"; then
1698   # If there are subdirs, report their specific --help.
1699   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1700     test -d "$ac_dir" ||
1701       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1702       continue
1703     ac_builddir=.
1704
1705 case "$ac_dir" in
1706 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1707 *)
1708   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1709   # A ".." for each directory in $ac_dir_suffix.
1710   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1711   case $ac_top_builddir_sub in
1712   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1713   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1714   esac ;;
1715 esac
1716 ac_abs_top_builddir=$ac_pwd
1717 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1718 # for backward compatibility:
1719 ac_top_builddir=$ac_top_build_prefix
1720
1721 case $srcdir in
1722   .)  # We are building in place.
1723     ac_srcdir=.
1724     ac_top_srcdir=$ac_top_builddir_sub
1725     ac_abs_top_srcdir=$ac_pwd ;;
1726   [\\/]* | ?:[\\/]* )  # Absolute name.
1727     ac_srcdir=$srcdir$ac_dir_suffix;
1728     ac_top_srcdir=$srcdir
1729     ac_abs_top_srcdir=$srcdir ;;
1730   *) # Relative name.
1731     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1732     ac_top_srcdir=$ac_top_build_prefix$srcdir
1733     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1734 esac
1735 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1736
1737     cd "$ac_dir" || { ac_status=$?; continue; }
1738     # Check for guested configure.
1739     if test -f "$ac_srcdir/configure.gnu"; then
1740       echo &&
1741       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1742     elif test -f "$ac_srcdir/configure"; then
1743       echo &&
1744       $SHELL "$ac_srcdir/configure" --help=recursive
1745     else
1746       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1747     fi || ac_status=$?
1748     cd "$ac_pwd" || { ac_status=$?; break; }
1749   done
1750 fi
1751
1752 test -n "$ac_init_help" && exit $ac_status
1753 if $ac_init_version; then
1754   cat <<\_ACEOF
1755 unbound configure 1.13.0
1756 generated by GNU Autoconf 2.69
1757
1758 Copyright (C) 2012 Free Software Foundation, Inc.
1759 This configure script is free software; the Free Software Foundation
1760 gives unlimited permission to copy, distribute and modify it.
1761 _ACEOF
1762   exit
1763 fi
1764
1765 ## ------------------------ ##
1766 ## Autoconf initialization. ##
1767 ## ------------------------ ##
1768
1769 # ac_fn_c_try_compile LINENO
1770 # --------------------------
1771 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1772 ac_fn_c_try_compile ()
1773 {
1774   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1775   rm -f conftest.$ac_objext
1776   if { { ac_try="$ac_compile"
1777 case "(($ac_try" in
1778   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1779   *) ac_try_echo=$ac_try;;
1780 esac
1781 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1782 $as_echo "$ac_try_echo"; } >&5
1783   (eval "$ac_compile") 2>conftest.err
1784   ac_status=$?
1785   if test -s conftest.err; then
1786     grep -v '^ *+' conftest.err >conftest.er1
1787     cat conftest.er1 >&5
1788     mv -f conftest.er1 conftest.err
1789   fi
1790   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1791   test $ac_status = 0; } && {
1792          test -z "$ac_c_werror_flag" ||
1793          test ! -s conftest.err
1794        } && test -s conftest.$ac_objext; then :
1795   ac_retval=0
1796 else
1797   $as_echo "$as_me: failed program was:" >&5
1798 sed 's/^/| /' conftest.$ac_ext >&5
1799
1800         ac_retval=1
1801 fi
1802   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1803   as_fn_set_status $ac_retval
1804
1805 } # ac_fn_c_try_compile
1806
1807 # ac_fn_c_try_cpp LINENO
1808 # ----------------------
1809 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1810 ac_fn_c_try_cpp ()
1811 {
1812   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1813   if { { ac_try="$ac_cpp conftest.$ac_ext"
1814 case "(($ac_try" in
1815   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1816   *) ac_try_echo=$ac_try;;
1817 esac
1818 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1819 $as_echo "$ac_try_echo"; } >&5
1820   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1821   ac_status=$?
1822   if test -s conftest.err; then
1823     grep -v '^ *+' conftest.err >conftest.er1
1824     cat conftest.er1 >&5
1825     mv -f conftest.er1 conftest.err
1826   fi
1827   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1828   test $ac_status = 0; } > conftest.i && {
1829          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1830          test ! -s conftest.err
1831        }; then :
1832   ac_retval=0
1833 else
1834   $as_echo "$as_me: failed program was:" >&5
1835 sed 's/^/| /' conftest.$ac_ext >&5
1836
1837     ac_retval=1
1838 fi
1839   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1840   as_fn_set_status $ac_retval
1841
1842 } # ac_fn_c_try_cpp
1843
1844 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1845 # -------------------------------------------------------
1846 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1847 # the include files in INCLUDES and setting the cache variable VAR
1848 # accordingly.
1849 ac_fn_c_check_header_mongrel ()
1850 {
1851   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1852   if eval \${$3+:} false; then :
1853   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1854 $as_echo_n "checking for $2... " >&6; }
1855 if eval \${$3+:} false; then :
1856   $as_echo_n "(cached) " >&6
1857 fi
1858 eval ac_res=\$$3
1859                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860 $as_echo "$ac_res" >&6; }
1861 else
1862   # Is the header compilable?
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1864 $as_echo_n "checking $2 usability... " >&6; }
1865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1866 /* end confdefs.h.  */
1867 $4
1868 #include <$2>
1869 _ACEOF
1870 if ac_fn_c_try_compile "$LINENO"; then :
1871   ac_header_compiler=yes
1872 else
1873   ac_header_compiler=no
1874 fi
1875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1877 $as_echo "$ac_header_compiler" >&6; }
1878
1879 # Is the header present?
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1881 $as_echo_n "checking $2 presence... " >&6; }
1882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883 /* end confdefs.h.  */
1884 #include <$2>
1885 _ACEOF
1886 if ac_fn_c_try_cpp "$LINENO"; then :
1887   ac_header_preproc=yes
1888 else
1889   ac_header_preproc=no
1890 fi
1891 rm -f conftest.err conftest.i conftest.$ac_ext
1892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1893 $as_echo "$ac_header_preproc" >&6; }
1894
1895 # So?  What about this header?
1896 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1897   yes:no: )
1898     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1899 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1900     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1901 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1902     ;;
1903   no:yes:* )
1904     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1905 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1906     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1907 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1908     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1909 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1910     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1911 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1912     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1913 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1914 ( $as_echo "## --------------------------------------------------------------------------------------- ##
1915 ## Report this to unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues ##
1916 ## --------------------------------------------------------------------------------------- ##"
1917      ) | sed "s/^/$as_me: WARNING:     /" >&2
1918     ;;
1919 esac
1920   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1921 $as_echo_n "checking for $2... " >&6; }
1922 if eval \${$3+:} false; then :
1923   $as_echo_n "(cached) " >&6
1924 else
1925   eval "$3=\$ac_header_compiler"
1926 fi
1927 eval ac_res=\$$3
1928                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1929 $as_echo "$ac_res" >&6; }
1930 fi
1931   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1932
1933 } # ac_fn_c_check_header_mongrel
1934
1935 # ac_fn_c_try_run LINENO
1936 # ----------------------
1937 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1938 # that executables *can* be run.
1939 ac_fn_c_try_run ()
1940 {
1941   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1942   if { { ac_try="$ac_link"
1943 case "(($ac_try" in
1944   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1945   *) ac_try_echo=$ac_try;;
1946 esac
1947 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1948 $as_echo "$ac_try_echo"; } >&5
1949   (eval "$ac_link") 2>&5
1950   ac_status=$?
1951   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1952   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
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_try") 2>&5
1960   ac_status=$?
1961   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1962   test $ac_status = 0; }; }; then :
1963   ac_retval=0
1964 else
1965   $as_echo "$as_me: program exited with status $ac_status" >&5
1966        $as_echo "$as_me: failed program was:" >&5
1967 sed 's/^/| /' conftest.$ac_ext >&5
1968
1969        ac_retval=$ac_status
1970 fi
1971   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1972   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1973   as_fn_set_status $ac_retval
1974
1975 } # ac_fn_c_try_run
1976
1977 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1978 # -------------------------------------------------------
1979 # Tests whether HEADER exists and can be compiled using the include files in
1980 # INCLUDES, setting the cache variable VAR accordingly.
1981 ac_fn_c_check_header_compile ()
1982 {
1983   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1985 $as_echo_n "checking for $2... " >&6; }
1986 if eval \${$3+:} false; then :
1987   $as_echo_n "(cached) " >&6
1988 else
1989   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1990 /* end confdefs.h.  */
1991 $4
1992 #include <$2>
1993 _ACEOF
1994 if ac_fn_c_try_compile "$LINENO"; then :
1995   eval "$3=yes"
1996 else
1997   eval "$3=no"
1998 fi
1999 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2000 fi
2001 eval ac_res=\$$3
2002                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2003 $as_echo "$ac_res" >&6; }
2004   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2005
2006 } # ac_fn_c_check_header_compile
2007
2008 # ac_fn_c_try_link LINENO
2009 # -----------------------
2010 # Try to link conftest.$ac_ext, and return whether this succeeded.
2011 ac_fn_c_try_link ()
2012 {
2013   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014   rm -f conftest.$ac_objext conftest$ac_exeext
2015   if { { ac_try="$ac_link"
2016 case "(($ac_try" in
2017   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2018   *) ac_try_echo=$ac_try;;
2019 esac
2020 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2021 $as_echo "$ac_try_echo"; } >&5
2022   (eval "$ac_link") 2>conftest.err
2023   ac_status=$?
2024   if test -s conftest.err; then
2025     grep -v '^ *+' conftest.err >conftest.er1
2026     cat conftest.er1 >&5
2027     mv -f conftest.er1 conftest.err
2028   fi
2029   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2030   test $ac_status = 0; } && {
2031          test -z "$ac_c_werror_flag" ||
2032          test ! -s conftest.err
2033        } && test -s conftest$ac_exeext && {
2034          test "$cross_compiling" = yes ||
2035          test -x conftest$ac_exeext
2036        }; then :
2037   ac_retval=0
2038 else
2039   $as_echo "$as_me: failed program was:" >&5
2040 sed 's/^/| /' conftest.$ac_ext >&5
2041
2042         ac_retval=1
2043 fi
2044   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2045   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2046   # interfere with the next link command; also delete a directory that is
2047   # left behind by Apple's compiler.  We do this before executing the actions.
2048   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2049   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2050   as_fn_set_status $ac_retval
2051
2052 } # ac_fn_c_try_link
2053
2054 # ac_fn_c_check_func LINENO FUNC VAR
2055 # ----------------------------------
2056 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2057 ac_fn_c_check_func ()
2058 {
2059   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2060   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2061 $as_echo_n "checking for $2... " >&6; }
2062 if eval \${$3+:} false; then :
2063   $as_echo_n "(cached) " >&6
2064 else
2065   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2066 /* end confdefs.h.  */
2067 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2068    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2069 #define $2 innocuous_$2
2070
2071 /* System header to define __stub macros and hopefully few prototypes,
2072     which can conflict with char $2 (); below.
2073     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2074     <limits.h> exists even on freestanding compilers.  */
2075
2076 #ifdef __STDC__
2077 # include <limits.h>
2078 #else
2079 # include <assert.h>
2080 #endif
2081
2082 #undef $2
2083
2084 /* Override any GCC internal prototype to avoid an error.
2085    Use char because int might match the return type of a GCC
2086    builtin and then its argument prototype would still apply.  */
2087 #ifdef __cplusplus
2088 extern "C"
2089 #endif
2090 char $2 ();
2091 /* The GNU C library defines this for functions which it implements
2092     to always fail with ENOSYS.  Some functions are actually named
2093     something starting with __ and the normal name is an alias.  */
2094 #if defined __stub_$2 || defined __stub___$2
2095 choke me
2096 #endif
2097
2098 int
2099 main ()
2100 {
2101 return $2 ();
2102   ;
2103   return 0;
2104 }
2105 _ACEOF
2106 if ac_fn_c_try_link "$LINENO"; then :
2107   eval "$3=yes"
2108 else
2109   eval "$3=no"
2110 fi
2111 rm -f core conftest.err conftest.$ac_objext \
2112     conftest$ac_exeext conftest.$ac_ext
2113 fi
2114 eval ac_res=\$$3
2115                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2116 $as_echo "$ac_res" >&6; }
2117   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2118
2119 } # ac_fn_c_check_func
2120
2121 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2122 # -------------------------------------------
2123 # Tests whether TYPE exists after having included INCLUDES, setting cache
2124 # variable VAR accordingly.
2125 ac_fn_c_check_type ()
2126 {
2127   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2128   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2129 $as_echo_n "checking for $2... " >&6; }
2130 if eval \${$3+:} false; then :
2131   $as_echo_n "(cached) " >&6
2132 else
2133   eval "$3=no"
2134   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2135 /* end confdefs.h.  */
2136 $4
2137 int
2138 main ()
2139 {
2140 if (sizeof ($2))
2141          return 0;
2142   ;
2143   return 0;
2144 }
2145 _ACEOF
2146 if ac_fn_c_try_compile "$LINENO"; then :
2147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148 /* end confdefs.h.  */
2149 $4
2150 int
2151 main ()
2152 {
2153 if (sizeof (($2)))
2154             return 0;
2155   ;
2156   return 0;
2157 }
2158 _ACEOF
2159 if ac_fn_c_try_compile "$LINENO"; then :
2160
2161 else
2162   eval "$3=yes"
2163 fi
2164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2165 fi
2166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167 fi
2168 eval ac_res=\$$3
2169                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2170 $as_echo "$ac_res" >&6; }
2171   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2172
2173 } # ac_fn_c_check_type
2174
2175 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2176 # --------------------------------------------
2177 # Tries to find the compile-time value of EXPR in a program that includes
2178 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2179 # computed
2180 ac_fn_c_compute_int ()
2181 {
2182   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2183   if test "$cross_compiling" = yes; then
2184     # Depending upon the size, compute the lo and hi bounds.
2185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2186 /* end confdefs.h.  */
2187 $4
2188 int
2189 main ()
2190 {
2191 static int test_array [1 - 2 * !(($2) >= 0)];
2192 test_array [0] = 0;
2193 return test_array [0];
2194
2195   ;
2196   return 0;
2197 }
2198 _ACEOF
2199 if ac_fn_c_try_compile "$LINENO"; then :
2200   ac_lo=0 ac_mid=0
2201   while :; do
2202     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203 /* end confdefs.h.  */
2204 $4
2205 int
2206 main ()
2207 {
2208 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2209 test_array [0] = 0;
2210 return test_array [0];
2211
2212   ;
2213   return 0;
2214 }
2215 _ACEOF
2216 if ac_fn_c_try_compile "$LINENO"; then :
2217   ac_hi=$ac_mid; break
2218 else
2219   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2220                         if test $ac_lo -le $ac_mid; then
2221                           ac_lo= ac_hi=
2222                           break
2223                         fi
2224                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2225 fi
2226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2227   done
2228 else
2229   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2230 /* end confdefs.h.  */
2231 $4
2232 int
2233 main ()
2234 {
2235 static int test_array [1 - 2 * !(($2) < 0)];
2236 test_array [0] = 0;
2237 return test_array [0];
2238
2239   ;
2240   return 0;
2241 }
2242 _ACEOF
2243 if ac_fn_c_try_compile "$LINENO"; then :
2244   ac_hi=-1 ac_mid=-1
2245   while :; do
2246     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247 /* end confdefs.h.  */
2248 $4
2249 int
2250 main ()
2251 {
2252 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2253 test_array [0] = 0;
2254 return test_array [0];
2255
2256   ;
2257   return 0;
2258 }
2259 _ACEOF
2260 if ac_fn_c_try_compile "$LINENO"; then :
2261   ac_lo=$ac_mid; break
2262 else
2263   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2264                         if test $ac_mid -le $ac_hi; then
2265                           ac_lo= ac_hi=
2266                           break
2267                         fi
2268                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2269 fi
2270 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2271   done
2272 else
2273   ac_lo= ac_hi=
2274 fi
2275 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2276 fi
2277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2278 # Binary search between lo and hi bounds.
2279 while test "x$ac_lo" != "x$ac_hi"; do
2280   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2282 /* end confdefs.h.  */
2283 $4
2284 int
2285 main ()
2286 {
2287 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2288 test_array [0] = 0;
2289 return test_array [0];
2290
2291   ;
2292   return 0;
2293 }
2294 _ACEOF
2295 if ac_fn_c_try_compile "$LINENO"; then :
2296   ac_hi=$ac_mid
2297 else
2298   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2299 fi
2300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301 done
2302 case $ac_lo in #((
2303 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2304 '') ac_retval=1 ;;
2305 esac
2306   else
2307     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308 /* end confdefs.h.  */
2309 $4
2310 static long int longval () { return $2; }
2311 static unsigned long int ulongval () { return $2; }
2312 #include <stdio.h>
2313 #include <stdlib.h>
2314 int
2315 main ()
2316 {
2317
2318   FILE *f = fopen ("conftest.val", "w");
2319   if (! f)
2320     return 1;
2321   if (($2) < 0)
2322     {
2323       long int i = longval ();
2324       if (i != ($2))
2325         return 1;
2326       fprintf (f, "%ld", i);
2327     }
2328   else
2329     {
2330       unsigned long int i = ulongval ();
2331       if (i != ($2))
2332         return 1;
2333       fprintf (f, "%lu", i);
2334     }
2335   /* Do not output a trailing newline, as this causes \r\n confusion
2336      on some platforms.  */
2337   return ferror (f) || fclose (f) != 0;
2338
2339   ;
2340   return 0;
2341 }
2342 _ACEOF
2343 if ac_fn_c_try_run "$LINENO"; then :
2344   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2345 else
2346   ac_retval=1
2347 fi
2348 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2349   conftest.$ac_objext conftest.beam conftest.$ac_ext
2350 rm -f conftest.val
2351
2352   fi
2353   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2354   as_fn_set_status $ac_retval
2355
2356 } # ac_fn_c_compute_int
2357
2358 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2359 # ---------------------------------------------
2360 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2361 # accordingly.
2362 ac_fn_c_check_decl ()
2363 {
2364   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2365   as_decl_name=`echo $2|sed 's/ *(.*//'`
2366   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2367   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2368 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2369 if eval \${$3+:} false; then :
2370   $as_echo_n "(cached) " >&6
2371 else
2372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373 /* end confdefs.h.  */
2374 $4
2375 int
2376 main ()
2377 {
2378 #ifndef $as_decl_name
2379 #ifdef __cplusplus
2380   (void) $as_decl_use;
2381 #else
2382   (void) $as_decl_name;
2383 #endif
2384 #endif
2385
2386   ;
2387   return 0;
2388 }
2389 _ACEOF
2390 if ac_fn_c_try_compile "$LINENO"; then :
2391   eval "$3=yes"
2392 else
2393   eval "$3=no"
2394 fi
2395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2396 fi
2397 eval ac_res=\$$3
2398                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2399 $as_echo "$ac_res" >&6; }
2400   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2401
2402 } # ac_fn_c_check_decl
2403
2404 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2405 # ----------------------------------------------------
2406 # Tries to find if the field MEMBER exists in type AGGR, after including
2407 # INCLUDES, setting cache variable VAR accordingly.
2408 ac_fn_c_check_member ()
2409 {
2410   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2411   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2412 $as_echo_n "checking for $2.$3... " >&6; }
2413 if eval \${$4+:} false; then :
2414   $as_echo_n "(cached) " >&6
2415 else
2416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2417 /* end confdefs.h.  */
2418 $5
2419 int
2420 main ()
2421 {
2422 static $2 ac_aggr;
2423 if (ac_aggr.$3)
2424 return 0;
2425   ;
2426   return 0;
2427 }
2428 _ACEOF
2429 if ac_fn_c_try_compile "$LINENO"; then :
2430   eval "$4=yes"
2431 else
2432   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2433 /* end confdefs.h.  */
2434 $5
2435 int
2436 main ()
2437 {
2438 static $2 ac_aggr;
2439 if (sizeof ac_aggr.$3)
2440 return 0;
2441   ;
2442   return 0;
2443 }
2444 _ACEOF
2445 if ac_fn_c_try_compile "$LINENO"; then :
2446   eval "$4=yes"
2447 else
2448   eval "$4=no"
2449 fi
2450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2451 fi
2452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2453 fi
2454 eval ac_res=\$$4
2455                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2456 $as_echo "$ac_res" >&6; }
2457   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2458
2459 } # ac_fn_c_check_member
2460 cat >config.log <<_ACEOF
2461 This file contains any messages produced by compilers while
2462 running configure, to aid debugging if configure makes a mistake.
2463
2464 It was created by unbound $as_me 1.13.0, which was
2465 generated by GNU Autoconf 2.69.  Invocation command line was
2466
2467   $ $0 $@
2468
2469 _ACEOF
2470 exec 5>>config.log
2471 {
2472 cat <<_ASUNAME
2473 ## --------- ##
2474 ## Platform. ##
2475 ## --------- ##
2476
2477 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2478 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2479 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2480 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2481 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2482
2483 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2484 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2485
2486 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2487 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2488 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2489 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2490 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2491 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2492 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2493
2494 _ASUNAME
2495
2496 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2497 for as_dir in $PATH
2498 do
2499   IFS=$as_save_IFS
2500   test -z "$as_dir" && as_dir=.
2501     $as_echo "PATH: $as_dir"
2502   done
2503 IFS=$as_save_IFS
2504
2505 } >&5
2506
2507 cat >&5 <<_ACEOF
2508
2509
2510 ## ----------- ##
2511 ## Core tests. ##
2512 ## ----------- ##
2513
2514 _ACEOF
2515
2516
2517 # Keep a trace of the command line.
2518 # Strip out --no-create and --no-recursion so they do not pile up.
2519 # Strip out --silent because we don't want to record it for future runs.
2520 # Also quote any args containing shell meta-characters.
2521 # Make two passes to allow for proper duplicate-argument suppression.
2522 ac_configure_args=
2523 ac_configure_args0=
2524 ac_configure_args1=
2525 ac_must_keep_next=false
2526 for ac_pass in 1 2
2527 do
2528   for ac_arg
2529   do
2530     case $ac_arg in
2531     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2532     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2533     | -silent | --silent | --silen | --sile | --sil)
2534       continue ;;
2535     *\'*)
2536       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2537     esac
2538     case $ac_pass in
2539     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2540     2)
2541       as_fn_append ac_configure_args1 " '$ac_arg'"
2542       if test $ac_must_keep_next = true; then
2543         ac_must_keep_next=false # Got value, back to normal.
2544       else
2545         case $ac_arg in
2546           *=* | --config-cache | -C | -disable-* | --disable-* \
2547           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2548           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2549           | -with-* | --with-* | -without-* | --without-* | --x)
2550             case "$ac_configure_args0 " in
2551               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2552             esac
2553             ;;
2554           -* ) ac_must_keep_next=true ;;
2555         esac
2556       fi
2557       as_fn_append ac_configure_args " '$ac_arg'"
2558       ;;
2559     esac
2560   done
2561 done
2562 { ac_configure_args0=; unset ac_configure_args0;}
2563 { ac_configure_args1=; unset ac_configure_args1;}
2564
2565 # When interrupted or exit'd, cleanup temporary files, and complete
2566 # config.log.  We remove comments because anyway the quotes in there
2567 # would cause problems or look ugly.
2568 # WARNING: Use '\'' to represent an apostrophe within the trap.
2569 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2570 trap 'exit_status=$?
2571   # Save into config.log some information that might help in debugging.
2572   {
2573     echo
2574
2575     $as_echo "## ---------------- ##
2576 ## Cache variables. ##
2577 ## ---------------- ##"
2578     echo
2579     # The following way of writing the cache mishandles newlines in values,
2580 (
2581   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2582     eval ac_val=\$$ac_var
2583     case $ac_val in #(
2584     *${as_nl}*)
2585       case $ac_var in #(
2586       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2587 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2588       esac
2589       case $ac_var in #(
2590       _ | IFS | as_nl) ;; #(
2591       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2592       *) { eval $ac_var=; unset $ac_var;} ;;
2593       esac ;;
2594     esac
2595   done
2596   (set) 2>&1 |
2597     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2598     *${as_nl}ac_space=\ *)
2599       sed -n \
2600         "s/'\''/'\''\\\\'\'''\''/g;
2601           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2602       ;; #(
2603     *)
2604       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2605       ;;
2606     esac |
2607     sort
2608 )
2609     echo
2610
2611     $as_echo "## ----------------- ##
2612 ## Output variables. ##
2613 ## ----------------- ##"
2614     echo
2615     for ac_var in $ac_subst_vars
2616     do
2617       eval ac_val=\$$ac_var
2618       case $ac_val in
2619       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2620       esac
2621       $as_echo "$ac_var='\''$ac_val'\''"
2622     done | sort
2623     echo
2624
2625     if test -n "$ac_subst_files"; then
2626       $as_echo "## ------------------- ##
2627 ## File substitutions. ##
2628 ## ------------------- ##"
2629       echo
2630       for ac_var in $ac_subst_files
2631       do
2632         eval ac_val=\$$ac_var
2633         case $ac_val in
2634         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2635         esac
2636         $as_echo "$ac_var='\''$ac_val'\''"
2637       done | sort
2638       echo
2639     fi
2640
2641     if test -s confdefs.h; then
2642       $as_echo "## ----------- ##
2643 ## confdefs.h. ##
2644 ## ----------- ##"
2645       echo
2646       cat confdefs.h
2647       echo
2648     fi
2649     test "$ac_signal" != 0 &&
2650       $as_echo "$as_me: caught signal $ac_signal"
2651     $as_echo "$as_me: exit $exit_status"
2652   } >&5
2653   rm -f core *.core core.conftest.* &&
2654     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2655     exit $exit_status
2656 ' 0
2657 for ac_signal in 1 2 13 15; do
2658   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2659 done
2660 ac_signal=0
2661
2662 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2663 rm -f -r conftest* confdefs.h
2664
2665 $as_echo "/* confdefs.h */" > confdefs.h
2666
2667 # Predefined preprocessor variables.
2668
2669 cat >>confdefs.h <<_ACEOF
2670 #define PACKAGE_NAME "$PACKAGE_NAME"
2671 _ACEOF
2672
2673 cat >>confdefs.h <<_ACEOF
2674 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2675 _ACEOF
2676
2677 cat >>confdefs.h <<_ACEOF
2678 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2679 _ACEOF
2680
2681 cat >>confdefs.h <<_ACEOF
2682 #define PACKAGE_STRING "$PACKAGE_STRING"
2683 _ACEOF
2684
2685 cat >>confdefs.h <<_ACEOF
2686 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2687 _ACEOF
2688
2689 cat >>confdefs.h <<_ACEOF
2690 #define PACKAGE_URL "$PACKAGE_URL"
2691 _ACEOF
2692
2693
2694 # Let the site file select an alternate cache file if it wants to.
2695 # Prefer an explicitly selected file to automatically selected ones.
2696 ac_site_file1=NONE
2697 ac_site_file2=NONE
2698 if test -n "$CONFIG_SITE"; then
2699   # We do not want a PATH search for config.site.
2700   case $CONFIG_SITE in #((
2701     -*)  ac_site_file1=./$CONFIG_SITE;;
2702     */*) ac_site_file1=$CONFIG_SITE;;
2703     *)   ac_site_file1=./$CONFIG_SITE;;
2704   esac
2705 elif test "x$prefix" != xNONE; then
2706   ac_site_file1=$prefix/share/config.site
2707   ac_site_file2=$prefix/etc/config.site
2708 else
2709   ac_site_file1=$ac_default_prefix/share/config.site
2710   ac_site_file2=$ac_default_prefix/etc/config.site
2711 fi
2712 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2713 do
2714   test "x$ac_site_file" = xNONE && continue
2715   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2716     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2717 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2718     sed 's/^/| /' "$ac_site_file" >&5
2719     . "$ac_site_file" \
2720       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2721 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2722 as_fn_error $? "failed to load site script $ac_site_file
2723 See \`config.log' for more details" "$LINENO" 5; }
2724   fi
2725 done
2726
2727 if test -r "$cache_file"; then
2728   # Some versions of bash will fail to source /dev/null (special files
2729   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2730   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2731     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2732 $as_echo "$as_me: loading cache $cache_file" >&6;}
2733     case $cache_file in
2734       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2735       *)                      . "./$cache_file";;
2736     esac
2737   fi
2738 else
2739   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2740 $as_echo "$as_me: creating cache $cache_file" >&6;}
2741   >$cache_file
2742 fi
2743
2744 # Check that the precious variables saved in the cache have kept the same
2745 # value.
2746 ac_cache_corrupted=false
2747 for ac_var in $ac_precious_vars; do
2748   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2749   eval ac_new_set=\$ac_env_${ac_var}_set
2750   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2751   eval ac_new_val=\$ac_env_${ac_var}_value
2752   case $ac_old_set,$ac_new_set in
2753     set,)
2754       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2755 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2756       ac_cache_corrupted=: ;;
2757     ,set)
2758       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2759 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2760       ac_cache_corrupted=: ;;
2761     ,);;
2762     *)
2763       if test "x$ac_old_val" != "x$ac_new_val"; then
2764         # differences in whitespace do not lead to failure.
2765         ac_old_val_w=`echo x $ac_old_val`
2766         ac_new_val_w=`echo x $ac_new_val`
2767         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2768           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2769 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2770           ac_cache_corrupted=:
2771         else
2772           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2773 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2774           eval $ac_var=\$ac_old_val
2775         fi
2776         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2777 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2778         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2779 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2780       fi;;
2781   esac
2782   # Pass precious variables to config.status.
2783   if test "$ac_new_set" = set; then
2784     case $ac_new_val in
2785     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2786     *) ac_arg=$ac_var=$ac_new_val ;;
2787     esac
2788     case " $ac_configure_args " in
2789       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2790       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2791     esac
2792   fi
2793 done
2794 if $ac_cache_corrupted; then
2795   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2796 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2797   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2798 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2799   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2800 fi
2801 ## -------------------- ##
2802 ## Main body of script. ##
2803 ## -------------------- ##
2804
2805 ac_ext=c
2806 ac_cpp='$CPP $CPPFLAGS'
2807 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2808 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2809 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2810
2811
2812 UNBOUND_VERSION_MAJOR=1
2813
2814 UNBOUND_VERSION_MINOR=13
2815
2816 UNBOUND_VERSION_MICRO=0
2817
2818
2819 LIBUNBOUND_CURRENT=9
2820 LIBUNBOUND_REVISION=11
2821 LIBUNBOUND_AGE=1
2822 # 1.0.0 had 0:12:0
2823 # 1.0.1 had 0:13:0
2824 # 1.0.2 had 0:14:0
2825 # 1.1.0 had 0:15:0
2826 # 1.1.1 had 0:16:0
2827 # 1.2.0 had 0:17:0
2828 # 1.2.1 had 0:18:0
2829 # 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
2830 # 1.3.1 had 1:1:0
2831 # 1.3.2 had 1:2:0
2832 # 1.3.3 had 1:3:0
2833 # 1.3.4 had 1:4:0
2834 # 1.4.0-snapshots had 1:5:0
2835 # 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
2836 # 1.4.1 had 2:1:0
2837 # 1.4.2 had 2:2:0
2838 # 1.4.3 had 2:3:0
2839 # 1.4.4 had 2:4:0
2840 # 1.4.5 had 2:5:0
2841 # 1.4.6 had 2:6:0
2842 # 1.4.7 had 2:7:0
2843 # 1.4.8 had 2:8:0
2844 # 1.4.9 had 2:9:0
2845 # 1.4.10 had 2:10:0
2846 # 1.4.11 had 2:11:0
2847 # 1.4.12 had 2:12:0
2848 # 1.4.13 had 2:13:0
2849 # and 1.4.13p1 and 1.4.13.p2
2850 # 1.4.14 had 2:14:0
2851 # 1.4.15 had 3:0:1 # adds ub_version()
2852 # 1.4.16 had 3:1:1
2853 # 1.4.17 had 3:2:1
2854 # 1.4.18 had 3:3:1
2855 # 1.4.19 had 3:4:1
2856 # 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
2857 # 1.4.21 had 4:1:2
2858 # 1.4.22 had 4:1:2
2859 # 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2860 # 1.5.1 had 5:3:3
2861 # 1.5.2 had 5:5:3
2862 # 1.5.3 had 5:6:3
2863 # 1.5.4 had 5:7:3
2864 # 1.5.5 had 5:8:3
2865 # 1.5.6 had 5:9:3
2866 # 1.5.7 had 5:10:3
2867 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
2868 # 1.5.9 had 6:1:4
2869 # 1.5.10 had 6:2:4
2870 # 1.6.0 had 6:3:4
2871 # 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
2872 # 1.6.2 had 7:1:5
2873 # 1.6.3 had 7:2:5
2874 # 1.6.4 had 7:3:5
2875 # 1.6.5 had 7:4:5
2876 # 1.6.6 had 7:5:5
2877 # 1.6.7 had 7:6:5
2878 # 1.6.8 had 7:7:5
2879 # 1.7.0 had 7:8:5
2880 # 1.7.1 had 7:9:5
2881 # 1.7.2 had 7:10:5
2882 # 1.7.3 had 7:11:5
2883 # 1.8.0 had 8:0:0 # changes the event callback function signature
2884 # 1.8.1 had 8:1:0
2885 # 1.8.2 had 8:2:0
2886 # 1.8.3 had 8:3:0
2887 # 1.9.0 had 9:0:1 # add ub_ctx_set_tls
2888 # 1.9.1 had 9:1:1
2889 # 1.9.2 had 9:2:1
2890 # 1.9.3 had 9:3:1
2891 # 1.9.4 had 9:4:1
2892 # 1.9.5 had 9:5:1
2893 # 1.9.6 had 9:6:1
2894 # 1.10.0 had 9:7:1
2895 # 1.10.1 had 9:8:1
2896 # 1.11.0 had 9:9:1
2897 # 1.12.0 had 9:10:1
2898 # 1.13.0 had 9:11:1
2899
2900 #   Current  -- the number of the binary API that we're implementing
2901 #   Revision -- which iteration of the implementation of the binary
2902 #               API are we supplying?
2903 #   Age      -- How many previous binary API versions do we also
2904 #               support?
2905 #
2906 # If we release a new version that does not change the binary API,
2907 # increment Revision.
2908 #
2909 # If we release a new version that changes the binary API, but does
2910 # not break programs compiled against the old binary API, increment
2911 # Current and Age.  Set Revision to 0, since this is the first
2912 # implementation of the new API.
2913 #
2914 # Otherwise, we're changing the binary API and breaking backward
2915 # compatibility with old binaries.  Increment Current.  Set Age to 0,
2916 # since we're backward compatible with no previous APIs.  Set Revision
2917 # to 0 too.
2918
2919
2920
2921
2922
2923 cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`"
2924
2925 cat >>confdefs.h <<_ACEOF
2926 #define CONFCMDLINE "$cmdln"
2927 _ACEOF
2928
2929
2930 CFLAGS="$CFLAGS"
2931 ac_ext=c
2932 ac_cpp='$CPP $CPPFLAGS'
2933 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2934 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2935 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2936 if test -n "$ac_tool_prefix"; then
2937   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2938 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2940 $as_echo_n "checking for $ac_word... " >&6; }
2941 if ${ac_cv_prog_CC+:} false; then :
2942   $as_echo_n "(cached) " >&6
2943 else
2944   if test -n "$CC"; then
2945   ac_cv_prog_CC="$CC" # Let the user override the test.
2946 else
2947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2948 for as_dir in $PATH
2949 do
2950   IFS=$as_save_IFS
2951   test -z "$as_dir" && as_dir=.
2952     for ac_exec_ext in '' $ac_executable_extensions; do
2953   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2954     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2955     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2956     break 2
2957   fi
2958 done
2959   done
2960 IFS=$as_save_IFS
2961
2962 fi
2963 fi
2964 CC=$ac_cv_prog_CC
2965 if test -n "$CC"; then
2966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2967 $as_echo "$CC" >&6; }
2968 else
2969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2970 $as_echo "no" >&6; }
2971 fi
2972
2973
2974 fi
2975 if test -z "$ac_cv_prog_CC"; then
2976   ac_ct_CC=$CC
2977   # Extract the first word of "gcc", so it can be a program name with args.
2978 set dummy gcc; ac_word=$2
2979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2980 $as_echo_n "checking for $ac_word... " >&6; }
2981 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2982   $as_echo_n "(cached) " >&6
2983 else
2984   if test -n "$ac_ct_CC"; then
2985   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2986 else
2987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2988 for as_dir in $PATH
2989 do
2990   IFS=$as_save_IFS
2991   test -z "$as_dir" && as_dir=.
2992     for ac_exec_ext in '' $ac_executable_extensions; do
2993   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2994     ac_cv_prog_ac_ct_CC="gcc"
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 fi
3003 fi
3004 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3005 if test -n "$ac_ct_CC"; then
3006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3007 $as_echo "$ac_ct_CC" >&6; }
3008 else
3009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3010 $as_echo "no" >&6; }
3011 fi
3012
3013   if test "x$ac_ct_CC" = x; then
3014     CC=""
3015   else
3016     case $cross_compiling:$ac_tool_warned in
3017 yes:)
3018 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3019 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3020 ac_tool_warned=yes ;;
3021 esac
3022     CC=$ac_ct_CC
3023   fi
3024 else
3025   CC="$ac_cv_prog_CC"
3026 fi
3027
3028 if test -z "$CC"; then
3029           if test -n "$ac_tool_prefix"; then
3030     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3031 set dummy ${ac_tool_prefix}cc; ac_word=$2
3032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3033 $as_echo_n "checking for $ac_word... " >&6; }
3034 if ${ac_cv_prog_CC+:} false; then :
3035   $as_echo_n "(cached) " >&6
3036 else
3037   if test -n "$CC"; then
3038   ac_cv_prog_CC="$CC" # Let the user override the test.
3039 else
3040 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3041 for as_dir in $PATH
3042 do
3043   IFS=$as_save_IFS
3044   test -z "$as_dir" && as_dir=.
3045     for ac_exec_ext in '' $ac_executable_extensions; do
3046   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3047     ac_cv_prog_CC="${ac_tool_prefix}cc"
3048     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3049     break 2
3050   fi
3051 done
3052   done
3053 IFS=$as_save_IFS
3054
3055 fi
3056 fi
3057 CC=$ac_cv_prog_CC
3058 if test -n "$CC"; then
3059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3060 $as_echo "$CC" >&6; }
3061 else
3062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3063 $as_echo "no" >&6; }
3064 fi
3065
3066
3067   fi
3068 fi
3069 if test -z "$CC"; then
3070   # Extract the first word of "cc", so it can be a program name with args.
3071 set dummy cc; ac_word=$2
3072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3073 $as_echo_n "checking for $ac_word... " >&6; }
3074 if ${ac_cv_prog_CC+:} false; then :
3075   $as_echo_n "(cached) " >&6
3076 else
3077   if test -n "$CC"; then
3078   ac_cv_prog_CC="$CC" # Let the user override the test.
3079 else
3080   ac_prog_rejected=no
3081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3082 for as_dir in $PATH
3083 do
3084   IFS=$as_save_IFS
3085   test -z "$as_dir" && as_dir=.
3086     for ac_exec_ext in '' $ac_executable_extensions; do
3087   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3088     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3089        ac_prog_rejected=yes
3090        continue
3091      fi
3092     ac_cv_prog_CC="cc"
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 if test $ac_prog_rejected = yes; then
3101   # We found a bogon in the path, so make sure we never use it.
3102   set dummy $ac_cv_prog_CC
3103   shift
3104   if test $# != 0; then
3105     # We chose a different compiler from the bogus one.
3106     # However, it has the same basename, so the bogon will be chosen
3107     # first if we set CC to just the basename; use the full file name.
3108     shift
3109     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3110   fi
3111 fi
3112 fi
3113 fi
3114 CC=$ac_cv_prog_CC
3115 if test -n "$CC"; then
3116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3117 $as_echo "$CC" >&6; }
3118 else
3119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3120 $as_echo "no" >&6; }
3121 fi
3122
3123
3124 fi
3125 if test -z "$CC"; then
3126   if test -n "$ac_tool_prefix"; then
3127   for ac_prog in cl.exe
3128   do
3129     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3130 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3132 $as_echo_n "checking for $ac_word... " >&6; }
3133 if ${ac_cv_prog_CC+:} false; then :
3134   $as_echo_n "(cached) " >&6
3135 else
3136   if test -n "$CC"; then
3137   ac_cv_prog_CC="$CC" # Let the user override the test.
3138 else
3139 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3140 for as_dir in $PATH
3141 do
3142   IFS=$as_save_IFS
3143   test -z "$as_dir" && as_dir=.
3144     for ac_exec_ext in '' $ac_executable_extensions; do
3145   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3146     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3147     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3148     break 2
3149   fi
3150 done
3151   done
3152 IFS=$as_save_IFS
3153
3154 fi
3155 fi
3156 CC=$ac_cv_prog_CC
3157 if test -n "$CC"; then
3158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3159 $as_echo "$CC" >&6; }
3160 else
3161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3162 $as_echo "no" >&6; }
3163 fi
3164
3165
3166     test -n "$CC" && break
3167   done
3168 fi
3169 if test -z "$CC"; then
3170   ac_ct_CC=$CC
3171   for ac_prog in cl.exe
3172 do
3173   # Extract the first word of "$ac_prog", so it can be a program name with args.
3174 set dummy $ac_prog; ac_word=$2
3175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3176 $as_echo_n "checking for $ac_word... " >&6; }
3177 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3178   $as_echo_n "(cached) " >&6
3179 else
3180   if test -n "$ac_ct_CC"; then
3181   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3182 else
3183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3184 for as_dir in $PATH
3185 do
3186   IFS=$as_save_IFS
3187   test -z "$as_dir" && as_dir=.
3188     for ac_exec_ext in '' $ac_executable_extensions; do
3189   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3190     ac_cv_prog_ac_ct_CC="$ac_prog"
3191     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3192     break 2
3193   fi
3194 done
3195   done
3196 IFS=$as_save_IFS
3197
3198 fi
3199 fi
3200 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3201 if test -n "$ac_ct_CC"; then
3202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3203 $as_echo "$ac_ct_CC" >&6; }
3204 else
3205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3206 $as_echo "no" >&6; }
3207 fi
3208
3209
3210   test -n "$ac_ct_CC" && break
3211 done
3212
3213   if test "x$ac_ct_CC" = x; then
3214     CC=""
3215   else
3216     case $cross_compiling:$ac_tool_warned in
3217 yes:)
3218 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3219 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3220 ac_tool_warned=yes ;;
3221 esac
3222     CC=$ac_ct_CC
3223   fi
3224 fi
3225
3226 fi
3227
3228
3229 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3230 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3231 as_fn_error $? "no acceptable C compiler found in \$PATH
3232 See \`config.log' for more details" "$LINENO" 5; }
3233
3234 # Provide some information about the compiler.
3235 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3236 set X $ac_compile
3237 ac_compiler=$2
3238 for ac_option in --version -v -V -qversion; do
3239   { { ac_try="$ac_compiler $ac_option >&5"
3240 case "(($ac_try" in
3241   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3242   *) ac_try_echo=$ac_try;;
3243 esac
3244 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3245 $as_echo "$ac_try_echo"; } >&5
3246   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3247   ac_status=$?
3248   if test -s conftest.err; then
3249     sed '10a\
3250 ... rest of stderr output deleted ...
3251          10q' conftest.err >conftest.er1
3252     cat conftest.er1 >&5
3253   fi
3254   rm -f conftest.er1 conftest.err
3255   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3256   test $ac_status = 0; }
3257 done
3258
3259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3260 /* end confdefs.h.  */
3261
3262 int
3263 main ()
3264 {
3265
3266   ;
3267   return 0;
3268 }
3269 _ACEOF
3270 ac_clean_files_save=$ac_clean_files
3271 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3272 # Try to create an executable without -o first, disregard a.out.
3273 # It will help us diagnose broken compilers, and finding out an intuition
3274 # of exeext.
3275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3276 $as_echo_n "checking whether the C compiler works... " >&6; }
3277 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3278
3279 # The possible output files:
3280 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3281
3282 ac_rmfiles=
3283 for ac_file in $ac_files
3284 do
3285   case $ac_file in
3286     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3287     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3288   esac
3289 done
3290 rm -f $ac_rmfiles
3291
3292 if { { ac_try="$ac_link_default"
3293 case "(($ac_try" in
3294   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3295   *) ac_try_echo=$ac_try;;
3296 esac
3297 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3298 $as_echo "$ac_try_echo"; } >&5
3299   (eval "$ac_link_default") 2>&5
3300   ac_status=$?
3301   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3302   test $ac_status = 0; }; then :
3303   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3304 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3305 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3306 # so that the user can short-circuit this test for compilers unknown to
3307 # Autoconf.
3308 for ac_file in $ac_files ''
3309 do
3310   test -f "$ac_file" || continue
3311   case $ac_file in
3312     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3313         ;;
3314     [ab].out )
3315         # We found the default executable, but exeext='' is most
3316         # certainly right.
3317         break;;
3318     *.* )
3319         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3320         then :; else
3321            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3322         fi
3323         # We set ac_cv_exeext here because the later test for it is not
3324         # safe: cross compilers may not add the suffix if given an `-o'
3325         # argument, so we may need to know it at that point already.
3326         # Even if this section looks crufty: it has the advantage of
3327         # actually working.
3328         break;;
3329     * )
3330         break;;
3331   esac
3332 done
3333 test "$ac_cv_exeext" = no && ac_cv_exeext=
3334
3335 else
3336   ac_file=''
3337 fi
3338 if test -z "$ac_file"; then :
3339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3340 $as_echo "no" >&6; }
3341 $as_echo "$as_me: failed program was:" >&5
3342 sed 's/^/| /' conftest.$ac_ext >&5
3343
3344 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3345 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3346 as_fn_error 77 "C compiler cannot create executables
3347 See \`config.log' for more details" "$LINENO" 5; }
3348 else
3349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3350 $as_echo "yes" >&6; }
3351 fi
3352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3353 $as_echo_n "checking for C compiler default output file name... " >&6; }
3354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3355 $as_echo "$ac_file" >&6; }
3356 ac_exeext=$ac_cv_exeext
3357
3358 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3359 ac_clean_files=$ac_clean_files_save
3360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3361 $as_echo_n "checking for suffix of executables... " >&6; }
3362 if { { ac_try="$ac_link"
3363 case "(($ac_try" in
3364   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3365   *) ac_try_echo=$ac_try;;
3366 esac
3367 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3368 $as_echo "$ac_try_echo"; } >&5
3369   (eval "$ac_link") 2>&5
3370   ac_status=$?
3371   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3372   test $ac_status = 0; }; then :
3373   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3374 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3375 # work properly (i.e., refer to `conftest.exe'), while it won't with
3376 # `rm'.
3377 for ac_file in conftest.exe conftest conftest.*; do
3378   test -f "$ac_file" || continue
3379   case $ac_file in
3380     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3381     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3382           break;;
3383     * ) break;;
3384   esac
3385 done
3386 else
3387   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3388 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3389 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3390 See \`config.log' for more details" "$LINENO" 5; }
3391 fi
3392 rm -f conftest conftest$ac_cv_exeext
3393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3394 $as_echo "$ac_cv_exeext" >&6; }
3395
3396 rm -f conftest.$ac_ext
3397 EXEEXT=$ac_cv_exeext
3398 ac_exeext=$EXEEXT
3399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3400 /* end confdefs.h.  */
3401 #include <stdio.h>
3402 int
3403 main ()
3404 {
3405 FILE *f = fopen ("conftest.out", "w");
3406  return ferror (f) || fclose (f) != 0;
3407
3408   ;
3409   return 0;
3410 }
3411 _ACEOF
3412 ac_clean_files="$ac_clean_files conftest.out"
3413 # Check that the compiler produces executables we can run.  If not, either
3414 # the compiler is broken, or we cross compile.
3415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3416 $as_echo_n "checking whether we are cross compiling... " >&6; }
3417 if test "$cross_compiling" != yes; then
3418   { { ac_try="$ac_link"
3419 case "(($ac_try" in
3420   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3421   *) ac_try_echo=$ac_try;;
3422 esac
3423 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3424 $as_echo "$ac_try_echo"; } >&5
3425   (eval "$ac_link") 2>&5
3426   ac_status=$?
3427   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3428   test $ac_status = 0; }
3429   if { ac_try='./conftest$ac_cv_exeext'
3430   { { case "(($ac_try" in
3431   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3432   *) ac_try_echo=$ac_try;;
3433 esac
3434 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3435 $as_echo "$ac_try_echo"; } >&5
3436   (eval "$ac_try") 2>&5
3437   ac_status=$?
3438   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3439   test $ac_status = 0; }; }; then
3440     cross_compiling=no
3441   else
3442     if test "$cross_compiling" = maybe; then
3443         cross_compiling=yes
3444     else
3445         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3446 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3447 as_fn_error $? "cannot run C compiled programs.
3448 If you meant to cross compile, use \`--host'.
3449 See \`config.log' for more details" "$LINENO" 5; }
3450     fi
3451   fi
3452 fi
3453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3454 $as_echo "$cross_compiling" >&6; }
3455
3456 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3457 ac_clean_files=$ac_clean_files_save
3458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3459 $as_echo_n "checking for suffix of object files... " >&6; }
3460 if ${ac_cv_objext+:} false; then :
3461   $as_echo_n "(cached) " >&6
3462 else
3463   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3464 /* end confdefs.h.  */
3465
3466 int
3467 main ()
3468 {
3469
3470   ;
3471   return 0;
3472 }
3473 _ACEOF
3474 rm -f conftest.o conftest.obj
3475 if { { ac_try="$ac_compile"
3476 case "(($ac_try" in
3477   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3478   *) ac_try_echo=$ac_try;;
3479 esac
3480 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3481 $as_echo "$ac_try_echo"; } >&5
3482   (eval "$ac_compile") 2>&5
3483   ac_status=$?
3484   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3485   test $ac_status = 0; }; then :
3486   for ac_file in conftest.o conftest.obj conftest.*; do
3487   test -f "$ac_file" || continue;
3488   case $ac_file in
3489     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3490     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3491        break;;
3492   esac
3493 done
3494 else
3495   $as_echo "$as_me: failed program was:" >&5
3496 sed 's/^/| /' conftest.$ac_ext >&5
3497
3498 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3499 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3500 as_fn_error $? "cannot compute suffix of object files: cannot compile
3501 See \`config.log' for more details" "$LINENO" 5; }
3502 fi
3503 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3504 fi
3505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3506 $as_echo "$ac_cv_objext" >&6; }
3507 OBJEXT=$ac_cv_objext
3508 ac_objext=$OBJEXT
3509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3510 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3511 if ${ac_cv_c_compiler_gnu+:} false; then :
3512   $as_echo_n "(cached) " >&6
3513 else
3514   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3515 /* end confdefs.h.  */
3516
3517 int
3518 main ()
3519 {
3520 #ifndef __GNUC__
3521        choke me
3522 #endif
3523
3524   ;
3525   return 0;
3526 }
3527 _ACEOF
3528 if ac_fn_c_try_compile "$LINENO"; then :
3529   ac_compiler_gnu=yes
3530 else
3531   ac_compiler_gnu=no
3532 fi
3533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3534 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3535
3536 fi
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3538 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3539 if test $ac_compiler_gnu = yes; then
3540   GCC=yes
3541 else
3542   GCC=
3543 fi
3544 ac_test_CFLAGS=${CFLAGS+set}
3545 ac_save_CFLAGS=$CFLAGS
3546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3547 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3548 if ${ac_cv_prog_cc_g+:} false; then :
3549   $as_echo_n "(cached) " >&6
3550 else
3551   ac_save_c_werror_flag=$ac_c_werror_flag
3552    ac_c_werror_flag=yes
3553    ac_cv_prog_cc_g=no
3554    CFLAGS="-g"
3555    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3556 /* end confdefs.h.  */
3557
3558 int
3559 main ()
3560 {
3561
3562   ;
3563   return 0;
3564 }
3565 _ACEOF
3566 if ac_fn_c_try_compile "$LINENO"; then :
3567   ac_cv_prog_cc_g=yes
3568 else
3569   CFLAGS=""
3570       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3571 /* end confdefs.h.  */
3572
3573 int
3574 main ()
3575 {
3576
3577   ;
3578   return 0;
3579 }
3580 _ACEOF
3581 if ac_fn_c_try_compile "$LINENO"; then :
3582
3583 else
3584   ac_c_werror_flag=$ac_save_c_werror_flag
3585          CFLAGS="-g"
3586          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3587 /* end confdefs.h.  */
3588
3589 int
3590 main ()
3591 {
3592
3593   ;
3594   return 0;
3595 }
3596 _ACEOF
3597 if ac_fn_c_try_compile "$LINENO"; then :
3598   ac_cv_prog_cc_g=yes
3599 fi
3600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3601 fi
3602 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3603 fi
3604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3605    ac_c_werror_flag=$ac_save_c_werror_flag
3606 fi
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3608 $as_echo "$ac_cv_prog_cc_g" >&6; }
3609 if test "$ac_test_CFLAGS" = set; then
3610   CFLAGS=$ac_save_CFLAGS
3611 elif test $ac_cv_prog_cc_g = yes; then
3612   if test "$GCC" = yes; then
3613     CFLAGS="-g -O2"
3614   else
3615     CFLAGS="-g"
3616   fi
3617 else
3618   if test "$GCC" = yes; then
3619     CFLAGS="-O2"
3620   else
3621     CFLAGS=
3622   fi
3623 fi
3624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3625 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3626 if ${ac_cv_prog_cc_c89+:} false; then :
3627   $as_echo_n "(cached) " >&6
3628 else
3629   ac_cv_prog_cc_c89=no
3630 ac_save_CC=$CC
3631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3632 /* end confdefs.h.  */
3633 #include <stdarg.h>
3634 #include <stdio.h>
3635 struct stat;
3636 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3637 struct buf { int x; };
3638 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3639 static char *e (p, i)
3640      char **p;
3641      int i;
3642 {
3643   return p[i];
3644 }
3645 static char *f (char * (*g) (char **, int), char **p, ...)
3646 {
3647   char *s;
3648   va_list v;
3649   va_start (v,p);
3650   s = g (p, va_arg (v,int));
3651   va_end (v);
3652   return s;
3653 }
3654
3655 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3656    function prototypes and stuff, but not '\xHH' hex character constants.
3657    These don't provoke an error unfortunately, instead are silently treated
3658    as 'x'.  The following induces an error, until -std is added to get
3659    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3660    array size at least.  It's necessary to write '\x00'==0 to get something
3661    that's true only with -std.  */
3662 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3663
3664 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3665    inside strings and character constants.  */
3666 #define FOO(x) 'x'
3667 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3668
3669 int test (int i, double x);
3670 struct s1 {int (*f) (int a);};
3671 struct s2 {int (*f) (double a);};
3672 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3673 int argc;
3674 char **argv;
3675 int
3676 main ()
3677 {
3678 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3679   ;
3680   return 0;
3681 }
3682 _ACEOF
3683 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3684         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3685 do
3686   CC="$ac_save_CC $ac_arg"
3687   if ac_fn_c_try_compile "$LINENO"; then :
3688   ac_cv_prog_cc_c89=$ac_arg
3689 fi
3690 rm -f core conftest.err conftest.$ac_objext
3691   test "x$ac_cv_prog_cc_c89" != "xno" && break
3692 done
3693 rm -f conftest.$ac_ext
3694 CC=$ac_save_CC
3695
3696 fi
3697 # AC_CACHE_VAL
3698 case "x$ac_cv_prog_cc_c89" in
3699   x)
3700     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3701 $as_echo "none needed" >&6; } ;;
3702   xno)
3703     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3704 $as_echo "unsupported" >&6; } ;;
3705   *)
3706     CC="$CC $ac_cv_prog_cc_c89"
3707     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3708 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3709 esac
3710 if test "x$ac_cv_prog_cc_c89" != xno; then :
3711
3712 fi
3713
3714 ac_ext=c
3715 ac_cpp='$CPP $CPPFLAGS'
3716 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3717 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3718 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3719
3720
3721 ac_ext=c
3722 ac_cpp='$CPP $CPPFLAGS'
3723 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3724 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3725 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3727 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3728 # On Suns, sometimes $CPP names a directory.
3729 if test -n "$CPP" && test -d "$CPP"; then
3730   CPP=
3731 fi
3732 if test -z "$CPP"; then
3733   if ${ac_cv_prog_CPP+:} false; then :
3734   $as_echo_n "(cached) " >&6
3735 else
3736       # Double quotes because CPP needs to be expanded
3737     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3738     do
3739       ac_preproc_ok=false
3740 for ac_c_preproc_warn_flag in '' yes
3741 do
3742   # Use a header file that comes with gcc, so configuring glibc
3743   # with a fresh cross-compiler works.
3744   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3745   # <limits.h> exists even on freestanding compilers.
3746   # On the NeXT, cc -E runs the code through the compiler's parser,
3747   # not just through cpp. "Syntax error" is here to catch this case.
3748   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3749 /* end confdefs.h.  */
3750 #ifdef __STDC__
3751 # include <limits.h>
3752 #else
3753 # include <assert.h>
3754 #endif
3755                      Syntax error
3756 _ACEOF
3757 if ac_fn_c_try_cpp "$LINENO"; then :
3758
3759 else
3760   # Broken: fails on valid input.
3761 continue
3762 fi
3763 rm -f conftest.err conftest.i conftest.$ac_ext
3764
3765   # OK, works on sane cases.  Now check whether nonexistent headers
3766   # can be detected and how.
3767   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3768 /* end confdefs.h.  */
3769 #include <ac_nonexistent.h>
3770 _ACEOF
3771 if ac_fn_c_try_cpp "$LINENO"; then :
3772   # Broken: success on invalid input.
3773 continue
3774 else
3775   # Passes both tests.
3776 ac_preproc_ok=:
3777 break
3778 fi
3779 rm -f conftest.err conftest.i conftest.$ac_ext
3780
3781 done
3782 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3783 rm -f conftest.i conftest.err conftest.$ac_ext
3784 if $ac_preproc_ok; then :
3785   break
3786 fi
3787
3788     done
3789     ac_cv_prog_CPP=$CPP
3790
3791 fi
3792   CPP=$ac_cv_prog_CPP
3793 else
3794   ac_cv_prog_CPP=$CPP
3795 fi
3796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3797 $as_echo "$CPP" >&6; }
3798 ac_preproc_ok=false
3799 for ac_c_preproc_warn_flag in '' yes
3800 do
3801   # Use a header file that comes with gcc, so configuring glibc
3802   # with a fresh cross-compiler works.
3803   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3804   # <limits.h> exists even on freestanding compilers.
3805   # On the NeXT, cc -E runs the code through the compiler's parser,
3806   # not just through cpp. "Syntax error" is here to catch this case.
3807   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3808 /* end confdefs.h.  */
3809 #ifdef __STDC__
3810 # include <limits.h>
3811 #else
3812 # include <assert.h>
3813 #endif
3814                      Syntax error
3815 _ACEOF
3816 if ac_fn_c_try_cpp "$LINENO"; then :
3817
3818 else
3819   # Broken: fails on valid input.
3820 continue
3821 fi
3822 rm -f conftest.err conftest.i conftest.$ac_ext
3823
3824   # OK, works on sane cases.  Now check whether nonexistent headers
3825   # can be detected and how.
3826   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3827 /* end confdefs.h.  */
3828 #include <ac_nonexistent.h>
3829 _ACEOF
3830 if ac_fn_c_try_cpp "$LINENO"; then :
3831   # Broken: success on invalid input.
3832 continue
3833 else
3834   # Passes both tests.
3835 ac_preproc_ok=:
3836 break
3837 fi
3838 rm -f conftest.err conftest.i conftest.$ac_ext
3839
3840 done
3841 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3842 rm -f conftest.i conftest.err conftest.$ac_ext
3843 if $ac_preproc_ok; then :
3844
3845 else
3846   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3847 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3848 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3849 See \`config.log' for more details" "$LINENO" 5; }
3850 fi
3851
3852 ac_ext=c
3853 ac_cpp='$CPP $CPPFLAGS'
3854 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3855 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3856 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3857
3858
3859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3860 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3861 if ${ac_cv_path_GREP+:} false; then :
3862   $as_echo_n "(cached) " >&6
3863 else
3864   if test -z "$GREP"; then
3865   ac_path_GREP_found=false
3866   # Loop through the user's path and test for each of PROGNAME-LIST
3867   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3868 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3869 do
3870   IFS=$as_save_IFS
3871   test -z "$as_dir" && as_dir=.
3872     for ac_prog in grep ggrep; do
3873     for ac_exec_ext in '' $ac_executable_extensions; do
3874       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3875       as_fn_executable_p "$ac_path_GREP" || continue
3876 # Check for GNU ac_path_GREP and select it if it is found.
3877   # Check for GNU $ac_path_GREP
3878 case `"$ac_path_GREP" --version 2>&1` in
3879 *GNU*)
3880   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3881 *)
3882   ac_count=0
3883   $as_echo_n 0123456789 >"conftest.in"
3884   while :
3885   do
3886     cat "conftest.in" "conftest.in" >"conftest.tmp"
3887     mv "conftest.tmp" "conftest.in"
3888     cp "conftest.in" "conftest.nl"
3889     $as_echo 'GREP' >> "conftest.nl"
3890     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3891     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3892     as_fn_arith $ac_count + 1 && ac_count=$as_val
3893     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3894       # Best one so far, save it but keep looking for a better one
3895       ac_cv_path_GREP="$ac_path_GREP"
3896       ac_path_GREP_max=$ac_count
3897     fi
3898     # 10*(2^10) chars as input seems more than enough
3899     test $ac_count -gt 10 && break
3900   done
3901   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3902 esac
3903
3904       $ac_path_GREP_found && break 3
3905     done
3906   done
3907   done
3908 IFS=$as_save_IFS
3909   if test -z "$ac_cv_path_GREP"; then
3910     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3911   fi
3912 else
3913   ac_cv_path_GREP=$GREP
3914 fi
3915
3916 fi
3917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3918 $as_echo "$ac_cv_path_GREP" >&6; }
3919  GREP="$ac_cv_path_GREP"
3920
3921
3922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3923 $as_echo_n "checking for egrep... " >&6; }
3924 if ${ac_cv_path_EGREP+:} false; then :
3925   $as_echo_n "(cached) " >&6
3926 else
3927   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3928    then ac_cv_path_EGREP="$GREP -E"
3929    else
3930      if test -z "$EGREP"; then
3931   ac_path_EGREP_found=false
3932   # Loop through the user's path and test for each of PROGNAME-LIST
3933   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3934 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3935 do
3936   IFS=$as_save_IFS
3937   test -z "$as_dir" && as_dir=.
3938     for ac_prog in egrep; do
3939     for ac_exec_ext in '' $ac_executable_extensions; do
3940       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3941       as_fn_executable_p "$ac_path_EGREP" || continue
3942 # Check for GNU ac_path_EGREP and select it if it is found.
3943   # Check for GNU $ac_path_EGREP
3944 case `"$ac_path_EGREP" --version 2>&1` in
3945 *GNU*)
3946   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3947 *)
3948   ac_count=0
3949   $as_echo_n 0123456789 >"conftest.in"
3950   while :
3951   do
3952     cat "conftest.in" "conftest.in" >"conftest.tmp"
3953     mv "conftest.tmp" "conftest.in"
3954     cp "conftest.in" "conftest.nl"
3955     $as_echo 'EGREP' >> "conftest.nl"
3956     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3957     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3958     as_fn_arith $ac_count + 1 && ac_count=$as_val
3959     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3960       # Best one so far, save it but keep looking for a better one
3961       ac_cv_path_EGREP="$ac_path_EGREP"
3962       ac_path_EGREP_max=$ac_count
3963     fi
3964     # 10*(2^10) chars as input seems more than enough
3965     test $ac_count -gt 10 && break
3966   done
3967   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3968 esac
3969
3970       $ac_path_EGREP_found && break 3
3971     done
3972   done
3973   done
3974 IFS=$as_save_IFS
3975   if test -z "$ac_cv_path_EGREP"; then
3976     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3977   fi
3978 else
3979   ac_cv_path_EGREP=$EGREP
3980 fi
3981
3982    fi
3983 fi
3984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3985 $as_echo "$ac_cv_path_EGREP" >&6; }
3986  EGREP="$ac_cv_path_EGREP"
3987
3988
3989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3990 $as_echo_n "checking for ANSI C header files... " >&6; }
3991 if ${ac_cv_header_stdc+:} false; then :
3992   $as_echo_n "(cached) " >&6
3993 else
3994   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3995 /* end confdefs.h.  */
3996 #include <stdlib.h>
3997 #include <stdarg.h>
3998 #include <string.h>
3999 #include <float.h>
4000
4001 int
4002 main ()
4003 {
4004
4005   ;
4006   return 0;
4007 }
4008 _ACEOF
4009 if ac_fn_c_try_compile "$LINENO"; then :
4010   ac_cv_header_stdc=yes
4011 else
4012   ac_cv_header_stdc=no
4013 fi
4014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4015
4016 if test $ac_cv_header_stdc = yes; then
4017   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4018   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4019 /* end confdefs.h.  */
4020 #include <string.h>
4021
4022 _ACEOF
4023 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4024   $EGREP "memchr" >/dev/null 2>&1; then :
4025
4026 else
4027   ac_cv_header_stdc=no
4028 fi
4029 rm -f conftest*
4030
4031 fi
4032
4033 if test $ac_cv_header_stdc = yes; then
4034   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4035   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4036 /* end confdefs.h.  */
4037 #include <stdlib.h>
4038
4039 _ACEOF
4040 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4041   $EGREP "free" >/dev/null 2>&1; then :
4042
4043 else
4044   ac_cv_header_stdc=no
4045 fi
4046 rm -f conftest*
4047
4048 fi
4049
4050 if test $ac_cv_header_stdc = yes; then
4051   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4052   if test "$cross_compiling" = yes; then :
4053   :
4054 else
4055   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4056 /* end confdefs.h.  */
4057 #include <ctype.h>
4058 #include <stdlib.h>
4059 #if ((' ' & 0x0FF) == 0x020)
4060 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4061 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4062 #else
4063 # define ISLOWER(c) \
4064                    (('a' <= (c) && (c) <= 'i') \
4065                      || ('j' <= (c) && (c) <= 'r') \
4066                      || ('s' <= (c) && (c) <= 'z'))
4067 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4068 #endif
4069
4070 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4071 int
4072 main ()
4073 {
4074   int i;
4075   for (i = 0; i < 256; i++)
4076     if (XOR (islower (i), ISLOWER (i))
4077         || toupper (i) != TOUPPER (i))
4078       return 2;
4079   return 0;
4080 }
4081 _ACEOF
4082 if ac_fn_c_try_run "$LINENO"; then :
4083
4084 else
4085   ac_cv_header_stdc=no
4086 fi
4087 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4088   conftest.$ac_objext conftest.beam conftest.$ac_ext
4089 fi
4090
4091 fi
4092 fi
4093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4094 $as_echo "$ac_cv_header_stdc" >&6; }
4095 if test $ac_cv_header_stdc = yes; then
4096
4097 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4098
4099 fi
4100
4101 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4102 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4103                   inttypes.h stdint.h unistd.h
4104 do :
4105   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4106 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4107 "
4108 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4109   cat >>confdefs.h <<_ACEOF
4110 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4111 _ACEOF
4112
4113 fi
4114
4115 done
4116
4117
4118
4119   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4120 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4121   MINIX=yes
4122 else
4123   MINIX=
4124 fi
4125
4126
4127   if test "$MINIX" = yes; then
4128
4129 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4130
4131
4132 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4133
4134
4135 $as_echo "#define _MINIX 1" >>confdefs.h
4136
4137   fi
4138
4139
4140   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4141 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4142 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4143   $as_echo_n "(cached) " >&6
4144 else
4145   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4146 /* end confdefs.h.  */
4147
4148 #         define __EXTENSIONS__ 1
4149           $ac_includes_default
4150 int
4151 main ()
4152 {
4153
4154   ;
4155   return 0;
4156 }
4157 _ACEOF
4158 if ac_fn_c_try_compile "$LINENO"; then :
4159   ac_cv_safe_to_define___extensions__=yes
4160 else
4161   ac_cv_safe_to_define___extensions__=no
4162 fi
4163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4164 fi
4165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4166 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4167   test $ac_cv_safe_to_define___extensions__ = yes &&
4168     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4169
4170   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4171
4172   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4173
4174   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4175
4176   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4177
4178
4179
4180 if test "$ac_cv_header_minix_config_h" = "yes"; then
4181
4182 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4183
4184 fi
4185
4186 case "$prefix" in
4187         NONE)
4188                 prefix="/usr/local"
4189         ;;
4190 esac
4191 case "$exec_prefix" in
4192         NONE)
4193                 exec_prefix="$prefix"
4194         ;;
4195 esac
4196
4197 # are we on MinGW?
4198 if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
4199 else
4200         if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes"
4201         else on_mingw="no"; fi
4202 fi
4203
4204 #
4205 # Determine configuration file
4206 # the eval is to evaluate shell expansion twice
4207 UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4208
4209 UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4210
4211 UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4212
4213 if test $on_mingw = "no"; then
4214   ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4215 else
4216   ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4217 fi
4218
4219 # Check whether --with-conf_file was given.
4220 if test "${with_conf_file+set}" = set; then :
4221   withval=$with_conf_file; ub_conf_file="$withval"
4222 fi
4223
4224
4225 hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4226
4227
4228 cat >>confdefs.h <<_ACEOF
4229 #define CONFIGFILE "$hdr_config"
4230 _ACEOF
4231
4232 ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4233 $as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4234          X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4235          X"$ub_conf_file" : 'X\(//\)$' \| \
4236          X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4237 $as_echo X"$ub_conf_file" |
4238     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4239             s//\1/
4240             q
4241           }
4242           /^X\(\/\/\)[^/].*/{
4243             s//\1/
4244             q
4245           }
4246           /^X\(\/\/\)$/{
4247             s//\1/
4248             q
4249           }
4250           /^X\(\/\).*/{
4251             s//\1/
4252             q
4253           }
4254           s/.*/./; q'`
4255
4256
4257 # Determine run, chroot directory and pidfile locations
4258
4259 # Check whether --with-run-dir was given.
4260 if test "${with_run_dir+set}" = set; then :
4261   withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4262 else
4263   if test $on_mingw = no; then
4264     UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4265 else
4266     UNBOUND_RUN_DIR=""
4267 fi
4268
4269 fi
4270
4271
4272 hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4273
4274
4275 cat >>confdefs.h <<_ACEOF
4276 #define RUN_DIR "$hdr_run"
4277 _ACEOF
4278
4279
4280
4281 # Check whether --with-chroot-dir was given.
4282 if test "${with_chroot_dir+set}" = set; then :
4283   withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4284 else
4285   if test $on_mingw = no; then
4286     UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4287 else
4288     UNBOUND_CHROOT_DIR=""
4289 fi
4290
4291 fi
4292
4293
4294 hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4295
4296
4297 cat >>confdefs.h <<_ACEOF
4298 #define CHROOT_DIR "$hdr_chroot"
4299 _ACEOF
4300
4301
4302
4303 # Check whether --with-share-dir was given.
4304 if test "${with_share_dir+set}" = set; then :
4305   withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4306 else
4307   UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4308 fi
4309
4310
4311
4312 cat >>confdefs.h <<_ACEOF
4313 #define SHARE_DIR "$UNBOUND_SHARE_DIR"
4314 _ACEOF
4315
4316
4317
4318 # Check whether --with-pidfile was given.
4319 if test "${with_pidfile+set}" = set; then :
4320   withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4321 else
4322   if test $on_mingw = no; then
4323     UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4324 else
4325     UNBOUND_PIDFILE=""
4326 fi
4327
4328 fi
4329
4330
4331 hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4332
4333
4334 cat >>confdefs.h <<_ACEOF
4335 #define PIDFILE "$hdr_pid"
4336 _ACEOF
4337
4338
4339
4340 # Check whether --with-rootkey-file was given.
4341 if test "${with_rootkey_file+set}" = set; then :
4342   withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4343 else
4344   if test $on_mingw = no; then
4345     UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4346 else
4347     UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4348 fi
4349
4350 fi
4351
4352
4353 hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4354
4355
4356 cat >>confdefs.h <<_ACEOF
4357 #define ROOT_ANCHOR_FILE "$hdr_rkey"
4358 _ACEOF
4359
4360
4361
4362 # Check whether --with-rootcert-file was given.
4363 if test "${with_rootcert_file+set}" = set; then :
4364   withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4365 else
4366   if test $on_mingw = no; then
4367     UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4368 else
4369     UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4370 fi
4371
4372 fi
4373
4374
4375 hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4376
4377
4378 cat >>confdefs.h <<_ACEOF
4379 #define ROOT_CERT_FILE "$hdr_rpem"
4380 _ACEOF
4381
4382
4383
4384 # Check whether --with-username was given.
4385 if test "${with_username+set}" = set; then :
4386   withval=$with_username; UNBOUND_USERNAME="$withval"
4387 else
4388   UNBOUND_USERNAME="unbound"
4389 fi
4390
4391
4392
4393 cat >>confdefs.h <<_ACEOF
4394 #define UB_USERNAME "$UNBOUND_USERNAME"
4395 _ACEOF
4396
4397
4398
4399 $as_echo "#define WINVER 0x0502" >>confdefs.h
4400
4401 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/' `
4402
4403
4404 cat >>confdefs.h <<_ACEOF
4405 #define RSRC_PACKAGE_VERSION $wnvs
4406 _ACEOF
4407
4408
4409 # Checks for typedefs, structures, and compiler characteristics.
4410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4411 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4412 if ${ac_cv_c_const+:} false; then :
4413   $as_echo_n "(cached) " >&6
4414 else
4415   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4416 /* end confdefs.h.  */
4417
4418 int
4419 main ()
4420 {
4421
4422 #ifndef __cplusplus
4423   /* Ultrix mips cc rejects this sort of thing.  */
4424   typedef int charset[2];
4425   const charset cs = { 0, 0 };
4426   /* SunOS 4.1.1 cc rejects this.  */
4427   char const *const *pcpcc;
4428   char **ppc;
4429   /* NEC SVR4.0.2 mips cc rejects this.  */
4430   struct point {int x, y;};
4431   static struct point const zero = {0,0};
4432   /* AIX XL C 1.02.0.0 rejects this.
4433      It does not let you subtract one const X* pointer from another in
4434      an arm of an if-expression whose if-part is not a constant
4435      expression */
4436   const char *g = "string";
4437   pcpcc = &g + (g ? g-g : 0);
4438   /* HPUX 7.0 cc rejects these. */
4439   ++pcpcc;
4440   ppc = (char**) pcpcc;
4441   pcpcc = (char const *const *) ppc;
4442   { /* SCO 3.2v4 cc rejects this sort of thing.  */
4443     char tx;
4444     char *t = &tx;
4445     char const *s = 0 ? (char *) 0 : (char const *) 0;
4446
4447     *t++ = 0;
4448     if (s) return 0;
4449   }
4450   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4451     int x[] = {25, 17};
4452     const int *foo = &x[0];
4453     ++foo;
4454   }
4455   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4456     typedef const int *iptr;
4457     iptr p = 0;
4458     ++p;
4459   }
4460   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4461        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4462     struct s { int j; const int *ap[3]; } bx;
4463     struct s *b = &bx; b->j = 5;
4464   }
4465   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4466     const int foo = 10;
4467     if (!foo) return 0;
4468   }
4469   return !cs[0] && !zero.x;
4470 #endif
4471
4472   ;
4473   return 0;
4474 }
4475 _ACEOF
4476 if ac_fn_c_try_compile "$LINENO"; then :
4477   ac_cv_c_const=yes
4478 else
4479   ac_cv_c_const=no
4480 fi
4481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4482 fi
4483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4484 $as_echo "$ac_cv_c_const" >&6; }
4485 if test $ac_cv_c_const = no; then
4486
4487 $as_echo "#define const /**/" >>confdefs.h
4488
4489 fi
4490
4491 ac_ext=c
4492 ac_cpp='$CPP $CPPFLAGS'
4493 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4494 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4495 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4496
4497 # allow user to override the -g -O2 flags.
4498 default_cflags=no
4499 if test "x$CFLAGS" = "x" ; then
4500
4501
4502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4503 $as_echo_n "checking whether $CC supports -g... " >&6; }
4504 cache=`echo g | sed 'y%.=/+-%___p_%'`
4505 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4506   $as_echo_n "(cached) " >&6
4507 else
4508
4509 echo 'void f(void){}' >conftest.c
4510 if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4511 eval "cv_prog_cc_flag_$cache=yes"
4512 else
4513 eval "cv_prog_cc_flag_$cache=no"
4514 fi
4515 rm -f conftest conftest.o conftest.c
4516
4517 fi
4518
4519 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4521 $as_echo "yes" >&6; }
4522 :
4523 CFLAGS="$CFLAGS -g"
4524 else
4525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4526 $as_echo "no" >&6; }
4527 :
4528
4529 fi
4530
4531
4532
4533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4534 $as_echo_n "checking whether $CC supports -O2... " >&6; }
4535 cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4536 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4537   $as_echo_n "(cached) " >&6
4538 else
4539
4540 echo 'void f(void){}' >conftest.c
4541 if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4542 eval "cv_prog_cc_flag_$cache=yes"
4543 else
4544 eval "cv_prog_cc_flag_$cache=no"
4545 fi
4546 rm -f conftest conftest.o conftest.c
4547
4548 fi
4549
4550 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4552 $as_echo "yes" >&6; }
4553 :
4554 CFLAGS="$CFLAGS -O2"
4555 else
4556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4557 $as_echo "no" >&6; }
4558 :
4559
4560 fi
4561
4562 default_cflags=yes
4563 fi
4564 ac_ext=c
4565 ac_cpp='$CPP $CPPFLAGS'
4566 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4567 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4568 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4569 if test -n "$ac_tool_prefix"; then
4570   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4571 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4573 $as_echo_n "checking for $ac_word... " >&6; }
4574 if ${ac_cv_prog_CC+:} false; then :
4575   $as_echo_n "(cached) " >&6
4576 else
4577   if test -n "$CC"; then
4578   ac_cv_prog_CC="$CC" # Let the user override the test.
4579 else
4580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4581 for as_dir in $PATH
4582 do
4583   IFS=$as_save_IFS
4584   test -z "$as_dir" && as_dir=.
4585     for ac_exec_ext in '' $ac_executable_extensions; do
4586   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4587     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4588     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4589     break 2
4590   fi
4591 done
4592   done
4593 IFS=$as_save_IFS
4594
4595 fi
4596 fi
4597 CC=$ac_cv_prog_CC
4598 if test -n "$CC"; then
4599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4600 $as_echo "$CC" >&6; }
4601 else
4602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4603 $as_echo "no" >&6; }
4604 fi
4605
4606
4607 fi
4608 if test -z "$ac_cv_prog_CC"; then
4609   ac_ct_CC=$CC
4610   # Extract the first word of "gcc", so it can be a program name with args.
4611 set dummy gcc; ac_word=$2
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4613 $as_echo_n "checking for $ac_word... " >&6; }
4614 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4615   $as_echo_n "(cached) " >&6
4616 else
4617   if test -n "$ac_ct_CC"; then
4618   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4619 else
4620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4621 for as_dir in $PATH
4622 do
4623   IFS=$as_save_IFS
4624   test -z "$as_dir" && as_dir=.
4625     for ac_exec_ext in '' $ac_executable_extensions; do
4626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4627     ac_cv_prog_ac_ct_CC="gcc"
4628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4629     break 2
4630   fi
4631 done
4632   done
4633 IFS=$as_save_IFS
4634
4635 fi
4636 fi
4637 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4638 if test -n "$ac_ct_CC"; then
4639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4640 $as_echo "$ac_ct_CC" >&6; }
4641 else
4642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4643 $as_echo "no" >&6; }
4644 fi
4645
4646   if test "x$ac_ct_CC" = x; then
4647     CC=""
4648   else
4649     case $cross_compiling:$ac_tool_warned in
4650 yes:)
4651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4652 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4653 ac_tool_warned=yes ;;
4654 esac
4655     CC=$ac_ct_CC
4656   fi
4657 else
4658   CC="$ac_cv_prog_CC"
4659 fi
4660
4661 if test -z "$CC"; then
4662           if test -n "$ac_tool_prefix"; then
4663     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4664 set dummy ${ac_tool_prefix}cc; ac_word=$2
4665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4666 $as_echo_n "checking for $ac_word... " >&6; }
4667 if ${ac_cv_prog_CC+:} false; then :
4668   $as_echo_n "(cached) " >&6
4669 else
4670   if test -n "$CC"; then
4671   ac_cv_prog_CC="$CC" # Let the user override the test.
4672 else
4673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4674 for as_dir in $PATH
4675 do
4676   IFS=$as_save_IFS
4677   test -z "$as_dir" && as_dir=.
4678     for ac_exec_ext in '' $ac_executable_extensions; do
4679   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4680     ac_cv_prog_CC="${ac_tool_prefix}cc"
4681     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4682     break 2
4683   fi
4684 done
4685   done
4686 IFS=$as_save_IFS
4687
4688 fi
4689 fi
4690 CC=$ac_cv_prog_CC
4691 if test -n "$CC"; then
4692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4693 $as_echo "$CC" >&6; }
4694 else
4695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4696 $as_echo "no" >&6; }
4697 fi
4698
4699
4700   fi
4701 fi
4702 if test -z "$CC"; then
4703   # Extract the first word of "cc", so it can be a program name with args.
4704 set dummy cc; ac_word=$2
4705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4706 $as_echo_n "checking for $ac_word... " >&6; }
4707 if ${ac_cv_prog_CC+:} false; then :
4708   $as_echo_n "(cached) " >&6
4709 else
4710   if test -n "$CC"; then
4711   ac_cv_prog_CC="$CC" # Let the user override the test.
4712 else
4713   ac_prog_rejected=no
4714 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4715 for as_dir in $PATH
4716 do
4717   IFS=$as_save_IFS
4718   test -z "$as_dir" && as_dir=.
4719     for ac_exec_ext in '' $ac_executable_extensions; do
4720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4721     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4722        ac_prog_rejected=yes
4723        continue
4724      fi
4725     ac_cv_prog_CC="cc"
4726     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4727     break 2
4728   fi
4729 done
4730   done
4731 IFS=$as_save_IFS
4732
4733 if test $ac_prog_rejected = yes; then
4734   # We found a bogon in the path, so make sure we never use it.
4735   set dummy $ac_cv_prog_CC
4736   shift
4737   if test $# != 0; then
4738     # We chose a different compiler from the bogus one.
4739     # However, it has the same basename, so the bogon will be chosen
4740     # first if we set CC to just the basename; use the full file name.
4741     shift
4742     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4743   fi
4744 fi
4745 fi
4746 fi
4747 CC=$ac_cv_prog_CC
4748 if test -n "$CC"; then
4749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4750 $as_echo "$CC" >&6; }
4751 else
4752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4753 $as_echo "no" >&6; }
4754 fi
4755
4756
4757 fi
4758 if test -z "$CC"; then
4759   if test -n "$ac_tool_prefix"; then
4760   for ac_prog in cl.exe
4761   do
4762     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4763 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4765 $as_echo_n "checking for $ac_word... " >&6; }
4766 if ${ac_cv_prog_CC+:} false; then :
4767   $as_echo_n "(cached) " >&6
4768 else
4769   if test -n "$CC"; then
4770   ac_cv_prog_CC="$CC" # Let the user override the test.
4771 else
4772 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4773 for as_dir in $PATH
4774 do
4775   IFS=$as_save_IFS
4776   test -z "$as_dir" && as_dir=.
4777     for ac_exec_ext in '' $ac_executable_extensions; do
4778   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4779     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4780     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4781     break 2
4782   fi
4783 done
4784   done
4785 IFS=$as_save_IFS
4786
4787 fi
4788 fi
4789 CC=$ac_cv_prog_CC
4790 if test -n "$CC"; then
4791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4792 $as_echo "$CC" >&6; }
4793 else
4794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4795 $as_echo "no" >&6; }
4796 fi
4797
4798
4799     test -n "$CC" && break
4800   done
4801 fi
4802 if test -z "$CC"; then
4803   ac_ct_CC=$CC
4804   for ac_prog in cl.exe
4805 do
4806   # Extract the first word of "$ac_prog", so it can be a program name with args.
4807 set dummy $ac_prog; ac_word=$2
4808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4809 $as_echo_n "checking for $ac_word... " >&6; }
4810 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4811   $as_echo_n "(cached) " >&6
4812 else
4813   if test -n "$ac_ct_CC"; then
4814   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4815 else
4816 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4817 for as_dir in $PATH
4818 do
4819   IFS=$as_save_IFS
4820   test -z "$as_dir" && as_dir=.
4821     for ac_exec_ext in '' $ac_executable_extensions; do
4822   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4823     ac_cv_prog_ac_ct_CC="$ac_prog"
4824     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4825     break 2
4826   fi
4827 done
4828   done
4829 IFS=$as_save_IFS
4830
4831 fi
4832 fi
4833 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4834 if test -n "$ac_ct_CC"; then
4835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4836 $as_echo "$ac_ct_CC" >&6; }
4837 else
4838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4839 $as_echo "no" >&6; }
4840 fi
4841
4842
4843   test -n "$ac_ct_CC" && break
4844 done
4845
4846   if test "x$ac_ct_CC" = x; then
4847     CC=""
4848   else
4849     case $cross_compiling:$ac_tool_warned in
4850 yes:)
4851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4852 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4853 ac_tool_warned=yes ;;
4854 esac
4855     CC=$ac_ct_CC
4856   fi
4857 fi
4858
4859 fi
4860
4861
4862 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4863 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4864 as_fn_error $? "no acceptable C compiler found in \$PATH
4865 See \`config.log' for more details" "$LINENO" 5; }
4866
4867 # Provide some information about the compiler.
4868 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4869 set X $ac_compile
4870 ac_compiler=$2
4871 for ac_option in --version -v -V -qversion; do
4872   { { ac_try="$ac_compiler $ac_option >&5"
4873 case "(($ac_try" in
4874   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4875   *) ac_try_echo=$ac_try;;
4876 esac
4877 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4878 $as_echo "$ac_try_echo"; } >&5
4879   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4880   ac_status=$?
4881   if test -s conftest.err; then
4882     sed '10a\
4883 ... rest of stderr output deleted ...
4884          10q' conftest.err >conftest.er1
4885     cat conftest.er1 >&5
4886   fi
4887   rm -f conftest.er1 conftest.err
4888   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4889   test $ac_status = 0; }
4890 done
4891
4892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4893 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4894 if ${ac_cv_c_compiler_gnu+:} false; then :
4895   $as_echo_n "(cached) " >&6
4896 else
4897   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4898 /* end confdefs.h.  */
4899
4900 int
4901 main ()
4902 {
4903 #ifndef __GNUC__
4904        choke me
4905 #endif
4906
4907   ;
4908   return 0;
4909 }
4910 _ACEOF
4911 if ac_fn_c_try_compile "$LINENO"; then :
4912   ac_compiler_gnu=yes
4913 else
4914   ac_compiler_gnu=no
4915 fi
4916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4917 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4918
4919 fi
4920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4921 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4922 if test $ac_compiler_gnu = yes; then
4923   GCC=yes
4924 else
4925   GCC=
4926 fi
4927 ac_test_CFLAGS=${CFLAGS+set}
4928 ac_save_CFLAGS=$CFLAGS
4929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4930 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4931 if ${ac_cv_prog_cc_g+:} false; then :
4932   $as_echo_n "(cached) " >&6
4933 else
4934   ac_save_c_werror_flag=$ac_c_werror_flag
4935    ac_c_werror_flag=yes
4936    ac_cv_prog_cc_g=no
4937    CFLAGS="-g"
4938    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4939 /* end confdefs.h.  */
4940
4941 int
4942 main ()
4943 {
4944
4945   ;
4946   return 0;
4947 }
4948 _ACEOF
4949 if ac_fn_c_try_compile "$LINENO"; then :
4950   ac_cv_prog_cc_g=yes
4951 else
4952   CFLAGS=""
4953       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4954 /* end confdefs.h.  */
4955
4956 int
4957 main ()
4958 {
4959
4960   ;
4961   return 0;
4962 }
4963 _ACEOF
4964 if ac_fn_c_try_compile "$LINENO"; then :
4965
4966 else
4967   ac_c_werror_flag=$ac_save_c_werror_flag
4968          CFLAGS="-g"
4969          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4970 /* end confdefs.h.  */
4971
4972 int
4973 main ()
4974 {
4975
4976   ;
4977   return 0;
4978 }
4979 _ACEOF
4980 if ac_fn_c_try_compile "$LINENO"; then :
4981   ac_cv_prog_cc_g=yes
4982 fi
4983 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4984 fi
4985 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4986 fi
4987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4988    ac_c_werror_flag=$ac_save_c_werror_flag
4989 fi
4990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4991 $as_echo "$ac_cv_prog_cc_g" >&6; }
4992 if test "$ac_test_CFLAGS" = set; then
4993   CFLAGS=$ac_save_CFLAGS
4994 elif test $ac_cv_prog_cc_g = yes; then
4995   if test "$GCC" = yes; then
4996     CFLAGS="-g -O2"
4997   else
4998     CFLAGS="-g"
4999   fi
5000 else
5001   if test "$GCC" = yes; then
5002     CFLAGS="-O2"
5003   else
5004     CFLAGS=
5005   fi
5006 fi
5007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5008 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5009 if ${ac_cv_prog_cc_c89+:} false; then :
5010   $as_echo_n "(cached) " >&6
5011 else
5012   ac_cv_prog_cc_c89=no
5013 ac_save_CC=$CC
5014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5015 /* end confdefs.h.  */
5016 #include <stdarg.h>
5017 #include <stdio.h>
5018 struct stat;
5019 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5020 struct buf { int x; };
5021 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5022 static char *e (p, i)
5023      char **p;
5024      int i;
5025 {
5026   return p[i];
5027 }
5028 static char *f (char * (*g) (char **, int), char **p, ...)
5029 {
5030   char *s;
5031   va_list v;
5032   va_start (v,p);
5033   s = g (p, va_arg (v,int));
5034   va_end (v);
5035   return s;
5036 }
5037
5038 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5039    function prototypes and stuff, but not '\xHH' hex character constants.
5040    These don't provoke an error unfortunately, instead are silently treated
5041    as 'x'.  The following induces an error, until -std is added to get
5042    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5043    array size at least.  It's necessary to write '\x00'==0 to get something
5044    that's true only with -std.  */
5045 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5046
5047 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5048    inside strings and character constants.  */
5049 #define FOO(x) 'x'
5050 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5051
5052 int test (int i, double x);
5053 struct s1 {int (*f) (int a);};
5054 struct s2 {int (*f) (double a);};
5055 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5056 int argc;
5057 char **argv;
5058 int
5059 main ()
5060 {
5061 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5062   ;
5063   return 0;
5064 }
5065 _ACEOF
5066 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5067         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5068 do
5069   CC="$ac_save_CC $ac_arg"
5070   if ac_fn_c_try_compile "$LINENO"; then :
5071   ac_cv_prog_cc_c89=$ac_arg
5072 fi
5073 rm -f core conftest.err conftest.$ac_objext
5074   test "x$ac_cv_prog_cc_c89" != "xno" && break
5075 done
5076 rm -f conftest.$ac_ext
5077 CC=$ac_save_CC
5078
5079 fi
5080 # AC_CACHE_VAL
5081 case "x$ac_cv_prog_cc_c89" in
5082   x)
5083     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5084 $as_echo "none needed" >&6; } ;;
5085   xno)
5086     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5087 $as_echo "unsupported" >&6; } ;;
5088   *)
5089     CC="$CC $ac_cv_prog_cc_c89"
5090     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5091 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5092 esac
5093 if test "x$ac_cv_prog_cc_c89" != xno; then :
5094
5095 fi
5096
5097 ac_ext=c
5098 ac_cpp='$CPP $CPPFLAGS'
5099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5102
5103
5104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5105 $as_echo_n "checking $CC dependency flag... " >&6; }
5106 echo 'void f(){}' >conftest.c
5107 if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5108         DEPFLAG="-MM"
5109 else
5110   if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5111         DEPFLAG="-xM1"
5112   else
5113         DEPFLAG="-MM"  # dunno do something
5114   fi
5115 fi
5116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5117 $as_echo "$DEPFLAG" >&6; }
5118 rm -f conftest.c
5119
5120
5121
5122
5123
5124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5125 $as_echo_n "checking whether $CC supports -Werror... " >&6; }
5126 cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5127 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5128   $as_echo_n "(cached) " >&6
5129 else
5130
5131 echo 'void f(void){}' >conftest.c
5132 if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5133 eval "cv_prog_cc_flag_$cache=yes"
5134 else
5135 eval "cv_prog_cc_flag_$cache=no"
5136 fi
5137 rm -f conftest conftest.o conftest.c
5138
5139 fi
5140
5141 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5143 $as_echo "yes" >&6; }
5144 :
5145 ERRFLAG="-Werror"
5146 else
5147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5148 $as_echo "no" >&6; }
5149 :
5150 ERRFLAG="-errwarn"
5151 fi
5152
5153
5154
5155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5156 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5157 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5158 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5159   $as_echo_n "(cached) " >&6
5160 else
5161
5162 echo 'void f(void){}' >conftest.c
5163 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5164 eval "cv_prog_cc_flag_$cache=yes"
5165 else
5166 eval "cv_prog_cc_flag_$cache=no"
5167 fi
5168 rm -f conftest conftest.o conftest.c
5169
5170 fi
5171
5172 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5174 $as_echo "yes" >&6; }
5175 :
5176 ERRFLAG="$ERRFLAG -Wall"
5177 else
5178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5179 $as_echo "no" >&6; }
5180 :
5181 ERRFLAG="$ERRFLAG -errfmt"
5182 fi
5183
5184
5185
5186
5187
5188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5189 $as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5190 cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5191 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5192   $as_echo_n "(cached) " >&6
5193 else
5194
5195 echo 'void f(void){}' >conftest.c
5196 if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5197 eval "cv_prog_cc_flag_$cache=yes"
5198 else
5199 eval "cv_prog_cc_flag_$cache=no"
5200 fi
5201 rm -f conftest conftest.o conftest.c
5202
5203 fi
5204
5205 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5207 $as_echo "yes" >&6; }
5208 :
5209 C99FLAG="-std=c99"
5210 else
5211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5212 $as_echo "no" >&6; }
5213 :
5214
5215 fi
5216
5217
5218
5219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5220 $as_echo_n "checking whether $CC supports -xc99... " >&6; }
5221 cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5222 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5223   $as_echo_n "(cached) " >&6
5224 else
5225
5226 echo 'void f(void){}' >conftest.c
5227 if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5228 eval "cv_prog_cc_flag_$cache=yes"
5229 else
5230 eval "cv_prog_cc_flag_$cache=no"
5231 fi
5232 rm -f conftest conftest.o conftest.c
5233
5234 fi
5235
5236 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5238 $as_echo "yes" >&6; }
5239 :
5240 C99FLAG="-xc99"
5241 else
5242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5243 $as_echo "no" >&6; }
5244 :
5245
5246 fi
5247
5248
5249 for ac_header in getopt.h time.h
5250 do :
5251   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5252 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5253 "
5254 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5255   cat >>confdefs.h <<_ACEOF
5256 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5257 _ACEOF
5258
5259 fi
5260
5261 done
5262
5263
5264
5265
5266
5267 { $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
5268 $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; }
5269 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`
5270 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5271   $as_echo_n "(cached) " >&6
5272 else
5273
5274 echo '
5275 #include "confdefs.h"
5276 #include <stdlib.h>
5277 #include <ctype.h>
5278 #include <sys/time.h>
5279 #ifdef HAVE_TIME_H
5280 #include <time.h>
5281 #endif
5282 #include <unistd.h>
5283 #include <netdb.h>
5284 #ifdef HAVE_GETOPT_H
5285 #include <getopt.h>
5286 #endif
5287
5288 int test() {
5289         int a;
5290         char **opts = NULL;
5291         struct timeval tv;
5292         char *t;
5293         time_t time = 0;
5294         char *buf = NULL;
5295         const char* str = NULL;
5296         struct msghdr msg;
5297         msg.msg_control = 0;
5298         t = ctime_r(&time, buf);
5299         tv.tv_usec = 10;
5300         srandom(32);
5301         a = getopt(2, opts, "a");
5302         a = isascii(32);
5303         str = gai_strerror(0);
5304         if(str && t && tv.tv_usec && msg.msg_control)
5305                 a = 0;
5306         return a;
5307 }
5308 ' > conftest.c
5309 echo 'void f(){}' >>conftest.c
5310 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5311 eval "cv_prog_cc_flag_needed_$cache=no"
5312 else
5313
5314 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
5315 eval "cv_prog_cc_flag_needed_$cache=yes"
5316 else
5317 eval "cv_prog_cc_flag_needed_$cache=fail"
5318 #echo 'Test with flag fails too!'
5319 #cat conftest.c
5320 #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"
5321 #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`
5322 #exit 1
5323 fi
5324
5325 fi
5326 rm -f conftest conftest.c conftest.o
5327
5328 fi
5329
5330 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5332 $as_echo "yes" >&6; }
5333 :
5334 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"
5335 else
5336 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5338 $as_echo "no" >&6; }
5339 #echo 'Test with flag is no!'
5340 #cat conftest.c
5341 #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"
5342 #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`
5343 #exit 1
5344 :
5345
5346 else
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5348 $as_echo "failed" >&6; }
5349 :
5350
5351 fi
5352 fi
5353
5354
5355
5356
5357
5358 { $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
5359 $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; }
5360 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`
5361 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5362   $as_echo_n "(cached) " >&6
5363 else
5364
5365 echo '
5366 #include "confdefs.h"
5367 #include <stdlib.h>
5368 #include <ctype.h>
5369 #include <sys/time.h>
5370 #ifdef HAVE_TIME_H
5371 #include <time.h>
5372 #endif
5373 #include <unistd.h>
5374 #include <netdb.h>
5375 #ifdef HAVE_GETOPT_H
5376 #include <getopt.h>
5377 #endif
5378
5379 int test() {
5380         int a;
5381         char **opts = NULL;
5382         struct timeval tv;
5383         char *t;
5384         time_t time = 0;
5385         char *buf = NULL;
5386         const char* str = NULL;
5387         struct msghdr msg;
5388         msg.msg_control = 0;
5389         t = ctime_r(&time, buf);
5390         tv.tv_usec = 10;
5391         srandom(32);
5392         a = getopt(2, opts, "a");
5393         a = isascii(32);
5394         str = gai_strerror(0);
5395         if(str && t && tv.tv_usec && msg.msg_control)
5396                 a = 0;
5397         return a;
5398 }
5399 ' > conftest.c
5400 echo 'void f(){}' >>conftest.c
5401 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5402 eval "cv_prog_cc_flag_needed_$cache=no"
5403 else
5404
5405 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
5406 eval "cv_prog_cc_flag_needed_$cache=yes"
5407 else
5408 eval "cv_prog_cc_flag_needed_$cache=fail"
5409 #echo 'Test with flag fails too!'
5410 #cat conftest.c
5411 #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"
5412 #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`
5413 #exit 1
5414 fi
5415
5416 fi
5417 rm -f conftest conftest.c conftest.o
5418
5419 fi
5420
5421 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5423 $as_echo "yes" >&6; }
5424 :
5425 CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5426 else
5427 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5429 $as_echo "no" >&6; }
5430 #echo 'Test with flag is no!'
5431 #cat conftest.c
5432 #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"
5433 #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`
5434 #exit 1
5435 :
5436
5437 else
5438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5439 $as_echo "failed" >&6; }
5440 :
5441
5442 fi
5443 fi
5444
5445
5446
5447
5448
5449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5450 $as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5451 cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5452 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5453   $as_echo_n "(cached) " >&6
5454 else
5455
5456 echo '
5457 #include <stdbool.h>
5458 #include <ctype.h>
5459 int test() {
5460         int a = 0;
5461         return a;
5462 }
5463 ' > conftest.c
5464 echo 'void f(){}' >>conftest.c
5465 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5466 eval "cv_prog_cc_flag_needed_$cache=no"
5467 else
5468
5469 if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5470 eval "cv_prog_cc_flag_needed_$cache=yes"
5471 else
5472 eval "cv_prog_cc_flag_needed_$cache=fail"
5473 #echo 'Test with flag fails too!'
5474 #cat conftest.c
5475 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5476 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5477 #exit 1
5478 fi
5479
5480 fi
5481 rm -f conftest conftest.c conftest.o
5482
5483 fi
5484
5485 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5487 $as_echo "yes" >&6; }
5488 :
5489 CFLAGS="$CFLAGS $C99FLAG"
5490 else
5491 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5493 $as_echo "no" >&6; }
5494 #echo 'Test with flag is no!'
5495 #cat conftest.c
5496 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5497 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5498 #exit 1
5499 :
5500
5501 else
5502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5503 $as_echo "failed" >&6; }
5504 :
5505
5506 fi
5507 fi
5508
5509
5510
5511
5512
5513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
5514 $as_echo_n "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
5515 cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
5516 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5517   $as_echo_n "(cached) " >&6
5518 else
5519
5520 echo '
5521 #include <ctype.h>
5522
5523 int test() {
5524         int a;
5525         a = isascii(32);
5526         return a;
5527 }
5528 ' > conftest.c
5529 echo 'void f(){}' >>conftest.c
5530 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5531 eval "cv_prog_cc_flag_needed_$cache=no"
5532 else
5533
5534 if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5535 eval "cv_prog_cc_flag_needed_$cache=yes"
5536 else
5537 eval "cv_prog_cc_flag_needed_$cache=fail"
5538 #echo 'Test with flag fails too!'
5539 #cat conftest.c
5540 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5541 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5542 #exit 1
5543 fi
5544
5545 fi
5546 rm -f conftest conftest.c conftest.o
5547
5548 fi
5549
5550 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5552 $as_echo "yes" >&6; }
5553 :
5554 CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
5555 else
5556 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5558 $as_echo "no" >&6; }
5559 #echo 'Test with flag is no!'
5560 #cat conftest.c
5561 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5562 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5563 #exit 1
5564 :
5565
5566 else
5567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5568 $as_echo "failed" >&6; }
5569 :
5570
5571 fi
5572 fi
5573
5574
5575
5576
5577
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5579 $as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5580 cache=_D_GNU_SOURCE
5581 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5582   $as_echo_n "(cached) " >&6
5583 else
5584
5585 echo '
5586 #include <netinet/in.h>
5587
5588 int test() {
5589         struct in6_pktinfo inf;
5590         int a = (int)sizeof(inf);
5591         return a;
5592 }
5593 ' > conftest.c
5594 echo 'void f(){}' >>conftest.c
5595 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5596 eval "cv_prog_cc_flag_needed_$cache=no"
5597 else
5598
5599 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5600 eval "cv_prog_cc_flag_needed_$cache=yes"
5601 else
5602 eval "cv_prog_cc_flag_needed_$cache=fail"
5603 #echo 'Test with flag fails too!'
5604 #cat conftest.c
5605 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5606 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5607 #exit 1
5608 fi
5609
5610 fi
5611 rm -f conftest conftest.c conftest.o
5612
5613 fi
5614
5615 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5617 $as_echo "yes" >&6; }
5618 :
5619 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5620 else
5621 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5623 $as_echo "no" >&6; }
5624 #echo 'Test with flag is no!'
5625 #cat conftest.c
5626 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5627 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5628 #exit 1
5629 :
5630
5631 else
5632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5633 $as_echo "failed" >&6; }
5634 :
5635
5636 fi
5637 fi
5638
5639
5640 # check again for GNU_SOURCE for setresgid. May fail if setresgid
5641 # is not available at all. -D_FRSRESGID is to make this check unique.
5642 # otherwise we would get the previous cached result.
5643
5644
5645
5646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5647 $as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5648 cache=_D_GNU_SOURCE__D_FRSRESGID
5649 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5650   $as_echo_n "(cached) " >&6
5651 else
5652
5653 echo '
5654 #include <unistd.h>
5655
5656 int test() {
5657         int a = setresgid(0,0,0);
5658         a = setresuid(0,0,0);
5659         return a;
5660 }
5661 ' > conftest.c
5662 echo 'void f(){}' >>conftest.c
5663 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5664 eval "cv_prog_cc_flag_needed_$cache=no"
5665 else
5666
5667 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5668 eval "cv_prog_cc_flag_needed_$cache=yes"
5669 else
5670 eval "cv_prog_cc_flag_needed_$cache=fail"
5671 #echo 'Test with flag fails too!'
5672 #cat conftest.c
5673 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5674 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5675 #exit 1
5676 fi
5677
5678 fi
5679 rm -f conftest conftest.c conftest.o
5680
5681 fi
5682
5683 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5685 $as_echo "yes" >&6; }
5686 :
5687 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5688 else
5689 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5691 $as_echo "no" >&6; }
5692 #echo 'Test with flag is no!'
5693 #cat conftest.c
5694 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5695 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5696 #exit 1
5697 :
5698
5699 else
5700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5701 $as_echo "failed" >&6; }
5702 :
5703
5704 fi
5705 fi
5706
5707
5708
5709
5710
5711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5712 $as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5713 cache=_D_POSIX_C_SOURCE_200112
5714 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5715   $as_echo_n "(cached) " >&6
5716 else
5717
5718 echo '
5719 #include "confdefs.h"
5720 #ifdef HAVE_TIME_H
5721 #include <time.h>
5722 #endif
5723 #include <netdb.h>
5724
5725 int test() {
5726         int a = 0;
5727         char *t;
5728         time_t time = 0;
5729         char *buf = NULL;
5730         const char* str = NULL;
5731         t = ctime_r(&time, buf);
5732         str = gai_strerror(0);
5733         if(t && str)
5734                 a = 0;
5735         return a;
5736 }
5737 ' > conftest.c
5738 echo 'void f(){}' >>conftest.c
5739 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5740 eval "cv_prog_cc_flag_needed_$cache=no"
5741 else
5742
5743 if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5744 eval "cv_prog_cc_flag_needed_$cache=yes"
5745 else
5746 eval "cv_prog_cc_flag_needed_$cache=fail"
5747 #echo 'Test with flag fails too!'
5748 #cat conftest.c
5749 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5750 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5751 #exit 1
5752 fi
5753
5754 fi
5755 rm -f conftest conftest.c conftest.o
5756
5757 fi
5758
5759 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5761 $as_echo "yes" >&6; }
5762 :
5763 CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5764 else
5765 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5767 $as_echo "no" >&6; }
5768 #echo 'Test with flag is no!'
5769 #cat conftest.c
5770 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5771 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5772 #exit 1
5773 :
5774
5775 else
5776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5777 $as_echo "failed" >&6; }
5778 :
5779
5780 fi
5781 fi
5782
5783
5784
5785
5786
5787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5788 $as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5789 cache=_D__EXTENSIONS__
5790 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5791   $as_echo_n "(cached) " >&6
5792 else
5793
5794 echo '
5795 #include "confdefs.h"
5796 #include <stdlib.h>
5797 #include <ctype.h>
5798 #include <sys/time.h>
5799 #ifdef HAVE_TIME_H
5800 #include <time.h>
5801 #endif
5802 #include <unistd.h>
5803 #ifdef HAVE_GETOPT_H
5804 #include <getopt.h>
5805 #endif
5806
5807 int test() {
5808         int a;
5809         char **opts = NULL;
5810         struct timeval tv;
5811         tv.tv_usec = 10;
5812         srandom(32);
5813         a = getopt(2, opts, "a");
5814         a = isascii(32);
5815         if(tv.tv_usec)
5816                 a = 0;
5817         return a;
5818 }
5819 ' > conftest.c
5820 echo 'void f(){}' >>conftest.c
5821 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5822 eval "cv_prog_cc_flag_needed_$cache=no"
5823 else
5824
5825 if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5826 eval "cv_prog_cc_flag_needed_$cache=yes"
5827 else
5828 eval "cv_prog_cc_flag_needed_$cache=fail"
5829 #echo 'Test with flag fails too!'
5830 #cat conftest.c
5831 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5832 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5833 #exit 1
5834 fi
5835
5836 fi
5837 rm -f conftest conftest.c conftest.o
5838
5839 fi
5840
5841 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5843 $as_echo "yes" >&6; }
5844 :
5845 CFLAGS="$CFLAGS -D__EXTENSIONS__"
5846 else
5847 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5849 $as_echo "no" >&6; }
5850 #echo 'Test with flag is no!'
5851 #cat conftest.c
5852 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5853 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5854 #exit 1
5855 :
5856
5857 else
5858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5859 $as_echo "failed" >&6; }
5860 :
5861
5862 fi
5863 fi
5864
5865
5866
5867
5868 # debug mode flags warnings
5869 # Check whether --enable-checking was given.
5870 if test "${enable_checking+set}" = set; then :
5871   enableval=$enable_checking;
5872 fi
5873
5874 # Check whether --enable-debug was given.
5875 if test "${enable_debug+set}" = set; then :
5876   enableval=$enable_debug;
5877 fi
5878
5879 if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5880 else debug_enabled="$enable_checking"; fi
5881
5882 case "$debug_enabled" in
5883         yes)
5884
5885
5886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5887 $as_echo_n "checking whether $CC supports -W... " >&6; }
5888 cache=`echo W | sed 'y%.=/+-%___p_%'`
5889 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5890   $as_echo_n "(cached) " >&6
5891 else
5892
5893 echo 'void f(void){}' >conftest.c
5894 if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5895 eval "cv_prog_cc_flag_$cache=yes"
5896 else
5897 eval "cv_prog_cc_flag_$cache=no"
5898 fi
5899 rm -f conftest conftest.o conftest.c
5900
5901 fi
5902
5903 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5905 $as_echo "yes" >&6; }
5906 :
5907 CFLAGS="$CFLAGS -W"
5908 else
5909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5910 $as_echo "no" >&6; }
5911 :
5912
5913 fi
5914
5915
5916
5917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5918 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5919 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5920 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5921   $as_echo_n "(cached) " >&6
5922 else
5923
5924 echo 'void f(void){}' >conftest.c
5925 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5926 eval "cv_prog_cc_flag_$cache=yes"
5927 else
5928 eval "cv_prog_cc_flag_$cache=no"
5929 fi
5930 rm -f conftest conftest.o conftest.c
5931
5932 fi
5933
5934 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5936 $as_echo "yes" >&6; }
5937 :
5938 CFLAGS="$CFLAGS -Wall"
5939 else
5940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5941 $as_echo "no" >&6; }
5942 :
5943
5944 fi
5945
5946
5947
5948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5949 $as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5950 cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5951 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5952   $as_echo_n "(cached) " >&6
5953 else
5954
5955 echo 'void f(void){}' >conftest.c
5956 if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5957 eval "cv_prog_cc_flag_$cache=yes"
5958 else
5959 eval "cv_prog_cc_flag_$cache=no"
5960 fi
5961 rm -f conftest conftest.o conftest.c
5962
5963 fi
5964
5965 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5967 $as_echo "yes" >&6; }
5968 :
5969 CFLAGS="$CFLAGS -Wextra"
5970 else
5971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5972 $as_echo "no" >&6; }
5973 :
5974
5975 fi
5976
5977
5978
5979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
5980 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
5981 cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
5982 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5983   $as_echo_n "(cached) " >&6
5984 else
5985
5986 echo 'void f(void){}' >conftest.c
5987 if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
5988 eval "cv_prog_cc_flag_$cache=yes"
5989 else
5990 eval "cv_prog_cc_flag_$cache=no"
5991 fi
5992 rm -f conftest conftest.o conftest.c
5993
5994 fi
5995
5996 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5998 $as_echo "yes" >&6; }
5999 :
6000 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
6001 else
6002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6003 $as_echo "no" >&6; }
6004 :
6005
6006 fi
6007
6008
6009 $as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
6010
6011                 ;;
6012         no|*)
6013                 # nothing to do.
6014                 ;;
6015 esac
6016 if test "$default_cflags" = "yes"; then
6017         # only when CFLAGS was "" at the start, if the users wants to
6018         # override we shouldn't add default cflags, because they wouldn't
6019         # be able to turn off these options and set the CFLAGS wanted.
6020
6021     # Check whether --enable-flto was given.
6022 if test "${enable_flto+set}" = set; then :
6023   enableval=$enable_flto;
6024 fi
6025
6026     if test "x$enable_flto" != "xno"; then :
6027
6028         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
6029 $as_echo_n "checking if $CC supports -flto... " >&6; }
6030         BAKCFLAGS="$CFLAGS"
6031         CFLAGS="$CFLAGS -flto"
6032         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6033 /* end confdefs.h.  */
6034
6035 int
6036 main ()
6037 {
6038
6039   ;
6040   return 0;
6041 }
6042 _ACEOF
6043 if ac_fn_c_try_link "$LINENO"; then :
6044
6045             if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
6046                 CFLAGS="$BAKCFLAGS"
6047                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6048 $as_echo "no" >&6; }
6049             else
6050                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6051 $as_echo "yes" >&6; }
6052             fi
6053             rm -f conftest conftest.c conftest.o
6054
6055 else
6056   CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6057 $as_echo "no" >&6; }
6058 fi
6059 rm -f core conftest.err conftest.$ac_objext \
6060     conftest$ac_exeext conftest.$ac_ext
6061
6062 fi
6063
6064
6065     # Check whether --enable-pie was given.
6066 if test "${enable_pie+set}" = set; then :
6067   enableval=$enable_pie;
6068 fi
6069
6070     if test "x$enable_pie" = "xyes"; then :
6071
6072         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6073 $as_echo_n "checking if $CC supports PIE... " >&6; }
6074         BAKLDFLAGS="$LDFLAGS"
6075         BAKCFLAGS="$CFLAGS"
6076         LDFLAGS="$LDFLAGS -pie"
6077         CFLAGS="$CFLAGS -fPIE"
6078         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6079 /* end confdefs.h.  */
6080
6081 int
6082 main ()
6083 {
6084
6085   ;
6086   return 0;
6087 }
6088 _ACEOF
6089 if ac_fn_c_try_link "$LINENO"; then :
6090
6091             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6092                 LDFLAGS="$BAKLDFLAGS"
6093                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6094 $as_echo "no" >&6; }
6095             else
6096                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6097 $as_echo "yes" >&6; }
6098             fi
6099             rm -f conftest conftest.c conftest.o
6100
6101 else
6102   LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6103 $as_echo "no" >&6; }
6104 fi
6105 rm -f core conftest.err conftest.$ac_objext \
6106     conftest$ac_exeext conftest.$ac_ext
6107
6108 fi
6109
6110
6111     # Check whether --enable-relro_now was given.
6112 if test "${enable_relro_now+set}" = set; then :
6113   enableval=$enable_relro_now;
6114 fi
6115
6116     if test "x$enable_relro_now" = "xyes"; then :
6117
6118         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6119 $as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6120         BAKLDFLAGS="$LDFLAGS"
6121         LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6122         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6123 /* end confdefs.h.  */
6124
6125 int
6126 main ()
6127 {
6128
6129   ;
6130   return 0;
6131 }
6132 _ACEOF
6133 if ac_fn_c_try_link "$LINENO"; then :
6134
6135             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6136                 LDFLAGS="$BAKLDFLAGS"
6137                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6138 $as_echo "no" >&6; }
6139             else
6140                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6141 $as_echo "yes" >&6; }
6142             fi
6143             rm -f conftest conftest.c conftest.o
6144
6145 else
6146   LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6147 $as_echo "no" >&6; }
6148 fi
6149 rm -f core conftest.err conftest.$ac_objext \
6150     conftest$ac_exeext conftest.$ac_ext
6151
6152 fi
6153
6154 fi
6155
6156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6157 $as_echo_n "checking for inline... " >&6; }
6158 if ${ac_cv_c_inline+:} false; then :
6159   $as_echo_n "(cached) " >&6
6160 else
6161   ac_cv_c_inline=no
6162 for ac_kw in inline __inline__ __inline; do
6163   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6164 /* end confdefs.h.  */
6165 #ifndef __cplusplus
6166 typedef int foo_t;
6167 static $ac_kw foo_t static_foo () {return 0; }
6168 $ac_kw foo_t foo () {return 0; }
6169 #endif
6170
6171 _ACEOF
6172 if ac_fn_c_try_compile "$LINENO"; then :
6173   ac_cv_c_inline=$ac_kw
6174 fi
6175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6176   test "$ac_cv_c_inline" != no && break
6177 done
6178
6179 fi
6180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6181 $as_echo "$ac_cv_c_inline" >&6; }
6182
6183 case $ac_cv_c_inline in
6184   inline | yes) ;;
6185   *)
6186     case $ac_cv_c_inline in
6187       no) ac_val=;;
6188       *) ac_val=$ac_cv_c_inline;;
6189     esac
6190     cat >>confdefs.h <<_ACEOF
6191 #ifndef __cplusplus
6192 #define inline $ac_val
6193 #endif
6194 _ACEOF
6195     ;;
6196 esac
6197
6198
6199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6200 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6201 if ${ac_cv_c_format_attribute+:} false; then :
6202   $as_echo_n "(cached) " >&6
6203 else
6204   ac_cv_c_format_attribute=no
6205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6206 /* end confdefs.h.  */
6207 #include <stdio.h>
6208 void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6209 void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6210
6211 int
6212 main ()
6213 {
6214
6215    f ("%s", "str");
6216
6217   ;
6218   return 0;
6219 }
6220 _ACEOF
6221 if ac_fn_c_try_compile "$LINENO"; then :
6222   ac_cv_c_format_attribute="yes"
6223 else
6224   ac_cv_c_format_attribute="no"
6225 fi
6226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6227
6228 fi
6229
6230
6231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6232 $as_echo "$ac_cv_c_format_attribute" >&6; }
6233 if test $ac_cv_c_format_attribute = yes; then
6234
6235 $as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6236
6237 fi
6238
6239
6240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6241 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6242 if ${ac_cv_c_unused_attribute+:} false; then :
6243   $as_echo_n "(cached) " >&6
6244 else
6245   ac_cv_c_unused_attribute=no
6246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6247 /* end confdefs.h.  */
6248 #include <stdio.h>
6249 void f (char *u __attribute__((unused)));
6250
6251 int
6252 main ()
6253 {
6254
6255    f ("x");
6256
6257   ;
6258   return 0;
6259 }
6260 _ACEOF
6261 if ac_fn_c_try_compile "$LINENO"; then :
6262   ac_cv_c_unused_attribute="yes"
6263 else
6264   ac_cv_c_unused_attribute="no"
6265 fi
6266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6267
6268 fi
6269
6270
6271
6272
6273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6274 $as_echo "$ac_cv_c_unused_attribute" >&6; }
6275 if test $ac_cv_c_unused_attribute = yes; then
6276
6277 $as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6278
6279 fi
6280
6281
6282
6283
6284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6285 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6286 if ${ac_cv_c_weak_attribute+:} false; then :
6287   $as_echo_n "(cached) " >&6
6288 else
6289   ac_cv_c_weak_attribute=no
6290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6291 /* end confdefs.h.  */
6292  #include <stdio.h>
6293 __attribute__((weak)) void f(int x) { printf("%d", x); }
6294
6295 int
6296 main ()
6297 {
6298
6299    f(1);
6300
6301   ;
6302   return 0;
6303 }
6304 _ACEOF
6305 if ac_fn_c_try_compile "$LINENO"; then :
6306   ac_cv_c_weak_attribute="yes"
6307 else
6308   ac_cv_c_weak_attribute="no"
6309 fi
6310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6311
6312 fi
6313
6314
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6316 $as_echo "$ac_cv_c_weak_attribute" >&6; }
6317 if test $ac_cv_c_weak_attribute = yes; then
6318
6319 $as_echo "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6320
6321
6322 $as_echo "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
6323
6324 fi
6325
6326
6327
6328
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
6330 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
6331 if ${ac_cv_c_noreturn_attribute+:} false; then :
6332   $as_echo_n "(cached) " >&6
6333 else
6334   ac_cv_c_noreturn_attribute=no
6335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6336 /* end confdefs.h.  */
6337  #include <stdio.h>
6338 __attribute__((noreturn)) void f(int x) { printf("%d", x); }
6339
6340 int
6341 main ()
6342 {
6343
6344    f(1);
6345
6346   ;
6347   return 0;
6348 }
6349 _ACEOF
6350 if ac_fn_c_try_compile "$LINENO"; then :
6351   ac_cv_c_noreturn_attribute="yes"
6352 else
6353   ac_cv_c_noreturn_attribute="no"
6354 fi
6355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6356
6357 fi
6358
6359
6360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
6361 $as_echo "$ac_cv_c_noreturn_attribute" >&6; }
6362 if test $ac_cv_c_noreturn_attribute = yes; then
6363
6364 $as_echo "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
6365
6366
6367 $as_echo "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
6368
6369 fi
6370
6371
6372 if test "$srcdir" != "."; then
6373         CPPFLAGS="$CPPFLAGS -I$srcdir"
6374 fi
6375
6376
6377
6378
6379
6380 for ac_prog in flex lex
6381 do
6382   # Extract the first word of "$ac_prog", so it can be a program name with args.
6383 set dummy $ac_prog; ac_word=$2
6384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6385 $as_echo_n "checking for $ac_word... " >&6; }
6386 if ${ac_cv_prog_LEX+:} false; then :
6387   $as_echo_n "(cached) " >&6
6388 else
6389   if test -n "$LEX"; then
6390   ac_cv_prog_LEX="$LEX" # Let the user override the test.
6391 else
6392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6393 for as_dir in $PATH
6394 do
6395   IFS=$as_save_IFS
6396   test -z "$as_dir" && as_dir=.
6397     for ac_exec_ext in '' $ac_executable_extensions; do
6398   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6399     ac_cv_prog_LEX="$ac_prog"
6400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6401     break 2
6402   fi
6403 done
6404   done
6405 IFS=$as_save_IFS
6406
6407 fi
6408 fi
6409 LEX=$ac_cv_prog_LEX
6410 if test -n "$LEX"; then
6411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6412 $as_echo "$LEX" >&6; }
6413 else
6414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6415 $as_echo "no" >&6; }
6416 fi
6417
6418
6419   test -n "$LEX" && break
6420 done
6421 test -n "$LEX" || LEX=":"
6422
6423 if test "x$LEX" != "x:"; then
6424   cat >conftest.l <<_ACEOF
6425 %%
6426 a { ECHO; }
6427 b { REJECT; }
6428 c { yymore (); }
6429 d { yyless (1); }
6430 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6431     yyless ((input () != 0)); }
6432 f { unput (yytext[0]); }
6433 . { BEGIN INITIAL; }
6434 %%
6435 #ifdef YYTEXT_POINTER
6436 extern char *yytext;
6437 #endif
6438 int
6439 main (void)
6440 {
6441   return ! yylex () + ! yywrap ();
6442 }
6443 _ACEOF
6444 { { ac_try="$LEX conftest.l"
6445 case "(($ac_try" in
6446   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6447   *) ac_try_echo=$ac_try;;
6448 esac
6449 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6450 $as_echo "$ac_try_echo"; } >&5
6451   (eval "$LEX conftest.l") 2>&5
6452   ac_status=$?
6453   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6454   test $ac_status = 0; }
6455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6456 $as_echo_n "checking lex output file root... " >&6; }
6457 if ${ac_cv_prog_lex_root+:} false; then :
6458   $as_echo_n "(cached) " >&6
6459 else
6460
6461 if test -f lex.yy.c; then
6462   ac_cv_prog_lex_root=lex.yy
6463 elif test -f lexyy.c; then
6464   ac_cv_prog_lex_root=lexyy
6465 else
6466   as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6467 fi
6468 fi
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6470 $as_echo "$ac_cv_prog_lex_root" >&6; }
6471 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6472
6473 if test -z "${LEXLIB+set}"; then
6474   { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6475 $as_echo_n "checking lex library... " >&6; }
6476 if ${ac_cv_lib_lex+:} false; then :
6477   $as_echo_n "(cached) " >&6
6478 else
6479
6480     ac_save_LIBS=$LIBS
6481     ac_cv_lib_lex='none needed'
6482     for ac_lib in '' -lfl -ll; do
6483       LIBS="$ac_lib $ac_save_LIBS"
6484       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6485 /* end confdefs.h.  */
6486 `cat $LEX_OUTPUT_ROOT.c`
6487 _ACEOF
6488 if ac_fn_c_try_link "$LINENO"; then :
6489   ac_cv_lib_lex=$ac_lib
6490 fi
6491 rm -f core conftest.err conftest.$ac_objext \
6492     conftest$ac_exeext conftest.$ac_ext
6493       test "$ac_cv_lib_lex" != 'none needed' && break
6494     done
6495     LIBS=$ac_save_LIBS
6496
6497 fi
6498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6499 $as_echo "$ac_cv_lib_lex" >&6; }
6500   test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6501 fi
6502
6503
6504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6505 $as_echo_n "checking whether yytext is a pointer... " >&6; }
6506 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6507   $as_echo_n "(cached) " >&6
6508 else
6509   # POSIX says lex can declare yytext either as a pointer or an array; the
6510 # default is implementation-dependent.  Figure out which it is, since
6511 # not all implementations provide the %pointer and %array declarations.
6512 ac_cv_prog_lex_yytext_pointer=no
6513 ac_save_LIBS=$LIBS
6514 LIBS="$LEXLIB $ac_save_LIBS"
6515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6516 /* end confdefs.h.  */
6517
6518   #define YYTEXT_POINTER 1
6519 `cat $LEX_OUTPUT_ROOT.c`
6520 _ACEOF
6521 if ac_fn_c_try_link "$LINENO"; then :
6522   ac_cv_prog_lex_yytext_pointer=yes
6523 fi
6524 rm -f core conftest.err conftest.$ac_objext \
6525     conftest$ac_exeext conftest.$ac_ext
6526 LIBS=$ac_save_LIBS
6527
6528 fi
6529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6530 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6531 if test $ac_cv_prog_lex_yytext_pointer = yes; then
6532
6533 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6534
6535 fi
6536 rm -f conftest.l $LEX_OUTPUT_ROOT.c
6537
6538 fi
6539 if test "$LEX" != "" -a "$LEX" != ":"; then
6540
6541         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6542 $as_echo_n "checking for yylex_destroy... " >&6; }
6543         if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6544
6545 $as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6546
6547                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6548 $as_echo "yes" >&6; }
6549         else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550 $as_echo "no" >&6; };
6551                 LEX=":"
6552         fi
6553
6554 fi
6555 if test "$LEX" != "" -a "$LEX" != ":"; then
6556
6557         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
6558 $as_echo_n "checking for lex %option... " >&6; }
6559         if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
6560 %option nounput
6561 %%
6562 EOF
6563                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6564 $as_echo "yes" >&6; }
6565         else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6566 $as_echo "no" >&6; };
6567                 LEX=":"
6568         fi
6569
6570 fi
6571 for ac_prog in 'bison -y' byacc
6572 do
6573   # Extract the first word of "$ac_prog", so it can be a program name with args.
6574 set dummy $ac_prog; ac_word=$2
6575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6576 $as_echo_n "checking for $ac_word... " >&6; }
6577 if ${ac_cv_prog_YACC+:} false; then :
6578   $as_echo_n "(cached) " >&6
6579 else
6580   if test -n "$YACC"; then
6581   ac_cv_prog_YACC="$YACC" # Let the user override the test.
6582 else
6583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6584 for as_dir in $PATH
6585 do
6586   IFS=$as_save_IFS
6587   test -z "$as_dir" && as_dir=.
6588     for ac_exec_ext in '' $ac_executable_extensions; do
6589   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6590     ac_cv_prog_YACC="$ac_prog"
6591     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6592     break 2
6593   fi
6594 done
6595   done
6596 IFS=$as_save_IFS
6597
6598 fi
6599 fi
6600 YACC=$ac_cv_prog_YACC
6601 if test -n "$YACC"; then
6602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6603 $as_echo "$YACC" >&6; }
6604 else
6605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6606 $as_echo "no" >&6; }
6607 fi
6608
6609
6610   test -n "$YACC" && break
6611 done
6612 test -n "$YACC" || YACC="yacc"
6613
6614 # Extract the first word of "doxygen", so it can be a program name with args.
6615 set dummy doxygen; ac_word=$2
6616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6617 $as_echo_n "checking for $ac_word... " >&6; }
6618 if ${ac_cv_prog_doxygen+:} false; then :
6619   $as_echo_n "(cached) " >&6
6620 else
6621   if test -n "$doxygen"; then
6622   ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6623 else
6624 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6625 for as_dir in $PATH
6626 do
6627   IFS=$as_save_IFS
6628   test -z "$as_dir" && as_dir=.
6629     for ac_exec_ext in '' $ac_executable_extensions; do
6630   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6631     ac_cv_prog_doxygen="doxygen"
6632     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6633     break 2
6634   fi
6635 done
6636   done
6637 IFS=$as_save_IFS
6638
6639 fi
6640 fi
6641 doxygen=$ac_cv_prog_doxygen
6642 if test -n "$doxygen"; then
6643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6644 $as_echo "$doxygen" >&6; }
6645 else
6646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6647 $as_echo "no" >&6; }
6648 fi
6649
6650
6651 if test -n "$ac_tool_prefix"; then
6652   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6653 set dummy ${ac_tool_prefix}strip; ac_word=$2
6654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6655 $as_echo_n "checking for $ac_word... " >&6; }
6656 if ${ac_cv_prog_STRIP+:} false; then :
6657   $as_echo_n "(cached) " >&6
6658 else
6659   if test -n "$STRIP"; then
6660   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6661 else
6662 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6663 for as_dir in $PATH
6664 do
6665   IFS=$as_save_IFS
6666   test -z "$as_dir" && as_dir=.
6667     for ac_exec_ext in '' $ac_executable_extensions; do
6668   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6669     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6671     break 2
6672   fi
6673 done
6674   done
6675 IFS=$as_save_IFS
6676
6677 fi
6678 fi
6679 STRIP=$ac_cv_prog_STRIP
6680 if test -n "$STRIP"; then
6681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6682 $as_echo "$STRIP" >&6; }
6683 else
6684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6685 $as_echo "no" >&6; }
6686 fi
6687
6688
6689 fi
6690 if test -z "$ac_cv_prog_STRIP"; then
6691   ac_ct_STRIP=$STRIP
6692   # Extract the first word of "strip", so it can be a program name with args.
6693 set dummy strip; ac_word=$2
6694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6695 $as_echo_n "checking for $ac_word... " >&6; }
6696 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6697   $as_echo_n "(cached) " >&6
6698 else
6699   if test -n "$ac_ct_STRIP"; then
6700   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6701 else
6702 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6703 for as_dir in $PATH
6704 do
6705   IFS=$as_save_IFS
6706   test -z "$as_dir" && as_dir=.
6707     for ac_exec_ext in '' $ac_executable_extensions; do
6708   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6709     ac_cv_prog_ac_ct_STRIP="strip"
6710     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6711     break 2
6712   fi
6713 done
6714   done
6715 IFS=$as_save_IFS
6716
6717 fi
6718 fi
6719 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6720 if test -n "$ac_ct_STRIP"; then
6721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6722 $as_echo "$ac_ct_STRIP" >&6; }
6723 else
6724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6725 $as_echo "no" >&6; }
6726 fi
6727
6728   if test "x$ac_ct_STRIP" = x; then
6729     STRIP=""
6730   else
6731     case $cross_compiling:$ac_tool_warned in
6732 yes:)
6733 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6734 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6735 ac_tool_warned=yes ;;
6736 esac
6737     STRIP=$ac_ct_STRIP
6738   fi
6739 else
6740   STRIP="$ac_cv_prog_STRIP"
6741 fi
6742
6743 ac_aux_dir=
6744 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6745   if test -f "$ac_dir/install-sh"; then
6746     ac_aux_dir=$ac_dir
6747     ac_install_sh="$ac_aux_dir/install-sh -c"
6748     break
6749   elif test -f "$ac_dir/install.sh"; then
6750     ac_aux_dir=$ac_dir
6751     ac_install_sh="$ac_aux_dir/install.sh -c"
6752     break
6753   elif test -f "$ac_dir/shtool"; then
6754     ac_aux_dir=$ac_dir
6755     ac_install_sh="$ac_aux_dir/shtool install -c"
6756     break
6757   fi
6758 done
6759 if test -z "$ac_aux_dir"; then
6760   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6761 fi
6762
6763 # These three variables are undocumented and unsupported,
6764 # and are intended to be withdrawn in a future Autoconf release.
6765 # They can cause serious problems if a builder's source tree is in a directory
6766 # whose full name contains unusual characters.
6767 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6768 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6769 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6770
6771
6772 # Make sure we can run config.sub.
6773 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6774   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6775
6776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6777 $as_echo_n "checking build system type... " >&6; }
6778 if ${ac_cv_build+:} false; then :
6779   $as_echo_n "(cached) " >&6
6780 else
6781   ac_build_alias=$build_alias
6782 test "x$ac_build_alias" = x &&
6783   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6784 test "x$ac_build_alias" = x &&
6785   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6786 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6787   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6788
6789 fi
6790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6791 $as_echo "$ac_cv_build" >&6; }
6792 case $ac_cv_build in
6793 *-*-*) ;;
6794 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6795 esac
6796 build=$ac_cv_build
6797 ac_save_IFS=$IFS; IFS='-'
6798 set x $ac_cv_build
6799 shift
6800 build_cpu=$1
6801 build_vendor=$2
6802 shift; shift
6803 # Remember, the first character of IFS is used to create $*,
6804 # except with old shells:
6805 build_os=$*
6806 IFS=$ac_save_IFS
6807 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6808
6809
6810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6811 $as_echo_n "checking host system type... " >&6; }
6812 if ${ac_cv_host+:} false; then :
6813   $as_echo_n "(cached) " >&6
6814 else
6815   if test "x$host_alias" = x; then
6816   ac_cv_host=$ac_cv_build
6817 else
6818   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6819     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6820 fi
6821
6822 fi
6823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6824 $as_echo "$ac_cv_host" >&6; }
6825 case $ac_cv_host in
6826 *-*-*) ;;
6827 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6828 esac
6829 host=$ac_cv_host
6830 ac_save_IFS=$IFS; IFS='-'
6831 set x $ac_cv_host
6832 shift
6833 host_cpu=$1
6834 host_vendor=$2
6835 shift; shift
6836 # Remember, the first character of IFS is used to create $*,
6837 # except with old shells:
6838 host_os=$*
6839 IFS=$ac_save_IFS
6840 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6841
6842
6843
6844 # skip these tests, we do not need them.
6845
6846
6847
6848
6849
6850
6851
6852
6853 # always use ./libtool unless override from commandline (libtool=mylibtool)
6854 if test -z "$libtool"; then
6855         libtool="./libtool"
6856 fi
6857
6858 # avoid libtool max commandline length test on systems that fork slowly.
6859
6860 if echo "$host_os" | grep "sunos4" >/dev/null; then
6861         lt_cv_sys_max_cmd_len=32750;
6862 fi
6863 if test -n "$ac_tool_prefix"; then
6864   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6865 set dummy ${ac_tool_prefix}ar; ac_word=$2
6866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6867 $as_echo_n "checking for $ac_word... " >&6; }
6868 if ${ac_cv_path_AR+:} false; then :
6869   $as_echo_n "(cached) " >&6
6870 else
6871   case $AR in
6872   [\\/]* | ?:[\\/]*)
6873   ac_cv_path_AR="$AR" # Let the user override the test with a path.
6874   ;;
6875   *)
6876   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6877 for as_dir in $PATH
6878 do
6879   IFS=$as_save_IFS
6880   test -z "$as_dir" && as_dir=.
6881     for ac_exec_ext in '' $ac_executable_extensions; do
6882   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6883     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6884     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6885     break 2
6886   fi
6887 done
6888   done
6889 IFS=$as_save_IFS
6890
6891   ;;
6892 esac
6893 fi
6894 AR=$ac_cv_path_AR
6895 if test -n "$AR"; then
6896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6897 $as_echo "$AR" >&6; }
6898 else
6899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6900 $as_echo "no" >&6; }
6901 fi
6902
6903
6904 fi
6905 if test -z "$ac_cv_path_AR"; then
6906   ac_pt_AR=$AR
6907   # Extract the first word of "ar", so it can be a program name with args.
6908 set dummy ar; ac_word=$2
6909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6910 $as_echo_n "checking for $ac_word... " >&6; }
6911 if ${ac_cv_path_ac_pt_AR+:} false; then :
6912   $as_echo_n "(cached) " >&6
6913 else
6914   case $ac_pt_AR in
6915   [\\/]* | ?:[\\/]*)
6916   ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6917   ;;
6918   *)
6919   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6920 for as_dir in $PATH
6921 do
6922   IFS=$as_save_IFS
6923   test -z "$as_dir" && as_dir=.
6924     for ac_exec_ext in '' $ac_executable_extensions; do
6925   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6926     ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6927     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6928     break 2
6929   fi
6930 done
6931   done
6932 IFS=$as_save_IFS
6933
6934   ;;
6935 esac
6936 fi
6937 ac_pt_AR=$ac_cv_path_ac_pt_AR
6938 if test -n "$ac_pt_AR"; then
6939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6940 $as_echo "$ac_pt_AR" >&6; }
6941 else
6942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6943 $as_echo "no" >&6; }
6944 fi
6945
6946   if test "x$ac_pt_AR" = x; then
6947     AR="false"
6948   else
6949     case $cross_compiling:$ac_tool_warned in
6950 yes:)
6951 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6952 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6953 ac_tool_warned=yes ;;
6954 esac
6955     AR=$ac_pt_AR
6956   fi
6957 else
6958   AR="$ac_cv_path_AR"
6959 fi
6960
6961 if test $AR = false; then
6962         as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
6963 fi
6964
6965 case `pwd` in
6966   *\ * | *\     *)
6967     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
6968 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
6969 esac
6970
6971
6972
6973 macro_version='2.4.6'
6974 macro_revision='2.4.6'
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988 ltmain=$ac_aux_dir/ltmain.sh
6989
6990 # Backslashify metacharacters that are still active within
6991 # double-quoted strings.
6992 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6993
6994 # Same as above, but do not quote variable references.
6995 double_quote_subst='s/\(["`\\]\)/\\\1/g'
6996
6997 # Sed substitution to delay expansion of an escaped shell variable in a
6998 # double_quote_subst'ed string.
6999 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7000
7001 # Sed substitution to delay expansion of an escaped single quote.
7002 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7003
7004 # Sed substitution to avoid accidental globbing in evaled expressions
7005 no_glob_subst='s/\*/\\\*/g'
7006
7007 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7008 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7009 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7010
7011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7012 $as_echo_n "checking how to print strings... " >&6; }
7013 # Test print first, because it will be a builtin if present.
7014 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7015    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7016   ECHO='print -r --'
7017 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7018   ECHO='printf %s\n'
7019 else
7020   # Use this function as a fallback that always works.
7021   func_fallback_echo ()
7022   {
7023     eval 'cat <<_LTECHO_EOF
7024 $1
7025 _LTECHO_EOF'
7026   }
7027   ECHO='func_fallback_echo'
7028 fi
7029
7030 # func_echo_all arg...
7031 # Invoke $ECHO with all args, space-separated.
7032 func_echo_all ()
7033 {
7034     $ECHO ""
7035 }
7036
7037 case $ECHO in
7038   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
7039 $as_echo "printf" >&6; } ;;
7040   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
7041 $as_echo "print -r" >&6; } ;;
7042   *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
7043 $as_echo "cat" >&6; } ;;
7044 esac
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7060 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
7061 if ${ac_cv_path_SED+:} false; then :
7062   $as_echo_n "(cached) " >&6
7063 else
7064             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7065      for ac_i in 1 2 3 4 5 6 7; do
7066        ac_script="$ac_script$as_nl$ac_script"
7067      done
7068      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7069      { ac_script=; unset ac_script;}
7070      if test -z "$SED"; then
7071   ac_path_SED_found=false
7072   # Loop through the user's path and test for each of PROGNAME-LIST
7073   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7074 for as_dir in $PATH
7075 do
7076   IFS=$as_save_IFS
7077   test -z "$as_dir" && as_dir=.
7078     for ac_prog in sed gsed; do
7079     for ac_exec_ext in '' $ac_executable_extensions; do
7080       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
7081       as_fn_executable_p "$ac_path_SED" || continue
7082 # Check for GNU ac_path_SED and select it if it is found.
7083   # Check for GNU $ac_path_SED
7084 case `"$ac_path_SED" --version 2>&1` in
7085 *GNU*)
7086   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7087 *)
7088   ac_count=0
7089   $as_echo_n 0123456789 >"conftest.in"
7090   while :
7091   do
7092     cat "conftest.in" "conftest.in" >"conftest.tmp"
7093     mv "conftest.tmp" "conftest.in"
7094     cp "conftest.in" "conftest.nl"
7095     $as_echo '' >> "conftest.nl"
7096     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7097     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7098     as_fn_arith $ac_count + 1 && ac_count=$as_val
7099     if test $ac_count -gt ${ac_path_SED_max-0}; then
7100       # Best one so far, save it but keep looking for a better one
7101       ac_cv_path_SED="$ac_path_SED"
7102       ac_path_SED_max=$ac_count
7103     fi
7104     # 10*(2^10) chars as input seems more than enough
7105     test $ac_count -gt 10 && break
7106   done
7107   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7108 esac
7109
7110       $ac_path_SED_found && break 3
7111     done
7112   done
7113   done
7114 IFS=$as_save_IFS
7115   if test -z "$ac_cv_path_SED"; then
7116     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7117   fi
7118 else
7119   ac_cv_path_SED=$SED
7120 fi
7121
7122 fi
7123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7124 $as_echo "$ac_cv_path_SED" >&6; }
7125  SED="$ac_cv_path_SED"
7126   rm -f conftest.sed
7127
7128 test -z "$SED" && SED=sed
7129 Xsed="$SED -e 1s/^X//"
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7142 $as_echo_n "checking for fgrep... " >&6; }
7143 if ${ac_cv_path_FGREP+:} false; then :
7144   $as_echo_n "(cached) " >&6
7145 else
7146   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7147    then ac_cv_path_FGREP="$GREP -F"
7148    else
7149      if test -z "$FGREP"; then
7150   ac_path_FGREP_found=false
7151   # Loop through the user's path and test for each of PROGNAME-LIST
7152   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7153 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7154 do
7155   IFS=$as_save_IFS
7156   test -z "$as_dir" && as_dir=.
7157     for ac_prog in fgrep; do
7158     for ac_exec_ext in '' $ac_executable_extensions; do
7159       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
7160       as_fn_executable_p "$ac_path_FGREP" || continue
7161 # Check for GNU ac_path_FGREP and select it if it is found.
7162   # Check for GNU $ac_path_FGREP
7163 case `"$ac_path_FGREP" --version 2>&1` in
7164 *GNU*)
7165   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7166 *)
7167   ac_count=0
7168   $as_echo_n 0123456789 >"conftest.in"
7169   while :
7170   do
7171     cat "conftest.in" "conftest.in" >"conftest.tmp"
7172     mv "conftest.tmp" "conftest.in"
7173     cp "conftest.in" "conftest.nl"
7174     $as_echo 'FGREP' >> "conftest.nl"
7175     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7176     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7177     as_fn_arith $ac_count + 1 && ac_count=$as_val
7178     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7179       # Best one so far, save it but keep looking for a better one
7180       ac_cv_path_FGREP="$ac_path_FGREP"
7181       ac_path_FGREP_max=$ac_count
7182     fi
7183     # 10*(2^10) chars as input seems more than enough
7184     test $ac_count -gt 10 && break
7185   done
7186   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7187 esac
7188
7189       $ac_path_FGREP_found && break 3
7190     done
7191   done
7192   done
7193 IFS=$as_save_IFS
7194   if test -z "$ac_cv_path_FGREP"; then
7195     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7196   fi
7197 else
7198   ac_cv_path_FGREP=$FGREP
7199 fi
7200
7201    fi
7202 fi
7203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7204 $as_echo "$ac_cv_path_FGREP" >&6; }
7205  FGREP="$ac_cv_path_FGREP"
7206
7207
7208 test -z "$GREP" && GREP=grep
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228 # Check whether --with-gnu-ld was given.
7229 if test "${with_gnu_ld+set}" = set; then :
7230   withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7231 else
7232   with_gnu_ld=no
7233 fi
7234
7235 ac_prog=ld
7236 if test yes = "$GCC"; then
7237   # Check if gcc -print-prog-name=ld gives a path.
7238   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7239 $as_echo_n "checking for ld used by $CC... " >&6; }
7240   case $host in
7241   *-*-mingw*)
7242     # gcc leaves a trailing carriage return, which upsets mingw
7243     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7244   *)
7245     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7246   esac
7247   case $ac_prog in
7248     # Accept absolute paths.
7249     [\\/]* | ?:[\\/]*)
7250       re_direlt='/[^/][^/]*/\.\./'
7251       # Canonicalize the pathname of ld
7252       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7253       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7254         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7255       done
7256       test -z "$LD" && LD=$ac_prog
7257       ;;
7258   "")
7259     # If it fails, then pretend we aren't using GCC.
7260     ac_prog=ld
7261     ;;
7262   *)
7263     # If it is relative, then search for the first ld in PATH.
7264     with_gnu_ld=unknown
7265     ;;
7266   esac
7267 elif test yes = "$with_gnu_ld"; then
7268   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7269 $as_echo_n "checking for GNU ld... " >&6; }
7270 else
7271   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7272 $as_echo_n "checking for non-GNU ld... " >&6; }
7273 fi
7274 if ${lt_cv_path_LD+:} false; then :
7275   $as_echo_n "(cached) " >&6
7276 else
7277   if test -z "$LD"; then
7278   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7279   for ac_dir in $PATH; do
7280     IFS=$lt_save_ifs
7281     test -z "$ac_dir" && ac_dir=.
7282     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7283       lt_cv_path_LD=$ac_dir/$ac_prog
7284       # Check to see if the program is GNU ld.  I'd rather use --version,
7285       # but apparently some variants of GNU ld only accept -v.
7286       # Break only if it was the GNU/non-GNU ld that we prefer.
7287       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7288       *GNU* | *'with BFD'*)
7289         test no != "$with_gnu_ld" && break
7290         ;;
7291       *)
7292         test yes != "$with_gnu_ld" && break
7293         ;;
7294       esac
7295     fi
7296   done
7297   IFS=$lt_save_ifs
7298 else
7299   lt_cv_path_LD=$LD # Let the user override the test with a path.
7300 fi
7301 fi
7302
7303 LD=$lt_cv_path_LD
7304 if test -n "$LD"; then
7305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7306 $as_echo "$LD" >&6; }
7307 else
7308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7309 $as_echo "no" >&6; }
7310 fi
7311 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7313 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7314 if ${lt_cv_prog_gnu_ld+:} false; then :
7315   $as_echo_n "(cached) " >&6
7316 else
7317   # I'd rather use --version here, but apparently some GNU lds only accept -v.
7318 case `$LD -v 2>&1 </dev/null` in
7319 *GNU* | *'with BFD'*)
7320   lt_cv_prog_gnu_ld=yes
7321   ;;
7322 *)
7323   lt_cv_prog_gnu_ld=no
7324   ;;
7325 esac
7326 fi
7327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7328 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
7329 with_gnu_ld=$lt_cv_prog_gnu_ld
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7340 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7341 if ${lt_cv_path_NM+:} false; then :
7342   $as_echo_n "(cached) " >&6
7343 else
7344   if test -n "$NM"; then
7345   # Let the user override the test.
7346   lt_cv_path_NM=$NM
7347 else
7348   lt_nm_to_check=${ac_tool_prefix}nm
7349   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7350     lt_nm_to_check="$lt_nm_to_check nm"
7351   fi
7352   for lt_tmp_nm in $lt_nm_to_check; do
7353     lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7354     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7355       IFS=$lt_save_ifs
7356       test -z "$ac_dir" && ac_dir=.
7357       tmp_nm=$ac_dir/$lt_tmp_nm
7358       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7359         # Check to see if the nm accepts a BSD-compat flag.
7360         # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7361         #   nm: unknown option "B" ignored
7362         # Tru64's nm complains that /dev/null is an invalid object file
7363         # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7364         case $build_os in
7365         mingw*) lt_bad_file=conftest.nm/nofile ;;
7366         *) lt_bad_file=/dev/null ;;
7367         esac
7368         case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7369         *$lt_bad_file* | *'Invalid file or object type'*)
7370           lt_cv_path_NM="$tmp_nm -B"
7371           break 2
7372           ;;
7373         *)
7374           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7375           */dev/null*)
7376             lt_cv_path_NM="$tmp_nm -p"
7377             break 2
7378             ;;
7379           *)
7380             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7381             continue # so that we can try to find one that supports BSD flags
7382             ;;
7383           esac
7384           ;;
7385         esac
7386       fi
7387     done
7388     IFS=$lt_save_ifs
7389   done
7390   : ${lt_cv_path_NM=no}
7391 fi
7392 fi
7393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7394 $as_echo "$lt_cv_path_NM" >&6; }
7395 if test no != "$lt_cv_path_NM"; then
7396   NM=$lt_cv_path_NM
7397 else
7398   # Didn't find any BSD compatible name lister, look for dumpbin.
7399   if test -n "$DUMPBIN"; then :
7400     # Let the user override the test.
7401   else
7402     if test -n "$ac_tool_prefix"; then
7403   for ac_prog in dumpbin "link -dump"
7404   do
7405     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7406 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7408 $as_echo_n "checking for $ac_word... " >&6; }
7409 if ${ac_cv_prog_DUMPBIN+:} false; then :
7410   $as_echo_n "(cached) " >&6
7411 else
7412   if test -n "$DUMPBIN"; then
7413   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7414 else
7415 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7416 for as_dir in $PATH
7417 do
7418   IFS=$as_save_IFS
7419   test -z "$as_dir" && as_dir=.
7420     for ac_exec_ext in '' $ac_executable_extensions; do
7421   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7422     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7423     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7424     break 2
7425   fi
7426 done
7427   done
7428 IFS=$as_save_IFS
7429
7430 fi
7431 fi
7432 DUMPBIN=$ac_cv_prog_DUMPBIN
7433 if test -n "$DUMPBIN"; then
7434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7435 $as_echo "$DUMPBIN" >&6; }
7436 else
7437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7438 $as_echo "no" >&6; }
7439 fi
7440
7441
7442     test -n "$DUMPBIN" && break
7443   done
7444 fi
7445 if test -z "$DUMPBIN"; then
7446   ac_ct_DUMPBIN=$DUMPBIN
7447   for ac_prog in dumpbin "link -dump"
7448 do
7449   # Extract the first word of "$ac_prog", so it can be a program name with args.
7450 set dummy $ac_prog; ac_word=$2
7451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7452 $as_echo_n "checking for $ac_word... " >&6; }
7453 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7454   $as_echo_n "(cached) " >&6
7455 else
7456   if test -n "$ac_ct_DUMPBIN"; then
7457   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7458 else
7459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7460 for as_dir in $PATH
7461 do
7462   IFS=$as_save_IFS
7463   test -z "$as_dir" && as_dir=.
7464     for ac_exec_ext in '' $ac_executable_extensions; do
7465   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7466     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7468     break 2
7469   fi
7470 done
7471   done
7472 IFS=$as_save_IFS
7473
7474 fi
7475 fi
7476 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7477 if test -n "$ac_ct_DUMPBIN"; then
7478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7479 $as_echo "$ac_ct_DUMPBIN" >&6; }
7480 else
7481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7482 $as_echo "no" >&6; }
7483 fi
7484
7485
7486   test -n "$ac_ct_DUMPBIN" && break
7487 done
7488
7489   if test "x$ac_ct_DUMPBIN" = x; then
7490     DUMPBIN=":"
7491   else
7492     case $cross_compiling:$ac_tool_warned in
7493 yes:)
7494 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7495 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7496 ac_tool_warned=yes ;;
7497 esac
7498     DUMPBIN=$ac_ct_DUMPBIN
7499   fi
7500 fi
7501
7502     case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7503     *COFF*)
7504       DUMPBIN="$DUMPBIN -symbols -headers"
7505       ;;
7506     *)
7507       DUMPBIN=:
7508       ;;
7509     esac
7510   fi
7511
7512   if test : != "$DUMPBIN"; then
7513     NM=$DUMPBIN
7514   fi
7515 fi
7516 test -z "$NM" && NM=nm
7517
7518
7519
7520
7521
7522
7523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7524 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
7525 if ${lt_cv_nm_interface+:} false; then :
7526   $as_echo_n "(cached) " >&6
7527 else
7528   lt_cv_nm_interface="BSD nm"
7529   echo "int some_variable = 0;" > conftest.$ac_ext
7530   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7531   (eval "$ac_compile" 2>conftest.err)
7532   cat conftest.err >&5
7533   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7534   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7535   cat conftest.err >&5
7536   (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7537   cat conftest.out >&5
7538   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7539     lt_cv_nm_interface="MS dumpbin"
7540   fi
7541   rm -f conftest*
7542 fi
7543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7544 $as_echo "$lt_cv_nm_interface" >&6; }
7545
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7547 $as_echo_n "checking whether ln -s works... " >&6; }
7548 LN_S=$as_ln_s
7549 if test "$LN_S" = "ln -s"; then
7550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7551 $as_echo "yes" >&6; }
7552 else
7553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7554 $as_echo "no, using $LN_S" >&6; }
7555 fi
7556
7557 # find the maximum length of command line arguments
7558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7559 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7560 if ${lt_cv_sys_max_cmd_len+:} false; then :
7561   $as_echo_n "(cached) " >&6
7562 else
7563     i=0
7564   teststring=ABCD
7565
7566   case $build_os in
7567   msdosdjgpp*)
7568     # On DJGPP, this test can blow up pretty badly due to problems in libc
7569     # (any single argument exceeding 2000 bytes causes a buffer overrun
7570     # during glob expansion).  Even if it were fixed, the result of this
7571     # check would be larger than it should be.
7572     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7573     ;;
7574
7575   gnu*)
7576     # Under GNU Hurd, this test is not required because there is
7577     # no limit to the length of command line arguments.
7578     # Libtool will interpret -1 as no limit whatsoever
7579     lt_cv_sys_max_cmd_len=-1;
7580     ;;
7581
7582   cygwin* | mingw* | cegcc*)
7583     # On Win9x/ME, this test blows up -- it succeeds, but takes
7584     # about 5 minutes as the teststring grows exponentially.
7585     # Worse, since 9x/ME are not pre-emptively multitasking,
7586     # you end up with a "frozen" computer, even though with patience
7587     # the test eventually succeeds (with a max line length of 256k).
7588     # Instead, let's just punt: use the minimum linelength reported by
7589     # all of the supported platforms: 8192 (on NT/2K/XP).
7590     lt_cv_sys_max_cmd_len=8192;
7591     ;;
7592
7593   mint*)
7594     # On MiNT this can take a long time and run out of memory.
7595     lt_cv_sys_max_cmd_len=8192;
7596     ;;
7597
7598   amigaos*)
7599     # On AmigaOS with pdksh, this test takes hours, literally.
7600     # So we just punt and use a minimum line length of 8192.
7601     lt_cv_sys_max_cmd_len=8192;
7602     ;;
7603
7604   bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7605     # This has been around since 386BSD, at least.  Likely further.
7606     if test -x /sbin/sysctl; then
7607       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7608     elif test -x /usr/sbin/sysctl; then
7609       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7610     else
7611       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7612     fi
7613     # And add a safety zone
7614     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7615     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7616     ;;
7617
7618   interix*)
7619     # We know the value 262144 and hardcode it with a safety zone (like BSD)
7620     lt_cv_sys_max_cmd_len=196608
7621     ;;
7622
7623   os2*)
7624     # The test takes a long time on OS/2.
7625     lt_cv_sys_max_cmd_len=8192
7626     ;;
7627
7628   osf*)
7629     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7630     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7631     # nice to cause kernel panics so lets avoid the loop below.
7632     # First set a reasonable default.
7633     lt_cv_sys_max_cmd_len=16384
7634     #
7635     if test -x /sbin/sysconfig; then
7636       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7637         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7638       esac
7639     fi
7640     ;;
7641   sco3.2v5*)
7642     lt_cv_sys_max_cmd_len=102400
7643     ;;
7644   sysv5* | sco5v6* | sysv4.2uw2*)
7645     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7646     if test -n "$kargmax"; then
7647       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[  ]//'`
7648     else
7649       lt_cv_sys_max_cmd_len=32768
7650     fi
7651     ;;
7652   *)
7653     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7654     if test -n "$lt_cv_sys_max_cmd_len" && \
7655        test undefined != "$lt_cv_sys_max_cmd_len"; then
7656       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7657       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7658     else
7659       # Make teststring a little bigger before we do anything with it.
7660       # a 1K string should be a reasonable start.
7661       for i in 1 2 3 4 5 6 7 8; do
7662         teststring=$teststring$teststring
7663       done
7664       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7665       # If test is not a shell built-in, we'll probably end up computing a
7666       # maximum length that is only half of the actual maximum length, but
7667       # we can't tell.
7668       while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7669                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7670               test 17 != "$i" # 1/2 MB should be enough
7671       do
7672         i=`expr $i + 1`
7673         teststring=$teststring$teststring
7674       done
7675       # Only check the string length outside the loop.
7676       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7677       teststring=
7678       # Add a significant safety factor because C++ compilers can tack on
7679       # massive amounts of additional arguments before passing them to the
7680       # linker.  It appears as though 1/2 is a usable value.
7681       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7682     fi
7683     ;;
7684   esac
7685
7686 fi
7687
7688 if test -n "$lt_cv_sys_max_cmd_len"; then
7689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7690 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7691 else
7692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7693 $as_echo "none" >&6; }
7694 fi
7695 max_cmd_len=$lt_cv_sys_max_cmd_len
7696
7697
7698
7699
7700
7701
7702 : ${CP="cp -f"}
7703 : ${MV="mv -f"}
7704 : ${RM="rm -f"}
7705
7706 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7707   lt_unset=unset
7708 else
7709   lt_unset=false
7710 fi
7711
7712
7713
7714
7715
7716 # test EBCDIC or ASCII
7717 case `echo X|tr X '\101'` in
7718  A) # ASCII based system
7719     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7720   lt_SP2NL='tr \040 \012'
7721   lt_NL2SP='tr \015\012 \040\040'
7722   ;;
7723  *) # EBCDIC based system
7724   lt_SP2NL='tr \100 \n'
7725   lt_NL2SP='tr \r\n \100\100'
7726   ;;
7727 esac
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7738 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7739 if ${lt_cv_to_host_file_cmd+:} false; then :
7740   $as_echo_n "(cached) " >&6
7741 else
7742   case $host in
7743   *-*-mingw* )
7744     case $build in
7745       *-*-mingw* ) # actually msys
7746         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7747         ;;
7748       *-*-cygwin* )
7749         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7750         ;;
7751       * ) # otherwise, assume *nix
7752         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7753         ;;
7754     esac
7755     ;;
7756   *-*-cygwin* )
7757     case $build in
7758       *-*-mingw* ) # actually msys
7759         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7760         ;;
7761       *-*-cygwin* )
7762         lt_cv_to_host_file_cmd=func_convert_file_noop
7763         ;;
7764       * ) # otherwise, assume *nix
7765         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7766         ;;
7767     esac
7768     ;;
7769   * ) # unhandled hosts (and "normal" native builds)
7770     lt_cv_to_host_file_cmd=func_convert_file_noop
7771     ;;
7772 esac
7773
7774 fi
7775
7776 to_host_file_cmd=$lt_cv_to_host_file_cmd
7777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7778 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
7779
7780
7781
7782
7783
7784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7785 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7786 if ${lt_cv_to_tool_file_cmd+:} false; then :
7787   $as_echo_n "(cached) " >&6
7788 else
7789   #assume ordinary cross tools, or native build.
7790 lt_cv_to_tool_file_cmd=func_convert_file_noop
7791 case $host in
7792   *-*-mingw* )
7793     case $build in
7794       *-*-mingw* ) # actually msys
7795         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7796         ;;
7797     esac
7798     ;;
7799 esac
7800
7801 fi
7802
7803 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7805 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7806
7807
7808
7809
7810
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7812 $as_echo_n "checking for $LD option to reload object files... " >&6; }
7813 if ${lt_cv_ld_reload_flag+:} false; then :
7814   $as_echo_n "(cached) " >&6
7815 else
7816   lt_cv_ld_reload_flag='-r'
7817 fi
7818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7819 $as_echo "$lt_cv_ld_reload_flag" >&6; }
7820 reload_flag=$lt_cv_ld_reload_flag
7821 case $reload_flag in
7822 "" | " "*) ;;
7823 *) reload_flag=" $reload_flag" ;;
7824 esac
7825 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7826 case $host_os in
7827   cygwin* | mingw* | pw32* | cegcc*)
7828     if test yes != "$GCC"; then
7829       reload_cmds=false
7830     fi
7831     ;;
7832   darwin*)
7833     if test yes = "$GCC"; then
7834       reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7835     else
7836       reload_cmds='$LD$reload_flag -o $output$reload_objs'
7837     fi
7838     ;;
7839 esac
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849 if test -n "$ac_tool_prefix"; then
7850   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7851 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7853 $as_echo_n "checking for $ac_word... " >&6; }
7854 if ${ac_cv_prog_OBJDUMP+:} false; then :
7855   $as_echo_n "(cached) " >&6
7856 else
7857   if test -n "$OBJDUMP"; then
7858   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7859 else
7860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7861 for as_dir in $PATH
7862 do
7863   IFS=$as_save_IFS
7864   test -z "$as_dir" && as_dir=.
7865     for ac_exec_ext in '' $ac_executable_extensions; do
7866   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7867     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7868     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7869     break 2
7870   fi
7871 done
7872   done
7873 IFS=$as_save_IFS
7874
7875 fi
7876 fi
7877 OBJDUMP=$ac_cv_prog_OBJDUMP
7878 if test -n "$OBJDUMP"; then
7879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7880 $as_echo "$OBJDUMP" >&6; }
7881 else
7882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7883 $as_echo "no" >&6; }
7884 fi
7885
7886
7887 fi
7888 if test -z "$ac_cv_prog_OBJDUMP"; then
7889   ac_ct_OBJDUMP=$OBJDUMP
7890   # Extract the first word of "objdump", so it can be a program name with args.
7891 set dummy objdump; ac_word=$2
7892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7893 $as_echo_n "checking for $ac_word... " >&6; }
7894 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7895   $as_echo_n "(cached) " >&6
7896 else
7897   if test -n "$ac_ct_OBJDUMP"; then
7898   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7899 else
7900 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7901 for as_dir in $PATH
7902 do
7903   IFS=$as_save_IFS
7904   test -z "$as_dir" && as_dir=.
7905     for ac_exec_ext in '' $ac_executable_extensions; do
7906   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7907     ac_cv_prog_ac_ct_OBJDUMP="objdump"
7908     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7909     break 2
7910   fi
7911 done
7912   done
7913 IFS=$as_save_IFS
7914
7915 fi
7916 fi
7917 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7918 if test -n "$ac_ct_OBJDUMP"; then
7919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7920 $as_echo "$ac_ct_OBJDUMP" >&6; }
7921 else
7922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7923 $as_echo "no" >&6; }
7924 fi
7925
7926   if test "x$ac_ct_OBJDUMP" = x; then
7927     OBJDUMP="false"
7928   else
7929     case $cross_compiling:$ac_tool_warned in
7930 yes:)
7931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7932 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7933 ac_tool_warned=yes ;;
7934 esac
7935     OBJDUMP=$ac_ct_OBJDUMP
7936   fi
7937 else
7938   OBJDUMP="$ac_cv_prog_OBJDUMP"
7939 fi
7940
7941 test -z "$OBJDUMP" && OBJDUMP=objdump
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7952 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
7953 if ${lt_cv_deplibs_check_method+:} false; then :
7954   $as_echo_n "(cached) " >&6
7955 else
7956   lt_cv_file_magic_cmd='$MAGIC_CMD'
7957 lt_cv_file_magic_test_file=
7958 lt_cv_deplibs_check_method='unknown'
7959 # Need to set the preceding variable on all platforms that support
7960 # interlibrary dependencies.
7961 # 'none' -- dependencies not supported.
7962 # 'unknown' -- same as none, but documents that we really don't know.
7963 # 'pass_all' -- all dependencies passed with no checks.
7964 # 'test_compile' -- check by making test program.
7965 # 'file_magic [[regex]]' -- check by looking for files in library path
7966 # that responds to the $file_magic_cmd with a given extended regex.
7967 # If you have 'file' or equivalent on your system and you're not sure
7968 # whether 'pass_all' will *always* work, you probably want this one.
7969
7970 case $host_os in
7971 aix[4-9]*)
7972   lt_cv_deplibs_check_method=pass_all
7973   ;;
7974
7975 beos*)
7976   lt_cv_deplibs_check_method=pass_all
7977   ;;
7978
7979 bsdi[45]*)
7980   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
7981   lt_cv_file_magic_cmd='/usr/bin/file -L'
7982   lt_cv_file_magic_test_file=/shlib/libc.so
7983   ;;
7984
7985 cygwin*)
7986   # func_win32_libid is a shell function defined in ltmain.sh
7987   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7988   lt_cv_file_magic_cmd='func_win32_libid'
7989   ;;
7990
7991 mingw* | pw32*)
7992   # Base MSYS/MinGW do not provide the 'file' command needed by
7993   # func_win32_libid shell function, so use a weaker test based on 'objdump',
7994   # unless we find 'file', for example because we are cross-compiling.
7995   if ( file / ) >/dev/null 2>&1; then
7996     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7997     lt_cv_file_magic_cmd='func_win32_libid'
7998   else
7999     # Keep this pattern in sync with the one in func_win32_libid.
8000     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
8001     lt_cv_file_magic_cmd='$OBJDUMP -f'
8002   fi
8003   ;;
8004
8005 cegcc*)
8006   # use the weaker test based on 'objdump'. See mingw*.
8007   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
8008   lt_cv_file_magic_cmd='$OBJDUMP -f'
8009   ;;
8010
8011 darwin* | rhapsody*)
8012   lt_cv_deplibs_check_method=pass_all
8013   ;;
8014
8015 freebsd* | dragonfly*)
8016   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8017     case $host_cpu in
8018     i*86 )
8019       # Not sure whether the presence of OpenBSD here was a mistake.
8020       # Let's accept both of them until this is cleared up.
8021       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
8022       lt_cv_file_magic_cmd=/usr/bin/file
8023       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8024       ;;
8025     esac
8026   else
8027     lt_cv_deplibs_check_method=pass_all
8028   fi
8029   ;;
8030
8031 haiku*)
8032   lt_cv_deplibs_check_method=pass_all
8033   ;;
8034
8035 hpux10.20* | hpux11*)
8036   lt_cv_file_magic_cmd=/usr/bin/file
8037   case $host_cpu in
8038   ia64*)
8039     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
8040     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
8041     ;;
8042   hppa*64*)
8043     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]'
8044     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
8045     ;;
8046   *)
8047     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
8048     lt_cv_file_magic_test_file=/usr/lib/libc.sl
8049     ;;
8050   esac
8051   ;;
8052
8053 interix[3-9]*)
8054   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8055   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
8056   ;;
8057
8058 irix5* | irix6* | nonstopux*)
8059   case $LD in
8060   *-32|*"-32 ") libmagic=32-bit;;
8061   *-n32|*"-n32 ") libmagic=N32;;
8062   *-64|*"-64 ") libmagic=64-bit;;
8063   *) libmagic=never-match;;
8064   esac
8065   lt_cv_deplibs_check_method=pass_all
8066   ;;
8067
8068 # This must be glibc/ELF.
8069 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8070   lt_cv_deplibs_check_method=pass_all
8071   ;;
8072
8073 netbsd*)
8074   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8075     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8076   else
8077     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
8078   fi
8079   ;;
8080
8081 newos6*)
8082   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
8083   lt_cv_file_magic_cmd=/usr/bin/file
8084   lt_cv_file_magic_test_file=/usr/lib/libnls.so
8085   ;;
8086
8087 *nto* | *qnx*)
8088   lt_cv_deplibs_check_method=pass_all
8089   ;;
8090
8091 openbsd* | bitrig*)
8092   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
8093     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
8094   else
8095     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8096   fi
8097   ;;
8098
8099 osf3* | osf4* | osf5*)
8100   lt_cv_deplibs_check_method=pass_all
8101   ;;
8102
8103 rdos*)
8104   lt_cv_deplibs_check_method=pass_all
8105   ;;
8106
8107 solaris*)
8108   lt_cv_deplibs_check_method=pass_all
8109   ;;
8110
8111 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8112   lt_cv_deplibs_check_method=pass_all
8113   ;;
8114
8115 sysv4 | sysv4.3*)
8116   case $host_vendor in
8117   motorola)
8118     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]'
8119     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8120     ;;
8121   ncr)
8122     lt_cv_deplibs_check_method=pass_all
8123     ;;
8124   sequent)
8125     lt_cv_file_magic_cmd='/bin/file'
8126     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
8127     ;;
8128   sni)
8129     lt_cv_file_magic_cmd='/bin/file'
8130     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
8131     lt_cv_file_magic_test_file=/lib/libc.so
8132     ;;
8133   siemens)
8134     lt_cv_deplibs_check_method=pass_all
8135     ;;
8136   pc)
8137     lt_cv_deplibs_check_method=pass_all
8138     ;;
8139   esac
8140   ;;
8141
8142 tpf*)
8143   lt_cv_deplibs_check_method=pass_all
8144   ;;
8145 os2*)
8146   lt_cv_deplibs_check_method=pass_all
8147   ;;
8148 esac
8149
8150 fi
8151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
8152 $as_echo "$lt_cv_deplibs_check_method" >&6; }
8153
8154 file_magic_glob=
8155 want_nocaseglob=no
8156 if test "$build" = "$host"; then
8157   case $host_os in
8158   mingw* | pw32*)
8159     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
8160       want_nocaseglob=yes
8161     else
8162       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
8163     fi
8164     ;;
8165   esac
8166 fi
8167
8168 file_magic_cmd=$lt_cv_file_magic_cmd
8169 deplibs_check_method=$lt_cv_deplibs_check_method
8170 test -z "$deplibs_check_method" && deplibs_check_method=unknown
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193 if test -n "$ac_tool_prefix"; then
8194   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8195 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8197 $as_echo_n "checking for $ac_word... " >&6; }
8198 if ${ac_cv_prog_DLLTOOL+:} false; then :
8199   $as_echo_n "(cached) " >&6
8200 else
8201   if test -n "$DLLTOOL"; then
8202   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8203 else
8204 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8205 for as_dir in $PATH
8206 do
8207   IFS=$as_save_IFS
8208   test -z "$as_dir" && as_dir=.
8209     for ac_exec_ext in '' $ac_executable_extensions; do
8210   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8211     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8212     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8213     break 2
8214   fi
8215 done
8216   done
8217 IFS=$as_save_IFS
8218
8219 fi
8220 fi
8221 DLLTOOL=$ac_cv_prog_DLLTOOL
8222 if test -n "$DLLTOOL"; then
8223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8224 $as_echo "$DLLTOOL" >&6; }
8225 else
8226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8227 $as_echo "no" >&6; }
8228 fi
8229
8230
8231 fi
8232 if test -z "$ac_cv_prog_DLLTOOL"; then
8233   ac_ct_DLLTOOL=$DLLTOOL
8234   # Extract the first word of "dlltool", so it can be a program name with args.
8235 set dummy dlltool; ac_word=$2
8236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8237 $as_echo_n "checking for $ac_word... " >&6; }
8238 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8239   $as_echo_n "(cached) " >&6
8240 else
8241   if test -n "$ac_ct_DLLTOOL"; then
8242   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8243 else
8244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8245 for as_dir in $PATH
8246 do
8247   IFS=$as_save_IFS
8248   test -z "$as_dir" && as_dir=.
8249     for ac_exec_ext in '' $ac_executable_extensions; do
8250   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8251     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8252     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8253     break 2
8254   fi
8255 done
8256   done
8257 IFS=$as_save_IFS
8258
8259 fi
8260 fi
8261 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8262 if test -n "$ac_ct_DLLTOOL"; then
8263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8264 $as_echo "$ac_ct_DLLTOOL" >&6; }
8265 else
8266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8267 $as_echo "no" >&6; }
8268 fi
8269
8270   if test "x$ac_ct_DLLTOOL" = x; then
8271     DLLTOOL="false"
8272   else
8273     case $cross_compiling:$ac_tool_warned in
8274 yes:)
8275 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8276 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8277 ac_tool_warned=yes ;;
8278 esac
8279     DLLTOOL=$ac_ct_DLLTOOL
8280   fi
8281 else
8282   DLLTOOL="$ac_cv_prog_DLLTOOL"
8283 fi
8284
8285 test -z "$DLLTOOL" && DLLTOOL=dlltool
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8297 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8298 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8299   $as_echo_n "(cached) " >&6
8300 else
8301   lt_cv_sharedlib_from_linklib_cmd='unknown'
8302
8303 case $host_os in
8304 cygwin* | mingw* | pw32* | cegcc*)
8305   # two different shell functions defined in ltmain.sh;
8306   # decide which one to use based on capabilities of $DLLTOOL
8307   case `$DLLTOOL --help 2>&1` in
8308   *--identify-strict*)
8309     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8310     ;;
8311   *)
8312     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8313     ;;
8314   esac
8315   ;;
8316 *)
8317   # fallback: assume linklib IS sharedlib
8318   lt_cv_sharedlib_from_linklib_cmd=$ECHO
8319   ;;
8320 esac
8321
8322 fi
8323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8324 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8325 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8326 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8327
8328
8329
8330
8331
8332
8333
8334 if test -n "$ac_tool_prefix"; then
8335   for ac_prog in ar
8336   do
8337     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8338 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8340 $as_echo_n "checking for $ac_word... " >&6; }
8341 if ${ac_cv_prog_AR+:} false; then :
8342   $as_echo_n "(cached) " >&6
8343 else
8344   if test -n "$AR"; then
8345   ac_cv_prog_AR="$AR" # Let the user override the test.
8346 else
8347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8348 for as_dir in $PATH
8349 do
8350   IFS=$as_save_IFS
8351   test -z "$as_dir" && as_dir=.
8352     for ac_exec_ext in '' $ac_executable_extensions; do
8353   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8354     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8355     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8356     break 2
8357   fi
8358 done
8359   done
8360 IFS=$as_save_IFS
8361
8362 fi
8363 fi
8364 AR=$ac_cv_prog_AR
8365 if test -n "$AR"; then
8366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8367 $as_echo "$AR" >&6; }
8368 else
8369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8370 $as_echo "no" >&6; }
8371 fi
8372
8373
8374     test -n "$AR" && break
8375   done
8376 fi
8377 if test -z "$AR"; then
8378   ac_ct_AR=$AR
8379   for ac_prog in ar
8380 do
8381   # Extract the first word of "$ac_prog", so it can be a program name with args.
8382 set dummy $ac_prog; ac_word=$2
8383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8384 $as_echo_n "checking for $ac_word... " >&6; }
8385 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8386   $as_echo_n "(cached) " >&6
8387 else
8388   if test -n "$ac_ct_AR"; then
8389   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8390 else
8391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8392 for as_dir in $PATH
8393 do
8394   IFS=$as_save_IFS
8395   test -z "$as_dir" && as_dir=.
8396     for ac_exec_ext in '' $ac_executable_extensions; do
8397   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8398     ac_cv_prog_ac_ct_AR="$ac_prog"
8399     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8400     break 2
8401   fi
8402 done
8403   done
8404 IFS=$as_save_IFS
8405
8406 fi
8407 fi
8408 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8409 if test -n "$ac_ct_AR"; then
8410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8411 $as_echo "$ac_ct_AR" >&6; }
8412 else
8413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8414 $as_echo "no" >&6; }
8415 fi
8416
8417
8418   test -n "$ac_ct_AR" && break
8419 done
8420
8421   if test "x$ac_ct_AR" = x; then
8422     AR="false"
8423   else
8424     case $cross_compiling:$ac_tool_warned in
8425 yes:)
8426 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8427 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8428 ac_tool_warned=yes ;;
8429 esac
8430     AR=$ac_ct_AR
8431   fi
8432 fi
8433
8434 : ${AR=ar}
8435 : ${AR_FLAGS=cru}
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8448 $as_echo_n "checking for archiver @FILE support... " >&6; }
8449 if ${lt_cv_ar_at_file+:} false; then :
8450   $as_echo_n "(cached) " >&6
8451 else
8452   lt_cv_ar_at_file=no
8453    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8454 /* end confdefs.h.  */
8455
8456 int
8457 main ()
8458 {
8459
8460   ;
8461   return 0;
8462 }
8463 _ACEOF
8464 if ac_fn_c_try_compile "$LINENO"; then :
8465   echo conftest.$ac_objext > conftest.lst
8466       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8467       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8468   (eval $lt_ar_try) 2>&5
8469   ac_status=$?
8470   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8471   test $ac_status = 0; }
8472       if test 0 -eq "$ac_status"; then
8473         # Ensure the archiver fails upon bogus file names.
8474         rm -f conftest.$ac_objext libconftest.a
8475         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8476   (eval $lt_ar_try) 2>&5
8477   ac_status=$?
8478   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8479   test $ac_status = 0; }
8480         if test 0 -ne "$ac_status"; then
8481           lt_cv_ar_at_file=@
8482         fi
8483       fi
8484       rm -f conftest.* libconftest.a
8485
8486 fi
8487 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8488
8489 fi
8490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8491 $as_echo "$lt_cv_ar_at_file" >&6; }
8492
8493 if test no = "$lt_cv_ar_at_file"; then
8494   archiver_list_spec=
8495 else
8496   archiver_list_spec=$lt_cv_ar_at_file
8497 fi
8498
8499
8500
8501
8502
8503
8504
8505 if test -n "$ac_tool_prefix"; then
8506   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8507 set dummy ${ac_tool_prefix}strip; ac_word=$2
8508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8509 $as_echo_n "checking for $ac_word... " >&6; }
8510 if ${ac_cv_prog_STRIP+:} false; then :
8511   $as_echo_n "(cached) " >&6
8512 else
8513   if test -n "$STRIP"; then
8514   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8515 else
8516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8517 for as_dir in $PATH
8518 do
8519   IFS=$as_save_IFS
8520   test -z "$as_dir" && as_dir=.
8521     for ac_exec_ext in '' $ac_executable_extensions; do
8522   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8523     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8524     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8525     break 2
8526   fi
8527 done
8528   done
8529 IFS=$as_save_IFS
8530
8531 fi
8532 fi
8533 STRIP=$ac_cv_prog_STRIP
8534 if test -n "$STRIP"; then
8535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8536 $as_echo "$STRIP" >&6; }
8537 else
8538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8539 $as_echo "no" >&6; }
8540 fi
8541
8542
8543 fi
8544 if test -z "$ac_cv_prog_STRIP"; then
8545   ac_ct_STRIP=$STRIP
8546   # Extract the first word of "strip", so it can be a program name with args.
8547 set dummy strip; ac_word=$2
8548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8549 $as_echo_n "checking for $ac_word... " >&6; }
8550 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8551   $as_echo_n "(cached) " >&6
8552 else
8553   if test -n "$ac_ct_STRIP"; then
8554   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8555 else
8556 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8557 for as_dir in $PATH
8558 do
8559   IFS=$as_save_IFS
8560   test -z "$as_dir" && as_dir=.
8561     for ac_exec_ext in '' $ac_executable_extensions; do
8562   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8563     ac_cv_prog_ac_ct_STRIP="strip"
8564     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8565     break 2
8566   fi
8567 done
8568   done
8569 IFS=$as_save_IFS
8570
8571 fi
8572 fi
8573 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8574 if test -n "$ac_ct_STRIP"; then
8575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8576 $as_echo "$ac_ct_STRIP" >&6; }
8577 else
8578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8579 $as_echo "no" >&6; }
8580 fi
8581
8582   if test "x$ac_ct_STRIP" = x; then
8583     STRIP=":"
8584   else
8585     case $cross_compiling:$ac_tool_warned in
8586 yes:)
8587 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8588 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8589 ac_tool_warned=yes ;;
8590 esac
8591     STRIP=$ac_ct_STRIP
8592   fi
8593 else
8594   STRIP="$ac_cv_prog_STRIP"
8595 fi
8596
8597 test -z "$STRIP" && STRIP=:
8598
8599
8600
8601
8602
8603
8604 if test -n "$ac_tool_prefix"; then
8605   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8606 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8608 $as_echo_n "checking for $ac_word... " >&6; }
8609 if ${ac_cv_prog_RANLIB+:} false; then :
8610   $as_echo_n "(cached) " >&6
8611 else
8612   if test -n "$RANLIB"; then
8613   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8614 else
8615 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8616 for as_dir in $PATH
8617 do
8618   IFS=$as_save_IFS
8619   test -z "$as_dir" && as_dir=.
8620     for ac_exec_ext in '' $ac_executable_extensions; do
8621   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8622     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8623     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8624     break 2
8625   fi
8626 done
8627   done
8628 IFS=$as_save_IFS
8629
8630 fi
8631 fi
8632 RANLIB=$ac_cv_prog_RANLIB
8633 if test -n "$RANLIB"; then
8634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8635 $as_echo "$RANLIB" >&6; }
8636 else
8637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8638 $as_echo "no" >&6; }
8639 fi
8640
8641
8642 fi
8643 if test -z "$ac_cv_prog_RANLIB"; then
8644   ac_ct_RANLIB=$RANLIB
8645   # Extract the first word of "ranlib", so it can be a program name with args.
8646 set dummy ranlib; ac_word=$2
8647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8648 $as_echo_n "checking for $ac_word... " >&6; }
8649 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8650   $as_echo_n "(cached) " >&6
8651 else
8652   if test -n "$ac_ct_RANLIB"; then
8653   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8654 else
8655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8656 for as_dir in $PATH
8657 do
8658   IFS=$as_save_IFS
8659   test -z "$as_dir" && as_dir=.
8660     for ac_exec_ext in '' $ac_executable_extensions; do
8661   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8662     ac_cv_prog_ac_ct_RANLIB="ranlib"
8663     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8664     break 2
8665   fi
8666 done
8667   done
8668 IFS=$as_save_IFS
8669
8670 fi
8671 fi
8672 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8673 if test -n "$ac_ct_RANLIB"; then
8674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8675 $as_echo "$ac_ct_RANLIB" >&6; }
8676 else
8677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8678 $as_echo "no" >&6; }
8679 fi
8680
8681   if test "x$ac_ct_RANLIB" = x; then
8682     RANLIB=":"
8683   else
8684     case $cross_compiling:$ac_tool_warned in
8685 yes:)
8686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8687 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8688 ac_tool_warned=yes ;;
8689 esac
8690     RANLIB=$ac_ct_RANLIB
8691   fi
8692 else
8693   RANLIB="$ac_cv_prog_RANLIB"
8694 fi
8695
8696 test -z "$RANLIB" && RANLIB=:
8697
8698
8699
8700
8701
8702
8703 # Determine commands to create old-style static archives.
8704 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8705 old_postinstall_cmds='chmod 644 $oldlib'
8706 old_postuninstall_cmds=
8707
8708 if test -n "$RANLIB"; then
8709   case $host_os in
8710   bitrig* | openbsd*)
8711     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8712     ;;
8713   *)
8714     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8715     ;;
8716   esac
8717   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8718 fi
8719
8720 case $host_os in
8721   darwin*)
8722     lock_old_archive_extraction=yes ;;
8723   *)
8724     lock_old_archive_extraction=no ;;
8725 esac
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747 for ac_prog in gawk mawk nawk awk
8748 do
8749   # Extract the first word of "$ac_prog", so it can be a program name with args.
8750 set dummy $ac_prog; ac_word=$2
8751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8752 $as_echo_n "checking for $ac_word... " >&6; }
8753 if ${ac_cv_prog_AWK+:} false; then :
8754   $as_echo_n "(cached) " >&6
8755 else
8756   if test -n "$AWK"; then
8757   ac_cv_prog_AWK="$AWK" # Let the user override the test.
8758 else
8759 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8760 for as_dir in $PATH
8761 do
8762   IFS=$as_save_IFS
8763   test -z "$as_dir" && as_dir=.
8764     for ac_exec_ext in '' $ac_executable_extensions; do
8765   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8766     ac_cv_prog_AWK="$ac_prog"
8767     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8768     break 2
8769   fi
8770 done
8771   done
8772 IFS=$as_save_IFS
8773
8774 fi
8775 fi
8776 AWK=$ac_cv_prog_AWK
8777 if test -n "$AWK"; then
8778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8779 $as_echo "$AWK" >&6; }
8780 else
8781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8782 $as_echo "no" >&6; }
8783 fi
8784
8785
8786   test -n "$AWK" && break
8787 done
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807 # If no C compiler was specified, use CC.
8808 LTCC=${LTCC-"$CC"}
8809
8810 # If no C compiler flags were specified, use CFLAGS.
8811 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8812
8813 # Allow CC to be a program name with arguments.
8814 compiler=$CC
8815
8816
8817 # Check for command to grab the raw symbol name followed by C symbol from nm.
8818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8819 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8820 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8821   $as_echo_n "(cached) " >&6
8822 else
8823
8824 # These are sane defaults that work on at least a few old systems.
8825 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8826
8827 # Character class describing NM global symbol codes.
8828 symcode='[BCDEGRST]'
8829
8830 # Regexp to match symbols that can be accessed directly from C.
8831 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8832
8833 # Define system-specific variables.
8834 case $host_os in
8835 aix*)
8836   symcode='[BCDT]'
8837   ;;
8838 cygwin* | mingw* | pw32* | cegcc*)
8839   symcode='[ABCDGISTW]'
8840   ;;
8841 hpux*)
8842   if test ia64 = "$host_cpu"; then
8843     symcode='[ABCDEGRST]'
8844   fi
8845   ;;
8846 irix* | nonstopux*)
8847   symcode='[BCDEGRST]'
8848   ;;
8849 osf*)
8850   symcode='[BCDEGQRST]'
8851   ;;
8852 solaris*)
8853   symcode='[BDRT]'
8854   ;;
8855 sco3.2v5*)
8856   symcode='[DT]'
8857   ;;
8858 sysv4.2uw2*)
8859   symcode='[DT]'
8860   ;;
8861 sysv5* | sco5v6* | unixware* | OpenUNIX*)
8862   symcode='[ABDT]'
8863   ;;
8864 sysv4)
8865   symcode='[DFNSTU]'
8866   ;;
8867 esac
8868
8869 # If we're using GNU nm, then use its standard symbol codes.
8870 case `$NM -V 2>&1` in
8871 *GNU* | *'with BFD'*)
8872   symcode='[ABCDGIRSTW]' ;;
8873 esac
8874
8875 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8876   # Gets list of data symbols to import.
8877   lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8878   # Adjust the below global symbol transforms to fixup imported variables.
8879   lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8880   lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
8881   lt_c_name_lib_hook="\
8882   -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
8883   -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
8884 else
8885   # Disable hooks by default.
8886   lt_cv_sys_global_symbol_to_import=
8887   lt_cdecl_hook=
8888   lt_c_name_hook=
8889   lt_c_name_lib_hook=
8890 fi
8891
8892 # Transform an extracted symbol line into a proper C declaration.
8893 # Some systems (esp. on ia64) link data and code symbols differently,
8894 # so use this general approach.
8895 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8896 $lt_cdecl_hook\
8897 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8898 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8899
8900 # Transform an extracted symbol line into symbol name and symbol address
8901 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8902 $lt_c_name_hook\
8903 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8904 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8905
8906 # Transform an extracted symbol line into symbol name with lib prefix and
8907 # symbol address.
8908 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8909 $lt_c_name_lib_hook\
8910 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8911 " -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8912 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8913
8914 # Handle CRLF in mingw tool chain
8915 opt_cr=
8916 case $build_os in
8917 mingw*)
8918   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8919   ;;
8920 esac
8921
8922 # Try without a prefix underscore, then with it.
8923 for ac_symprfx in "" "_"; do
8924
8925   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8926   symxfrm="\\1 $ac_symprfx\\2 \\2"
8927
8928   # Write the raw and C identifiers.
8929   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8930     # Fake it for dumpbin and say T for any non-static function,
8931     # D for any global variable and I for any imported variable.
8932     # Also find C++ and __fastcall symbols from MSVC++,
8933     # which start with @ or ?.
8934     lt_cv_sys_global_symbol_pipe="$AWK '"\
8935 "     {last_section=section; section=\$ 3};"\
8936 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8937 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8938 "     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8939 "     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8940 "     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8941 "     \$ 0!~/External *\|/{next};"\
8942 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8943 "     {if(hide[section]) next};"\
8944 "     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8945 "     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8946 "     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8947 "     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8948 "     ' prfx=^$ac_symprfx"
8949   else
8950     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8951   fi
8952   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8953
8954   # Check to see that the pipe works correctly.
8955   pipe_works=no
8956
8957   rm -f conftest*
8958   cat > conftest.$ac_ext <<_LT_EOF
8959 #ifdef __cplusplus
8960 extern "C" {
8961 #endif
8962 char nm_test_var;
8963 void nm_test_func(void);
8964 void nm_test_func(void){}
8965 #ifdef __cplusplus
8966 }
8967 #endif
8968 int main(){nm_test_var='a';nm_test_func();return(0);}
8969 _LT_EOF
8970
8971   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8972   (eval $ac_compile) 2>&5
8973   ac_status=$?
8974   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8975   test $ac_status = 0; }; then
8976     # Now try to grab the symbols.
8977     nlist=conftest.nm
8978     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
8979   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
8980   ac_status=$?
8981   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8982   test $ac_status = 0; } && test -s "$nlist"; then
8983       # Try sorting and uniquifying the output.
8984       if sort "$nlist" | uniq > "$nlist"T; then
8985         mv -f "$nlist"T "$nlist"
8986       else
8987         rm -f "$nlist"T
8988       fi
8989
8990       # Make sure that we snagged all the symbols we need.
8991       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
8992         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
8993           cat <<_LT_EOF > conftest.$ac_ext
8994 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
8995 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
8996 /* DATA imports from DLLs on WIN32 can't be const, because runtime
8997    relocations are performed -- see ld's documentation on pseudo-relocs.  */
8998 # define LT_DLSYM_CONST
8999 #elif defined __osf__
9000 /* This system does not cope well with relocations in const data.  */
9001 # define LT_DLSYM_CONST
9002 #else
9003 # define LT_DLSYM_CONST const
9004 #endif
9005
9006 #ifdef __cplusplus
9007 extern "C" {
9008 #endif
9009
9010 _LT_EOF
9011           # Now generate the symbol file.
9012           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
9013
9014           cat <<_LT_EOF >> conftest.$ac_ext
9015
9016 /* The mapping between symbol names and symbols.  */
9017 LT_DLSYM_CONST struct {
9018   const char *name;
9019   void       *address;
9020 }
9021 lt__PROGRAM__LTX_preloaded_symbols[] =
9022 {
9023   { "@PROGRAM@", (void *) 0 },
9024 _LT_EOF
9025           $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
9026           cat <<\_LT_EOF >> conftest.$ac_ext
9027   {0, (void *) 0}
9028 };
9029
9030 /* This works around a problem in FreeBSD linker */
9031 #ifdef FREEBSD_WORKAROUND
9032 static const void *lt_preloaded_setup() {
9033   return lt__PROGRAM__LTX_preloaded_symbols;
9034 }
9035 #endif
9036
9037 #ifdef __cplusplus
9038 }
9039 #endif
9040 _LT_EOF
9041           # Now try linking the two files.
9042           mv conftest.$ac_objext conftstm.$ac_objext
9043           lt_globsym_save_LIBS=$LIBS
9044           lt_globsym_save_CFLAGS=$CFLAGS
9045           LIBS=conftstm.$ac_objext
9046           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
9047           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9048   (eval $ac_link) 2>&5
9049   ac_status=$?
9050   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9051   test $ac_status = 0; } && test -s conftest$ac_exeext; then
9052             pipe_works=yes
9053           fi
9054           LIBS=$lt_globsym_save_LIBS
9055           CFLAGS=$lt_globsym_save_CFLAGS
9056         else
9057           echo "cannot find nm_test_func in $nlist" >&5
9058         fi
9059       else
9060         echo "cannot find nm_test_var in $nlist" >&5
9061       fi
9062     else
9063       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
9064     fi
9065   else
9066     echo "$progname: failed program was:" >&5
9067     cat conftest.$ac_ext >&5
9068   fi
9069   rm -rf conftest* conftst*
9070
9071   # Do not use the global_symbol_pipe unless it works.
9072   if test yes = "$pipe_works"; then
9073     break
9074   else
9075     lt_cv_sys_global_symbol_pipe=
9076   fi
9077 done
9078
9079 fi
9080
9081 if test -z "$lt_cv_sys_global_symbol_pipe"; then
9082   lt_cv_sys_global_symbol_to_cdecl=
9083 fi
9084 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
9086 $as_echo "failed" >&6; }
9087 else
9088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9089 $as_echo "ok" >&6; }
9090 fi
9091
9092 # Response file support.
9093 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9094   nm_file_list_spec='@'
9095 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
9096   nm_file_list_spec='@'
9097 fi
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
9136 $as_echo_n "checking for sysroot... " >&6; }
9137
9138 # Check whether --with-sysroot was given.
9139 if test "${with_sysroot+set}" = set; then :
9140   withval=$with_sysroot;
9141 else
9142   with_sysroot=no
9143 fi
9144
9145
9146 lt_sysroot=
9147 case $with_sysroot in #(
9148  yes)
9149    if test yes = "$GCC"; then
9150      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
9151    fi
9152    ;; #(
9153  /*)
9154    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
9155    ;; #(
9156  no|'')
9157    ;; #(
9158  *)
9159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
9160 $as_echo "$with_sysroot" >&6; }
9161    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
9162    ;;
9163 esac
9164
9165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
9166 $as_echo "${lt_sysroot:-no}" >&6; }
9167
9168
9169
9170
9171
9172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
9173 $as_echo_n "checking for a working dd... " >&6; }
9174 if ${ac_cv_path_lt_DD+:} false; then :
9175   $as_echo_n "(cached) " >&6
9176 else
9177   printf 0123456789abcdef0123456789abcdef >conftest.i
9178 cat conftest.i conftest.i >conftest2.i
9179 : ${lt_DD:=$DD}
9180 if test -z "$lt_DD"; then
9181   ac_path_lt_DD_found=false
9182   # Loop through the user's path and test for each of PROGNAME-LIST
9183   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9184 for as_dir in $PATH
9185 do
9186   IFS=$as_save_IFS
9187   test -z "$as_dir" && as_dir=.
9188     for ac_prog in dd; do
9189     for ac_exec_ext in '' $ac_executable_extensions; do
9190       ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
9191       as_fn_executable_p "$ac_path_lt_DD" || continue
9192 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9193   cmp -s conftest.i conftest.out \
9194   && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
9195 fi
9196       $ac_path_lt_DD_found && break 3
9197     done
9198   done
9199   done
9200 IFS=$as_save_IFS
9201   if test -z "$ac_cv_path_lt_DD"; then
9202     :
9203   fi
9204 else
9205   ac_cv_path_lt_DD=$lt_DD
9206 fi
9207
9208 rm -f conftest.i conftest2.i conftest.out
9209 fi
9210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
9211 $as_echo "$ac_cv_path_lt_DD" >&6; }
9212
9213
9214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
9215 $as_echo_n "checking how to truncate binary pipes... " >&6; }
9216 if ${lt_cv_truncate_bin+:} false; then :
9217   $as_echo_n "(cached) " >&6
9218 else
9219   printf 0123456789abcdef0123456789abcdef >conftest.i
9220 cat conftest.i conftest.i >conftest2.i
9221 lt_cv_truncate_bin=
9222 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9223   cmp -s conftest.i conftest.out \
9224   && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
9225 fi
9226 rm -f conftest.i conftest2.i conftest.out
9227 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
9228 fi
9229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
9230 $as_echo "$lt_cv_truncate_bin" >&6; }
9231
9232
9233
9234
9235
9236
9237
9238 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
9239 func_cc_basename ()
9240 {
9241     for cc_temp in $*""; do
9242       case $cc_temp in
9243         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9244         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9245         \-*) ;;
9246         *) break;;
9247       esac
9248     done
9249     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9250 }
9251
9252 # Check whether --enable-libtool-lock was given.
9253 if test "${enable_libtool_lock+set}" = set; then :
9254   enableval=$enable_libtool_lock;
9255 fi
9256
9257 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
9258
9259 # Some flags need to be propagated to the compiler or linker for good
9260 # libtool support.
9261 case $host in
9262 ia64-*-hpux*)
9263   # Find out what ABI is being produced by ac_compile, and set mode
9264   # options accordingly.
9265   echo 'int i;' > conftest.$ac_ext
9266   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9267   (eval $ac_compile) 2>&5
9268   ac_status=$?
9269   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9270   test $ac_status = 0; }; then
9271     case `/usr/bin/file conftest.$ac_objext` in
9272       *ELF-32*)
9273         HPUX_IA64_MODE=32
9274         ;;
9275       *ELF-64*)
9276         HPUX_IA64_MODE=64
9277         ;;
9278     esac
9279   fi
9280   rm -rf conftest*
9281   ;;
9282 *-*-irix6*)
9283   # Find out what ABI is being produced by ac_compile, and set linker
9284   # options accordingly.
9285   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9286   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9287   (eval $ac_compile) 2>&5
9288   ac_status=$?
9289   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9290   test $ac_status = 0; }; then
9291     if test yes = "$lt_cv_prog_gnu_ld"; then
9292       case `/usr/bin/file conftest.$ac_objext` in
9293         *32-bit*)
9294           LD="${LD-ld} -melf32bsmip"
9295           ;;
9296         *N32*)
9297           LD="${LD-ld} -melf32bmipn32"
9298           ;;
9299         *64-bit*)
9300           LD="${LD-ld} -melf64bmip"
9301         ;;
9302       esac
9303     else
9304       case `/usr/bin/file conftest.$ac_objext` in
9305         *32-bit*)
9306           LD="${LD-ld} -32"
9307           ;;
9308         *N32*)
9309           LD="${LD-ld} -n32"
9310           ;;
9311         *64-bit*)
9312           LD="${LD-ld} -64"
9313           ;;
9314       esac
9315     fi
9316   fi
9317   rm -rf conftest*
9318   ;;
9319
9320 mips64*-*linux*)
9321   # Find out what ABI is being produced by ac_compile, and set linker
9322   # options accordingly.
9323   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9324   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9325   (eval $ac_compile) 2>&5
9326   ac_status=$?
9327   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9328   test $ac_status = 0; }; then
9329     emul=elf
9330     case `/usr/bin/file conftest.$ac_objext` in
9331       *32-bit*)
9332         emul="${emul}32"
9333         ;;
9334       *64-bit*)
9335         emul="${emul}64"
9336         ;;
9337     esac
9338     case `/usr/bin/file conftest.$ac_objext` in
9339       *MSB*)
9340         emul="${emul}btsmip"
9341         ;;
9342       *LSB*)
9343         emul="${emul}ltsmip"
9344         ;;
9345     esac
9346     case `/usr/bin/file conftest.$ac_objext` in
9347       *N32*)
9348         emul="${emul}n32"
9349         ;;
9350     esac
9351     LD="${LD-ld} -m $emul"
9352   fi
9353   rm -rf conftest*
9354   ;;
9355
9356 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9357 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9358   # Find out what ABI is being produced by ac_compile, and set linker
9359   # options accordingly.  Note that the listed cases only cover the
9360   # situations where additional linker options are needed (such as when
9361   # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9362   # vice versa); the common cases where no linker options are needed do
9363   # not appear in the list.
9364   echo 'int i;' > conftest.$ac_ext
9365   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9366   (eval $ac_compile) 2>&5
9367   ac_status=$?
9368   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9369   test $ac_status = 0; }; then
9370     case `/usr/bin/file conftest.o` in
9371       *32-bit*)
9372         case $host in
9373           x86_64-*kfreebsd*-gnu)
9374             LD="${LD-ld} -m elf_i386_fbsd"
9375             ;;
9376           x86_64-*linux*)
9377             case `/usr/bin/file conftest.o` in
9378               *x86-64*)
9379                 LD="${LD-ld} -m elf32_x86_64"
9380                 ;;
9381               *)
9382                 LD="${LD-ld} -m elf_i386"
9383                 ;;
9384             esac
9385             ;;
9386           powerpc64le-*linux*)
9387             LD="${LD-ld} -m elf32lppclinux"
9388             ;;
9389           powerpc64-*linux*)
9390             LD="${LD-ld} -m elf32ppclinux"
9391             ;;
9392           s390x-*linux*)
9393             LD="${LD-ld} -m elf_s390"
9394             ;;
9395           sparc64-*linux*)
9396             LD="${LD-ld} -m elf32_sparc"
9397             ;;
9398         esac
9399         ;;
9400       *64-bit*)
9401         case $host in
9402           x86_64-*kfreebsd*-gnu)
9403             LD="${LD-ld} -m elf_x86_64_fbsd"
9404             ;;
9405           x86_64-*linux*)
9406             LD="${LD-ld} -m elf_x86_64"
9407             ;;
9408           powerpcle-*linux*)
9409             LD="${LD-ld} -m elf64lppc"
9410             ;;
9411           powerpc-*linux*)
9412             LD="${LD-ld} -m elf64ppc"
9413             ;;
9414           s390*-*linux*|s390*-*tpf*)
9415             LD="${LD-ld} -m elf64_s390"
9416             ;;
9417           sparc*-*linux*)
9418             LD="${LD-ld} -m elf64_sparc"
9419             ;;
9420         esac
9421         ;;
9422     esac
9423   fi
9424   rm -rf conftest*
9425   ;;
9426
9427 *-*-sco3.2v5*)
9428   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9429   SAVE_CFLAGS=$CFLAGS
9430   CFLAGS="$CFLAGS -belf"
9431   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9432 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
9433 if ${lt_cv_cc_needs_belf+:} false; then :
9434   $as_echo_n "(cached) " >&6
9435 else
9436   ac_ext=c
9437 ac_cpp='$CPP $CPPFLAGS'
9438 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9439 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9440 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9441
9442      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9443 /* end confdefs.h.  */
9444
9445 int
9446 main ()
9447 {
9448
9449   ;
9450   return 0;
9451 }
9452 _ACEOF
9453 if ac_fn_c_try_link "$LINENO"; then :
9454   lt_cv_cc_needs_belf=yes
9455 else
9456   lt_cv_cc_needs_belf=no
9457 fi
9458 rm -f core conftest.err conftest.$ac_objext \
9459     conftest$ac_exeext conftest.$ac_ext
9460      ac_ext=c
9461 ac_cpp='$CPP $CPPFLAGS'
9462 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9463 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9464 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9465
9466 fi
9467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9468 $as_echo "$lt_cv_cc_needs_belf" >&6; }
9469   if test yes != "$lt_cv_cc_needs_belf"; then
9470     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9471     CFLAGS=$SAVE_CFLAGS
9472   fi
9473   ;;
9474 *-*solaris*)
9475   # Find out what ABI is being produced by ac_compile, and set linker
9476   # options accordingly.
9477   echo 'int i;' > conftest.$ac_ext
9478   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9479   (eval $ac_compile) 2>&5
9480   ac_status=$?
9481   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9482   test $ac_status = 0; }; then
9483     case `/usr/bin/file conftest.o` in
9484     *64-bit*)
9485       case $lt_cv_prog_gnu_ld in
9486       yes*)
9487         case $host in
9488         i?86-*-solaris*|x86_64-*-solaris*)
9489           LD="${LD-ld} -m elf_x86_64"
9490           ;;
9491         sparc*-*-solaris*)
9492           LD="${LD-ld} -m elf64_sparc"
9493           ;;
9494         esac
9495         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9496         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9497           LD=${LD-ld}_sol2
9498         fi
9499         ;;
9500       *)
9501         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9502           LD="${LD-ld} -64"
9503         fi
9504         ;;
9505       esac
9506       ;;
9507     esac
9508   fi
9509   rm -rf conftest*
9510   ;;
9511 esac
9512
9513 need_locks=$enable_libtool_lock
9514
9515 if test -n "$ac_tool_prefix"; then
9516   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9517 set dummy ${ac_tool_prefix}mt; ac_word=$2
9518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9519 $as_echo_n "checking for $ac_word... " >&6; }
9520 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9521   $as_echo_n "(cached) " >&6
9522 else
9523   if test -n "$MANIFEST_TOOL"; then
9524   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9525 else
9526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9527 for as_dir in $PATH
9528 do
9529   IFS=$as_save_IFS
9530   test -z "$as_dir" && as_dir=.
9531     for ac_exec_ext in '' $ac_executable_extensions; do
9532   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9533     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9534     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9535     break 2
9536   fi
9537 done
9538   done
9539 IFS=$as_save_IFS
9540
9541 fi
9542 fi
9543 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9544 if test -n "$MANIFEST_TOOL"; then
9545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9546 $as_echo "$MANIFEST_TOOL" >&6; }
9547 else
9548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9549 $as_echo "no" >&6; }
9550 fi
9551
9552
9553 fi
9554 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9555   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9556   # Extract the first word of "mt", so it can be a program name with args.
9557 set dummy mt; ac_word=$2
9558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9559 $as_echo_n "checking for $ac_word... " >&6; }
9560 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9561   $as_echo_n "(cached) " >&6
9562 else
9563   if test -n "$ac_ct_MANIFEST_TOOL"; then
9564   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9565 else
9566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9567 for as_dir in $PATH
9568 do
9569   IFS=$as_save_IFS
9570   test -z "$as_dir" && as_dir=.
9571     for ac_exec_ext in '' $ac_executable_extensions; do
9572   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9573     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9574     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9575     break 2
9576   fi
9577 done
9578   done
9579 IFS=$as_save_IFS
9580
9581 fi
9582 fi
9583 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9584 if test -n "$ac_ct_MANIFEST_TOOL"; then
9585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9586 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9587 else
9588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9589 $as_echo "no" >&6; }
9590 fi
9591
9592   if test "x$ac_ct_MANIFEST_TOOL" = x; then
9593     MANIFEST_TOOL=":"
9594   else
9595     case $cross_compiling:$ac_tool_warned in
9596 yes:)
9597 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9598 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9599 ac_tool_warned=yes ;;
9600 esac
9601     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9602   fi
9603 else
9604   MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9605 fi
9606
9607 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9609 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9610 if ${lt_cv_path_mainfest_tool+:} false; then :
9611   $as_echo_n "(cached) " >&6
9612 else
9613   lt_cv_path_mainfest_tool=no
9614   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9615   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9616   cat conftest.err >&5
9617   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9618     lt_cv_path_mainfest_tool=yes
9619   fi
9620   rm -f conftest*
9621 fi
9622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9623 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
9624 if test yes != "$lt_cv_path_mainfest_tool"; then
9625   MANIFEST_TOOL=:
9626 fi
9627
9628
9629
9630
9631
9632
9633   case $host_os in
9634     rhapsody* | darwin*)
9635     if test -n "$ac_tool_prefix"; then
9636   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9637 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9639 $as_echo_n "checking for $ac_word... " >&6; }
9640 if ${ac_cv_prog_DSYMUTIL+:} false; then :
9641   $as_echo_n "(cached) " >&6
9642 else
9643   if test -n "$DSYMUTIL"; then
9644   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9645 else
9646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9647 for as_dir in $PATH
9648 do
9649   IFS=$as_save_IFS
9650   test -z "$as_dir" && as_dir=.
9651     for ac_exec_ext in '' $ac_executable_extensions; do
9652   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9653     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9654     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9655     break 2
9656   fi
9657 done
9658   done
9659 IFS=$as_save_IFS
9660
9661 fi
9662 fi
9663 DSYMUTIL=$ac_cv_prog_DSYMUTIL
9664 if test -n "$DSYMUTIL"; then
9665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9666 $as_echo "$DSYMUTIL" >&6; }
9667 else
9668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9669 $as_echo "no" >&6; }
9670 fi
9671
9672
9673 fi
9674 if test -z "$ac_cv_prog_DSYMUTIL"; then
9675   ac_ct_DSYMUTIL=$DSYMUTIL
9676   # Extract the first word of "dsymutil", so it can be a program name with args.
9677 set dummy dsymutil; ac_word=$2
9678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9679 $as_echo_n "checking for $ac_word... " >&6; }
9680 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9681   $as_echo_n "(cached) " >&6
9682 else
9683   if test -n "$ac_ct_DSYMUTIL"; then
9684   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9685 else
9686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9687 for as_dir in $PATH
9688 do
9689   IFS=$as_save_IFS
9690   test -z "$as_dir" && as_dir=.
9691     for ac_exec_ext in '' $ac_executable_extensions; do
9692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9693     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9695     break 2
9696   fi
9697 done
9698   done
9699 IFS=$as_save_IFS
9700
9701 fi
9702 fi
9703 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9704 if test -n "$ac_ct_DSYMUTIL"; then
9705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9706 $as_echo "$ac_ct_DSYMUTIL" >&6; }
9707 else
9708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9709 $as_echo "no" >&6; }
9710 fi
9711
9712   if test "x$ac_ct_DSYMUTIL" = x; then
9713     DSYMUTIL=":"
9714   else
9715     case $cross_compiling:$ac_tool_warned in
9716 yes:)
9717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9718 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9719 ac_tool_warned=yes ;;
9720 esac
9721     DSYMUTIL=$ac_ct_DSYMUTIL
9722   fi
9723 else
9724   DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9725 fi
9726
9727     if test -n "$ac_tool_prefix"; then
9728   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9729 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9731 $as_echo_n "checking for $ac_word... " >&6; }
9732 if ${ac_cv_prog_NMEDIT+:} false; then :
9733   $as_echo_n "(cached) " >&6
9734 else
9735   if test -n "$NMEDIT"; then
9736   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9737 else
9738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9739 for as_dir in $PATH
9740 do
9741   IFS=$as_save_IFS
9742   test -z "$as_dir" && as_dir=.
9743     for ac_exec_ext in '' $ac_executable_extensions; do
9744   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9745     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9746     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9747     break 2
9748   fi
9749 done
9750   done
9751 IFS=$as_save_IFS
9752
9753 fi
9754 fi
9755 NMEDIT=$ac_cv_prog_NMEDIT
9756 if test -n "$NMEDIT"; then
9757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9758 $as_echo "$NMEDIT" >&6; }
9759 else
9760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9761 $as_echo "no" >&6; }
9762 fi
9763
9764
9765 fi
9766 if test -z "$ac_cv_prog_NMEDIT"; then
9767   ac_ct_NMEDIT=$NMEDIT
9768   # Extract the first word of "nmedit", so it can be a program name with args.
9769 set dummy nmedit; ac_word=$2
9770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9771 $as_echo_n "checking for $ac_word... " >&6; }
9772 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9773   $as_echo_n "(cached) " >&6
9774 else
9775   if test -n "$ac_ct_NMEDIT"; then
9776   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9777 else
9778 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9779 for as_dir in $PATH
9780 do
9781   IFS=$as_save_IFS
9782   test -z "$as_dir" && as_dir=.
9783     for ac_exec_ext in '' $ac_executable_extensions; do
9784   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9785     ac_cv_prog_ac_ct_NMEDIT="nmedit"
9786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9787     break 2
9788   fi
9789 done
9790   done
9791 IFS=$as_save_IFS
9792
9793 fi
9794 fi
9795 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9796 if test -n "$ac_ct_NMEDIT"; then
9797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9798 $as_echo "$ac_ct_NMEDIT" >&6; }
9799 else
9800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9801 $as_echo "no" >&6; }
9802 fi
9803
9804   if test "x$ac_ct_NMEDIT" = x; then
9805     NMEDIT=":"
9806   else
9807     case $cross_compiling:$ac_tool_warned in
9808 yes:)
9809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9810 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9811 ac_tool_warned=yes ;;
9812 esac
9813     NMEDIT=$ac_ct_NMEDIT
9814   fi
9815 else
9816   NMEDIT="$ac_cv_prog_NMEDIT"
9817 fi
9818
9819     if test -n "$ac_tool_prefix"; then
9820   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9821 set dummy ${ac_tool_prefix}lipo; ac_word=$2
9822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9823 $as_echo_n "checking for $ac_word... " >&6; }
9824 if ${ac_cv_prog_LIPO+:} false; then :
9825   $as_echo_n "(cached) " >&6
9826 else
9827   if test -n "$LIPO"; then
9828   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9829 else
9830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9831 for as_dir in $PATH
9832 do
9833   IFS=$as_save_IFS
9834   test -z "$as_dir" && as_dir=.
9835     for ac_exec_ext in '' $ac_executable_extensions; do
9836   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9837     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9838     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9839     break 2
9840   fi
9841 done
9842   done
9843 IFS=$as_save_IFS
9844
9845 fi
9846 fi
9847 LIPO=$ac_cv_prog_LIPO
9848 if test -n "$LIPO"; then
9849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9850 $as_echo "$LIPO" >&6; }
9851 else
9852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9853 $as_echo "no" >&6; }
9854 fi
9855
9856
9857 fi
9858 if test -z "$ac_cv_prog_LIPO"; then
9859   ac_ct_LIPO=$LIPO
9860   # Extract the first word of "lipo", so it can be a program name with args.
9861 set dummy lipo; ac_word=$2
9862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9863 $as_echo_n "checking for $ac_word... " >&6; }
9864 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9865   $as_echo_n "(cached) " >&6
9866 else
9867   if test -n "$ac_ct_LIPO"; then
9868   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9869 else
9870 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9871 for as_dir in $PATH
9872 do
9873   IFS=$as_save_IFS
9874   test -z "$as_dir" && as_dir=.
9875     for ac_exec_ext in '' $ac_executable_extensions; do
9876   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9877     ac_cv_prog_ac_ct_LIPO="lipo"
9878     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9879     break 2
9880   fi
9881 done
9882   done
9883 IFS=$as_save_IFS
9884
9885 fi
9886 fi
9887 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9888 if test -n "$ac_ct_LIPO"; then
9889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9890 $as_echo "$ac_ct_LIPO" >&6; }
9891 else
9892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9893 $as_echo "no" >&6; }
9894 fi
9895
9896   if test "x$ac_ct_LIPO" = x; then
9897     LIPO=":"
9898   else
9899     case $cross_compiling:$ac_tool_warned in
9900 yes:)
9901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9902 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9903 ac_tool_warned=yes ;;
9904 esac
9905     LIPO=$ac_ct_LIPO
9906   fi
9907 else
9908   LIPO="$ac_cv_prog_LIPO"
9909 fi
9910
9911     if test -n "$ac_tool_prefix"; then
9912   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9913 set dummy ${ac_tool_prefix}otool; ac_word=$2
9914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9915 $as_echo_n "checking for $ac_word... " >&6; }
9916 if ${ac_cv_prog_OTOOL+:} false; then :
9917   $as_echo_n "(cached) " >&6
9918 else
9919   if test -n "$OTOOL"; then
9920   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9921 else
9922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9923 for as_dir in $PATH
9924 do
9925   IFS=$as_save_IFS
9926   test -z "$as_dir" && as_dir=.
9927     for ac_exec_ext in '' $ac_executable_extensions; do
9928   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9929     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9930     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9931     break 2
9932   fi
9933 done
9934   done
9935 IFS=$as_save_IFS
9936
9937 fi
9938 fi
9939 OTOOL=$ac_cv_prog_OTOOL
9940 if test -n "$OTOOL"; then
9941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9942 $as_echo "$OTOOL" >&6; }
9943 else
9944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9945 $as_echo "no" >&6; }
9946 fi
9947
9948
9949 fi
9950 if test -z "$ac_cv_prog_OTOOL"; then
9951   ac_ct_OTOOL=$OTOOL
9952   # Extract the first word of "otool", so it can be a program name with args.
9953 set dummy otool; ac_word=$2
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9955 $as_echo_n "checking for $ac_word... " >&6; }
9956 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9957   $as_echo_n "(cached) " >&6
9958 else
9959   if test -n "$ac_ct_OTOOL"; then
9960   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
9961 else
9962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9963 for as_dir in $PATH
9964 do
9965   IFS=$as_save_IFS
9966   test -z "$as_dir" && as_dir=.
9967     for ac_exec_ext in '' $ac_executable_extensions; do
9968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9969     ac_cv_prog_ac_ct_OTOOL="otool"
9970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9971     break 2
9972   fi
9973 done
9974   done
9975 IFS=$as_save_IFS
9976
9977 fi
9978 fi
9979 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
9980 if test -n "$ac_ct_OTOOL"; then
9981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
9982 $as_echo "$ac_ct_OTOOL" >&6; }
9983 else
9984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9985 $as_echo "no" >&6; }
9986 fi
9987
9988   if test "x$ac_ct_OTOOL" = x; then
9989     OTOOL=":"
9990   else
9991     case $cross_compiling:$ac_tool_warned in
9992 yes:)
9993 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9994 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9995 ac_tool_warned=yes ;;
9996 esac
9997     OTOOL=$ac_ct_OTOOL
9998   fi
9999 else
10000   OTOOL="$ac_cv_prog_OTOOL"
10001 fi
10002
10003     if test -n "$ac_tool_prefix"; then
10004   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
10005 set dummy ${ac_tool_prefix}otool64; ac_word=$2
10006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10007 $as_echo_n "checking for $ac_word... " >&6; }
10008 if ${ac_cv_prog_OTOOL64+:} false; then :
10009   $as_echo_n "(cached) " >&6
10010 else
10011   if test -n "$OTOOL64"; then
10012   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
10013 else
10014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10015 for as_dir in $PATH
10016 do
10017   IFS=$as_save_IFS
10018   test -z "$as_dir" && as_dir=.
10019     for ac_exec_ext in '' $ac_executable_extensions; do
10020   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10021     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
10022     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10023     break 2
10024   fi
10025 done
10026   done
10027 IFS=$as_save_IFS
10028
10029 fi
10030 fi
10031 OTOOL64=$ac_cv_prog_OTOOL64
10032 if test -n "$OTOOL64"; then
10033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
10034 $as_echo "$OTOOL64" >&6; }
10035 else
10036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10037 $as_echo "no" >&6; }
10038 fi
10039
10040
10041 fi
10042 if test -z "$ac_cv_prog_OTOOL64"; then
10043   ac_ct_OTOOL64=$OTOOL64
10044   # Extract the first word of "otool64", so it can be a program name with args.
10045 set dummy otool64; ac_word=$2
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10047 $as_echo_n "checking for $ac_word... " >&6; }
10048 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
10049   $as_echo_n "(cached) " >&6
10050 else
10051   if test -n "$ac_ct_OTOOL64"; then
10052   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
10053 else
10054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10055 for as_dir in $PATH
10056 do
10057   IFS=$as_save_IFS
10058   test -z "$as_dir" && as_dir=.
10059     for ac_exec_ext in '' $ac_executable_extensions; do
10060   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10061     ac_cv_prog_ac_ct_OTOOL64="otool64"
10062     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10063     break 2
10064   fi
10065 done
10066   done
10067 IFS=$as_save_IFS
10068
10069 fi
10070 fi
10071 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
10072 if test -n "$ac_ct_OTOOL64"; then
10073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
10074 $as_echo "$ac_ct_OTOOL64" >&6; }
10075 else
10076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10077 $as_echo "no" >&6; }
10078 fi
10079
10080   if test "x$ac_ct_OTOOL64" = x; then
10081     OTOOL64=":"
10082   else
10083     case $cross_compiling:$ac_tool_warned in
10084 yes:)
10085 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10086 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10087 ac_tool_warned=yes ;;
10088 esac
10089     OTOOL64=$ac_ct_OTOOL64
10090   fi
10091 else
10092   OTOOL64="$ac_cv_prog_OTOOL64"
10093 fi
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
10122 $as_echo_n "checking for -single_module linker flag... " >&6; }
10123 if ${lt_cv_apple_cc_single_mod+:} false; then :
10124   $as_echo_n "(cached) " >&6
10125 else
10126   lt_cv_apple_cc_single_mod=no
10127       if test -z "$LT_MULTI_MODULE"; then
10128         # By default we will add the -single_module flag. You can override
10129         # by either setting the environment variable LT_MULTI_MODULE
10130         # non-empty at configure time, or by adding -multi_module to the
10131         # link flags.
10132         rm -rf libconftest.dylib*
10133         echo "int foo(void){return 1;}" > conftest.c
10134         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10135 -dynamiclib -Wl,-single_module conftest.c" >&5
10136         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10137           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10138         _lt_result=$?
10139         # If there is a non-empty error log, and "single_module"
10140         # appears in it, assume the flag caused a linker warning
10141         if test -s conftest.err && $GREP single_module conftest.err; then
10142           cat conftest.err >&5
10143         # Otherwise, if the output was created with a 0 exit code from
10144         # the compiler, it worked.
10145         elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10146           lt_cv_apple_cc_single_mod=yes
10147         else
10148           cat conftest.err >&5
10149         fi
10150         rm -rf libconftest.dylib*
10151         rm -f conftest.*
10152       fi
10153 fi
10154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
10155 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
10156
10157     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
10158 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
10159 if ${lt_cv_ld_exported_symbols_list+:} false; then :
10160   $as_echo_n "(cached) " >&6
10161 else
10162   lt_cv_ld_exported_symbols_list=no
10163       save_LDFLAGS=$LDFLAGS
10164       echo "_main" > conftest.sym
10165       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10166       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10167 /* end confdefs.h.  */
10168
10169 int
10170 main ()
10171 {
10172
10173   ;
10174   return 0;
10175 }
10176 _ACEOF
10177 if ac_fn_c_try_link "$LINENO"; then :
10178   lt_cv_ld_exported_symbols_list=yes
10179 else
10180   lt_cv_ld_exported_symbols_list=no
10181 fi
10182 rm -f core conftest.err conftest.$ac_objext \
10183     conftest$ac_exeext conftest.$ac_ext
10184         LDFLAGS=$save_LDFLAGS
10185
10186 fi
10187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
10188 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
10189
10190     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
10191 $as_echo_n "checking for -force_load linker flag... " >&6; }
10192 if ${lt_cv_ld_force_load+:} false; then :
10193   $as_echo_n "(cached) " >&6
10194 else
10195   lt_cv_ld_force_load=no
10196       cat > conftest.c << _LT_EOF
10197 int forced_loaded() { return 2;}
10198 _LT_EOF
10199       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
10200       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
10201       echo "$AR cru libconftest.a conftest.o" >&5
10202       $AR cru libconftest.a conftest.o 2>&5
10203       echo "$RANLIB libconftest.a" >&5
10204       $RANLIB libconftest.a 2>&5
10205       cat > conftest.c << _LT_EOF
10206 int main() { return 0;}
10207 _LT_EOF
10208       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
10209       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10210       _lt_result=$?
10211       if test -s conftest.err && $GREP force_load conftest.err; then
10212         cat conftest.err >&5
10213       elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10214         lt_cv_ld_force_load=yes
10215       else
10216         cat conftest.err >&5
10217       fi
10218         rm -f conftest.err libconftest.a conftest conftest.c
10219         rm -rf conftest.dSYM
10220
10221 fi
10222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
10223 $as_echo "$lt_cv_ld_force_load" >&6; }
10224     case $host_os in
10225     rhapsody* | darwin1.[012])
10226       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10227     darwin1.*)
10228       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10229     darwin*) # darwin 5.x on
10230       # if running on 10.5 or later, the deployment target defaults
10231       # to the OS version, if on x86, and 10.4, the deployment
10232       # target defaults to 10.4. Don't you love it?
10233       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10234         10.0,*86*-darwin8*|10.0,*-darwin[91]*)
10235           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10236         10.[012][,.]*)
10237           _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10238         10.*)
10239           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10240       esac
10241     ;;
10242   esac
10243     if test yes = "$lt_cv_apple_cc_single_mod"; then
10244       _lt_dar_single_mod='$single_module'
10245     fi
10246     if test yes = "$lt_cv_ld_exported_symbols_list"; then
10247       _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10248     else
10249       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10250     fi
10251     if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10252       _lt_dsymutil='~$DSYMUTIL $lib || :'
10253     else
10254       _lt_dsymutil=
10255     fi
10256     ;;
10257   esac
10258
10259 # func_munge_path_list VARIABLE PATH
10260 # -----------------------------------
10261 # VARIABLE is name of variable containing _space_ separated list of
10262 # directories to be munged by the contents of PATH, which is string
10263 # having a format:
10264 # "DIR[:DIR]:"
10265 #       string "DIR[ DIR]" will be prepended to VARIABLE
10266 # ":DIR[:DIR]"
10267 #       string "DIR[ DIR]" will be appended to VARIABLE
10268 # "DIRP[:DIRP]::[DIRA:]DIRA"
10269 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
10270 #       "DIRA[ DIRA]" will be appended to VARIABLE
10271 # "DIR[:DIR]"
10272 #       VARIABLE will be replaced by "DIR[ DIR]"
10273 func_munge_path_list ()
10274 {
10275     case x$2 in
10276     x)
10277         ;;
10278     *:)
10279         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10280         ;;
10281     x:*)
10282         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10283         ;;
10284     *::*)
10285         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10286         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10287         ;;
10288     *)
10289         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10290         ;;
10291     esac
10292 }
10293
10294 for ac_header in dlfcn.h
10295 do :
10296   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10297 "
10298 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
10299   cat >>confdefs.h <<_ACEOF
10300 #define HAVE_DLFCN_H 1
10301 _ACEOF
10302
10303 fi
10304
10305 done
10306
10307
10308
10309
10310
10311
10312
10313 # Set options
10314
10315
10316
10317         enable_dlopen=no
10318
10319
10320   enable_win32_dll=no
10321
10322
10323             # Check whether --enable-shared was given.
10324 if test "${enable_shared+set}" = set; then :
10325   enableval=$enable_shared; p=${PACKAGE-default}
10326     case $enableval in
10327     yes) enable_shared=yes ;;
10328     no) enable_shared=no ;;
10329     *)
10330       enable_shared=no
10331       # Look at the argument we got.  We use all the common list separators.
10332       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10333       for pkg in $enableval; do
10334         IFS=$lt_save_ifs
10335         if test "X$pkg" = "X$p"; then
10336           enable_shared=yes
10337         fi
10338       done
10339       IFS=$lt_save_ifs
10340       ;;
10341     esac
10342 else
10343   enable_shared=yes
10344 fi
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354   # Check whether --enable-static was given.
10355 if test "${enable_static+set}" = set; then :
10356   enableval=$enable_static; p=${PACKAGE-default}
10357     case $enableval in
10358     yes) enable_static=yes ;;
10359     no) enable_static=no ;;
10360     *)
10361      enable_static=no
10362       # Look at the argument we got.  We use all the common list separators.
10363       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10364       for pkg in $enableval; do
10365         IFS=$lt_save_ifs
10366         if test "X$pkg" = "X$p"; then
10367           enable_static=yes
10368         fi
10369       done
10370       IFS=$lt_save_ifs
10371       ;;
10372     esac
10373 else
10374   enable_static=yes
10375 fi
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386 # Check whether --with-pic was given.
10387 if test "${with_pic+set}" = set; then :
10388   withval=$with_pic; lt_p=${PACKAGE-default}
10389     case $withval in
10390     yes|no) pic_mode=$withval ;;
10391     *)
10392       pic_mode=default
10393       # Look at the argument we got.  We use all the common list separators.
10394       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10395       for lt_pkg in $withval; do
10396         IFS=$lt_save_ifs
10397         if test "X$lt_pkg" = "X$lt_p"; then
10398           pic_mode=yes
10399         fi
10400       done
10401       IFS=$lt_save_ifs
10402       ;;
10403     esac
10404 else
10405   pic_mode=default
10406 fi
10407
10408
10409
10410
10411
10412
10413
10414
10415   # Check whether --enable-fast-install was given.
10416 if test "${enable_fast_install+set}" = set; then :
10417   enableval=$enable_fast_install; p=${PACKAGE-default}
10418     case $enableval in
10419     yes) enable_fast_install=yes ;;
10420     no) enable_fast_install=no ;;
10421     *)
10422       enable_fast_install=no
10423       # Look at the argument we got.  We use all the common list separators.
10424       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10425       for pkg in $enableval; do
10426         IFS=$lt_save_ifs
10427         if test "X$pkg" = "X$p"; then
10428           enable_fast_install=yes
10429         fi
10430       done
10431       IFS=$lt_save_ifs
10432       ;;
10433     esac
10434 else
10435   enable_fast_install=yes
10436 fi
10437
10438
10439
10440
10441
10442
10443
10444
10445   shared_archive_member_spec=
10446 case $host,$enable_shared in
10447 power*-*-aix[5-9]*,yes)
10448   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10449 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
10450
10451 # Check whether --with-aix-soname was given.
10452 if test "${with_aix_soname+set}" = set; then :
10453   withval=$with_aix_soname; case $withval in
10454     aix|svr4|both)
10455       ;;
10456     *)
10457       as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10458       ;;
10459     esac
10460     lt_cv_with_aix_soname=$with_aix_soname
10461 else
10462   if ${lt_cv_with_aix_soname+:} false; then :
10463   $as_echo_n "(cached) " >&6
10464 else
10465   lt_cv_with_aix_soname=aix
10466 fi
10467
10468     with_aix_soname=$lt_cv_with_aix_soname
10469 fi
10470
10471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10472 $as_echo "$with_aix_soname" >&6; }
10473   if test aix != "$with_aix_soname"; then
10474     # For the AIX way of multilib, we name the shared archive member
10475     # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10476     # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10477     # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10478     # the AIX toolchain works better with OBJECT_MODE set (default 32).
10479     if test 64 = "${OBJECT_MODE-32}"; then
10480       shared_archive_member_spec=shr_64
10481     else
10482       shared_archive_member_spec=shr
10483     fi
10484   fi
10485   ;;
10486 *)
10487   with_aix_soname=aix
10488   ;;
10489 esac
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500 # This can be used to rebuild libtool when needed
10501 LIBTOOL_DEPS=$ltmain
10502
10503 # Always use our own libtool.
10504 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535 test -z "$LN_S" && LN_S="ln -s"
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550 if test -n "${ZSH_VERSION+set}"; then
10551    setopt NO_GLOB_SUBST
10552 fi
10553
10554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10555 $as_echo_n "checking for objdir... " >&6; }
10556 if ${lt_cv_objdir+:} false; then :
10557   $as_echo_n "(cached) " >&6
10558 else
10559   rm -f .libs 2>/dev/null
10560 mkdir .libs 2>/dev/null
10561 if test -d .libs; then
10562   lt_cv_objdir=.libs
10563 else
10564   # MS-DOS does not allow filenames that begin with a dot.
10565   lt_cv_objdir=_libs
10566 fi
10567 rmdir .libs 2>/dev/null
10568 fi
10569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10570 $as_echo "$lt_cv_objdir" >&6; }
10571 objdir=$lt_cv_objdir
10572
10573
10574
10575
10576
10577 cat >>confdefs.h <<_ACEOF
10578 #define LT_OBJDIR "$lt_cv_objdir/"
10579 _ACEOF
10580
10581
10582
10583
10584 case $host_os in
10585 aix3*)
10586   # AIX sometimes has problems with the GCC collect2 program.  For some
10587   # reason, if we set the COLLECT_NAMES environment variable, the problems
10588   # vanish in a puff of smoke.
10589   if test set != "${COLLECT_NAMES+set}"; then
10590     COLLECT_NAMES=
10591     export COLLECT_NAMES
10592   fi
10593   ;;
10594 esac
10595
10596 # Global variables:
10597 ofile=libtool
10598 can_build_shared=yes
10599
10600 # All known linkers require a '.a' archive for static linking (except MSVC,
10601 # which needs '.lib').
10602 libext=a
10603
10604 with_gnu_ld=$lt_cv_prog_gnu_ld
10605
10606 old_CC=$CC
10607 old_CFLAGS=$CFLAGS
10608
10609 # Set sane defaults for various variables
10610 test -z "$CC" && CC=cc
10611 test -z "$LTCC" && LTCC=$CC
10612 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10613 test -z "$LD" && LD=ld
10614 test -z "$ac_objext" && ac_objext=o
10615
10616 func_cc_basename $compiler
10617 cc_basename=$func_cc_basename_result
10618
10619
10620 # Only perform the check for file, if the check method requires it
10621 test -z "$MAGIC_CMD" && MAGIC_CMD=file
10622 case $deplibs_check_method in
10623 file_magic*)
10624   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10625     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10626 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10627 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10628   $as_echo_n "(cached) " >&6
10629 else
10630   case $MAGIC_CMD in
10631 [\\/*] |  ?:[\\/]*)
10632   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10633   ;;
10634 *)
10635   lt_save_MAGIC_CMD=$MAGIC_CMD
10636   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10637   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10638   for ac_dir in $ac_dummy; do
10639     IFS=$lt_save_ifs
10640     test -z "$ac_dir" && ac_dir=.
10641     if test -f "$ac_dir/${ac_tool_prefix}file"; then
10642       lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10643       if test -n "$file_magic_test_file"; then
10644         case $deplibs_check_method in
10645         "file_magic "*)
10646           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10647           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10648           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10649             $EGREP "$file_magic_regex" > /dev/null; then
10650             :
10651           else
10652             cat <<_LT_EOF 1>&2
10653
10654 *** Warning: the command libtool uses to detect shared libraries,
10655 *** $file_magic_cmd, produces output that libtool cannot recognize.
10656 *** The result is that libtool may fail to recognize shared libraries
10657 *** as such.  This will affect the creation of libtool libraries that
10658 *** depend on shared libraries, but programs linked with such libtool
10659 *** libraries will work regardless of this problem.  Nevertheless, you
10660 *** may want to report the problem to your system manager and/or to
10661 *** bug-libtool@gnu.org
10662
10663 _LT_EOF
10664           fi ;;
10665         esac
10666       fi
10667       break
10668     fi
10669   done
10670   IFS=$lt_save_ifs
10671   MAGIC_CMD=$lt_save_MAGIC_CMD
10672   ;;
10673 esac
10674 fi
10675
10676 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10677 if test -n "$MAGIC_CMD"; then
10678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10679 $as_echo "$MAGIC_CMD" >&6; }
10680 else
10681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10682 $as_echo "no" >&6; }
10683 fi
10684
10685
10686
10687
10688
10689 if test -z "$lt_cv_path_MAGIC_CMD"; then
10690   if test -n "$ac_tool_prefix"; then
10691     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10692 $as_echo_n "checking for file... " >&6; }
10693 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10694   $as_echo_n "(cached) " >&6
10695 else
10696   case $MAGIC_CMD in
10697 [\\/*] |  ?:[\\/]*)
10698   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10699   ;;
10700 *)
10701   lt_save_MAGIC_CMD=$MAGIC_CMD
10702   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10703   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10704   for ac_dir in $ac_dummy; do
10705     IFS=$lt_save_ifs
10706     test -z "$ac_dir" && ac_dir=.
10707     if test -f "$ac_dir/file"; then
10708       lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10709       if test -n "$file_magic_test_file"; then
10710         case $deplibs_check_method in
10711         "file_magic "*)
10712           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10713           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10714           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10715             $EGREP "$file_magic_regex" > /dev/null; then
10716             :
10717           else
10718             cat <<_LT_EOF 1>&2
10719
10720 *** Warning: the command libtool uses to detect shared libraries,
10721 *** $file_magic_cmd, produces output that libtool cannot recognize.
10722 *** The result is that libtool may fail to recognize shared libraries
10723 *** as such.  This will affect the creation of libtool libraries that
10724 *** depend on shared libraries, but programs linked with such libtool
10725 *** libraries will work regardless of this problem.  Nevertheless, you
10726 *** may want to report the problem to your system manager and/or to
10727 *** bug-libtool@gnu.org
10728
10729 _LT_EOF
10730           fi ;;
10731         esac
10732       fi
10733       break
10734     fi
10735   done
10736   IFS=$lt_save_ifs
10737   MAGIC_CMD=$lt_save_MAGIC_CMD
10738   ;;
10739 esac
10740 fi
10741
10742 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10743 if test -n "$MAGIC_CMD"; then
10744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10745 $as_echo "$MAGIC_CMD" >&6; }
10746 else
10747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10748 $as_echo "no" >&6; }
10749 fi
10750
10751
10752   else
10753     MAGIC_CMD=:
10754   fi
10755 fi
10756
10757   fi
10758   ;;
10759 esac
10760
10761 # Use C for the default configuration in the libtool script
10762
10763 lt_save_CC=$CC
10764 ac_ext=c
10765 ac_cpp='$CPP $CPPFLAGS'
10766 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10767 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10768 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10769
10770
10771 # Source file extension for C test sources.
10772 ac_ext=c
10773
10774 # Object file extension for compiled C test sources.
10775 objext=o
10776 objext=$objext
10777
10778 # Code to be used in simple compile tests
10779 lt_simple_compile_test_code="int some_variable = 0;"
10780
10781 # Code to be used in simple link tests
10782 lt_simple_link_test_code='int main(){return(0);}'
10783
10784
10785
10786
10787
10788
10789
10790 # If no C compiler was specified, use CC.
10791 LTCC=${LTCC-"$CC"}
10792
10793 # If no C compiler flags were specified, use CFLAGS.
10794 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10795
10796 # Allow CC to be a program name with arguments.
10797 compiler=$CC
10798
10799 # Save the default compiler, since it gets overwritten when the other
10800 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10801 compiler_DEFAULT=$CC
10802
10803 # save warnings/boilerplate of simple test code
10804 ac_outfile=conftest.$ac_objext
10805 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10806 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10807 _lt_compiler_boilerplate=`cat conftest.err`
10808 $RM conftest*
10809
10810 ac_outfile=conftest.$ac_objext
10811 echo "$lt_simple_link_test_code" >conftest.$ac_ext
10812 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10813 _lt_linker_boilerplate=`cat conftest.err`
10814 $RM -r conftest*
10815
10816
10817 if test -n "$compiler"; then
10818
10819 lt_prog_compiler_no_builtin_flag=
10820
10821 if test yes = "$GCC"; then
10822   case $cc_basename in
10823   nvcc*)
10824     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10825   *)
10826     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10827   esac
10828
10829   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10830 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10831 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10832   $as_echo_n "(cached) " >&6
10833 else
10834   lt_cv_prog_compiler_rtti_exceptions=no
10835    ac_outfile=conftest.$ac_objext
10836    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10837    lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
10838    # Insert the option either (1) after the last *FLAGS variable, or
10839    # (2) before a word containing "conftest.", or (3) at the end.
10840    # Note that $ac_compile itself does not contain backslashes and begins
10841    # with a dollar sign (not a hyphen), so the echo should work correctly.
10842    # The option is referenced via a variable to avoid confusing sed.
10843    lt_compile=`echo "$ac_compile" | $SED \
10844    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10845    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10846    -e 's:$: $lt_compiler_flag:'`
10847    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10848    (eval "$lt_compile" 2>conftest.err)
10849    ac_status=$?
10850    cat conftest.err >&5
10851    echo "$as_me:$LINENO: \$? = $ac_status" >&5
10852    if (exit $ac_status) && test -s "$ac_outfile"; then
10853      # The compiler can only warn and ignore the option if not recognized
10854      # So say no if there are warnings other than the usual output.
10855      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10856      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10857      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10858        lt_cv_prog_compiler_rtti_exceptions=yes
10859      fi
10860    fi
10861    $RM conftest*
10862
10863 fi
10864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10865 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10866
10867 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10868     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10869 else
10870     :
10871 fi
10872
10873 fi
10874
10875
10876
10877
10878
10879
10880   lt_prog_compiler_wl=
10881 lt_prog_compiler_pic=
10882 lt_prog_compiler_static=
10883
10884
10885   if test yes = "$GCC"; then
10886     lt_prog_compiler_wl='-Wl,'
10887     lt_prog_compiler_static='-static'
10888
10889     case $host_os in
10890       aix*)
10891       # All AIX code is PIC.
10892       if test ia64 = "$host_cpu"; then
10893         # AIX 5 now supports IA64 processor
10894         lt_prog_compiler_static='-Bstatic'
10895       fi
10896       lt_prog_compiler_pic='-fPIC'
10897       ;;
10898
10899     amigaos*)
10900       case $host_cpu in
10901       powerpc)
10902             # see comment about AmigaOS4 .so support
10903             lt_prog_compiler_pic='-fPIC'
10904         ;;
10905       m68k)
10906             # FIXME: we need at least 68020 code to build shared libraries, but
10907             # adding the '-m68020' flag to GCC prevents building anything better,
10908             # like '-m68040'.
10909             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10910         ;;
10911       esac
10912       ;;
10913
10914     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10915       # PIC is the default for these OSes.
10916       ;;
10917
10918     mingw* | cygwin* | pw32* | os2* | cegcc*)
10919       # This hack is so that the source file can tell whether it is being
10920       # built for inclusion in a dll (and should export symbols for example).
10921       # Although the cygwin gcc ignores -fPIC, still need this for old-style
10922       # (--disable-auto-import) libraries
10923       lt_prog_compiler_pic='-DDLL_EXPORT'
10924       case $host_os in
10925       os2*)
10926         lt_prog_compiler_static='$wl-static'
10927         ;;
10928       esac
10929       ;;
10930
10931     darwin* | rhapsody*)
10932       # PIC is the default on this platform
10933       # Common symbols not allowed in MH_DYLIB files
10934       lt_prog_compiler_pic='-fno-common'
10935       ;;
10936
10937     haiku*)
10938       # PIC is the default for Haiku.
10939       # The "-static" flag exists, but is broken.
10940       lt_prog_compiler_static=
10941       ;;
10942
10943     hpux*)
10944       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10945       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10946       # sets the default TLS model and affects inlining.
10947       case $host_cpu in
10948       hppa*64*)
10949         # +Z the default
10950         ;;
10951       *)
10952         lt_prog_compiler_pic='-fPIC'
10953         ;;
10954       esac
10955       ;;
10956
10957     interix[3-9]*)
10958       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10959       # Instead, we relocate shared libraries at runtime.
10960       ;;
10961
10962     msdosdjgpp*)
10963       # Just because we use GCC doesn't mean we suddenly get shared libraries
10964       # on systems that don't support them.
10965       lt_prog_compiler_can_build_shared=no
10966       enable_shared=no
10967       ;;
10968
10969     *nto* | *qnx*)
10970       # QNX uses GNU C++, but need to define -shared option too, otherwise
10971       # it will coredump.
10972       lt_prog_compiler_pic='-fPIC -shared'
10973       ;;
10974
10975     sysv4*MP*)
10976       if test -d /usr/nec; then
10977         lt_prog_compiler_pic=-Kconform_pic
10978       fi
10979       ;;
10980
10981     *)
10982       lt_prog_compiler_pic='-fPIC'
10983       ;;
10984     esac
10985
10986     case $cc_basename in
10987     nvcc*) # Cuda Compiler Driver 2.2
10988       lt_prog_compiler_wl='-Xlinker '
10989       if test -n "$lt_prog_compiler_pic"; then
10990         lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
10991       fi
10992       ;;
10993     esac
10994   else
10995     # PORTME Check for flag to pass linker flags through the system compiler.
10996     case $host_os in
10997     aix*)
10998       lt_prog_compiler_wl='-Wl,'
10999       if test ia64 = "$host_cpu"; then
11000         # AIX 5 now supports IA64 processor
11001         lt_prog_compiler_static='-Bstatic'
11002       else
11003         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
11004       fi
11005       ;;
11006
11007     darwin* | rhapsody*)
11008       # PIC is the default on this platform
11009       # Common symbols not allowed in MH_DYLIB files
11010       lt_prog_compiler_pic='-fno-common'
11011       case $cc_basename in
11012       nagfor*)
11013         # NAG Fortran compiler
11014         lt_prog_compiler_wl='-Wl,-Wl,,'
11015         lt_prog_compiler_pic='-PIC'
11016         lt_prog_compiler_static='-Bstatic'
11017         ;;
11018       esac
11019       ;;
11020
11021     mingw* | cygwin* | pw32* | os2* | cegcc*)
11022       # This hack is so that the source file can tell whether it is being
11023       # built for inclusion in a dll (and should export symbols for example).
11024       lt_prog_compiler_pic='-DDLL_EXPORT'
11025       case $host_os in
11026       os2*)
11027         lt_prog_compiler_static='$wl-static'
11028         ;;
11029       esac
11030       ;;
11031
11032     hpux9* | hpux10* | hpux11*)
11033       lt_prog_compiler_wl='-Wl,'
11034       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
11035       # not for PA HP-UX.
11036       case $host_cpu in
11037       hppa*64*|ia64*)
11038         # +Z the default
11039         ;;
11040       *)
11041         lt_prog_compiler_pic='+Z'
11042         ;;
11043       esac
11044       # Is there a better lt_prog_compiler_static that works with the bundled CC?
11045       lt_prog_compiler_static='$wl-a ${wl}archive'
11046       ;;
11047
11048     irix5* | irix6* | nonstopux*)
11049       lt_prog_compiler_wl='-Wl,'
11050       # PIC (with -KPIC) is the default.
11051       lt_prog_compiler_static='-non_shared'
11052       ;;
11053
11054     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11055       case $cc_basename in
11056       # old Intel for x86_64, which still supported -KPIC.
11057       ecc*)
11058         lt_prog_compiler_wl='-Wl,'
11059         lt_prog_compiler_pic='-KPIC'
11060         lt_prog_compiler_static='-static'
11061         ;;
11062       # icc used to be incompatible with GCC.
11063       # ICC 10 doesn't accept -KPIC any more.
11064       icc* | ifort*)
11065         lt_prog_compiler_wl='-Wl,'
11066         lt_prog_compiler_pic='-fPIC'
11067         lt_prog_compiler_static='-static'
11068         ;;
11069       # Lahey Fortran 8.1.
11070       lf95*)
11071         lt_prog_compiler_wl='-Wl,'
11072         lt_prog_compiler_pic='--shared'
11073         lt_prog_compiler_static='--static'
11074         ;;
11075       nagfor*)
11076         # NAG Fortran compiler
11077         lt_prog_compiler_wl='-Wl,-Wl,,'
11078         lt_prog_compiler_pic='-PIC'
11079         lt_prog_compiler_static='-Bstatic'
11080         ;;
11081       tcc*)
11082         # Fabrice Bellard et al's Tiny C Compiler
11083         lt_prog_compiler_wl='-Wl,'
11084         lt_prog_compiler_pic='-fPIC'
11085         lt_prog_compiler_static='-static'
11086         ;;
11087       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
11088         # Portland Group compilers (*not* the Pentium gcc compiler,
11089         # which looks to be a dead project)
11090         lt_prog_compiler_wl='-Wl,'
11091         lt_prog_compiler_pic='-fpic'
11092         lt_prog_compiler_static='-Bstatic'
11093         ;;
11094       ccc*)
11095         lt_prog_compiler_wl='-Wl,'
11096         # All Alpha code is PIC.
11097         lt_prog_compiler_static='-non_shared'
11098         ;;
11099       xl* | bgxl* | bgf* | mpixl*)
11100         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
11101         lt_prog_compiler_wl='-Wl,'
11102         lt_prog_compiler_pic='-qpic'
11103         lt_prog_compiler_static='-qstaticlink'
11104         ;;
11105       *)
11106         case `$CC -V 2>&1 | sed 5q` in
11107         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
11108           # Sun Fortran 8.3 passes all unrecognized flags to the linker
11109           lt_prog_compiler_pic='-KPIC'
11110           lt_prog_compiler_static='-Bstatic'
11111           lt_prog_compiler_wl=''
11112           ;;
11113         *Sun\ F* | *Sun*Fortran*)
11114           lt_prog_compiler_pic='-KPIC'
11115           lt_prog_compiler_static='-Bstatic'
11116           lt_prog_compiler_wl='-Qoption ld '
11117           ;;
11118         *Sun\ C*)
11119           # Sun C 5.9
11120           lt_prog_compiler_pic='-KPIC'
11121           lt_prog_compiler_static='-Bstatic'
11122           lt_prog_compiler_wl='-Wl,'
11123           ;;
11124         *Intel*\ [CF]*Compiler*)
11125           lt_prog_compiler_wl='-Wl,'
11126           lt_prog_compiler_pic='-fPIC'
11127           lt_prog_compiler_static='-static'
11128           ;;
11129         *Portland\ Group*)
11130           lt_prog_compiler_wl='-Wl,'
11131           lt_prog_compiler_pic='-fpic'
11132           lt_prog_compiler_static='-Bstatic'
11133           ;;
11134         esac
11135         ;;
11136       esac
11137       ;;
11138
11139     newsos6)
11140       lt_prog_compiler_pic='-KPIC'
11141       lt_prog_compiler_static='-Bstatic'
11142       ;;
11143
11144     *nto* | *qnx*)
11145       # QNX uses GNU C++, but need to define -shared option too, otherwise
11146       # it will coredump.
11147       lt_prog_compiler_pic='-fPIC -shared'
11148       ;;
11149
11150     osf3* | osf4* | osf5*)
11151       lt_prog_compiler_wl='-Wl,'
11152       # All OSF/1 code is PIC.
11153       lt_prog_compiler_static='-non_shared'
11154       ;;
11155
11156     rdos*)
11157       lt_prog_compiler_static='-non_shared'
11158       ;;
11159
11160     solaris*)
11161       lt_prog_compiler_pic='-KPIC'
11162       lt_prog_compiler_static='-Bstatic'
11163       case $cc_basename in
11164       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
11165         lt_prog_compiler_wl='-Qoption ld ';;
11166       *)
11167         lt_prog_compiler_wl='-Wl,';;
11168       esac
11169       ;;
11170
11171     sunos4*)
11172       lt_prog_compiler_wl='-Qoption ld '
11173       lt_prog_compiler_pic='-PIC'
11174       lt_prog_compiler_static='-Bstatic'
11175       ;;
11176
11177     sysv4 | sysv4.2uw2* | sysv4.3*)
11178       lt_prog_compiler_wl='-Wl,'
11179       lt_prog_compiler_pic='-KPIC'
11180       lt_prog_compiler_static='-Bstatic'
11181       ;;
11182
11183     sysv4*MP*)
11184       if test -d /usr/nec; then
11185         lt_prog_compiler_pic='-Kconform_pic'
11186         lt_prog_compiler_static='-Bstatic'
11187       fi
11188       ;;
11189
11190     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11191       lt_prog_compiler_wl='-Wl,'
11192       lt_prog_compiler_pic='-KPIC'
11193       lt_prog_compiler_static='-Bstatic'
11194       ;;
11195
11196     unicos*)
11197       lt_prog_compiler_wl='-Wl,'
11198       lt_prog_compiler_can_build_shared=no
11199       ;;
11200
11201     uts4*)
11202       lt_prog_compiler_pic='-pic'
11203       lt_prog_compiler_static='-Bstatic'
11204       ;;
11205
11206     *)
11207       lt_prog_compiler_can_build_shared=no
11208       ;;
11209     esac
11210   fi
11211
11212 case $host_os in
11213   # For platforms that do not support PIC, -DPIC is meaningless:
11214   *djgpp*)
11215     lt_prog_compiler_pic=
11216     ;;
11217   *)
11218     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11219     ;;
11220 esac
11221
11222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11223 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
11224 if ${lt_cv_prog_compiler_pic+:} false; then :
11225   $as_echo_n "(cached) " >&6
11226 else
11227   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11228 fi
11229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11230 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
11231 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11232
11233 #
11234 # Check to make sure the PIC flag actually works.
11235 #
11236 if test -n "$lt_prog_compiler_pic"; then
11237   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
11238 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
11239 if ${lt_cv_prog_compiler_pic_works+:} false; then :
11240   $as_echo_n "(cached) " >&6
11241 else
11242   lt_cv_prog_compiler_pic_works=no
11243    ac_outfile=conftest.$ac_objext
11244    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11245    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
11246    # Insert the option either (1) after the last *FLAGS variable, or
11247    # (2) before a word containing "conftest.", or (3) at the end.
11248    # Note that $ac_compile itself does not contain backslashes and begins
11249    # with a dollar sign (not a hyphen), so the echo should work correctly.
11250    # The option is referenced via a variable to avoid confusing sed.
11251    lt_compile=`echo "$ac_compile" | $SED \
11252    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11253    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11254    -e 's:$: $lt_compiler_flag:'`
11255    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11256    (eval "$lt_compile" 2>conftest.err)
11257    ac_status=$?
11258    cat conftest.err >&5
11259    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11260    if (exit $ac_status) && test -s "$ac_outfile"; then
11261      # The compiler can only warn and ignore the option if not recognized
11262      # So say no if there are warnings other than the usual output.
11263      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11264      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11265      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11266        lt_cv_prog_compiler_pic_works=yes
11267      fi
11268    fi
11269    $RM conftest*
11270
11271 fi
11272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
11273 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
11274
11275 if test yes = "$lt_cv_prog_compiler_pic_works"; then
11276     case $lt_prog_compiler_pic in
11277      "" | " "*) ;;
11278      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11279      esac
11280 else
11281     lt_prog_compiler_pic=
11282      lt_prog_compiler_can_build_shared=no
11283 fi
11284
11285 fi
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297 #
11298 # Check to make sure the static flag actually works.
11299 #
11300 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11302 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11303 if ${lt_cv_prog_compiler_static_works+:} false; then :
11304   $as_echo_n "(cached) " >&6
11305 else
11306   lt_cv_prog_compiler_static_works=no
11307    save_LDFLAGS=$LDFLAGS
11308    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11309    echo "$lt_simple_link_test_code" > conftest.$ac_ext
11310    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11311      # The linker can only warn and ignore the option if not recognized
11312      # So say no if there are warnings
11313      if test -s conftest.err; then
11314        # Append any errors to the config.log.
11315        cat conftest.err 1>&5
11316        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11317        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11318        if diff conftest.exp conftest.er2 >/dev/null; then
11319          lt_cv_prog_compiler_static_works=yes
11320        fi
11321      else
11322        lt_cv_prog_compiler_static_works=yes
11323      fi
11324    fi
11325    $RM -r conftest*
11326    LDFLAGS=$save_LDFLAGS
11327
11328 fi
11329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11330 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
11331
11332 if test yes = "$lt_cv_prog_compiler_static_works"; then
11333     :
11334 else
11335     lt_prog_compiler_static=
11336 fi
11337
11338
11339
11340
11341
11342
11343
11344   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11345 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11346 if ${lt_cv_prog_compiler_c_o+:} false; then :
11347   $as_echo_n "(cached) " >&6
11348 else
11349   lt_cv_prog_compiler_c_o=no
11350    $RM -r conftest 2>/dev/null
11351    mkdir conftest
11352    cd conftest
11353    mkdir out
11354    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11355
11356    lt_compiler_flag="-o out/conftest2.$ac_objext"
11357    # Insert the option either (1) after the last *FLAGS variable, or
11358    # (2) before a word containing "conftest.", or (3) at the end.
11359    # Note that $ac_compile itself does not contain backslashes and begins
11360    # with a dollar sign (not a hyphen), so the echo should work correctly.
11361    lt_compile=`echo "$ac_compile" | $SED \
11362    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11363    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11364    -e 's:$: $lt_compiler_flag:'`
11365    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11366    (eval "$lt_compile" 2>out/conftest.err)
11367    ac_status=$?
11368    cat out/conftest.err >&5
11369    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11370    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11371    then
11372      # The compiler can only warn and ignore the option if not recognized
11373      # So say no if there are warnings
11374      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11375      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11376      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11377        lt_cv_prog_compiler_c_o=yes
11378      fi
11379    fi
11380    chmod u+w . 2>&5
11381    $RM conftest*
11382    # SGI C++ compiler will create directory out/ii_files/ for
11383    # template instantiation
11384    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11385    $RM out/* && rmdir out
11386    cd ..
11387    $RM -r conftest
11388    $RM conftest*
11389
11390 fi
11391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11392 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11393
11394
11395
11396
11397
11398
11399   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11400 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11401 if ${lt_cv_prog_compiler_c_o+:} false; then :
11402   $as_echo_n "(cached) " >&6
11403 else
11404   lt_cv_prog_compiler_c_o=no
11405    $RM -r conftest 2>/dev/null
11406    mkdir conftest
11407    cd conftest
11408    mkdir out
11409    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11410
11411    lt_compiler_flag="-o out/conftest2.$ac_objext"
11412    # Insert the option either (1) after the last *FLAGS variable, or
11413    # (2) before a word containing "conftest.", or (3) at the end.
11414    # Note that $ac_compile itself does not contain backslashes and begins
11415    # with a dollar sign (not a hyphen), so the echo should work correctly.
11416    lt_compile=`echo "$ac_compile" | $SED \
11417    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11418    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11419    -e 's:$: $lt_compiler_flag:'`
11420    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11421    (eval "$lt_compile" 2>out/conftest.err)
11422    ac_status=$?
11423    cat out/conftest.err >&5
11424    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11425    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11426    then
11427      # The compiler can only warn and ignore the option if not recognized
11428      # So say no if there are warnings
11429      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11430      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11431      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11432        lt_cv_prog_compiler_c_o=yes
11433      fi
11434    fi
11435    chmod u+w . 2>&5
11436    $RM conftest*
11437    # SGI C++ compiler will create directory out/ii_files/ for
11438    # template instantiation
11439    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11440    $RM out/* && rmdir out
11441    cd ..
11442    $RM -r conftest
11443    $RM conftest*
11444
11445 fi
11446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11447 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11448
11449
11450
11451
11452 hard_links=nottested
11453 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11454   # do not overwrite the value of need_locks provided by the user
11455   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11456 $as_echo_n "checking if we can lock with hard links... " >&6; }
11457   hard_links=yes
11458   $RM conftest*
11459   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11460   touch conftest.a
11461   ln conftest.a conftest.b 2>&5 || hard_links=no
11462   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11464 $as_echo "$hard_links" >&6; }
11465   if test no = "$hard_links"; then
11466     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11467 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11468     need_locks=warn
11469   fi
11470 else
11471   need_locks=no
11472 fi
11473
11474
11475
11476
11477
11478
11479   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11480 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11481
11482   runpath_var=
11483   allow_undefined_flag=
11484   always_export_symbols=no
11485   archive_cmds=
11486   archive_expsym_cmds=
11487   compiler_needs_object=no
11488   enable_shared_with_static_runtimes=no
11489   export_dynamic_flag_spec=
11490   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11491   hardcode_automatic=no
11492   hardcode_direct=no
11493   hardcode_direct_absolute=no
11494   hardcode_libdir_flag_spec=
11495   hardcode_libdir_separator=
11496   hardcode_minus_L=no
11497   hardcode_shlibpath_var=unsupported
11498   inherit_rpath=no
11499   link_all_deplibs=unknown
11500   module_cmds=
11501   module_expsym_cmds=
11502   old_archive_from_new_cmds=
11503   old_archive_from_expsyms_cmds=
11504   thread_safe_flag_spec=
11505   whole_archive_flag_spec=
11506   # include_expsyms should be a list of space-separated symbols to be *always*
11507   # included in the symbol list
11508   include_expsyms=
11509   # exclude_expsyms can be an extended regexp of symbols to exclude
11510   # it will be wrapped by ' (' and ')$', so one must not match beginning or
11511   # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11512   # as well as any symbol that contains 'd'.
11513   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11514   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11515   # platforms (ab)use it in PIC code, but their linkers get confused if
11516   # the symbol is explicitly referenced.  Since portable code cannot
11517   # rely on this symbol name, it's probably fine to never include it in
11518   # preloaded symbol tables.
11519   # Exclude shared library initialization/finalization symbols.
11520   extract_expsyms_cmds=
11521
11522   case $host_os in
11523   cygwin* | mingw* | pw32* | cegcc*)
11524     # FIXME: the MSVC++ port hasn't been tested in a loooong time
11525     # When not using gcc, we currently assume that we are using
11526     # Microsoft Visual C++.
11527     if test yes != "$GCC"; then
11528       with_gnu_ld=no
11529     fi
11530     ;;
11531   interix*)
11532     # we just hope/assume this is gcc and not c89 (= MSVC++)
11533     with_gnu_ld=yes
11534     ;;
11535   openbsd* | bitrig*)
11536     with_gnu_ld=no
11537     ;;
11538   esac
11539
11540   ld_shlibs=yes
11541
11542   # On some targets, GNU ld is compatible enough with the native linker
11543   # that we're better off using the native interface for both.
11544   lt_use_gnu_ld_interface=no
11545   if test yes = "$with_gnu_ld"; then
11546     case $host_os in
11547       aix*)
11548         # The AIX port of GNU ld has always aspired to compatibility
11549         # with the native linker.  However, as the warning in the GNU ld
11550         # block says, versions before 2.19.5* couldn't really create working
11551         # shared libraries, regardless of the interface used.
11552         case `$LD -v 2>&1` in
11553           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11554           *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11555           *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11556           *)
11557             lt_use_gnu_ld_interface=yes
11558             ;;
11559         esac
11560         ;;
11561       *)
11562         lt_use_gnu_ld_interface=yes
11563         ;;
11564     esac
11565   fi
11566
11567   if test yes = "$lt_use_gnu_ld_interface"; then
11568     # If archive_cmds runs LD, not CC, wlarc should be empty
11569     wlarc='$wl'
11570
11571     # Set some defaults for GNU ld with shared library support. These
11572     # are reset later if shared libraries are not supported. Putting them
11573     # here allows them to be overridden if necessary.
11574     runpath_var=LD_RUN_PATH
11575     hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11576     export_dynamic_flag_spec='$wl--export-dynamic'
11577     # ancient GNU ld didn't support --whole-archive et. al.
11578     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11579       whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11580     else
11581       whole_archive_flag_spec=
11582     fi
11583     supports_anon_versioning=no
11584     case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11585       *GNU\ gold*) supports_anon_versioning=yes ;;
11586       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11587       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11588       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11589       *\ 2.11.*) ;; # other 2.11 versions
11590       *) supports_anon_versioning=yes ;;
11591     esac
11592
11593     # See if GNU ld supports shared libraries.
11594     case $host_os in
11595     aix[3-9]*)
11596       # On AIX/PPC, the GNU linker is very broken
11597       if test ia64 != "$host_cpu"; then
11598         ld_shlibs=no
11599         cat <<_LT_EOF 1>&2
11600
11601 *** Warning: the GNU linker, at least up to release 2.19, is reported
11602 *** to be unable to reliably create shared libraries on AIX.
11603 *** Therefore, libtool is disabling shared libraries support.  If you
11604 *** really care for shared libraries, you may want to install binutils
11605 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11606 *** You will then need to restart the configuration process.
11607
11608 _LT_EOF
11609       fi
11610       ;;
11611
11612     amigaos*)
11613       case $host_cpu in
11614       powerpc)
11615             # see comment about AmigaOS4 .so support
11616             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11617             archive_expsym_cmds=''
11618         ;;
11619       m68k)
11620             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)'
11621             hardcode_libdir_flag_spec='-L$libdir'
11622             hardcode_minus_L=yes
11623         ;;
11624       esac
11625       ;;
11626
11627     beos*)
11628       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11629         allow_undefined_flag=unsupported
11630         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11631         # support --undefined.  This deserves some investigation.  FIXME
11632         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11633       else
11634         ld_shlibs=no
11635       fi
11636       ;;
11637
11638     cygwin* | mingw* | pw32* | cegcc*)
11639       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11640       # as there is no search path for DLLs.
11641       hardcode_libdir_flag_spec='-L$libdir'
11642       export_dynamic_flag_spec='$wl--export-all-symbols'
11643       allow_undefined_flag=unsupported
11644       always_export_symbols=no
11645       enable_shared_with_static_runtimes=yes
11646       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'
11647       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11648
11649       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11650         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11651         # If the export-symbols file already is a .def file, use it as
11652         # is; otherwise, prepend EXPORTS...
11653         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11654           cp $export_symbols $output_objdir/$soname.def;
11655         else
11656           echo EXPORTS > $output_objdir/$soname.def;
11657           cat $export_symbols >> $output_objdir/$soname.def;
11658         fi~
11659         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11660       else
11661         ld_shlibs=no
11662       fi
11663       ;;
11664
11665     haiku*)
11666       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11667       link_all_deplibs=yes
11668       ;;
11669
11670     os2*)
11671       hardcode_libdir_flag_spec='-L$libdir'
11672       hardcode_minus_L=yes
11673       allow_undefined_flag=unsupported
11674       shrext_cmds=.dll
11675       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11676         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11677         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11678         $ECHO EXPORTS >> $output_objdir/$libname.def~
11679         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11680         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11681         emximp -o $lib $output_objdir/$libname.def'
11682       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11683         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11684         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11685         $ECHO EXPORTS >> $output_objdir/$libname.def~
11686         prefix_cmds="$SED"~
11687         if test EXPORTS = "`$SED 1q $export_symbols`"; then
11688           prefix_cmds="$prefix_cmds -e 1d";
11689         fi~
11690         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11691         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11692         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11693         emximp -o $lib $output_objdir/$libname.def'
11694       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11695       enable_shared_with_static_runtimes=yes
11696       ;;
11697
11698     interix[3-9]*)
11699       hardcode_direct=no
11700       hardcode_shlibpath_var=no
11701       hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11702       export_dynamic_flag_spec='$wl-E'
11703       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11704       # Instead, shared libraries are loaded at an image base (0x10000000 by
11705       # default) and relocated if they conflict, which is a slow very memory
11706       # consuming and fragmenting process.  To avoid this, we pick a random,
11707       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11708       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11709       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11710       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'
11711       ;;
11712
11713     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11714       tmp_diet=no
11715       if test linux-dietlibc = "$host_os"; then
11716         case $cc_basename in
11717           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
11718         esac
11719       fi
11720       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11721          && test no = "$tmp_diet"
11722       then
11723         tmp_addflag=' $pic_flag'
11724         tmp_sharedflag='-shared'
11725         case $cc_basename,$host_cpu in
11726         pgcc*)                          # Portland Group C compiler
11727           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'
11728           tmp_addflag=' $pic_flag'
11729           ;;
11730         pgf77* | pgf90* | pgf95* | pgfortran*)
11731                                         # Portland Group f77 and f90 compilers
11732           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'
11733           tmp_addflag=' $pic_flag -Mnomain' ;;
11734         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
11735           tmp_addflag=' -i_dynamic' ;;
11736         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
11737           tmp_addflag=' -i_dynamic -nofor_main' ;;
11738         ifc* | ifort*)                  # Intel Fortran compiler
11739           tmp_addflag=' -nofor_main' ;;
11740         lf95*)                          # Lahey Fortran 8.1
11741           whole_archive_flag_spec=
11742           tmp_sharedflag='--shared' ;;
11743         nagfor*)                        # NAGFOR 5.3
11744           tmp_sharedflag='-Wl,-shared' ;;
11745         xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11746           tmp_sharedflag='-qmkshrobj'
11747           tmp_addflag= ;;
11748         nvcc*)  # Cuda Compiler Driver 2.2
11749           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'
11750           compiler_needs_object=yes
11751           ;;
11752         esac
11753         case `$CC -V 2>&1 | sed 5q` in
11754         *Sun\ C*)                       # Sun C 5.9
11755           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'
11756           compiler_needs_object=yes
11757           tmp_sharedflag='-G' ;;
11758         *Sun\ F*)                       # Sun Fortran 8.3
11759           tmp_sharedflag='-G' ;;
11760         esac
11761         archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11762
11763         if test yes = "$supports_anon_versioning"; then
11764           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11765             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11766             echo "local: *; };" >> $output_objdir/$libname.ver~
11767             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11768         fi
11769
11770         case $cc_basename in
11771         tcc*)
11772           export_dynamic_flag_spec='-rdynamic'
11773           ;;
11774         xlf* | bgf* | bgxlf* | mpixlf*)
11775           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11776           whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11777           hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11778           archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11779           if test yes = "$supports_anon_versioning"; then
11780             archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11781               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11782               echo "local: *; };" >> $output_objdir/$libname.ver~
11783               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11784           fi
11785           ;;
11786         esac
11787       else
11788         ld_shlibs=no
11789       fi
11790       ;;
11791
11792     netbsd*)
11793       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11794         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11795         wlarc=
11796       else
11797         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11798         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11799       fi
11800       ;;
11801
11802     solaris*)
11803       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11804         ld_shlibs=no
11805         cat <<_LT_EOF 1>&2
11806
11807 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
11808 *** create shared libraries on Solaris systems.  Therefore, libtool
11809 *** is disabling shared libraries support.  We urge you to upgrade GNU
11810 *** binutils to release 2.9.1 or newer.  Another option is to modify
11811 *** your PATH or compiler configuration so that the native linker is
11812 *** used, and then restart.
11813
11814 _LT_EOF
11815       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11816         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11817         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11818       else
11819         ld_shlibs=no
11820       fi
11821       ;;
11822
11823     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11824       case `$LD -v 2>&1` in
11825         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11826         ld_shlibs=no
11827         cat <<_LT_EOF 1>&2
11828
11829 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11830 *** reliably create shared libraries on SCO systems.  Therefore, libtool
11831 *** is disabling shared libraries support.  We urge you to upgrade GNU
11832 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11833 *** your PATH or compiler configuration so that the native linker is
11834 *** used, and then restart.
11835
11836 _LT_EOF
11837         ;;
11838         *)
11839           # For security reasons, it is highly recommended that you always
11840           # use absolute paths for naming shared libraries, and exclude the
11841           # DT_RUNPATH tag from executables and libraries.  But doing so
11842           # requires that you compile everything twice, which is a pain.
11843           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11844             hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11845             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11846             archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11847           else
11848             ld_shlibs=no
11849           fi
11850         ;;
11851       esac
11852       ;;
11853
11854     sunos4*)
11855       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11856       wlarc=
11857       hardcode_direct=yes
11858       hardcode_shlibpath_var=no
11859       ;;
11860
11861     *)
11862       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11863         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11864         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11865       else
11866         ld_shlibs=no
11867       fi
11868       ;;
11869     esac
11870
11871     if test no = "$ld_shlibs"; then
11872       runpath_var=
11873       hardcode_libdir_flag_spec=
11874       export_dynamic_flag_spec=
11875       whole_archive_flag_spec=
11876     fi
11877   else
11878     # PORTME fill in a description of your system's linker (not GNU ld)
11879     case $host_os in
11880     aix3*)
11881       allow_undefined_flag=unsupported
11882       always_export_symbols=yes
11883       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'
11884       # Note: this linker hardcodes the directories in LIBPATH if there
11885       # are no directories specified by -L.
11886       hardcode_minus_L=yes
11887       if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11888         # Neither direct hardcoding nor static linking is supported with a
11889         # broken collect2.
11890         hardcode_direct=unsupported
11891       fi
11892       ;;
11893
11894     aix[4-9]*)
11895       if test ia64 = "$host_cpu"; then
11896         # On IA64, the linker does run time linking by default, so we don't
11897         # have to do anything special.
11898         aix_use_runtimelinking=no
11899         exp_sym_flag='-Bexport'
11900         no_entry_flag=
11901       else
11902         # If we're using GNU nm, then we don't want the "-C" option.
11903         # -C means demangle to GNU nm, but means don't demangle to AIX nm.
11904         # Without the "-l" option, or with the "-B" option, AIX nm treats
11905         # weak defined symbols like other global defined symbols, whereas
11906         # GNU nm marks them as "W".
11907         # While the 'weak' keyword is ignored in the Export File, we need
11908         # it in the Import File for the 'aix-soname' feature, so we have
11909         # to replace the "-B" option with "-P" for AIX nm.
11910         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11911           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'
11912         else
11913           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'
11914         fi
11915         aix_use_runtimelinking=no
11916
11917         # Test if we are trying to use run time linking or normal
11918         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
11919         # have runtime linking enabled, and use it for executables.
11920         # For shared libraries, we enable/disable runtime linking
11921         # depending on the kind of the shared library created -
11922         # when "with_aix_soname,aix_use_runtimelinking" is:
11923         # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
11924         # "aix,yes"  lib.so          shared, rtl:yes, for executables
11925         #            lib.a           static archive
11926         # "both,no"  lib.so.V(shr.o) shared, rtl:yes
11927         #            lib.a(lib.so.V) shared, rtl:no,  for executables
11928         # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11929         #            lib.a(lib.so.V) shared, rtl:no
11930         # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
11931         #            lib.a           static archive
11932         case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11933           for ld_flag in $LDFLAGS; do
11934           if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11935             aix_use_runtimelinking=yes
11936             break
11937           fi
11938           done
11939           if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11940             # With aix-soname=svr4, we create the lib.so.V shared archives only,
11941             # so we don't have lib.a shared libs to link our executables.
11942             # We have to force runtime linking in this case.
11943             aix_use_runtimelinking=yes
11944             LDFLAGS="$LDFLAGS -Wl,-brtl"
11945           fi
11946           ;;
11947         esac
11948
11949         exp_sym_flag='-bexport'
11950         no_entry_flag='-bnoentry'
11951       fi
11952
11953       # When large executables or shared objects are built, AIX ld can
11954       # have problems creating the table of contents.  If linking a library
11955       # or program results in "error TOC overflow" add -mminimal-toc to
11956       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11957       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11958
11959       archive_cmds=''
11960       hardcode_direct=yes
11961       hardcode_direct_absolute=yes
11962       hardcode_libdir_separator=':'
11963       link_all_deplibs=yes
11964       file_list_spec='$wl-f,'
11965       case $with_aix_soname,$aix_use_runtimelinking in
11966       aix,*) ;; # traditional, no import file
11967       svr4,* | *,yes) # use import file
11968         # The Import File defines what to hardcode.
11969         hardcode_direct=no
11970         hardcode_direct_absolute=no
11971         ;;
11972       esac
11973
11974       if test yes = "$GCC"; then
11975         case $host_os in aix4.[012]|aix4.[012].*)
11976         # We only want to do this on AIX 4.2 and lower, the check
11977         # below for broken collect2 doesn't work under 4.3+
11978           collect2name=`$CC -print-prog-name=collect2`
11979           if test -f "$collect2name" &&
11980            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
11981           then
11982           # We have reworked collect2
11983           :
11984           else
11985           # We have old collect2
11986           hardcode_direct=unsupported
11987           # It fails to find uninstalled libraries when the uninstalled
11988           # path is not listed in the libpath.  Setting hardcode_minus_L
11989           # to unsupported forces relinking
11990           hardcode_minus_L=yes
11991           hardcode_libdir_flag_spec='-L$libdir'
11992           hardcode_libdir_separator=
11993           fi
11994           ;;
11995         esac
11996         shared_flag='-shared'
11997         if test yes = "$aix_use_runtimelinking"; then
11998           shared_flag="$shared_flag "'$wl-G'
11999         fi
12000         # Need to ensure runtime linking is disabled for the traditional
12001         # shared library, or the linker may eventually find shared libraries
12002         # /with/ Import File - we do not want to mix them.
12003         shared_flag_aix='-shared'
12004         shared_flag_svr4='-shared $wl-G'
12005       else
12006         # not using gcc
12007         if test ia64 = "$host_cpu"; then
12008         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
12009         # chokes on -Wl,-G. The following line is correct:
12010           shared_flag='-G'
12011         else
12012           if test yes = "$aix_use_runtimelinking"; then
12013             shared_flag='$wl-G'
12014           else
12015             shared_flag='$wl-bM:SRE'
12016           fi
12017           shared_flag_aix='$wl-bM:SRE'
12018           shared_flag_svr4='$wl-G'
12019         fi
12020       fi
12021
12022       export_dynamic_flag_spec='$wl-bexpall'
12023       # It seems that -bexpall does not export symbols beginning with
12024       # underscore (_), so it is better to generate a list of symbols to export.
12025       always_export_symbols=yes
12026       if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
12027         # Warning - without using the other runtime loading flags (-brtl),
12028         # -berok will link without error, but may produce a broken library.
12029         allow_undefined_flag='-berok'
12030         # Determine the default libpath from the value encoded in an
12031         # empty executable.
12032         if test set = "${lt_cv_aix_libpath+set}"; then
12033   aix_libpath=$lt_cv_aix_libpath
12034 else
12035   if ${lt_cv_aix_libpath_+:} false; then :
12036   $as_echo_n "(cached) " >&6
12037 else
12038   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12039 /* end confdefs.h.  */
12040
12041 int
12042 main ()
12043 {
12044
12045   ;
12046   return 0;
12047 }
12048 _ACEOF
12049 if ac_fn_c_try_link "$LINENO"; then :
12050
12051   lt_aix_libpath_sed='
12052       /Import File Strings/,/^$/ {
12053           /^0/ {
12054               s/^0  *\([^ ]*\) *$/\1/
12055               p
12056           }
12057       }'
12058   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12059   # Check for a 64-bit object if we didn't find anything.
12060   if test -z "$lt_cv_aix_libpath_"; then
12061     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12062   fi
12063 fi
12064 rm -f core conftest.err conftest.$ac_objext \
12065     conftest$ac_exeext conftest.$ac_ext
12066   if test -z "$lt_cv_aix_libpath_"; then
12067     lt_cv_aix_libpath_=/usr/lib:/lib
12068   fi
12069
12070 fi
12071
12072   aix_libpath=$lt_cv_aix_libpath_
12073 fi
12074
12075         hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12076         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
12077       else
12078         if test ia64 = "$host_cpu"; then
12079           hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
12080           allow_undefined_flag="-z nodefs"
12081           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"
12082         else
12083          # Determine the default libpath from the value encoded in an
12084          # empty executable.
12085          if test set = "${lt_cv_aix_libpath+set}"; then
12086   aix_libpath=$lt_cv_aix_libpath
12087 else
12088   if ${lt_cv_aix_libpath_+:} false; then :
12089   $as_echo_n "(cached) " >&6
12090 else
12091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12092 /* end confdefs.h.  */
12093
12094 int
12095 main ()
12096 {
12097
12098   ;
12099   return 0;
12100 }
12101 _ACEOF
12102 if ac_fn_c_try_link "$LINENO"; then :
12103
12104   lt_aix_libpath_sed='
12105       /Import File Strings/,/^$/ {
12106           /^0/ {
12107               s/^0  *\([^ ]*\) *$/\1/
12108               p
12109           }
12110       }'
12111   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12112   # Check for a 64-bit object if we didn't find anything.
12113   if test -z "$lt_cv_aix_libpath_"; then
12114     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12115   fi
12116 fi
12117 rm -f core conftest.err conftest.$ac_objext \
12118     conftest$ac_exeext conftest.$ac_ext
12119   if test -z "$lt_cv_aix_libpath_"; then
12120     lt_cv_aix_libpath_=/usr/lib:/lib
12121   fi
12122
12123 fi
12124
12125   aix_libpath=$lt_cv_aix_libpath_
12126 fi
12127
12128          hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12129           # Warning - without using the other run time loading flags,
12130           # -berok will link without error, but may produce a broken library.
12131           no_undefined_flag=' $wl-bernotok'
12132           allow_undefined_flag=' $wl-berok'
12133           if test yes = "$with_gnu_ld"; then
12134             # We only use this code for GNU lds that support --whole-archive.
12135             whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
12136           else
12137             # Exported symbols can be pulled into shared objects from archives
12138             whole_archive_flag_spec='$convenience'
12139           fi
12140           archive_cmds_need_lc=yes
12141           archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
12142           # -brtl affects multiple linker settings, -berok does not and is overridden later
12143           compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
12144           if test svr4 != "$with_aix_soname"; then
12145             # This is similar to how AIX traditionally builds its shared libraries.
12146             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'
12147           fi
12148           if test aix != "$with_aix_soname"; then
12149             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'
12150           else
12151             # used by -dlpreopen to get the symbols
12152             archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
12153           fi
12154           archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
12155         fi
12156       fi
12157       ;;
12158
12159     amigaos*)
12160       case $host_cpu in
12161       powerpc)
12162             # see comment about AmigaOS4 .so support
12163             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12164             archive_expsym_cmds=''
12165         ;;
12166       m68k)
12167             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)'
12168             hardcode_libdir_flag_spec='-L$libdir'
12169             hardcode_minus_L=yes
12170         ;;
12171       esac
12172       ;;
12173
12174     bsdi[45]*)
12175       export_dynamic_flag_spec=-rdynamic
12176       ;;
12177
12178     cygwin* | mingw* | pw32* | cegcc*)
12179       # When not using gcc, we currently assume that we are using
12180       # Microsoft Visual C++.
12181       # hardcode_libdir_flag_spec is actually meaningless, as there is
12182       # no search path for DLLs.
12183       case $cc_basename in
12184       cl*)
12185         # Native MSVC
12186         hardcode_libdir_flag_spec=' '
12187         allow_undefined_flag=unsupported
12188         always_export_symbols=yes
12189         file_list_spec='@'
12190         # Tell ltmain to make .lib files, not .a files.
12191         libext=lib
12192         # Tell ltmain to make .dll files, not .so files.
12193         shrext_cmds=.dll
12194         # FIXME: Setting linknames here is a bad hack.
12195         archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
12196         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12197             cp "$export_symbols" "$output_objdir/$soname.def";
12198             echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
12199           else
12200             $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
12201           fi~
12202           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12203           linknames='
12204         # The linker will not automatically build a static lib if we build a DLL.
12205         # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12206         enable_shared_with_static_runtimes=yes
12207         exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
12208         export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12209         # Don't use ranlib
12210         old_postinstall_cmds='chmod 644 $oldlib'
12211         postlink_cmds='lt_outputfile="@OUTPUT@"~
12212           lt_tool_outputfile="@TOOL_OUTPUT@"~
12213           case $lt_outputfile in
12214             *.exe|*.EXE) ;;
12215             *)
12216               lt_outputfile=$lt_outputfile.exe
12217               lt_tool_outputfile=$lt_tool_outputfile.exe
12218               ;;
12219           esac~
12220           if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
12221             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12222             $RM "$lt_outputfile.manifest";
12223           fi'
12224         ;;
12225       *)
12226         # Assume MSVC wrapper
12227         hardcode_libdir_flag_spec=' '
12228         allow_undefined_flag=unsupported
12229         # Tell ltmain to make .lib files, not .a files.
12230         libext=lib
12231         # Tell ltmain to make .dll files, not .so files.
12232         shrext_cmds=.dll
12233         # FIXME: Setting linknames here is a bad hack.
12234         archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12235         # The linker will automatically build a .lib file if we build a DLL.
12236         old_archive_from_new_cmds='true'
12237         # FIXME: Should let the user specify the lib program.
12238         old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12239         enable_shared_with_static_runtimes=yes
12240         ;;
12241       esac
12242       ;;
12243
12244     darwin* | rhapsody*)
12245
12246
12247   archive_cmds_need_lc=no
12248   hardcode_direct=no
12249   hardcode_automatic=yes
12250   hardcode_shlibpath_var=unsupported
12251   if test yes = "$lt_cv_ld_force_load"; then
12252     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\"`'
12253
12254   else
12255     whole_archive_flag_spec=''
12256   fi
12257   link_all_deplibs=yes
12258   allow_undefined_flag=$_lt_dar_allow_undefined
12259   case $cc_basename in
12260      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
12261      *) _lt_dar_can_shared=$GCC ;;
12262   esac
12263   if test yes = "$_lt_dar_can_shared"; then
12264     output_verbose_link_cmd=func_echo_all
12265     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
12266     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
12267     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"
12268     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"
12269
12270   else
12271   ld_shlibs=no
12272   fi
12273
12274       ;;
12275
12276     dgux*)
12277       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12278       hardcode_libdir_flag_spec='-L$libdir'
12279       hardcode_shlibpath_var=no
12280       ;;
12281
12282     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12283     # support.  Future versions do this automatically, but an explicit c++rt0.o
12284     # does not break anything, and helps significantly (at the cost of a little
12285     # extra space).
12286     freebsd2.2*)
12287       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12288       hardcode_libdir_flag_spec='-R$libdir'
12289       hardcode_direct=yes
12290       hardcode_shlibpath_var=no
12291       ;;
12292
12293     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12294     freebsd2.*)
12295       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12296       hardcode_direct=yes
12297       hardcode_minus_L=yes
12298       hardcode_shlibpath_var=no
12299       ;;
12300
12301     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12302     freebsd* | dragonfly*)
12303       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12304       hardcode_libdir_flag_spec='-R$libdir'
12305       hardcode_direct=yes
12306       hardcode_shlibpath_var=no
12307       ;;
12308
12309     hpux9*)
12310       if test yes = "$GCC"; then
12311         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'
12312       else
12313         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'
12314       fi
12315       hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12316       hardcode_libdir_separator=:
12317       hardcode_direct=yes
12318
12319       # hardcode_minus_L: Not really in the search PATH,
12320       # but as the default location of the library.
12321       hardcode_minus_L=yes
12322       export_dynamic_flag_spec='$wl-E'
12323       ;;
12324
12325     hpux10*)
12326       if test yes,no = "$GCC,$with_gnu_ld"; then
12327         archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12328       else
12329         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12330       fi
12331       if test no = "$with_gnu_ld"; then
12332         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12333         hardcode_libdir_separator=:
12334         hardcode_direct=yes
12335         hardcode_direct_absolute=yes
12336         export_dynamic_flag_spec='$wl-E'
12337         # hardcode_minus_L: Not really in the search PATH,
12338         # but as the default location of the library.
12339         hardcode_minus_L=yes
12340       fi
12341       ;;
12342
12343     hpux11*)
12344       if test yes,no = "$GCC,$with_gnu_ld"; then
12345         case $host_cpu in
12346         hppa*64*)
12347           archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12348           ;;
12349         ia64*)
12350           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12351           ;;
12352         *)
12353           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12354           ;;
12355         esac
12356       else
12357         case $host_cpu in
12358         hppa*64*)
12359           archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12360           ;;
12361         ia64*)
12362           archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12363           ;;
12364         *)
12365
12366           # Older versions of the 11.00 compiler do not understand -b yet
12367           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12368           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12369 $as_echo_n "checking if $CC understands -b... " >&6; }
12370 if ${lt_cv_prog_compiler__b+:} false; then :
12371   $as_echo_n "(cached) " >&6
12372 else
12373   lt_cv_prog_compiler__b=no
12374    save_LDFLAGS=$LDFLAGS
12375    LDFLAGS="$LDFLAGS -b"
12376    echo "$lt_simple_link_test_code" > conftest.$ac_ext
12377    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12378      # The linker can only warn and ignore the option if not recognized
12379      # So say no if there are warnings
12380      if test -s conftest.err; then
12381        # Append any errors to the config.log.
12382        cat conftest.err 1>&5
12383        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12384        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12385        if diff conftest.exp conftest.er2 >/dev/null; then
12386          lt_cv_prog_compiler__b=yes
12387        fi
12388      else
12389        lt_cv_prog_compiler__b=yes
12390      fi
12391    fi
12392    $RM -r conftest*
12393    LDFLAGS=$save_LDFLAGS
12394
12395 fi
12396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12397 $as_echo "$lt_cv_prog_compiler__b" >&6; }
12398
12399 if test yes = "$lt_cv_prog_compiler__b"; then
12400     archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12401 else
12402     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12403 fi
12404
12405           ;;
12406         esac
12407       fi
12408       if test no = "$with_gnu_ld"; then
12409         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12410         hardcode_libdir_separator=:
12411
12412         case $host_cpu in
12413         hppa*64*|ia64*)
12414           hardcode_direct=no
12415           hardcode_shlibpath_var=no
12416           ;;
12417         *)
12418           hardcode_direct=yes
12419           hardcode_direct_absolute=yes
12420           export_dynamic_flag_spec='$wl-E'
12421
12422           # hardcode_minus_L: Not really in the search PATH,
12423           # but as the default location of the library.
12424           hardcode_minus_L=yes
12425           ;;
12426         esac
12427       fi
12428       ;;
12429
12430     irix5* | irix6* | nonstopux*)
12431       if test yes = "$GCC"; then
12432         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'
12433         # Try to use the -exported_symbol ld option, if it does not
12434         # work, assume that -exports_file does not work either and
12435         # implicitly export all symbols.
12436         # This should be the same for all languages, so no per-tag cache variable.
12437         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12438 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12439 if ${lt_cv_irix_exported_symbol+:} false; then :
12440   $as_echo_n "(cached) " >&6
12441 else
12442   save_LDFLAGS=$LDFLAGS
12443            LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12444            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12445 /* end confdefs.h.  */
12446 int foo (void) { return 0; }
12447 _ACEOF
12448 if ac_fn_c_try_link "$LINENO"; then :
12449   lt_cv_irix_exported_symbol=yes
12450 else
12451   lt_cv_irix_exported_symbol=no
12452 fi
12453 rm -f core conftest.err conftest.$ac_objext \
12454     conftest$ac_exeext conftest.$ac_ext
12455            LDFLAGS=$save_LDFLAGS
12456 fi
12457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12458 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
12459         if test yes = "$lt_cv_irix_exported_symbol"; then
12460           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'
12461         fi
12462       else
12463         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'
12464         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'
12465       fi
12466       archive_cmds_need_lc='no'
12467       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12468       hardcode_libdir_separator=:
12469       inherit_rpath=yes
12470       link_all_deplibs=yes
12471       ;;
12472
12473     linux*)
12474       case $cc_basename in
12475       tcc*)
12476         # Fabrice Bellard et al's Tiny C Compiler
12477         ld_shlibs=yes
12478         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12479         ;;
12480       esac
12481       ;;
12482
12483     netbsd*)
12484       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12485         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12486       else
12487         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12488       fi
12489       hardcode_libdir_flag_spec='-R$libdir'
12490       hardcode_direct=yes
12491       hardcode_shlibpath_var=no
12492       ;;
12493
12494     newsos6)
12495       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12496       hardcode_direct=yes
12497       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12498       hardcode_libdir_separator=:
12499       hardcode_shlibpath_var=no
12500       ;;
12501
12502     *nto* | *qnx*)
12503       ;;
12504
12505     openbsd* | bitrig*)
12506       if test -f /usr/libexec/ld.so; then
12507         hardcode_direct=yes
12508         hardcode_shlibpath_var=no
12509         hardcode_direct_absolute=yes
12510         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12511           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12512           archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12513           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12514           export_dynamic_flag_spec='$wl-E'
12515         else
12516           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12517           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12518         fi
12519       else
12520         ld_shlibs=no
12521       fi
12522       ;;
12523
12524     os2*)
12525       hardcode_libdir_flag_spec='-L$libdir'
12526       hardcode_minus_L=yes
12527       allow_undefined_flag=unsupported
12528       shrext_cmds=.dll
12529       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12530         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12531         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12532         $ECHO EXPORTS >> $output_objdir/$libname.def~
12533         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12534         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12535         emximp -o $lib $output_objdir/$libname.def'
12536       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12537         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12538         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12539         $ECHO EXPORTS >> $output_objdir/$libname.def~
12540         prefix_cmds="$SED"~
12541         if test EXPORTS = "`$SED 1q $export_symbols`"; then
12542           prefix_cmds="$prefix_cmds -e 1d";
12543         fi~
12544         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12545         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12546         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12547         emximp -o $lib $output_objdir/$libname.def'
12548       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12549       enable_shared_with_static_runtimes=yes
12550       ;;
12551
12552     osf3*)
12553       if test yes = "$GCC"; then
12554         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12555         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'
12556       else
12557         allow_undefined_flag=' -expect_unresolved \*'
12558         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'
12559       fi
12560       archive_cmds_need_lc='no'
12561       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12562       hardcode_libdir_separator=:
12563       ;;
12564
12565     osf4* | osf5*)      # as osf3* with the addition of -msym flag
12566       if test yes = "$GCC"; then
12567         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12568         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'
12569         hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12570       else
12571         allow_undefined_flag=' -expect_unresolved \*'
12572         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'
12573         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~
12574           $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'
12575
12576         # Both c and cxx compiler support -rpath directly
12577         hardcode_libdir_flag_spec='-rpath $libdir'
12578       fi
12579       archive_cmds_need_lc='no'
12580       hardcode_libdir_separator=:
12581       ;;
12582
12583     solaris*)
12584       no_undefined_flag=' -z defs'
12585       if test yes = "$GCC"; then
12586         wlarc='$wl'
12587         archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12588         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12589           $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'
12590       else
12591         case `$CC -V 2>&1` in
12592         *"Compilers 5.0"*)
12593           wlarc=''
12594           archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12595           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12596             $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12597           ;;
12598         *)
12599           wlarc='$wl'
12600           archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12601           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12602             $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12603           ;;
12604         esac
12605       fi
12606       hardcode_libdir_flag_spec='-R$libdir'
12607       hardcode_shlibpath_var=no
12608       case $host_os in
12609       solaris2.[0-5] | solaris2.[0-5].*) ;;
12610       *)
12611         # The compiler driver will combine and reorder linker options,
12612         # but understands '-z linker_flag'.  GCC discards it without '$wl',
12613         # but is careful enough not to reorder.
12614         # Supported since Solaris 2.6 (maybe 2.5.1?)
12615         if test yes = "$GCC"; then
12616           whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12617         else
12618           whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12619         fi
12620         ;;
12621       esac
12622       link_all_deplibs=yes
12623       ;;
12624
12625     sunos4*)
12626       if test sequent = "$host_vendor"; then
12627         # Use $CC to link under sequent, because it throws in some extra .o
12628         # files that make .init and .fini sections work.
12629         archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12630       else
12631         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12632       fi
12633       hardcode_libdir_flag_spec='-L$libdir'
12634       hardcode_direct=yes
12635       hardcode_minus_L=yes
12636       hardcode_shlibpath_var=no
12637       ;;
12638
12639     sysv4)
12640       case $host_vendor in
12641         sni)
12642           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12643           hardcode_direct=yes # is this really true???
12644         ;;
12645         siemens)
12646           ## LD is ld it makes a PLAMLIB
12647           ## CC just makes a GrossModule.
12648           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12649           reload_cmds='$CC -r -o $output$reload_objs'
12650           hardcode_direct=no
12651         ;;
12652         motorola)
12653           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12654           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12655         ;;
12656       esac
12657       runpath_var='LD_RUN_PATH'
12658       hardcode_shlibpath_var=no
12659       ;;
12660
12661     sysv4.3*)
12662       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12663       hardcode_shlibpath_var=no
12664       export_dynamic_flag_spec='-Bexport'
12665       ;;
12666
12667     sysv4*MP*)
12668       if test -d /usr/nec; then
12669         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12670         hardcode_shlibpath_var=no
12671         runpath_var=LD_RUN_PATH
12672         hardcode_runpath_var=yes
12673         ld_shlibs=yes
12674       fi
12675       ;;
12676
12677     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12678       no_undefined_flag='$wl-z,text'
12679       archive_cmds_need_lc=no
12680       hardcode_shlibpath_var=no
12681       runpath_var='LD_RUN_PATH'
12682
12683       if test yes = "$GCC"; then
12684         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12685         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12686       else
12687         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12688         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12689       fi
12690       ;;
12691
12692     sysv5* | sco3.2v5* | sco5v6*)
12693       # Note: We CANNOT use -z defs as we might desire, because we do not
12694       # link with -lc, and that would cause any symbols used from libc to
12695       # always be unresolved, which means just about no library would
12696       # ever link correctly.  If we're not using GNU ld we use -z text
12697       # though, which does catch some bad symbols but isn't as heavy-handed
12698       # as -z defs.
12699       no_undefined_flag='$wl-z,text'
12700       allow_undefined_flag='$wl-z,nodefs'
12701       archive_cmds_need_lc=no
12702       hardcode_shlibpath_var=no
12703       hardcode_libdir_flag_spec='$wl-R,$libdir'
12704       hardcode_libdir_separator=':'
12705       link_all_deplibs=yes
12706       export_dynamic_flag_spec='$wl-Bexport'
12707       runpath_var='LD_RUN_PATH'
12708
12709       if test yes = "$GCC"; then
12710         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12711         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12712       else
12713         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12714         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12715       fi
12716       ;;
12717
12718     uts4*)
12719       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12720       hardcode_libdir_flag_spec='-L$libdir'
12721       hardcode_shlibpath_var=no
12722       ;;
12723
12724     *)
12725       ld_shlibs=no
12726       ;;
12727     esac
12728
12729     if test sni = "$host_vendor"; then
12730       case $host in
12731       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12732         export_dynamic_flag_spec='$wl-Blargedynsym'
12733         ;;
12734       esac
12735     fi
12736   fi
12737
12738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12739 $as_echo "$ld_shlibs" >&6; }
12740 test no = "$ld_shlibs" && can_build_shared=no
12741
12742 with_gnu_ld=$with_gnu_ld
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758 #
12759 # Do we need to explicitly link libc?
12760 #
12761 case "x$archive_cmds_need_lc" in
12762 x|xyes)
12763   # Assume -lc should be added
12764   archive_cmds_need_lc=yes
12765
12766   if test yes,yes = "$GCC,$enable_shared"; then
12767     case $archive_cmds in
12768     *'~'*)
12769       # FIXME: we may have to deal with multi-command sequences.
12770       ;;
12771     '$CC '*)
12772       # Test whether the compiler implicitly links with -lc since on some
12773       # systems, -lgcc has to come before -lc. If gcc already passes -lc
12774       # to ld, don't add -lc before -lgcc.
12775       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12776 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12777 if ${lt_cv_archive_cmds_need_lc+:} false; then :
12778   $as_echo_n "(cached) " >&6
12779 else
12780   $RM conftest*
12781         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12782
12783         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12784   (eval $ac_compile) 2>&5
12785   ac_status=$?
12786   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12787   test $ac_status = 0; } 2>conftest.err; then
12788           soname=conftest
12789           lib=conftest
12790           libobjs=conftest.$ac_objext
12791           deplibs=
12792           wl=$lt_prog_compiler_wl
12793           pic_flag=$lt_prog_compiler_pic
12794           compiler_flags=-v
12795           linker_flags=-v
12796           verstring=
12797           output_objdir=.
12798           libname=conftest
12799           lt_save_allow_undefined_flag=$allow_undefined_flag
12800           allow_undefined_flag=
12801           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12802   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12803   ac_status=$?
12804   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12805   test $ac_status = 0; }
12806           then
12807             lt_cv_archive_cmds_need_lc=no
12808           else
12809             lt_cv_archive_cmds_need_lc=yes
12810           fi
12811           allow_undefined_flag=$lt_save_allow_undefined_flag
12812         else
12813           cat conftest.err 1>&5
12814         fi
12815         $RM conftest*
12816
12817 fi
12818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12819 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12820       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12821       ;;
12822     esac
12823   fi
12824   ;;
12825 esac
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12979 $as_echo_n "checking dynamic linker characteristics... " >&6; }
12980
12981 if test yes = "$GCC"; then
12982   case $host_os in
12983     darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
12984     *) lt_awk_arg='/^libraries:/' ;;
12985   esac
12986   case $host_os in
12987     mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
12988     *) lt_sed_strip_eq='s|=/|/|g' ;;
12989   esac
12990   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
12991   case $lt_search_path_spec in
12992   *\;*)
12993     # if the path contains ";" then we assume it to be the separator
12994     # otherwise default to the standard path separator (i.e. ":") - it is
12995     # assumed that no part of a normal pathname contains ";" but that should
12996     # okay in the real world where ";" in dirpaths is itself problematic.
12997     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
12998     ;;
12999   *)
13000     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
13001     ;;
13002   esac
13003   # Ok, now we have the path, separated by spaces, we can step through it
13004   # and add multilib dir if necessary...
13005   lt_tmp_lt_search_path_spec=
13006   lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
13007   # ...but if some path component already ends with the multilib dir we assume
13008   # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
13009   case "$lt_multi_os_dir; $lt_search_path_spec " in
13010   "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
13011     lt_multi_os_dir=
13012     ;;
13013   esac
13014   for lt_sys_path in $lt_search_path_spec; do
13015     if test -d "$lt_sys_path$lt_multi_os_dir"; then
13016       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
13017     elif test -n "$lt_multi_os_dir"; then
13018       test -d "$lt_sys_path" && \
13019         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
13020     fi
13021   done
13022   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
13023 BEGIN {RS = " "; FS = "/|\n";} {
13024   lt_foo = "";
13025   lt_count = 0;
13026   for (lt_i = NF; lt_i > 0; lt_i--) {
13027     if ($lt_i != "" && $lt_i != ".") {
13028       if ($lt_i == "..") {
13029         lt_count++;
13030       } else {
13031         if (lt_count == 0) {
13032           lt_foo = "/" $lt_i lt_foo;
13033         } else {
13034           lt_count--;
13035         }
13036       }
13037     }
13038   }
13039   if (lt_foo != "") { lt_freq[lt_foo]++; }
13040   if (lt_freq[lt_foo] == 1) { print lt_foo; }
13041 }'`
13042   # AWK program above erroneously prepends '/' to C:/dos/paths
13043   # for these hosts.
13044   case $host_os in
13045     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
13046       $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
13047   esac
13048   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
13049 else
13050   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13051 fi
13052 library_names_spec=
13053 libname_spec='lib$name'
13054 soname_spec=
13055 shrext_cmds=.so
13056 postinstall_cmds=
13057 postuninstall_cmds=
13058 finish_cmds=
13059 finish_eval=
13060 shlibpath_var=
13061 shlibpath_overrides_runpath=unknown
13062 version_type=none
13063 dynamic_linker="$host_os ld.so"
13064 sys_lib_dlsearch_path_spec="/lib /usr/lib"
13065 need_lib_prefix=unknown
13066 hardcode_into_libs=no
13067
13068 # when you set need_version to no, make sure it does not cause -set_version
13069 # flags to be left without arguments
13070 need_version=unknown
13071
13072
13073
13074 case $host_os in
13075 aix3*)
13076   version_type=linux # correct to gnu/linux during the next big refactor
13077   library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
13078   shlibpath_var=LIBPATH
13079
13080   # AIX 3 has no versioning support, so we append a major version to the name.
13081   soname_spec='$libname$release$shared_ext$major'
13082   ;;
13083
13084 aix[4-9]*)
13085   version_type=linux # correct to gnu/linux during the next big refactor
13086   need_lib_prefix=no
13087   need_version=no
13088   hardcode_into_libs=yes
13089   if test ia64 = "$host_cpu"; then
13090     # AIX 5 supports IA64
13091     library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
13092     shlibpath_var=LD_LIBRARY_PATH
13093   else
13094     # With GCC up to 2.95.x, collect2 would create an import file
13095     # for dependence libraries.  The import file would start with
13096     # the line '#! .'.  This would cause the generated library to
13097     # depend on '.', always an invalid library.  This was fixed in
13098     # development snapshots of GCC prior to 3.0.
13099     case $host_os in
13100       aix4 | aix4.[01] | aix4.[01].*)
13101       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
13102            echo ' yes '
13103            echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
13104         :
13105       else
13106         can_build_shared=no
13107       fi
13108       ;;
13109     esac
13110     # Using Import Files as archive members, it is possible to support
13111     # filename-based versioning of shared library archives on AIX. While
13112     # this would work for both with and without runtime linking, it will
13113     # prevent static linking of such archives. So we do filename-based
13114     # shared library versioning with .so extension only, which is used
13115     # when both runtime linking and shared linking is enabled.
13116     # Unfortunately, runtime linking may impact performance, so we do
13117     # not want this to be the default eventually. Also, we use the
13118     # versioned .so libs for executables only if there is the -brtl
13119     # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
13120     # To allow for filename-based versioning support, we need to create
13121     # libNAME.so.V as an archive file, containing:
13122     # *) an Import File, referring to the versioned filename of the
13123     #    archive as well as the shared archive member, telling the
13124     #    bitwidth (32 or 64) of that shared object, and providing the
13125     #    list of exported symbols of that shared object, eventually
13126     #    decorated with the 'weak' keyword
13127     # *) the shared object with the F_LOADONLY flag set, to really avoid
13128     #    it being seen by the linker.
13129     # At run time we better use the real file rather than another symlink,
13130     # but for link time we create the symlink libNAME.so -> libNAME.so.V
13131
13132     case $with_aix_soname,$aix_use_runtimelinking in
13133     # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
13134     # soname into executable. Probably we can add versioning support to
13135     # collect2, so additional links can be useful in future.
13136     aix,yes) # traditional libtool
13137       dynamic_linker='AIX unversionable lib.so'
13138       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
13139       # instead of lib<name>.a to let people know that these are not
13140       # typical AIX shared libraries.
13141       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13142       ;;
13143     aix,no) # traditional AIX only
13144       dynamic_linker='AIX lib.a(lib.so.V)'
13145       # We preserve .a as extension for shared libraries through AIX4.2
13146       # and later when we are not doing run time linking.
13147       library_names_spec='$libname$release.a $libname.a'
13148       soname_spec='$libname$release$shared_ext$major'
13149       ;;
13150     svr4,*) # full svr4 only
13151       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
13152       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13153       # We do not specify a path in Import Files, so LIBPATH fires.
13154       shlibpath_overrides_runpath=yes
13155       ;;
13156     *,yes) # both, prefer svr4
13157       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
13158       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13159       # unpreferred sharedlib libNAME.a needs extra handling
13160       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"'
13161       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"'
13162       # We do not specify a path in Import Files, so LIBPATH fires.
13163       shlibpath_overrides_runpath=yes
13164       ;;
13165     *,no) # both, prefer aix
13166       dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
13167       library_names_spec='$libname$release.a $libname.a'
13168       soname_spec='$libname$release$shared_ext$major'
13169       # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
13170       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)'
13171       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"'
13172       ;;
13173     esac
13174     shlibpath_var=LIBPATH
13175   fi
13176   ;;
13177
13178 amigaos*)
13179   case $host_cpu in
13180   powerpc)
13181     # Since July 2007 AmigaOS4 officially supports .so libraries.
13182     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
13183     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13184     ;;
13185   m68k)
13186     library_names_spec='$libname.ixlibrary $libname.a'
13187     # Create ${libname}_ixlibrary.a entries in /sys/libs.
13188     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'
13189     ;;
13190   esac
13191   ;;
13192
13193 beos*)
13194   library_names_spec='$libname$shared_ext'
13195   dynamic_linker="$host_os ld.so"
13196   shlibpath_var=LIBRARY_PATH
13197   ;;
13198
13199 bsdi[45]*)
13200   version_type=linux # correct to gnu/linux during the next big refactor
13201   need_version=no
13202   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13203   soname_spec='$libname$release$shared_ext$major'
13204   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13205   shlibpath_var=LD_LIBRARY_PATH
13206   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13207   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13208   # the default ld.so.conf also contains /usr/contrib/lib and
13209   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13210   # libtool to hard-code these into programs
13211   ;;
13212
13213 cygwin* | mingw* | pw32* | cegcc*)
13214   version_type=windows
13215   shrext_cmds=.dll
13216   need_version=no
13217   need_lib_prefix=no
13218
13219   case $GCC,$cc_basename in
13220   yes,*)
13221     # gcc
13222     library_names_spec='$libname.dll.a'
13223     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13224     postinstall_cmds='base_file=`basename \$file`~
13225       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13226       dldir=$destdir/`dirname \$dlpath`~
13227       test -d \$dldir || mkdir -p \$dldir~
13228       $install_prog $dir/$dlname \$dldir/$dlname~
13229       chmod a+x \$dldir/$dlname~
13230       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13231         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13232       fi'
13233     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13234       dlpath=$dir/\$dldll~
13235        $RM \$dlpath'
13236     shlibpath_overrides_runpath=yes
13237
13238     case $host_os in
13239     cygwin*)
13240       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13241       soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13242
13243       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
13244       ;;
13245     mingw* | cegcc*)
13246       # MinGW DLLs use traditional 'lib' prefix
13247       soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13248       ;;
13249     pw32*)
13250       # pw32 DLLs use 'pw' prefix rather than 'lib'
13251       library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13252       ;;
13253     esac
13254     dynamic_linker='Win32 ld.exe'
13255     ;;
13256
13257   *,cl*)
13258     # Native MSVC
13259     libname_spec='$name'
13260     soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13261     library_names_spec='$libname.dll.lib'
13262
13263     case $build_os in
13264     mingw*)
13265       sys_lib_search_path_spec=
13266       lt_save_ifs=$IFS
13267       IFS=';'
13268       for lt_path in $LIB
13269       do
13270         IFS=$lt_save_ifs
13271         # Let DOS variable expansion print the short 8.3 style file name.
13272         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
13273         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13274       done
13275       IFS=$lt_save_ifs
13276       # Convert to MSYS style.
13277       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13278       ;;
13279     cygwin*)
13280       # Convert to unix form, then to dos form, then back to unix form
13281       # but this time dos style (no spaces!) so that the unix form looks
13282       # like /cygdrive/c/PROGRA~1:/cygdr...
13283       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13284       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13285       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13286       ;;
13287     *)
13288       sys_lib_search_path_spec=$LIB
13289       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13290         # It is most probably a Windows format PATH.
13291         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13292       else
13293         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13294       fi
13295       # FIXME: find the short name or the path components, as spaces are
13296       # common. (e.g. "Program Files" -> "PROGRA~1")
13297       ;;
13298     esac
13299
13300     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13301     postinstall_cmds='base_file=`basename \$file`~
13302       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13303       dldir=$destdir/`dirname \$dlpath`~
13304       test -d \$dldir || mkdir -p \$dldir~
13305       $install_prog $dir/$dlname \$dldir/$dlname'
13306     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13307       dlpath=$dir/\$dldll~
13308        $RM \$dlpath'
13309     shlibpath_overrides_runpath=yes
13310     dynamic_linker='Win32 link.exe'
13311     ;;
13312
13313   *)
13314     # Assume MSVC wrapper
13315     library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13316     dynamic_linker='Win32 ld.exe'
13317     ;;
13318   esac
13319   # FIXME: first we should search . and the directory the executable is in
13320   shlibpath_var=PATH
13321   ;;
13322
13323 darwin* | rhapsody*)
13324   dynamic_linker="$host_os dyld"
13325   version_type=darwin
13326   need_lib_prefix=no
13327   need_version=no
13328   library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13329   soname_spec='$libname$release$major$shared_ext'
13330   shlibpath_overrides_runpath=yes
13331   shlibpath_var=DYLD_LIBRARY_PATH
13332   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13333
13334   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13335   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13336   ;;
13337
13338 dgux*)
13339   version_type=linux # correct to gnu/linux during the next big refactor
13340   need_lib_prefix=no
13341   need_version=no
13342   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13343   soname_spec='$libname$release$shared_ext$major'
13344   shlibpath_var=LD_LIBRARY_PATH
13345   ;;
13346
13347 freebsd* | dragonfly*)
13348   # DragonFly does not have aout.  When/if they implement a new
13349   # versioning mechanism, adjust this.
13350   if test -x /usr/bin/objformat; then
13351     objformat=`/usr/bin/objformat`
13352   else
13353     case $host_os in
13354     freebsd[23].*) objformat=aout ;;
13355     *) objformat=elf ;;
13356     esac
13357   fi
13358   version_type=freebsd-$objformat
13359   case $version_type in
13360     freebsd-elf*)
13361       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13362       soname_spec='$libname$release$shared_ext$major'
13363       need_version=no
13364       need_lib_prefix=no
13365       ;;
13366     freebsd-*)
13367       library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13368       need_version=yes
13369       ;;
13370   esac
13371   shlibpath_var=LD_LIBRARY_PATH
13372   case $host_os in
13373   freebsd2.*)
13374     shlibpath_overrides_runpath=yes
13375     ;;
13376   freebsd3.[01]* | freebsdelf3.[01]*)
13377     shlibpath_overrides_runpath=yes
13378     hardcode_into_libs=yes
13379     ;;
13380   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13381   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13382     shlibpath_overrides_runpath=no
13383     hardcode_into_libs=yes
13384     ;;
13385   *) # from 4.6 on, and DragonFly
13386     shlibpath_overrides_runpath=yes
13387     hardcode_into_libs=yes
13388     ;;
13389   esac
13390   ;;
13391
13392 haiku*)
13393   version_type=linux # correct to gnu/linux during the next big refactor
13394   need_lib_prefix=no
13395   need_version=no
13396   dynamic_linker="$host_os runtime_loader"
13397   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13398   soname_spec='$libname$release$shared_ext$major'
13399   shlibpath_var=LIBRARY_PATH
13400   shlibpath_overrides_runpath=no
13401   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13402   hardcode_into_libs=yes
13403   ;;
13404
13405 hpux9* | hpux10* | hpux11*)
13406   # Give a soname corresponding to the major version so that dld.sl refuses to
13407   # link against other versions.
13408   version_type=sunos
13409   need_lib_prefix=no
13410   need_version=no
13411   case $host_cpu in
13412   ia64*)
13413     shrext_cmds='.so'
13414     hardcode_into_libs=yes
13415     dynamic_linker="$host_os dld.so"
13416     shlibpath_var=LD_LIBRARY_PATH
13417     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13418     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13419     soname_spec='$libname$release$shared_ext$major'
13420     if test 32 = "$HPUX_IA64_MODE"; then
13421       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13422       sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13423     else
13424       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13425       sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13426     fi
13427     ;;
13428   hppa*64*)
13429     shrext_cmds='.sl'
13430     hardcode_into_libs=yes
13431     dynamic_linker="$host_os dld.sl"
13432     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13433     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13434     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13435     soname_spec='$libname$release$shared_ext$major'
13436     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13437     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13438     ;;
13439   *)
13440     shrext_cmds='.sl'
13441     dynamic_linker="$host_os dld.sl"
13442     shlibpath_var=SHLIB_PATH
13443     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
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     ;;
13447   esac
13448   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13449   postinstall_cmds='chmod 555 $lib'
13450   # or fails outright, so override atomically:
13451   install_override_mode=555
13452   ;;
13453
13454 interix[3-9]*)
13455   version_type=linux # correct to gnu/linux during the next big refactor
13456   need_lib_prefix=no
13457   need_version=no
13458   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13459   soname_spec='$libname$release$shared_ext$major'
13460   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13461   shlibpath_var=LD_LIBRARY_PATH
13462   shlibpath_overrides_runpath=no
13463   hardcode_into_libs=yes
13464   ;;
13465
13466 irix5* | irix6* | nonstopux*)
13467   case $host_os in
13468     nonstopux*) version_type=nonstopux ;;
13469     *)
13470         if test yes = "$lt_cv_prog_gnu_ld"; then
13471                 version_type=linux # correct to gnu/linux during the next big refactor
13472         else
13473                 version_type=irix
13474         fi ;;
13475   esac
13476   need_lib_prefix=no
13477   need_version=no
13478   soname_spec='$libname$release$shared_ext$major'
13479   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13480   case $host_os in
13481   irix5* | nonstopux*)
13482     libsuff= shlibsuff=
13483     ;;
13484   *)
13485     case $LD in # libtool.m4 will add one of these switches to LD
13486     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13487       libsuff= shlibsuff= libmagic=32-bit;;
13488     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13489       libsuff=32 shlibsuff=N32 libmagic=N32;;
13490     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13491       libsuff=64 shlibsuff=64 libmagic=64-bit;;
13492     *) libsuff= shlibsuff= libmagic=never-match;;
13493     esac
13494     ;;
13495   esac
13496   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13497   shlibpath_overrides_runpath=no
13498   sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13499   sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13500   hardcode_into_libs=yes
13501   ;;
13502
13503 # No shared lib support for Linux oldld, aout, or coff.
13504 linux*oldld* | linux*aout* | linux*coff*)
13505   dynamic_linker=no
13506   ;;
13507
13508 linux*android*)
13509   version_type=none # Android doesn't support versioned libraries.
13510   need_lib_prefix=no
13511   need_version=no
13512   library_names_spec='$libname$release$shared_ext'
13513   soname_spec='$libname$release$shared_ext'
13514   finish_cmds=
13515   shlibpath_var=LD_LIBRARY_PATH
13516   shlibpath_overrides_runpath=yes
13517
13518   # This implies no fast_install, which is unacceptable.
13519   # Some rework will be needed to allow for fast_install
13520   # before this can be enabled.
13521   hardcode_into_libs=yes
13522
13523   dynamic_linker='Android linker'
13524   # Don't embed -rpath directories since the linker doesn't support them.
13525   hardcode_libdir_flag_spec='-L$libdir'
13526   ;;
13527
13528 # This must be glibc/ELF.
13529 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13530   version_type=linux # correct to gnu/linux during the next big refactor
13531   need_lib_prefix=no
13532   need_version=no
13533   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13534   soname_spec='$libname$release$shared_ext$major'
13535   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13536   shlibpath_var=LD_LIBRARY_PATH
13537   shlibpath_overrides_runpath=no
13538
13539   # Some binutils ld are patched to set DT_RUNPATH
13540   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
13541   $as_echo_n "(cached) " >&6
13542 else
13543   lt_cv_shlibpath_overrides_runpath=no
13544     save_LDFLAGS=$LDFLAGS
13545     save_libdir=$libdir
13546     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13547          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13548     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13549 /* end confdefs.h.  */
13550
13551 int
13552 main ()
13553 {
13554
13555   ;
13556   return 0;
13557 }
13558 _ACEOF
13559 if ac_fn_c_try_link "$LINENO"; then :
13560   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
13561   lt_cv_shlibpath_overrides_runpath=yes
13562 fi
13563 fi
13564 rm -f core conftest.err conftest.$ac_objext \
13565     conftest$ac_exeext conftest.$ac_ext
13566     LDFLAGS=$save_LDFLAGS
13567     libdir=$save_libdir
13568
13569 fi
13570
13571   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13572
13573   # This implies no fast_install, which is unacceptable.
13574   # Some rework will be needed to allow for fast_install
13575   # before this can be enabled.
13576   hardcode_into_libs=yes
13577
13578   # Add ABI-specific directories to the system library path.
13579   sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
13580
13581   # Ideally, we could use ldconfig to report *all* directores which are
13582   # searched for libraries, however this is still not possible.  Aside from not
13583   # being certain /sbin/ldconfig is available, command
13584   # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13585   # even though it is searched at run-time.  Try to do the best guess by
13586   # appending ld.so.conf contents (and includes) to the search path.
13587   if test -f /etc/ld.so.conf; then
13588     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' ' '`
13589     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
13590   fi
13591
13592   # We used to test for /lib/ld.so.1 and disable shared libraries on
13593   # powerpc, because MkLinux only supported shared libraries with the
13594   # GNU dynamic linker.  Since this was broken with cross compilers,
13595   # most powerpc-linux boxes support dynamic linking these days and
13596   # people can always --disable-shared, the test was removed, and we
13597   # assume the GNU/Linux dynamic linker is in use.
13598   dynamic_linker='GNU/Linux ld.so'
13599   ;;
13600
13601 netbsd*)
13602   version_type=sunos
13603   need_lib_prefix=no
13604   need_version=no
13605   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13606     library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13607     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13608     dynamic_linker='NetBSD (a.out) ld.so'
13609   else
13610     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13611     soname_spec='$libname$release$shared_ext$major'
13612     dynamic_linker='NetBSD ld.elf_so'
13613   fi
13614   shlibpath_var=LD_LIBRARY_PATH
13615   shlibpath_overrides_runpath=yes
13616   hardcode_into_libs=yes
13617   ;;
13618
13619 newsos6)
13620   version_type=linux # correct to gnu/linux during the next big refactor
13621   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13622   shlibpath_var=LD_LIBRARY_PATH
13623   shlibpath_overrides_runpath=yes
13624   ;;
13625
13626 *nto* | *qnx*)
13627   version_type=qnx
13628   need_lib_prefix=no
13629   need_version=no
13630   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13631   soname_spec='$libname$release$shared_ext$major'
13632   shlibpath_var=LD_LIBRARY_PATH
13633   shlibpath_overrides_runpath=no
13634   hardcode_into_libs=yes
13635   dynamic_linker='ldqnx.so'
13636   ;;
13637
13638 openbsd* | bitrig*)
13639   version_type=sunos
13640   sys_lib_dlsearch_path_spec=/usr/lib
13641   need_lib_prefix=no
13642   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13643     need_version=no
13644   else
13645     need_version=yes
13646   fi
13647   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13648   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13649   shlibpath_var=LD_LIBRARY_PATH
13650   shlibpath_overrides_runpath=yes
13651   ;;
13652
13653 os2*)
13654   libname_spec='$name'
13655   version_type=windows
13656   shrext_cmds=.dll
13657   need_version=no
13658   need_lib_prefix=no
13659   # OS/2 can only load a DLL with a base name of 8 characters or less.
13660   soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13661     v=$($ECHO $release$versuffix | tr -d .-);
13662     n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13663     $ECHO $n$v`$shared_ext'
13664   library_names_spec='${libname}_dll.$libext'
13665   dynamic_linker='OS/2 ld.exe'
13666   shlibpath_var=BEGINLIBPATH
13667   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13668   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13669   postinstall_cmds='base_file=`basename \$file`~
13670     dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13671     dldir=$destdir/`dirname \$dlpath`~
13672     test -d \$dldir || mkdir -p \$dldir~
13673     $install_prog $dir/$dlname \$dldir/$dlname~
13674     chmod a+x \$dldir/$dlname~
13675     if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13676       eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13677     fi'
13678   postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13679     dlpath=$dir/\$dldll~
13680     $RM \$dlpath'
13681   ;;
13682
13683 osf3* | osf4* | osf5*)
13684   version_type=osf
13685   need_lib_prefix=no
13686   need_version=no
13687   soname_spec='$libname$release$shared_ext$major'
13688   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13689   shlibpath_var=LD_LIBRARY_PATH
13690   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13691   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13692   ;;
13693
13694 rdos*)
13695   dynamic_linker=no
13696   ;;
13697
13698 solaris*)
13699   version_type=linux # correct to gnu/linux during the next big refactor
13700   need_lib_prefix=no
13701   need_version=no
13702   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13703   soname_spec='$libname$release$shared_ext$major'
13704   shlibpath_var=LD_LIBRARY_PATH
13705   shlibpath_overrides_runpath=yes
13706   hardcode_into_libs=yes
13707   # ldd complains unless libraries are executable
13708   postinstall_cmds='chmod +x $lib'
13709   ;;
13710
13711 sunos4*)
13712   version_type=sunos
13713   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13714   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13715   shlibpath_var=LD_LIBRARY_PATH
13716   shlibpath_overrides_runpath=yes
13717   if test yes = "$with_gnu_ld"; then
13718     need_lib_prefix=no
13719   fi
13720   need_version=yes
13721   ;;
13722
13723 sysv4 | sysv4.3*)
13724   version_type=linux # correct to gnu/linux during the next big refactor
13725   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13726   soname_spec='$libname$release$shared_ext$major'
13727   shlibpath_var=LD_LIBRARY_PATH
13728   case $host_vendor in
13729     sni)
13730       shlibpath_overrides_runpath=no
13731       need_lib_prefix=no
13732       runpath_var=LD_RUN_PATH
13733       ;;
13734     siemens)
13735       need_lib_prefix=no
13736       ;;
13737     motorola)
13738       need_lib_prefix=no
13739       need_version=no
13740       shlibpath_overrides_runpath=no
13741       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13742       ;;
13743   esac
13744   ;;
13745
13746 sysv4*MP*)
13747   if test -d /usr/nec; then
13748     version_type=linux # correct to gnu/linux during the next big refactor
13749     library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13750     soname_spec='$libname$shared_ext.$major'
13751     shlibpath_var=LD_LIBRARY_PATH
13752   fi
13753   ;;
13754
13755 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13756   version_type=sco
13757   need_lib_prefix=no
13758   need_version=no
13759   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13760   soname_spec='$libname$release$shared_ext$major'
13761   shlibpath_var=LD_LIBRARY_PATH
13762   shlibpath_overrides_runpath=yes
13763   hardcode_into_libs=yes
13764   if test yes = "$with_gnu_ld"; then
13765     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13766   else
13767     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13768     case $host_os in
13769       sco3.2v5*)
13770         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13771         ;;
13772     esac
13773   fi
13774   sys_lib_dlsearch_path_spec='/usr/lib'
13775   ;;
13776
13777 tpf*)
13778   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13779   version_type=linux # correct to gnu/linux during the next big refactor
13780   need_lib_prefix=no
13781   need_version=no
13782   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13783   shlibpath_var=LD_LIBRARY_PATH
13784   shlibpath_overrides_runpath=no
13785   hardcode_into_libs=yes
13786   ;;
13787
13788 uts4*)
13789   version_type=linux # correct to gnu/linux during the next big refactor
13790   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13791   soname_spec='$libname$release$shared_ext$major'
13792   shlibpath_var=LD_LIBRARY_PATH
13793   ;;
13794
13795 *)
13796   dynamic_linker=no
13797   ;;
13798 esac
13799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13800 $as_echo "$dynamic_linker" >&6; }
13801 test no = "$dynamic_linker" && can_build_shared=no
13802
13803 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13804 if test yes = "$GCC"; then
13805   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13806 fi
13807
13808 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13809   sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13810 fi
13811
13812 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13813   sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13814 fi
13815
13816 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13817 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13818
13819 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13820 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13821
13822 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13823 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13922 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13923 hardcode_action=
13924 if test -n "$hardcode_libdir_flag_spec" ||
13925    test -n "$runpath_var" ||
13926    test yes = "$hardcode_automatic"; then
13927
13928   # We can hardcode non-existent directories.
13929   if test no != "$hardcode_direct" &&
13930      # If the only mechanism to avoid hardcoding is shlibpath_var, we
13931      # have to relink, otherwise we might link with an installed library
13932      # when we should be linking with a yet-to-be-installed one
13933      ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13934      test no != "$hardcode_minus_L"; then
13935     # Linking always hardcodes the temporary library directory.
13936     hardcode_action=relink
13937   else
13938     # We can link without hardcoding, and we can hardcode nonexisting dirs.
13939     hardcode_action=immediate
13940   fi
13941 else
13942   # We cannot hardcode anything, or else we can only hardcode existing
13943   # directories.
13944   hardcode_action=unsupported
13945 fi
13946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13947 $as_echo "$hardcode_action" >&6; }
13948
13949 if test relink = "$hardcode_action" ||
13950    test yes = "$inherit_rpath"; then
13951   # Fast installation is not supported
13952   enable_fast_install=no
13953 elif test yes = "$shlibpath_overrides_runpath" ||
13954      test no = "$enable_shared"; then
13955   # Fast installation is not necessary
13956   enable_fast_install=needless
13957 fi
13958
13959
13960
13961
13962
13963
13964   if test yes != "$enable_dlopen"; then
13965   enable_dlopen=unknown
13966   enable_dlopen_self=unknown
13967   enable_dlopen_self_static=unknown
13968 else
13969   lt_cv_dlopen=no
13970   lt_cv_dlopen_libs=
13971
13972   case $host_os in
13973   beos*)
13974     lt_cv_dlopen=load_add_on
13975     lt_cv_dlopen_libs=
13976     lt_cv_dlopen_self=yes
13977     ;;
13978
13979   mingw* | pw32* | cegcc*)
13980     lt_cv_dlopen=LoadLibrary
13981     lt_cv_dlopen_libs=
13982     ;;
13983
13984   cygwin*)
13985     lt_cv_dlopen=dlopen
13986     lt_cv_dlopen_libs=
13987     ;;
13988
13989   darwin*)
13990     # if libdl is installed we need to link against it
13991     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13992 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13993 if ${ac_cv_lib_dl_dlopen+:} false; then :
13994   $as_echo_n "(cached) " >&6
13995 else
13996   ac_check_lib_save_LIBS=$LIBS
13997 LIBS="-ldl  $LIBS"
13998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13999 /* end confdefs.h.  */
14000
14001 /* Override any GCC internal prototype to avoid an error.
14002    Use char because int might match the return type of a GCC
14003    builtin and then its argument prototype would still apply.  */
14004 #ifdef __cplusplus
14005 extern "C"
14006 #endif
14007 char dlopen ();
14008 int
14009 main ()
14010 {
14011 return dlopen ();
14012   ;
14013   return 0;
14014 }
14015 _ACEOF
14016 if ac_fn_c_try_link "$LINENO"; then :
14017   ac_cv_lib_dl_dlopen=yes
14018 else
14019   ac_cv_lib_dl_dlopen=no
14020 fi
14021 rm -f core conftest.err conftest.$ac_objext \
14022     conftest$ac_exeext conftest.$ac_ext
14023 LIBS=$ac_check_lib_save_LIBS
14024 fi
14025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14026 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14027 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14028   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14029 else
14030
14031     lt_cv_dlopen=dyld
14032     lt_cv_dlopen_libs=
14033     lt_cv_dlopen_self=yes
14034
14035 fi
14036
14037     ;;
14038
14039   tpf*)
14040     # Don't try to run any link tests for TPF.  We know it's impossible
14041     # because TPF is a cross-compiler, and we know how we open DSOs.
14042     lt_cv_dlopen=dlopen
14043     lt_cv_dlopen_libs=
14044     lt_cv_dlopen_self=no
14045     ;;
14046
14047   *)
14048     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
14049 if test "x$ac_cv_func_shl_load" = xyes; then :
14050   lt_cv_dlopen=shl_load
14051 else
14052   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
14053 $as_echo_n "checking for shl_load in -ldld... " >&6; }
14054 if ${ac_cv_lib_dld_shl_load+:} false; then :
14055   $as_echo_n "(cached) " >&6
14056 else
14057   ac_check_lib_save_LIBS=$LIBS
14058 LIBS="-ldld  $LIBS"
14059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14060 /* end confdefs.h.  */
14061
14062 /* Override any GCC internal prototype to avoid an error.
14063    Use char because int might match the return type of a GCC
14064    builtin and then its argument prototype would still apply.  */
14065 #ifdef __cplusplus
14066 extern "C"
14067 #endif
14068 char shl_load ();
14069 int
14070 main ()
14071 {
14072 return shl_load ();
14073   ;
14074   return 0;
14075 }
14076 _ACEOF
14077 if ac_fn_c_try_link "$LINENO"; then :
14078   ac_cv_lib_dld_shl_load=yes
14079 else
14080   ac_cv_lib_dld_shl_load=no
14081 fi
14082 rm -f core conftest.err conftest.$ac_objext \
14083     conftest$ac_exeext conftest.$ac_ext
14084 LIBS=$ac_check_lib_save_LIBS
14085 fi
14086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
14087 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
14088 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
14089   lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
14090 else
14091   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
14092 if test "x$ac_cv_func_dlopen" = xyes; then :
14093   lt_cv_dlopen=dlopen
14094 else
14095   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14096 $as_echo_n "checking for dlopen in -ldl... " >&6; }
14097 if ${ac_cv_lib_dl_dlopen+:} false; then :
14098   $as_echo_n "(cached) " >&6
14099 else
14100   ac_check_lib_save_LIBS=$LIBS
14101 LIBS="-ldl  $LIBS"
14102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14103 /* end confdefs.h.  */
14104
14105 /* Override any GCC internal prototype to avoid an error.
14106    Use char because int might match the return type of a GCC
14107    builtin and then its argument prototype would still apply.  */
14108 #ifdef __cplusplus
14109 extern "C"
14110 #endif
14111 char dlopen ();
14112 int
14113 main ()
14114 {
14115 return dlopen ();
14116   ;
14117   return 0;
14118 }
14119 _ACEOF
14120 if ac_fn_c_try_link "$LINENO"; then :
14121   ac_cv_lib_dl_dlopen=yes
14122 else
14123   ac_cv_lib_dl_dlopen=no
14124 fi
14125 rm -f core conftest.err conftest.$ac_objext \
14126     conftest$ac_exeext conftest.$ac_ext
14127 LIBS=$ac_check_lib_save_LIBS
14128 fi
14129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14130 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14131 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14132   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14133 else
14134   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
14135 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
14136 if ${ac_cv_lib_svld_dlopen+:} false; then :
14137   $as_echo_n "(cached) " >&6
14138 else
14139   ac_check_lib_save_LIBS=$LIBS
14140 LIBS="-lsvld  $LIBS"
14141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14142 /* end confdefs.h.  */
14143
14144 /* Override any GCC internal prototype to avoid an error.
14145    Use char because int might match the return type of a GCC
14146    builtin and then its argument prototype would still apply.  */
14147 #ifdef __cplusplus
14148 extern "C"
14149 #endif
14150 char dlopen ();
14151 int
14152 main ()
14153 {
14154 return dlopen ();
14155   ;
14156   return 0;
14157 }
14158 _ACEOF
14159 if ac_fn_c_try_link "$LINENO"; then :
14160   ac_cv_lib_svld_dlopen=yes
14161 else
14162   ac_cv_lib_svld_dlopen=no
14163 fi
14164 rm -f core conftest.err conftest.$ac_objext \
14165     conftest$ac_exeext conftest.$ac_ext
14166 LIBS=$ac_check_lib_save_LIBS
14167 fi
14168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
14169 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
14170 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
14171   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
14172 else
14173   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
14174 $as_echo_n "checking for dld_link in -ldld... " >&6; }
14175 if ${ac_cv_lib_dld_dld_link+:} false; then :
14176   $as_echo_n "(cached) " >&6
14177 else
14178   ac_check_lib_save_LIBS=$LIBS
14179 LIBS="-ldld  $LIBS"
14180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14181 /* end confdefs.h.  */
14182
14183 /* Override any GCC internal prototype to avoid an error.
14184    Use char because int might match the return type of a GCC
14185    builtin and then its argument prototype would still apply.  */
14186 #ifdef __cplusplus
14187 extern "C"
14188 #endif
14189 char dld_link ();
14190 int
14191 main ()
14192 {
14193 return dld_link ();
14194   ;
14195   return 0;
14196 }
14197 _ACEOF
14198 if ac_fn_c_try_link "$LINENO"; then :
14199   ac_cv_lib_dld_dld_link=yes
14200 else
14201   ac_cv_lib_dld_dld_link=no
14202 fi
14203 rm -f core conftest.err conftest.$ac_objext \
14204     conftest$ac_exeext conftest.$ac_ext
14205 LIBS=$ac_check_lib_save_LIBS
14206 fi
14207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
14208 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
14209 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
14210   lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
14211 fi
14212
14213
14214 fi
14215
14216
14217 fi
14218
14219
14220 fi
14221
14222
14223 fi
14224
14225
14226 fi
14227
14228     ;;
14229   esac
14230
14231   if test no = "$lt_cv_dlopen"; then
14232     enable_dlopen=no
14233   else
14234     enable_dlopen=yes
14235   fi
14236
14237   case $lt_cv_dlopen in
14238   dlopen)
14239     save_CPPFLAGS=$CPPFLAGS
14240     test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14241
14242     save_LDFLAGS=$LDFLAGS
14243     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14244
14245     save_LIBS=$LIBS
14246     LIBS="$lt_cv_dlopen_libs $LIBS"
14247
14248     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
14249 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
14250 if ${lt_cv_dlopen_self+:} false; then :
14251   $as_echo_n "(cached) " >&6
14252 else
14253           if test yes = "$cross_compiling"; then :
14254   lt_cv_dlopen_self=cross
14255 else
14256   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14257   lt_status=$lt_dlunknown
14258   cat > conftest.$ac_ext <<_LT_EOF
14259 #line $LINENO "configure"
14260 #include "confdefs.h"
14261
14262 #if HAVE_DLFCN_H
14263 #include <dlfcn.h>
14264 #endif
14265
14266 #include <stdio.h>
14267
14268 #ifdef RTLD_GLOBAL
14269 #  define LT_DLGLOBAL           RTLD_GLOBAL
14270 #else
14271 #  ifdef DL_GLOBAL
14272 #    define LT_DLGLOBAL         DL_GLOBAL
14273 #  else
14274 #    define LT_DLGLOBAL         0
14275 #  endif
14276 #endif
14277
14278 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14279    find out it does not work in some platform. */
14280 #ifndef LT_DLLAZY_OR_NOW
14281 #  ifdef RTLD_LAZY
14282 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14283 #  else
14284 #    ifdef DL_LAZY
14285 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14286 #    else
14287 #      ifdef RTLD_NOW
14288 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14289 #      else
14290 #        ifdef DL_NOW
14291 #          define LT_DLLAZY_OR_NOW      DL_NOW
14292 #        else
14293 #          define LT_DLLAZY_OR_NOW      0
14294 #        endif
14295 #      endif
14296 #    endif
14297 #  endif
14298 #endif
14299
14300 /* When -fvisibility=hidden is used, assume the code has been annotated
14301    correspondingly for the symbols needed.  */
14302 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14303 int fnord () __attribute__((visibility("default")));
14304 #endif
14305
14306 int fnord () { return 42; }
14307 int main ()
14308 {
14309   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14310   int status = $lt_dlunknown;
14311
14312   if (self)
14313     {
14314       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14315       else
14316         {
14317           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14318           else puts (dlerror ());
14319         }
14320       /* dlclose (self); */
14321     }
14322   else
14323     puts (dlerror ());
14324
14325   return status;
14326 }
14327 _LT_EOF
14328   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14329   (eval $ac_link) 2>&5
14330   ac_status=$?
14331   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14332   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14333     (./conftest; exit; ) >&5 2>/dev/null
14334     lt_status=$?
14335     case x$lt_status in
14336       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14337       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14338       x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14339     esac
14340   else :
14341     # compilation failed
14342     lt_cv_dlopen_self=no
14343   fi
14344 fi
14345 rm -fr conftest*
14346
14347
14348 fi
14349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14350 $as_echo "$lt_cv_dlopen_self" >&6; }
14351
14352     if test yes = "$lt_cv_dlopen_self"; then
14353       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14354       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14355 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
14356 if ${lt_cv_dlopen_self_static+:} false; then :
14357   $as_echo_n "(cached) " >&6
14358 else
14359           if test yes = "$cross_compiling"; then :
14360   lt_cv_dlopen_self_static=cross
14361 else
14362   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14363   lt_status=$lt_dlunknown
14364   cat > conftest.$ac_ext <<_LT_EOF
14365 #line $LINENO "configure"
14366 #include "confdefs.h"
14367
14368 #if HAVE_DLFCN_H
14369 #include <dlfcn.h>
14370 #endif
14371
14372 #include <stdio.h>
14373
14374 #ifdef RTLD_GLOBAL
14375 #  define LT_DLGLOBAL           RTLD_GLOBAL
14376 #else
14377 #  ifdef DL_GLOBAL
14378 #    define LT_DLGLOBAL         DL_GLOBAL
14379 #  else
14380 #    define LT_DLGLOBAL         0
14381 #  endif
14382 #endif
14383
14384 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14385    find out it does not work in some platform. */
14386 #ifndef LT_DLLAZY_OR_NOW
14387 #  ifdef RTLD_LAZY
14388 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14389 #  else
14390 #    ifdef DL_LAZY
14391 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14392 #    else
14393 #      ifdef RTLD_NOW
14394 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14395 #      else
14396 #        ifdef DL_NOW
14397 #          define LT_DLLAZY_OR_NOW      DL_NOW
14398 #        else
14399 #          define LT_DLLAZY_OR_NOW      0
14400 #        endif
14401 #      endif
14402 #    endif
14403 #  endif
14404 #endif
14405
14406 /* When -fvisibility=hidden is used, assume the code has been annotated
14407    correspondingly for the symbols needed.  */
14408 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14409 int fnord () __attribute__((visibility("default")));
14410 #endif
14411
14412 int fnord () { return 42; }
14413 int main ()
14414 {
14415   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14416   int status = $lt_dlunknown;
14417
14418   if (self)
14419     {
14420       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14421       else
14422         {
14423           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14424           else puts (dlerror ());
14425         }
14426       /* dlclose (self); */
14427     }
14428   else
14429     puts (dlerror ());
14430
14431   return status;
14432 }
14433 _LT_EOF
14434   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14435   (eval $ac_link) 2>&5
14436   ac_status=$?
14437   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14438   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14439     (./conftest; exit; ) >&5 2>/dev/null
14440     lt_status=$?
14441     case x$lt_status in
14442       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14443       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14444       x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14445     esac
14446   else :
14447     # compilation failed
14448     lt_cv_dlopen_self_static=no
14449   fi
14450 fi
14451 rm -fr conftest*
14452
14453
14454 fi
14455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14456 $as_echo "$lt_cv_dlopen_self_static" >&6; }
14457     fi
14458
14459     CPPFLAGS=$save_CPPFLAGS
14460     LDFLAGS=$save_LDFLAGS
14461     LIBS=$save_LIBS
14462     ;;
14463   esac
14464
14465   case $lt_cv_dlopen_self in
14466   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14467   *) enable_dlopen_self=unknown ;;
14468   esac
14469
14470   case $lt_cv_dlopen_self_static in
14471   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14472   *) enable_dlopen_self_static=unknown ;;
14473   esac
14474 fi
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492 striplib=
14493 old_striplib=
14494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14495 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
14496 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14497   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14498   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14500 $as_echo "yes" >&6; }
14501 else
14502 # FIXME - insert some real tests, host_os isn't really good enough
14503   case $host_os in
14504   darwin*)
14505     if test -n "$STRIP"; then
14506       striplib="$STRIP -x"
14507       old_striplib="$STRIP -S"
14508       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14509 $as_echo "yes" >&6; }
14510     else
14511       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14512 $as_echo "no" >&6; }
14513     fi
14514     ;;
14515   *)
14516     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14517 $as_echo "no" >&6; }
14518     ;;
14519   esac
14520 fi
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533   # Report what library types will actually be built
14534   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14535 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
14536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14537 $as_echo "$can_build_shared" >&6; }
14538
14539   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14540 $as_echo_n "checking whether to build shared libraries... " >&6; }
14541   test no = "$can_build_shared" && enable_shared=no
14542
14543   # On AIX, shared libraries and static libraries use the same namespace, and
14544   # are all built from PIC.
14545   case $host_os in
14546   aix3*)
14547     test yes = "$enable_shared" && enable_static=no
14548     if test -n "$RANLIB"; then
14549       archive_cmds="$archive_cmds~\$RANLIB \$lib"
14550       postinstall_cmds='$RANLIB $lib'
14551     fi
14552     ;;
14553
14554   aix[4-9]*)
14555     if test ia64 != "$host_cpu"; then
14556       case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14557       yes,aix,yes) ;;                   # shared object as lib.so file only
14558       yes,svr4,*) ;;                    # shared object as lib.so archive member only
14559       yes,*) enable_static=no ;;        # shared object in lib.a archive as well
14560       esac
14561     fi
14562     ;;
14563   esac
14564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14565 $as_echo "$enable_shared" >&6; }
14566
14567   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14568 $as_echo_n "checking whether to build static libraries... " >&6; }
14569   # Make sure either enable_shared or enable_static is yes.
14570   test yes = "$enable_shared" || enable_static=yes
14571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14572 $as_echo "$enable_static" >&6; }
14573
14574
14575
14576
14577 fi
14578 ac_ext=c
14579 ac_cpp='$CPP $CPPFLAGS'
14580 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14581 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14582 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14583
14584 CC=$lt_save_CC
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600         ac_config_commands="$ac_config_commands libtool"
14601
14602
14603
14604
14605 # Only expand once:
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
14618         if test -n "$ac_tool_prefix"; then
14619   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
14620 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
14621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14622 $as_echo_n "checking for $ac_word... " >&6; }
14623 if ${ac_cv_path_PKG_CONFIG+:} false; then :
14624   $as_echo_n "(cached) " >&6
14625 else
14626   case $PKG_CONFIG in
14627   [\\/]* | ?:[\\/]*)
14628   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
14629   ;;
14630   *)
14631   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14632 for as_dir in $PATH
14633 do
14634   IFS=$as_save_IFS
14635   test -z "$as_dir" && as_dir=.
14636     for ac_exec_ext in '' $ac_executable_extensions; do
14637   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14638     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14639     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14640     break 2
14641   fi
14642 done
14643   done
14644 IFS=$as_save_IFS
14645
14646   ;;
14647 esac
14648 fi
14649 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
14650 if test -n "$PKG_CONFIG"; then
14651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
14652 $as_echo "$PKG_CONFIG" >&6; }
14653 else
14654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14655 $as_echo "no" >&6; }
14656 fi
14657
14658
14659 fi
14660 if test -z "$ac_cv_path_PKG_CONFIG"; then
14661   ac_pt_PKG_CONFIG=$PKG_CONFIG
14662   # Extract the first word of "pkg-config", so it can be a program name with args.
14663 set dummy pkg-config; ac_word=$2
14664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14665 $as_echo_n "checking for $ac_word... " >&6; }
14666 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
14667   $as_echo_n "(cached) " >&6
14668 else
14669   case $ac_pt_PKG_CONFIG in
14670   [\\/]* | ?:[\\/]*)
14671   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
14672   ;;
14673   *)
14674   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14675 for as_dir in $PATH
14676 do
14677   IFS=$as_save_IFS
14678   test -z "$as_dir" && as_dir=.
14679     for ac_exec_ext in '' $ac_executable_extensions; do
14680   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14681     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14682     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14683     break 2
14684   fi
14685 done
14686   done
14687 IFS=$as_save_IFS
14688
14689   ;;
14690 esac
14691 fi
14692 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
14693 if test -n "$ac_pt_PKG_CONFIG"; then
14694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
14695 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
14696 else
14697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14698 $as_echo "no" >&6; }
14699 fi
14700
14701   if test "x$ac_pt_PKG_CONFIG" = x; then
14702     PKG_CONFIG=""
14703   else
14704     case $cross_compiling:$ac_tool_warned in
14705 yes:)
14706 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14707 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14708 ac_tool_warned=yes ;;
14709 esac
14710     PKG_CONFIG=$ac_pt_PKG_CONFIG
14711   fi
14712 else
14713   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
14714 fi
14715
14716 fi
14717 if test -n "$PKG_CONFIG"; then
14718         _pkg_min_version=0.9.0
14719         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
14720 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
14721         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
14722                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14723 $as_echo "yes" >&6; }
14724         else
14725                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14726 $as_echo "no" >&6; }
14727                 PKG_CONFIG=""
14728         fi
14729 fi
14730
14731 # Checks for header files.
14732 for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/select.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 sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h ifaddrs.h
14733 do :
14734   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14735 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
14736 "
14737 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14738   cat >>confdefs.h <<_ACEOF
14739 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14740 _ACEOF
14741
14742 fi
14743
14744 done
14745
14746 # net/if.h portability for Darwin see:
14747 # https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html
14748 for ac_header in net/if.h
14749 do :
14750   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
14751 #include <stdio.h>
14752 #ifdef STDC_HEADERS
14753 # include <stdlib.h>
14754 # include <stddef.h>
14755 #else
14756 # ifdef HAVE_STDLIB_H
14757 #  include <stdlib.h>
14758 # endif
14759 #endif
14760 #ifdef HAVE_SYS_SOCKET_H
14761 # include <sys/socket.h>
14762 #endif
14763
14764 "
14765 if test "x$ac_cv_header_net_if_h" = xyes; then :
14766   cat >>confdefs.h <<_ACEOF
14767 #define HAVE_NET_IF_H 1
14768 _ACEOF
14769
14770 fi
14771
14772 done
14773
14774
14775 # Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH
14776 for ac_header in TargetConditionals.h
14777 do :
14778   ac_fn_c_check_header_mongrel "$LINENO" "TargetConditionals.h" "ac_cv_header_TargetConditionals_h" "$ac_includes_default"
14779 if test "x$ac_cv_header_TargetConditionals_h" = xyes; then :
14780   cat >>confdefs.h <<_ACEOF
14781 #define HAVE_TARGETCONDITIONALS_H 1
14782 _ACEOF
14783
14784 fi
14785
14786 done
14787
14788
14789 # check for types.
14790 # Using own tests for int64* because autoconf builtin only give 32bit.
14791 ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
14792 if test "x$ac_cv_type_int8_t" = xyes; then :
14793
14794 else
14795
14796 cat >>confdefs.h <<_ACEOF
14797 #define int8_t signed char
14798 _ACEOF
14799
14800 fi
14801
14802 ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
14803 if test "x$ac_cv_type_int16_t" = xyes; then :
14804
14805 else
14806
14807 cat >>confdefs.h <<_ACEOF
14808 #define int16_t short
14809 _ACEOF
14810
14811 fi
14812
14813 ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
14814 if test "x$ac_cv_type_int32_t" = xyes; then :
14815
14816 else
14817
14818 cat >>confdefs.h <<_ACEOF
14819 #define int32_t int
14820 _ACEOF
14821
14822 fi
14823
14824 ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
14825 if test "x$ac_cv_type_int64_t" = xyes; then :
14826
14827 else
14828
14829 cat >>confdefs.h <<_ACEOF
14830 #define int64_t long long
14831 _ACEOF
14832
14833 fi
14834
14835 ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
14836 if test "x$ac_cv_type_uint8_t" = xyes; then :
14837
14838 else
14839
14840 cat >>confdefs.h <<_ACEOF
14841 #define uint8_t unsigned char
14842 _ACEOF
14843
14844 fi
14845
14846 ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
14847 if test "x$ac_cv_type_uint16_t" = xyes; then :
14848
14849 else
14850
14851 cat >>confdefs.h <<_ACEOF
14852 #define uint16_t unsigned short
14853 _ACEOF
14854
14855 fi
14856
14857 ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
14858 if test "x$ac_cv_type_uint32_t" = xyes; then :
14859
14860 else
14861
14862 cat >>confdefs.h <<_ACEOF
14863 #define uint32_t unsigned int
14864 _ACEOF
14865
14866 fi
14867
14868 ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
14869 if test "x$ac_cv_type_uint64_t" = xyes; then :
14870
14871 else
14872
14873 cat >>confdefs.h <<_ACEOF
14874 #define uint64_t unsigned long long
14875 _ACEOF
14876
14877 fi
14878
14879 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14880 if test "x$ac_cv_type_size_t" = xyes; then :
14881
14882 else
14883
14884 cat >>confdefs.h <<_ACEOF
14885 #define size_t unsigned int
14886 _ACEOF
14887
14888 fi
14889
14890 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
14891 if test "x$ac_cv_type_ssize_t" = xyes; then :
14892
14893 else
14894
14895 cat >>confdefs.h <<_ACEOF
14896 #define ssize_t int
14897 _ACEOF
14898
14899 fi
14900
14901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
14902 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
14903 if ${ac_cv_type_uid_t+:} false; then :
14904   $as_echo_n "(cached) " >&6
14905 else
14906   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14907 /* end confdefs.h.  */
14908 #include <sys/types.h>
14909
14910 _ACEOF
14911 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14912   $EGREP "uid_t" >/dev/null 2>&1; then :
14913   ac_cv_type_uid_t=yes
14914 else
14915   ac_cv_type_uid_t=no
14916 fi
14917 rm -f conftest*
14918
14919 fi
14920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
14921 $as_echo "$ac_cv_type_uid_t" >&6; }
14922 if test $ac_cv_type_uid_t = no; then
14923
14924 $as_echo "#define uid_t int" >>confdefs.h
14925
14926
14927 $as_echo "#define gid_t int" >>confdefs.h
14928
14929 fi
14930
14931 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14932 if test "x$ac_cv_type_pid_t" = xyes; then :
14933
14934 else
14935
14936 cat >>confdefs.h <<_ACEOF
14937 #define pid_t int
14938 _ACEOF
14939
14940 fi
14941
14942 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
14943 if test "x$ac_cv_type_off_t" = xyes; then :
14944
14945 else
14946
14947 cat >>confdefs.h <<_ACEOF
14948 #define off_t long int
14949 _ACEOF
14950
14951 fi
14952
14953 ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
14954 $ac_includes_default
14955 #ifdef HAVE_WINSOCK2_H
14956 #  include <winsock2.h>
14957 #endif
14958
14959 "
14960 if test "x$ac_cv_type_u_char" = xyes; then :
14961
14962 else
14963
14964 $as_echo "#define u_char unsigned char" >>confdefs.h
14965
14966 fi
14967
14968 ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
14969 $ac_includes_default
14970 #ifdef HAVE_SYS_RESOURCE_H
14971 #  include <sys/resource.h>
14972 #endif
14973
14974 "
14975 if test "x$ac_cv_type_rlim_t" = xyes; then :
14976
14977 else
14978
14979 $as_echo "#define rlim_t unsigned long" >>confdefs.h
14980
14981 fi
14982
14983
14984 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
14985 $ac_includes_default
14986 #ifdef HAVE_SYS_SOCKET_H
14987 #  include <sys/socket.h>
14988 #endif
14989 #ifdef HAVE_WS2TCPIP_H
14990 #  include <ws2tcpip.h>
14991 #endif
14992
14993 "
14994 if test "x$ac_cv_type_socklen_t" = xyes; then :
14995
14996 else
14997
14998 $as_echo "#define socklen_t int" >>confdefs.h
14999
15000 fi
15001
15002  ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
15003 $ac_includes_default
15004 #ifdef HAVE_SYS_TYPES_H
15005 # include <sys/types.h>
15006 #endif
15007 #ifdef HAVE_NETINET_IN_H
15008 # include <netinet/in.h>
15009 #endif
15010
15011 "
15012 if test "x$ac_cv_type_in_addr_t" = xyes; then :
15013
15014 else
15015
15016 $as_echo "#define in_addr_t uint32_t" >>confdefs.h
15017
15018 fi
15019
15020  ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
15021 $ac_includes_default
15022 #ifdef HAVE_SYS_TYPES_H
15023 # include <sys/types.h>
15024 #endif
15025 #ifdef HAVE_NETINET_IN_H
15026 # include <netinet/in.h>
15027 #endif
15028
15029 "
15030 if test "x$ac_cv_type_in_port_t" = xyes; then :
15031
15032 else
15033
15034 $as_echo "#define in_port_t uint16_t" >>confdefs.h
15035
15036 fi
15037
15038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
15039 $as_echo_n "checking if memcmp compares unsigned... " >&6; }
15040 if test "$cross_compiling" = yes; then :
15041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
15042 $as_echo "cross-compile no" >&6; }
15043
15044 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
15045
15046   case " $LIBOBJS " in
15047   *" memcmp.$ac_objext "* ) ;;
15048   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
15049  ;;
15050 esac
15051
15052
15053 else
15054   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15055 /* end confdefs.h.  */
15056
15057 #include <stdio.h>
15058 #include <stdlib.h>
15059 #include <string.h>
15060 int main(void)
15061 {
15062         char a = 255, b = 0;
15063         if(memcmp(&a, &b, 1) < 0)
15064                 return 1;
15065         return 0;
15066 }
15067
15068 _ACEOF
15069 if ac_fn_c_try_run "$LINENO"; then :
15070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15071 $as_echo "yes" >&6; }
15072 else
15073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15074 $as_echo "no" >&6; }
15075
15076 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
15077
15078   case " $LIBOBJS " in
15079   *" memcmp.$ac_objext "* ) ;;
15080   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
15081  ;;
15082 esac
15083
15084
15085 fi
15086 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15087   conftest.$ac_objext conftest.beam conftest.$ac_ext
15088 fi
15089
15090
15091 # The cast to long int works around a bug in the HP C Compiler
15092 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15093 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15094 # This bug is HP SR number 8606223364.
15095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
15096 $as_echo_n "checking size of time_t... " >&6; }
15097 if ${ac_cv_sizeof_time_t+:} false; then :
15098   $as_echo_n "(cached) " >&6
15099 else
15100   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
15101 $ac_includes_default
15102 #ifdef TIME_WITH_SYS_TIME
15103 # include <sys/time.h>
15104 # include <time.h>
15105 #else
15106 # ifdef HAVE_SYS_TIME_H
15107 #  include <sys/time.h>
15108 # else
15109 #  include <time.h>
15110 # endif
15111 #endif
15112
15113 "; then :
15114
15115 else
15116   if test "$ac_cv_type_time_t" = yes; then
15117      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15118 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15119 as_fn_error 77 "cannot compute sizeof (time_t)
15120 See \`config.log' for more details" "$LINENO" 5; }
15121    else
15122      ac_cv_sizeof_time_t=0
15123    fi
15124 fi
15125
15126 fi
15127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
15128 $as_echo "$ac_cv_sizeof_time_t" >&6; }
15129
15130
15131
15132 cat >>confdefs.h <<_ACEOF
15133 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
15134 _ACEOF
15135
15136
15137 # The cast to long int works around a bug in the HP C Compiler
15138 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15139 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15140 # This bug is HP SR number 8606223364.
15141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
15142 $as_echo_n "checking size of size_t... " >&6; }
15143 if ${ac_cv_sizeof_size_t+:} false; then :
15144   $as_echo_n "(cached) " >&6
15145 else
15146   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
15147
15148 else
15149   if test "$ac_cv_type_size_t" = yes; then
15150      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15151 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15152 as_fn_error 77 "cannot compute sizeof (size_t)
15153 See \`config.log' for more details" "$LINENO" 5; }
15154    else
15155      ac_cv_sizeof_size_t=0
15156    fi
15157 fi
15158
15159 fi
15160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
15161 $as_echo "$ac_cv_sizeof_size_t" >&6; }
15162
15163
15164
15165 cat >>confdefs.h <<_ACEOF
15166 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
15167 _ACEOF
15168
15169
15170
15171 # add option to disable the evil rpath
15172
15173 # Check whether --enable-rpath was given.
15174 if test "${enable_rpath+set}" = set; then :
15175   enableval=$enable_rpath; enable_rpath=$enableval
15176 else
15177   enable_rpath=yes
15178 fi
15179
15180 if test "x$enable_rpath" = xno; then
15181                 ac_config_commands="$ac_config_commands disable-rpath"
15182
15183 fi
15184
15185
15186
15187 # check to see if libraries are needed for these functions.
15188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
15189 $as_echo_n "checking for library containing inet_pton... " >&6; }
15190 if ${ac_cv_search_inet_pton+:} false; then :
15191   $as_echo_n "(cached) " >&6
15192 else
15193   ac_func_search_save_LIBS=$LIBS
15194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15195 /* end confdefs.h.  */
15196
15197 /* Override any GCC internal prototype to avoid an error.
15198    Use char because int might match the return type of a GCC
15199    builtin and then its argument prototype would still apply.  */
15200 #ifdef __cplusplus
15201 extern "C"
15202 #endif
15203 char inet_pton ();
15204 int
15205 main ()
15206 {
15207 return inet_pton ();
15208   ;
15209   return 0;
15210 }
15211 _ACEOF
15212 for ac_lib in '' nsl; do
15213   if test -z "$ac_lib"; then
15214     ac_res="none required"
15215   else
15216     ac_res=-l$ac_lib
15217     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15218   fi
15219   if ac_fn_c_try_link "$LINENO"; then :
15220   ac_cv_search_inet_pton=$ac_res
15221 fi
15222 rm -f core conftest.err conftest.$ac_objext \
15223     conftest$ac_exeext
15224   if ${ac_cv_search_inet_pton+:} false; then :
15225   break
15226 fi
15227 done
15228 if ${ac_cv_search_inet_pton+:} false; then :
15229
15230 else
15231   ac_cv_search_inet_pton=no
15232 fi
15233 rm conftest.$ac_ext
15234 LIBS=$ac_func_search_save_LIBS
15235 fi
15236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
15237 $as_echo "$ac_cv_search_inet_pton" >&6; }
15238 ac_res=$ac_cv_search_inet_pton
15239 if test "$ac_res" != no; then :
15240   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15241
15242 fi
15243
15244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
15245 $as_echo_n "checking for library containing socket... " >&6; }
15246 if ${ac_cv_search_socket+:} false; then :
15247   $as_echo_n "(cached) " >&6
15248 else
15249   ac_func_search_save_LIBS=$LIBS
15250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15251 /* end confdefs.h.  */
15252
15253 /* Override any GCC internal prototype to avoid an error.
15254    Use char because int might match the return type of a GCC
15255    builtin and then its argument prototype would still apply.  */
15256 #ifdef __cplusplus
15257 extern "C"
15258 #endif
15259 char socket ();
15260 int
15261 main ()
15262 {
15263 return socket ();
15264   ;
15265   return 0;
15266 }
15267 _ACEOF
15268 for ac_lib in '' socket; do
15269   if test -z "$ac_lib"; then
15270     ac_res="none required"
15271   else
15272     ac_res=-l$ac_lib
15273     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15274   fi
15275   if ac_fn_c_try_link "$LINENO"; then :
15276   ac_cv_search_socket=$ac_res
15277 fi
15278 rm -f core conftest.err conftest.$ac_objext \
15279     conftest$ac_exeext
15280   if ${ac_cv_search_socket+:} false; then :
15281   break
15282 fi
15283 done
15284 if ${ac_cv_search_socket+:} false; then :
15285
15286 else
15287   ac_cv_search_socket=no
15288 fi
15289 rm conftest.$ac_ext
15290 LIBS=$ac_func_search_save_LIBS
15291 fi
15292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
15293 $as_echo "$ac_cv_search_socket" >&6; }
15294 ac_res=$ac_cv_search_socket
15295 if test "$ac_res" != no; then :
15296   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15297
15298 fi
15299
15300
15301 # check wether strptime also works
15302
15303 # check some functions of the OS before linking libs (while still runnable).
15304 for ac_header in unistd.h
15305 do :
15306   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
15307 if test "x$ac_cv_header_unistd_h" = xyes; then :
15308   cat >>confdefs.h <<_ACEOF
15309 #define HAVE_UNISTD_H 1
15310 _ACEOF
15311
15312 fi
15313
15314 done
15315
15316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
15317 $as_echo_n "checking for working chown... " >&6; }
15318 if ${ac_cv_func_chown_works+:} false; then :
15319   $as_echo_n "(cached) " >&6
15320 else
15321   if test "$cross_compiling" = yes; then :
15322   ac_cv_func_chown_works=no
15323 else
15324   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15325 /* end confdefs.h.  */
15326 $ac_includes_default
15327 #include <fcntl.h>
15328
15329 int
15330 main ()
15331 {
15332   char *f = "conftest.chown";
15333   struct stat before, after;
15334
15335   if (creat (f, 0600) < 0)
15336     return 1;
15337   if (stat (f, &before) < 0)
15338     return 1;
15339   if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
15340     return 1;
15341   if (stat (f, &after) < 0)
15342     return 1;
15343   return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
15344
15345   ;
15346   return 0;
15347 }
15348 _ACEOF
15349 if ac_fn_c_try_run "$LINENO"; then :
15350   ac_cv_func_chown_works=yes
15351 else
15352   ac_cv_func_chown_works=no
15353 fi
15354 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15355   conftest.$ac_objext conftest.beam conftest.$ac_ext
15356 fi
15357
15358 rm -f conftest.chown
15359
15360 fi
15361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
15362 $as_echo "$ac_cv_func_chown_works" >&6; }
15363 if test $ac_cv_func_chown_works = yes; then
15364
15365 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
15366
15367 fi
15368
15369 for ac_header in vfork.h
15370 do :
15371   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15372 if test "x$ac_cv_header_vfork_h" = xyes; then :
15373   cat >>confdefs.h <<_ACEOF
15374 #define HAVE_VFORK_H 1
15375 _ACEOF
15376
15377 fi
15378
15379 done
15380
15381 for ac_func in fork vfork
15382 do :
15383   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15384 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15385 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15386   cat >>confdefs.h <<_ACEOF
15387 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15388 _ACEOF
15389
15390 fi
15391 done
15392
15393 if test "x$ac_cv_func_fork" = xyes; then
15394   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15395 $as_echo_n "checking for working fork... " >&6; }
15396 if ${ac_cv_func_fork_works+:} false; then :
15397   $as_echo_n "(cached) " >&6
15398 else
15399   if test "$cross_compiling" = yes; then :
15400   ac_cv_func_fork_works=cross
15401 else
15402   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15403 /* end confdefs.h.  */
15404 $ac_includes_default
15405 int
15406 main ()
15407 {
15408
15409           /* By Ruediger Kuhlmann. */
15410           return fork () < 0;
15411
15412   ;
15413   return 0;
15414 }
15415 _ACEOF
15416 if ac_fn_c_try_run "$LINENO"; then :
15417   ac_cv_func_fork_works=yes
15418 else
15419   ac_cv_func_fork_works=no
15420 fi
15421 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15422   conftest.$ac_objext conftest.beam conftest.$ac_ext
15423 fi
15424
15425 fi
15426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15427 $as_echo "$ac_cv_func_fork_works" >&6; }
15428
15429 else
15430   ac_cv_func_fork_works=$ac_cv_func_fork
15431 fi
15432 if test "x$ac_cv_func_fork_works" = xcross; then
15433   case $host in
15434     *-*-amigaos* | *-*-msdosdjgpp*)
15435       # Override, as these systems have only a dummy fork() stub
15436       ac_cv_func_fork_works=no
15437       ;;
15438     *)
15439       ac_cv_func_fork_works=yes
15440       ;;
15441   esac
15442   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15443 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15444 fi
15445 ac_cv_func_vfork_works=$ac_cv_func_vfork
15446 if test "x$ac_cv_func_vfork" = xyes; then
15447   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15448 $as_echo_n "checking for working vfork... " >&6; }
15449 if ${ac_cv_func_vfork_works+:} false; then :
15450   $as_echo_n "(cached) " >&6
15451 else
15452   if test "$cross_compiling" = yes; then :
15453   ac_cv_func_vfork_works=cross
15454 else
15455   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15456 /* end confdefs.h.  */
15457 /* Thanks to Paul Eggert for this test.  */
15458 $ac_includes_default
15459 #include <sys/wait.h>
15460 #ifdef HAVE_VFORK_H
15461 # include <vfork.h>
15462 #endif
15463 /* On some sparc systems, changes by the child to local and incoming
15464    argument registers are propagated back to the parent.  The compiler
15465    is told about this with #include <vfork.h>, but some compilers
15466    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15467    static variable whose address is put into a register that is
15468    clobbered by the vfork.  */
15469 static void
15470 #ifdef __cplusplus
15471 sparc_address_test (int arg)
15472 # else
15473 sparc_address_test (arg) int arg;
15474 #endif
15475 {
15476   static pid_t child;
15477   if (!child) {
15478     child = vfork ();
15479     if (child < 0) {
15480       perror ("vfork");
15481       _exit(2);
15482     }
15483     if (!child) {
15484       arg = getpid();
15485       write(-1, "", 0);
15486       _exit (arg);
15487     }
15488   }
15489 }
15490
15491 int
15492 main ()
15493 {
15494   pid_t parent = getpid ();
15495   pid_t child;
15496
15497   sparc_address_test (0);
15498
15499   child = vfork ();
15500
15501   if (child == 0) {
15502     /* Here is another test for sparc vfork register problems.  This
15503        test uses lots of local variables, at least as many local
15504        variables as main has allocated so far including compiler
15505        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15506        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15507        reuse the register of parent for one of the local variables,
15508        since it will think that parent can't possibly be used any more
15509        in this routine.  Assigning to the local variable will thus
15510        munge parent in the parent process.  */
15511     pid_t
15512       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15513       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15514     /* Convince the compiler that p..p7 are live; otherwise, it might
15515        use the same hardware register for all 8 local variables.  */
15516     if (p != p1 || p != p2 || p != p3 || p != p4
15517         || p != p5 || p != p6 || p != p7)
15518       _exit(1);
15519
15520     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15521        from child file descriptors.  If the child closes a descriptor
15522        before it execs or exits, this munges the parent's descriptor
15523        as well.  Test for this by closing stdout in the child.  */
15524     _exit(close(fileno(stdout)) != 0);
15525   } else {
15526     int status;
15527     struct stat st;
15528
15529     while (wait(&status) != child)
15530       ;
15531     return (
15532          /* Was there some problem with vforking?  */
15533          child < 0
15534
15535          /* Did the child fail?  (This shouldn't happen.)  */
15536          || status
15537
15538          /* Did the vfork/compiler bug occur?  */
15539          || parent != getpid()
15540
15541          /* Did the file descriptor bug occur?  */
15542          || fstat(fileno(stdout), &st) != 0
15543          );
15544   }
15545 }
15546 _ACEOF
15547 if ac_fn_c_try_run "$LINENO"; then :
15548   ac_cv_func_vfork_works=yes
15549 else
15550   ac_cv_func_vfork_works=no
15551 fi
15552 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15553   conftest.$ac_objext conftest.beam conftest.$ac_ext
15554 fi
15555
15556 fi
15557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15558 $as_echo "$ac_cv_func_vfork_works" >&6; }
15559
15560 fi;
15561 if test "x$ac_cv_func_fork_works" = xcross; then
15562   ac_cv_func_vfork_works=$ac_cv_func_vfork
15563   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15564 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15565 fi
15566
15567 if test "x$ac_cv_func_vfork_works" = xyes; then
15568
15569 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15570
15571 else
15572
15573 $as_echo "#define vfork fork" >>confdefs.h
15574
15575 fi
15576 if test "x$ac_cv_func_fork_works" = xyes; then
15577
15578 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15579
15580 fi
15581
15582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
15583 $as_echo_n "checking return type of signal handlers... " >&6; }
15584 if ${ac_cv_type_signal+:} false; then :
15585   $as_echo_n "(cached) " >&6
15586 else
15587   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15588 /* end confdefs.h.  */
15589 #include <sys/types.h>
15590 #include <signal.h>
15591
15592 int
15593 main ()
15594 {
15595 return *(signal (0, 0)) (0) == 1;
15596   ;
15597   return 0;
15598 }
15599 _ACEOF
15600 if ac_fn_c_try_compile "$LINENO"; then :
15601   ac_cv_type_signal=int
15602 else
15603   ac_cv_type_signal=void
15604 fi
15605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15606 fi
15607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
15608 $as_echo "$ac_cv_type_signal" >&6; }
15609
15610 cat >>confdefs.h <<_ACEOF
15611 #define RETSIGTYPE $ac_cv_type_signal
15612 _ACEOF
15613
15614
15615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15616 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15617 if ${ac_cv_sys_largefile_source+:} false; then :
15618   $as_echo_n "(cached) " >&6
15619 else
15620   while :; do
15621   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15622 /* end confdefs.h.  */
15623 #include <sys/types.h> /* for off_t */
15624      #include <stdio.h>
15625 int
15626 main ()
15627 {
15628 int (*fp) (FILE *, off_t, int) = fseeko;
15629      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15630   ;
15631   return 0;
15632 }
15633 _ACEOF
15634 if ac_fn_c_try_link "$LINENO"; then :
15635   ac_cv_sys_largefile_source=no; break
15636 fi
15637 rm -f core conftest.err conftest.$ac_objext \
15638     conftest$ac_exeext conftest.$ac_ext
15639   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15640 /* end confdefs.h.  */
15641 #define _LARGEFILE_SOURCE 1
15642 #include <sys/types.h> /* for off_t */
15643      #include <stdio.h>
15644 int
15645 main ()
15646 {
15647 int (*fp) (FILE *, off_t, int) = fseeko;
15648      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15649   ;
15650   return 0;
15651 }
15652 _ACEOF
15653 if ac_fn_c_try_link "$LINENO"; then :
15654   ac_cv_sys_largefile_source=1; break
15655 fi
15656 rm -f core conftest.err conftest.$ac_objext \
15657     conftest$ac_exeext conftest.$ac_ext
15658   ac_cv_sys_largefile_source=unknown
15659   break
15660 done
15661 fi
15662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15663 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15664 case $ac_cv_sys_largefile_source in #(
15665   no | unknown) ;;
15666   *)
15667 cat >>confdefs.h <<_ACEOF
15668 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15669 _ACEOF
15670 ;;
15671 esac
15672 rm -rf conftest*
15673
15674 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15675 # in glibc 2.1.3, but that breaks too many other things.
15676 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15677 if test $ac_cv_sys_largefile_source != unknown; then
15678
15679 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15680
15681 fi
15682
15683
15684 # Check whether --enable-largefile was given.
15685 if test "${enable_largefile+set}" = set; then :
15686   enableval=$enable_largefile;
15687 fi
15688
15689 if test "$enable_largefile" != no; then
15690
15691   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15692 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15693 if ${ac_cv_sys_largefile_CC+:} false; then :
15694   $as_echo_n "(cached) " >&6
15695 else
15696   ac_cv_sys_largefile_CC=no
15697      if test "$GCC" != yes; then
15698        ac_save_CC=$CC
15699        while :; do
15700          # IRIX 6.2 and later do not support large files by default,
15701          # so use the C compiler's -n32 option if that helps.
15702          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15703 /* end confdefs.h.  */
15704 #include <sys/types.h>
15705  /* Check that off_t can represent 2**63 - 1 correctly.
15706     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15707     since some C++ compilers masquerading as C compilers
15708     incorrectly reject 9223372036854775807.  */
15709 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15710   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15711                        && LARGE_OFF_T % 2147483647 == 1)
15712                       ? 1 : -1];
15713 int
15714 main ()
15715 {
15716
15717   ;
15718   return 0;
15719 }
15720 _ACEOF
15721          if ac_fn_c_try_compile "$LINENO"; then :
15722   break
15723 fi
15724 rm -f core conftest.err conftest.$ac_objext
15725          CC="$CC -n32"
15726          if ac_fn_c_try_compile "$LINENO"; then :
15727   ac_cv_sys_largefile_CC=' -n32'; break
15728 fi
15729 rm -f core conftest.err conftest.$ac_objext
15730          break
15731        done
15732        CC=$ac_save_CC
15733        rm -f conftest.$ac_ext
15734     fi
15735 fi
15736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15737 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15738   if test "$ac_cv_sys_largefile_CC" != no; then
15739     CC=$CC$ac_cv_sys_largefile_CC
15740   fi
15741
15742   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15743 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15744 if ${ac_cv_sys_file_offset_bits+:} false; then :
15745   $as_echo_n "(cached) " >&6
15746 else
15747   while :; do
15748   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15749 /* end confdefs.h.  */
15750 #include <sys/types.h>
15751  /* Check that off_t can represent 2**63 - 1 correctly.
15752     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15753     since some C++ compilers masquerading as C compilers
15754     incorrectly reject 9223372036854775807.  */
15755 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15756   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15757                        && LARGE_OFF_T % 2147483647 == 1)
15758                       ? 1 : -1];
15759 int
15760 main ()
15761 {
15762
15763   ;
15764   return 0;
15765 }
15766 _ACEOF
15767 if ac_fn_c_try_compile "$LINENO"; then :
15768   ac_cv_sys_file_offset_bits=no; break
15769 fi
15770 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15771   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15772 /* end confdefs.h.  */
15773 #define _FILE_OFFSET_BITS 64
15774 #include <sys/types.h>
15775  /* Check that off_t can represent 2**63 - 1 correctly.
15776     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15777     since some C++ compilers masquerading as C compilers
15778     incorrectly reject 9223372036854775807.  */
15779 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15780   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15781                        && LARGE_OFF_T % 2147483647 == 1)
15782                       ? 1 : -1];
15783 int
15784 main ()
15785 {
15786
15787   ;
15788   return 0;
15789 }
15790 _ACEOF
15791 if ac_fn_c_try_compile "$LINENO"; then :
15792   ac_cv_sys_file_offset_bits=64; break
15793 fi
15794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15795   ac_cv_sys_file_offset_bits=unknown
15796   break
15797 done
15798 fi
15799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15800 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15801 case $ac_cv_sys_file_offset_bits in #(
15802   no | unknown) ;;
15803   *)
15804 cat >>confdefs.h <<_ACEOF
15805 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15806 _ACEOF
15807 ;;
15808 esac
15809 rm -rf conftest*
15810   if test $ac_cv_sys_file_offset_bits = unknown; then
15811     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15812 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15813 if ${ac_cv_sys_large_files+:} false; then :
15814   $as_echo_n "(cached) " >&6
15815 else
15816   while :; do
15817   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15818 /* end confdefs.h.  */
15819 #include <sys/types.h>
15820  /* Check that off_t can represent 2**63 - 1 correctly.
15821     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15822     since some C++ compilers masquerading as C compilers
15823     incorrectly reject 9223372036854775807.  */
15824 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15825   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15826                        && LARGE_OFF_T % 2147483647 == 1)
15827                       ? 1 : -1];
15828 int
15829 main ()
15830 {
15831
15832   ;
15833   return 0;
15834 }
15835 _ACEOF
15836 if ac_fn_c_try_compile "$LINENO"; then :
15837   ac_cv_sys_large_files=no; break
15838 fi
15839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15840   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15841 /* end confdefs.h.  */
15842 #define _LARGE_FILES 1
15843 #include <sys/types.h>
15844  /* Check that off_t can represent 2**63 - 1 correctly.
15845     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15846     since some C++ compilers masquerading as C compilers
15847     incorrectly reject 9223372036854775807.  */
15848 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15849   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15850                        && LARGE_OFF_T % 2147483647 == 1)
15851                       ? 1 : -1];
15852 int
15853 main ()
15854 {
15855
15856   ;
15857   return 0;
15858 }
15859 _ACEOF
15860 if ac_fn_c_try_compile "$LINENO"; then :
15861   ac_cv_sys_large_files=1; break
15862 fi
15863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15864   ac_cv_sys_large_files=unknown
15865   break
15866 done
15867 fi
15868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15869 $as_echo "$ac_cv_sys_large_files" >&6; }
15870 case $ac_cv_sys_large_files in #(
15871   no | unknown) ;;
15872   *)
15873 cat >>confdefs.h <<_ACEOF
15874 #define _LARGE_FILES $ac_cv_sys_large_files
15875 _ACEOF
15876 ;;
15877 esac
15878 rm -rf conftest*
15879   fi
15880
15881
15882 fi
15883
15884
15885
15886
15887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
15888 $as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
15889 cache=_D_LARGEFILE_SOURCE_1
15890 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
15891   $as_echo_n "(cached) " >&6
15892 else
15893
15894 echo '
15895 #include <stdio.h>
15896 int test() {
15897         int a = fseeko(stdin, 0, 0);
15898         return a;
15899 }
15900 ' > conftest.c
15901 echo 'void f(){}' >>conftest.c
15902 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
15903 eval "cv_prog_cc_flag_needed_$cache=no"
15904 else
15905
15906 if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
15907 eval "cv_prog_cc_flag_needed_$cache=yes"
15908 else
15909 eval "cv_prog_cc_flag_needed_$cache=fail"
15910 #echo 'Test with flag fails too!'
15911 #cat conftest.c
15912 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15913 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15914 #exit 1
15915 fi
15916
15917 fi
15918 rm -f conftest conftest.c conftest.o
15919
15920 fi
15921
15922 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
15923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15924 $as_echo "yes" >&6; }
15925 :
15926 CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
15927 else
15928 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
15929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15930 $as_echo "no" >&6; }
15931 #echo 'Test with flag is no!'
15932 #cat conftest.c
15933 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15934 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15935 #exit 1
15936 :
15937
15938 else
15939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15940 $as_echo "failed" >&6; }
15941 :
15942
15943 fi
15944 fi
15945
15946
15947
15948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
15949 $as_echo_n "checking if nonblocking sockets work... " >&6; }
15950 if echo $target | grep mingw32 >/dev/null; then
15951         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
15952 $as_echo "no (windows)" >&6; }
15953
15954 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15955
15956 else
15957 if test "$cross_compiling" = yes; then :
15958
15959         { $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
15960 $as_echo "crosscompile(yes)" >&6; }
15961
15962 else
15963   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15964 /* end confdefs.h.  */
15965
15966
15967 #include <stdio.h>
15968 #include <string.h>
15969 #include <stdlib.h>
15970 #include <fcntl.h>
15971 #include <errno.h>
15972 #ifdef HAVE_SYS_TYPES_H
15973 #include <sys/types.h>
15974 #endif
15975 #ifdef HAVE_SYS_SOCKET_H
15976 #include <sys/socket.h>
15977 #endif
15978 #ifdef HAVE_NETINET_IN_H
15979 #include <netinet/in.h>
15980 #endif
15981 #ifdef HAVE_ARPA_INET_H
15982 #include <arpa/inet.h>
15983 #endif
15984 #ifdef HAVE_UNISTD_H
15985 #include <unistd.h>
15986 #endif
15987 #ifdef HAVE_TIME_H
15988 #include <time.h>
15989 #endif
15990
15991 int main(void)
15992 {
15993         int port;
15994         int sfd, cfd;
15995         int num = 10;
15996         int i, p;
15997         struct sockaddr_in a;
15998         /* test if select and nonblocking reads work well together */
15999         /* open port.
16000            fork child to send 10 messages.
16001            select to read.
16002            then try to nonblocking read the 10 messages
16003            then, nonblocking read must give EAGAIN
16004         */
16005
16006         port = 12345 + (time(0)%32);
16007         sfd = socket(PF_INET, SOCK_DGRAM, 0);
16008         if(sfd == -1) {
16009                 perror("socket");
16010                 return 1;
16011         }
16012         memset(&a, 0, sizeof(a));
16013         a.sin_family = AF_INET;
16014         a.sin_port = htons(port);
16015         a.sin_addr.s_addr = inet_addr("127.0.0.1");
16016         if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
16017                 perror("bind");
16018                 return 1;
16019         }
16020         if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
16021                 perror("fcntl");
16022                 return 1;
16023         }
16024
16025         cfd = socket(PF_INET, SOCK_DGRAM, 0);
16026         if(cfd == -1) {
16027                 perror("client socket");
16028                 return 1;
16029         }
16030         a.sin_port = 0;
16031         if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
16032                 perror("client bind");
16033                 return 1;
16034         }
16035         a.sin_port = htons(port);
16036
16037         /* no handler, causes exit in 10 seconds */
16038         alarm(10);
16039
16040         /* send and receive on the socket */
16041         if((p=fork()) == 0) {
16042                 for(i=0; i<num; i++) {
16043                         if(sendto(cfd, &i, sizeof(i), 0,
16044                                 (struct sockaddr*)&a, sizeof(a)) < 0) {
16045                                 perror("sendto");
16046                                 return 1;
16047                         }
16048                 }
16049         } else {
16050                 /* parent */
16051                 fd_set rset;
16052                 int x;
16053                 if(p == -1) {
16054                         perror("fork");
16055                         return 1;
16056                 }
16057                 FD_ZERO(&rset);
16058                 FD_SET(sfd, &rset);
16059                 if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
16060                         perror("select");
16061                         return 1;
16062                 }
16063                 i = 0;
16064                 while(i < num) {
16065                         if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
16066                                 if(errno == EAGAIN)
16067                                         continue;
16068                                 perror("recv");
16069                                 return 1;
16070                         }
16071                         i++;
16072                 }
16073                 /* now we want to get EAGAIN: nonblocking goodness */
16074                 errno = 0;
16075                 recv(sfd, &x, sizeof(x), 0);
16076                 if(errno != EAGAIN) {
16077                         perror("trying to recv again");
16078                         return 1;
16079                 }
16080                 /* EAGAIN encountered */
16081         }
16082
16083         close(sfd);
16084         close(cfd);
16085         return 0;
16086 }
16087
16088 _ACEOF
16089 if ac_fn_c_try_run "$LINENO"; then :
16090
16091         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16092 $as_echo "yes" >&6; }
16093
16094 else
16095
16096         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16097 $as_echo "no" >&6; }
16098
16099 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
16100
16101
16102 fi
16103 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16104   conftest.$ac_objext conftest.beam conftest.$ac_ext
16105 fi
16106
16107 fi
16108
16109
16110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
16111 $as_echo_n "checking whether mkdir has one arg... " >&6; }
16112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16113 /* end confdefs.h.  */
16114
16115 #include <stdio.h>
16116 #include <unistd.h>
16117 #ifdef HAVE_WINSOCK2_H
16118 #include <winsock2.h>
16119 #endif
16120 #ifdef HAVE_SYS_STAT_H
16121 #include <sys/stat.h>
16122 #endif
16123
16124 int
16125 main ()
16126 {
16127
16128         (void)mkdir("directory");
16129
16130   ;
16131   return 0;
16132 }
16133 _ACEOF
16134 if ac_fn_c_try_compile "$LINENO"; then :
16135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16136 $as_echo "yes" >&6; }
16137
16138 $as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
16139
16140
16141 else
16142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16143 $as_echo "no" >&6; }
16144
16145 fi
16146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16147
16148 for ac_func in strptime
16149 do :
16150   ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
16151 if test "x$ac_cv_func_strptime" = xyes; then :
16152   cat >>confdefs.h <<_ACEOF
16153 #define HAVE_STRPTIME 1
16154 _ACEOF
16155
16156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
16157 $as_echo_n "checking whether strptime works... " >&6; }
16158 if test c${cross_compiling} = cno; then
16159 if test "$cross_compiling" = yes; then :
16160   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16161 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16162 as_fn_error $? "cannot run test program while cross compiling
16163 See \`config.log' for more details" "$LINENO" 5; }
16164 else
16165   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16166 /* end confdefs.h.  */
16167
16168 #define _XOPEN_SOURCE 600
16169 #include <time.h>
16170 int main(void) { struct tm tm; char *res;
16171 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);
16172 if (!res) return 2;
16173 res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
16174 if (!res) return 1; return 0; }
16175
16176 _ACEOF
16177 if ac_fn_c_try_run "$LINENO"; then :
16178   eval "ac_cv_c_strptime_works=yes"
16179 else
16180   eval "ac_cv_c_strptime_works=no"
16181 fi
16182 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16183   conftest.$ac_objext conftest.beam conftest.$ac_ext
16184 fi
16185
16186 else
16187 eval "ac_cv_c_strptime_works=maybe"
16188 fi
16189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
16190 $as_echo "$ac_cv_c_strptime_works" >&6; }
16191 if test $ac_cv_c_strptime_works = no; then
16192 case " $LIBOBJS " in
16193   *" strptime.$ac_objext "* ) ;;
16194   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
16195  ;;
16196 esac
16197
16198 else
16199
16200 cat >>confdefs.h <<_ACEOF
16201 #define STRPTIME_WORKS 1
16202 _ACEOF
16203
16204 fi
16205
16206 else
16207   case " $LIBOBJS " in
16208   *" strptime.$ac_objext "* ) ;;
16209   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
16210  ;;
16211 esac
16212
16213 fi
16214 done
16215
16216
16217 # check if we can use SO_REUSEPORT
16218 if echo "$host" | $GREP -i -e linux -e dragonfly >/dev/null; then
16219
16220 $as_echo "#define REUSEPORT_DEFAULT 1" >>confdefs.h
16221
16222 else
16223
16224 $as_echo "#define REUSEPORT_DEFAULT 0" >>confdefs.h
16225
16226 fi
16227
16228 # Include systemd.m4 - begin
16229 #   macros for configuring systemd
16230 #   Copyright 2015, Sami Kerola, CloudFlare.
16231 #   BSD licensed.
16232 # Check whether --enable-systemd was given.
16233 if test "${enable_systemd+set}" = set; then :
16234   enableval=$enable_systemd;
16235 else
16236   enable_systemd=no
16237 fi
16238
16239 have_systemd=no
16240 if test "x$enable_systemd" != xno; then :
16241
16242
16243
16244 pkg_failed=no
16245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
16246 $as_echo_n "checking for SYSTEMD... " >&6; }
16247
16248 if test -n "$SYSTEMD_CFLAGS"; then
16249     pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
16250  elif test -n "$PKG_CONFIG"; then
16251     if test -n "$PKG_CONFIG" && \
16252     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
16253   ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
16254   ac_status=$?
16255   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16256   test $ac_status = 0; }; then
16257   pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
16258                       test "x$?" != "x0" && pkg_failed=yes
16259 else
16260   pkg_failed=yes
16261 fi
16262  else
16263     pkg_failed=untried
16264 fi
16265 if test -n "$SYSTEMD_LIBS"; then
16266     pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
16267  elif test -n "$PKG_CONFIG"; then
16268     if test -n "$PKG_CONFIG" && \
16269     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
16270   ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
16271   ac_status=$?
16272   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16273   test $ac_status = 0; }; then
16274   pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
16275                       test "x$?" != "x0" && pkg_failed=yes
16276 else
16277   pkg_failed=yes
16278 fi
16279  else
16280     pkg_failed=untried
16281 fi
16282
16283
16284
16285 if test $pkg_failed = yes; then
16286         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16287 $as_echo "no" >&6; }
16288
16289 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
16290         _pkg_short_errors_supported=yes
16291 else
16292         _pkg_short_errors_supported=no
16293 fi
16294         if test $_pkg_short_errors_supported = yes; then
16295                 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
16296         else
16297                 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
16298         fi
16299         # Put the nasty error message in config.log where it belongs
16300         echo "$SYSTEMD_PKG_ERRORS" >&5
16301
16302         have_systemd=no
16303 elif test $pkg_failed = untried; then
16304         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16305 $as_echo "no" >&6; }
16306         have_systemd=no
16307 else
16308         SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
16309         SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
16310         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16311 $as_echo "yes" >&6; }
16312         have_systemd=yes
16313 fi
16314                 if test "x$have_systemd" != "xyes"; then :
16315
16316
16317 pkg_failed=no
16318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
16319 $as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
16320
16321 if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
16322     pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
16323  elif test -n "$PKG_CONFIG"; then
16324     if test -n "$PKG_CONFIG" && \
16325     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
16326   ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
16327   ac_status=$?
16328   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16329   test $ac_status = 0; }; then
16330   pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
16331                       test "x$?" != "x0" && pkg_failed=yes
16332 else
16333   pkg_failed=yes
16334 fi
16335  else
16336     pkg_failed=untried
16337 fi
16338 if test -n "$SYSTEMD_DAEMON_LIBS"; then
16339     pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
16340  elif test -n "$PKG_CONFIG"; then
16341     if test -n "$PKG_CONFIG" && \
16342     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
16343   ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
16344   ac_status=$?
16345   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16346   test $ac_status = 0; }; then
16347   pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
16348                       test "x$?" != "x0" && pkg_failed=yes
16349 else
16350   pkg_failed=yes
16351 fi
16352  else
16353     pkg_failed=untried
16354 fi
16355
16356
16357
16358 if test $pkg_failed = yes; then
16359         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16360 $as_echo "no" >&6; }
16361
16362 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
16363         _pkg_short_errors_supported=yes
16364 else
16365         _pkg_short_errors_supported=no
16366 fi
16367         if test $_pkg_short_errors_supported = yes; then
16368                 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
16369         else
16370                 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
16371         fi
16372         # Put the nasty error message in config.log where it belongs
16373         echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
16374
16375         have_systemd_daemon=no
16376 elif test $pkg_failed = untried; then
16377         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16378 $as_echo "no" >&6; }
16379         have_systemd_daemon=no
16380 else
16381         SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
16382         SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
16383         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16384 $as_echo "yes" >&6; }
16385         have_systemd_daemon=yes
16386 fi
16387                 if test "x$have_systemd_daemon" = "xyes"; then :
16388   have_systemd=yes
16389 fi
16390
16391 fi
16392         case $enable_systemd:$have_systemd in #(
16393   yes:no) :
16394     as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
16395   *:yes) :
16396
16397 $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
16398
16399                 LIBS="$LIBS $SYSTEMD_LIBS"
16400
16401          ;; #(
16402   *) :
16403      ;;
16404 esac
16405
16406
16407 fi
16408  if test "x$have_systemd" = xyes; then
16409   USE_SYSTEMD_TRUE=
16410   USE_SYSTEMD_FALSE='#'
16411 else
16412   USE_SYSTEMD_TRUE='#'
16413   USE_SYSTEMD_FALSE=
16414 fi
16415
16416
16417 # Include systemd.m4 - end
16418
16419 # set memory allocation checking if requested
16420 # Check whether --enable-alloc-checks was given.
16421 if test "${enable_alloc_checks+set}" = set; then :
16422   enableval=$enable_alloc_checks;
16423 fi
16424
16425 # Check whether --enable-alloc-lite was given.
16426 if test "${enable_alloc_lite+set}" = set; then :
16427   enableval=$enable_alloc_lite;
16428 fi
16429
16430 # Check whether --enable-alloc-nonregional was given.
16431 if test "${enable_alloc_nonregional+set}" = set; then :
16432   enableval=$enable_alloc_nonregional;
16433 fi
16434
16435 if test x_$enable_alloc_nonregional = x_yes; then
16436
16437 $as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
16438
16439 fi
16440 if test x_$enable_alloc_checks = x_yes; then
16441
16442 $as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
16443
16444         SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo"
16445
16446         ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ="alloc.lo"
16447
16448 else
16449         if test x_$enable_alloc_lite = x_yes; then
16450
16451 $as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
16452
16453         else
16454
16455         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
16456 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
16457         if test "$cross_compiling" = yes; then :
16458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
16459 $as_echo "no (crosscompile)" >&6; }
16460         case " $LIBOBJS " in
16461   *" malloc.$ac_objext "* ) ;;
16462   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
16463  ;;
16464 esac
16465
16466
16467 cat >>confdefs.h <<_ACEOF
16468 #define malloc rpl_malloc_unbound
16469 _ACEOF
16470
16471 else
16472   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16473 /* end confdefs.h.  */
16474 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
16475 #include <stdlib.h>
16476 #else
16477 char *malloc ();
16478 #endif
16479
16480 int
16481 main ()
16482 {
16483  if(malloc(0) != 0) return 1;
16484   ;
16485   return 0;
16486 }
16487
16488 _ACEOF
16489 if ac_fn_c_try_run "$LINENO"; then :
16490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16491 $as_echo "no" >&6; }
16492         case " $LIBOBJS " in
16493   *" malloc.$ac_objext "* ) ;;
16494   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
16495  ;;
16496 esac
16497
16498
16499 cat >>confdefs.h <<_ACEOF
16500 #define malloc rpl_malloc_unbound
16501 _ACEOF
16502
16503 else
16504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16505 $as_echo "yes" >&6; }
16506
16507 $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
16508
16509 fi
16510 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16511   conftest.$ac_objext conftest.beam conftest.$ac_ext
16512 fi
16513
16514
16515         fi
16516 fi
16517
16518 # check windows threads (we use them, not pthreads, on windows).
16519 if test "$on_mingw" = "yes"; then
16520 # check windows threads
16521         for ac_header in windows.h
16522 do :
16523   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
16524 "
16525 if test "x$ac_cv_header_windows_h" = xyes; then :
16526   cat >>confdefs.h <<_ACEOF
16527 #define HAVE_WINDOWS_H 1
16528 _ACEOF
16529
16530 fi
16531
16532 done
16533
16534         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
16535 $as_echo_n "checking for CreateThread... " >&6; }
16536         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16537 /* end confdefs.h.  */
16538
16539 #ifdef HAVE_WINDOWS_H
16540 #include <windows.h>
16541 #endif
16542
16543 int
16544 main ()
16545 {
16546
16547         HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
16548
16549   ;
16550   return 0;
16551 }
16552 _ACEOF
16553 if ac_fn_c_try_compile "$LINENO"; then :
16554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16555 $as_echo "yes" >&6; }
16556
16557 $as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
16558
16559
16560 else
16561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16562 $as_echo "no" >&6; }
16563
16564 fi
16565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16566
16567 else
16568 # not on mingw, check thread libraries.
16569
16570 # check for thread library.
16571 # check this first, so that the pthread lib does not get linked in via
16572 # libssl or libpython, and thus distorts the tests, and we end up using
16573 # the non-threadsafe C libraries.
16574
16575 # Check whether --with-pthreads was given.
16576 if test "${with_pthreads+set}" = set; then :
16577   withval=$with_pthreads;
16578 else
16579    withval="yes"
16580 fi
16581
16582 ub_have_pthreads=no
16583 if test x_$withval != x_no; then
16584
16585
16586 ac_ext=c
16587 ac_cpp='$CPP $CPPFLAGS'
16588 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16589 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16590 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16591
16592 ax_pthread_ok=no
16593
16594 # We used to check for pthread.h first, but this fails if pthread.h
16595 # requires special compiler flags (e.g. on True64 or Sequent).
16596 # It gets checked for in the link test anyway.
16597
16598 # First of all, check if the user has set any of the PTHREAD_LIBS,
16599 # etcetera environment variables, and if threads linking works using
16600 # them:
16601 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16602         save_CFLAGS="$CFLAGS"
16603         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16604         save_LIBS="$LIBS"
16605         LIBS="$PTHREAD_LIBS $LIBS"
16606         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16607 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
16608         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16609 /* end confdefs.h.  */
16610
16611 /* Override any GCC internal prototype to avoid an error.
16612    Use char because int might match the return type of a GCC
16613    builtin and then its argument prototype would still apply.  */
16614 #ifdef __cplusplus
16615 extern "C"
16616 #endif
16617 char pthread_join ();
16618 int
16619 main ()
16620 {
16621 return pthread_join ();
16622   ;
16623   return 0;
16624 }
16625 _ACEOF
16626 if ac_fn_c_try_link "$LINENO"; then :
16627   ax_pthread_ok=yes
16628 fi
16629 rm -f core conftest.err conftest.$ac_objext \
16630     conftest$ac_exeext conftest.$ac_ext
16631         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16632 $as_echo "$ax_pthread_ok" >&6; }
16633         if test x"$ax_pthread_ok" = xno; then
16634                 PTHREAD_LIBS=""
16635                 PTHREAD_CFLAGS=""
16636         fi
16637         LIBS="$save_LIBS"
16638         CFLAGS="$save_CFLAGS"
16639 fi
16640
16641 # We must check for the threads library under a number of different
16642 # names; the ordering is very important because some systems
16643 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16644 # libraries is broken (non-POSIX).
16645
16646 # Create a list of thread flags to try.  Items starting with a "-" are
16647 # C compiler flags, and other items are library names, except for "none"
16648 # which indicates that we try without any flags at all, and "pthread-config"
16649 # which is a program returning the flags for the Pth emulation library.
16650
16651 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
16652
16653 # The ordering *is* (sometimes) important.  Some notes on the
16654 # individual items follow:
16655
16656 # pthreads: AIX (must check this before -lpthread)
16657 # none: in case threads are in libc; should be tried before -Kthread and
16658 #       other compiler flags to prevent continual compiler warnings
16659 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16660 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16661 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16662 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16663 # -pthreads: Solaris/gcc
16664 # -mthreads: Mingw32/gcc, Lynx/gcc
16665 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16666 #      doesn't hurt to check since this sometimes defines pthreads too;
16667 #      also defines -D_REENTRANT)
16668 #      ... -mt is also the pthreads flag for HP/aCC
16669 # pthread: Linux, etcetera
16670 # --thread-safe: KAI C++
16671 # pthread-config: use pthread-config program (for GNU Pth library)
16672
16673 case ${host_os} in
16674         solaris*)
16675
16676         # On Solaris (at least, for some versions), libc contains stubbed
16677         # (non-functional) versions of the pthreads routines, so link-based
16678         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
16679         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16680         # a function called by this macro, so we could check for that, but
16681         # who knows whether they'll stub that too in a future libc.)  So,
16682         # we'll just look for -pthreads and -lpthread first:
16683
16684         ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
16685         ;;
16686
16687         darwin*)
16688         ax_pthread_flags="-pthread $ax_pthread_flags"
16689         ;;
16690 esac
16691
16692 # Clang doesn't consider unrecognized options an error unless we specify
16693 # -Werror. We throw in some extra Clang-specific options to ensure that
16694 # this doesn't happen for GCC, which also accepts -Werror.
16695
16696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
16697 $as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
16698 save_CFLAGS="$CFLAGS"
16699 ax_pthread_extra_flags="-Werror"
16700 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
16701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16702 /* end confdefs.h.  */
16703 int foo(void);
16704 int
16705 main ()
16706 {
16707 foo()
16708   ;
16709   return 0;
16710 }
16711 _ACEOF
16712 if ac_fn_c_try_compile "$LINENO"; then :
16713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16714 $as_echo "yes" >&6; }
16715 else
16716   ax_pthread_extra_flags=
16717                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16718 $as_echo "no" >&6; }
16719 fi
16720 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16721 CFLAGS="$save_CFLAGS"
16722
16723 if test x"$ax_pthread_ok" = xno; then
16724 for flag in $ax_pthread_flags; do
16725
16726         case $flag in
16727                 none)
16728                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
16729 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
16730                 ;;
16731
16732                 -*)
16733                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
16734 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
16735                 PTHREAD_CFLAGS="$flag"
16736                 ;;
16737
16738                 pthread-config)
16739                 # Extract the first word of "pthread-config", so it can be a program name with args.
16740 set dummy pthread-config; ac_word=$2
16741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16742 $as_echo_n "checking for $ac_word... " >&6; }
16743 if ${ac_cv_prog_ax_pthread_config+:} false; then :
16744   $as_echo_n "(cached) " >&6
16745 else
16746   if test -n "$ax_pthread_config"; then
16747   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
16748 else
16749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16750 for as_dir in $PATH
16751 do
16752   IFS=$as_save_IFS
16753   test -z "$as_dir" && as_dir=.
16754     for ac_exec_ext in '' $ac_executable_extensions; do
16755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16756     ac_cv_prog_ax_pthread_config="yes"
16757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16758     break 2
16759   fi
16760 done
16761   done
16762 IFS=$as_save_IFS
16763
16764   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
16765 fi
16766 fi
16767 ax_pthread_config=$ac_cv_prog_ax_pthread_config
16768 if test -n "$ax_pthread_config"; then
16769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
16770 $as_echo "$ax_pthread_config" >&6; }
16771 else
16772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16773 $as_echo "no" >&6; }
16774 fi
16775
16776
16777                 if test x"$ax_pthread_config" = xno; then continue; fi
16778                 PTHREAD_CFLAGS="`pthread-config --cflags`"
16779                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16780                 ;;
16781
16782                 *)
16783                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
16784 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
16785                 PTHREAD_LIBS="-l$flag"
16786                 ;;
16787         esac
16788
16789         save_LIBS="$LIBS"
16790         save_CFLAGS="$CFLAGS"
16791         LIBS="$PTHREAD_LIBS $LIBS"
16792         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
16793
16794         # Check for various functions.  We must include pthread.h,
16795         # since some functions may be macros.  (On the Sequent, we
16796         # need a special flag -Kthread to make this header compile.)
16797         # We check for pthread_join because it is in -lpthread on IRIX
16798         # while pthread_create is in libc.  We check for pthread_attr_init
16799         # due to DEC craziness with -lpthreads.  We check for
16800         # pthread_cleanup_push because it is one of the few pthread
16801         # functions on Solaris that doesn't have a non-functional libc stub.
16802         # We try pthread_create on general principles.
16803         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16804 /* end confdefs.h.  */
16805 #include <pthread.h>
16806                         static void routine(void *a) { *((int*)a) = 0; }
16807                         static void *start_routine(void *a) { return a; }
16808 int
16809 main ()
16810 {
16811 pthread_t th; pthread_attr_t attr;
16812                         pthread_create(&th, 0, start_routine, 0);
16813                         pthread_join(th, 0);
16814                         pthread_attr_init(&attr);
16815                         pthread_cleanup_push(routine, 0);
16816                         pthread_cleanup_pop(0) /* ; */
16817   ;
16818   return 0;
16819 }
16820 _ACEOF
16821 if ac_fn_c_try_link "$LINENO"; then :
16822   ax_pthread_ok=yes
16823 fi
16824 rm -f core conftest.err conftest.$ac_objext \
16825     conftest$ac_exeext conftest.$ac_ext
16826
16827         LIBS="$save_LIBS"
16828         CFLAGS="$save_CFLAGS"
16829
16830         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16831 $as_echo "$ax_pthread_ok" >&6; }
16832         if test "x$ax_pthread_ok" = xyes; then
16833                 break;
16834         fi
16835
16836         PTHREAD_LIBS=""
16837         PTHREAD_CFLAGS=""
16838 done
16839 fi
16840
16841 # Various other checks:
16842 if test "x$ax_pthread_ok" = xyes; then
16843         save_LIBS="$LIBS"
16844         LIBS="$PTHREAD_LIBS $LIBS"
16845         save_CFLAGS="$CFLAGS"
16846         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16847
16848         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
16849         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
16850 $as_echo_n "checking for joinable pthread attribute... " >&6; }
16851         attr_name=unknown
16852         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
16853             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16854 /* end confdefs.h.  */
16855 #include <pthread.h>
16856 int
16857 main ()
16858 {
16859 int attr = $attr; return attr /* ; */
16860   ;
16861   return 0;
16862 }
16863 _ACEOF
16864 if ac_fn_c_try_link "$LINENO"; then :
16865   attr_name=$attr; break
16866 fi
16867 rm -f core conftest.err conftest.$ac_objext \
16868     conftest$ac_exeext conftest.$ac_ext
16869         done
16870         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
16871 $as_echo "$attr_name" >&6; }
16872         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
16873
16874 cat >>confdefs.h <<_ACEOF
16875 #define PTHREAD_CREATE_JOINABLE $attr_name
16876 _ACEOF
16877
16878         fi
16879
16880         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
16881 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
16882         flag=no
16883         case ${host_os} in
16884             aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
16885             osf* | hpux*) flag="-D_REENTRANT";;
16886             solaris*)
16887             if test "$GCC" = "yes"; then
16888                 flag="-D_REENTRANT"
16889             else
16890                 # TODO: What about Clang on Solaris?
16891                 flag="-mt -D_REENTRANT"
16892             fi
16893             ;;
16894         esac
16895         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
16896 $as_echo "$flag" >&6; }
16897         if test "x$flag" != xno; then
16898             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16899         fi
16900
16901         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
16902 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
16903 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
16904   $as_echo_n "(cached) " >&6
16905 else
16906
16907                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16908 /* end confdefs.h.  */
16909 #include <pthread.h>
16910 int
16911 main ()
16912 {
16913 int i = PTHREAD_PRIO_INHERIT;
16914   ;
16915   return 0;
16916 }
16917 _ACEOF
16918 if ac_fn_c_try_link "$LINENO"; then :
16919   ax_cv_PTHREAD_PRIO_INHERIT=yes
16920 else
16921   ax_cv_PTHREAD_PRIO_INHERIT=no
16922 fi
16923 rm -f core conftest.err conftest.$ac_objext \
16924     conftest$ac_exeext conftest.$ac_ext
16925
16926 fi
16927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
16928 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
16929         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
16930
16931 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
16932
16933 fi
16934
16935         LIBS="$save_LIBS"
16936         CFLAGS="$save_CFLAGS"
16937
16938         # More AIX lossage: compile with *_r variant
16939         if test "x$GCC" != xyes; then
16940             case $host_os in
16941                 aix*)
16942                 case "x/$CC" in #(
16943   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
16944     #handle absolute path differently from PATH based program lookup
16945                    case "x$CC" in #(
16946   x/*) :
16947     if as_fn_executable_p ${CC}_r; then :
16948   PTHREAD_CC="${CC}_r"
16949 fi ;; #(
16950   *) :
16951     for ac_prog in ${CC}_r
16952 do
16953   # Extract the first word of "$ac_prog", so it can be a program name with args.
16954 set dummy $ac_prog; ac_word=$2
16955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16956 $as_echo_n "checking for $ac_word... " >&6; }
16957 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
16958   $as_echo_n "(cached) " >&6
16959 else
16960   if test -n "$PTHREAD_CC"; then
16961   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16962 else
16963 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16964 for as_dir in $PATH
16965 do
16966   IFS=$as_save_IFS
16967   test -z "$as_dir" && as_dir=.
16968     for ac_exec_ext in '' $ac_executable_extensions; do
16969   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16970     ac_cv_prog_PTHREAD_CC="$ac_prog"
16971     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16972     break 2
16973   fi
16974 done
16975   done
16976 IFS=$as_save_IFS
16977
16978 fi
16979 fi
16980 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16981 if test -n "$PTHREAD_CC"; then
16982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
16983 $as_echo "$PTHREAD_CC" >&6; }
16984 else
16985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16986 $as_echo "no" >&6; }
16987 fi
16988
16989
16990   test -n "$PTHREAD_CC" && break
16991 done
16992 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16993  ;;
16994 esac ;; #(
16995   *) :
16996      ;;
16997 esac
16998                 ;;
16999             esac
17000         fi
17001 fi
17002
17003 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
17004
17005
17006
17007
17008
17009 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
17010 if test x"$ax_pthread_ok" = xyes; then
17011
17012
17013 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
17014
17015                 if test -n "$PTHREAD_LIBS"; then
17016                   LIBS="$PTHREAD_LIBS $LIBS"
17017                 fi
17018                 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
17019                 CC="$PTHREAD_CC"
17020                 ub_have_pthreads=yes
17021                 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
17022 "
17023 if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
17024
17025 cat >>confdefs.h <<_ACEOF
17026 #define HAVE_PTHREAD_SPINLOCK_T 1
17027 _ACEOF
17028
17029
17030 fi
17031 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
17032 "
17033 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
17034
17035 cat >>confdefs.h <<_ACEOF
17036 #define HAVE_PTHREAD_RWLOCK_T 1
17037 _ACEOF
17038
17039
17040 fi
17041
17042
17043                 if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
17044                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
17045 $as_echo_n "checking if -pthread unused during linking... " >&6; }
17046                 # catch clang warning 'argument unused during compilation'
17047                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17048 /* end confdefs.h.  */
17049 $ac_includes_default
17050
17051 int main(void) {return 0;}
17052
17053 _ACEOF
17054                 pthread_unused="yes"
17055                 # first compile
17056                 echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
17057                 $CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
17058                 if test $? = 0; then
17059                         # then link
17060                         echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
17061                         $CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
17062                         if test $? -ne 0; then
17063                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17064 $as_echo "yes" >&6; }
17065                                 CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
17066                                 PTHREAD_CFLAGS_ONLY="-pthread"
17067
17068                         else
17069                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17070 $as_echo "no" >&6; }
17071                         fi
17072                 else
17073                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17074 $as_echo "no" >&6; }
17075                 fi # endif cc successful
17076                 rm -f conftest conftest.c conftest.o
17077                 fi # endif -pthread in CFLAGS
17078
17079
17080         :
17081 else
17082         ax_pthread_ok=no
17083
17084 fi
17085 ac_ext=c
17086 ac_cpp='$CPP $CPPFLAGS'
17087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17090
17091
17092 fi
17093
17094 # check solaris thread library
17095
17096 # Check whether --with-solaris-threads was given.
17097 if test "${with_solaris_threads+set}" = set; then :
17098   withval=$with_solaris_threads;
17099 else
17100    withval="no"
17101 fi
17102
17103 ub_have_sol_threads=no
17104 if test x_$withval != x_no; then
17105         if test x_$ub_have_pthreads != x_no; then
17106             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
17107 $as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
17108         else
17109         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
17110 $as_echo_n "checking for library containing thr_create... " >&6; }
17111 if ${ac_cv_search_thr_create+:} false; then :
17112   $as_echo_n "(cached) " >&6
17113 else
17114   ac_func_search_save_LIBS=$LIBS
17115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17116 /* end confdefs.h.  */
17117
17118 /* Override any GCC internal prototype to avoid an error.
17119    Use char because int might match the return type of a GCC
17120    builtin and then its argument prototype would still apply.  */
17121 #ifdef __cplusplus
17122 extern "C"
17123 #endif
17124 char thr_create ();
17125 int
17126 main ()
17127 {
17128 return thr_create ();
17129   ;
17130   return 0;
17131 }
17132 _ACEOF
17133 for ac_lib in '' thread; do
17134   if test -z "$ac_lib"; then
17135     ac_res="none required"
17136   else
17137     ac_res=-l$ac_lib
17138     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17139   fi
17140   if ac_fn_c_try_link "$LINENO"; then :
17141   ac_cv_search_thr_create=$ac_res
17142 fi
17143 rm -f core conftest.err conftest.$ac_objext \
17144     conftest$ac_exeext
17145   if ${ac_cv_search_thr_create+:} false; then :
17146   break
17147 fi
17148 done
17149 if ${ac_cv_search_thr_create+:} false; then :
17150
17151 else
17152   ac_cv_search_thr_create=no
17153 fi
17154 rm conftest.$ac_ext
17155 LIBS=$ac_func_search_save_LIBS
17156 fi
17157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
17158 $as_echo "$ac_cv_search_thr_create" >&6; }
17159 ac_res=$ac_cv_search_thr_create
17160 if test "$ac_res" != no; then :
17161   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17162
17163
17164 $as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
17165
17166
17167
17168
17169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
17170 $as_echo_n "checking whether $CC supports -mt... " >&6; }
17171 cache=`echo mt | sed 'y%.=/+-%___p_%'`
17172 if eval \${cv_prog_cc_flag_$cache+:} false; then :
17173   $as_echo_n "(cached) " >&6
17174 else
17175
17176 echo 'void f(void){}' >conftest.c
17177 if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
17178 eval "cv_prog_cc_flag_$cache=yes"
17179 else
17180 eval "cv_prog_cc_flag_$cache=no"
17181 fi
17182 rm -f conftest conftest.o conftest.c
17183
17184 fi
17185
17186 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
17187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17188 $as_echo "yes" >&6; }
17189 :
17190 CFLAGS="$CFLAGS -mt"
17191 else
17192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17193 $as_echo "no" >&6; }
17194 :
17195 CFLAGS="$CFLAGS -D_REENTRANT"
17196 fi
17197
17198                 ub_have_sol_threads=yes
17199
17200 else
17201
17202                 as_fn_error $? "no solaris threads found." "$LINENO" 5
17203
17204 fi
17205
17206         fi
17207 fi
17208
17209 fi # end of non-mingw check of thread libraries
17210
17211 # Check for SYSLOG_FACILITY
17212
17213 # Check whether --with-syslog-facility was given.
17214 if test "${with_syslog_facility+set}" = set; then :
17215   withval=$with_syslog_facility;  UNBOUND_SYSLOG_FACILITY="$withval"
17216 fi
17217
17218 case "${UNBOUND_SYSLOG_FACILITY}" in
17219
17220   LOCAL[0-7]) UNBOUND_SYSLOG_FACILITY="LOG_${UNBOUND_SYSLOG_FACILITY}" ;;
17221
17222            *) UNBOUND_SYSLOG_FACILITY="LOG_DAEMON" ;;
17223
17224 esac
17225
17226 cat >>confdefs.h <<_ACEOF
17227 #define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY}
17228 _ACEOF
17229
17230
17231 # Check for dynamic library module
17232
17233 # Check whether --with-dynlibmodule was given.
17234 if test "${with_dynlibmodule+set}" = set; then :
17235   withval=$with_dynlibmodule;
17236 else
17237    withval="no"
17238 fi
17239
17240
17241 if test x_$withval != x_no; then
17242
17243 $as_echo "#define WITH_DYNLIBMODULE 1" >>confdefs.h
17244
17245   WITH_DYNLIBMODULE=yes
17246
17247   DYNLIBMOD_OBJ="dynlibmod.lo"
17248
17249   DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
17250
17251   if test $on_mingw = "no"; then
17252     DYNLIBMOD_EXTRALIBS="-ldl -export-dynamic"
17253   else
17254     DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.a"
17255   fi
17256
17257 fi
17258
17259 # Check for PyUnbound
17260
17261 # Check whether --with-pyunbound was given.
17262 if test "${with_pyunbound+set}" = set; then :
17263   withval=$with_pyunbound;
17264 else
17265    withval="no"
17266 fi
17267
17268
17269 ub_test_python=no
17270 ub_with_pyunbound=no
17271 if test x_$withval != x_no; then
17272    ub_with_pyunbound=yes
17273    ub_test_python=yes
17274 fi
17275
17276 # Check for Python module
17277
17278 # Check whether --with-pythonmodule was given.
17279 if test "${with_pythonmodule+set}" = set; then :
17280   withval=$with_pythonmodule;
17281 else
17282    withval="no"
17283 fi
17284
17285
17286 ub_with_pythonmod=no
17287 if test x_$withval != x_no; then
17288    ub_with_pythonmod=yes
17289    ub_test_python=yes
17290 fi
17291
17292 # Check for Python & SWIG only on PyUnbound or PyModule
17293 if test x_$ub_test_python != x_no; then
17294
17295    # Check for Python
17296    ub_have_python=no
17297    ac_save_LIBS="$LIBS"
17298         #
17299         # Allow the use of a (user set) custom python version
17300         #
17301
17302
17303         # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
17304 set dummy python$PYTHON_VERSION; ac_word=$2
17305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17306 $as_echo_n "checking for $ac_word... " >&6; }
17307 if ${ac_cv_path_PYTHON+:} false; then :
17308   $as_echo_n "(cached) " >&6
17309 else
17310   case $PYTHON in
17311   [\\/]* | ?:[\\/]*)
17312   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
17313   ;;
17314   *)
17315   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17316 for as_dir in $PATH
17317 do
17318   IFS=$as_save_IFS
17319   test -z "$as_dir" && as_dir=.
17320     for ac_exec_ext in '' $ac_executable_extensions; do
17321   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17322     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
17323     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17324     break 2
17325   fi
17326 done
17327   done
17328 IFS=$as_save_IFS
17329
17330   ;;
17331 esac
17332 fi
17333 PYTHON=$ac_cv_path_PYTHON
17334 if test -n "$PYTHON"; then
17335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
17336 $as_echo "$PYTHON" >&6; }
17337 else
17338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17339 $as_echo "no" >&6; }
17340 fi
17341
17342
17343         if test -z "$PYTHON"; then
17344            as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
17345            PYTHON_VERSION=""
17346         fi
17347
17348         if test -z "$PYTHON_VERSION"; then
17349                 PYTHON_VERSION=`$PYTHON -c "import sys; \
17350                         print(sys.version.split()[0])"`
17351         fi
17352
17353         #
17354         # Check if you have distutils, else fail
17355         #
17356         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
17357 $as_echo_n "checking for the distutils Python package... " >&6; }
17358         if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then
17359                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17360 $as_echo "yes" >&6; }
17361         else
17362                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17363 $as_echo "no" >&6; }
17364                 as_fn_error $? "cannot import Python module \"distutils\".
17365 Please check your Python installation. The error was:
17366 $ac_distutils_result" "$LINENO" 5
17367                 PYTHON_VERSION=""
17368         fi
17369
17370         #
17371         # Check for Python include path
17372         #
17373         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
17374 $as_echo_n "checking for Python include path... " >&6; }
17375         if test -z "$PYTHON_CPPFLAGS"; then
17376                 python_path=`$PYTHON -c "import distutils.sysconfig; \
17377                         print(distutils.sysconfig.get_python_inc());"`
17378                 if test -n "${python_path}"; then
17379                         python_path="-I$python_path"
17380                 fi
17381                 PYTHON_CPPFLAGS=$python_path
17382         fi
17383         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
17384 $as_echo "$PYTHON_CPPFLAGS" >&6; }
17385
17386
17387         #
17388         # Check for Python library path
17389         #
17390         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
17391 $as_echo_n "checking for Python library path... " >&6; }
17392         if test -z "$PYTHON_LDFLAGS"; then
17393                 PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
17394                         print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
17395         fi
17396         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
17397 $as_echo "$PYTHON_LDFLAGS" >&6; }
17398
17399
17400         if test -z "$PYTHON_LIBDIR"; then
17401                 PYTHON_LIBDIR=`$PYTHON -c "from distutils.sysconfig import *; \
17402                         print(get_config_var('LIBDIR'));"`
17403         fi
17404
17405         #
17406         # Check for site packages
17407         #
17408         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
17409 $as_echo_n "checking for Python site-packages path... " >&6; }
17410         if test -z "$PYTHON_SITE_PKG"; then
17411                 PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
17412                         print(distutils.sysconfig.get_python_lib(1,0));"`
17413         fi
17414         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
17415 $as_echo "$PYTHON_SITE_PKG" >&6; }
17416
17417
17418         #
17419         # final check to see if everything compiles alright
17420         #
17421         { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
17422 $as_echo_n "checking consistency of all components of python development environment... " >&6; }
17423         ac_ext=c
17424 ac_cpp='$CPP $CPPFLAGS'
17425 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17426 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17427 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17428
17429         # save current global flags
17430         ac_save_LIBS="$LIBS"
17431         ac_save_CPPFLAGS="$CPPFLAGS"
17432
17433         LIBS="$LIBS $PYTHON_LDFLAGS"
17434         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
17435         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17436 /* end confdefs.h.  */
17437
17438                 #include <Python.h>
17439
17440 int
17441 main ()
17442 {
17443
17444                 Py_Initialize();
17445
17446   ;
17447   return 0;
17448 }
17449 _ACEOF
17450 if ac_fn_c_try_link "$LINENO"; then :
17451   pythonexists=yes
17452 else
17453   pythonexists=no
17454 fi
17455 rm -f core conftest.err conftest.$ac_objext \
17456     conftest$ac_exeext conftest.$ac_ext
17457
17458         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
17459 $as_echo "$pythonexists" >&6; }
17460
17461         if test ! "$pythonexists" = "yes"; then
17462            as_fn_error $? "
17463   Could not link test program to Python. Maybe the main Python library has been
17464   installed in some non-standard library path. If so, pass it to configure,
17465   via the LDFLAGS environment variable.
17466   Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
17467   ============================================================================
17468    ERROR!
17469    You probably have to install the development version of the Python package
17470    for your distribution.  The exact name of this package varies among them.
17471   ============================================================================
17472            " "$LINENO" 5
17473           PYTHON_VERSION=""
17474         fi
17475         ac_ext=c
17476 ac_cpp='$CPP $CPPFLAGS'
17477 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17478 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17479 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17480
17481         # turn back to default flags
17482         CPPFLAGS="$ac_save_CPPFLAGS"
17483         LIBS="$ac_save_LIBS"
17484
17485         #
17486         # all done!
17487         #
17488
17489    if test ! -z "$PYTHON_VERSION"; then
17490         if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
17491                 as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
17492         fi
17493
17494       PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
17495
17496       # Have Python
17497
17498 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
17499
17500       if test -n "$LIBS"; then
17501         LIBS="$PYTHON_LDFLAGS $LIBS"
17502       else
17503         LIBS="$PYTHON_LDFLAGS"
17504       fi
17505       if test -n "$CPPFLAGS"; then
17506         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
17507       else
17508         CPPFLAGS="$PYTHON_CPPFLAGS"
17509       fi
17510       if test "$PYTHON_LIBDIR" != "/usr/lib" -a "$PYTHON_LIBDIR" != "" -a "$PYTHON_LIBDIR" != "/usr/lib64"; then
17511
17512         if test "x$enable_rpath" = xyes; then
17513                 if echo "$PYTHON_LIBDIR" | grep "^/" >/dev/null; then
17514                         RUNTIME_PATH="$RUNTIME_PATH -R$PYTHON_LIBDIR"
17515                 fi
17516         fi
17517
17518       fi
17519       ub_have_python=yes
17520       if test -n "$PKG_CONFIG" && \
17521     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
17522   ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
17523   ac_status=$?
17524   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17525   test $ac_status = 0; }; then
17526   PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
17527 else
17528   PC_PY_DEPENDENCY="python"
17529 fi
17530
17531
17532       # Check for SWIG
17533       ub_have_swig=no
17534       # Check whether --enable-swig-version-check was given.
17535 if test "${enable_swig_version_check+set}" = set; then :
17536   enableval=$enable_swig_version_check;
17537 fi
17538
17539       if test "$enable_swig_version_check" = "yes"; then
17540
17541         # Extract the first word of "swig", so it can be a program name with args.
17542 set dummy swig; ac_word=$2
17543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17544 $as_echo_n "checking for $ac_word... " >&6; }
17545 if ${ac_cv_path_SWIG+:} false; then :
17546   $as_echo_n "(cached) " >&6
17547 else
17548   case $SWIG in
17549   [\\/]* | ?:[\\/]*)
17550   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17551   ;;
17552   *)
17553   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17554 for as_dir in $PATH
17555 do
17556   IFS=$as_save_IFS
17557   test -z "$as_dir" && as_dir=.
17558     for ac_exec_ext in '' $ac_executable_extensions; do
17559   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17560     ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17561     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17562     break 2
17563   fi
17564 done
17565   done
17566 IFS=$as_save_IFS
17567
17568   ;;
17569 esac
17570 fi
17571 SWIG=$ac_cv_path_SWIG
17572 if test -n "$SWIG"; then
17573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17574 $as_echo "$SWIG" >&6; }
17575 else
17576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17577 $as_echo "no" >&6; }
17578 fi
17579
17580
17581         if test -z "$SWIG" ; then
17582                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17583 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17584                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17585         elif test -n "2.0.1" ; then
17586                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17587 $as_echo_n "checking for SWIG version... " >&6; }
17588                 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'`
17589                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17590 $as_echo "$swig_version" >&6; }
17591                 if test -n "$swig_version" ; then
17592                         # Calculate the required version number components
17593                         required=2.0.1
17594                         required_major=`echo $required | sed 's/[^0-9].*//'`
17595                         if test -z "$required_major" ; then
17596                                 required_major=0
17597                         fi
17598                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17599                         required_minor=`echo $required | sed 's/[^0-9].*//'`
17600                         if test -z "$required_minor" ; then
17601                                 required_minor=0
17602                         fi
17603                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17604                         required_patch=`echo $required | sed 's/[^0-9].*//'`
17605                         if test -z "$required_patch" ; then
17606                                 required_patch=0
17607                         fi
17608                         # Calculate the available version number components
17609                         available=$swig_version
17610                         available_major=`echo $available | sed 's/[^0-9].*//'`
17611                         if test -z "$available_major" ; then
17612                                 available_major=0
17613                         fi
17614                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17615                         available_minor=`echo $available | sed 's/[^0-9].*//'`
17616                         if test -z "$available_minor" ; then
17617                                 available_minor=0
17618                         fi
17619                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17620                         available_patch=`echo $available | sed 's/[^0-9].*//'`
17621                         if test -z "$available_patch" ; then
17622                                 available_patch=0
17623                         fi
17624                         badversion=0
17625                         if test $available_major -lt $required_major ; then
17626                                 badversion=1
17627                         fi
17628                         if test $available_major -eq $required_major \
17629                                 -a $available_minor -lt $required_minor ; then
17630                                 badversion=1
17631                         fi
17632                         if test $available_major -eq $required_major \
17633                                 -a $available_minor -eq $required_minor \
17634                                 -a $available_patch -lt $required_patch ; then
17635                                 badversion=1
17636                         fi
17637                         if test $badversion -eq 1 ; then
17638                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version.  You should look at http://www.swig.org" >&5
17639 $as_echo "$as_me: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
17640                                 SWIG='echo "Error: SWIG version >= 2.0.1 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17641                         else
17642                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17643 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17644                                 SWIG_LIB=`$SWIG -swiglib`
17645                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17646 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17647                         fi
17648                 else
17649                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17650 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17651                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17652                 fi
17653         fi
17654
17655
17656       else
17657
17658         # Extract the first word of "swig", so it can be a program name with args.
17659 set dummy swig; ac_word=$2
17660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17661 $as_echo_n "checking for $ac_word... " >&6; }
17662 if ${ac_cv_path_SWIG+:} false; then :
17663   $as_echo_n "(cached) " >&6
17664 else
17665   case $SWIG in
17666   [\\/]* | ?:[\\/]*)
17667   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17668   ;;
17669   *)
17670   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17671 for as_dir in $PATH
17672 do
17673   IFS=$as_save_IFS
17674   test -z "$as_dir" && as_dir=.
17675     for ac_exec_ext in '' $ac_executable_extensions; do
17676   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17677     ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17678     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17679     break 2
17680   fi
17681 done
17682   done
17683 IFS=$as_save_IFS
17684
17685   ;;
17686 esac
17687 fi
17688 SWIG=$ac_cv_path_SWIG
17689 if test -n "$SWIG"; then
17690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17691 $as_echo "$SWIG" >&6; }
17692 else
17693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17694 $as_echo "no" >&6; }
17695 fi
17696
17697
17698         if test -z "$SWIG" ; then
17699                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17700 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17701                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17702         elif test -n "" ; then
17703                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17704 $as_echo_n "checking for SWIG version... " >&6; }
17705                 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'`
17706                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17707 $as_echo "$swig_version" >&6; }
17708                 if test -n "$swig_version" ; then
17709                         # Calculate the required version number components
17710                         required=
17711                         required_major=`echo $required | sed 's/[^0-9].*//'`
17712                         if test -z "$required_major" ; then
17713                                 required_major=0
17714                         fi
17715                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17716                         required_minor=`echo $required | sed 's/[^0-9].*//'`
17717                         if test -z "$required_minor" ; then
17718                                 required_minor=0
17719                         fi
17720                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17721                         required_patch=`echo $required | sed 's/[^0-9].*//'`
17722                         if test -z "$required_patch" ; then
17723                                 required_patch=0
17724                         fi
17725                         # Calculate the available version number components
17726                         available=$swig_version
17727                         available_major=`echo $available | sed 's/[^0-9].*//'`
17728                         if test -z "$available_major" ; then
17729                                 available_major=0
17730                         fi
17731                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17732                         available_minor=`echo $available | sed 's/[^0-9].*//'`
17733                         if test -z "$available_minor" ; then
17734                                 available_minor=0
17735                         fi
17736                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17737                         available_patch=`echo $available | sed 's/[^0-9].*//'`
17738                         if test -z "$available_patch" ; then
17739                                 available_patch=0
17740                         fi
17741                         badversion=0
17742                         if test $available_major -lt $required_major ; then
17743                                 badversion=1
17744                         fi
17745                         if test $available_major -eq $required_major \
17746                                 -a $available_minor -lt $required_minor ; then
17747                                 badversion=1
17748                         fi
17749                         if test $available_major -eq $required_major \
17750                                 -a $available_minor -eq $required_minor \
17751                                 -a $available_patch -lt $required_patch ; then
17752                                 badversion=1
17753                         fi
17754                         if test $badversion -eq 1 ; then
17755                                 { $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
17756 $as_echo "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
17757                                 SWIG='echo "Error: SWIG version >=  is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17758                         else
17759                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17760 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17761                                 SWIG_LIB=`$SWIG -swiglib`
17762                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17763 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17764                         fi
17765                 else
17766                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17767 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17768                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17769                 fi
17770         fi
17771
17772
17773       fi
17774       { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
17775 $as_echo_n "checking SWIG... " >&6; }
17776       if test ! -x "$SWIG"; then
17777          as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
17778       else
17779
17780 $as_echo "#define HAVE_SWIG 1" >>confdefs.h
17781
17782          swig="$SWIG"
17783
17784          { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
17785 $as_echo "present" >&6; }
17786
17787          # If have Python & SWIG
17788          # Declare PythonMod
17789          if test x_$ub_with_pythonmod != x_no; then
17790
17791 $as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
17792
17793             WITH_PYTHONMODULE=yes
17794
17795             PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
17796
17797             PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
17798
17799             PYTHONMOD_INSTALL=pythonmod-install
17800
17801             PYTHONMOD_UNINSTALL=pythonmod-uninstall
17802
17803          fi
17804
17805          # Declare PyUnbound
17806          if test x_$ub_with_pyunbound != x_no; then
17807
17808 $as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
17809
17810             WITH_PYUNBOUND=yes
17811
17812             PYUNBOUND_OBJ="libunbound_wrap.lo"
17813
17814             PYUNBOUND_TARGET="_unbound.la"
17815
17816             PYUNBOUND_INSTALL=pyunbound-install
17817
17818             PYUNBOUND_UNINSTALL=pyunbound-uninstall
17819
17820          fi
17821       fi
17822    else
17823       { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
17824 $as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
17825       ub_with_pyunbound=no
17826       ub_with_pythonmod=no
17827    fi
17828 fi
17829
17830 if test "`uname`" = "NetBSD"; then
17831         NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
17832
17833 fi
17834 CONFIG_DATE=`date +%Y%m%d`
17835
17836
17837 # Checks for libraries.
17838
17839 # libnss
17840 USE_NSS="no"
17841
17842 # Check whether --with-nss was given.
17843 if test "${with_nss+set}" = set; then :
17844   withval=$with_nss;
17845         USE_NSS="yes"
17846
17847 $as_echo "#define HAVE_NSS 1" >>confdefs.h
17848
17849         if test "$withval" != "" -a "$withval" != "yes"; then
17850                 CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
17851                 LDFLAGS="$LDFLAGS -L$withval/lib"
17852
17853         if test "x$enable_rpath" = xyes; then
17854                 if echo "$withval/lib" | grep "^/" >/dev/null; then
17855                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17856                 fi
17857         fi
17858
17859                 CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
17860         else
17861                 CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
17862                 CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
17863         fi
17864         LIBS="$LIBS -lnss3 -lnspr4"
17865         SSLLIB=""
17866         PC_CRYPTO_DEPENDENCY="nss nspr"
17867
17868
17869
17870 fi
17871
17872
17873 # libnettle
17874 USE_NETTLE="no"
17875
17876 # Check whether --with-nettle was given.
17877 if test "${with_nettle+set}" = set; then :
17878   withval=$with_nettle;
17879         USE_NETTLE="yes"
17880
17881 $as_echo "#define HAVE_NETTLE 1" >>confdefs.h
17882
17883         for ac_header in nettle/dsa-compat.h
17884 do :
17885   ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
17886 "
17887 if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then :
17888   cat >>confdefs.h <<_ACEOF
17889 #define HAVE_NETTLE_DSA_COMPAT_H 1
17890 _ACEOF
17891
17892 fi
17893
17894 done
17895
17896         if test "$withval" != "" -a "$withval" != "yes"; then
17897                 CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
17898                 LDFLAGS="$LDFLAGS -L$withval/lib"
17899
17900         if test "x$enable_rpath" = xyes; then
17901                 if echo "$withval/lib" | grep "^/" >/dev/null; then
17902                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17903                 fi
17904         fi
17905
17906         else
17907                 CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
17908         fi
17909         LIBS="$LIBS -lhogweed -lnettle -lgmp"
17910         SSLLIB=""
17911         PC_CRYPTO_DEPENDENCY="hogweed nettle"
17912
17913
17914
17915 fi
17916
17917
17918 # openssl
17919 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17920
17921
17922 # Check whether --with-ssl was given.
17923 if test "${with_ssl+set}" = set; then :
17924   withval=$with_ssl;
17925
17926 else
17927
17928             withval="yes"
17929
17930 fi
17931
17932     if test x_$withval = x_no; then
17933         as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
17934     fi
17935
17936     withval=$withval
17937     if test x_$withval != x_no; then
17938         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
17939 $as_echo_n "checking for SSL... " >&6; }
17940         if test x_$withval = x_ -o x_$withval = x_yes; then
17941             withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
17942         fi
17943         for dir in $withval; do
17944             ssldir="$dir"
17945             if test -f "$dir/include/openssl/ssl.h"; then
17946                 found_ssl="yes"
17947
17948 cat >>confdefs.h <<_ACEOF
17949 #define HAVE_SSL /**/
17950 _ACEOF
17951
17952                                 if test "$ssldir" != "/usr"; then
17953                         CPPFLAGS="$CPPFLAGS -I$ssldir/include"
17954                         LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
17955                 fi
17956                 break;
17957             fi
17958         done
17959         if test x_$found_ssl != x_yes; then
17960             as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
17961         else
17962             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
17963 $as_echo "found in $ssldir" >&6; }
17964             HAVE_SSL=yes
17965                         if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
17966                 LDFLAGS="$LDFLAGS -L$ssldir/lib"
17967                 LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
17968
17969         if test "x$enable_rpath" = xyes; then
17970                 if echo "$ssldir/lib" | grep "^/" >/dev/null; then
17971                         RUNTIME_PATH="$RUNTIME_PATH -R$ssldir/lib"
17972                 fi
17973         fi
17974
17975             fi
17976
17977             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5
17978 $as_echo_n "checking for EVP_sha256 in -lcrypto... " >&6; }
17979             LIBS="$LIBS -lcrypto"
17980             LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
17981             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17982 /* end confdefs.h.  */
17983
17984 int
17985 main ()
17986 {
17987
17988                 int EVP_sha256(void);
17989                 (void)EVP_sha256();
17990
17991   ;
17992   return 0;
17993 }
17994 _ACEOF
17995 if ac_fn_c_try_link "$LINENO"; then :
17996
17997                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17998 $as_echo "yes" >&6; }
17999
18000 $as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18001
18002
18003 else
18004
18005                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18006 $as_echo "no" >&6; }
18007                 # check if -lwsock32 or -lgdi32 are needed.
18008                 BAKLIBS="$LIBS"
18009                 BAKSSLLIBS="$LIBSSL_LIBS"
18010                 LIBS="$LIBS -lgdi32 -lws2_32"
18011                 LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
18012                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
18013 $as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
18014                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18015 /* end confdefs.h.  */
18016
18017 int
18018 main ()
18019 {
18020
18021                     int EVP_sha256(void);
18022                     (void)EVP_sha256();
18023
18024   ;
18025   return 0;
18026 }
18027 _ACEOF
18028 if ac_fn_c_try_link "$LINENO"; then :
18029
18030
18031 $as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18032
18033                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18034 $as_echo "yes" >&6; }
18035
18036 else
18037
18038                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18039 $as_echo "no" >&6; }
18040                     LIBS="$BAKLIBS"
18041                     LIBSSL_LIBS="$BAKSSLLIBS"
18042                     LIBS="$LIBS -ldl"
18043                     LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
18044                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
18045 $as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
18046                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18047 /* end confdefs.h.  */
18048
18049 int
18050 main ()
18051 {
18052
18053                         int EVP_sha256(void);
18054                         (void)EVP_sha256();
18055
18056   ;
18057   return 0;
18058 }
18059 _ACEOF
18060 if ac_fn_c_try_link "$LINENO"; then :
18061
18062
18063 $as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18064
18065                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18066 $as_echo "yes" >&6; }
18067
18068 else
18069
18070                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18071 $as_echo "no" >&6; }
18072                         LIBS="$BAKLIBS"
18073                         LIBSSL_LIBS="$BAKSSLLIBS"
18074                         LIBS="$LIBS -ldl -pthread"
18075                         LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
18076                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
18077 $as_echo_n "checking if -lcrypto needs -ldl -pthread... " >&6; }
18078                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18079 /* end confdefs.h.  */
18080
18081 int
18082 main ()
18083 {
18084
18085                             int EVP_sha256(void);
18086                             (void)EVP_sha256();
18087
18088   ;
18089   return 0;
18090 }
18091 _ACEOF
18092 if ac_fn_c_try_link "$LINENO"; then :
18093
18094
18095 $as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18096
18097                             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18098 $as_echo "yes" >&6; }
18099
18100 else
18101
18102                             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18103 $as_echo "no" >&6; }
18104                             as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
18105
18106 fi
18107 rm -f core conftest.err conftest.$ac_objext \
18108     conftest$ac_exeext conftest.$ac_ext
18109
18110 fi
18111 rm -f core conftest.err conftest.$ac_objext \
18112     conftest$ac_exeext conftest.$ac_ext
18113
18114 fi
18115 rm -f core conftest.err conftest.$ac_objext \
18116     conftest$ac_exeext conftest.$ac_ext
18117
18118 fi
18119 rm -f core conftest.err conftest.$ac_objext \
18120     conftest$ac_exeext conftest.$ac_ext
18121         fi
18122
18123
18124     fi
18125 for ac_header in openssl/ssl.h
18126 do :
18127   ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
18128 "
18129 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
18130   cat >>confdefs.h <<_ACEOF
18131 #define HAVE_OPENSSL_SSL_H 1
18132 _ACEOF
18133
18134 fi
18135
18136 done
18137
18138 for ac_header in openssl/err.h
18139 do :
18140   ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
18141 "
18142 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
18143   cat >>confdefs.h <<_ACEOF
18144 #define HAVE_OPENSSL_ERR_H 1
18145 _ACEOF
18146
18147 fi
18148
18149 done
18150
18151 for ac_header in openssl/rand.h
18152 do :
18153   ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
18154 "
18155 if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
18156   cat >>confdefs.h <<_ACEOF
18157 #define HAVE_OPENSSL_RAND_H 1
18158 _ACEOF
18159
18160 fi
18161
18162 done
18163
18164
18165
18166
18167 # check if libssl needs libdl
18168 BAKLIBS="$LIBS"
18169 LIBS="-lssl $LIBS"
18170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
18171 $as_echo_n "checking if libssl needs libdl... " >&6; }
18172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18173 /* end confdefs.h.  */
18174
18175 /* Override any GCC internal prototype to avoid an error.
18176    Use char because int might match the return type of a GCC
18177    builtin and then its argument prototype would still apply.  */
18178 #ifdef __cplusplus
18179 extern "C"
18180 #endif
18181 char SSL_CTX_new ();
18182 int
18183 main ()
18184 {
18185 return SSL_CTX_new ();
18186   ;
18187   return 0;
18188 }
18189 _ACEOF
18190 if ac_fn_c_try_link "$LINENO"; then :
18191
18192         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18193 $as_echo "no" >&6; }
18194         LIBS="$BAKLIBS"
18195
18196 else
18197
18198         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18199 $as_echo "yes" >&6; }
18200         LIBS="$BAKLIBS"
18201         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
18202 $as_echo_n "checking for library containing dlopen... " >&6; }
18203 if ${ac_cv_search_dlopen+:} false; then :
18204   $as_echo_n "(cached) " >&6
18205 else
18206   ac_func_search_save_LIBS=$LIBS
18207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18208 /* end confdefs.h.  */
18209
18210 /* Override any GCC internal prototype to avoid an error.
18211    Use char because int might match the return type of a GCC
18212    builtin and then its argument prototype would still apply.  */
18213 #ifdef __cplusplus
18214 extern "C"
18215 #endif
18216 char dlopen ();
18217 int
18218 main ()
18219 {
18220 return dlopen ();
18221   ;
18222   return 0;
18223 }
18224 _ACEOF
18225 for ac_lib in '' dl; do
18226   if test -z "$ac_lib"; then
18227     ac_res="none required"
18228   else
18229     ac_res=-l$ac_lib
18230     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18231   fi
18232   if ac_fn_c_try_link "$LINENO"; then :
18233   ac_cv_search_dlopen=$ac_res
18234 fi
18235 rm -f core conftest.err conftest.$ac_objext \
18236     conftest$ac_exeext
18237   if ${ac_cv_search_dlopen+:} false; then :
18238   break
18239 fi
18240 done
18241 if ${ac_cv_search_dlopen+:} false; then :
18242
18243 else
18244   ac_cv_search_dlopen=no
18245 fi
18246 rm conftest.$ac_ext
18247 LIBS=$ac_func_search_save_LIBS
18248 fi
18249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
18250 $as_echo "$ac_cv_search_dlopen" >&6; }
18251 ac_res=$ac_cv_search_dlopen
18252 if test "$ac_res" != no; then :
18253   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18254
18255 fi
18256
18257
18258 fi
18259 rm -f core conftest.err conftest.$ac_objext \
18260     conftest$ac_exeext conftest.$ac_ext
18261 SSLLIB="-lssl"
18262
18263 PC_CRYPTO_DEPENDENCY="libcrypto libssl"
18264
18265
18266 # check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
18267 BAKLIBS="$LIBS"
18268 LIBS="-lssl $LIBS"
18269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
18270 $as_echo_n "checking if libssl needs -lcrypt32... " >&6; }
18271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18272 /* end confdefs.h.  */
18273
18274 /* Override any GCC internal prototype to avoid an error.
18275    Use char because int might match the return type of a GCC
18276    builtin and then its argument prototype would still apply.  */
18277 #ifdef __cplusplus
18278 extern "C"
18279 #endif
18280 char EVP_sha256 ();
18281 int
18282 main ()
18283 {
18284 return EVP_sha256 ();
18285   ;
18286   return 0;
18287 }
18288 _ACEOF
18289 if ac_fn_c_try_link "$LINENO"; then :
18290
18291         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18292 $as_echo "no" >&6; }
18293         LIBS="$BAKLIBS"
18294
18295 else
18296
18297         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18298 $as_echo "yes" >&6; }
18299         LIBS="$BAKLIBS"
18300         LIBS="$LIBS -lcrypt32"
18301
18302 fi
18303 rm -f core conftest.err conftest.$ac_objext \
18304     conftest$ac_exeext conftest.$ac_ext
18305
18306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
18307 $as_echo_n "checking for LibreSSL... " >&6; }
18308 if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
18309         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18310 $as_echo "yes" >&6; }
18311
18312 $as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
18313
18314         # libressl provides these compat functions, but they may also be
18315         # declared by the OS in libc.  See if they have been declared.
18316         ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
18317 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
18318   ac_have_decl=1
18319 else
18320   ac_have_decl=0
18321 fi
18322
18323 cat >>confdefs.h <<_ACEOF
18324 #define HAVE_DECL_STRLCPY $ac_have_decl
18325 _ACEOF
18326 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
18327 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
18328   ac_have_decl=1
18329 else
18330   ac_have_decl=0
18331 fi
18332
18333 cat >>confdefs.h <<_ACEOF
18334 #define HAVE_DECL_STRLCAT $ac_have_decl
18335 _ACEOF
18336 ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
18337 if test "x$ac_cv_have_decl_arc4random" = xyes; then :
18338   ac_have_decl=1
18339 else
18340   ac_have_decl=0
18341 fi
18342
18343 cat >>confdefs.h <<_ACEOF
18344 #define HAVE_DECL_ARC4RANDOM $ac_have_decl
18345 _ACEOF
18346 ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
18347 if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
18348   ac_have_decl=1
18349 else
18350   ac_have_decl=0
18351 fi
18352
18353 cat >>confdefs.h <<_ACEOF
18354 #define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
18355 _ACEOF
18356
18357 else
18358         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18359 $as_echo "no" >&6; }
18360 fi
18361 for ac_header in openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h openssl/core_names.h
18362 do :
18363   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18364 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
18365 "
18366 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18367   cat >>confdefs.h <<_ACEOF
18368 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18369 _ACEOF
18370
18371 fi
18372
18373 done
18374
18375 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 ENGINE_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1 EVP_DigestVerify EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex CRYPTO_THREADID_set_callback EVP_MAC_CTX_set_params
18376 do :
18377   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18378 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18379 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18380   cat >>confdefs.h <<_ACEOF
18381 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18382 _ACEOF
18383
18384 fi
18385 done
18386
18387
18388 # these check_funcs need -lssl
18389 BAKLIBS="$LIBS"
18390 LIBS="-lssl $LIBS"
18391 for ac_func in OPENSSL_init_ssl SSL_CTX_set_security_level SSL_set1_host SSL_get0_peername X509_VERIFY_PARAM_set1_host SSL_CTX_set_ciphersuites SSL_CTX_set_tlsext_ticket_key_evp_cb SSL_CTX_set_alpn_select_cb
18392 do :
18393   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18394 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18395 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18396   cat >>confdefs.h <<_ACEOF
18397 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18398 _ACEOF
18399
18400 fi
18401 done
18402
18403 LIBS="$BAKLIBS"
18404
18405 ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
18406 $ac_includes_default
18407 #ifdef HAVE_OPENSSL_ERR_H
18408 #include <openssl/err.h>
18409 #endif
18410
18411 #ifdef HAVE_OPENSSL_RAND_H
18412 #include <openssl/rand.h>
18413 #endif
18414
18415 #ifdef HAVE_OPENSSL_CONF_H
18416 #include <openssl/conf.h>
18417 #endif
18418
18419 #ifdef HAVE_OPENSSL_ENGINE_H
18420 #include <openssl/engine.h>
18421 #endif
18422 #include <openssl/ssl.h>
18423 #include <openssl/evp.h>
18424
18425 "
18426 if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
18427   ac_have_decl=1
18428 else
18429   ac_have_decl=0
18430 fi
18431
18432 cat >>confdefs.h <<_ACEOF
18433 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
18434 _ACEOF
18435 ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
18436 $ac_includes_default
18437 #ifdef HAVE_OPENSSL_ERR_H
18438 #include <openssl/err.h>
18439 #endif
18440
18441 #ifdef HAVE_OPENSSL_RAND_H
18442 #include <openssl/rand.h>
18443 #endif
18444
18445 #ifdef HAVE_OPENSSL_CONF_H
18446 #include <openssl/conf.h>
18447 #endif
18448
18449 #ifdef HAVE_OPENSSL_ENGINE_H
18450 #include <openssl/engine.h>
18451 #endif
18452 #include <openssl/ssl.h>
18453 #include <openssl/evp.h>
18454
18455 "
18456 if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
18457   ac_have_decl=1
18458 else
18459   ac_have_decl=0
18460 fi
18461
18462 cat >>confdefs.h <<_ACEOF
18463 #define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
18464 _ACEOF
18465 ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
18466 $ac_includes_default
18467 #ifdef HAVE_OPENSSL_ERR_H
18468 #include <openssl/err.h>
18469 #endif
18470
18471 #ifdef HAVE_OPENSSL_RAND_H
18472 #include <openssl/rand.h>
18473 #endif
18474
18475 #ifdef HAVE_OPENSSL_CONF_H
18476 #include <openssl/conf.h>
18477 #endif
18478
18479 #ifdef HAVE_OPENSSL_ENGINE_H
18480 #include <openssl/engine.h>
18481 #endif
18482 #include <openssl/ssl.h>
18483 #include <openssl/evp.h>
18484
18485 "
18486 if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
18487   ac_have_decl=1
18488 else
18489   ac_have_decl=0
18490 fi
18491
18492 cat >>confdefs.h <<_ACEOF
18493 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
18494 _ACEOF
18495
18496
18497 if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then
18498 # check function return type.
18499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5
18500 $as_echo_n "checking the return type of HMAC_Init_ex... " >&6; }
18501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18502 /* end confdefs.h.  */
18503
18504 #ifdef HAVE_OPENSSL_ERR_H
18505 #include <openssl/err.h>
18506 #endif
18507
18508 #ifdef HAVE_OPENSSL_RAND_H
18509 #include <openssl/rand.h>
18510 #endif
18511
18512 #ifdef HAVE_OPENSSL_CONF_H
18513 #include <openssl/conf.h>
18514 #endif
18515
18516 #ifdef HAVE_OPENSSL_ENGINE_H
18517 #include <openssl/engine.h>
18518 #endif
18519 #include <openssl/ssl.h>
18520 #include <openssl/evp.h>
18521
18522 int
18523 main ()
18524 {
18525
18526         HMAC_CTX* hmac_ctx = NULL;
18527         void* hmac_key = NULL;
18528         const EVP_MD* digest = NULL;
18529         int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);
18530         (void)x;
18531
18532   ;
18533   return 0;
18534 }
18535 _ACEOF
18536 if ac_fn_c_try_compile "$LINENO"; then :
18537
18538         { $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5
18539 $as_echo "int" >&6; }
18540
18541 else
18542
18543         { $as_echo "$as_me:${as_lineno-$LINENO}: result: void" >&5
18544 $as_echo "void" >&6; }
18545
18546 $as_echo "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h
18547
18548
18549 fi
18550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18551 fi
18552
18553 fi
18554
18555
18556 # libbsd
18557
18558 # Check whether --with-libbsd was given.
18559 if test "${with_libbsd+set}" = set; then :
18560   withval=$with_libbsd;
18561         for ac_header in bsd/string.h bsd/stdlib.h
18562 do :
18563   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18564 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
18565 "
18566 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18567   cat >>confdefs.h <<_ACEOF
18568 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18569 _ACEOF
18570
18571 fi
18572
18573 done
18574
18575         if test "x$ac_cv_header_bsd_string_h" = xyes -a "x$ac_cv_header_bsd_stdlib_h" = xyes; then
18576                 for func in strlcpy strlcat arc4random arc4random_uniform reallocarray; do
18577                         as_ac_Search=`$as_echo "ac_cv_search_$func" | $as_tr_sh`
18578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $func" >&5
18579 $as_echo_n "checking for library containing $func... " >&6; }
18580 if eval \${$as_ac_Search+:} false; then :
18581   $as_echo_n "(cached) " >&6
18582 else
18583   ac_func_search_save_LIBS=$LIBS
18584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18585 /* end confdefs.h.  */
18586
18587 /* Override any GCC internal prototype to avoid an error.
18588    Use char because int might match the return type of a GCC
18589    builtin and then its argument prototype would still apply.  */
18590 #ifdef __cplusplus
18591 extern "C"
18592 #endif
18593 char $func ();
18594 int
18595 main ()
18596 {
18597 return $func ();
18598   ;
18599   return 0;
18600 }
18601 _ACEOF
18602 for ac_lib in '' bsd; do
18603   if test -z "$ac_lib"; then
18604     ac_res="none required"
18605   else
18606     ac_res=-l$ac_lib
18607     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18608   fi
18609   if ac_fn_c_try_link "$LINENO"; then :
18610   eval "$as_ac_Search=\$ac_res"
18611 fi
18612 rm -f core conftest.err conftest.$ac_objext \
18613     conftest$ac_exeext
18614   if eval \${$as_ac_Search+:} false; then :
18615   break
18616 fi
18617 done
18618 if eval \${$as_ac_Search+:} false; then :
18619
18620 else
18621   eval "$as_ac_Search=no"
18622 fi
18623 rm conftest.$ac_ext
18624 LIBS=$ac_func_search_save_LIBS
18625 fi
18626 eval ac_res=\$$as_ac_Search
18627                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18628 $as_echo "$ac_res" >&6; }
18629 eval ac_res=\$$as_ac_Search
18630 if test "$ac_res" != no; then :
18631   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18632
18633
18634 $as_echo "#define HAVE_LIBBSD 1" >>confdefs.h
18635
18636                                 PC_LIBBSD_DEPENDENCY=libbsd
18637
18638
18639 fi
18640
18641                 done
18642         fi
18643
18644 fi
18645
18646
18647 # Check whether --enable-sha1 was given.
18648 if test "${enable_sha1+set}" = set; then :
18649   enableval=$enable_sha1;
18650 fi
18651
18652 case "$enable_sha1" in
18653         no)
18654         ;;
18655         yes|*)
18656
18657 $as_echo "#define USE_SHA1 1" >>confdefs.h
18658
18659         ;;
18660 esac
18661
18662
18663 # Check whether --enable-sha2 was given.
18664 if test "${enable_sha2+set}" = set; then :
18665   enableval=$enable_sha2;
18666 fi
18667
18668 case "$enable_sha2" in
18669         no)
18670         ;;
18671         yes|*)
18672
18673 $as_echo "#define USE_SHA2 1" >>confdefs.h
18674
18675         ;;
18676 esac
18677
18678 # Check whether --enable-subnet was given.
18679 if test "${enable_subnet+set}" = set; then :
18680   enableval=$enable_subnet;
18681 fi
18682
18683 case "$enable_subnet" in
18684         yes)
18685
18686 $as_echo "#define CLIENT_SUBNET 1" >>confdefs.h
18687
18688         SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
18689
18690         SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
18691
18692         ;;
18693         no|*)
18694         ;;
18695 esac
18696
18697 # check wether gost also works
18698
18699 # Check whether --enable-gost was given.
18700 if test "${enable_gost+set}" = set; then :
18701   enableval=$enable_gost;
18702 fi
18703
18704 use_gost="no"
18705 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18706 case "$enable_gost" in
18707         no)
18708         ;;
18709         *)
18710         ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
18711 if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
18712   :
18713 else
18714   as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
18715 fi
18716
18717         ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
18718 if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
18719
18720 else
18721   as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
18722 fi
18723
18724
18725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
18726 $as_echo_n "checking if GOST works... " >&6; }
18727 if test c${cross_compiling} = cno; then
18728 BAKCFLAGS="$CFLAGS"
18729 if test -n "$ssldir"; then
18730         CFLAGS="$CFLAGS -Wl,-rpath,$ssldir/lib"
18731 fi
18732 if test "$cross_compiling" = yes; then :
18733   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18734 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18735 as_fn_error $? "cannot run test program while cross compiling
18736 See \`config.log' for more details" "$LINENO" 5; }
18737 else
18738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18739 /* end confdefs.h.  */
18740
18741 #include <string.h>
18742 #include <openssl/ssl.h>
18743 #include <openssl/evp.h>
18744 #include <openssl/engine.h>
18745 #include <openssl/conf.h>
18746 /* routine to load gost (from sldns) */
18747 int load_gost_id(void)
18748 {
18749         static int gost_id = 0;
18750         const EVP_PKEY_ASN1_METHOD* meth;
18751         ENGINE* e;
18752
18753         if(gost_id) return gost_id;
18754
18755         /* see if configuration loaded gost implementation from other engine*/
18756         meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
18757         if(meth) {
18758                 EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18759                 return gost_id;
18760         }
18761
18762         /* see if engine can be loaded already */
18763         e = ENGINE_by_id("gost");
18764         if(!e) {
18765                 /* load it ourself, in case statically linked */
18766                 ENGINE_load_builtin_engines();
18767                 ENGINE_load_dynamic();
18768                 e = ENGINE_by_id("gost");
18769         }
18770         if(!e) {
18771                 /* no gost engine in openssl */
18772                 return 0;
18773         }
18774         if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
18775                 ENGINE_finish(e);
18776                 ENGINE_free(e);
18777                 return 0;
18778         }
18779
18780         meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
18781         if(!meth) {
18782                 /* algo not found */
18783                 ENGINE_finish(e);
18784                 ENGINE_free(e);
18785                 return 0;
18786         }
18787         EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18788         return gost_id;
18789 }
18790 int main(void) {
18791         EVP_MD_CTX* ctx;
18792         const EVP_MD* md;
18793         unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
18794         const char* str = "Hello world";
18795         const unsigned char check[] = {
18796                 0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
18797                 0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
18798                 0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
18799                 0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
18800         };
18801         OPENSSL_config(NULL);
18802         (void)load_gost_id();
18803         md = EVP_get_digestbyname("md_gost94");
18804         if(!md) return 1;
18805         memset(digest, 0, sizeof(digest));
18806         ctx = EVP_MD_CTX_create();
18807         if(!ctx) return 2;
18808         if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
18809         if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
18810         if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
18811         /* uncomment to see the hash calculated.
18812                 {int i;
18813                 for(i=0; i<32; i++)
18814                         printf(" %2.2x", (int)digest[i]);
18815                 printf("\n");}
18816         */
18817         if(memcmp(digest, check, sizeof(check)) != 0)
18818                 return 6;
18819         return 0;
18820 }
18821
18822 _ACEOF
18823 if ac_fn_c_try_run "$LINENO"; then :
18824   eval "ac_cv_c_gost_works=yes"
18825 else
18826   eval "ac_cv_c_gost_works=no"
18827 fi
18828 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18829   conftest.$ac_objext conftest.beam conftest.$ac_ext
18830 fi
18831
18832 CFLAGS="$BAKCFLAGS"
18833 else
18834 eval "ac_cv_c_gost_works=maybe"
18835 fi
18836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
18837 $as_echo "$ac_cv_c_gost_works" >&6; }
18838
18839         if test "$ac_cv_c_gost_works" != no; then
18840                 use_gost="yes"
18841
18842 $as_echo "#define USE_GOST 1" >>confdefs.h
18843
18844         fi
18845         ;;
18846 esac
18847 fi
18848 # Check whether --enable-ecdsa was given.
18849 if test "${enable_ecdsa+set}" = set; then :
18850   enableval=$enable_ecdsa;
18851 fi
18852
18853 use_ecdsa="no"
18854 case "$enable_ecdsa" in
18855     no)
18856       ;;
18857     *)
18858       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18859               ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
18860 if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
18861
18862 else
18863   as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18864 fi
18865
18866               ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
18867 if test "x$ac_cv_func_SHA384_Init" = xyes; then :
18868
18869 else
18870   as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18871 fi
18872
18873               ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
18874 #include <openssl/evp.h>
18875
18876 "
18877 if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
18878   ac_have_decl=1
18879 else
18880   ac_have_decl=0
18881 fi
18882
18883 cat >>confdefs.h <<_ACEOF
18884 #define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
18885 _ACEOF
18886 if test $ac_have_decl = 1; then :
18887
18888 else
18889   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18890 fi
18891 ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
18892 #include <openssl/evp.h>
18893
18894 "
18895 if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
18896   ac_have_decl=1
18897 else
18898   ac_have_decl=0
18899 fi
18900
18901 cat >>confdefs.h <<_ACEOF
18902 #define HAVE_DECL_NID_SECP384R1 $ac_have_decl
18903 _ACEOF
18904 if test $ac_have_decl = 1; then :
18905
18906 else
18907   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18908 fi
18909
18910               # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
18911               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
18912 $as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
18913               if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
18914                 if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
18915                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18916 $as_echo "no" >&6; }
18917
18918 cat >>confdefs.h <<_ACEOF
18919 #define USE_ECDSA_EVP_WORKAROUND 1
18920 _ACEOF
18921
18922                 else
18923                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18924 $as_echo "yes" >&6; }
18925                 fi
18926               else
18927                 # not OpenSSL, thus likely LibreSSL, which supports it
18928                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18929 $as_echo "yes" >&6; }
18930               fi
18931       fi
18932       # we now know we have ECDSA and the required curves.
18933
18934 cat >>confdefs.h <<_ACEOF
18935 #define USE_ECDSA 1
18936 _ACEOF
18937
18938       use_ecdsa="yes"
18939       ;;
18940 esac
18941
18942 # Check whether --enable-dsa was given.
18943 if test "${enable_dsa+set}" = set; then :
18944   enableval=$enable_dsa;
18945 fi
18946
18947 use_dsa="no"
18948 case "$enable_dsa" in
18949     yes)
18950       # detect if DSA is supported, and turn it off if not.
18951       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18952       ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
18953 if test "x$ac_cv_func_DSA_SIG_new" = xyes; then :
18954
18955       as_ac_Type=`$as_echo "ac_cv_type_DSA_SIG*" | $as_tr_sh`
18956 ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
18957 $ac_includes_default
18958 #ifdef HAVE_OPENSSL_ERR_H
18959 #include <openssl/err.h>
18960 #endif
18961
18962 #ifdef HAVE_OPENSSL_RAND_H
18963 #include <openssl/rand.h>
18964 #endif
18965
18966 #ifdef HAVE_OPENSSL_CONF_H
18967 #include <openssl/conf.h>
18968 #endif
18969
18970 #ifdef HAVE_OPENSSL_ENGINE_H
18971 #include <openssl/engine.h>
18972 #endif
18973
18974 "
18975 if eval test \"x\$"$as_ac_Type"\" = x"yes"; then :
18976
18977
18978 cat >>confdefs.h <<_ACEOF
18979 #define USE_DSA 1
18980 _ACEOF
18981
18982
18983 else
18984   if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
18985                fi
18986 fi
18987
18988
18989 else
18990   if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
18991                fi
18992 fi
18993
18994       else
18995
18996 cat >>confdefs.h <<_ACEOF
18997 #define USE_DSA 1
18998 _ACEOF
18999
19000       fi
19001       ;;
19002     *)
19003       # disable dsa by default, RFC 8624 section 3.1, validators MUST NOT
19004       # support DSA for DNSSEC Validation.
19005       ;;
19006 esac
19007
19008 # Check whether --enable-ed25519 was given.
19009 if test "${enable_ed25519+set}" = set; then :
19010   enableval=$enable_ed25519;
19011 fi
19012
19013 use_ed25519="no"
19014 case "$enable_ed25519" in
19015     no)
19016       ;;
19017     *)
19018       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19019               ac_fn_c_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
19020 #include <openssl/evp.h>
19021
19022 "
19023 if test "x$ac_cv_have_decl_NID_ED25519" = xyes; then :
19024   ac_have_decl=1
19025 else
19026   ac_have_decl=0
19027 fi
19028
19029 cat >>confdefs.h <<_ACEOF
19030 #define HAVE_DECL_NID_ED25519 $ac_have_decl
19031 _ACEOF
19032 if test $ac_have_decl = 1; then :
19033
19034                 use_ed25519="yes"
19035
19036 else
19037    if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
19038                 fi
19039 fi
19040
19041       fi
19042       if test $USE_NETTLE = "yes"; then
19043                 for ac_header in nettle/eddsa.h
19044 do :
19045   ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
19046 "
19047 if test "x$ac_cv_header_nettle_eddsa_h" = xyes; then :
19048   cat >>confdefs.h <<_ACEOF
19049 #define HAVE_NETTLE_EDDSA_H 1
19050 _ACEOF
19051  use_ed25519="yes"
19052 fi
19053
19054 done
19055
19056       fi
19057       if test $use_ed25519 = "yes"; then
19058
19059 cat >>confdefs.h <<_ACEOF
19060 #define USE_ED25519 1
19061 _ACEOF
19062
19063       fi
19064       ;;
19065 esac
19066
19067 # Check whether --enable-ed448 was given.
19068 if test "${enable_ed448+set}" = set; then :
19069   enableval=$enable_ed448;
19070 fi
19071
19072 use_ed448="no"
19073 case "$enable_ed448" in
19074     no)
19075       ;;
19076     *)
19077       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19078               ac_fn_c_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
19079 #include <openssl/evp.h>
19080
19081 "
19082 if test "x$ac_cv_have_decl_NID_ED448" = xyes; then :
19083   ac_have_decl=1
19084 else
19085   ac_have_decl=0
19086 fi
19087
19088 cat >>confdefs.h <<_ACEOF
19089 #define HAVE_DECL_NID_ED448 $ac_have_decl
19090 _ACEOF
19091 if test $ac_have_decl = 1; then :
19092
19093                 use_ed448="yes"
19094
19095 else
19096    if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
19097                 fi
19098 fi
19099
19100       fi
19101       if test $use_ed448 = "yes"; then
19102
19103 cat >>confdefs.h <<_ACEOF
19104 #define USE_ED448 1
19105 _ACEOF
19106
19107       fi
19108       ;;
19109 esac
19110
19111 # Check whether --enable-event-api was given.
19112 if test "${enable_event_api+set}" = set; then :
19113   enableval=$enable_event_api;
19114 fi
19115
19116 case "$enable_event_api" in
19117     yes)
19118       UNBOUND_EVENT_INSTALL=unbound-event-install
19119
19120       UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
19121
19122       ;;
19123     *)
19124       ;;
19125 esac
19126
19127 # Check whether --enable-tfo-client was given.
19128 if test "${enable_tfo_client+set}" = set; then :
19129   enableval=$enable_tfo_client;
19130 fi
19131
19132 case "$enable_tfo_client" in
19133         yes)
19134                 case `uname` in
19135                         Linux) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
19136 #include <netinet/tcp.h>
19137
19138 "
19139 if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then :
19140   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
19141 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
19142 else
19143   as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
19144 fi
19145
19146
19147 cat >>confdefs.h <<_ACEOF
19148 #define USE_MSG_FASTOPEN 1
19149 _ACEOF
19150
19151                           ;;
19152                         Darwin) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
19153 #include <sys/socket.h>
19154
19155 "
19156 if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then :
19157   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
19158 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
19159 else
19160   as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
19161 fi
19162
19163
19164 cat >>confdefs.h <<_ACEOF
19165 #define USE_OSX_MSG_FASTOPEN 1
19166 _ACEOF
19167
19168                           ;;
19169                 esac
19170         ;;
19171         no|*)
19172                 ;;
19173 esac
19174
19175 # Check whether --enable-tfo-server was given.
19176 if test "${enable_tfo_server+set}" = set; then :
19177   enableval=$enable_tfo_server;
19178 fi
19179
19180 case "$enable_tfo_server" in
19181         yes)
19182               ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
19183 #include <netinet/tcp.h>
19184
19185 "
19186 if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then :
19187   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
19188 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
19189 else
19190   as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
19191 fi
19192
19193
19194 cat >>confdefs.h <<_ACEOF
19195 #define USE_TCP_FASTOPEN 1
19196 _ACEOF
19197
19198                 ;;
19199         no|*)
19200                 ;;
19201 esac
19202
19203 # check for libevent
19204
19205 # Check whether --with-libevent was given.
19206 if test "${with_libevent+set}" = set; then :
19207   withval=$with_libevent;
19208 else
19209    with_libevent="no"
19210 fi
19211
19212 if test "x_$with_libevent" != x_no; then
19213
19214 $as_echo "#define USE_LIBEVENT 1" >>confdefs.h
19215
19216         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
19217 $as_echo_n "checking for libevent... " >&6; }
19218         if test "x_$with_libevent" = x_ -o "x_$with_libevent" = x_yes; then
19219             with_libevent="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19220         fi
19221         for dir in $with_libevent; do
19222             thedir="$dir"
19223             if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
19224                 found_libevent="yes"
19225                                                                 if test "$thedir" != "/usr"; then
19226                                     CPPFLAGS="$CPPFLAGS -I$thedir/include"
19227                                 fi
19228                                 break;
19229                     fi
19230         done
19231         if test x_$found_libevent != x_yes; then
19232                 if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
19233                         # libevent source directory
19234                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
19235 $as_echo "found in $thedir" >&6; }
19236                         CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
19237                         BAK_LDFLAGS_SET="1"
19238                         BAK_LDFLAGS="$LDFLAGS"
19239                         # remove evdns from linking
19240                         mkdir build >/dev/null 2>&1
19241                         mkdir build/libevent >/dev/null 2>&1
19242                         mkdir build/libevent/.libs >/dev/null 2>&1
19243                         ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
19244                         ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
19245                         ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
19246                         cp $ev_files_o build/libevent
19247                         cp $ev_files_lo build/libevent
19248                         cp $ev_files_libso build/libevent/.libs
19249                         LATE_LDFLAGS="build/libevent/*.lo -lm"
19250                         LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
19251                 else
19252             as_fn_error $? "Cannot find the libevent library in $with_libevent
19253 You can restart ./configure --with-libevent=no to use a builtin alternative.
19254 Please note that this alternative is not as capable as libevent when using
19255 large outgoing port ranges.  " "$LINENO" 5
19256                 fi
19257         else
19258             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
19259 $as_echo "found in $thedir" >&6; }
19260                     if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
19261                     LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
19262
19263         if test "x$enable_rpath" = xyes; then
19264                 if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
19265                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
19266                 fi
19267         fi
19268
19269             else
19270                                     if test "$thedir" != "/usr" -a "$thedir" != ""; then
19271                         LDFLAGS="$LDFLAGS -L$thedir/lib"
19272
19273         if test "x$enable_rpath" = xyes; then
19274                 if echo "$thedir/lib" | grep "^/" >/dev/null; then
19275                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
19276                 fi
19277         fi
19278
19279                     fi
19280             fi
19281         fi
19282         # check for library used by libevent after 1.3c
19283         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19284 $as_echo_n "checking for library containing clock_gettime... " >&6; }
19285 if ${ac_cv_search_clock_gettime+:} false; then :
19286   $as_echo_n "(cached) " >&6
19287 else
19288   ac_func_search_save_LIBS=$LIBS
19289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19290 /* end confdefs.h.  */
19291
19292 /* Override any GCC internal prototype to avoid an error.
19293    Use char because int might match the return type of a GCC
19294    builtin and then its argument prototype would still apply.  */
19295 #ifdef __cplusplus
19296 extern "C"
19297 #endif
19298 char clock_gettime ();
19299 int
19300 main ()
19301 {
19302 return clock_gettime ();
19303   ;
19304   return 0;
19305 }
19306 _ACEOF
19307 for ac_lib in '' rt; do
19308   if test -z "$ac_lib"; then
19309     ac_res="none required"
19310   else
19311     ac_res=-l$ac_lib
19312     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19313   fi
19314   if ac_fn_c_try_link "$LINENO"; then :
19315   ac_cv_search_clock_gettime=$ac_res
19316 fi
19317 rm -f core conftest.err conftest.$ac_objext \
19318     conftest$ac_exeext
19319   if ${ac_cv_search_clock_gettime+:} false; then :
19320   break
19321 fi
19322 done
19323 if ${ac_cv_search_clock_gettime+:} false; then :
19324
19325 else
19326   ac_cv_search_clock_gettime=no
19327 fi
19328 rm conftest.$ac_ext
19329 LIBS=$ac_func_search_save_LIBS
19330 fi
19331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19332 $as_echo "$ac_cv_search_clock_gettime" >&6; }
19333 ac_res=$ac_cv_search_clock_gettime
19334 if test "$ac_res" != no; then :
19335   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19336
19337 fi
19338
19339
19340         # is the event.h header libev or libevent?
19341         for ac_header in event.h
19342 do :
19343   ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
19344 "
19345 if test "x$ac_cv_header_event_h" = xyes; then :
19346   cat >>confdefs.h <<_ACEOF
19347 #define HAVE_EVENT_H 1
19348 _ACEOF
19349
19350 fi
19351
19352 done
19353
19354         ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
19355 #include <event.h>
19356
19357 "
19358 if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
19359
19360                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
19361 $as_echo_n "checking for library containing event_set... " >&6; }
19362 if ${ac_cv_search_event_set+:} false; then :
19363   $as_echo_n "(cached) " >&6
19364 else
19365   ac_func_search_save_LIBS=$LIBS
19366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19367 /* end confdefs.h.  */
19368
19369 /* Override any GCC internal prototype to avoid an error.
19370    Use char because int might match the return type of a GCC
19371    builtin and then its argument prototype would still apply.  */
19372 #ifdef __cplusplus
19373 extern "C"
19374 #endif
19375 char event_set ();
19376 int
19377 main ()
19378 {
19379 return event_set ();
19380   ;
19381   return 0;
19382 }
19383 _ACEOF
19384 for ac_lib in '' ev; do
19385   if test -z "$ac_lib"; then
19386     ac_res="none required"
19387   else
19388     ac_res=-l$ac_lib
19389     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19390   fi
19391   if ac_fn_c_try_link "$LINENO"; then :
19392   ac_cv_search_event_set=$ac_res
19393 fi
19394 rm -f core conftest.err conftest.$ac_objext \
19395     conftest$ac_exeext
19396   if ${ac_cv_search_event_set+:} false; then :
19397   break
19398 fi
19399 done
19400 if ${ac_cv_search_event_set+:} false; then :
19401
19402 else
19403   ac_cv_search_event_set=no
19404 fi
19405 rm conftest.$ac_ext
19406 LIBS=$ac_func_search_save_LIBS
19407 fi
19408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
19409 $as_echo "$ac_cv_search_event_set" >&6; }
19410 ac_res=$ac_cv_search_event_set
19411 if test "$ac_res" != no; then :
19412   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19413
19414 fi
19415
19416
19417 else
19418
19419                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
19420 $as_echo_n "checking for library containing event_set... " >&6; }
19421 if ${ac_cv_search_event_set+:} false; then :
19422   $as_echo_n "(cached) " >&6
19423 else
19424   ac_func_search_save_LIBS=$LIBS
19425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19426 /* end confdefs.h.  */
19427
19428 /* Override any GCC internal prototype to avoid an error.
19429    Use char because int might match the return type of a GCC
19430    builtin and then its argument prototype would still apply.  */
19431 #ifdef __cplusplus
19432 extern "C"
19433 #endif
19434 char event_set ();
19435 int
19436 main ()
19437 {
19438 return event_set ();
19439   ;
19440   return 0;
19441 }
19442 _ACEOF
19443 for ac_lib in '' event; do
19444   if test -z "$ac_lib"; then
19445     ac_res="none required"
19446   else
19447     ac_res=-l$ac_lib
19448     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19449   fi
19450   if ac_fn_c_try_link "$LINENO"; then :
19451   ac_cv_search_event_set=$ac_res
19452 fi
19453 rm -f core conftest.err conftest.$ac_objext \
19454     conftest$ac_exeext
19455   if ${ac_cv_search_event_set+:} false; then :
19456   break
19457 fi
19458 done
19459 if ${ac_cv_search_event_set+:} false; then :
19460
19461 else
19462   ac_cv_search_event_set=no
19463 fi
19464 rm conftest.$ac_ext
19465 LIBS=$ac_func_search_save_LIBS
19466 fi
19467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
19468 $as_echo "$ac_cv_search_event_set" >&6; }
19469 ac_res=$ac_cv_search_event_set
19470 if test "$ac_res" != no; then :
19471   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19472
19473 fi
19474
19475
19476 fi
19477
19478         for ac_func in event_base_free
19479 do :
19480   ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
19481 if test "x$ac_cv_func_event_base_free" = xyes; then :
19482   cat >>confdefs.h <<_ACEOF
19483 #define HAVE_EVENT_BASE_FREE 1
19484 _ACEOF
19485
19486 fi
19487 done
19488  # only in libevent 1.2 and later
19489         for ac_func in event_base_once
19490 do :
19491   ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
19492 if test "x$ac_cv_func_event_base_once" = xyes; then :
19493   cat >>confdefs.h <<_ACEOF
19494 #define HAVE_EVENT_BASE_ONCE 1
19495 _ACEOF
19496
19497 fi
19498 done
19499  # only in libevent 1.4.1 and later
19500         for ac_func in event_base_new
19501 do :
19502   ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
19503 if test "x$ac_cv_func_event_base_new" = xyes; then :
19504   cat >>confdefs.h <<_ACEOF
19505 #define HAVE_EVENT_BASE_NEW 1
19506 _ACEOF
19507
19508 fi
19509 done
19510  # only in libevent 1.4.1 and later
19511         for ac_func in event_base_get_method
19512 do :
19513   ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
19514 if test "x$ac_cv_func_event_base_get_method" = xyes; then :
19515   cat >>confdefs.h <<_ACEOF
19516 #define HAVE_EVENT_BASE_GET_METHOD 1
19517 _ACEOF
19518
19519 fi
19520 done
19521  # only in libevent 1.4.3 and later
19522         for ac_func in ev_loop
19523 do :
19524   ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
19525 if test "x$ac_cv_func_ev_loop" = xyes; then :
19526   cat >>confdefs.h <<_ACEOF
19527 #define HAVE_EV_LOOP 1
19528 _ACEOF
19529
19530 fi
19531 done
19532  # only in libev. (tested on 3.51)
19533         for ac_func in ev_default_loop
19534 do :
19535   ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
19536 if test "x$ac_cv_func_ev_default_loop" = xyes; then :
19537   cat >>confdefs.h <<_ACEOF
19538 #define HAVE_EV_DEFAULT_LOOP 1
19539 _ACEOF
19540
19541 fi
19542 done
19543  # only in libev. (tested on 4.00)
19544         for ac_func in event_assign
19545 do :
19546   ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign"
19547 if test "x$ac_cv_func_event_assign" = xyes; then :
19548   cat >>confdefs.h <<_ACEOF
19549 #define HAVE_EVENT_ASSIGN 1
19550 _ACEOF
19551
19552 fi
19553 done
19554  # in libevent, for thread-safety
19555         ac_fn_c_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default
19556 #ifdef HAVE_EVENT_H
19557 #  include <event.h>
19558 #else
19559 #  include \"event2/event.h\"
19560 #endif
19561
19562 "
19563 if test "x$ac_cv_have_decl_evsignal_assign" = xyes; then :
19564   ac_have_decl=1
19565 else
19566   ac_have_decl=0
19567 fi
19568
19569 cat >>confdefs.h <<_ACEOF
19570 #define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl
19571 _ACEOF
19572
19573         PC_LIBEVENT_DEPENDENCY="libevent"
19574
19575         if test -n "$BAK_LDFLAGS_SET"; then
19576                 LDFLAGS="$BAK_LDFLAGS"
19577         fi
19578 else
19579
19580 $as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
19581
19582 fi
19583
19584 # check for libexpat
19585
19586 # Check whether --with-libexpat was given.
19587 if test "${with_libexpat+set}" = set; then :
19588   withval=$with_libexpat;
19589 else
19590    withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19591 fi
19592
19593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
19594 $as_echo_n "checking for libexpat... " >&6; }
19595 found_libexpat="no"
19596 for dir in $withval ; do
19597             if test -f "$dir/include/expat.h"; then
19598                 found_libexpat="yes"
19599                                 if test "$dir" != "/usr"; then
19600                     CPPFLAGS="$CPPFLAGS -I$dir/include"
19601                     LDFLAGS="$LDFLAGS -L$dir/lib"
19602                 fi
19603                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19604 $as_echo "found in $dir" >&6; }
19605                 break;
19606             fi
19607 done
19608 if test x_$found_libexpat != x_yes; then
19609         as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
19610 fi
19611 for ac_header in expat.h
19612 do :
19613   ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
19614 "
19615 if test "x$ac_cv_header_expat_h" = xyes; then :
19616   cat >>confdefs.h <<_ACEOF
19617 #define HAVE_EXPAT_H 1
19618 _ACEOF
19619
19620 fi
19621
19622 done
19623
19624 ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
19625 #include <expat.h>
19626
19627 "
19628 if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then :
19629   ac_have_decl=1
19630 else
19631   ac_have_decl=0
19632 fi
19633
19634 cat >>confdefs.h <<_ACEOF
19635 #define HAVE_DECL_XML_STOPPARSER $ac_have_decl
19636 _ACEOF
19637
19638
19639 # hiredis (redis C client for cachedb)
19640
19641 # Check whether --with-libhiredis was given.
19642 if test "${with_libhiredis+set}" = set; then :
19643   withval=$with_libhiredis;
19644 else
19645    withval="no"
19646 fi
19647
19648 found_libhiredis="no"
19649 if test x_$withval = x_yes -o x_$withval != x_no; then
19650    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
19651 $as_echo_n "checking for libhiredis... " >&6; }
19652    if test x_$withval = x_ -o x_$withval = x_yes; then
19653             withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19654    fi
19655    for dir in $withval ; do
19656             if test -f "$dir/include/hiredis/hiredis.h"; then
19657                 found_libhiredis="yes"
19658                                 if test "$dir" != "/usr"; then
19659                     CPPFLAGS="$CPPFLAGS -I$dir/include"
19660                     LDFLAGS="$LDFLAGS -L$dir/lib"
19661                 fi
19662                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19663 $as_echo "found in $dir" >&6; }
19664
19665 $as_echo "#define USE_REDIS 1" >>confdefs.h
19666
19667                 LIBS="$LIBS -lhiredis"
19668                 break;
19669             fi
19670     done
19671     if test x_$found_libhiredis != x_yes; then
19672         as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
19673     fi
19674     for ac_header in hiredis/hiredis.h
19675 do :
19676   ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
19677 "
19678 if test "x$ac_cv_header_hiredis_hiredis_h" = xyes; then :
19679   cat >>confdefs.h <<_ACEOF
19680 #define HAVE_HIREDIS_HIREDIS_H 1
19681 _ACEOF
19682
19683 fi
19684
19685 done
19686
19687     ac_fn_c_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
19688     #include <hiredis/hiredis.h>
19689
19690 "
19691 if test "x$ac_cv_have_decl_redisConnect" = xyes; then :
19692   ac_have_decl=1
19693 else
19694   ac_have_decl=0
19695 fi
19696
19697 cat >>confdefs.h <<_ACEOF
19698 #define HAVE_DECL_REDISCONNECT $ac_have_decl
19699 _ACEOF
19700
19701 fi
19702
19703 # nghttp2
19704
19705 # Check whether --with-libnghttp2 was given.
19706 if test "${with_libnghttp2+set}" = set; then :
19707   withval=$with_libnghttp2;
19708 else
19709    withval="no"
19710 fi
19711
19712 found_libnghttp2="no"
19713 if test x_$withval = x_yes -o x_$withval != x_no; then
19714    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5
19715 $as_echo_n "checking for libnghttp2... " >&6; }
19716    if test x_$withval = x_ -o x_$withval = x_yes; then
19717             withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19718    fi
19719    for dir in $withval ; do
19720             if test -f "$dir/include/nghttp2/nghttp2.h"; then
19721                 found_libnghttp2="yes"
19722                                 if test "$dir" != "/usr"; then
19723                     CPPFLAGS="$CPPFLAGS -I$dir/include"
19724                     LDFLAGS="$LDFLAGS -L$dir/lib"
19725                 fi
19726                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19727 $as_echo "found in $dir" >&6; }
19728
19729 $as_echo "#define HAVE_NGHTTP2 1" >>confdefs.h
19730
19731                 LIBS="$LIBS -lnghttp2"
19732                 break;
19733             fi
19734     done
19735     if test x_$found_libnghttp2 != x_yes; then
19736         as_fn_error $? "Could not find libnghttp2, nghttp2.h" "$LINENO" 5
19737     fi
19738     for ac_header in nghttp2/nghttp2.h
19739 do :
19740   ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default
19741 "
19742 if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes; then :
19743   cat >>confdefs.h <<_ACEOF
19744 #define HAVE_NGHTTP2_NGHTTP2_H 1
19745 _ACEOF
19746
19747 fi
19748
19749 done
19750
19751     ac_fn_c_check_decl "$LINENO" "nghttp2_session_server_new" "ac_cv_have_decl_nghttp2_session_server_new" "$ac_includes_default
19752     #include <nghttp2/nghttp2.h>
19753
19754 "
19755 if test "x$ac_cv_have_decl_nghttp2_session_server_new" = xyes; then :
19756   ac_have_decl=1
19757 else
19758   ac_have_decl=0
19759 fi
19760
19761 cat >>confdefs.h <<_ACEOF
19762 #define HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW $ac_have_decl
19763 _ACEOF
19764
19765 fi
19766
19767 # set static linking for uninstalled libraries if requested
19768
19769 staticexe=""
19770 # Check whether --enable-static-exe was given.
19771 if test "${enable_static_exe+set}" = set; then :
19772   enableval=$enable_static_exe;
19773 fi
19774
19775 if test x_$enable_static_exe = x_yes; then
19776         staticexe="-static"
19777         if test "$on_mingw" = yes; then
19778                 staticexe="-all-static"
19779                 # for static compile, include gdi32 and zlib here.
19780                 if echo $LIBS | grep 'lgdi32' >/dev/null; then
19781                         :
19782                 else
19783                         LIBS="$LIBS -lgdi32"
19784                 fi
19785                 LIBS="$LIBS -lz"
19786         fi
19787 fi
19788
19789 # set full static linking if requested
19790 # Check whether --enable-fully-static was given.
19791 if test "${enable_fully_static+set}" = set; then :
19792   enableval=$enable_fully_static;
19793 fi
19794
19795 if test x_$enable_fully_static = x_yes; then
19796         staticexe="-all-static"
19797         if test "$on_mingw" = yes; then
19798                 # for static compile, include gdi32 and zlib here.
19799                 if echo $LIBS | grep 'lgdi32' >/dev/null; then
19800                         :
19801                 else
19802                         LIBS="$LIBS -lgdi32"
19803                 fi
19804                 LIBS="$LIBS -lz"
19805         fi
19806 fi
19807
19808 # set lock checking if requested
19809 # Check whether --enable-lock_checks was given.
19810 if test "${enable_lock_checks+set}" = set; then :
19811   enableval=$enable_lock_checks;
19812 fi
19813
19814 if test x_$enable_lock_checks = x_yes; then
19815
19816 $as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
19817
19818         CHECKLOCK_OBJ="checklocks.lo"
19819
19820 fi
19821
19822
19823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
19824 $as_echo_n "checking for getaddrinfo... " >&6; }
19825 ac_cv_func_getaddrinfo=no
19826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19827 /* end confdefs.h.  */
19828
19829 #ifdef __cplusplus
19830 extern "C"
19831 {
19832 #endif
19833 char* getaddrinfo();
19834 char* (*f) () = getaddrinfo;
19835 #ifdef __cplusplus
19836 }
19837 #endif
19838 int main() {
19839         ;
19840         return 0;
19841 }
19842
19843 _ACEOF
19844 if ac_fn_c_try_link "$LINENO"; then :
19845   ac_cv_func_getaddrinfo="yes"
19846 if test "$ac_cv_header_windows_h" = "yes"; then
19847
19848 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
19849
19850         USE_WINSOCK="1"
19851         if echo $LIBS | grep 'lws2_32' >/dev/null; then
19852                 :
19853         else
19854                 LIBS="$LIBS -lws2_32"
19855         fi
19856 fi
19857
19858 else
19859   ORIGLIBS="$LIBS"
19860 LIBS="$LIBS -lws2_32"
19861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19862 /* end confdefs.h.  */
19863
19864 #ifdef HAVE_WS2TCPIP_H
19865 #include <ws2tcpip.h>
19866 #endif
19867
19868 int
19869 main ()
19870 {
19871
19872         (void)getaddrinfo(NULL, NULL, NULL, NULL);
19873
19874
19875   ;
19876   return 0;
19877 }
19878 _ACEOF
19879 if ac_fn_c_try_link "$LINENO"; then :
19880
19881 ac_cv_func_getaddrinfo="yes"
19882
19883 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
19884
19885 USE_WINSOCK="1"
19886
19887 else
19888
19889 ac_cv_func_getaddrinfo="no"
19890 LIBS="$ORIGLIBS"
19891
19892 fi
19893 rm -f core conftest.err conftest.$ac_objext \
19894     conftest$ac_exeext conftest.$ac_ext
19895
19896 fi
19897 rm -f core conftest.err conftest.$ac_objext \
19898     conftest$ac_exeext conftest.$ac_ext
19899
19900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
19901 $as_echo "$ac_cv_func_getaddrinfo" >&6; }
19902 if test $ac_cv_func_getaddrinfo = yes; then
19903
19904 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
19905
19906 fi
19907
19908 if test "$USE_WINSOCK" = 1; then
19909
19910 $as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
19911
19912         for ac_header in iphlpapi.h
19913 do :
19914   ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
19915 #include <windows.h>
19916
19917 "
19918 if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
19919   cat >>confdefs.h <<_ACEOF
19920 #define HAVE_IPHLPAPI_H 1
19921 _ACEOF
19922
19923 fi
19924
19925 done
19926
19927         if test -n "$ac_tool_prefix"; then
19928   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
19929 set dummy ${ac_tool_prefix}windres; ac_word=$2
19930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19931 $as_echo_n "checking for $ac_word... " >&6; }
19932 if ${ac_cv_prog_WINDRES+:} false; then :
19933   $as_echo_n "(cached) " >&6
19934 else
19935   if test -n "$WINDRES"; then
19936   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
19937 else
19938 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19939 for as_dir in $PATH
19940 do
19941   IFS=$as_save_IFS
19942   test -z "$as_dir" && as_dir=.
19943     for ac_exec_ext in '' $ac_executable_extensions; do
19944   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19945     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
19946     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19947     break 2
19948   fi
19949 done
19950   done
19951 IFS=$as_save_IFS
19952
19953 fi
19954 fi
19955 WINDRES=$ac_cv_prog_WINDRES
19956 if test -n "$WINDRES"; then
19957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
19958 $as_echo "$WINDRES" >&6; }
19959 else
19960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19961 $as_echo "no" >&6; }
19962 fi
19963
19964
19965 fi
19966 if test -z "$ac_cv_prog_WINDRES"; then
19967   ac_ct_WINDRES=$WINDRES
19968   # Extract the first word of "windres", so it can be a program name with args.
19969 set dummy windres; ac_word=$2
19970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19971 $as_echo_n "checking for $ac_word... " >&6; }
19972 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
19973   $as_echo_n "(cached) " >&6
19974 else
19975   if test -n "$ac_ct_WINDRES"; then
19976   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
19977 else
19978 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19979 for as_dir in $PATH
19980 do
19981   IFS=$as_save_IFS
19982   test -z "$as_dir" && as_dir=.
19983     for ac_exec_ext in '' $ac_executable_extensions; do
19984   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19985     ac_cv_prog_ac_ct_WINDRES="windres"
19986     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19987     break 2
19988   fi
19989 done
19990   done
19991 IFS=$as_save_IFS
19992
19993 fi
19994 fi
19995 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
19996 if test -n "$ac_ct_WINDRES"; then
19997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
19998 $as_echo "$ac_ct_WINDRES" >&6; }
19999 else
20000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20001 $as_echo "no" >&6; }
20002 fi
20003
20004   if test "x$ac_ct_WINDRES" = x; then
20005     WINDRES=""
20006   else
20007     case $cross_compiling:$ac_tool_warned in
20008 yes:)
20009 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20010 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20011 ac_tool_warned=yes ;;
20012 esac
20013     WINDRES=$ac_ct_WINDRES
20014   fi
20015 else
20016   WINDRES="$ac_cv_prog_WINDRES"
20017 fi
20018
20019         LIBS="$LIBS -liphlpapi -lcrypt32"
20020         WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
20021
20022         WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
20023
20024         WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
20025
20026         WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
20027
20028         WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
20029
20030         WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
20031
20032         WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
20033
20034         WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
20035
20036 fi
20037 if test $ac_cv_func_getaddrinfo = no; then
20038         case " $LIBOBJS " in
20039   *" fake-rfc2553.$ac_objext "* ) ;;
20040   *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
20041  ;;
20042 esac
20043
20044 fi
20045 # check after getaddrinfo for its libraries
20046
20047 # check ioctlsocket
20048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
20049 $as_echo_n "checking for ioctlsocket... " >&6; }
20050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20051 /* end confdefs.h.  */
20052
20053 #ifdef HAVE_WINSOCK2_H
20054 #include <winsock2.h>
20055 #endif
20056
20057 int
20058 main ()
20059 {
20060
20061         (void)ioctlsocket(0, 0, NULL);
20062
20063   ;
20064   return 0;
20065 }
20066 _ACEOF
20067 if ac_fn_c_try_link "$LINENO"; then :
20068
20069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20070 $as_echo "yes" >&6; }
20071
20072 $as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
20073
20074
20075 else
20076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20077 $as_echo "no" >&6; }
20078 fi
20079 rm -f core conftest.err conftest.$ac_objext \
20080     conftest$ac_exeext conftest.$ac_ext
20081
20082
20083 # see if daemon(3) exists, and if it is deprecated.
20084 for ac_func in daemon
20085 do :
20086   ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
20087 if test "x$ac_cv_func_daemon" = xyes; then :
20088   cat >>confdefs.h <<_ACEOF
20089 #define HAVE_DAEMON 1
20090 _ACEOF
20091
20092 fi
20093 done
20094
20095 if test $ac_cv_func_daemon = yes; then
20096
20097
20098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
20099 $as_echo_n "checking if daemon is deprecated... " >&6; }
20100 cache=`echo daemon | sed 'y%.=/+-%___p_%'`
20101 if eval \${cv_cc_deprecated_$cache+:} false; then :
20102   $as_echo_n "(cached) " >&6
20103 else
20104
20105 echo '
20106 #include <stdlib.h>
20107 ' >conftest.c
20108 echo 'void f(){ (void)daemon(0, 0); }' >>conftest.c
20109 if test -z "`$CC -c conftest.c 2>&1 | grep deprecated`"; then
20110 eval "cv_cc_deprecated_$cache=no"
20111 else
20112 eval "cv_cc_deprecated_$cache=yes"
20113 fi
20114 rm -f conftest conftest.o conftest.c
20115
20116 fi
20117
20118 if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
20119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20120 $as_echo "yes" >&6; }
20121
20122 cat >>confdefs.h <<_ACEOF
20123 #define DEPRECATED_DAEMON 1
20124 _ACEOF
20125
20126 :
20127
20128 else
20129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20130 $as_echo "no" >&6; }
20131 :
20132
20133 fi
20134
20135 fi
20136
20137 ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
20138 $ac_includes_default
20139 #ifdef HAVE_SYS_UN_H
20140 #include <sys/un.h>
20141 #endif
20142
20143 "
20144 if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
20145
20146 cat >>confdefs.h <<_ACEOF
20147 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
20148 _ACEOF
20149
20150
20151 fi
20152
20153 ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
20154 $ac_includes_default
20155 #if HAVE_SYS_PARAM_H
20156 #include <sys/param.h>
20157 #endif
20158
20159 #ifdef HAVE_SYS_SOCKET_H
20160 #include <sys/socket.h>
20161 #endif
20162
20163 #ifdef HAVE_SYS_UIO_H
20164 #include <sys/uio.h>
20165 #endif
20166
20167 #ifdef HAVE_NETINET_IN_H
20168 #include <netinet/in.h>
20169 #endif
20170
20171 #ifdef HAVE_NETINET_TCP_H
20172 #include <netinet/tcp.h>
20173 #endif
20174
20175 #ifdef HAVE_ARPA_INET_H
20176 #include <arpa/inet.h>
20177 #endif
20178
20179 #ifdef HAVE_WINSOCK2_H
20180 #include <winsock2.h>
20181 #endif
20182
20183 #ifdef HAVE_WS2TCPIP_H
20184 #include <ws2tcpip.h>
20185 #endif
20186
20187 "
20188 if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
20189
20190 cat >>confdefs.h <<_ACEOF
20191 #define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
20192 _ACEOF
20193
20194
20195 fi
20196
20197
20198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htobe64" >&5
20199 $as_echo_n "checking for htobe64... " >&6; }
20200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20201 /* end confdefs.h.  */
20202
20203 #include <stdio.h>
20204 #ifdef HAVE_ENDIAN_H
20205 #  include <endian.h>
20206 #endif
20207 #ifdef HAVE_SYS_ENDIAN_H
20208 #  include <sys/endian.h>
20209 #endif
20210
20211 int
20212 main ()
20213 {
20214 unsigned long long x = htobe64(0); printf("%u", (unsigned)x);
20215   ;
20216   return 0;
20217 }
20218 _ACEOF
20219 if ac_fn_c_try_link "$LINENO"; then :
20220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20221 $as_echo "yes" >&6; }
20222
20223 $as_echo "#define HAVE_HTOBE64 1" >>confdefs.h
20224
20225 else
20226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20227 $as_echo "no" >&6; }
20228 fi
20229 rm -f core conftest.err conftest.$ac_objext \
20230     conftest$ac_exeext conftest.$ac_ext
20231
20232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for be64toh" >&5
20233 $as_echo_n "checking for be64toh... " >&6; }
20234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20235 /* end confdefs.h.  */
20236
20237 #include <stdio.h>
20238 #ifdef HAVE_ENDIAN_H
20239 #  include <endian.h>
20240 #endif
20241 #ifdef HAVE_SYS_ENDIAN_H
20242 #  include <sys/endian.h>
20243 #endif
20244
20245 int
20246 main ()
20247 {
20248 unsigned long long x = be64toh(0); printf("%u", (unsigned)x);
20249   ;
20250   return 0;
20251 }
20252 _ACEOF
20253 if ac_fn_c_try_link "$LINENO"; then :
20254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20255 $as_echo "yes" >&6; }
20256
20257 $as_echo "#define HAVE_BE64TOH 1" >>confdefs.h
20258
20259 else
20260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20261 $as_echo "no" >&6; }
20262 fi
20263 rm -f core conftest.err conftest.$ac_objext \
20264     conftest$ac_exeext conftest.$ac_ext
20265
20266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
20267 $as_echo_n "checking for library containing setusercontext... " >&6; }
20268 if ${ac_cv_search_setusercontext+:} false; then :
20269   $as_echo_n "(cached) " >&6
20270 else
20271   ac_func_search_save_LIBS=$LIBS
20272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20273 /* end confdefs.h.  */
20274
20275 /* Override any GCC internal prototype to avoid an error.
20276    Use char because int might match the return type of a GCC
20277    builtin and then its argument prototype would still apply.  */
20278 #ifdef __cplusplus
20279 extern "C"
20280 #endif
20281 char setusercontext ();
20282 int
20283 main ()
20284 {
20285 return setusercontext ();
20286   ;
20287   return 0;
20288 }
20289 _ACEOF
20290 for ac_lib in '' util; do
20291   if test -z "$ac_lib"; then
20292     ac_res="none required"
20293   else
20294     ac_res=-l$ac_lib
20295     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20296   fi
20297   if ac_fn_c_try_link "$LINENO"; then :
20298   ac_cv_search_setusercontext=$ac_res
20299 fi
20300 rm -f core conftest.err conftest.$ac_objext \
20301     conftest$ac_exeext
20302   if ${ac_cv_search_setusercontext+:} false; then :
20303   break
20304 fi
20305 done
20306 if ${ac_cv_search_setusercontext+:} false; then :
20307
20308 else
20309   ac_cv_search_setusercontext=no
20310 fi
20311 rm conftest.$ac_ext
20312 LIBS=$ac_func_search_save_LIBS
20313 fi
20314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
20315 $as_echo "$ac_cv_search_setusercontext" >&6; }
20316 ac_res=$ac_cv_search_setusercontext
20317 if test "$ac_res" != no; then :
20318   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20319
20320 fi
20321
20322 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 shmget accept4 getifaddrs
20323 do :
20324   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20325 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20326 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20327   cat >>confdefs.h <<_ACEOF
20328 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20329 _ACEOF
20330
20331 fi
20332 done
20333
20334 for ac_func in setresuid
20335 do :
20336   ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
20337 if test "x$ac_cv_func_setresuid" = xyes; then :
20338   cat >>confdefs.h <<_ACEOF
20339 #define HAVE_SETRESUID 1
20340 _ACEOF
20341
20342 else
20343   for ac_func in setreuid
20344 do :
20345   ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
20346 if test "x$ac_cv_func_setreuid" = xyes; then :
20347   cat >>confdefs.h <<_ACEOF
20348 #define HAVE_SETREUID 1
20349 _ACEOF
20350
20351 fi
20352 done
20353
20354 fi
20355 done
20356
20357 for ac_func in setresgid
20358 do :
20359   ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
20360 if test "x$ac_cv_func_setresgid" = xyes; then :
20361   cat >>confdefs.h <<_ACEOF
20362 #define HAVE_SETRESGID 1
20363 _ACEOF
20364
20365 else
20366   for ac_func in setregid
20367 do :
20368   ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
20369 if test "x$ac_cv_func_setregid" = xyes; then :
20370   cat >>confdefs.h <<_ACEOF
20371 #define HAVE_SETREGID 1
20372 _ACEOF
20373
20374 fi
20375 done
20376
20377 fi
20378 done
20379
20380
20381 # check if setreuid en setregid fail, on MacOSX10.4(darwin8).
20382 if echo $target_os | grep darwin8 > /dev/null; then
20383
20384 $as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
20385
20386 fi
20387 ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
20388 $ac_includes_default
20389 #ifdef HAVE_NETINET_IN_H
20390 #include <netinet/in.h>
20391 #endif
20392
20393 #ifdef HAVE_NETINET_TCP_H
20394 #include <netinet/tcp.h>
20395 #endif
20396
20397 #ifdef HAVE_ARPA_INET_H
20398 #include <arpa/inet.h>
20399 #endif
20400
20401 #ifdef HAVE_WINSOCK2_H
20402 #include <winsock2.h>
20403 #endif
20404
20405 #ifdef HAVE_WS2TCPIP_H
20406 #include <ws2tcpip.h>
20407 #endif
20408
20409 "
20410 if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
20411   ac_have_decl=1
20412 else
20413   ac_have_decl=0
20414 fi
20415
20416 cat >>confdefs.h <<_ACEOF
20417 #define HAVE_DECL_INET_PTON $ac_have_decl
20418 _ACEOF
20419 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
20420 $ac_includes_default
20421 #ifdef HAVE_NETINET_IN_H
20422 #include <netinet/in.h>
20423 #endif
20424
20425 #ifdef HAVE_NETINET_TCP_H
20426 #include <netinet/tcp.h>
20427 #endif
20428
20429 #ifdef HAVE_ARPA_INET_H
20430 #include <arpa/inet.h>
20431 #endif
20432
20433 #ifdef HAVE_WINSOCK2_H
20434 #include <winsock2.h>
20435 #endif
20436
20437 #ifdef HAVE_WS2TCPIP_H
20438 #include <ws2tcpip.h>
20439 #endif
20440
20441 "
20442 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20443   ac_have_decl=1
20444 else
20445   ac_have_decl=0
20446 fi
20447
20448 cat >>confdefs.h <<_ACEOF
20449 #define HAVE_DECL_INET_NTOP $ac_have_decl
20450 _ACEOF
20451
20452 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
20453 if test "x$ac_cv_func_inet_aton" = xyes; then :
20454   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
20455
20456 else
20457   case " $LIBOBJS " in
20458   *" inet_aton.$ac_objext "* ) ;;
20459   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
20460  ;;
20461 esac
20462
20463 fi
20464
20465
20466 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
20467 if test "x$ac_cv_func_inet_pton" = xyes; then :
20468   $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
20469
20470 else
20471   case " $LIBOBJS " in
20472   *" inet_pton.$ac_objext "* ) ;;
20473   *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
20474  ;;
20475 esac
20476
20477 fi
20478
20479
20480 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
20481 if test "x$ac_cv_func_inet_ntop" = xyes; then :
20482   $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
20483
20484 else
20485   case " $LIBOBJS " in
20486   *" inet_ntop.$ac_objext "* ) ;;
20487   *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
20488  ;;
20489 esac
20490
20491 fi
20492
20493
20494 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
20495 if test "x$ac_cv_func_snprintf" = xyes; then :
20496   $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
20497
20498 else
20499   case " $LIBOBJS " in
20500   *" snprintf.$ac_objext "* ) ;;
20501   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
20502  ;;
20503 esac
20504
20505 fi
20506
20507
20508 # test if snprintf return the proper length
20509 if test "x$ac_cv_func_snprintf" = xyes; then
20510     if test c${cross_compiling} = cno; then
20511         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
20512 $as_echo_n "checking for correct snprintf return value... " >&6; }
20513         if test "$cross_compiling" = yes; then :
20514   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20515 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20516 as_fn_error $? "cannot run test program while cross compiling
20517 See \`config.log' for more details" "$LINENO" 5; }
20518 else
20519   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20520 /* end confdefs.h.  */
20521 $ac_includes_default
20522
20523 int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
20524
20525 _ACEOF
20526 if ac_fn_c_try_run "$LINENO"; then :
20527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20528 $as_echo "yes" >&6; }
20529 else
20530
20531                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20532 $as_echo "no" >&6; }
20533
20534 $as_echo "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
20535
20536                 case " $LIBOBJS " in
20537   *" snprintf.$ac_objext "* ) ;;
20538   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
20539  ;;
20540 esac
20541
20542
20543 fi
20544 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20545   conftest.$ac_objext conftest.beam conftest.$ac_ext
20546 fi
20547
20548     fi
20549 fi
20550 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
20551 if test "x$ac_cv_func_strlcat" = xyes; then :
20552   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
20553
20554 else
20555   case " $LIBOBJS " in
20556   *" strlcat.$ac_objext "* ) ;;
20557   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
20558  ;;
20559 esac
20560
20561 fi
20562
20563
20564 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
20565 if test "x$ac_cv_func_strlcpy" = xyes; then :
20566   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
20567
20568 else
20569   case " $LIBOBJS " in
20570   *" strlcpy.$ac_objext "* ) ;;
20571   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
20572  ;;
20573 esac
20574
20575 fi
20576
20577
20578 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
20579 if test "x$ac_cv_func_memmove" = xyes; then :
20580   $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
20581
20582 else
20583   case " $LIBOBJS " in
20584   *" memmove.$ac_objext "* ) ;;
20585   *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
20586  ;;
20587 esac
20588
20589 fi
20590
20591
20592 ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
20593 if test "x$ac_cv_func_gmtime_r" = xyes; then :
20594   $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
20595
20596 else
20597   case " $LIBOBJS " in
20598   *" gmtime_r.$ac_objext "* ) ;;
20599   *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
20600  ;;
20601 esac
20602
20603 fi
20604
20605
20606 ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
20607 if test "x$ac_cv_func_isblank" = xyes; then :
20608   $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
20609
20610 else
20611   case " $LIBOBJS " in
20612   *" isblank.$ac_objext "* ) ;;
20613   *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
20614  ;;
20615 esac
20616
20617 fi
20618
20619
20620 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
20621 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
20622   $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
20623
20624 else
20625   case " $LIBOBJS " in
20626   *" explicit_bzero.$ac_objext "* ) ;;
20627   *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
20628  ;;
20629 esac
20630
20631 fi
20632
20633
20634 LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
20635
20636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
20637 $as_echo_n "checking for reallocarray... " >&6; }
20638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20639 /* end confdefs.h.  */
20640 $ac_includes_default
20641
20642 #ifndef _OPENBSD_SOURCE
20643 #define _OPENBSD_SOURCE 1
20644 #endif
20645 #include <stdlib.h>
20646 int main(void) {
20647         void* p = reallocarray(NULL, 10, 100);
20648         free(p);
20649         return 0;
20650 }
20651
20652 _ACEOF
20653 if ac_fn_c_try_link "$LINENO"; then :
20654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20655 $as_echo "yes" >&6; }
20656
20657 $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
20658
20659
20660 else
20661
20662         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20663 $as_echo "no" >&6; }
20664         case " $LIBOBJS " in
20665   *" reallocarray.$ac_objext "* ) ;;
20666   *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
20667  ;;
20668 esac
20669
20670
20671 fi
20672 rm -f core conftest.err conftest.$ac_objext \
20673     conftest$ac_exeext conftest.$ac_ext
20674 ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
20675 if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
20676   ac_have_decl=1
20677 else
20678   ac_have_decl=0
20679 fi
20680
20681 cat >>confdefs.h <<_ACEOF
20682 #define HAVE_DECL_REALLOCARRAY $ac_have_decl
20683 _ACEOF
20684
20685 if test "$USE_NSS" = "no"; then
20686         ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
20687 if test "x$ac_cv_func_arc4random" = xyes; then :
20688   $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
20689
20690 else
20691   case " $LIBOBJS " in
20692   *" arc4random.$ac_objext "* ) ;;
20693   *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
20694  ;;
20695 esac
20696
20697 fi
20698
20699
20700         ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
20701 if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
20702   $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
20703
20704 else
20705   case " $LIBOBJS " in
20706   *" arc4random_uniform.$ac_objext "* ) ;;
20707   *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
20708  ;;
20709 esac
20710
20711 fi
20712
20713
20714         if test "$ac_cv_func_arc4random" = "no"; then
20715                 case " $LIBOBJS " in
20716   *" arc4_lock.$ac_objext "* ) ;;
20717   *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
20718  ;;
20719 esac
20720
20721                 for ac_func in getentropy
20722 do :
20723   ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
20724 if test "x$ac_cv_func_getentropy" = xyes; then :
20725   cat >>confdefs.h <<_ACEOF
20726 #define HAVE_GETENTROPY 1
20727 _ACEOF
20728
20729 else
20730
20731                     if test "$USE_WINSOCK" = 1; then
20732                         case " $LIBOBJS " in
20733   *" getentropy_win.$ac_objext "* ) ;;
20734   *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
20735  ;;
20736 esac
20737
20738                     else
20739                         case "$host" in
20740                         Darwin|*darwin*)
20741                                 case " $LIBOBJS " in
20742   *" getentropy_osx.$ac_objext "* ) ;;
20743   *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
20744  ;;
20745 esac
20746
20747                         ;;
20748                         *solaris*|*sunos*|SunOS)
20749                                 case " $LIBOBJS " in
20750   *" getentropy_solaris.$ac_objext "* ) ;;
20751   *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
20752  ;;
20753 esac
20754
20755                                 for ac_header in sys/sha2.h
20756 do :
20757   ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
20758 "
20759 if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
20760   cat >>confdefs.h <<_ACEOF
20761 #define HAVE_SYS_SHA2_H 1
20762 _ACEOF
20763
20764 else
20765
20766                                         for ac_func in SHA512_Update
20767 do :
20768   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20769 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20770   cat >>confdefs.h <<_ACEOF
20771 #define HAVE_SHA512_UPDATE 1
20772 _ACEOF
20773
20774 else
20775
20776                                                 case " $LIBOBJS " in
20777   *" sha512.$ac_objext "* ) ;;
20778   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20779  ;;
20780 esac
20781
20782
20783 fi
20784 done
20785
20786
20787 fi
20788
20789 done
20790
20791                                 if test "$ac_cv_header_sys_sha2_h" = "yes"; then
20792                                         # this lib needed for sha2 on solaris
20793                                         LIBS="$LIBS -lmd"
20794                                 fi
20795                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20796 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20797 if ${ac_cv_search_clock_gettime+:} false; then :
20798   $as_echo_n "(cached) " >&6
20799 else
20800   ac_func_search_save_LIBS=$LIBS
20801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20802 /* end confdefs.h.  */
20803
20804 /* Override any GCC internal prototype to avoid an error.
20805    Use char because int might match the return type of a GCC
20806    builtin and then its argument prototype would still apply.  */
20807 #ifdef __cplusplus
20808 extern "C"
20809 #endif
20810 char clock_gettime ();
20811 int
20812 main ()
20813 {
20814 return clock_gettime ();
20815   ;
20816   return 0;
20817 }
20818 _ACEOF
20819 for ac_lib in '' rt; do
20820   if test -z "$ac_lib"; then
20821     ac_res="none required"
20822   else
20823     ac_res=-l$ac_lib
20824     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20825   fi
20826   if ac_fn_c_try_link "$LINENO"; then :
20827   ac_cv_search_clock_gettime=$ac_res
20828 fi
20829 rm -f core conftest.err conftest.$ac_objext \
20830     conftest$ac_exeext
20831   if ${ac_cv_search_clock_gettime+:} false; then :
20832   break
20833 fi
20834 done
20835 if ${ac_cv_search_clock_gettime+:} false; then :
20836
20837 else
20838   ac_cv_search_clock_gettime=no
20839 fi
20840 rm conftest.$ac_ext
20841 LIBS=$ac_func_search_save_LIBS
20842 fi
20843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20844 $as_echo "$ac_cv_search_clock_gettime" >&6; }
20845 ac_res=$ac_cv_search_clock_gettime
20846 if test "$ac_res" != no; then :
20847   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20848
20849 fi
20850
20851                         ;;
20852                         *freebsd*|*FreeBSD)
20853                                 case " $LIBOBJS " in
20854   *" getentropy_freebsd.$ac_objext "* ) ;;
20855   *) LIBOBJS="$LIBOBJS getentropy_freebsd.$ac_objext"
20856  ;;
20857 esac
20858
20859                         ;;
20860                         *linux*|Linux|*)
20861                                 case " $LIBOBJS " in
20862   *" getentropy_linux.$ac_objext "* ) ;;
20863   *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
20864  ;;
20865 esac
20866
20867                                 for ac_func in SHA512_Update
20868 do :
20869   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20870 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20871   cat >>confdefs.h <<_ACEOF
20872 #define HAVE_SHA512_UPDATE 1
20873 _ACEOF
20874
20875 else
20876
20877
20878 $as_echo "#define COMPAT_SHA512 1" >>confdefs.h
20879
20880                                         case " $LIBOBJS " in
20881   *" sha512.$ac_objext "* ) ;;
20882   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20883  ;;
20884 esac
20885
20886
20887 fi
20888 done
20889
20890                                 for ac_header in sys/sysctl.h
20891 do :
20892   ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
20893 "
20894 if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
20895   cat >>confdefs.h <<_ACEOF
20896 #define HAVE_SYS_SYSCTL_H 1
20897 _ACEOF
20898
20899 fi
20900
20901 done
20902
20903                                 for ac_func in getauxval
20904 do :
20905   ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
20906 if test "x$ac_cv_func_getauxval" = xyes; then :
20907   cat >>confdefs.h <<_ACEOF
20908 #define HAVE_GETAUXVAL 1
20909 _ACEOF
20910
20911 fi
20912 done
20913
20914                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20915 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20916 if ${ac_cv_search_clock_gettime+:} false; then :
20917   $as_echo_n "(cached) " >&6
20918 else
20919   ac_func_search_save_LIBS=$LIBS
20920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20921 /* end confdefs.h.  */
20922
20923 /* Override any GCC internal prototype to avoid an error.
20924    Use char because int might match the return type of a GCC
20925    builtin and then its argument prototype would still apply.  */
20926 #ifdef __cplusplus
20927 extern "C"
20928 #endif
20929 char clock_gettime ();
20930 int
20931 main ()
20932 {
20933 return clock_gettime ();
20934   ;
20935   return 0;
20936 }
20937 _ACEOF
20938 for ac_lib in '' rt; do
20939   if test -z "$ac_lib"; then
20940     ac_res="none required"
20941   else
20942     ac_res=-l$ac_lib
20943     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20944   fi
20945   if ac_fn_c_try_link "$LINENO"; then :
20946   ac_cv_search_clock_gettime=$ac_res
20947 fi
20948 rm -f core conftest.err conftest.$ac_objext \
20949     conftest$ac_exeext
20950   if ${ac_cv_search_clock_gettime+:} false; then :
20951   break
20952 fi
20953 done
20954 if ${ac_cv_search_clock_gettime+:} false; then :
20955
20956 else
20957   ac_cv_search_clock_gettime=no
20958 fi
20959 rm conftest.$ac_ext
20960 LIBS=$ac_func_search_save_LIBS
20961 fi
20962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20963 $as_echo "$ac_cv_search_clock_gettime" >&6; }
20964 ac_res=$ac_cv_search_clock_gettime
20965 if test "$ac_res" != no; then :
20966   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20967
20968 fi
20969
20970                         ;;
20971                         esac
20972                     fi
20973
20974 fi
20975 done
20976
20977         fi
20978 fi
20979 LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
20980
20981 ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
20982 if test "x$ac_cv_func_ctime_r" = xyes; then :
20983   $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
20984
20985 else
20986   case " $LIBOBJS " in
20987   *" ctime_r.$ac_objext "* ) ;;
20988   *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
20989  ;;
20990 esac
20991
20992 fi
20993
20994
20995 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
20996 if test "x$ac_cv_func_strsep" = xyes; then :
20997   $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
20998
20999 else
21000   case " $LIBOBJS " in
21001   *" strsep.$ac_objext "* ) ;;
21002   *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
21003  ;;
21004 esac
21005
21006 fi
21007
21008
21009
21010 # Check whether --enable-allsymbols was given.
21011 if test "${enable_allsymbols+set}" = set; then :
21012   enableval=$enable_allsymbols;
21013 fi
21014
21015 case "$enable_allsymbols" in
21016         yes)
21017         COMMON_OBJ_ALL_SYMBOLS=""
21018         UBSYMS=""
21019         EXTRALINK="-L. -L.libs -lunbound"
21020
21021 $as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
21022
21023         ;;
21024         no|*)
21025         COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
21026         UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
21027         EXTRALINK=""
21028         ;;
21029 esac
21030
21031
21032
21033 if test x_$enable_lock_checks = x_yes; then
21034         UBSYMS="-export-symbols clubsyms.def"
21035         cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
21036         echo lock_protect >> clubsyms.def
21037         echo lock_unprotect >> clubsyms.def
21038         echo lock_get_mem >> clubsyms.def
21039         echo checklock_start >> clubsyms.def
21040         echo checklock_stop >> clubsyms.def
21041         echo checklock_lock >> clubsyms.def
21042         echo checklock_unlock >> clubsyms.def
21043         echo checklock_init >> clubsyms.def
21044         echo checklock_thrcreate >> clubsyms.def
21045         echo checklock_thrjoin >> clubsyms.def
21046 fi
21047
21048 # check for dnstap if requested
21049
21050   # Check whether --enable-dnstap was given.
21051 if test "${enable_dnstap+set}" = set; then :
21052   enableval=$enable_dnstap; opt_dnstap=$enableval
21053 else
21054   opt_dnstap=no
21055 fi
21056
21057
21058
21059 # Check whether --with-dnstap-socket-path was given.
21060 if test "${with_dnstap_socket_path+set}" = set; then :
21061   withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
21062 else
21063   opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
21064 fi
21065
21066
21067   if test "x$opt_dnstap" != "xno"; then
21068     # Extract the first word of "protoc-c", so it can be a program name with args.
21069 set dummy protoc-c; ac_word=$2
21070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21071 $as_echo_n "checking for $ac_word... " >&6; }
21072 if ${ac_cv_path_PROTOC_C+:} false; then :
21073   $as_echo_n "(cached) " >&6
21074 else
21075   case $PROTOC_C in
21076   [\\/]* | ?:[\\/]*)
21077   ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
21078   ;;
21079   *)
21080   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21081 for as_dir in $PATH
21082 do
21083   IFS=$as_save_IFS
21084   test -z "$as_dir" && as_dir=.
21085     for ac_exec_ext in '' $ac_executable_extensions; do
21086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21087     ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
21088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21089     break 2
21090   fi
21091 done
21092   done
21093 IFS=$as_save_IFS
21094
21095   ;;
21096 esac
21097 fi
21098 PROTOC_C=$ac_cv_path_PROTOC_C
21099 if test -n "$PROTOC_C"; then
21100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
21101 $as_echo "$PROTOC_C" >&6; }
21102 else
21103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21104 $as_echo "no" >&6; }
21105 fi
21106
21107
21108     if test -z "$PROTOC_C"; then
21109       as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
21110     fi
21111
21112 # Check whether --with-protobuf-c was given.
21113 if test "${with_protobuf_c+set}" = set; then :
21114   withval=$with_protobuf_c;
21115           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
21116           if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
21117             CFLAGS="$CFLAGS -I$withval/include/google"
21118           else
21119             CFLAGS="$CFLAGS -I$withval/include"
21120           fi
21121           LDFLAGS="$LDFLAGS -L$withval/lib"
21122
21123 else
21124
21125           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
21126           if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
21127             CFLAGS="$CFLAGS -I/usr/include/google"
21128           else
21129             if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
21130               CFLAGS="$CFLAGS -I/usr/local/include/google"
21131               LDFLAGS="$LDFLAGS -L/usr/local/lib"
21132             fi
21133           fi
21134
21135 fi
21136
21137     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
21138 $as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
21139 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21140   $as_echo_n "(cached) " >&6
21141 else
21142   ac_func_search_save_LIBS=$LIBS
21143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21144 /* end confdefs.h.  */
21145
21146 /* Override any GCC internal prototype to avoid an error.
21147    Use char because int might match the return type of a GCC
21148    builtin and then its argument prototype would still apply.  */
21149 #ifdef __cplusplus
21150 extern "C"
21151 #endif
21152 char protobuf_c_message_pack ();
21153 int
21154 main ()
21155 {
21156 return protobuf_c_message_pack ();
21157   ;
21158   return 0;
21159 }
21160 _ACEOF
21161 for ac_lib in '' protobuf-c; do
21162   if test -z "$ac_lib"; then
21163     ac_res="none required"
21164   else
21165     ac_res=-l$ac_lib
21166     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21167   fi
21168   if ac_fn_c_try_link "$LINENO"; then :
21169   ac_cv_search_protobuf_c_message_pack=$ac_res
21170 fi
21171 rm -f core conftest.err conftest.$ac_objext \
21172     conftest$ac_exeext
21173   if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21174   break
21175 fi
21176 done
21177 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21178
21179 else
21180   ac_cv_search_protobuf_c_message_pack=no
21181 fi
21182 rm conftest.$ac_ext
21183 LIBS=$ac_func_search_save_LIBS
21184 fi
21185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
21186 $as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
21187 ac_res=$ac_cv_search_protobuf_c_message_pack
21188 if test "$ac_res" != no; then :
21189   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21190
21191 else
21192   as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
21193 fi
21194
21195
21196
21197 $as_echo "#define USE_DNSTAP 1" >>confdefs.h
21198
21199         ENABLE_DNSTAP=1
21200
21201
21202
21203         hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
21204
21205
21206 cat >>confdefs.h <<_ACEOF
21207 #define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
21208 _ACEOF
21209
21210         DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path"
21211
21212
21213         DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"
21214
21215         DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"
21216
21217
21218   else
21219
21220         ENABLE_DNSTAP=0
21221
21222
21223
21224   fi
21225
21226
21227 # check for dnscrypt if requested
21228
21229   # Check whether --enable-dnscrypt was given.
21230 if test "${enable_dnscrypt+set}" = set; then :
21231   enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
21232 else
21233   opt_dnscrypt=no
21234 fi
21235
21236
21237   if test "x$opt_dnscrypt" != "xno"; then
21238
21239 # Check whether --with-libsodium was given.
21240 if test "${with_libsodium+set}" = set; then :
21241   withval=$with_libsodium;
21242         CFLAGS="$CFLAGS -I$withval/include"
21243         LDFLAGS="$LDFLAGS -L$withval/lib"
21244
21245 fi
21246
21247     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
21248 $as_echo_n "checking for library containing sodium_init... " >&6; }
21249 if ${ac_cv_search_sodium_init+:} false; then :
21250   $as_echo_n "(cached) " >&6
21251 else
21252   ac_func_search_save_LIBS=$LIBS
21253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21254 /* end confdefs.h.  */
21255
21256 /* Override any GCC internal prototype to avoid an error.
21257    Use char because int might match the return type of a GCC
21258    builtin and then its argument prototype would still apply.  */
21259 #ifdef __cplusplus
21260 extern "C"
21261 #endif
21262 char sodium_init ();
21263 int
21264 main ()
21265 {
21266 return sodium_init ();
21267   ;
21268   return 0;
21269 }
21270 _ACEOF
21271 for ac_lib in '' sodium; do
21272   if test -z "$ac_lib"; then
21273     ac_res="none required"
21274   else
21275     ac_res=-l$ac_lib
21276     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21277   fi
21278   if ac_fn_c_try_link "$LINENO"; then :
21279   ac_cv_search_sodium_init=$ac_res
21280 fi
21281 rm -f core conftest.err conftest.$ac_objext \
21282     conftest$ac_exeext
21283   if ${ac_cv_search_sodium_init+:} false; then :
21284   break
21285 fi
21286 done
21287 if ${ac_cv_search_sodium_init+:} false; then :
21288
21289 else
21290   ac_cv_search_sodium_init=no
21291 fi
21292 rm conftest.$ac_ext
21293 LIBS=$ac_func_search_save_LIBS
21294 fi
21295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
21296 $as_echo "$ac_cv_search_sodium_init" >&6; }
21297 ac_res=$ac_cv_search_sodium_init
21298 if test "$ac_res" != no; then :
21299   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21300
21301 else
21302   as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
21303 fi
21304
21305     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
21306 $as_echo_n "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
21307 if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21308   $as_echo_n "(cached) " >&6
21309 else
21310   ac_func_search_save_LIBS=$LIBS
21311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21312 /* end confdefs.h.  */
21313
21314 /* Override any GCC internal prototype to avoid an error.
21315    Use char because int might match the return type of a GCC
21316    builtin and then its argument prototype would still apply.  */
21317 #ifdef __cplusplus
21318 extern "C"
21319 #endif
21320 char crypto_box_curve25519xchacha20poly1305_beforenm ();
21321 int
21322 main ()
21323 {
21324 return crypto_box_curve25519xchacha20poly1305_beforenm ();
21325   ;
21326   return 0;
21327 }
21328 _ACEOF
21329 for ac_lib in '' sodium; do
21330   if test -z "$ac_lib"; then
21331     ac_res="none required"
21332   else
21333     ac_res=-l$ac_lib
21334     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21335   fi
21336   if ac_fn_c_try_link "$LINENO"; then :
21337   ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
21338 fi
21339 rm -f core conftest.err conftest.$ac_objext \
21340     conftest$ac_exeext
21341   if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21342   break
21343 fi
21344 done
21345 if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21346
21347 else
21348   ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
21349 fi
21350 rm conftest.$ac_ext
21351 LIBS=$ac_func_search_save_LIBS
21352 fi
21353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
21354 $as_echo "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
21355 ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
21356 if test "$ac_res" != no; then :
21357   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21358
21359             ENABLE_DNSCRYPT_XCHACHA20=1
21360
21361
21362 $as_echo "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
21363
21364
21365 else
21366
21367             ENABLE_DNSCRYPT_XCHACHA20=0
21368
21369
21370 fi
21371
21372     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
21373 $as_echo_n "checking for library containing sodium_set_misuse_handler... " >&6; }
21374 if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21375   $as_echo_n "(cached) " >&6
21376 else
21377   ac_func_search_save_LIBS=$LIBS
21378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21379 /* end confdefs.h.  */
21380
21381 /* Override any GCC internal prototype to avoid an error.
21382    Use char because int might match the return type of a GCC
21383    builtin and then its argument prototype would still apply.  */
21384 #ifdef __cplusplus
21385 extern "C"
21386 #endif
21387 char sodium_set_misuse_handler ();
21388 int
21389 main ()
21390 {
21391 return sodium_set_misuse_handler ();
21392   ;
21393   return 0;
21394 }
21395 _ACEOF
21396 for ac_lib in '' sodium; do
21397   if test -z "$ac_lib"; then
21398     ac_res="none required"
21399   else
21400     ac_res=-l$ac_lib
21401     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21402   fi
21403   if ac_fn_c_try_link "$LINENO"; then :
21404   ac_cv_search_sodium_set_misuse_handler=$ac_res
21405 fi
21406 rm -f core conftest.err conftest.$ac_objext \
21407     conftest$ac_exeext
21408   if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21409   break
21410 fi
21411 done
21412 if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21413
21414 else
21415   ac_cv_search_sodium_set_misuse_handler=no
21416 fi
21417 rm conftest.$ac_ext
21418 LIBS=$ac_func_search_save_LIBS
21419 fi
21420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
21421 $as_echo "$ac_cv_search_sodium_set_misuse_handler" >&6; }
21422 ac_res=$ac_cv_search_sodium_set_misuse_handler
21423 if test "$ac_res" != no; then :
21424   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21425
21426
21427 $as_echo "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
21428
21429
21430 fi
21431
21432
21433
21434 $as_echo "#define USE_DNSCRYPT 1" >>confdefs.h
21435
21436         ENABLE_DNSCRYPT=1
21437
21438
21439         DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
21440
21441         DNSCRYPT_OBJ="dnscrypt.lo"
21442
21443
21444   else
21445     ENABLE_DNSCRYPT_XCHACHA20=0
21446
21447
21448         ENABLE_DNSCRYPT=0
21449
21450
21451
21452   fi
21453
21454
21455 # check for cachedb if requested
21456 # Check whether --enable-cachedb was given.
21457 if test "${enable_cachedb+set}" = set; then :
21458   enableval=$enable_cachedb;
21459 fi
21460
21461 # turn on cachedb when hiredis support is enabled.
21462 if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
21463 case "$enable_cachedb" in
21464     yes)
21465
21466 $as_echo "#define USE_CACHEDB 1" >>confdefs.h
21467
21468         ;;
21469     no|*)
21470         # nothing
21471         ;;
21472 esac
21473
21474 # check for ipsecmod if requested
21475 # Check whether --enable-ipsecmod was given.
21476 if test "${enable_ipsecmod+set}" = set; then :
21477   enableval=$enable_ipsecmod;
21478 fi
21479
21480 case "$enable_ipsecmod" in
21481         yes)
21482
21483 $as_echo "#define USE_IPSECMOD 1" >>confdefs.h
21484
21485                 IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
21486
21487                 IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
21488
21489                 ;;
21490         no|*)
21491                 # nothing
21492                 ;;
21493 esac
21494
21495 # check for ipset if requested
21496 # Check whether --enable-ipset was given.
21497 if test "${enable_ipset+set}" = set; then :
21498   enableval=$enable_ipset;
21499 fi
21500
21501 case "$enable_ipset" in
21502     yes)
21503
21504 $as_echo "#define USE_IPSET 1" >>confdefs.h
21505
21506                 IPSET_SRC="ipset/ipset.c"
21507
21508                 IPSET_OBJ="ipset.lo"
21509
21510
21511                 # mnl
21512
21513 # Check whether --with-libmnl was given.
21514 if test "${with_libmnl+set}" = set; then :
21515   withval=$with_libmnl;
21516 else
21517    withval="yes"
21518 fi
21519
21520                 found_libmnl="no"
21521                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
21522 $as_echo_n "checking for libmnl... " >&6; }
21523                 if test x_$withval = x_ -o x_$withval = x_yes; then
21524                         withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
21525                 fi
21526                 for dir in $withval ; do
21527                         if test -f "$dir/include/libmnl/libmnl.h"; then
21528                                 found_libmnl="yes"
21529                                                                 if test "$dir" != "/usr"; then
21530                                         CPPFLAGS="$CPPFLAGS -I$dir/include"
21531                                         LDFLAGS="$LDFLAGS -L$dir/lib"
21532                                 fi
21533                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
21534 $as_echo "found in $dir" >&6; }
21535                                 LIBS="$LIBS -lmnl"
21536                                 break;
21537                         fi
21538                 done
21539                 if test x_$found_libmnl != x_yes; then
21540                         as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5
21541                 fi
21542                 ;;
21543     no|*)
21544         # nothing
21545                 ;;
21546 esac
21547 # Check whether --enable-explicit-port-randomisation was given.
21548 if test "${enable_explicit_port_randomisation+set}" = set; then :
21549   enableval=$enable_explicit_port_randomisation;
21550 fi
21551
21552 case "$enable_explicit_port_randomisation" in
21553         no)
21554
21555 $as_echo "#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1" >>confdefs.h
21556
21557                 ;;
21558         yes|*)
21559                 ;;
21560 esac
21561
21562
21563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
21564 $as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
21565 # on openBSD, the implicit rule make $< work.
21566 # on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
21567 # gmake works.
21568 cat >conftest.make <<EOF
21569 all:    conftest.lo
21570
21571 conftest.lo foo.lo bla.lo:
21572         if test -f "\$<"; then touch \$@; fi
21573
21574 .SUFFIXES: .lo
21575 .c.lo:
21576         if test -f "\$<"; then touch \$@; fi
21577
21578 conftest.lo:        conftest.dir/conftest.c
21579 EOF
21580 mkdir conftest.dir
21581 touch conftest.dir/conftest.c
21582 rm -f conftest.lo conftest.c
21583 ${MAKE:-make} -f conftest.make >/dev/null
21584 rm -f conftest.make conftest.c conftest.dir/conftest.c
21585 rm -rf conftest.dir
21586 if test ! -f conftest.lo; then
21587         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21588 $as_echo "no" >&6; }
21589         SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
21590         SOURCEFILE='`cat .source`'
21591 else
21592         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21593 $as_echo "yes" >&6; }
21594         SOURCEDETERMINE=':'
21595         SOURCEFILE='$<'
21596 fi
21597 rm -f conftest.lo
21598
21599
21600
21601 # see if we want to build the library or everything
21602 ALLTARGET="alltargets"
21603 INSTALLTARGET="install-all"
21604
21605 # Check whether --with-libunbound-only was given.
21606 if test "${with_libunbound_only+set}" = set; then :
21607   withval=$with_libunbound_only;
21608         if test "$withval" = "yes"; then
21609                 ALLTARGET="lib"
21610                 INSTALLTARGET="install-lib"
21611         fi
21612
21613 fi
21614
21615 if test $ALLTARGET = "alltargets"; then
21616         if test $USE_NSS = "yes"; then
21617                 as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
21618         fi
21619         if test $USE_NETTLE = "yes"; then
21620                 as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
21621         fi
21622 fi
21623
21624
21625
21626
21627
21628   { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
21629 $as_echo "$as_me: Stripping extension flags..." >&6;}
21630
21631   if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
21632     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
21633
21634 $as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
21635
21636   fi
21637
21638
21639   if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
21640     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
21641
21642 $as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
21643
21644   fi
21645
21646
21647   if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
21648     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
21649
21650 $as_echo "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
21651
21652   fi
21653
21654
21655   if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
21656     CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
21657
21658 $as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
21659
21660   fi
21661
21662
21663   if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
21664     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
21665
21666 $as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
21667
21668   fi
21669
21670
21671   if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
21672     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
21673
21674 $as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
21675
21676   fi
21677
21678
21679   if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
21680     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
21681
21682 $as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
21683
21684   fi
21685
21686
21687   if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
21688     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
21689
21690 $as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
21691
21692   fi
21693
21694
21695   if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
21696     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
21697
21698 $as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
21699
21700   fi
21701
21702
21703 if test -n "$LATE_LDFLAGS"; then
21704   LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
21705 fi
21706 # remove start spaces
21707 LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
21708 LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
21709
21710
21711 cat >>confdefs.h <<_ACEOF
21712 #define MAXSYSLOGMSGLEN 10240
21713 _ACEOF
21714
21715
21716
21717
21718 version=1.13.0
21719
21720 date=`date +'%b %e, %Y'`
21721
21722
21723 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 dnscrypt/dnscrypt_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service contrib/unbound_portable.service"
21724
21725 ac_config_headers="$ac_config_headers config.h"
21726
21727 cat >confcache <<\_ACEOF
21728 # This file is a shell script that caches the results of configure
21729 # tests run on this system so they can be shared between configure
21730 # scripts and configure runs, see configure's option --config-cache.
21731 # It is not useful on other systems.  If it contains results you don't
21732 # want to keep, you may remove or edit it.
21733 #
21734 # config.status only pays attention to the cache file if you give it
21735 # the --recheck option to rerun configure.
21736 #
21737 # `ac_cv_env_foo' variables (set or unset) will be overridden when
21738 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21739 # following values.
21740
21741 _ACEOF
21742
21743 # The following way of writing the cache mishandles newlines in values,
21744 # but we know of no workaround that is simple, portable, and efficient.
21745 # So, we kill variables containing newlines.
21746 # Ultrix sh set writes to stderr and can't be redirected directly,
21747 # and sets the high bit in the cache file unless we assign to the vars.
21748 (
21749   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21750     eval ac_val=\$$ac_var
21751     case $ac_val in #(
21752     *${as_nl}*)
21753       case $ac_var in #(
21754       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
21755 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
21756       esac
21757       case $ac_var in #(
21758       _ | IFS | as_nl) ;; #(
21759       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
21760       *) { eval $ac_var=; unset $ac_var;} ;;
21761       esac ;;
21762     esac
21763   done
21764
21765   (set) 2>&1 |
21766     case $as_nl`(ac_space=' '; set) 2>&1` in #(
21767     *${as_nl}ac_space=\ *)
21768       # `set' does not quote correctly, so add quotes: double-quote
21769       # substitution turns \\\\ into \\, and sed turns \\ into \.
21770       sed -n \
21771         "s/'/'\\\\''/g;
21772           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21773       ;; #(
21774     *)
21775       # `set' quotes correctly as required by POSIX, so do not add quotes.
21776       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
21777       ;;
21778     esac |
21779     sort
21780 ) |
21781   sed '
21782      /^ac_cv_env_/b end
21783      t clear
21784      :clear
21785      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21786      t end
21787      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21788      :end' >>confcache
21789 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21790   if test -w "$cache_file"; then
21791     if test "x$cache_file" != "x/dev/null"; then
21792       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
21793 $as_echo "$as_me: updating cache $cache_file" >&6;}
21794       if test ! -f "$cache_file" || test -h "$cache_file"; then
21795         cat confcache >"$cache_file"
21796       else
21797         case $cache_file in #(
21798         */* | ?:*)
21799           mv -f confcache "$cache_file"$$ &&
21800           mv -f "$cache_file"$$ "$cache_file" ;; #(
21801         *)
21802           mv -f confcache "$cache_file" ;;
21803         esac
21804       fi
21805     fi
21806   else
21807     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
21808 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21809   fi
21810 fi
21811 rm -f confcache
21812
21813 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21814 # Let make expand exec_prefix.
21815 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21816
21817 DEFS=-DHAVE_CONFIG_H
21818
21819 ac_libobjs=
21820 ac_ltlibobjs=
21821 U=
21822 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21823   # 1. Remove the extension, and $U if already installed.
21824   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21825   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21826   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
21827   #    will be set to the directory where LIBOBJS objects are built.
21828   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21829   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
21830 done
21831 LIBOBJS=$ac_libobjs
21832
21833 LTLIBOBJS=$ac_ltlibobjs
21834
21835
21836 if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
21837   as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
21838 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21839 fi
21840
21841 : "${CONFIG_STATUS=./config.status}"
21842 ac_write_fail=0
21843 ac_clean_files_save=$ac_clean_files
21844 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21845 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
21846 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
21847 as_write_fail=0
21848 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
21849 #! $SHELL
21850 # Generated by $as_me.
21851 # Run this file to recreate the current configuration.
21852 # Compiler output produced by configure, useful for debugging
21853 # configure, is in config.log if it exists.
21854
21855 debug=false
21856 ac_cs_recheck=false
21857 ac_cs_silent=false
21858
21859 SHELL=\${CONFIG_SHELL-$SHELL}
21860 export SHELL
21861 _ASEOF
21862 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
21863 ## -------------------- ##
21864 ## M4sh Initialization. ##
21865 ## -------------------- ##
21866
21867 # Be more Bourne compatible
21868 DUALCASE=1; export DUALCASE # for MKS sh
21869 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
21870   emulate sh
21871   NULLCMD=:
21872   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21873   # is contrary to our usage.  Disable this feature.
21874   alias -g '${1+"$@"}'='"$@"'
21875   setopt NO_GLOB_SUBST
21876 else
21877   case `(set -o) 2>/dev/null` in #(
21878   *posix*) :
21879     set -o posix ;; #(
21880   *) :
21881      ;;
21882 esac
21883 fi
21884
21885
21886 as_nl='
21887 '
21888 export as_nl
21889 # Printing a long string crashes Solaris 7 /usr/bin/printf.
21890 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
21891 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
21892 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
21893 # Prefer a ksh shell builtin over an external printf program on Solaris,
21894 # but without wasting forks for bash or zsh.
21895 if test -z "$BASH_VERSION$ZSH_VERSION" \
21896     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
21897   as_echo='print -r --'
21898   as_echo_n='print -rn --'
21899 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
21900   as_echo='printf %s\n'
21901   as_echo_n='printf %s'
21902 else
21903   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
21904     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
21905     as_echo_n='/usr/ucb/echo -n'
21906   else
21907     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
21908     as_echo_n_body='eval
21909       arg=$1;
21910       case $arg in #(
21911       *"$as_nl"*)
21912         expr "X$arg" : "X\\(.*\\)$as_nl";
21913         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
21914       esac;
21915       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
21916     '
21917     export as_echo_n_body
21918     as_echo_n='sh -c $as_echo_n_body as_echo'
21919   fi
21920   export as_echo_body
21921   as_echo='sh -c $as_echo_body as_echo'
21922 fi
21923
21924 # The user is always right.
21925 if test "${PATH_SEPARATOR+set}" != set; then
21926   PATH_SEPARATOR=:
21927   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
21928     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
21929       PATH_SEPARATOR=';'
21930   }
21931 fi
21932
21933
21934 # IFS
21935 # We need space, tab and new line, in precisely that order.  Quoting is
21936 # there to prevent editors from complaining about space-tab.
21937 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
21938 # splitting by setting IFS to empty value.)
21939 IFS=" ""        $as_nl"
21940
21941 # Find who we are.  Look in the path if we contain no directory separator.
21942 as_myself=
21943 case $0 in #((
21944   *[\\/]* ) as_myself=$0 ;;
21945   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21946 for as_dir in $PATH
21947 do
21948   IFS=$as_save_IFS
21949   test -z "$as_dir" && as_dir=.
21950     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21951   done
21952 IFS=$as_save_IFS
21953
21954      ;;
21955 esac
21956 # We did not find ourselves, most probably we were run as `sh COMMAND'
21957 # in which case we are not to be found in the path.
21958 if test "x$as_myself" = x; then
21959   as_myself=$0
21960 fi
21961 if test ! -f "$as_myself"; then
21962   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
21963   exit 1
21964 fi
21965
21966 # Unset variables that we do not need and which cause bugs (e.g. in
21967 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
21968 # suppresses any "Segmentation fault" message there.  '((' could
21969 # trigger a bug in pdksh 5.2.14.
21970 for as_var in BASH_ENV ENV MAIL MAILPATH
21971 do eval test x\${$as_var+set} = xset \
21972   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
21973 done
21974 PS1='$ '
21975 PS2='> '
21976 PS4='+ '
21977
21978 # NLS nuisances.
21979 LC_ALL=C
21980 export LC_ALL
21981 LANGUAGE=C
21982 export LANGUAGE
21983
21984 # CDPATH.
21985 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21986
21987
21988 # as_fn_error STATUS ERROR [LINENO LOG_FD]
21989 # ----------------------------------------
21990 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
21991 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
21992 # script with STATUS, using 1 if that was 0.
21993 as_fn_error ()
21994 {
21995   as_status=$1; test $as_status -eq 0 && as_status=1
21996   if test "$4"; then
21997     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
21998     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
21999   fi
22000   $as_echo "$as_me: error: $2" >&2
22001   as_fn_exit $as_status
22002 } # as_fn_error
22003
22004
22005 # as_fn_set_status STATUS
22006 # -----------------------
22007 # Set $? to STATUS, without forking.
22008 as_fn_set_status ()
22009 {
22010   return $1
22011 } # as_fn_set_status
22012
22013 # as_fn_exit STATUS
22014 # -----------------
22015 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
22016 as_fn_exit ()
22017 {
22018   set +e
22019   as_fn_set_status $1
22020   exit $1
22021 } # as_fn_exit
22022
22023 # as_fn_unset VAR
22024 # ---------------
22025 # Portably unset VAR.
22026 as_fn_unset ()
22027 {
22028   { eval $1=; unset $1;}
22029 }
22030 as_unset=as_fn_unset
22031 # as_fn_append VAR VALUE
22032 # ----------------------
22033 # Append the text in VALUE to the end of the definition contained in VAR. Take
22034 # advantage of any shell optimizations that allow amortized linear growth over
22035 # repeated appends, instead of the typical quadratic growth present in naive
22036 # implementations.
22037 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
22038   eval 'as_fn_append ()
22039   {
22040     eval $1+=\$2
22041   }'
22042 else
22043   as_fn_append ()
22044   {
22045     eval $1=\$$1\$2
22046   }
22047 fi # as_fn_append
22048
22049 # as_fn_arith ARG...
22050 # ------------------
22051 # Perform arithmetic evaluation on the ARGs, and store the result in the
22052 # global $as_val. Take advantage of shells that can avoid forks. The arguments
22053 # must be portable across $(()) and expr.
22054 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
22055   eval 'as_fn_arith ()
22056   {
22057     as_val=$(( $* ))
22058   }'
22059 else
22060   as_fn_arith ()
22061   {
22062     as_val=`expr "$@" || test $? -eq 1`
22063   }
22064 fi # as_fn_arith
22065
22066
22067 if expr a : '\(a\)' >/dev/null 2>&1 &&
22068    test "X`expr 00001 : '.*\(...\)'`" = X001; then
22069   as_expr=expr
22070 else
22071   as_expr=false
22072 fi
22073
22074 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
22075   as_basename=basename
22076 else
22077   as_basename=false
22078 fi
22079
22080 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
22081   as_dirname=dirname
22082 else
22083   as_dirname=false
22084 fi
22085
22086 as_me=`$as_basename -- "$0" ||
22087 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22088          X"$0" : 'X\(//\)$' \| \
22089          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
22090 $as_echo X/"$0" |
22091     sed '/^.*\/\([^/][^/]*\)\/*$/{
22092             s//\1/
22093             q
22094           }
22095           /^X\/\(\/\/\)$/{
22096             s//\1/
22097             q
22098           }
22099           /^X\/\(\/\).*/{
22100             s//\1/
22101             q
22102           }
22103           s/.*/./; q'`
22104
22105 # Avoid depending upon Character Ranges.
22106 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22107 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22108 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22109 as_cr_digits='0123456789'
22110 as_cr_alnum=$as_cr_Letters$as_cr_digits
22111
22112 ECHO_C= ECHO_N= ECHO_T=
22113 case `echo -n x` in #(((((
22114 -n*)
22115   case `echo 'xy\c'` in
22116   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
22117   xy)  ECHO_C='\c';;
22118   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
22119        ECHO_T=' ';;
22120   esac;;
22121 *)
22122   ECHO_N='-n';;
22123 esac
22124
22125 rm -f conf$$ conf$$.exe conf$$.file
22126 if test -d conf$$.dir; then
22127   rm -f conf$$.dir/conf$$.file
22128 else
22129   rm -f conf$$.dir
22130   mkdir conf$$.dir 2>/dev/null
22131 fi
22132 if (echo >conf$$.file) 2>/dev/null; then
22133   if ln -s conf$$.file conf$$ 2>/dev/null; then
22134     as_ln_s='ln -s'
22135     # ... but there are two gotchas:
22136     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
22137     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
22138     # In both cases, we have to default to `cp -pR'.
22139     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
22140       as_ln_s='cp -pR'
22141   elif ln conf$$.file conf$$ 2>/dev/null; then
22142     as_ln_s=ln
22143   else
22144     as_ln_s='cp -pR'
22145   fi
22146 else
22147   as_ln_s='cp -pR'
22148 fi
22149 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
22150 rmdir conf$$.dir 2>/dev/null
22151
22152
22153 # as_fn_mkdir_p
22154 # -------------
22155 # Create "$as_dir" as a directory, including parents if necessary.
22156 as_fn_mkdir_p ()
22157 {
22158
22159   case $as_dir in #(
22160   -*) as_dir=./$as_dir;;
22161   esac
22162   test -d "$as_dir" || eval $as_mkdir_p || {
22163     as_dirs=
22164     while :; do
22165       case $as_dir in #(
22166       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
22167       *) as_qdir=$as_dir;;
22168       esac
22169       as_dirs="'$as_qdir' $as_dirs"
22170       as_dir=`$as_dirname -- "$as_dir" ||
22171 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22172          X"$as_dir" : 'X\(//\)[^/]' \| \
22173          X"$as_dir" : 'X\(//\)$' \| \
22174          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
22175 $as_echo X"$as_dir" |
22176     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22177             s//\1/
22178             q
22179           }
22180           /^X\(\/\/\)[^/].*/{
22181             s//\1/
22182             q
22183           }
22184           /^X\(\/\/\)$/{
22185             s//\1/
22186             q
22187           }
22188           /^X\(\/\).*/{
22189             s//\1/
22190             q
22191           }
22192           s/.*/./; q'`
22193       test -d "$as_dir" && break
22194     done
22195     test -z "$as_dirs" || eval "mkdir $as_dirs"
22196   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
22197
22198
22199 } # as_fn_mkdir_p
22200 if mkdir -p . 2>/dev/null; then
22201   as_mkdir_p='mkdir -p "$as_dir"'
22202 else
22203   test -d ./-p && rmdir ./-p
22204   as_mkdir_p=false
22205 fi
22206
22207
22208 # as_fn_executable_p FILE
22209 # -----------------------
22210 # Test if FILE is an executable regular file.
22211 as_fn_executable_p ()
22212 {
22213   test -f "$1" && test -x "$1"
22214 } # as_fn_executable_p
22215 as_test_x='test -x'
22216 as_executable_p=as_fn_executable_p
22217
22218 # Sed expression to map a string onto a valid CPP name.
22219 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22220
22221 # Sed expression to map a string onto a valid variable name.
22222 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22223
22224
22225 exec 6>&1
22226 ## ----------------------------------- ##
22227 ## Main body of $CONFIG_STATUS script. ##
22228 ## ----------------------------------- ##
22229 _ASEOF
22230 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
22231
22232 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22233 # Save the log message, to keep $0 and so on meaningful, and to
22234 # report actual input values of CONFIG_FILES etc. instead of their
22235 # values after options handling.
22236 ac_log="
22237 This file was extended by unbound $as_me 1.13.0, which was
22238 generated by GNU Autoconf 2.69.  Invocation command line was
22239
22240   CONFIG_FILES    = $CONFIG_FILES
22241   CONFIG_HEADERS  = $CONFIG_HEADERS
22242   CONFIG_LINKS    = $CONFIG_LINKS
22243   CONFIG_COMMANDS = $CONFIG_COMMANDS
22244   $ $0 $@
22245
22246 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22247 "
22248
22249 _ACEOF
22250
22251 case $ac_config_files in *"
22252 "*) set x $ac_config_files; shift; ac_config_files=$*;;
22253 esac
22254
22255 case $ac_config_headers in *"
22256 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
22257 esac
22258
22259
22260 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22261 # Files that config.status was made for.
22262 config_files="$ac_config_files"
22263 config_headers="$ac_config_headers"
22264 config_commands="$ac_config_commands"
22265
22266 _ACEOF
22267
22268 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22269 ac_cs_usage="\
22270 \`$as_me' instantiates files and other configuration actions
22271 from templates according to the current configuration.  Unless the files
22272 and actions are specified as TAGs, all are instantiated by default.
22273
22274 Usage: $0 [OPTION]... [TAG]...
22275
22276   -h, --help       print this help, then exit
22277   -V, --version    print version number and configuration settings, then exit
22278       --config     print configuration, then exit
22279   -q, --quiet, --silent
22280                    do not print progress messages
22281   -d, --debug      don't remove temporary files
22282       --recheck    update $as_me by reconfiguring in the same conditions
22283       --file=FILE[:TEMPLATE]
22284                    instantiate the configuration file FILE
22285       --header=FILE[:TEMPLATE]
22286                    instantiate the configuration header FILE
22287
22288 Configuration files:
22289 $config_files
22290
22291 Configuration headers:
22292 $config_headers
22293
22294 Configuration commands:
22295 $config_commands
22296
22297 Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>."
22298
22299 _ACEOF
22300 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22301 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
22302 ac_cs_version="\\
22303 unbound config.status 1.13.0
22304 configured by $0, generated by GNU Autoconf 2.69,
22305   with options \\"\$ac_cs_config\\"
22306
22307 Copyright (C) 2012 Free Software Foundation, Inc.
22308 This config.status script is free software; the Free Software Foundation
22309 gives unlimited permission to copy, distribute and modify it."
22310
22311 ac_pwd='$ac_pwd'
22312 srcdir='$srcdir'
22313 AWK='$AWK'
22314 test -n "\$AWK" || AWK=awk
22315 _ACEOF
22316
22317 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22318 # The default lists apply if the user does not specify any file.
22319 ac_need_defaults=:
22320 while test $# != 0
22321 do
22322   case $1 in
22323   --*=?*)
22324     ac_option=`expr "X$1" : 'X\([^=]*\)='`
22325     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
22326     ac_shift=:
22327     ;;
22328   --*=)
22329     ac_option=`expr "X$1" : 'X\([^=]*\)='`
22330     ac_optarg=
22331     ac_shift=:
22332     ;;
22333   *)
22334     ac_option=$1
22335     ac_optarg=$2
22336     ac_shift=shift
22337     ;;
22338   esac
22339
22340   case $ac_option in
22341   # Handling of the options.
22342   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22343     ac_cs_recheck=: ;;
22344   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
22345     $as_echo "$ac_cs_version"; exit ;;
22346   --config | --confi | --conf | --con | --co | --c )
22347     $as_echo "$ac_cs_config"; exit ;;
22348   --debug | --debu | --deb | --de | --d | -d )
22349     debug=: ;;
22350   --file | --fil | --fi | --f )
22351     $ac_shift
22352     case $ac_optarg in
22353     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22354     '') as_fn_error $? "missing file argument" ;;
22355     esac
22356     as_fn_append CONFIG_FILES " '$ac_optarg'"
22357     ac_need_defaults=false;;
22358   --header | --heade | --head | --hea )
22359     $ac_shift
22360     case $ac_optarg in
22361     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22362     esac
22363     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
22364     ac_need_defaults=false;;
22365   --he | --h)
22366     # Conflict between --help and --header
22367     as_fn_error $? "ambiguous option: \`$1'
22368 Try \`$0 --help' for more information.";;
22369   --help | --hel | -h )
22370     $as_echo "$ac_cs_usage"; exit ;;
22371   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22372   | -silent | --silent | --silen | --sile | --sil | --si | --s)
22373     ac_cs_silent=: ;;
22374
22375   # This is an error.
22376   -*) as_fn_error $? "unrecognized option: \`$1'
22377 Try \`$0 --help' for more information." ;;
22378
22379   *) as_fn_append ac_config_targets " $1"
22380      ac_need_defaults=false ;;
22381
22382   esac
22383   shift
22384 done
22385
22386 ac_configure_extra_args=
22387
22388 if $ac_cs_silent; then
22389   exec 6>/dev/null
22390   ac_configure_extra_args="$ac_configure_extra_args --silent"
22391 fi
22392
22393 _ACEOF
22394 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22395 if \$ac_cs_recheck; then
22396   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22397   shift
22398   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
22399   CONFIG_SHELL='$SHELL'
22400   export CONFIG_SHELL
22401   exec "\$@"
22402 fi
22403
22404 _ACEOF
22405 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22406 exec 5>>config.log
22407 {
22408   echo
22409   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22410 ## Running $as_me. ##
22411 _ASBOX
22412   $as_echo "$ac_log"
22413 } >&5
22414
22415 _ACEOF
22416 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22417 #
22418 # INIT-COMMANDS
22419 #
22420
22421
22422 # The HP-UX ksh and POSIX shell print the target directory to stdout
22423 # if CDPATH is set.
22424 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
22425
22426 sed_quote_subst='$sed_quote_subst'
22427 double_quote_subst='$double_quote_subst'
22428 delay_variable_subst='$delay_variable_subst'
22429 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
22430 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
22431 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
22432 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
22433 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
22434 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
22435 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
22436 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
22437 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
22438 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
22439 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
22440 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
22441 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
22442 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
22443 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
22444 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
22445 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
22446 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
22447 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
22448 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
22449 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
22450 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
22451 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
22452 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
22453 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
22454 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
22455 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
22456 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
22457 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
22458 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
22459 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
22460 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
22461 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
22462 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
22463 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
22464 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
22465 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
22466 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
22467 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
22468 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
22469 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
22470 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
22471 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
22472 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
22473 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
22474 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
22475 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
22476 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
22477 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
22478 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
22479 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
22480 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
22481 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
22482 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
22483 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
22484 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
22485 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
22486 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
22487 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"`'
22488 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
22489 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
22490 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
22491 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
22492 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
22493 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
22494 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
22495 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
22496 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
22497 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
22498 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
22499 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
22500 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
22501 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
22502 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
22503 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
22504 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
22505 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
22506 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
22507 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
22508 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
22509 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
22510 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
22511 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
22512 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
22513 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
22514 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
22515 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
22516 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
22517 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
22518 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
22519 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
22520 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
22521 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
22522 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
22523 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
22524 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
22525 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
22526 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
22527 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
22528 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
22529 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
22530 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
22531 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
22532 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
22533 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
22534 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
22535 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
22536 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
22537 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
22538 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
22539 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
22540 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
22541 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
22542 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
22543 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
22544 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
22545 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
22546 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
22547 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
22548 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
22549 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
22550 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
22551 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
22552 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
22553 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
22554 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
22555 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
22556 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
22557 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
22558 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
22559 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
22560 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
22561 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
22562 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
22563 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
22564
22565 LTCC='$LTCC'
22566 LTCFLAGS='$LTCFLAGS'
22567 compiler='$compiler_DEFAULT'
22568
22569 # A function that is used when there is no print builtin or printf.
22570 func_fallback_echo ()
22571 {
22572   eval 'cat <<_LTECHO_EOF
22573 \$1
22574 _LTECHO_EOF'
22575 }
22576
22577 # Quote evaled strings.
22578 for var in SHELL \
22579 ECHO \
22580 PATH_SEPARATOR \
22581 SED \
22582 GREP \
22583 EGREP \
22584 FGREP \
22585 LD \
22586 NM \
22587 LN_S \
22588 lt_SP2NL \
22589 lt_NL2SP \
22590 reload_flag \
22591 OBJDUMP \
22592 deplibs_check_method \
22593 file_magic_cmd \
22594 file_magic_glob \
22595 want_nocaseglob \
22596 DLLTOOL \
22597 sharedlib_from_linklib_cmd \
22598 AR \
22599 AR_FLAGS \
22600 archiver_list_spec \
22601 STRIP \
22602 RANLIB \
22603 CC \
22604 CFLAGS \
22605 compiler \
22606 lt_cv_sys_global_symbol_pipe \
22607 lt_cv_sys_global_symbol_to_cdecl \
22608 lt_cv_sys_global_symbol_to_import \
22609 lt_cv_sys_global_symbol_to_c_name_address \
22610 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
22611 lt_cv_nm_interface \
22612 nm_file_list_spec \
22613 lt_cv_truncate_bin \
22614 lt_prog_compiler_no_builtin_flag \
22615 lt_prog_compiler_pic \
22616 lt_prog_compiler_wl \
22617 lt_prog_compiler_static \
22618 lt_cv_prog_compiler_c_o \
22619 need_locks \
22620 MANIFEST_TOOL \
22621 DSYMUTIL \
22622 NMEDIT \
22623 LIPO \
22624 OTOOL \
22625 OTOOL64 \
22626 shrext_cmds \
22627 export_dynamic_flag_spec \
22628 whole_archive_flag_spec \
22629 compiler_needs_object \
22630 with_gnu_ld \
22631 allow_undefined_flag \
22632 no_undefined_flag \
22633 hardcode_libdir_flag_spec \
22634 hardcode_libdir_separator \
22635 exclude_expsyms \
22636 include_expsyms \
22637 file_list_spec \
22638 variables_saved_for_relink \
22639 libname_spec \
22640 library_names_spec \
22641 soname_spec \
22642 install_override_mode \
22643 finish_eval \
22644 old_striplib \
22645 striplib; do
22646     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22647     *[\\\\\\\`\\"\\\$]*)
22648       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22649       ;;
22650     *)
22651       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22652       ;;
22653     esac
22654 done
22655
22656 # Double-quote double-evaled strings.
22657 for var in reload_cmds \
22658 old_postinstall_cmds \
22659 old_postuninstall_cmds \
22660 old_archive_cmds \
22661 extract_expsyms_cmds \
22662 old_archive_from_new_cmds \
22663 old_archive_from_expsyms_cmds \
22664 archive_cmds \
22665 archive_expsym_cmds \
22666 module_cmds \
22667 module_expsym_cmds \
22668 export_symbols_cmds \
22669 prelink_cmds \
22670 postlink_cmds \
22671 postinstall_cmds \
22672 postuninstall_cmds \
22673 finish_cmds \
22674 sys_lib_search_path_spec \
22675 configure_time_dlsearch_path \
22676 configure_time_lt_sys_library_path; do
22677     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22678     *[\\\\\\\`\\"\\\$]*)
22679       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22680       ;;
22681     *)
22682       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22683       ;;
22684     esac
22685 done
22686
22687 ac_aux_dir='$ac_aux_dir'
22688
22689 # See if we are running on zsh, and set the options that allow our
22690 # commands through without removal of \ escapes INIT.
22691 if test -n "\${ZSH_VERSION+set}"; then
22692    setopt NO_GLOB_SUBST
22693 fi
22694
22695
22696     PACKAGE='$PACKAGE'
22697     VERSION='$VERSION'
22698     RM='$RM'
22699     ofile='$ofile'
22700
22701
22702
22703
22704 _ACEOF
22705
22706 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22707
22708 # Handling of arguments.
22709 for ac_config_target in $ac_config_targets
22710 do
22711   case $ac_config_target in
22712     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
22713     "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
22714     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22715     "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
22716     "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
22717     "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
22718     "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
22719     "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
22720     "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
22721     "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
22722     "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
22723     "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
22724     "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
22725     "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
22726     "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
22727     "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
22728     "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
22729     "contrib/unbound_portable.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound_portable.service" ;;
22730     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
22731
22732   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
22733   esac
22734 done
22735
22736
22737 # If the user did not use the arguments to specify the items to instantiate,
22738 # then the envvar interface is used.  Set only those that are not.
22739 # We use the long form for the default assignment because of an extremely
22740 # bizarre bug on SunOS 4.1.3.
22741 if $ac_need_defaults; then
22742   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22743   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22744   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22745 fi
22746
22747 # Have a temporary directory for convenience.  Make it in the build tree
22748 # simply because there is no reason against having it here, and in addition,
22749 # creating and moving files from /tmp can sometimes cause problems.
22750 # Hook for its removal unless debugging.
22751 # Note that there is a small window in which the directory will not be cleaned:
22752 # after its creation but before its name has been assigned to `$tmp'.
22753 $debug ||
22754 {
22755   tmp= ac_tmp=
22756   trap 'exit_status=$?
22757   : "${ac_tmp:=$tmp}"
22758   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
22759 ' 0
22760   trap 'as_fn_exit 1' 1 2 13 15
22761 }
22762 # Create a (secure) tmp directory for tmp files.
22763
22764 {
22765   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
22766   test -d "$tmp"
22767 }  ||
22768 {
22769   tmp=./conf$$-$RANDOM
22770   (umask 077 && mkdir "$tmp")
22771 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
22772 ac_tmp=$tmp
22773
22774 # Set up the scripts for CONFIG_FILES section.
22775 # No need to generate them if there are no CONFIG_FILES.
22776 # This happens for instance with `./config.status config.h'.
22777 if test -n "$CONFIG_FILES"; then
22778
22779
22780 ac_cr=`echo X | tr X '\015'`
22781 # On cygwin, bash can eat \r inside `` if the user requested igncr.
22782 # But we know of no other shell where ac_cr would be empty at this
22783 # point, so we can use a bashism as a fallback.
22784 if test "x$ac_cr" = x; then
22785   eval ac_cr=\$\'\\r\'
22786 fi
22787 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
22788 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
22789   ac_cs_awk_cr='\\r'
22790 else
22791   ac_cs_awk_cr=$ac_cr
22792 fi
22793
22794 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
22795 _ACEOF
22796
22797
22798 {
22799   echo "cat >conf$$subs.awk <<_ACEOF" &&
22800   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
22801   echo "_ACEOF"
22802 } >conf$$subs.sh ||
22803   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22804 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
22805 ac_delim='%!_!# '
22806 for ac_last_try in false false false false false :; do
22807   . ./conf$$subs.sh ||
22808     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22809
22810   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
22811   if test $ac_delim_n = $ac_delim_num; then
22812     break
22813   elif $ac_last_try; then
22814     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22815   else
22816     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22817   fi
22818 done
22819 rm -f conf$$subs.sh
22820
22821 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22822 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
22823 _ACEOF
22824 sed -n '
22825 h
22826 s/^/S["/; s/!.*/"]=/
22827 p
22828 g
22829 s/^[^!]*!//
22830 :repl
22831 t repl
22832 s/'"$ac_delim"'$//
22833 t delim
22834 :nl
22835 h
22836 s/\(.\{148\}\)..*/\1/
22837 t more1
22838 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
22839 p
22840 n
22841 b repl
22842 :more1
22843 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22844 p
22845 g
22846 s/.\{148\}//
22847 t nl
22848 :delim
22849 h
22850 s/\(.\{148\}\)..*/\1/
22851 t more2
22852 s/["\\]/\\&/g; s/^/"/; s/$/"/
22853 p
22854 b
22855 :more2
22856 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22857 p
22858 g
22859 s/.\{148\}//
22860 t delim
22861 ' <conf$$subs.awk | sed '
22862 /^[^""]/{
22863   N
22864   s/\n//
22865 }
22866 ' >>$CONFIG_STATUS || ac_write_fail=1
22867 rm -f conf$$subs.awk
22868 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22869 _ACAWK
22870 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
22871   for (key in S) S_is_set[key] = 1
22872   FS = "\a"
22873
22874 }
22875 {
22876   line = $ 0
22877   nfields = split(line, field, "@")
22878   substed = 0
22879   len = length(field[1])
22880   for (i = 2; i < nfields; i++) {
22881     key = field[i]
22882     keylen = length(key)
22883     if (S_is_set[key]) {
22884       value = S[key]
22885       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
22886       len += length(value) + length(field[++i])
22887       substed = 1
22888     } else
22889       len += 1 + keylen
22890   }
22891
22892   print line
22893 }
22894
22895 _ACAWK
22896 _ACEOF
22897 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22898 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22899   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
22900 else
22901   cat
22902 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
22903   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
22904 _ACEOF
22905
22906 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
22907 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
22908 # trailing colons and then remove the whole line if VPATH becomes empty
22909 # (actually we leave an empty line to preserve line numbers).
22910 if test "x$srcdir" = x.; then
22911   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
22912 h
22913 s///
22914 s/^/:/
22915 s/[      ]*$/:/
22916 s/:\$(srcdir):/:/g
22917 s/:\${srcdir}:/:/g
22918 s/:@srcdir@:/:/g
22919 s/^:*//
22920 s/:*$//
22921 x
22922 s/\(=[   ]*\).*/\1/
22923 G
22924 s/\n//
22925 s/^[^=]*=[       ]*$//
22926 }'
22927 fi
22928
22929 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22930 fi # test -n "$CONFIG_FILES"
22931
22932 # Set up the scripts for CONFIG_HEADERS section.
22933 # No need to generate them if there are no CONFIG_HEADERS.
22934 # This happens for instance with `./config.status Makefile'.
22935 if test -n "$CONFIG_HEADERS"; then
22936 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
22937 BEGIN {
22938 _ACEOF
22939
22940 # Transform confdefs.h into an awk script `defines.awk', embedded as
22941 # here-document in config.status, that substitutes the proper values into
22942 # config.h.in to produce config.h.
22943
22944 # Create a delimiter string that does not exist in confdefs.h, to ease
22945 # handling of long lines.
22946 ac_delim='%!_!# '
22947 for ac_last_try in false false :; do
22948   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
22949   if test -z "$ac_tt"; then
22950     break
22951   elif $ac_last_try; then
22952     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
22953   else
22954     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22955   fi
22956 done
22957
22958 # For the awk script, D is an array of macro values keyed by name,
22959 # likewise P contains macro parameters if any.  Preserve backslash
22960 # newline sequences.
22961
22962 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
22963 sed -n '
22964 s/.\{148\}/&'"$ac_delim"'/g
22965 t rset
22966 :rset
22967 s/^[     ]*#[    ]*define[       ][      ]*/ /
22968 t def
22969 d
22970 :def
22971 s/\\$//
22972 t bsnl
22973 s/["\\]/\\&/g
22974 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22975 D["\1"]=" \3"/p
22976 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
22977 d
22978 :bsnl
22979 s/["\\]/\\&/g
22980 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22981 D["\1"]=" \3\\\\\\n"\\/p
22982 t cont
22983 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
22984 t cont
22985 d
22986 :cont
22987 n
22988 s/.\{148\}/&'"$ac_delim"'/g
22989 t clear
22990 :clear
22991 s/\\$//
22992 t bsnlc
22993 s/["\\]/\\&/g; s/^/"/; s/$/"/p
22994 d
22995 :bsnlc
22996 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
22997 b cont
22998 ' <confdefs.h | sed '
22999 s/'"$ac_delim"'/"\\\
23000 "/g' >>$CONFIG_STATUS || ac_write_fail=1
23001
23002 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23003   for (key in D) D_is_set[key] = 1
23004   FS = "\a"
23005 }
23006 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
23007   line = \$ 0
23008   split(line, arg, " ")
23009   if (arg[1] == "#") {
23010     defundef = arg[2]
23011     mac1 = arg[3]
23012   } else {
23013     defundef = substr(arg[1], 2)
23014     mac1 = arg[2]
23015   }
23016   split(mac1, mac2, "(") #)
23017   macro = mac2[1]
23018   prefix = substr(line, 1, index(line, defundef) - 1)
23019   if (D_is_set[macro]) {
23020     # Preserve the white space surrounding the "#".
23021     print prefix "define", macro P[macro] D[macro]
23022     next
23023   } else {
23024     # Replace #undef with comments.  This is necessary, for example,
23025     # in the case of _POSIX_SOURCE, which is predefined and required
23026     # on some systems where configure will not decide to define it.
23027     if (defundef == "undef") {
23028       print "/*", prefix defundef, macro, "*/"
23029       next
23030     }
23031   }
23032 }
23033 { print }
23034 _ACAWK
23035 _ACEOF
23036 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23037   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
23038 fi # test -n "$CONFIG_HEADERS"
23039
23040
23041 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
23042 shift
23043 for ac_tag
23044 do
23045   case $ac_tag in
23046   :[FHLC]) ac_mode=$ac_tag; continue;;
23047   esac
23048   case $ac_mode$ac_tag in
23049   :[FHL]*:*);;
23050   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
23051   :[FH]-) ac_tag=-:-;;
23052   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
23053   esac
23054   ac_save_IFS=$IFS
23055   IFS=:
23056   set x $ac_tag
23057   IFS=$ac_save_IFS
23058   shift
23059   ac_file=$1
23060   shift
23061
23062   case $ac_mode in
23063   :L) ac_source=$1;;
23064   :[FH])
23065     ac_file_inputs=
23066     for ac_f
23067     do
23068       case $ac_f in
23069       -) ac_f="$ac_tmp/stdin";;
23070       *) # Look for the file first in the build tree, then in the source tree
23071          # (if the path is not absolute).  The absolute path cannot be DOS-style,
23072          # because $ac_f cannot contain `:'.
23073          test -f "$ac_f" ||
23074            case $ac_f in
23075            [\\/$]*) false;;
23076            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
23077            esac ||
23078            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
23079       esac
23080       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
23081       as_fn_append ac_file_inputs " '$ac_f'"
23082     done
23083
23084     # Let's still pretend it is `configure' which instantiates (i.e., don't
23085     # use $as_me), people would be surprised to read:
23086     #    /* config.h.  Generated by config.status.  */
23087     configure_input='Generated from '`
23088           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
23089         `' by configure.'
23090     if test x"$ac_file" != x-; then
23091       configure_input="$ac_file.  $configure_input"
23092       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
23093 $as_echo "$as_me: creating $ac_file" >&6;}
23094     fi
23095     # Neutralize special characters interpreted by sed in replacement strings.
23096     case $configure_input in #(
23097     *\&* | *\|* | *\\* )
23098        ac_sed_conf_input=`$as_echo "$configure_input" |
23099        sed 's/[\\\\&|]/\\\\&/g'`;; #(
23100     *) ac_sed_conf_input=$configure_input;;
23101     esac
23102
23103     case $ac_tag in
23104     *:-:* | *:-) cat >"$ac_tmp/stdin" \
23105       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
23106     esac
23107     ;;
23108   esac
23109
23110   ac_dir=`$as_dirname -- "$ac_file" ||
23111 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23112          X"$ac_file" : 'X\(//\)[^/]' \| \
23113          X"$ac_file" : 'X\(//\)$' \| \
23114          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
23115 $as_echo X"$ac_file" |
23116     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23117             s//\1/
23118             q
23119           }
23120           /^X\(\/\/\)[^/].*/{
23121             s//\1/
23122             q
23123           }
23124           /^X\(\/\/\)$/{
23125             s//\1/
23126             q
23127           }
23128           /^X\(\/\).*/{
23129             s//\1/
23130             q
23131           }
23132           s/.*/./; q'`
23133   as_dir="$ac_dir"; as_fn_mkdir_p
23134   ac_builddir=.
23135
23136 case "$ac_dir" in
23137 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
23138 *)
23139   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
23140   # A ".." for each directory in $ac_dir_suffix.
23141   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
23142   case $ac_top_builddir_sub in
23143   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
23144   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
23145   esac ;;
23146 esac
23147 ac_abs_top_builddir=$ac_pwd
23148 ac_abs_builddir=$ac_pwd$ac_dir_suffix
23149 # for backward compatibility:
23150 ac_top_builddir=$ac_top_build_prefix
23151
23152 case $srcdir in
23153   .)  # We are building in place.
23154     ac_srcdir=.
23155     ac_top_srcdir=$ac_top_builddir_sub
23156     ac_abs_top_srcdir=$ac_pwd ;;
23157   [\\/]* | ?:[\\/]* )  # Absolute name.
23158     ac_srcdir=$srcdir$ac_dir_suffix;
23159     ac_top_srcdir=$srcdir
23160     ac_abs_top_srcdir=$srcdir ;;
23161   *) # Relative name.
23162     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
23163     ac_top_srcdir=$ac_top_build_prefix$srcdir
23164     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
23165 esac
23166 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
23167
23168
23169   case $ac_mode in
23170   :F)
23171   #
23172   # CONFIG_FILE
23173   #
23174
23175 _ACEOF
23176
23177 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23178 # If the template does not know about datarootdir, expand it.
23179 # FIXME: This hack should be removed a few years after 2.60.
23180 ac_datarootdir_hack=; ac_datarootdir_seen=
23181 ac_sed_dataroot='
23182 /datarootdir/ {
23183   p
23184   q
23185 }
23186 /@datadir@/p
23187 /@docdir@/p
23188 /@infodir@/p
23189 /@localedir@/p
23190 /@mandir@/p'
23191 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
23192 *datarootdir*) ac_datarootdir_seen=yes;;
23193 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
23194   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
23195 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
23196 _ACEOF
23197 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23198   ac_datarootdir_hack='
23199   s&@datadir@&$datadir&g
23200   s&@docdir@&$docdir&g
23201   s&@infodir@&$infodir&g
23202   s&@localedir@&$localedir&g
23203   s&@mandir@&$mandir&g
23204   s&\\\${datarootdir}&$datarootdir&g' ;;
23205 esac
23206 _ACEOF
23207
23208 # Neutralize VPATH when `$srcdir' = `.'.
23209 # Shell code in configure.ac might set extrasub.
23210 # FIXME: do we really want to maintain this feature?
23211 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23212 ac_sed_extra="$ac_vpsub
23213 $extrasub
23214 _ACEOF
23215 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23216 :t
23217 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23218 s|@configure_input@|$ac_sed_conf_input|;t t
23219 s&@top_builddir@&$ac_top_builddir_sub&;t t
23220 s&@top_build_prefix@&$ac_top_build_prefix&;t t
23221 s&@srcdir@&$ac_srcdir&;t t
23222 s&@abs_srcdir@&$ac_abs_srcdir&;t t
23223 s&@top_srcdir@&$ac_top_srcdir&;t t
23224 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
23225 s&@builddir@&$ac_builddir&;t t
23226 s&@abs_builddir@&$ac_abs_builddir&;t t
23227 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
23228 $ac_datarootdir_hack
23229 "
23230 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
23231   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23232
23233 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
23234   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
23235   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
23236       "$ac_tmp/out"`; test -z "$ac_out"; } &&
23237   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23238 which seems to be undefined.  Please make sure it is defined" >&5
23239 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23240 which seems to be undefined.  Please make sure it is defined" >&2;}
23241
23242   rm -f "$ac_tmp/stdin"
23243   case $ac_file in
23244   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
23245   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
23246   esac \
23247   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23248  ;;
23249   :H)
23250   #
23251   # CONFIG_HEADER
23252   #
23253   if test x"$ac_file" != x-; then
23254     {
23255       $as_echo "/* $configure_input  */" \
23256       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
23257     } >"$ac_tmp/config.h" \
23258       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23259     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
23260       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
23261 $as_echo "$as_me: $ac_file is unchanged" >&6;}
23262     else
23263       rm -f "$ac_file"
23264       mv "$ac_tmp/config.h" "$ac_file" \
23265         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23266     fi
23267   else
23268     $as_echo "/* $configure_input  */" \
23269       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
23270       || as_fn_error $? "could not create -" "$LINENO" 5
23271   fi
23272  ;;
23273
23274   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
23275 $as_echo "$as_me: executing $ac_file commands" >&6;}
23276  ;;
23277   esac
23278
23279
23280   case $ac_file$ac_mode in
23281     "libtool":C)
23282
23283     # See if we are running on zsh, and set the options that allow our
23284     # commands through without removal of \ escapes.
23285     if test -n "${ZSH_VERSION+set}"; then
23286       setopt NO_GLOB_SUBST
23287     fi
23288
23289     cfgfile=${ofile}T
23290     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
23291     $RM "$cfgfile"
23292
23293     cat <<_LT_EOF >> "$cfgfile"
23294 #! $SHELL
23295 # Generated automatically by $as_me ($PACKAGE) $VERSION
23296 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23297 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
23298
23299 # Provide generalized library-building support services.
23300 # Written by Gordon Matzigkeit, 1996
23301
23302 # Copyright (C) 2014 Free Software Foundation, Inc.
23303 # This is free software; see the source for copying conditions.  There is NO
23304 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23305
23306 # GNU Libtool is free software; you can redistribute it and/or modify
23307 # it under the terms of the GNU General Public License as published by
23308 # the Free Software Foundation; either version 2 of of the License, or
23309 # (at your option) any later version.
23310 #
23311 # As a special exception to the GNU General Public License, if you
23312 # distribute this file as part of a program or library that is built
23313 # using GNU Libtool, you may include this file under the  same
23314 # distribution terms that you use for the rest of that program.
23315 #
23316 # GNU Libtool is distributed in the hope that it will be useful, but
23317 # WITHOUT ANY WARRANTY; without even the implied warranty of
23318 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23319 # GNU General Public License for more details.
23320 #
23321 # You should have received a copy of the GNU General Public License
23322 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
23323
23324
23325 # The names of the tagged configurations supported by this script.
23326 available_tags=''
23327
23328 # Configured defaults for sys_lib_dlsearch_path munging.
23329 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
23330
23331 # ### BEGIN LIBTOOL CONFIG
23332
23333 # Which release of libtool.m4 was used?
23334 macro_version=$macro_version
23335 macro_revision=$macro_revision
23336
23337 # Whether or not to build shared libraries.
23338 build_libtool_libs=$enable_shared
23339
23340 # Whether or not to build static libraries.
23341 build_old_libs=$enable_static
23342
23343 # What type of objects to build.
23344 pic_mode=$pic_mode
23345
23346 # Whether or not to optimize for fast installation.
23347 fast_install=$enable_fast_install
23348
23349 # Shared archive member basename,for filename based shared library versioning on AIX.
23350 shared_archive_member_spec=$shared_archive_member_spec
23351
23352 # Shell to use when invoking shell scripts.
23353 SHELL=$lt_SHELL
23354
23355 # An echo program that protects backslashes.
23356 ECHO=$lt_ECHO
23357
23358 # The PATH separator for the build system.
23359 PATH_SEPARATOR=$lt_PATH_SEPARATOR
23360
23361 # The host system.
23362 host_alias=$host_alias
23363 host=$host
23364 host_os=$host_os
23365
23366 # The build system.
23367 build_alias=$build_alias
23368 build=$build
23369 build_os=$build_os
23370
23371 # A sed program that does not truncate output.
23372 SED=$lt_SED
23373
23374 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
23375 Xsed="\$SED -e 1s/^X//"
23376
23377 # A grep program that handles long lines.
23378 GREP=$lt_GREP
23379
23380 # An ERE matcher.
23381 EGREP=$lt_EGREP
23382
23383 # A literal string matcher.
23384 FGREP=$lt_FGREP
23385
23386 # A BSD- or MS-compatible name lister.
23387 NM=$lt_NM
23388
23389 # Whether we need soft or hard links.
23390 LN_S=$lt_LN_S
23391
23392 # What is the maximum length of a command?
23393 max_cmd_len=$max_cmd_len
23394
23395 # Object file suffix (normally "o").
23396 objext=$ac_objext
23397
23398 # Executable file suffix (normally "").
23399 exeext=$exeext
23400
23401 # whether the shell understands "unset".
23402 lt_unset=$lt_unset
23403
23404 # turn spaces into newlines.
23405 SP2NL=$lt_lt_SP2NL
23406
23407 # turn newlines into spaces.
23408 NL2SP=$lt_lt_NL2SP
23409
23410 # convert \$build file names to \$host format.
23411 to_host_file_cmd=$lt_cv_to_host_file_cmd
23412
23413 # convert \$build files to toolchain format.
23414 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
23415
23416 # An object symbol dumper.
23417 OBJDUMP=$lt_OBJDUMP
23418
23419 # Method to check whether dependent libraries are shared objects.
23420 deplibs_check_method=$lt_deplibs_check_method
23421
23422 # Command to use when deplibs_check_method = "file_magic".
23423 file_magic_cmd=$lt_file_magic_cmd
23424
23425 # How to find potential files when deplibs_check_method = "file_magic".
23426 file_magic_glob=$lt_file_magic_glob
23427
23428 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
23429 want_nocaseglob=$lt_want_nocaseglob
23430
23431 # DLL creation program.
23432 DLLTOOL=$lt_DLLTOOL
23433
23434 # Command to associate shared and link libraries.
23435 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
23436
23437 # The archiver.
23438 AR=$lt_AR
23439
23440 # Flags to create an archive.
23441 AR_FLAGS=$lt_AR_FLAGS
23442
23443 # How to feed a file listing to the archiver.
23444 archiver_list_spec=$lt_archiver_list_spec
23445
23446 # A symbol stripping program.
23447 STRIP=$lt_STRIP
23448
23449 # Commands used to install an old-style archive.
23450 RANLIB=$lt_RANLIB
23451 old_postinstall_cmds=$lt_old_postinstall_cmds
23452 old_postuninstall_cmds=$lt_old_postuninstall_cmds
23453
23454 # Whether to use a lock for old archive extraction.
23455 lock_old_archive_extraction=$lock_old_archive_extraction
23456
23457 # A C compiler.
23458 LTCC=$lt_CC
23459
23460 # LTCC compiler flags.
23461 LTCFLAGS=$lt_CFLAGS
23462
23463 # Take the output of nm and produce a listing of raw symbols and C names.
23464 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
23465
23466 # Transform the output of nm in a proper C declaration.
23467 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
23468
23469 # Transform the output of nm into a list of symbols to manually relocate.
23470 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
23471
23472 # Transform the output of nm in a C name address pair.
23473 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
23474
23475 # Transform the output of nm in a C name address pair when lib prefix is needed.
23476 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
23477
23478 # The name lister interface.
23479 nm_interface=$lt_lt_cv_nm_interface
23480
23481 # Specify filename containing input files for \$NM.
23482 nm_file_list_spec=$lt_nm_file_list_spec
23483
23484 # The root where to search for dependent libraries,and where our libraries should be installed.
23485 lt_sysroot=$lt_sysroot
23486
23487 # Command to truncate a binary pipe.
23488 lt_truncate_bin=$lt_lt_cv_truncate_bin
23489
23490 # The name of the directory that contains temporary libtool files.
23491 objdir=$objdir
23492
23493 # Used to examine libraries when file_magic_cmd begins with "file".
23494 MAGIC_CMD=$MAGIC_CMD
23495
23496 # Must we lock files when doing compilation?
23497 need_locks=$lt_need_locks
23498
23499 # Manifest tool.
23500 MANIFEST_TOOL=$lt_MANIFEST_TOOL
23501
23502 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
23503 DSYMUTIL=$lt_DSYMUTIL
23504
23505 # Tool to change global to local symbols on Mac OS X.
23506 NMEDIT=$lt_NMEDIT
23507
23508 # Tool to manipulate fat objects and archives on Mac OS X.
23509 LIPO=$lt_LIPO
23510
23511 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
23512 OTOOL=$lt_OTOOL
23513
23514 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
23515 OTOOL64=$lt_OTOOL64
23516
23517 # Old archive suffix (normally "a").
23518 libext=$libext
23519
23520 # Shared library suffix (normally ".so").
23521 shrext_cmds=$lt_shrext_cmds
23522
23523 # The commands to extract the exported symbol list from a shared archive.
23524 extract_expsyms_cmds=$lt_extract_expsyms_cmds
23525
23526 # Variables whose values should be saved in libtool wrapper scripts and
23527 # restored at link time.
23528 variables_saved_for_relink=$lt_variables_saved_for_relink
23529
23530 # Do we need the "lib" prefix for modules?
23531 need_lib_prefix=$need_lib_prefix
23532
23533 # Do we need a version for libraries?
23534 need_version=$need_version
23535
23536 # Library versioning type.
23537 version_type=$version_type
23538
23539 # Shared library runtime path variable.
23540 runpath_var=$runpath_var
23541
23542 # Shared library path variable.
23543 shlibpath_var=$shlibpath_var
23544
23545 # Is shlibpath searched before the hard-coded library search path?
23546 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
23547
23548 # Format of library name prefix.
23549 libname_spec=$lt_libname_spec
23550
23551 # List of archive names.  First name is the real one, the rest are links.
23552 # The last name is the one that the linker finds with -lNAME
23553 library_names_spec=$lt_library_names_spec
23554
23555 # The coded name of the library, if different from the real name.
23556 soname_spec=$lt_soname_spec
23557
23558 # Permission mode override for installation of shared libraries.
23559 install_override_mode=$lt_install_override_mode
23560
23561 # Command to use after installation of a shared archive.
23562 postinstall_cmds=$lt_postinstall_cmds
23563
23564 # Command to use after uninstallation of a shared archive.
23565 postuninstall_cmds=$lt_postuninstall_cmds
23566
23567 # Commands used to finish a libtool library installation in a directory.
23568 finish_cmds=$lt_finish_cmds
23569
23570 # As "finish_cmds", except a single script fragment to be evaled but
23571 # not shown.
23572 finish_eval=$lt_finish_eval
23573
23574 # Whether we should hardcode library paths into libraries.
23575 hardcode_into_libs=$hardcode_into_libs
23576
23577 # Compile-time system search path for libraries.
23578 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
23579
23580 # Detected run-time system search path for libraries.
23581 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
23582
23583 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
23584 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
23585
23586 # Whether dlopen is supported.
23587 dlopen_support=$enable_dlopen
23588
23589 # Whether dlopen of programs is supported.
23590 dlopen_self=$enable_dlopen_self
23591
23592 # Whether dlopen of statically linked programs is supported.
23593 dlopen_self_static=$enable_dlopen_self_static
23594
23595 # Commands to strip libraries.
23596 old_striplib=$lt_old_striplib
23597 striplib=$lt_striplib
23598
23599
23600 # The linker used to build libraries.
23601 LD=$lt_LD
23602
23603 # How to create reloadable object files.
23604 reload_flag=$lt_reload_flag
23605 reload_cmds=$lt_reload_cmds
23606
23607 # Commands used to build an old-style archive.
23608 old_archive_cmds=$lt_old_archive_cmds
23609
23610 # A language specific compiler.
23611 CC=$lt_compiler
23612
23613 # Is the compiler the GNU compiler?
23614 with_gcc=$GCC
23615
23616 # Compiler flag to turn off builtin functions.
23617 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
23618
23619 # Additional compiler flags for building library objects.
23620 pic_flag=$lt_lt_prog_compiler_pic
23621
23622 # How to pass a linker flag through the compiler.
23623 wl=$lt_lt_prog_compiler_wl
23624
23625 # Compiler flag to prevent dynamic linking.
23626 link_static_flag=$lt_lt_prog_compiler_static
23627
23628 # Does compiler simultaneously support -c and -o options?
23629 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
23630
23631 # Whether or not to add -lc for building shared libraries.
23632 build_libtool_need_lc=$archive_cmds_need_lc
23633
23634 # Whether or not to disallow shared libs when runtime libs are static.
23635 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
23636
23637 # Compiler flag to allow reflexive dlopens.
23638 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
23639
23640 # Compiler flag to generate shared objects directly from archives.
23641 whole_archive_flag_spec=$lt_whole_archive_flag_spec
23642
23643 # Whether the compiler copes with passing no objects directly.
23644 compiler_needs_object=$lt_compiler_needs_object
23645
23646 # Create an old-style archive from a shared archive.
23647 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
23648
23649 # Create a temporary old-style archive to link instead of a shared archive.
23650 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
23651
23652 # Commands used to build a shared archive.
23653 archive_cmds=$lt_archive_cmds
23654 archive_expsym_cmds=$lt_archive_expsym_cmds
23655
23656 # Commands used to build a loadable module if different from building
23657 # a shared archive.
23658 module_cmds=$lt_module_cmds
23659 module_expsym_cmds=$lt_module_expsym_cmds
23660
23661 # Whether we are building with GNU ld or not.
23662 with_gnu_ld=$lt_with_gnu_ld
23663
23664 # Flag that allows shared libraries with undefined symbols to be built.
23665 allow_undefined_flag=$lt_allow_undefined_flag
23666
23667 # Flag that enforces no undefined symbols.
23668 no_undefined_flag=$lt_no_undefined_flag
23669
23670 # Flag to hardcode \$libdir into a binary during linking.
23671 # This must work even if \$libdir does not exist
23672 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
23673
23674 # Whether we need a single "-rpath" flag with a separated argument.
23675 hardcode_libdir_separator=$lt_hardcode_libdir_separator
23676
23677 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23678 # DIR into the resulting binary.
23679 hardcode_direct=$hardcode_direct
23680
23681 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23682 # DIR into the resulting binary and the resulting library dependency is
23683 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
23684 # library is relocated.
23685 hardcode_direct_absolute=$hardcode_direct_absolute
23686
23687 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
23688 # into the resulting binary.
23689 hardcode_minus_L=$hardcode_minus_L
23690
23691 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
23692 # into the resulting binary.
23693 hardcode_shlibpath_var=$hardcode_shlibpath_var
23694
23695 # Set to "yes" if building a shared library automatically hardcodes DIR
23696 # into the library and all subsequent libraries and executables linked
23697 # against it.
23698 hardcode_automatic=$hardcode_automatic
23699
23700 # Set to yes if linker adds runtime paths of dependent libraries
23701 # to runtime path list.
23702 inherit_rpath=$inherit_rpath
23703
23704 # Whether libtool must link a program against all its dependency libraries.
23705 link_all_deplibs=$link_all_deplibs
23706
23707 # Set to "yes" if exported symbols are required.
23708 always_export_symbols=$always_export_symbols
23709
23710 # The commands to list exported symbols.
23711 export_symbols_cmds=$lt_export_symbols_cmds
23712
23713 # Symbols that should not be listed in the preloaded symbols.
23714 exclude_expsyms=$lt_exclude_expsyms
23715
23716 # Symbols that must always be exported.
23717 include_expsyms=$lt_include_expsyms
23718
23719 # Commands necessary for linking programs (against libraries) with templates.
23720 prelink_cmds=$lt_prelink_cmds
23721
23722 # Commands necessary for finishing linking programs.
23723 postlink_cmds=$lt_postlink_cmds
23724
23725 # Specify filename containing input files.
23726 file_list_spec=$lt_file_list_spec
23727
23728 # How to hardcode a shared library path into an executable.
23729 hardcode_action=$hardcode_action
23730
23731 # ### END LIBTOOL CONFIG
23732
23733 _LT_EOF
23734
23735     cat <<'_LT_EOF' >> "$cfgfile"
23736
23737 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
23738
23739 # func_munge_path_list VARIABLE PATH
23740 # -----------------------------------
23741 # VARIABLE is name of variable containing _space_ separated list of
23742 # directories to be munged by the contents of PATH, which is string
23743 # having a format:
23744 # "DIR[:DIR]:"
23745 #       string "DIR[ DIR]" will be prepended to VARIABLE
23746 # ":DIR[:DIR]"
23747 #       string "DIR[ DIR]" will be appended to VARIABLE
23748 # "DIRP[:DIRP]::[DIRA:]DIRA"
23749 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
23750 #       "DIRA[ DIRA]" will be appended to VARIABLE
23751 # "DIR[:DIR]"
23752 #       VARIABLE will be replaced by "DIR[ DIR]"
23753 func_munge_path_list ()
23754 {
23755     case x$2 in
23756     x)
23757         ;;
23758     *:)
23759         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
23760         ;;
23761     x:*)
23762         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
23763         ;;
23764     *::*)
23765         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
23766         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
23767         ;;
23768     *)
23769         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
23770         ;;
23771     esac
23772 }
23773
23774
23775 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
23776 func_cc_basename ()
23777 {
23778     for cc_temp in $*""; do
23779       case $cc_temp in
23780         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
23781         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
23782         \-*) ;;
23783         *) break;;
23784       esac
23785     done
23786     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
23787 }
23788
23789
23790 # ### END FUNCTIONS SHARED WITH CONFIGURE
23791
23792 _LT_EOF
23793
23794   case $host_os in
23795   aix3*)
23796     cat <<\_LT_EOF >> "$cfgfile"
23797 # AIX sometimes has problems with the GCC collect2 program.  For some
23798 # reason, if we set the COLLECT_NAMES environment variable, the problems
23799 # vanish in a puff of smoke.
23800 if test set != "${COLLECT_NAMES+set}"; then
23801   COLLECT_NAMES=
23802   export COLLECT_NAMES
23803 fi
23804 _LT_EOF
23805     ;;
23806   esac
23807
23808
23809 ltmain=$ac_aux_dir/ltmain.sh
23810
23811
23812   # We use sed instead of cat because bash on DJGPP gets confused if
23813   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
23814   # text mode, it properly converts lines to CR/LF.  This bash problem
23815   # is reportedly fixed, but why not run on old versions too?
23816   sed '$q' "$ltmain" >> "$cfgfile" \
23817      || (rm -f "$cfgfile"; exit 1)
23818
23819    mv -f "$cfgfile" "$ofile" ||
23820     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
23821   chmod +x "$ofile"
23822
23823  ;;
23824     "disable-rpath":C)
23825         sed < libtool > libtool-2 \
23826         's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
23827         mv libtool-2 libtool
23828         chmod 755 libtool
23829         libtool="./libtool"
23830          ;;
23831
23832   esac
23833 done # for ac_tag
23834
23835
23836 as_fn_exit 0
23837 _ACEOF
23838 ac_clean_files=$ac_clean_files_save
23839
23840 test $ac_write_fail = 0 ||
23841   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
23842
23843
23844 # configure is writing to config.log, and then calls config.status.
23845 # config.status does its own redirection, appending to config.log.
23846 # Unfortunately, on DOS this fails, as config.log is still kept open
23847 # by configure, so config.status won't be able to write to it; its
23848 # output is simply discarded.  So we exec the FD to /dev/null,
23849 # effectively closing config.log, so it can be properly (re)opened and
23850 # appended to by config.status.  When coming back to configure, we
23851 # need to make the FD available again.
23852 if test "$no_create" != yes; then
23853   ac_cs_success=:
23854   ac_config_status_args=
23855   test "$silent" = yes &&
23856     ac_config_status_args="$ac_config_status_args --quiet"
23857   exec 5>/dev/null
23858   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23859   exec 5>>config.log
23860   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23861   # would make configure fail if this is the last instruction.
23862   $ac_cs_success || as_fn_exit 1
23863 fi
23864 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
23865   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
23866 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
23867 fi
23868