]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - configure
Vendor import of Unbound 1.11.0.
[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.11.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.11.0'
595 PACKAGE_STRING='unbound 1.11.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 enable_static_exe
886 enable_fully_static
887 enable_lock_checks
888 enable_allsymbols
889 enable_dnstap
890 with_dnstap_socket_path
891 with_protobuf_c
892 enable_dnscrypt
893 with_libsodium
894 enable_cachedb
895 enable_ipsecmod
896 enable_ipset
897 with_libmnl
898 enable_explicit_port_randomisation
899 with_libunbound_only
900 '
901       ac_precious_vars='build_alias
902 host_alias
903 target_alias
904 CC
905 CFLAGS
906 LDFLAGS
907 LIBS
908 CPPFLAGS
909 CPP
910 YACC
911 YFLAGS
912 LT_SYS_LIBRARY_PATH
913 PKG_CONFIG
914 PKG_CONFIG_PATH
915 PKG_CONFIG_LIBDIR
916 SYSTEMD_CFLAGS
917 SYSTEMD_LIBS
918 SYSTEMD_DAEMON_CFLAGS
919 SYSTEMD_DAEMON_LIBS
920 PYTHON_VERSION'
921
922
923 # Initialize some variables set by options.
924 ac_init_help=
925 ac_init_version=false
926 ac_unrecognized_opts=
927 ac_unrecognized_sep=
928 # The variables have the same names as the options, with
929 # dashes changed to underlines.
930 cache_file=/dev/null
931 exec_prefix=NONE
932 no_create=
933 no_recursion=
934 prefix=NONE
935 program_prefix=NONE
936 program_suffix=NONE
937 program_transform_name=s,x,x,
938 silent=
939 site=
940 srcdir=
941 verbose=
942 x_includes=NONE
943 x_libraries=NONE
944
945 # Installation directory options.
946 # These are left unexpanded so users can "make install exec_prefix=/foo"
947 # and all the variables that are supposed to be based on exec_prefix
948 # by default will actually change.
949 # Use braces instead of parens because sh, perl, etc. also accept them.
950 # (The list follows the same order as the GNU Coding Standards.)
951 bindir='${exec_prefix}/bin'
952 sbindir='${exec_prefix}/sbin'
953 libexecdir='${exec_prefix}/libexec'
954 datarootdir='${prefix}/share'
955 datadir='${datarootdir}'
956 sysconfdir='${prefix}/etc'
957 sharedstatedir='${prefix}/com'
958 localstatedir='${prefix}/var'
959 includedir='${prefix}/include'
960 oldincludedir='/usr/include'
961 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
962 infodir='${datarootdir}/info'
963 htmldir='${docdir}'
964 dvidir='${docdir}'
965 pdfdir='${docdir}'
966 psdir='${docdir}'
967 libdir='${exec_prefix}/lib'
968 localedir='${datarootdir}/locale'
969 mandir='${datarootdir}/man'
970
971 ac_prev=
972 ac_dashdash=
973 for ac_option
974 do
975   # If the previous option needs an argument, assign it.
976   if test -n "$ac_prev"; then
977     eval $ac_prev=\$ac_option
978     ac_prev=
979     continue
980   fi
981
982   case $ac_option in
983   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
984   *=)   ac_optarg= ;;
985   *)    ac_optarg=yes ;;
986   esac
987
988   # Accept the important Cygnus configure options, so we can diagnose typos.
989
990   case $ac_dashdash$ac_option in
991   --)
992     ac_dashdash=yes ;;
993
994   -bindir | --bindir | --bindi | --bind | --bin | --bi)
995     ac_prev=bindir ;;
996   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
997     bindir=$ac_optarg ;;
998
999   -build | --build | --buil | --bui | --bu)
1000     ac_prev=build_alias ;;
1001   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1002     build_alias=$ac_optarg ;;
1003
1004   -cache-file | --cache-file | --cache-fil | --cache-fi \
1005   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1006     ac_prev=cache_file ;;
1007   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1008   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1009     cache_file=$ac_optarg ;;
1010
1011   --config-cache | -C)
1012     cache_file=config.cache ;;
1013
1014   -datadir | --datadir | --datadi | --datad)
1015     ac_prev=datadir ;;
1016   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1017     datadir=$ac_optarg ;;
1018
1019   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1020   | --dataroo | --dataro | --datar)
1021     ac_prev=datarootdir ;;
1022   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1023   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1024     datarootdir=$ac_optarg ;;
1025
1026   -disable-* | --disable-*)
1027     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1028     # Reject names that are not valid shell variable names.
1029     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1030       as_fn_error $? "invalid feature name: $ac_useropt"
1031     ac_useropt_orig=$ac_useropt
1032     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1033     case $ac_user_opts in
1034       *"
1035 "enable_$ac_useropt"
1036 "*) ;;
1037       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1038          ac_unrecognized_sep=', ';;
1039     esac
1040     eval enable_$ac_useropt=no ;;
1041
1042   -docdir | --docdir | --docdi | --doc | --do)
1043     ac_prev=docdir ;;
1044   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1045     docdir=$ac_optarg ;;
1046
1047   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1048     ac_prev=dvidir ;;
1049   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1050     dvidir=$ac_optarg ;;
1051
1052   -enable-* | --enable-*)
1053     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1054     # Reject names that are not valid shell variable names.
1055     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1056       as_fn_error $? "invalid feature name: $ac_useropt"
1057     ac_useropt_orig=$ac_useropt
1058     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1059     case $ac_user_opts in
1060       *"
1061 "enable_$ac_useropt"
1062 "*) ;;
1063       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1064          ac_unrecognized_sep=', ';;
1065     esac
1066     eval enable_$ac_useropt=\$ac_optarg ;;
1067
1068   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1069   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1070   | --exec | --exe | --ex)
1071     ac_prev=exec_prefix ;;
1072   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1073   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1074   | --exec=* | --exe=* | --ex=*)
1075     exec_prefix=$ac_optarg ;;
1076
1077   -gas | --gas | --ga | --g)
1078     # Obsolete; use --with-gas.
1079     with_gas=yes ;;
1080
1081   -help | --help | --hel | --he | -h)
1082     ac_init_help=long ;;
1083   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1084     ac_init_help=recursive ;;
1085   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1086     ac_init_help=short ;;
1087
1088   -host | --host | --hos | --ho)
1089     ac_prev=host_alias ;;
1090   -host=* | --host=* | --hos=* | --ho=*)
1091     host_alias=$ac_optarg ;;
1092
1093   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1094     ac_prev=htmldir ;;
1095   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1096   | --ht=*)
1097     htmldir=$ac_optarg ;;
1098
1099   -includedir | --includedir | --includedi | --included | --include \
1100   | --includ | --inclu | --incl | --inc)
1101     ac_prev=includedir ;;
1102   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1103   | --includ=* | --inclu=* | --incl=* | --inc=*)
1104     includedir=$ac_optarg ;;
1105
1106   -infodir | --infodir | --infodi | --infod | --info | --inf)
1107     ac_prev=infodir ;;
1108   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1109     infodir=$ac_optarg ;;
1110
1111   -libdir | --libdir | --libdi | --libd)
1112     ac_prev=libdir ;;
1113   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1114     libdir=$ac_optarg ;;
1115
1116   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1117   | --libexe | --libex | --libe)
1118     ac_prev=libexecdir ;;
1119   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1120   | --libexe=* | --libex=* | --libe=*)
1121     libexecdir=$ac_optarg ;;
1122
1123   -localedir | --localedir | --localedi | --localed | --locale)
1124     ac_prev=localedir ;;
1125   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1126     localedir=$ac_optarg ;;
1127
1128   -localstatedir | --localstatedir | --localstatedi | --localstated \
1129   | --localstate | --localstat | --localsta | --localst | --locals)
1130     ac_prev=localstatedir ;;
1131   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1132   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1133     localstatedir=$ac_optarg ;;
1134
1135   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1136     ac_prev=mandir ;;
1137   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1138     mandir=$ac_optarg ;;
1139
1140   -nfp | --nfp | --nf)
1141     # Obsolete; use --without-fp.
1142     with_fp=no ;;
1143
1144   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1145   | --no-cr | --no-c | -n)
1146     no_create=yes ;;
1147
1148   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1149   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1150     no_recursion=yes ;;
1151
1152   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1153   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1154   | --oldin | --oldi | --old | --ol | --o)
1155     ac_prev=oldincludedir ;;
1156   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1157   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1158   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1159     oldincludedir=$ac_optarg ;;
1160
1161   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1162     ac_prev=prefix ;;
1163   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1164     prefix=$ac_optarg ;;
1165
1166   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1167   | --program-pre | --program-pr | --program-p)
1168     ac_prev=program_prefix ;;
1169   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1170   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1171     program_prefix=$ac_optarg ;;
1172
1173   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1174   | --program-suf | --program-su | --program-s)
1175     ac_prev=program_suffix ;;
1176   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1177   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1178     program_suffix=$ac_optarg ;;
1179
1180   -program-transform-name | --program-transform-name \
1181   | --program-transform-nam | --program-transform-na \
1182   | --program-transform-n | --program-transform- \
1183   | --program-transform | --program-transfor \
1184   | --program-transfo | --program-transf \
1185   | --program-trans | --program-tran \
1186   | --progr-tra | --program-tr | --program-t)
1187     ac_prev=program_transform_name ;;
1188   -program-transform-name=* | --program-transform-name=* \
1189   | --program-transform-nam=* | --program-transform-na=* \
1190   | --program-transform-n=* | --program-transform-=* \
1191   | --program-transform=* | --program-transfor=* \
1192   | --program-transfo=* | --program-transf=* \
1193   | --program-trans=* | --program-tran=* \
1194   | --progr-tra=* | --program-tr=* | --program-t=*)
1195     program_transform_name=$ac_optarg ;;
1196
1197   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1198     ac_prev=pdfdir ;;
1199   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1200     pdfdir=$ac_optarg ;;
1201
1202   -psdir | --psdir | --psdi | --psd | --ps)
1203     ac_prev=psdir ;;
1204   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1205     psdir=$ac_optarg ;;
1206
1207   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1208   | -silent | --silent | --silen | --sile | --sil)
1209     silent=yes ;;
1210
1211   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1212     ac_prev=sbindir ;;
1213   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1214   | --sbi=* | --sb=*)
1215     sbindir=$ac_optarg ;;
1216
1217   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1218   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1219   | --sharedst | --shareds | --shared | --share | --shar \
1220   | --sha | --sh)
1221     ac_prev=sharedstatedir ;;
1222   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1223   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1224   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1225   | --sha=* | --sh=*)
1226     sharedstatedir=$ac_optarg ;;
1227
1228   -site | --site | --sit)
1229     ac_prev=site ;;
1230   -site=* | --site=* | --sit=*)
1231     site=$ac_optarg ;;
1232
1233   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1234     ac_prev=srcdir ;;
1235   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1236     srcdir=$ac_optarg ;;
1237
1238   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1239   | --syscon | --sysco | --sysc | --sys | --sy)
1240     ac_prev=sysconfdir ;;
1241   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1242   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1243     sysconfdir=$ac_optarg ;;
1244
1245   -target | --target | --targe | --targ | --tar | --ta | --t)
1246     ac_prev=target_alias ;;
1247   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1248     target_alias=$ac_optarg ;;
1249
1250   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1251     verbose=yes ;;
1252
1253   -version | --version | --versio | --versi | --vers | -V)
1254     ac_init_version=: ;;
1255
1256   -with-* | --with-*)
1257     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1258     # Reject names that are not valid shell variable names.
1259     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1260       as_fn_error $? "invalid package name: $ac_useropt"
1261     ac_useropt_orig=$ac_useropt
1262     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1263     case $ac_user_opts in
1264       *"
1265 "with_$ac_useropt"
1266 "*) ;;
1267       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1268          ac_unrecognized_sep=', ';;
1269     esac
1270     eval with_$ac_useropt=\$ac_optarg ;;
1271
1272   -without-* | --without-*)
1273     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1274     # Reject names that are not valid shell variable names.
1275     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1276       as_fn_error $? "invalid package name: $ac_useropt"
1277     ac_useropt_orig=$ac_useropt
1278     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1279     case $ac_user_opts in
1280       *"
1281 "with_$ac_useropt"
1282 "*) ;;
1283       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1284          ac_unrecognized_sep=', ';;
1285     esac
1286     eval with_$ac_useropt=no ;;
1287
1288   --x)
1289     # Obsolete; use --with-x.
1290     with_x=yes ;;
1291
1292   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1293   | --x-incl | --x-inc | --x-in | --x-i)
1294     ac_prev=x_includes ;;
1295   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1296   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1297     x_includes=$ac_optarg ;;
1298
1299   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1300   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1301     ac_prev=x_libraries ;;
1302   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1303   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1304     x_libraries=$ac_optarg ;;
1305
1306   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1307 Try \`$0 --help' for more information"
1308     ;;
1309
1310   *=*)
1311     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1312     # Reject names that are not valid shell variable names.
1313     case $ac_envvar in #(
1314       '' | [0-9]* | *[!_$as_cr_alnum]* )
1315       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1316     esac
1317     eval $ac_envvar=\$ac_optarg
1318     export $ac_envvar ;;
1319
1320   *)
1321     # FIXME: should be removed in autoconf 3.0.
1322     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1323     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1324       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1325     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1326     ;;
1327
1328   esac
1329 done
1330
1331 if test -n "$ac_prev"; then
1332   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1333   as_fn_error $? "missing argument to $ac_option"
1334 fi
1335
1336 if test -n "$ac_unrecognized_opts"; then
1337   case $enable_option_checking in
1338     no) ;;
1339     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1340     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1341   esac
1342 fi
1343
1344 # Check all directory arguments for consistency.
1345 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1346                 datadir sysconfdir sharedstatedir localstatedir includedir \
1347                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1348                 libdir localedir mandir
1349 do
1350   eval ac_val=\$$ac_var
1351   # Remove trailing slashes.
1352   case $ac_val in
1353     */ )
1354       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1355       eval $ac_var=\$ac_val;;
1356   esac
1357   # Be sure to have absolute directory names.
1358   case $ac_val in
1359     [\\/$]* | ?:[\\/]* )  continue;;
1360     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1361   esac
1362   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1363 done
1364
1365 # There might be people who depend on the old broken behavior: `$host'
1366 # used to hold the argument of --host etc.
1367 # FIXME: To remove some day.
1368 build=$build_alias
1369 host=$host_alias
1370 target=$target_alias
1371
1372 # FIXME: To remove some day.
1373 if test "x$host_alias" != x; then
1374   if test "x$build_alias" = x; then
1375     cross_compiling=maybe
1376   elif test "x$build_alias" != "x$host_alias"; then
1377     cross_compiling=yes
1378   fi
1379 fi
1380
1381 ac_tool_prefix=
1382 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1383
1384 test "$silent" = yes && exec 6>/dev/null
1385
1386
1387 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1388 ac_ls_di=`ls -di .` &&
1389 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1390   as_fn_error $? "working directory cannot be determined"
1391 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1392   as_fn_error $? "pwd does not report name of working directory"
1393
1394
1395 # Find the source files, if location was not specified.
1396 if test -z "$srcdir"; then
1397   ac_srcdir_defaulted=yes
1398   # Try the directory containing this script, then the parent directory.
1399   ac_confdir=`$as_dirname -- "$as_myself" ||
1400 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1401          X"$as_myself" : 'X\(//\)[^/]' \| \
1402          X"$as_myself" : 'X\(//\)$' \| \
1403          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1404 $as_echo X"$as_myself" |
1405     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1406             s//\1/
1407             q
1408           }
1409           /^X\(\/\/\)[^/].*/{
1410             s//\1/
1411             q
1412           }
1413           /^X\(\/\/\)$/{
1414             s//\1/
1415             q
1416           }
1417           /^X\(\/\).*/{
1418             s//\1/
1419             q
1420           }
1421           s/.*/./; q'`
1422   srcdir=$ac_confdir
1423   if test ! -r "$srcdir/$ac_unique_file"; then
1424     srcdir=..
1425   fi
1426 else
1427   ac_srcdir_defaulted=no
1428 fi
1429 if test ! -r "$srcdir/$ac_unique_file"; then
1430   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1431   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1432 fi
1433 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1434 ac_abs_confdir=`(
1435         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1436         pwd)`
1437 # When building in place, set srcdir=.
1438 if test "$ac_abs_confdir" = "$ac_pwd"; then
1439   srcdir=.
1440 fi
1441 # Remove unnecessary trailing slashes from srcdir.
1442 # Double slashes in file names in object file debugging info
1443 # mess up M-x gdb in Emacs.
1444 case $srcdir in
1445 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1446 esac
1447 for ac_var in $ac_precious_vars; do
1448   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1449   eval ac_env_${ac_var}_value=\$${ac_var}
1450   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1451   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1452 done
1453
1454 #
1455 # Report the --help message.
1456 #
1457 if test "$ac_init_help" = "long"; then
1458   # Omit some internal or obsolete options to make the list less imposing.
1459   # This message is too long to be a string in the A/UX 3.1 sh.
1460   cat <<_ACEOF
1461 \`configure' configures unbound 1.11.0 to adapt to many kinds of systems.
1462
1463 Usage: $0 [OPTION]... [VAR=VALUE]...
1464
1465 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1466 VAR=VALUE.  See below for descriptions of some of the useful variables.
1467
1468 Defaults for the options are specified in brackets.
1469
1470 Configuration:
1471   -h, --help              display this help and exit
1472       --help=short        display options specific to this package
1473       --help=recursive    display the short help of all the included packages
1474   -V, --version           display version information and exit
1475   -q, --quiet, --silent   do not print \`checking ...' messages
1476       --cache-file=FILE   cache test results in FILE [disabled]
1477   -C, --config-cache      alias for \`--cache-file=config.cache'
1478   -n, --no-create         do not create output files
1479       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1480
1481 Installation directories:
1482   --prefix=PREFIX         install architecture-independent files in PREFIX
1483                           [$ac_default_prefix]
1484   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1485                           [PREFIX]
1486
1487 By default, \`make install' will install all the files in
1488 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1489 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1490 for instance \`--prefix=\$HOME'.
1491
1492 For better control, use the options below.
1493
1494 Fine tuning of the installation directories:
1495   --bindir=DIR            user executables [EPREFIX/bin]
1496   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1497   --libexecdir=DIR        program executables [EPREFIX/libexec]
1498   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1499   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1500   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1501   --libdir=DIR            object code libraries [EPREFIX/lib]
1502   --includedir=DIR        C header files [PREFIX/include]
1503   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1504   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1505   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1506   --infodir=DIR           info documentation [DATAROOTDIR/info]
1507   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1508   --mandir=DIR            man documentation [DATAROOTDIR/man]
1509   --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1510   --htmldir=DIR           html documentation [DOCDIR]
1511   --dvidir=DIR            dvi documentation [DOCDIR]
1512   --pdfdir=DIR            pdf documentation [DOCDIR]
1513   --psdir=DIR             ps documentation [DOCDIR]
1514 _ACEOF
1515
1516   cat <<\_ACEOF
1517
1518 System types:
1519   --build=BUILD     configure for building on BUILD [guessed]
1520   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1521 _ACEOF
1522 fi
1523
1524 if test -n "$ac_init_help"; then
1525   case $ac_init_help in
1526      short | recursive ) echo "Configuration of unbound 1.11.0:";;
1527    esac
1528   cat <<\_ACEOF
1529
1530 Optional Features:
1531   --disable-option-checking  ignore unrecognized --enable/--with options
1532   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1533   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1534   --enable-checking       Enable warnings, asserts, makefile-dependencies
1535   --enable-debug          same as enable-checking
1536   --disable-flto          Disable link-time optimization (gcc specific option)
1537   --enable-pie            Enable Position-Independent Executable (eg. to fully
1538                           benefit from ASLR, small performance penalty)
1539   --enable-relro-now      Enable full relocation binding at load-time (RELRO
1540                           NOW, to protect GOT and .dtor areas)
1541   --enable-shared[=PKGS]  build shared libraries [default=yes]
1542   --enable-static[=PKGS]  build static libraries [default=yes]
1543   --enable-fast-install[=PKGS]
1544                           optimize for fast installation [default=yes]
1545   --disable-libtool-lock  avoid locking (might break parallel builds)
1546   --disable-rpath         disable hardcoded rpath (default=enabled)
1547   --disable-largefile     omit support for large files
1548   --enable-systemd        compile with systemd support
1549   --enable-alloc-checks   enable to memory allocation statistics, for debug
1550                           purposes
1551   --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1552                           purposes
1553   --enable-alloc-nonregional
1554                           enable nonregional allocs, slow but exposes regional
1555                           allocations to other memory purifiers, for debug
1556                           purposes
1557   --disable-swig-version-check
1558                           Disable swig version check to build python modules
1559                           with older swig even though that is unreliable
1560   --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1561                           support
1562   --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1563   --enable-subnet         Enable client subnet
1564   --disable-gost          Disable GOST support
1565   --disable-ecdsa         Disable ECDSA support
1566   --disable-dsa           Disable DSA support
1567   --disable-ed25519       Disable ED25519 support
1568   --disable-ed448         Disable ED448 support
1569   --enable-event-api      Enable (experimental) pluggable event base
1570                           libunbound API installed to unbound-event.h
1571   --enable-tfo-client     Enable TCP Fast Open for client mode
1572   --enable-tfo-server     Enable TCP Fast Open for server mode
1573   --enable-static-exe     enable to compile executables statically against
1574                           (event) uninstalled libs, for debug purposes
1575   --enable-fully-static   enable to compile fully static
1576   --enable-lock-checks    enable to check lock and unlock calls, for debug
1577                           purposes
1578   --enable-allsymbols     export all symbols from libunbound and link binaries
1579                           to it, smaller install size but libunbound export
1580                           table is polluted by internal symbols
1581   --enable-dnstap         Enable dnstap support (requires protobuf-c)
1582   --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1583   --enable-cachedb        enable cachedb module that can use external cache
1584                           storage
1585   --enable-ipsecmod       Enable ipsecmod module that facilitates
1586                           opportunistic IPsec
1587   --enable-ipset          enable ipset module
1588   --disable-explicit-port-randomisation
1589                           disable explicit source port randomisation and rely
1590                           on the kernel to provide random source ports
1591
1592 Optional Packages:
1593   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1594   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1595   --with-conf-file=path   Pathname to the Unbound configuration file
1596   --with-run-dir=path     set default directory to chdir to (by default dir
1597                           part of cfg file)
1598   --with-chroot-dir=path  set default directory to chroot to (by default same
1599                           as run-dir)
1600   --with-share-dir=path   set default directory with shared data (by default
1601                           same as share/unbound)
1602   --with-pidfile=filename set default pathname to unbound pidfile (default
1603                           run-dir/unbound.pid)
1604   --with-rootkey-file=filename
1605                           set default pathname to root key file (default
1606                           run-dir/root.key). This file is read and written.
1607   --with-rootcert-file=filename
1608                           set default pathname to root update certificate file
1609                           (default run-dir/icannbundle.pem). This file need
1610                           not exist if you are content with the builtin.
1611   --with-username=user    set default user that unbound changes to (default
1612                           user is unbound)
1613   --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1614                           both]
1615   --with-aix-soname=aix|svr4|both
1616                           shared library versioning (aka "SONAME") variant to
1617                           provide on AIX, [default=aix].
1618   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1619   --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1620                           compiler's sysroot if not specified).
1621   --with-pthreads         use pthreads library, or --without-pthreads to
1622                           disable threading support.
1623   --with-solaris-threads  use solaris native thread library.
1624   --with-syslog-facility=LOCAL0 - LOCAL7
1625                           set SYSLOG_FACILITY, default DAEMON
1626   --with-dynlibmodule     build dynamic library module, or
1627                           --without-dynlibmodule to disable it. (default=no)
1628   --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1629                           (default=no)
1630   --with-pythonmodule     build Python module, or --without-pythonmodule to
1631                           disable script engine. (default=no)
1632   --with-nss=path         use libnss instead of openssl, installed at path.
1633   --with-nettle=path      use libnettle as crypto library, installed at path.
1634   --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1635                           /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1636                           /usr)
1637   --with-libbsd           Use portable libbsd functions
1638   --with-libevent=pathname
1639                           use libevent (will check /usr/local /opt/local
1640                           /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1641                           an explicit path). Slower, but allows use of large
1642                           outgoing port ranges.
1643   --with-libexpat=path    specify explicit path for libexpat.
1644   --with-libhiredis=path  specify explicit path for libhiredis.
1645   --with-dnstap-socket-path=pathname
1646                           set default dnstap socket path
1647   --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1648   --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1649   --with-libmnl=path      specify explicit path for libmnl.
1650   --with-libunbound-only  do not build daemon and tool programs
1651
1652 Some influential environment variables:
1653   CC          C compiler command
1654   CFLAGS      C compiler flags
1655   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1656               nonstandard directory <lib dir>
1657   LIBS        libraries to pass to the linker, e.g. -l<library>
1658   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1659               you have headers in a nonstandard directory <include dir>
1660   CPP         C preprocessor
1661   YACC        The `Yet Another Compiler Compiler' implementation to use.
1662               Defaults to the first program found out of: `bison -y', `byacc',
1663               `yacc'.
1664   YFLAGS      The list of arguments that will be passed by default to $YACC.
1665               This script will default YFLAGS to the empty string to avoid a
1666               default value of `-d' given by some make applications.
1667   LT_SYS_LIBRARY_PATH
1668               User-defined run-time library search path.
1669   PKG_CONFIG  path to pkg-config utility
1670   PKG_CONFIG_PATH
1671               directories to add to pkg-config's search path
1672   PKG_CONFIG_LIBDIR
1673               path overriding pkg-config's built-in search path
1674   SYSTEMD_CFLAGS
1675               C compiler flags for SYSTEMD, overriding pkg-config
1676   SYSTEMD_LIBS
1677               linker flags for SYSTEMD, overriding pkg-config
1678   SYSTEMD_DAEMON_CFLAGS
1679               C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1680   SYSTEMD_DAEMON_LIBS
1681               linker flags for SYSTEMD_DAEMON, overriding pkg-config
1682   PYTHON_VERSION
1683               The installed Python version to use, for example '2.3'. This
1684               string will be appended to the Python interpreter canonical
1685               name.
1686
1687 Use these variables to override the choices made by `configure' or to help
1688 it to find libraries and programs with nonstandard names/locations.
1689
1690 Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
1691 _ACEOF
1692 ac_status=$?
1693 fi
1694
1695 if test "$ac_init_help" = "recursive"; then
1696   # If there are subdirs, report their specific --help.
1697   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1698     test -d "$ac_dir" ||
1699       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1700       continue
1701     ac_builddir=.
1702
1703 case "$ac_dir" in
1704 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1705 *)
1706   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1707   # A ".." for each directory in $ac_dir_suffix.
1708   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1709   case $ac_top_builddir_sub in
1710   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1711   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1712   esac ;;
1713 esac
1714 ac_abs_top_builddir=$ac_pwd
1715 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1716 # for backward compatibility:
1717 ac_top_builddir=$ac_top_build_prefix
1718
1719 case $srcdir in
1720   .)  # We are building in place.
1721     ac_srcdir=.
1722     ac_top_srcdir=$ac_top_builddir_sub
1723     ac_abs_top_srcdir=$ac_pwd ;;
1724   [\\/]* | ?:[\\/]* )  # Absolute name.
1725     ac_srcdir=$srcdir$ac_dir_suffix;
1726     ac_top_srcdir=$srcdir
1727     ac_abs_top_srcdir=$srcdir ;;
1728   *) # Relative name.
1729     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1730     ac_top_srcdir=$ac_top_build_prefix$srcdir
1731     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1732 esac
1733 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1734
1735     cd "$ac_dir" || { ac_status=$?; continue; }
1736     # Check for guested configure.
1737     if test -f "$ac_srcdir/configure.gnu"; then
1738       echo &&
1739       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1740     elif test -f "$ac_srcdir/configure"; then
1741       echo &&
1742       $SHELL "$ac_srcdir/configure" --help=recursive
1743     else
1744       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1745     fi || ac_status=$?
1746     cd "$ac_pwd" || { ac_status=$?; break; }
1747   done
1748 fi
1749
1750 test -n "$ac_init_help" && exit $ac_status
1751 if $ac_init_version; then
1752   cat <<\_ACEOF
1753 unbound configure 1.11.0
1754 generated by GNU Autoconf 2.69
1755
1756 Copyright (C) 2012 Free Software Foundation, Inc.
1757 This configure script is free software; the Free Software Foundation
1758 gives unlimited permission to copy, distribute and modify it.
1759 _ACEOF
1760   exit
1761 fi
1762
1763 ## ------------------------ ##
1764 ## Autoconf initialization. ##
1765 ## ------------------------ ##
1766
1767 # ac_fn_c_try_compile LINENO
1768 # --------------------------
1769 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1770 ac_fn_c_try_compile ()
1771 {
1772   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1773   rm -f conftest.$ac_objext
1774   if { { ac_try="$ac_compile"
1775 case "(($ac_try" in
1776   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1777   *) ac_try_echo=$ac_try;;
1778 esac
1779 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1780 $as_echo "$ac_try_echo"; } >&5
1781   (eval "$ac_compile") 2>conftest.err
1782   ac_status=$?
1783   if test -s conftest.err; then
1784     grep -v '^ *+' conftest.err >conftest.er1
1785     cat conftest.er1 >&5
1786     mv -f conftest.er1 conftest.err
1787   fi
1788   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1789   test $ac_status = 0; } && {
1790          test -z "$ac_c_werror_flag" ||
1791          test ! -s conftest.err
1792        } && test -s conftest.$ac_objext; then :
1793   ac_retval=0
1794 else
1795   $as_echo "$as_me: failed program was:" >&5
1796 sed 's/^/| /' conftest.$ac_ext >&5
1797
1798         ac_retval=1
1799 fi
1800   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1801   as_fn_set_status $ac_retval
1802
1803 } # ac_fn_c_try_compile
1804
1805 # ac_fn_c_try_cpp LINENO
1806 # ----------------------
1807 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1808 ac_fn_c_try_cpp ()
1809 {
1810   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1811   if { { ac_try="$ac_cpp conftest.$ac_ext"
1812 case "(($ac_try" in
1813   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1814   *) ac_try_echo=$ac_try;;
1815 esac
1816 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1817 $as_echo "$ac_try_echo"; } >&5
1818   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1819   ac_status=$?
1820   if test -s conftest.err; then
1821     grep -v '^ *+' conftest.err >conftest.er1
1822     cat conftest.er1 >&5
1823     mv -f conftest.er1 conftest.err
1824   fi
1825   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1826   test $ac_status = 0; } > conftest.i && {
1827          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1828          test ! -s conftest.err
1829        }; then :
1830   ac_retval=0
1831 else
1832   $as_echo "$as_me: failed program was:" >&5
1833 sed 's/^/| /' conftest.$ac_ext >&5
1834
1835     ac_retval=1
1836 fi
1837   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1838   as_fn_set_status $ac_retval
1839
1840 } # ac_fn_c_try_cpp
1841
1842 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1843 # -------------------------------------------------------
1844 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1845 # the include files in INCLUDES and setting the cache variable VAR
1846 # accordingly.
1847 ac_fn_c_check_header_mongrel ()
1848 {
1849   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1850   if eval \${$3+:} false; then :
1851   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1852 $as_echo_n "checking for $2... " >&6; }
1853 if eval \${$3+:} false; then :
1854   $as_echo_n "(cached) " >&6
1855 fi
1856 eval ac_res=\$$3
1857                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1858 $as_echo "$ac_res" >&6; }
1859 else
1860   # Is the header compilable?
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1862 $as_echo_n "checking $2 usability... " >&6; }
1863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1864 /* end confdefs.h.  */
1865 $4
1866 #include <$2>
1867 _ACEOF
1868 if ac_fn_c_try_compile "$LINENO"; then :
1869   ac_header_compiler=yes
1870 else
1871   ac_header_compiler=no
1872 fi
1873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1875 $as_echo "$ac_header_compiler" >&6; }
1876
1877 # Is the header present?
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1879 $as_echo_n "checking $2 presence... " >&6; }
1880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1881 /* end confdefs.h.  */
1882 #include <$2>
1883 _ACEOF
1884 if ac_fn_c_try_cpp "$LINENO"; then :
1885   ac_header_preproc=yes
1886 else
1887   ac_header_preproc=no
1888 fi
1889 rm -f conftest.err conftest.i conftest.$ac_ext
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1891 $as_echo "$ac_header_preproc" >&6; }
1892
1893 # So?  What about this header?
1894 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1895   yes:no: )
1896     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1897 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1898     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1899 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1900     ;;
1901   no:yes:* )
1902     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1903 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1904     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1905 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1906     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1907 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1908     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1909 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1910     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1911 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1912 ( $as_echo "## --------------------------------------------------------------------------------------- ##
1913 ## Report this to unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues ##
1914 ## --------------------------------------------------------------------------------------- ##"
1915      ) | sed "s/^/$as_me: WARNING:     /" >&2
1916     ;;
1917 esac
1918   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1919 $as_echo_n "checking for $2... " >&6; }
1920 if eval \${$3+:} false; then :
1921   $as_echo_n "(cached) " >&6
1922 else
1923   eval "$3=\$ac_header_compiler"
1924 fi
1925 eval ac_res=\$$3
1926                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927 $as_echo "$ac_res" >&6; }
1928 fi
1929   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1930
1931 } # ac_fn_c_check_header_mongrel
1932
1933 # ac_fn_c_try_run LINENO
1934 # ----------------------
1935 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1936 # that executables *can* be run.
1937 ac_fn_c_try_run ()
1938 {
1939   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940   if { { ac_try="$ac_link"
1941 case "(($ac_try" in
1942   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1943   *) ac_try_echo=$ac_try;;
1944 esac
1945 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1946 $as_echo "$ac_try_echo"; } >&5
1947   (eval "$ac_link") 2>&5
1948   ac_status=$?
1949   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1950   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1951   { { case "(($ac_try" in
1952   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1953   *) ac_try_echo=$ac_try;;
1954 esac
1955 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1956 $as_echo "$ac_try_echo"; } >&5
1957   (eval "$ac_try") 2>&5
1958   ac_status=$?
1959   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1960   test $ac_status = 0; }; }; then :
1961   ac_retval=0
1962 else
1963   $as_echo "$as_me: program exited with status $ac_status" >&5
1964        $as_echo "$as_me: failed program was:" >&5
1965 sed 's/^/| /' conftest.$ac_ext >&5
1966
1967        ac_retval=$ac_status
1968 fi
1969   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1970   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1971   as_fn_set_status $ac_retval
1972
1973 } # ac_fn_c_try_run
1974
1975 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1976 # -------------------------------------------------------
1977 # Tests whether HEADER exists and can be compiled using the include files in
1978 # INCLUDES, setting the cache variable VAR accordingly.
1979 ac_fn_c_check_header_compile ()
1980 {
1981   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1982   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1983 $as_echo_n "checking for $2... " >&6; }
1984 if eval \${$3+:} false; then :
1985   $as_echo_n "(cached) " >&6
1986 else
1987   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988 /* end confdefs.h.  */
1989 $4
1990 #include <$2>
1991 _ACEOF
1992 if ac_fn_c_try_compile "$LINENO"; then :
1993   eval "$3=yes"
1994 else
1995   eval "$3=no"
1996 fi
1997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1998 fi
1999 eval ac_res=\$$3
2000                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2001 $as_echo "$ac_res" >&6; }
2002   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2003
2004 } # ac_fn_c_check_header_compile
2005
2006 # ac_fn_c_try_link LINENO
2007 # -----------------------
2008 # Try to link conftest.$ac_ext, and return whether this succeeded.
2009 ac_fn_c_try_link ()
2010 {
2011   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012   rm -f conftest.$ac_objext conftest$ac_exeext
2013   if { { ac_try="$ac_link"
2014 case "(($ac_try" in
2015   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2016   *) ac_try_echo=$ac_try;;
2017 esac
2018 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2019 $as_echo "$ac_try_echo"; } >&5
2020   (eval "$ac_link") 2>conftest.err
2021   ac_status=$?
2022   if test -s conftest.err; then
2023     grep -v '^ *+' conftest.err >conftest.er1
2024     cat conftest.er1 >&5
2025     mv -f conftest.er1 conftest.err
2026   fi
2027   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2028   test $ac_status = 0; } && {
2029          test -z "$ac_c_werror_flag" ||
2030          test ! -s conftest.err
2031        } && test -s conftest$ac_exeext && {
2032          test "$cross_compiling" = yes ||
2033          test -x conftest$ac_exeext
2034        }; then :
2035   ac_retval=0
2036 else
2037   $as_echo "$as_me: failed program was:" >&5
2038 sed 's/^/| /' conftest.$ac_ext >&5
2039
2040         ac_retval=1
2041 fi
2042   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2043   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2044   # interfere with the next link command; also delete a directory that is
2045   # left behind by Apple's compiler.  We do this before executing the actions.
2046   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2047   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2048   as_fn_set_status $ac_retval
2049
2050 } # ac_fn_c_try_link
2051
2052 # ac_fn_c_check_func LINENO FUNC VAR
2053 # ----------------------------------
2054 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2055 ac_fn_c_check_func ()
2056 {
2057   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2058   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2059 $as_echo_n "checking for $2... " >&6; }
2060 if eval \${$3+:} false; then :
2061   $as_echo_n "(cached) " >&6
2062 else
2063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2064 /* end confdefs.h.  */
2065 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2066    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2067 #define $2 innocuous_$2
2068
2069 /* System header to define __stub macros and hopefully few prototypes,
2070     which can conflict with char $2 (); below.
2071     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2072     <limits.h> exists even on freestanding compilers.  */
2073
2074 #ifdef __STDC__
2075 # include <limits.h>
2076 #else
2077 # include <assert.h>
2078 #endif
2079
2080 #undef $2
2081
2082 /* Override any GCC internal prototype to avoid an error.
2083    Use char because int might match the return type of a GCC
2084    builtin and then its argument prototype would still apply.  */
2085 #ifdef __cplusplus
2086 extern "C"
2087 #endif
2088 char $2 ();
2089 /* The GNU C library defines this for functions which it implements
2090     to always fail with ENOSYS.  Some functions are actually named
2091     something starting with __ and the normal name is an alias.  */
2092 #if defined __stub_$2 || defined __stub___$2
2093 choke me
2094 #endif
2095
2096 int
2097 main ()
2098 {
2099 return $2 ();
2100   ;
2101   return 0;
2102 }
2103 _ACEOF
2104 if ac_fn_c_try_link "$LINENO"; then :
2105   eval "$3=yes"
2106 else
2107   eval "$3=no"
2108 fi
2109 rm -f core conftest.err conftest.$ac_objext \
2110     conftest$ac_exeext conftest.$ac_ext
2111 fi
2112 eval ac_res=\$$3
2113                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2114 $as_echo "$ac_res" >&6; }
2115   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2116
2117 } # ac_fn_c_check_func
2118
2119 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2120 # -------------------------------------------
2121 # Tests whether TYPE exists after having included INCLUDES, setting cache
2122 # variable VAR accordingly.
2123 ac_fn_c_check_type ()
2124 {
2125   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2126   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2127 $as_echo_n "checking for $2... " >&6; }
2128 if eval \${$3+:} false; then :
2129   $as_echo_n "(cached) " >&6
2130 else
2131   eval "$3=no"
2132   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2133 /* end confdefs.h.  */
2134 $4
2135 int
2136 main ()
2137 {
2138 if (sizeof ($2))
2139          return 0;
2140   ;
2141   return 0;
2142 }
2143 _ACEOF
2144 if ac_fn_c_try_compile "$LINENO"; then :
2145   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2146 /* end confdefs.h.  */
2147 $4
2148 int
2149 main ()
2150 {
2151 if (sizeof (($2)))
2152             return 0;
2153   ;
2154   return 0;
2155 }
2156 _ACEOF
2157 if ac_fn_c_try_compile "$LINENO"; then :
2158
2159 else
2160   eval "$3=yes"
2161 fi
2162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2163 fi
2164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2165 fi
2166 eval ac_res=\$$3
2167                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2168 $as_echo "$ac_res" >&6; }
2169   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2170
2171 } # ac_fn_c_check_type
2172
2173 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2174 # --------------------------------------------
2175 # Tries to find the compile-time value of EXPR in a program that includes
2176 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2177 # computed
2178 ac_fn_c_compute_int ()
2179 {
2180   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2181   if test "$cross_compiling" = yes; then
2182     # Depending upon the size, compute the lo and hi bounds.
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184 /* end confdefs.h.  */
2185 $4
2186 int
2187 main ()
2188 {
2189 static int test_array [1 - 2 * !(($2) >= 0)];
2190 test_array [0] = 0;
2191 return test_array [0];
2192
2193   ;
2194   return 0;
2195 }
2196 _ACEOF
2197 if ac_fn_c_try_compile "$LINENO"; then :
2198   ac_lo=0 ac_mid=0
2199   while :; do
2200     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2201 /* end confdefs.h.  */
2202 $4
2203 int
2204 main ()
2205 {
2206 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2207 test_array [0] = 0;
2208 return test_array [0];
2209
2210   ;
2211   return 0;
2212 }
2213 _ACEOF
2214 if ac_fn_c_try_compile "$LINENO"; then :
2215   ac_hi=$ac_mid; break
2216 else
2217   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2218                         if test $ac_lo -le $ac_mid; then
2219                           ac_lo= ac_hi=
2220                           break
2221                         fi
2222                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2223 fi
2224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2225   done
2226 else
2227   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2228 /* end confdefs.h.  */
2229 $4
2230 int
2231 main ()
2232 {
2233 static int test_array [1 - 2 * !(($2) < 0)];
2234 test_array [0] = 0;
2235 return test_array [0];
2236
2237   ;
2238   return 0;
2239 }
2240 _ACEOF
2241 if ac_fn_c_try_compile "$LINENO"; then :
2242   ac_hi=-1 ac_mid=-1
2243   while :; do
2244     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245 /* end confdefs.h.  */
2246 $4
2247 int
2248 main ()
2249 {
2250 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2251 test_array [0] = 0;
2252 return test_array [0];
2253
2254   ;
2255   return 0;
2256 }
2257 _ACEOF
2258 if ac_fn_c_try_compile "$LINENO"; then :
2259   ac_lo=$ac_mid; break
2260 else
2261   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2262                         if test $ac_mid -le $ac_hi; then
2263                           ac_lo= ac_hi=
2264                           break
2265                         fi
2266                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2267 fi
2268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2269   done
2270 else
2271   ac_lo= ac_hi=
2272 fi
2273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2274 fi
2275 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2276 # Binary search between lo and hi bounds.
2277 while test "x$ac_lo" != "x$ac_hi"; do
2278   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2279   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280 /* end confdefs.h.  */
2281 $4
2282 int
2283 main ()
2284 {
2285 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2286 test_array [0] = 0;
2287 return test_array [0];
2288
2289   ;
2290   return 0;
2291 }
2292 _ACEOF
2293 if ac_fn_c_try_compile "$LINENO"; then :
2294   ac_hi=$ac_mid
2295 else
2296   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2297 fi
2298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2299 done
2300 case $ac_lo in #((
2301 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2302 '') ac_retval=1 ;;
2303 esac
2304   else
2305     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2306 /* end confdefs.h.  */
2307 $4
2308 static long int longval () { return $2; }
2309 static unsigned long int ulongval () { return $2; }
2310 #include <stdio.h>
2311 #include <stdlib.h>
2312 int
2313 main ()
2314 {
2315
2316   FILE *f = fopen ("conftest.val", "w");
2317   if (! f)
2318     return 1;
2319   if (($2) < 0)
2320     {
2321       long int i = longval ();
2322       if (i != ($2))
2323         return 1;
2324       fprintf (f, "%ld", i);
2325     }
2326   else
2327     {
2328       unsigned long int i = ulongval ();
2329       if (i != ($2))
2330         return 1;
2331       fprintf (f, "%lu", i);
2332     }
2333   /* Do not output a trailing newline, as this causes \r\n confusion
2334      on some platforms.  */
2335   return ferror (f) || fclose (f) != 0;
2336
2337   ;
2338   return 0;
2339 }
2340 _ACEOF
2341 if ac_fn_c_try_run "$LINENO"; then :
2342   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2343 else
2344   ac_retval=1
2345 fi
2346 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2347   conftest.$ac_objext conftest.beam conftest.$ac_ext
2348 rm -f conftest.val
2349
2350   fi
2351   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2352   as_fn_set_status $ac_retval
2353
2354 } # ac_fn_c_compute_int
2355
2356 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2357 # ---------------------------------------------
2358 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2359 # accordingly.
2360 ac_fn_c_check_decl ()
2361 {
2362   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2363   as_decl_name=`echo $2|sed 's/ *(.*//'`
2364   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2365   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2366 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2367 if eval \${$3+:} false; then :
2368   $as_echo_n "(cached) " >&6
2369 else
2370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2371 /* end confdefs.h.  */
2372 $4
2373 int
2374 main ()
2375 {
2376 #ifndef $as_decl_name
2377 #ifdef __cplusplus
2378   (void) $as_decl_use;
2379 #else
2380   (void) $as_decl_name;
2381 #endif
2382 #endif
2383
2384   ;
2385   return 0;
2386 }
2387 _ACEOF
2388 if ac_fn_c_try_compile "$LINENO"; then :
2389   eval "$3=yes"
2390 else
2391   eval "$3=no"
2392 fi
2393 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394 fi
2395 eval ac_res=\$$3
2396                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2397 $as_echo "$ac_res" >&6; }
2398   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2399
2400 } # ac_fn_c_check_decl
2401
2402 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2403 # ----------------------------------------------------
2404 # Tries to find if the field MEMBER exists in type AGGR, after including
2405 # INCLUDES, setting cache variable VAR accordingly.
2406 ac_fn_c_check_member ()
2407 {
2408   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2409   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2410 $as_echo_n "checking for $2.$3... " >&6; }
2411 if eval \${$4+:} false; then :
2412   $as_echo_n "(cached) " >&6
2413 else
2414   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2415 /* end confdefs.h.  */
2416 $5
2417 int
2418 main ()
2419 {
2420 static $2 ac_aggr;
2421 if (ac_aggr.$3)
2422 return 0;
2423   ;
2424   return 0;
2425 }
2426 _ACEOF
2427 if ac_fn_c_try_compile "$LINENO"; then :
2428   eval "$4=yes"
2429 else
2430   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2431 /* end confdefs.h.  */
2432 $5
2433 int
2434 main ()
2435 {
2436 static $2 ac_aggr;
2437 if (sizeof ac_aggr.$3)
2438 return 0;
2439   ;
2440   return 0;
2441 }
2442 _ACEOF
2443 if ac_fn_c_try_compile "$LINENO"; then :
2444   eval "$4=yes"
2445 else
2446   eval "$4=no"
2447 fi
2448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2449 fi
2450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2451 fi
2452 eval ac_res=\$$4
2453                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2454 $as_echo "$ac_res" >&6; }
2455   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2456
2457 } # ac_fn_c_check_member
2458 cat >config.log <<_ACEOF
2459 This file contains any messages produced by compilers while
2460 running configure, to aid debugging if configure makes a mistake.
2461
2462 It was created by unbound $as_me 1.11.0, which was
2463 generated by GNU Autoconf 2.69.  Invocation command line was
2464
2465   $ $0 $@
2466
2467 _ACEOF
2468 exec 5>>config.log
2469 {
2470 cat <<_ASUNAME
2471 ## --------- ##
2472 ## Platform. ##
2473 ## --------- ##
2474
2475 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2476 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2477 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2478 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2479 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2480
2481 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2482 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2483
2484 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2485 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2486 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2487 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2488 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2489 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2490 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2491
2492 _ASUNAME
2493
2494 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2495 for as_dir in $PATH
2496 do
2497   IFS=$as_save_IFS
2498   test -z "$as_dir" && as_dir=.
2499     $as_echo "PATH: $as_dir"
2500   done
2501 IFS=$as_save_IFS
2502
2503 } >&5
2504
2505 cat >&5 <<_ACEOF
2506
2507
2508 ## ----------- ##
2509 ## Core tests. ##
2510 ## ----------- ##
2511
2512 _ACEOF
2513
2514
2515 # Keep a trace of the command line.
2516 # Strip out --no-create and --no-recursion so they do not pile up.
2517 # Strip out --silent because we don't want to record it for future runs.
2518 # Also quote any args containing shell meta-characters.
2519 # Make two passes to allow for proper duplicate-argument suppression.
2520 ac_configure_args=
2521 ac_configure_args0=
2522 ac_configure_args1=
2523 ac_must_keep_next=false
2524 for ac_pass in 1 2
2525 do
2526   for ac_arg
2527   do
2528     case $ac_arg in
2529     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2530     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2531     | -silent | --silent | --silen | --sile | --sil)
2532       continue ;;
2533     *\'*)
2534       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2535     esac
2536     case $ac_pass in
2537     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2538     2)
2539       as_fn_append ac_configure_args1 " '$ac_arg'"
2540       if test $ac_must_keep_next = true; then
2541         ac_must_keep_next=false # Got value, back to normal.
2542       else
2543         case $ac_arg in
2544           *=* | --config-cache | -C | -disable-* | --disable-* \
2545           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2546           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2547           | -with-* | --with-* | -without-* | --without-* | --x)
2548             case "$ac_configure_args0 " in
2549               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2550             esac
2551             ;;
2552           -* ) ac_must_keep_next=true ;;
2553         esac
2554       fi
2555       as_fn_append ac_configure_args " '$ac_arg'"
2556       ;;
2557     esac
2558   done
2559 done
2560 { ac_configure_args0=; unset ac_configure_args0;}
2561 { ac_configure_args1=; unset ac_configure_args1;}
2562
2563 # When interrupted or exit'd, cleanup temporary files, and complete
2564 # config.log.  We remove comments because anyway the quotes in there
2565 # would cause problems or look ugly.
2566 # WARNING: Use '\'' to represent an apostrophe within the trap.
2567 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2568 trap 'exit_status=$?
2569   # Save into config.log some information that might help in debugging.
2570   {
2571     echo
2572
2573     $as_echo "## ---------------- ##
2574 ## Cache variables. ##
2575 ## ---------------- ##"
2576     echo
2577     # The following way of writing the cache mishandles newlines in values,
2578 (
2579   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2580     eval ac_val=\$$ac_var
2581     case $ac_val in #(
2582     *${as_nl}*)
2583       case $ac_var in #(
2584       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2585 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2586       esac
2587       case $ac_var in #(
2588       _ | IFS | as_nl) ;; #(
2589       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2590       *) { eval $ac_var=; unset $ac_var;} ;;
2591       esac ;;
2592     esac
2593   done
2594   (set) 2>&1 |
2595     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2596     *${as_nl}ac_space=\ *)
2597       sed -n \
2598         "s/'\''/'\''\\\\'\'''\''/g;
2599           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2600       ;; #(
2601     *)
2602       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2603       ;;
2604     esac |
2605     sort
2606 )
2607     echo
2608
2609     $as_echo "## ----------------- ##
2610 ## Output variables. ##
2611 ## ----------------- ##"
2612     echo
2613     for ac_var in $ac_subst_vars
2614     do
2615       eval ac_val=\$$ac_var
2616       case $ac_val in
2617       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2618       esac
2619       $as_echo "$ac_var='\''$ac_val'\''"
2620     done | sort
2621     echo
2622
2623     if test -n "$ac_subst_files"; then
2624       $as_echo "## ------------------- ##
2625 ## File substitutions. ##
2626 ## ------------------- ##"
2627       echo
2628       for ac_var in $ac_subst_files
2629       do
2630         eval ac_val=\$$ac_var
2631         case $ac_val in
2632         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2633         esac
2634         $as_echo "$ac_var='\''$ac_val'\''"
2635       done | sort
2636       echo
2637     fi
2638
2639     if test -s confdefs.h; then
2640       $as_echo "## ----------- ##
2641 ## confdefs.h. ##
2642 ## ----------- ##"
2643       echo
2644       cat confdefs.h
2645       echo
2646     fi
2647     test "$ac_signal" != 0 &&
2648       $as_echo "$as_me: caught signal $ac_signal"
2649     $as_echo "$as_me: exit $exit_status"
2650   } >&5
2651   rm -f core *.core core.conftest.* &&
2652     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2653     exit $exit_status
2654 ' 0
2655 for ac_signal in 1 2 13 15; do
2656   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2657 done
2658 ac_signal=0
2659
2660 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2661 rm -f -r conftest* confdefs.h
2662
2663 $as_echo "/* confdefs.h */" > confdefs.h
2664
2665 # Predefined preprocessor variables.
2666
2667 cat >>confdefs.h <<_ACEOF
2668 #define PACKAGE_NAME "$PACKAGE_NAME"
2669 _ACEOF
2670
2671 cat >>confdefs.h <<_ACEOF
2672 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2673 _ACEOF
2674
2675 cat >>confdefs.h <<_ACEOF
2676 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2677 _ACEOF
2678
2679 cat >>confdefs.h <<_ACEOF
2680 #define PACKAGE_STRING "$PACKAGE_STRING"
2681 _ACEOF
2682
2683 cat >>confdefs.h <<_ACEOF
2684 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2685 _ACEOF
2686
2687 cat >>confdefs.h <<_ACEOF
2688 #define PACKAGE_URL "$PACKAGE_URL"
2689 _ACEOF
2690
2691
2692 # Let the site file select an alternate cache file if it wants to.
2693 # Prefer an explicitly selected file to automatically selected ones.
2694 ac_site_file1=NONE
2695 ac_site_file2=NONE
2696 if test -n "$CONFIG_SITE"; then
2697   # We do not want a PATH search for config.site.
2698   case $CONFIG_SITE in #((
2699     -*)  ac_site_file1=./$CONFIG_SITE;;
2700     */*) ac_site_file1=$CONFIG_SITE;;
2701     *)   ac_site_file1=./$CONFIG_SITE;;
2702   esac
2703 elif test "x$prefix" != xNONE; then
2704   ac_site_file1=$prefix/share/config.site
2705   ac_site_file2=$prefix/etc/config.site
2706 else
2707   ac_site_file1=$ac_default_prefix/share/config.site
2708   ac_site_file2=$ac_default_prefix/etc/config.site
2709 fi
2710 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2711 do
2712   test "x$ac_site_file" = xNONE && continue
2713   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2714     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2715 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2716     sed 's/^/| /' "$ac_site_file" >&5
2717     . "$ac_site_file" \
2718       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2719 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2720 as_fn_error $? "failed to load site script $ac_site_file
2721 See \`config.log' for more details" "$LINENO" 5; }
2722   fi
2723 done
2724
2725 if test -r "$cache_file"; then
2726   # Some versions of bash will fail to source /dev/null (special files
2727   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2728   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2729     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2730 $as_echo "$as_me: loading cache $cache_file" >&6;}
2731     case $cache_file in
2732       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2733       *)                      . "./$cache_file";;
2734     esac
2735   fi
2736 else
2737   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2738 $as_echo "$as_me: creating cache $cache_file" >&6;}
2739   >$cache_file
2740 fi
2741
2742 # Check that the precious variables saved in the cache have kept the same
2743 # value.
2744 ac_cache_corrupted=false
2745 for ac_var in $ac_precious_vars; do
2746   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2747   eval ac_new_set=\$ac_env_${ac_var}_set
2748   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2749   eval ac_new_val=\$ac_env_${ac_var}_value
2750   case $ac_old_set,$ac_new_set in
2751     set,)
2752       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2753 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2754       ac_cache_corrupted=: ;;
2755     ,set)
2756       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2757 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2758       ac_cache_corrupted=: ;;
2759     ,);;
2760     *)
2761       if test "x$ac_old_val" != "x$ac_new_val"; then
2762         # differences in whitespace do not lead to failure.
2763         ac_old_val_w=`echo x $ac_old_val`
2764         ac_new_val_w=`echo x $ac_new_val`
2765         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2766           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2767 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2768           ac_cache_corrupted=:
2769         else
2770           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2771 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2772           eval $ac_var=\$ac_old_val
2773         fi
2774         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2775 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2776         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2777 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2778       fi;;
2779   esac
2780   # Pass precious variables to config.status.
2781   if test "$ac_new_set" = set; then
2782     case $ac_new_val in
2783     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2784     *) ac_arg=$ac_var=$ac_new_val ;;
2785     esac
2786     case " $ac_configure_args " in
2787       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2788       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2789     esac
2790   fi
2791 done
2792 if $ac_cache_corrupted; then
2793   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2794 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2795   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2796 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2797   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2798 fi
2799 ## -------------------- ##
2800 ## Main body of script. ##
2801 ## -------------------- ##
2802
2803 ac_ext=c
2804 ac_cpp='$CPP $CPPFLAGS'
2805 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2806 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2807 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2808
2809
2810 UNBOUND_VERSION_MAJOR=1
2811
2812 UNBOUND_VERSION_MINOR=11
2813
2814 UNBOUND_VERSION_MICRO=0
2815
2816
2817 LIBUNBOUND_CURRENT=9
2818 LIBUNBOUND_REVISION=9
2819 LIBUNBOUND_AGE=1
2820 # 1.0.0 had 0:12:0
2821 # 1.0.1 had 0:13:0
2822 # 1.0.2 had 0:14:0
2823 # 1.1.0 had 0:15:0
2824 # 1.1.1 had 0:16:0
2825 # 1.2.0 had 0:17:0
2826 # 1.2.1 had 0:18:0
2827 # 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
2828 # 1.3.1 had 1:1:0
2829 # 1.3.2 had 1:2:0
2830 # 1.3.3 had 1:3:0
2831 # 1.3.4 had 1:4:0
2832 # 1.4.0-snapshots had 1:5:0
2833 # 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
2834 # 1.4.1 had 2:1:0
2835 # 1.4.2 had 2:2:0
2836 # 1.4.3 had 2:3:0
2837 # 1.4.4 had 2:4:0
2838 # 1.4.5 had 2:5:0
2839 # 1.4.6 had 2:6:0
2840 # 1.4.7 had 2:7:0
2841 # 1.4.8 had 2:8:0
2842 # 1.4.9 had 2:9:0
2843 # 1.4.10 had 2:10:0
2844 # 1.4.11 had 2:11:0
2845 # 1.4.12 had 2:12:0
2846 # 1.4.13 had 2:13:0
2847 # and 1.4.13p1 and 1.4.13.p2
2848 # 1.4.14 had 2:14:0
2849 # 1.4.15 had 3:0:1 # adds ub_version()
2850 # 1.4.16 had 3:1:1
2851 # 1.4.17 had 3:2:1
2852 # 1.4.18 had 3:3:1
2853 # 1.4.19 had 3:4:1
2854 # 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
2855 # 1.4.21 had 4:1:2
2856 # 1.4.22 had 4:1:2
2857 # 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2858 # 1.5.1 had 5:3:3
2859 # 1.5.2 had 5:5:3
2860 # 1.5.3 had 5:6:3
2861 # 1.5.4 had 5:7:3
2862 # 1.5.5 had 5:8:3
2863 # 1.5.6 had 5:9:3
2864 # 1.5.7 had 5:10:3
2865 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
2866 # 1.5.9 had 6:1:4
2867 # 1.5.10 had 6:2:4
2868 # 1.6.0 had 6:3:4
2869 # 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
2870 # 1.6.2 had 7:1:5
2871 # 1.6.3 had 7:2:5
2872 # 1.6.4 had 7:3:5
2873 # 1.6.5 had 7:4:5
2874 # 1.6.6 had 7:5:5
2875 # 1.6.7 had 7:6:5
2876 # 1.6.8 had 7:7:5
2877 # 1.7.0 had 7:8:5
2878 # 1.7.1 had 7:9:5
2879 # 1.7.2 had 7:10:5
2880 # 1.7.3 had 7:11:5
2881 # 1.8.0 had 8:0:0 # changes the event callback function signature
2882 # 1.8.1 had 8:1:0
2883 # 1.8.2 had 8:2:0
2884 # 1.8.3 had 8:3:0
2885 # 1.9.0 had 9:0:1 # add ub_ctx_set_tls
2886 # 1.9.1 had 9:1:1
2887 # 1.9.2 had 9:2:1
2888 # 1.9.3 had 9:3:1
2889 # 1.9.4 had 9:4:1
2890 # 1.9.5 had 9:5:1
2891 # 1.9.6 had 9:6:1
2892 # 1.10.0 had 9:7:1
2893 # 1.10.1 had 9:8:1
2894 # 1.11.0 had 9:9:1
2895
2896 #   Current  -- the number of the binary API that we're implementing
2897 #   Revision -- which iteration of the implementation of the binary
2898 #               API are we supplying?
2899 #   Age      -- How many previous binary API versions do we also
2900 #               support?
2901 #
2902 # If we release a new version that does not change the binary API,
2903 # increment Revision.
2904 #
2905 # If we release a new version that changes the binary API, but does
2906 # not break programs compiled against the old binary API, increment
2907 # Current and Age.  Set Revision to 0, since this is the first
2908 # implementation of the new API.
2909 #
2910 # Otherwise, we're changing the binary API and breaking backward
2911 # compatibility with old binaries.  Increment Current.  Set Age to 0,
2912 # since we're backward compatible with no previous APIs.  Set Revision
2913 # to 0 too.
2914
2915
2916
2917
2918
2919 cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`"
2920
2921 cat >>confdefs.h <<_ACEOF
2922 #define CONFCMDLINE "$cmdln"
2923 _ACEOF
2924
2925
2926 CFLAGS="$CFLAGS"
2927 ac_ext=c
2928 ac_cpp='$CPP $CPPFLAGS'
2929 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2930 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2931 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2932 if test -n "$ac_tool_prefix"; then
2933   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2934 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2936 $as_echo_n "checking for $ac_word... " >&6; }
2937 if ${ac_cv_prog_CC+:} false; then :
2938   $as_echo_n "(cached) " >&6
2939 else
2940   if test -n "$CC"; then
2941   ac_cv_prog_CC="$CC" # Let the user override the test.
2942 else
2943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2944 for as_dir in $PATH
2945 do
2946   IFS=$as_save_IFS
2947   test -z "$as_dir" && as_dir=.
2948     for ac_exec_ext in '' $ac_executable_extensions; do
2949   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2950     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2951     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2952     break 2
2953   fi
2954 done
2955   done
2956 IFS=$as_save_IFS
2957
2958 fi
2959 fi
2960 CC=$ac_cv_prog_CC
2961 if test -n "$CC"; then
2962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2963 $as_echo "$CC" >&6; }
2964 else
2965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2966 $as_echo "no" >&6; }
2967 fi
2968
2969
2970 fi
2971 if test -z "$ac_cv_prog_CC"; then
2972   ac_ct_CC=$CC
2973   # Extract the first word of "gcc", so it can be a program name with args.
2974 set dummy gcc; ac_word=$2
2975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2976 $as_echo_n "checking for $ac_word... " >&6; }
2977 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2978   $as_echo_n "(cached) " >&6
2979 else
2980   if test -n "$ac_ct_CC"; then
2981   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2982 else
2983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2984 for as_dir in $PATH
2985 do
2986   IFS=$as_save_IFS
2987   test -z "$as_dir" && as_dir=.
2988     for ac_exec_ext in '' $ac_executable_extensions; do
2989   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2990     ac_cv_prog_ac_ct_CC="gcc"
2991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2992     break 2
2993   fi
2994 done
2995   done
2996 IFS=$as_save_IFS
2997
2998 fi
2999 fi
3000 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3001 if test -n "$ac_ct_CC"; then
3002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3003 $as_echo "$ac_ct_CC" >&6; }
3004 else
3005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3006 $as_echo "no" >&6; }
3007 fi
3008
3009   if test "x$ac_ct_CC" = x; then
3010     CC=""
3011   else
3012     case $cross_compiling:$ac_tool_warned in
3013 yes:)
3014 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3015 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3016 ac_tool_warned=yes ;;
3017 esac
3018     CC=$ac_ct_CC
3019   fi
3020 else
3021   CC="$ac_cv_prog_CC"
3022 fi
3023
3024 if test -z "$CC"; then
3025           if test -n "$ac_tool_prefix"; then
3026     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3027 set dummy ${ac_tool_prefix}cc; ac_word=$2
3028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3029 $as_echo_n "checking for $ac_word... " >&6; }
3030 if ${ac_cv_prog_CC+:} false; then :
3031   $as_echo_n "(cached) " >&6
3032 else
3033   if test -n "$CC"; then
3034   ac_cv_prog_CC="$CC" # Let the user override the test.
3035 else
3036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3037 for as_dir in $PATH
3038 do
3039   IFS=$as_save_IFS
3040   test -z "$as_dir" && as_dir=.
3041     for ac_exec_ext in '' $ac_executable_extensions; do
3042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3043     ac_cv_prog_CC="${ac_tool_prefix}cc"
3044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3045     break 2
3046   fi
3047 done
3048   done
3049 IFS=$as_save_IFS
3050
3051 fi
3052 fi
3053 CC=$ac_cv_prog_CC
3054 if test -n "$CC"; then
3055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3056 $as_echo "$CC" >&6; }
3057 else
3058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3059 $as_echo "no" >&6; }
3060 fi
3061
3062
3063   fi
3064 fi
3065 if test -z "$CC"; then
3066   # Extract the first word of "cc", so it can be a program name with args.
3067 set dummy cc; ac_word=$2
3068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3069 $as_echo_n "checking for $ac_word... " >&6; }
3070 if ${ac_cv_prog_CC+:} false; then :
3071   $as_echo_n "(cached) " >&6
3072 else
3073   if test -n "$CC"; then
3074   ac_cv_prog_CC="$CC" # Let the user override the test.
3075 else
3076   ac_prog_rejected=no
3077 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3078 for as_dir in $PATH
3079 do
3080   IFS=$as_save_IFS
3081   test -z "$as_dir" && as_dir=.
3082     for ac_exec_ext in '' $ac_executable_extensions; do
3083   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3084     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3085        ac_prog_rejected=yes
3086        continue
3087      fi
3088     ac_cv_prog_CC="cc"
3089     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3090     break 2
3091   fi
3092 done
3093   done
3094 IFS=$as_save_IFS
3095
3096 if test $ac_prog_rejected = yes; then
3097   # We found a bogon in the path, so make sure we never use it.
3098   set dummy $ac_cv_prog_CC
3099   shift
3100   if test $# != 0; then
3101     # We chose a different compiler from the bogus one.
3102     # However, it has the same basename, so the bogon will be chosen
3103     # first if we set CC to just the basename; use the full file name.
3104     shift
3105     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3106   fi
3107 fi
3108 fi
3109 fi
3110 CC=$ac_cv_prog_CC
3111 if test -n "$CC"; then
3112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3113 $as_echo "$CC" >&6; }
3114 else
3115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3116 $as_echo "no" >&6; }
3117 fi
3118
3119
3120 fi
3121 if test -z "$CC"; then
3122   if test -n "$ac_tool_prefix"; then
3123   for ac_prog in cl.exe
3124   do
3125     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3126 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3128 $as_echo_n "checking for $ac_word... " >&6; }
3129 if ${ac_cv_prog_CC+:} false; then :
3130   $as_echo_n "(cached) " >&6
3131 else
3132   if test -n "$CC"; then
3133   ac_cv_prog_CC="$CC" # Let the user override the test.
3134 else
3135 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3136 for as_dir in $PATH
3137 do
3138   IFS=$as_save_IFS
3139   test -z "$as_dir" && as_dir=.
3140     for ac_exec_ext in '' $ac_executable_extensions; do
3141   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3142     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3143     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3144     break 2
3145   fi
3146 done
3147   done
3148 IFS=$as_save_IFS
3149
3150 fi
3151 fi
3152 CC=$ac_cv_prog_CC
3153 if test -n "$CC"; then
3154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3155 $as_echo "$CC" >&6; }
3156 else
3157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3158 $as_echo "no" >&6; }
3159 fi
3160
3161
3162     test -n "$CC" && break
3163   done
3164 fi
3165 if test -z "$CC"; then
3166   ac_ct_CC=$CC
3167   for ac_prog in cl.exe
3168 do
3169   # Extract the first word of "$ac_prog", so it can be a program name with args.
3170 set dummy $ac_prog; ac_word=$2
3171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3172 $as_echo_n "checking for $ac_word... " >&6; }
3173 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3174   $as_echo_n "(cached) " >&6
3175 else
3176   if test -n "$ac_ct_CC"; then
3177   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3178 else
3179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3180 for as_dir in $PATH
3181 do
3182   IFS=$as_save_IFS
3183   test -z "$as_dir" && as_dir=.
3184     for ac_exec_ext in '' $ac_executable_extensions; do
3185   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3186     ac_cv_prog_ac_ct_CC="$ac_prog"
3187     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3188     break 2
3189   fi
3190 done
3191   done
3192 IFS=$as_save_IFS
3193
3194 fi
3195 fi
3196 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3197 if test -n "$ac_ct_CC"; then
3198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3199 $as_echo "$ac_ct_CC" >&6; }
3200 else
3201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3202 $as_echo "no" >&6; }
3203 fi
3204
3205
3206   test -n "$ac_ct_CC" && break
3207 done
3208
3209   if test "x$ac_ct_CC" = x; then
3210     CC=""
3211   else
3212     case $cross_compiling:$ac_tool_warned in
3213 yes:)
3214 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3215 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3216 ac_tool_warned=yes ;;
3217 esac
3218     CC=$ac_ct_CC
3219   fi
3220 fi
3221
3222 fi
3223
3224
3225 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3226 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3227 as_fn_error $? "no acceptable C compiler found in \$PATH
3228 See \`config.log' for more details" "$LINENO" 5; }
3229
3230 # Provide some information about the compiler.
3231 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3232 set X $ac_compile
3233 ac_compiler=$2
3234 for ac_option in --version -v -V -qversion; do
3235   { { ac_try="$ac_compiler $ac_option >&5"
3236 case "(($ac_try" in
3237   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3238   *) ac_try_echo=$ac_try;;
3239 esac
3240 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3241 $as_echo "$ac_try_echo"; } >&5
3242   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3243   ac_status=$?
3244   if test -s conftest.err; then
3245     sed '10a\
3246 ... rest of stderr output deleted ...
3247          10q' conftest.err >conftest.er1
3248     cat conftest.er1 >&5
3249   fi
3250   rm -f conftest.er1 conftest.err
3251   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3252   test $ac_status = 0; }
3253 done
3254
3255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3256 /* end confdefs.h.  */
3257
3258 int
3259 main ()
3260 {
3261
3262   ;
3263   return 0;
3264 }
3265 _ACEOF
3266 ac_clean_files_save=$ac_clean_files
3267 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3268 # Try to create an executable without -o first, disregard a.out.
3269 # It will help us diagnose broken compilers, and finding out an intuition
3270 # of exeext.
3271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3272 $as_echo_n "checking whether the C compiler works... " >&6; }
3273 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3274
3275 # The possible output files:
3276 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3277
3278 ac_rmfiles=
3279 for ac_file in $ac_files
3280 do
3281   case $ac_file in
3282     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3283     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3284   esac
3285 done
3286 rm -f $ac_rmfiles
3287
3288 if { { ac_try="$ac_link_default"
3289 case "(($ac_try" in
3290   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3291   *) ac_try_echo=$ac_try;;
3292 esac
3293 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3294 $as_echo "$ac_try_echo"; } >&5
3295   (eval "$ac_link_default") 2>&5
3296   ac_status=$?
3297   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3298   test $ac_status = 0; }; then :
3299   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3300 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3301 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3302 # so that the user can short-circuit this test for compilers unknown to
3303 # Autoconf.
3304 for ac_file in $ac_files ''
3305 do
3306   test -f "$ac_file" || continue
3307   case $ac_file in
3308     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3309         ;;
3310     [ab].out )
3311         # We found the default executable, but exeext='' is most
3312         # certainly right.
3313         break;;
3314     *.* )
3315         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3316         then :; else
3317            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3318         fi
3319         # We set ac_cv_exeext here because the later test for it is not
3320         # safe: cross compilers may not add the suffix if given an `-o'
3321         # argument, so we may need to know it at that point already.
3322         # Even if this section looks crufty: it has the advantage of
3323         # actually working.
3324         break;;
3325     * )
3326         break;;
3327   esac
3328 done
3329 test "$ac_cv_exeext" = no && ac_cv_exeext=
3330
3331 else
3332   ac_file=''
3333 fi
3334 if test -z "$ac_file"; then :
3335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3336 $as_echo "no" >&6; }
3337 $as_echo "$as_me: failed program was:" >&5
3338 sed 's/^/| /' conftest.$ac_ext >&5
3339
3340 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3341 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3342 as_fn_error 77 "C compiler cannot create executables
3343 See \`config.log' for more details" "$LINENO" 5; }
3344 else
3345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3346 $as_echo "yes" >&6; }
3347 fi
3348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3349 $as_echo_n "checking for C compiler default output file name... " >&6; }
3350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3351 $as_echo "$ac_file" >&6; }
3352 ac_exeext=$ac_cv_exeext
3353
3354 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3355 ac_clean_files=$ac_clean_files_save
3356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3357 $as_echo_n "checking for suffix of executables... " >&6; }
3358 if { { ac_try="$ac_link"
3359 case "(($ac_try" in
3360   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3361   *) ac_try_echo=$ac_try;;
3362 esac
3363 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3364 $as_echo "$ac_try_echo"; } >&5
3365   (eval "$ac_link") 2>&5
3366   ac_status=$?
3367   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3368   test $ac_status = 0; }; then :
3369   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3370 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3371 # work properly (i.e., refer to `conftest.exe'), while it won't with
3372 # `rm'.
3373 for ac_file in conftest.exe conftest conftest.*; do
3374   test -f "$ac_file" || continue
3375   case $ac_file in
3376     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3377     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3378           break;;
3379     * ) break;;
3380   esac
3381 done
3382 else
3383   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3384 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3385 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3386 See \`config.log' for more details" "$LINENO" 5; }
3387 fi
3388 rm -f conftest conftest$ac_cv_exeext
3389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3390 $as_echo "$ac_cv_exeext" >&6; }
3391
3392 rm -f conftest.$ac_ext
3393 EXEEXT=$ac_cv_exeext
3394 ac_exeext=$EXEEXT
3395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3396 /* end confdefs.h.  */
3397 #include <stdio.h>
3398 int
3399 main ()
3400 {
3401 FILE *f = fopen ("conftest.out", "w");
3402  return ferror (f) || fclose (f) != 0;
3403
3404   ;
3405   return 0;
3406 }
3407 _ACEOF
3408 ac_clean_files="$ac_clean_files conftest.out"
3409 # Check that the compiler produces executables we can run.  If not, either
3410 # the compiler is broken, or we cross compile.
3411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3412 $as_echo_n "checking whether we are cross compiling... " >&6; }
3413 if test "$cross_compiling" != yes; then
3414   { { ac_try="$ac_link"
3415 case "(($ac_try" in
3416   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3417   *) ac_try_echo=$ac_try;;
3418 esac
3419 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3420 $as_echo "$ac_try_echo"; } >&5
3421   (eval "$ac_link") 2>&5
3422   ac_status=$?
3423   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3424   test $ac_status = 0; }
3425   if { ac_try='./conftest$ac_cv_exeext'
3426   { { case "(($ac_try" in
3427   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3428   *) ac_try_echo=$ac_try;;
3429 esac
3430 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3431 $as_echo "$ac_try_echo"; } >&5
3432   (eval "$ac_try") 2>&5
3433   ac_status=$?
3434   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3435   test $ac_status = 0; }; }; then
3436     cross_compiling=no
3437   else
3438     if test "$cross_compiling" = maybe; then
3439         cross_compiling=yes
3440     else
3441         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3442 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3443 as_fn_error $? "cannot run C compiled programs.
3444 If you meant to cross compile, use \`--host'.
3445 See \`config.log' for more details" "$LINENO" 5; }
3446     fi
3447   fi
3448 fi
3449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3450 $as_echo "$cross_compiling" >&6; }
3451
3452 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3453 ac_clean_files=$ac_clean_files_save
3454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3455 $as_echo_n "checking for suffix of object files... " >&6; }
3456 if ${ac_cv_objext+:} false; then :
3457   $as_echo_n "(cached) " >&6
3458 else
3459   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3460 /* end confdefs.h.  */
3461
3462 int
3463 main ()
3464 {
3465
3466   ;
3467   return 0;
3468 }
3469 _ACEOF
3470 rm -f conftest.o conftest.obj
3471 if { { ac_try="$ac_compile"
3472 case "(($ac_try" in
3473   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3474   *) ac_try_echo=$ac_try;;
3475 esac
3476 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3477 $as_echo "$ac_try_echo"; } >&5
3478   (eval "$ac_compile") 2>&5
3479   ac_status=$?
3480   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3481   test $ac_status = 0; }; then :
3482   for ac_file in conftest.o conftest.obj conftest.*; do
3483   test -f "$ac_file" || continue;
3484   case $ac_file in
3485     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3486     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3487        break;;
3488   esac
3489 done
3490 else
3491   $as_echo "$as_me: failed program was:" >&5
3492 sed 's/^/| /' conftest.$ac_ext >&5
3493
3494 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3495 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3496 as_fn_error $? "cannot compute suffix of object files: cannot compile
3497 See \`config.log' for more details" "$LINENO" 5; }
3498 fi
3499 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3500 fi
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3502 $as_echo "$ac_cv_objext" >&6; }
3503 OBJEXT=$ac_cv_objext
3504 ac_objext=$OBJEXT
3505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3506 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3507 if ${ac_cv_c_compiler_gnu+:} false; then :
3508   $as_echo_n "(cached) " >&6
3509 else
3510   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3511 /* end confdefs.h.  */
3512
3513 int
3514 main ()
3515 {
3516 #ifndef __GNUC__
3517        choke me
3518 #endif
3519
3520   ;
3521   return 0;
3522 }
3523 _ACEOF
3524 if ac_fn_c_try_compile "$LINENO"; then :
3525   ac_compiler_gnu=yes
3526 else
3527   ac_compiler_gnu=no
3528 fi
3529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3530 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3531
3532 fi
3533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3534 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3535 if test $ac_compiler_gnu = yes; then
3536   GCC=yes
3537 else
3538   GCC=
3539 fi
3540 ac_test_CFLAGS=${CFLAGS+set}
3541 ac_save_CFLAGS=$CFLAGS
3542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3543 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3544 if ${ac_cv_prog_cc_g+:} false; then :
3545   $as_echo_n "(cached) " >&6
3546 else
3547   ac_save_c_werror_flag=$ac_c_werror_flag
3548    ac_c_werror_flag=yes
3549    ac_cv_prog_cc_g=no
3550    CFLAGS="-g"
3551    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3552 /* end confdefs.h.  */
3553
3554 int
3555 main ()
3556 {
3557
3558   ;
3559   return 0;
3560 }
3561 _ACEOF
3562 if ac_fn_c_try_compile "$LINENO"; then :
3563   ac_cv_prog_cc_g=yes
3564 else
3565   CFLAGS=""
3566       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3567 /* end confdefs.h.  */
3568
3569 int
3570 main ()
3571 {
3572
3573   ;
3574   return 0;
3575 }
3576 _ACEOF
3577 if ac_fn_c_try_compile "$LINENO"; then :
3578
3579 else
3580   ac_c_werror_flag=$ac_save_c_werror_flag
3581          CFLAGS="-g"
3582          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3583 /* end confdefs.h.  */
3584
3585 int
3586 main ()
3587 {
3588
3589   ;
3590   return 0;
3591 }
3592 _ACEOF
3593 if ac_fn_c_try_compile "$LINENO"; then :
3594   ac_cv_prog_cc_g=yes
3595 fi
3596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3597 fi
3598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3599 fi
3600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3601    ac_c_werror_flag=$ac_save_c_werror_flag
3602 fi
3603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3604 $as_echo "$ac_cv_prog_cc_g" >&6; }
3605 if test "$ac_test_CFLAGS" = set; then
3606   CFLAGS=$ac_save_CFLAGS
3607 elif test $ac_cv_prog_cc_g = yes; then
3608   if test "$GCC" = yes; then
3609     CFLAGS="-g -O2"
3610   else
3611     CFLAGS="-g"
3612   fi
3613 else
3614   if test "$GCC" = yes; then
3615     CFLAGS="-O2"
3616   else
3617     CFLAGS=
3618   fi
3619 fi
3620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3621 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3622 if ${ac_cv_prog_cc_c89+:} false; then :
3623   $as_echo_n "(cached) " >&6
3624 else
3625   ac_cv_prog_cc_c89=no
3626 ac_save_CC=$CC
3627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3628 /* end confdefs.h.  */
3629 #include <stdarg.h>
3630 #include <stdio.h>
3631 struct stat;
3632 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3633 struct buf { int x; };
3634 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3635 static char *e (p, i)
3636      char **p;
3637      int i;
3638 {
3639   return p[i];
3640 }
3641 static char *f (char * (*g) (char **, int), char **p, ...)
3642 {
3643   char *s;
3644   va_list v;
3645   va_start (v,p);
3646   s = g (p, va_arg (v,int));
3647   va_end (v);
3648   return s;
3649 }
3650
3651 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3652    function prototypes and stuff, but not '\xHH' hex character constants.
3653    These don't provoke an error unfortunately, instead are silently treated
3654    as 'x'.  The following induces an error, until -std is added to get
3655    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3656    array size at least.  It's necessary to write '\x00'==0 to get something
3657    that's true only with -std.  */
3658 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3659
3660 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3661    inside strings and character constants.  */
3662 #define FOO(x) 'x'
3663 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3664
3665 int test (int i, double x);
3666 struct s1 {int (*f) (int a);};
3667 struct s2 {int (*f) (double a);};
3668 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3669 int argc;
3670 char **argv;
3671 int
3672 main ()
3673 {
3674 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3675   ;
3676   return 0;
3677 }
3678 _ACEOF
3679 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3680         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3681 do
3682   CC="$ac_save_CC $ac_arg"
3683   if ac_fn_c_try_compile "$LINENO"; then :
3684   ac_cv_prog_cc_c89=$ac_arg
3685 fi
3686 rm -f core conftest.err conftest.$ac_objext
3687   test "x$ac_cv_prog_cc_c89" != "xno" && break
3688 done
3689 rm -f conftest.$ac_ext
3690 CC=$ac_save_CC
3691
3692 fi
3693 # AC_CACHE_VAL
3694 case "x$ac_cv_prog_cc_c89" in
3695   x)
3696     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3697 $as_echo "none needed" >&6; } ;;
3698   xno)
3699     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3700 $as_echo "unsupported" >&6; } ;;
3701   *)
3702     CC="$CC $ac_cv_prog_cc_c89"
3703     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3704 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3705 esac
3706 if test "x$ac_cv_prog_cc_c89" != xno; then :
3707
3708 fi
3709
3710 ac_ext=c
3711 ac_cpp='$CPP $CPPFLAGS'
3712 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3713 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3714 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3715
3716
3717 ac_ext=c
3718 ac_cpp='$CPP $CPPFLAGS'
3719 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3720 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3721 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3723 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3724 # On Suns, sometimes $CPP names a directory.
3725 if test -n "$CPP" && test -d "$CPP"; then
3726   CPP=
3727 fi
3728 if test -z "$CPP"; then
3729   if ${ac_cv_prog_CPP+:} false; then :
3730   $as_echo_n "(cached) " >&6
3731 else
3732       # Double quotes because CPP needs to be expanded
3733     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3734     do
3735       ac_preproc_ok=false
3736 for ac_c_preproc_warn_flag in '' yes
3737 do
3738   # Use a header file that comes with gcc, so configuring glibc
3739   # with a fresh cross-compiler works.
3740   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3741   # <limits.h> exists even on freestanding compilers.
3742   # On the NeXT, cc -E runs the code through the compiler's parser,
3743   # not just through cpp. "Syntax error" is here to catch this case.
3744   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3745 /* end confdefs.h.  */
3746 #ifdef __STDC__
3747 # include <limits.h>
3748 #else
3749 # include <assert.h>
3750 #endif
3751                      Syntax error
3752 _ACEOF
3753 if ac_fn_c_try_cpp "$LINENO"; then :
3754
3755 else
3756   # Broken: fails on valid input.
3757 continue
3758 fi
3759 rm -f conftest.err conftest.i conftest.$ac_ext
3760
3761   # OK, works on sane cases.  Now check whether nonexistent headers
3762   # can be detected and how.
3763   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3764 /* end confdefs.h.  */
3765 #include <ac_nonexistent.h>
3766 _ACEOF
3767 if ac_fn_c_try_cpp "$LINENO"; then :
3768   # Broken: success on invalid input.
3769 continue
3770 else
3771   # Passes both tests.
3772 ac_preproc_ok=:
3773 break
3774 fi
3775 rm -f conftest.err conftest.i conftest.$ac_ext
3776
3777 done
3778 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3779 rm -f conftest.i conftest.err conftest.$ac_ext
3780 if $ac_preproc_ok; then :
3781   break
3782 fi
3783
3784     done
3785     ac_cv_prog_CPP=$CPP
3786
3787 fi
3788   CPP=$ac_cv_prog_CPP
3789 else
3790   ac_cv_prog_CPP=$CPP
3791 fi
3792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3793 $as_echo "$CPP" >&6; }
3794 ac_preproc_ok=false
3795 for ac_c_preproc_warn_flag in '' yes
3796 do
3797   # Use a header file that comes with gcc, so configuring glibc
3798   # with a fresh cross-compiler works.
3799   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3800   # <limits.h> exists even on freestanding compilers.
3801   # On the NeXT, cc -E runs the code through the compiler's parser,
3802   # not just through cpp. "Syntax error" is here to catch this case.
3803   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3804 /* end confdefs.h.  */
3805 #ifdef __STDC__
3806 # include <limits.h>
3807 #else
3808 # include <assert.h>
3809 #endif
3810                      Syntax error
3811 _ACEOF
3812 if ac_fn_c_try_cpp "$LINENO"; then :
3813
3814 else
3815   # Broken: fails on valid input.
3816 continue
3817 fi
3818 rm -f conftest.err conftest.i conftest.$ac_ext
3819
3820   # OK, works on sane cases.  Now check whether nonexistent headers
3821   # can be detected and how.
3822   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3823 /* end confdefs.h.  */
3824 #include <ac_nonexistent.h>
3825 _ACEOF
3826 if ac_fn_c_try_cpp "$LINENO"; then :
3827   # Broken: success on invalid input.
3828 continue
3829 else
3830   # Passes both tests.
3831 ac_preproc_ok=:
3832 break
3833 fi
3834 rm -f conftest.err conftest.i conftest.$ac_ext
3835
3836 done
3837 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3838 rm -f conftest.i conftest.err conftest.$ac_ext
3839 if $ac_preproc_ok; then :
3840
3841 else
3842   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3843 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3844 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3845 See \`config.log' for more details" "$LINENO" 5; }
3846 fi
3847
3848 ac_ext=c
3849 ac_cpp='$CPP $CPPFLAGS'
3850 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3851 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3852 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3853
3854
3855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3856 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3857 if ${ac_cv_path_GREP+:} false; then :
3858   $as_echo_n "(cached) " >&6
3859 else
3860   if test -z "$GREP"; then
3861   ac_path_GREP_found=false
3862   # Loop through the user's path and test for each of PROGNAME-LIST
3863   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3864 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3865 do
3866   IFS=$as_save_IFS
3867   test -z "$as_dir" && as_dir=.
3868     for ac_prog in grep ggrep; do
3869     for ac_exec_ext in '' $ac_executable_extensions; do
3870       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3871       as_fn_executable_p "$ac_path_GREP" || continue
3872 # Check for GNU ac_path_GREP and select it if it is found.
3873   # Check for GNU $ac_path_GREP
3874 case `"$ac_path_GREP" --version 2>&1` in
3875 *GNU*)
3876   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3877 *)
3878   ac_count=0
3879   $as_echo_n 0123456789 >"conftest.in"
3880   while :
3881   do
3882     cat "conftest.in" "conftest.in" >"conftest.tmp"
3883     mv "conftest.tmp" "conftest.in"
3884     cp "conftest.in" "conftest.nl"
3885     $as_echo 'GREP' >> "conftest.nl"
3886     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3887     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3888     as_fn_arith $ac_count + 1 && ac_count=$as_val
3889     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3890       # Best one so far, save it but keep looking for a better one
3891       ac_cv_path_GREP="$ac_path_GREP"
3892       ac_path_GREP_max=$ac_count
3893     fi
3894     # 10*(2^10) chars as input seems more than enough
3895     test $ac_count -gt 10 && break
3896   done
3897   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3898 esac
3899
3900       $ac_path_GREP_found && break 3
3901     done
3902   done
3903   done
3904 IFS=$as_save_IFS
3905   if test -z "$ac_cv_path_GREP"; then
3906     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3907   fi
3908 else
3909   ac_cv_path_GREP=$GREP
3910 fi
3911
3912 fi
3913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3914 $as_echo "$ac_cv_path_GREP" >&6; }
3915  GREP="$ac_cv_path_GREP"
3916
3917
3918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3919 $as_echo_n "checking for egrep... " >&6; }
3920 if ${ac_cv_path_EGREP+:} false; then :
3921   $as_echo_n "(cached) " >&6
3922 else
3923   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3924    then ac_cv_path_EGREP="$GREP -E"
3925    else
3926      if test -z "$EGREP"; then
3927   ac_path_EGREP_found=false
3928   # Loop through the user's path and test for each of PROGNAME-LIST
3929   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3930 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3931 do
3932   IFS=$as_save_IFS
3933   test -z "$as_dir" && as_dir=.
3934     for ac_prog in egrep; do
3935     for ac_exec_ext in '' $ac_executable_extensions; do
3936       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3937       as_fn_executable_p "$ac_path_EGREP" || continue
3938 # Check for GNU ac_path_EGREP and select it if it is found.
3939   # Check for GNU $ac_path_EGREP
3940 case `"$ac_path_EGREP" --version 2>&1` in
3941 *GNU*)
3942   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3943 *)
3944   ac_count=0
3945   $as_echo_n 0123456789 >"conftest.in"
3946   while :
3947   do
3948     cat "conftest.in" "conftest.in" >"conftest.tmp"
3949     mv "conftest.tmp" "conftest.in"
3950     cp "conftest.in" "conftest.nl"
3951     $as_echo 'EGREP' >> "conftest.nl"
3952     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3953     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3954     as_fn_arith $ac_count + 1 && ac_count=$as_val
3955     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3956       # Best one so far, save it but keep looking for a better one
3957       ac_cv_path_EGREP="$ac_path_EGREP"
3958       ac_path_EGREP_max=$ac_count
3959     fi
3960     # 10*(2^10) chars as input seems more than enough
3961     test $ac_count -gt 10 && break
3962   done
3963   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3964 esac
3965
3966       $ac_path_EGREP_found && break 3
3967     done
3968   done
3969   done
3970 IFS=$as_save_IFS
3971   if test -z "$ac_cv_path_EGREP"; then
3972     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3973   fi
3974 else
3975   ac_cv_path_EGREP=$EGREP
3976 fi
3977
3978    fi
3979 fi
3980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3981 $as_echo "$ac_cv_path_EGREP" >&6; }
3982  EGREP="$ac_cv_path_EGREP"
3983
3984
3985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3986 $as_echo_n "checking for ANSI C header files... " >&6; }
3987 if ${ac_cv_header_stdc+:} false; then :
3988   $as_echo_n "(cached) " >&6
3989 else
3990   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3991 /* end confdefs.h.  */
3992 #include <stdlib.h>
3993 #include <stdarg.h>
3994 #include <string.h>
3995 #include <float.h>
3996
3997 int
3998 main ()
3999 {
4000
4001   ;
4002   return 0;
4003 }
4004 _ACEOF
4005 if ac_fn_c_try_compile "$LINENO"; then :
4006   ac_cv_header_stdc=yes
4007 else
4008   ac_cv_header_stdc=no
4009 fi
4010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4011
4012 if test $ac_cv_header_stdc = yes; then
4013   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4014   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4015 /* end confdefs.h.  */
4016 #include <string.h>
4017
4018 _ACEOF
4019 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4020   $EGREP "memchr" >/dev/null 2>&1; then :
4021
4022 else
4023   ac_cv_header_stdc=no
4024 fi
4025 rm -f conftest*
4026
4027 fi
4028
4029 if test $ac_cv_header_stdc = yes; then
4030   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4031   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4032 /* end confdefs.h.  */
4033 #include <stdlib.h>
4034
4035 _ACEOF
4036 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4037   $EGREP "free" >/dev/null 2>&1; then :
4038
4039 else
4040   ac_cv_header_stdc=no
4041 fi
4042 rm -f conftest*
4043
4044 fi
4045
4046 if test $ac_cv_header_stdc = yes; then
4047   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4048   if test "$cross_compiling" = yes; then :
4049   :
4050 else
4051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4052 /* end confdefs.h.  */
4053 #include <ctype.h>
4054 #include <stdlib.h>
4055 #if ((' ' & 0x0FF) == 0x020)
4056 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4057 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4058 #else
4059 # define ISLOWER(c) \
4060                    (('a' <= (c) && (c) <= 'i') \
4061                      || ('j' <= (c) && (c) <= 'r') \
4062                      || ('s' <= (c) && (c) <= 'z'))
4063 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4064 #endif
4065
4066 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4067 int
4068 main ()
4069 {
4070   int i;
4071   for (i = 0; i < 256; i++)
4072     if (XOR (islower (i), ISLOWER (i))
4073         || toupper (i) != TOUPPER (i))
4074       return 2;
4075   return 0;
4076 }
4077 _ACEOF
4078 if ac_fn_c_try_run "$LINENO"; then :
4079
4080 else
4081   ac_cv_header_stdc=no
4082 fi
4083 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4084   conftest.$ac_objext conftest.beam conftest.$ac_ext
4085 fi
4086
4087 fi
4088 fi
4089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4090 $as_echo "$ac_cv_header_stdc" >&6; }
4091 if test $ac_cv_header_stdc = yes; then
4092
4093 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4094
4095 fi
4096
4097 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4098 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4099                   inttypes.h stdint.h unistd.h
4100 do :
4101   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4102 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4103 "
4104 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4105   cat >>confdefs.h <<_ACEOF
4106 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4107 _ACEOF
4108
4109 fi
4110
4111 done
4112
4113
4114
4115   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4116 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4117   MINIX=yes
4118 else
4119   MINIX=
4120 fi
4121
4122
4123   if test "$MINIX" = yes; then
4124
4125 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4126
4127
4128 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4129
4130
4131 $as_echo "#define _MINIX 1" >>confdefs.h
4132
4133   fi
4134
4135
4136   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4137 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4138 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4139   $as_echo_n "(cached) " >&6
4140 else
4141   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4142 /* end confdefs.h.  */
4143
4144 #         define __EXTENSIONS__ 1
4145           $ac_includes_default
4146 int
4147 main ()
4148 {
4149
4150   ;
4151   return 0;
4152 }
4153 _ACEOF
4154 if ac_fn_c_try_compile "$LINENO"; then :
4155   ac_cv_safe_to_define___extensions__=yes
4156 else
4157   ac_cv_safe_to_define___extensions__=no
4158 fi
4159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4160 fi
4161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4162 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4163   test $ac_cv_safe_to_define___extensions__ = yes &&
4164     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4165
4166   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4167
4168   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4169
4170   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4171
4172   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4173
4174
4175
4176 if test "$ac_cv_header_minix_config_h" = "yes"; then
4177
4178 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4179
4180 fi
4181
4182 case "$prefix" in
4183         NONE)
4184                 prefix="/usr/local"
4185         ;;
4186 esac
4187 case "$exec_prefix" in
4188         NONE)
4189                 exec_prefix="$prefix"
4190         ;;
4191 esac
4192
4193 # are we on MinGW?
4194 if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
4195 else
4196         if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes"
4197         else on_mingw="no"; fi
4198 fi
4199
4200 #
4201 # Determine configuration file
4202 # the eval is to evaluate shell expansion twice
4203 UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4204
4205 UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4206
4207 UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4208
4209 if test $on_mingw = "no"; then
4210   ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4211 else
4212   ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4213 fi
4214
4215 # Check whether --with-conf_file was given.
4216 if test "${with_conf_file+set}" = set; then :
4217   withval=$with_conf_file; ub_conf_file="$withval"
4218 fi
4219
4220
4221 hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4222
4223
4224 cat >>confdefs.h <<_ACEOF
4225 #define CONFIGFILE "$hdr_config"
4226 _ACEOF
4227
4228 ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4229 $as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4230          X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4231          X"$ub_conf_file" : 'X\(//\)$' \| \
4232          X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4233 $as_echo X"$ub_conf_file" |
4234     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4235             s//\1/
4236             q
4237           }
4238           /^X\(\/\/\)[^/].*/{
4239             s//\1/
4240             q
4241           }
4242           /^X\(\/\/\)$/{
4243             s//\1/
4244             q
4245           }
4246           /^X\(\/\).*/{
4247             s//\1/
4248             q
4249           }
4250           s/.*/./; q'`
4251
4252
4253 # Determine run, chroot directory and pidfile locations
4254
4255 # Check whether --with-run-dir was given.
4256 if test "${with_run_dir+set}" = set; then :
4257   withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4258 else
4259   if test $on_mingw = no; then
4260     UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4261 else
4262     UNBOUND_RUN_DIR=""
4263 fi
4264
4265 fi
4266
4267
4268 hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4269
4270
4271 cat >>confdefs.h <<_ACEOF
4272 #define RUN_DIR "$hdr_run"
4273 _ACEOF
4274
4275
4276
4277 # Check whether --with-chroot-dir was given.
4278 if test "${with_chroot_dir+set}" = set; then :
4279   withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4280 else
4281   if test $on_mingw = no; then
4282     UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4283 else
4284     UNBOUND_CHROOT_DIR=""
4285 fi
4286
4287 fi
4288
4289
4290 hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4291
4292
4293 cat >>confdefs.h <<_ACEOF
4294 #define CHROOT_DIR "$hdr_chroot"
4295 _ACEOF
4296
4297
4298
4299 # Check whether --with-share-dir was given.
4300 if test "${with_share_dir+set}" = set; then :
4301   withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4302 else
4303   UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4304 fi
4305
4306
4307
4308 cat >>confdefs.h <<_ACEOF
4309 #define SHARE_DIR "$UNBOUND_SHARE_DIR"
4310 _ACEOF
4311
4312
4313
4314 # Check whether --with-pidfile was given.
4315 if test "${with_pidfile+set}" = set; then :
4316   withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4317 else
4318   if test $on_mingw = no; then
4319     UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4320 else
4321     UNBOUND_PIDFILE=""
4322 fi
4323
4324 fi
4325
4326
4327 hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4328
4329
4330 cat >>confdefs.h <<_ACEOF
4331 #define PIDFILE "$hdr_pid"
4332 _ACEOF
4333
4334
4335
4336 # Check whether --with-rootkey-file was given.
4337 if test "${with_rootkey_file+set}" = set; then :
4338   withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4339 else
4340   if test $on_mingw = no; then
4341     UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4342 else
4343     UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4344 fi
4345
4346 fi
4347
4348
4349 hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4350
4351
4352 cat >>confdefs.h <<_ACEOF
4353 #define ROOT_ANCHOR_FILE "$hdr_rkey"
4354 _ACEOF
4355
4356
4357
4358 # Check whether --with-rootcert-file was given.
4359 if test "${with_rootcert_file+set}" = set; then :
4360   withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4361 else
4362   if test $on_mingw = no; then
4363     UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4364 else
4365     UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4366 fi
4367
4368 fi
4369
4370
4371 hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4372
4373
4374 cat >>confdefs.h <<_ACEOF
4375 #define ROOT_CERT_FILE "$hdr_rpem"
4376 _ACEOF
4377
4378
4379
4380 # Check whether --with-username was given.
4381 if test "${with_username+set}" = set; then :
4382   withval=$with_username; UNBOUND_USERNAME="$withval"
4383 else
4384   UNBOUND_USERNAME="unbound"
4385 fi
4386
4387
4388
4389 cat >>confdefs.h <<_ACEOF
4390 #define UB_USERNAME "$UNBOUND_USERNAME"
4391 _ACEOF
4392
4393
4394
4395 $as_echo "#define WINVER 0x0502" >>confdefs.h
4396
4397 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/' `
4398
4399
4400 cat >>confdefs.h <<_ACEOF
4401 #define RSRC_PACKAGE_VERSION $wnvs
4402 _ACEOF
4403
4404
4405 # Checks for typedefs, structures, and compiler characteristics.
4406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4407 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4408 if ${ac_cv_c_const+:} false; then :
4409   $as_echo_n "(cached) " >&6
4410 else
4411   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4412 /* end confdefs.h.  */
4413
4414 int
4415 main ()
4416 {
4417
4418 #ifndef __cplusplus
4419   /* Ultrix mips cc rejects this sort of thing.  */
4420   typedef int charset[2];
4421   const charset cs = { 0, 0 };
4422   /* SunOS 4.1.1 cc rejects this.  */
4423   char const *const *pcpcc;
4424   char **ppc;
4425   /* NEC SVR4.0.2 mips cc rejects this.  */
4426   struct point {int x, y;};
4427   static struct point const zero = {0,0};
4428   /* AIX XL C 1.02.0.0 rejects this.
4429      It does not let you subtract one const X* pointer from another in
4430      an arm of an if-expression whose if-part is not a constant
4431      expression */
4432   const char *g = "string";
4433   pcpcc = &g + (g ? g-g : 0);
4434   /* HPUX 7.0 cc rejects these. */
4435   ++pcpcc;
4436   ppc = (char**) pcpcc;
4437   pcpcc = (char const *const *) ppc;
4438   { /* SCO 3.2v4 cc rejects this sort of thing.  */
4439     char tx;
4440     char *t = &tx;
4441     char const *s = 0 ? (char *) 0 : (char const *) 0;
4442
4443     *t++ = 0;
4444     if (s) return 0;
4445   }
4446   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4447     int x[] = {25, 17};
4448     const int *foo = &x[0];
4449     ++foo;
4450   }
4451   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4452     typedef const int *iptr;
4453     iptr p = 0;
4454     ++p;
4455   }
4456   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4457        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4458     struct s { int j; const int *ap[3]; } bx;
4459     struct s *b = &bx; b->j = 5;
4460   }
4461   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4462     const int foo = 10;
4463     if (!foo) return 0;
4464   }
4465   return !cs[0] && !zero.x;
4466 #endif
4467
4468   ;
4469   return 0;
4470 }
4471 _ACEOF
4472 if ac_fn_c_try_compile "$LINENO"; then :
4473   ac_cv_c_const=yes
4474 else
4475   ac_cv_c_const=no
4476 fi
4477 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4478 fi
4479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4480 $as_echo "$ac_cv_c_const" >&6; }
4481 if test $ac_cv_c_const = no; then
4482
4483 $as_echo "#define const /**/" >>confdefs.h
4484
4485 fi
4486
4487 ac_ext=c
4488 ac_cpp='$CPP $CPPFLAGS'
4489 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4490 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4491 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4492
4493 # allow user to override the -g -O2 flags.
4494 default_cflags=no
4495 if test "x$CFLAGS" = "x" ; then
4496
4497
4498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4499 $as_echo_n "checking whether $CC supports -g... " >&6; }
4500 cache=`echo g | sed 'y%.=/+-%___p_%'`
4501 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4502   $as_echo_n "(cached) " >&6
4503 else
4504
4505 echo 'void f(void){}' >conftest.c
4506 if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4507 eval "cv_prog_cc_flag_$cache=yes"
4508 else
4509 eval "cv_prog_cc_flag_$cache=no"
4510 fi
4511 rm -f conftest conftest.o conftest.c
4512
4513 fi
4514
4515 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4517 $as_echo "yes" >&6; }
4518 :
4519 CFLAGS="$CFLAGS -g"
4520 else
4521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4522 $as_echo "no" >&6; }
4523 :
4524
4525 fi
4526
4527
4528
4529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4530 $as_echo_n "checking whether $CC supports -O2... " >&6; }
4531 cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4532 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4533   $as_echo_n "(cached) " >&6
4534 else
4535
4536 echo 'void f(void){}' >conftest.c
4537 if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4538 eval "cv_prog_cc_flag_$cache=yes"
4539 else
4540 eval "cv_prog_cc_flag_$cache=no"
4541 fi
4542 rm -f conftest conftest.o conftest.c
4543
4544 fi
4545
4546 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4548 $as_echo "yes" >&6; }
4549 :
4550 CFLAGS="$CFLAGS -O2"
4551 else
4552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4553 $as_echo "no" >&6; }
4554 :
4555
4556 fi
4557
4558 default_cflags=yes
4559 fi
4560 ac_ext=c
4561 ac_cpp='$CPP $CPPFLAGS'
4562 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4563 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4564 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4565 if test -n "$ac_tool_prefix"; then
4566   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4567 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4569 $as_echo_n "checking for $ac_word... " >&6; }
4570 if ${ac_cv_prog_CC+:} false; then :
4571   $as_echo_n "(cached) " >&6
4572 else
4573   if test -n "$CC"; then
4574   ac_cv_prog_CC="$CC" # Let the user override the test.
4575 else
4576 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4577 for as_dir in $PATH
4578 do
4579   IFS=$as_save_IFS
4580   test -z "$as_dir" && as_dir=.
4581     for ac_exec_ext in '' $ac_executable_extensions; do
4582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4583     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4585     break 2
4586   fi
4587 done
4588   done
4589 IFS=$as_save_IFS
4590
4591 fi
4592 fi
4593 CC=$ac_cv_prog_CC
4594 if test -n "$CC"; then
4595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4596 $as_echo "$CC" >&6; }
4597 else
4598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4599 $as_echo "no" >&6; }
4600 fi
4601
4602
4603 fi
4604 if test -z "$ac_cv_prog_CC"; then
4605   ac_ct_CC=$CC
4606   # Extract the first word of "gcc", so it can be a program name with args.
4607 set dummy gcc; ac_word=$2
4608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4609 $as_echo_n "checking for $ac_word... " >&6; }
4610 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4611   $as_echo_n "(cached) " >&6
4612 else
4613   if test -n "$ac_ct_CC"; then
4614   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4615 else
4616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4617 for as_dir in $PATH
4618 do
4619   IFS=$as_save_IFS
4620   test -z "$as_dir" && as_dir=.
4621     for ac_exec_ext in '' $ac_executable_extensions; do
4622   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4623     ac_cv_prog_ac_ct_CC="gcc"
4624     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4625     break 2
4626   fi
4627 done
4628   done
4629 IFS=$as_save_IFS
4630
4631 fi
4632 fi
4633 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4634 if test -n "$ac_ct_CC"; then
4635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4636 $as_echo "$ac_ct_CC" >&6; }
4637 else
4638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4639 $as_echo "no" >&6; }
4640 fi
4641
4642   if test "x$ac_ct_CC" = x; then
4643     CC=""
4644   else
4645     case $cross_compiling:$ac_tool_warned in
4646 yes:)
4647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4648 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4649 ac_tool_warned=yes ;;
4650 esac
4651     CC=$ac_ct_CC
4652   fi
4653 else
4654   CC="$ac_cv_prog_CC"
4655 fi
4656
4657 if test -z "$CC"; then
4658           if test -n "$ac_tool_prefix"; then
4659     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4660 set dummy ${ac_tool_prefix}cc; ac_word=$2
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4662 $as_echo_n "checking for $ac_word... " >&6; }
4663 if ${ac_cv_prog_CC+:} false; then :
4664   $as_echo_n "(cached) " >&6
4665 else
4666   if test -n "$CC"; then
4667   ac_cv_prog_CC="$CC" # Let the user override the test.
4668 else
4669 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4670 for as_dir in $PATH
4671 do
4672   IFS=$as_save_IFS
4673   test -z "$as_dir" && as_dir=.
4674     for ac_exec_ext in '' $ac_executable_extensions; do
4675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4676     ac_cv_prog_CC="${ac_tool_prefix}cc"
4677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4678     break 2
4679   fi
4680 done
4681   done
4682 IFS=$as_save_IFS
4683
4684 fi
4685 fi
4686 CC=$ac_cv_prog_CC
4687 if test -n "$CC"; then
4688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4689 $as_echo "$CC" >&6; }
4690 else
4691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4692 $as_echo "no" >&6; }
4693 fi
4694
4695
4696   fi
4697 fi
4698 if test -z "$CC"; then
4699   # Extract the first word of "cc", so it can be a program name with args.
4700 set dummy cc; ac_word=$2
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4702 $as_echo_n "checking for $ac_word... " >&6; }
4703 if ${ac_cv_prog_CC+:} false; then :
4704   $as_echo_n "(cached) " >&6
4705 else
4706   if test -n "$CC"; then
4707   ac_cv_prog_CC="$CC" # Let the user override the test.
4708 else
4709   ac_prog_rejected=no
4710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4711 for as_dir in $PATH
4712 do
4713   IFS=$as_save_IFS
4714   test -z "$as_dir" && as_dir=.
4715     for ac_exec_ext in '' $ac_executable_extensions; do
4716   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4717     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4718        ac_prog_rejected=yes
4719        continue
4720      fi
4721     ac_cv_prog_CC="cc"
4722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4723     break 2
4724   fi
4725 done
4726   done
4727 IFS=$as_save_IFS
4728
4729 if test $ac_prog_rejected = yes; then
4730   # We found a bogon in the path, so make sure we never use it.
4731   set dummy $ac_cv_prog_CC
4732   shift
4733   if test $# != 0; then
4734     # We chose a different compiler from the bogus one.
4735     # However, it has the same basename, so the bogon will be chosen
4736     # first if we set CC to just the basename; use the full file name.
4737     shift
4738     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4739   fi
4740 fi
4741 fi
4742 fi
4743 CC=$ac_cv_prog_CC
4744 if test -n "$CC"; then
4745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4746 $as_echo "$CC" >&6; }
4747 else
4748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4749 $as_echo "no" >&6; }
4750 fi
4751
4752
4753 fi
4754 if test -z "$CC"; then
4755   if test -n "$ac_tool_prefix"; then
4756   for ac_prog in cl.exe
4757   do
4758     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4759 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4761 $as_echo_n "checking for $ac_word... " >&6; }
4762 if ${ac_cv_prog_CC+:} false; then :
4763   $as_echo_n "(cached) " >&6
4764 else
4765   if test -n "$CC"; then
4766   ac_cv_prog_CC="$CC" # Let the user override the test.
4767 else
4768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4769 for as_dir in $PATH
4770 do
4771   IFS=$as_save_IFS
4772   test -z "$as_dir" && as_dir=.
4773     for ac_exec_ext in '' $ac_executable_extensions; do
4774   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4775     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4777     break 2
4778   fi
4779 done
4780   done
4781 IFS=$as_save_IFS
4782
4783 fi
4784 fi
4785 CC=$ac_cv_prog_CC
4786 if test -n "$CC"; then
4787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4788 $as_echo "$CC" >&6; }
4789 else
4790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4791 $as_echo "no" >&6; }
4792 fi
4793
4794
4795     test -n "$CC" && break
4796   done
4797 fi
4798 if test -z "$CC"; then
4799   ac_ct_CC=$CC
4800   for ac_prog in cl.exe
4801 do
4802   # Extract the first word of "$ac_prog", so it can be a program name with args.
4803 set dummy $ac_prog; ac_word=$2
4804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4805 $as_echo_n "checking for $ac_word... " >&6; }
4806 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4807   $as_echo_n "(cached) " >&6
4808 else
4809   if test -n "$ac_ct_CC"; then
4810   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4811 else
4812 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4813 for as_dir in $PATH
4814 do
4815   IFS=$as_save_IFS
4816   test -z "$as_dir" && as_dir=.
4817     for ac_exec_ext in '' $ac_executable_extensions; do
4818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4819     ac_cv_prog_ac_ct_CC="$ac_prog"
4820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4821     break 2
4822   fi
4823 done
4824   done
4825 IFS=$as_save_IFS
4826
4827 fi
4828 fi
4829 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4830 if test -n "$ac_ct_CC"; then
4831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4832 $as_echo "$ac_ct_CC" >&6; }
4833 else
4834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4835 $as_echo "no" >&6; }
4836 fi
4837
4838
4839   test -n "$ac_ct_CC" && break
4840 done
4841
4842   if test "x$ac_ct_CC" = x; then
4843     CC=""
4844   else
4845     case $cross_compiling:$ac_tool_warned in
4846 yes:)
4847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4848 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4849 ac_tool_warned=yes ;;
4850 esac
4851     CC=$ac_ct_CC
4852   fi
4853 fi
4854
4855 fi
4856
4857
4858 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4859 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4860 as_fn_error $? "no acceptable C compiler found in \$PATH
4861 See \`config.log' for more details" "$LINENO" 5; }
4862
4863 # Provide some information about the compiler.
4864 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4865 set X $ac_compile
4866 ac_compiler=$2
4867 for ac_option in --version -v -V -qversion; do
4868   { { ac_try="$ac_compiler $ac_option >&5"
4869 case "(($ac_try" in
4870   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4871   *) ac_try_echo=$ac_try;;
4872 esac
4873 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4874 $as_echo "$ac_try_echo"; } >&5
4875   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4876   ac_status=$?
4877   if test -s conftest.err; then
4878     sed '10a\
4879 ... rest of stderr output deleted ...
4880          10q' conftest.err >conftest.er1
4881     cat conftest.er1 >&5
4882   fi
4883   rm -f conftest.er1 conftest.err
4884   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4885   test $ac_status = 0; }
4886 done
4887
4888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4889 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4890 if ${ac_cv_c_compiler_gnu+:} false; then :
4891   $as_echo_n "(cached) " >&6
4892 else
4893   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4894 /* end confdefs.h.  */
4895
4896 int
4897 main ()
4898 {
4899 #ifndef __GNUC__
4900        choke me
4901 #endif
4902
4903   ;
4904   return 0;
4905 }
4906 _ACEOF
4907 if ac_fn_c_try_compile "$LINENO"; then :
4908   ac_compiler_gnu=yes
4909 else
4910   ac_compiler_gnu=no
4911 fi
4912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4913 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4914
4915 fi
4916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4917 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4918 if test $ac_compiler_gnu = yes; then
4919   GCC=yes
4920 else
4921   GCC=
4922 fi
4923 ac_test_CFLAGS=${CFLAGS+set}
4924 ac_save_CFLAGS=$CFLAGS
4925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4926 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4927 if ${ac_cv_prog_cc_g+:} false; then :
4928   $as_echo_n "(cached) " >&6
4929 else
4930   ac_save_c_werror_flag=$ac_c_werror_flag
4931    ac_c_werror_flag=yes
4932    ac_cv_prog_cc_g=no
4933    CFLAGS="-g"
4934    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4935 /* end confdefs.h.  */
4936
4937 int
4938 main ()
4939 {
4940
4941   ;
4942   return 0;
4943 }
4944 _ACEOF
4945 if ac_fn_c_try_compile "$LINENO"; then :
4946   ac_cv_prog_cc_g=yes
4947 else
4948   CFLAGS=""
4949       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4950 /* end confdefs.h.  */
4951
4952 int
4953 main ()
4954 {
4955
4956   ;
4957   return 0;
4958 }
4959 _ACEOF
4960 if ac_fn_c_try_compile "$LINENO"; then :
4961
4962 else
4963   ac_c_werror_flag=$ac_save_c_werror_flag
4964          CFLAGS="-g"
4965          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4966 /* end confdefs.h.  */
4967
4968 int
4969 main ()
4970 {
4971
4972   ;
4973   return 0;
4974 }
4975 _ACEOF
4976 if ac_fn_c_try_compile "$LINENO"; then :
4977   ac_cv_prog_cc_g=yes
4978 fi
4979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4980 fi
4981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4982 fi
4983 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4984    ac_c_werror_flag=$ac_save_c_werror_flag
4985 fi
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4987 $as_echo "$ac_cv_prog_cc_g" >&6; }
4988 if test "$ac_test_CFLAGS" = set; then
4989   CFLAGS=$ac_save_CFLAGS
4990 elif test $ac_cv_prog_cc_g = yes; then
4991   if test "$GCC" = yes; then
4992     CFLAGS="-g -O2"
4993   else
4994     CFLAGS="-g"
4995   fi
4996 else
4997   if test "$GCC" = yes; then
4998     CFLAGS="-O2"
4999   else
5000     CFLAGS=
5001   fi
5002 fi
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5004 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5005 if ${ac_cv_prog_cc_c89+:} false; then :
5006   $as_echo_n "(cached) " >&6
5007 else
5008   ac_cv_prog_cc_c89=no
5009 ac_save_CC=$CC
5010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5011 /* end confdefs.h.  */
5012 #include <stdarg.h>
5013 #include <stdio.h>
5014 struct stat;
5015 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5016 struct buf { int x; };
5017 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5018 static char *e (p, i)
5019      char **p;
5020      int i;
5021 {
5022   return p[i];
5023 }
5024 static char *f (char * (*g) (char **, int), char **p, ...)
5025 {
5026   char *s;
5027   va_list v;
5028   va_start (v,p);
5029   s = g (p, va_arg (v,int));
5030   va_end (v);
5031   return s;
5032 }
5033
5034 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5035    function prototypes and stuff, but not '\xHH' hex character constants.
5036    These don't provoke an error unfortunately, instead are silently treated
5037    as 'x'.  The following induces an error, until -std is added to get
5038    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5039    array size at least.  It's necessary to write '\x00'==0 to get something
5040    that's true only with -std.  */
5041 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5042
5043 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5044    inside strings and character constants.  */
5045 #define FOO(x) 'x'
5046 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5047
5048 int test (int i, double x);
5049 struct s1 {int (*f) (int a);};
5050 struct s2 {int (*f) (double a);};
5051 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5052 int argc;
5053 char **argv;
5054 int
5055 main ()
5056 {
5057 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5058   ;
5059   return 0;
5060 }
5061 _ACEOF
5062 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5063         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5064 do
5065   CC="$ac_save_CC $ac_arg"
5066   if ac_fn_c_try_compile "$LINENO"; then :
5067   ac_cv_prog_cc_c89=$ac_arg
5068 fi
5069 rm -f core conftest.err conftest.$ac_objext
5070   test "x$ac_cv_prog_cc_c89" != "xno" && break
5071 done
5072 rm -f conftest.$ac_ext
5073 CC=$ac_save_CC
5074
5075 fi
5076 # AC_CACHE_VAL
5077 case "x$ac_cv_prog_cc_c89" in
5078   x)
5079     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5080 $as_echo "none needed" >&6; } ;;
5081   xno)
5082     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5083 $as_echo "unsupported" >&6; } ;;
5084   *)
5085     CC="$CC $ac_cv_prog_cc_c89"
5086     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5087 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5088 esac
5089 if test "x$ac_cv_prog_cc_c89" != xno; then :
5090
5091 fi
5092
5093 ac_ext=c
5094 ac_cpp='$CPP $CPPFLAGS'
5095 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5096 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5097 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5098
5099
5100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5101 $as_echo_n "checking $CC dependency flag... " >&6; }
5102 echo 'void f(){}' >conftest.c
5103 if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5104         DEPFLAG="-MM"
5105 else
5106   if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5107         DEPFLAG="-xM1"
5108   else
5109         DEPFLAG="-MM"  # dunno do something
5110   fi
5111 fi
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5113 $as_echo "$DEPFLAG" >&6; }
5114 rm -f conftest.c
5115
5116
5117
5118
5119
5120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5121 $as_echo_n "checking whether $CC supports -Werror... " >&6; }
5122 cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5123 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5124   $as_echo_n "(cached) " >&6
5125 else
5126
5127 echo 'void f(void){}' >conftest.c
5128 if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5129 eval "cv_prog_cc_flag_$cache=yes"
5130 else
5131 eval "cv_prog_cc_flag_$cache=no"
5132 fi
5133 rm -f conftest conftest.o conftest.c
5134
5135 fi
5136
5137 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5139 $as_echo "yes" >&6; }
5140 :
5141 ERRFLAG="-Werror"
5142 else
5143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5144 $as_echo "no" >&6; }
5145 :
5146 ERRFLAG="-errwarn"
5147 fi
5148
5149
5150
5151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5152 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5153 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5154 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5155   $as_echo_n "(cached) " >&6
5156 else
5157
5158 echo 'void f(void){}' >conftest.c
5159 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5160 eval "cv_prog_cc_flag_$cache=yes"
5161 else
5162 eval "cv_prog_cc_flag_$cache=no"
5163 fi
5164 rm -f conftest conftest.o conftest.c
5165
5166 fi
5167
5168 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5170 $as_echo "yes" >&6; }
5171 :
5172 ERRFLAG="$ERRFLAG -Wall"
5173 else
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5175 $as_echo "no" >&6; }
5176 :
5177 ERRFLAG="$ERRFLAG -errfmt"
5178 fi
5179
5180
5181
5182
5183
5184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5185 $as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5186 cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5187 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5188   $as_echo_n "(cached) " >&6
5189 else
5190
5191 echo 'void f(void){}' >conftest.c
5192 if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5193 eval "cv_prog_cc_flag_$cache=yes"
5194 else
5195 eval "cv_prog_cc_flag_$cache=no"
5196 fi
5197 rm -f conftest conftest.o conftest.c
5198
5199 fi
5200
5201 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5203 $as_echo "yes" >&6; }
5204 :
5205 C99FLAG="-std=c99"
5206 else
5207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5208 $as_echo "no" >&6; }
5209 :
5210
5211 fi
5212
5213
5214
5215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5216 $as_echo_n "checking whether $CC supports -xc99... " >&6; }
5217 cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5218 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5219   $as_echo_n "(cached) " >&6
5220 else
5221
5222 echo 'void f(void){}' >conftest.c
5223 if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5224 eval "cv_prog_cc_flag_$cache=yes"
5225 else
5226 eval "cv_prog_cc_flag_$cache=no"
5227 fi
5228 rm -f conftest conftest.o conftest.c
5229
5230 fi
5231
5232 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5234 $as_echo "yes" >&6; }
5235 :
5236 C99FLAG="-xc99"
5237 else
5238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5239 $as_echo "no" >&6; }
5240 :
5241
5242 fi
5243
5244
5245 for ac_header in getopt.h time.h
5246 do :
5247   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5248 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5249 "
5250 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5251   cat >>confdefs.h <<_ACEOF
5252 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5253 _ACEOF
5254
5255 fi
5256
5257 done
5258
5259
5260
5261
5262
5263 { $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
5264 $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; }
5265 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`
5266 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5267   $as_echo_n "(cached) " >&6
5268 else
5269
5270 echo '
5271 #include "confdefs.h"
5272 #include <stdlib.h>
5273 #include <ctype.h>
5274 #include <sys/time.h>
5275 #ifdef HAVE_TIME_H
5276 #include <time.h>
5277 #endif
5278 #include <unistd.h>
5279 #include <netdb.h>
5280 #ifdef HAVE_GETOPT_H
5281 #include <getopt.h>
5282 #endif
5283
5284 int test() {
5285         int a;
5286         char **opts = NULL;
5287         struct timeval tv;
5288         char *t;
5289         time_t time = 0;
5290         char *buf = NULL;
5291         const char* str = NULL;
5292         struct msghdr msg;
5293         msg.msg_control = 0;
5294         t = ctime_r(&time, buf);
5295         tv.tv_usec = 10;
5296         srandom(32);
5297         a = getopt(2, opts, "a");
5298         a = isascii(32);
5299         str = gai_strerror(0);
5300         if(str && t && tv.tv_usec && msg.msg_control)
5301                 a = 0;
5302         return a;
5303 }
5304 ' > conftest.c
5305 echo 'void f(){}' >>conftest.c
5306 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5307 eval "cv_prog_cc_flag_needed_$cache=no"
5308 else
5309
5310 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
5311 eval "cv_prog_cc_flag_needed_$cache=yes"
5312 else
5313 eval "cv_prog_cc_flag_needed_$cache=fail"
5314 #echo 'Test with flag fails too!'
5315 #cat conftest.c
5316 #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"
5317 #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`
5318 #exit 1
5319 fi
5320
5321 fi
5322 rm -f conftest conftest.c conftest.o
5323
5324 fi
5325
5326 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5328 $as_echo "yes" >&6; }
5329 :
5330 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"
5331 else
5332 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5334 $as_echo "no" >&6; }
5335 #echo 'Test with flag is no!'
5336 #cat conftest.c
5337 #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"
5338 #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`
5339 #exit 1
5340 :
5341
5342 else
5343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5344 $as_echo "failed" >&6; }
5345 :
5346
5347 fi
5348 fi
5349
5350
5351
5352
5353
5354 { $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
5355 $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; }
5356 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`
5357 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5358   $as_echo_n "(cached) " >&6
5359 else
5360
5361 echo '
5362 #include "confdefs.h"
5363 #include <stdlib.h>
5364 #include <ctype.h>
5365 #include <sys/time.h>
5366 #ifdef HAVE_TIME_H
5367 #include <time.h>
5368 #endif
5369 #include <unistd.h>
5370 #include <netdb.h>
5371 #ifdef HAVE_GETOPT_H
5372 #include <getopt.h>
5373 #endif
5374
5375 int test() {
5376         int a;
5377         char **opts = NULL;
5378         struct timeval tv;
5379         char *t;
5380         time_t time = 0;
5381         char *buf = NULL;
5382         const char* str = NULL;
5383         struct msghdr msg;
5384         msg.msg_control = 0;
5385         t = ctime_r(&time, buf);
5386         tv.tv_usec = 10;
5387         srandom(32);
5388         a = getopt(2, opts, "a");
5389         a = isascii(32);
5390         str = gai_strerror(0);
5391         if(str && t && tv.tv_usec && msg.msg_control)
5392                 a = 0;
5393         return a;
5394 }
5395 ' > conftest.c
5396 echo 'void f(){}' >>conftest.c
5397 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5398 eval "cv_prog_cc_flag_needed_$cache=no"
5399 else
5400
5401 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
5402 eval "cv_prog_cc_flag_needed_$cache=yes"
5403 else
5404 eval "cv_prog_cc_flag_needed_$cache=fail"
5405 #echo 'Test with flag fails too!'
5406 #cat conftest.c
5407 #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"
5408 #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`
5409 #exit 1
5410 fi
5411
5412 fi
5413 rm -f conftest conftest.c conftest.o
5414
5415 fi
5416
5417 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5419 $as_echo "yes" >&6; }
5420 :
5421 CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5422 else
5423 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5425 $as_echo "no" >&6; }
5426 #echo 'Test with flag is no!'
5427 #cat conftest.c
5428 #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"
5429 #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`
5430 #exit 1
5431 :
5432
5433 else
5434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5435 $as_echo "failed" >&6; }
5436 :
5437
5438 fi
5439 fi
5440
5441
5442
5443
5444
5445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5446 $as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5447 cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5448 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5449   $as_echo_n "(cached) " >&6
5450 else
5451
5452 echo '
5453 #include <stdbool.h>
5454 #include <ctype.h>
5455 int test() {
5456         int a = 0;
5457         return a;
5458 }
5459 ' > conftest.c
5460 echo 'void f(){}' >>conftest.c
5461 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5462 eval "cv_prog_cc_flag_needed_$cache=no"
5463 else
5464
5465 if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5466 eval "cv_prog_cc_flag_needed_$cache=yes"
5467 else
5468 eval "cv_prog_cc_flag_needed_$cache=fail"
5469 #echo 'Test with flag fails too!'
5470 #cat conftest.c
5471 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5472 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5473 #exit 1
5474 fi
5475
5476 fi
5477 rm -f conftest conftest.c conftest.o
5478
5479 fi
5480
5481 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5483 $as_echo "yes" >&6; }
5484 :
5485 CFLAGS="$CFLAGS $C99FLAG"
5486 else
5487 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5489 $as_echo "no" >&6; }
5490 #echo 'Test with flag is no!'
5491 #cat conftest.c
5492 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5493 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5494 #exit 1
5495 :
5496
5497 else
5498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5499 $as_echo "failed" >&6; }
5500 :
5501
5502 fi
5503 fi
5504
5505
5506
5507
5508
5509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
5510 $as_echo_n "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
5511 cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
5512 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5513   $as_echo_n "(cached) " >&6
5514 else
5515
5516 echo '
5517 #include <ctype.h>
5518
5519 int test() {
5520         int a;
5521         a = isascii(32);
5522         return a;
5523 }
5524 ' > conftest.c
5525 echo 'void f(){}' >>conftest.c
5526 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5527 eval "cv_prog_cc_flag_needed_$cache=no"
5528 else
5529
5530 if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5531 eval "cv_prog_cc_flag_needed_$cache=yes"
5532 else
5533 eval "cv_prog_cc_flag_needed_$cache=fail"
5534 #echo 'Test with flag fails too!'
5535 #cat conftest.c
5536 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5537 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5538 #exit 1
5539 fi
5540
5541 fi
5542 rm -f conftest conftest.c conftest.o
5543
5544 fi
5545
5546 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5548 $as_echo "yes" >&6; }
5549 :
5550 CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
5551 else
5552 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5554 $as_echo "no" >&6; }
5555 #echo 'Test with flag is no!'
5556 #cat conftest.c
5557 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5558 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5559 #exit 1
5560 :
5561
5562 else
5563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5564 $as_echo "failed" >&6; }
5565 :
5566
5567 fi
5568 fi
5569
5570
5571
5572
5573
5574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5575 $as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5576 cache=_D_GNU_SOURCE
5577 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5578   $as_echo_n "(cached) " >&6
5579 else
5580
5581 echo '
5582 #include <netinet/in.h>
5583
5584 int test() {
5585         struct in6_pktinfo inf;
5586         int a = (int)sizeof(inf);
5587         return a;
5588 }
5589 ' > conftest.c
5590 echo 'void f(){}' >>conftest.c
5591 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5592 eval "cv_prog_cc_flag_needed_$cache=no"
5593 else
5594
5595 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5596 eval "cv_prog_cc_flag_needed_$cache=yes"
5597 else
5598 eval "cv_prog_cc_flag_needed_$cache=fail"
5599 #echo 'Test with flag fails too!'
5600 #cat conftest.c
5601 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5602 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5603 #exit 1
5604 fi
5605
5606 fi
5607 rm -f conftest conftest.c conftest.o
5608
5609 fi
5610
5611 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5613 $as_echo "yes" >&6; }
5614 :
5615 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5616 else
5617 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5619 $as_echo "no" >&6; }
5620 #echo 'Test with flag is no!'
5621 #cat conftest.c
5622 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5623 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5624 #exit 1
5625 :
5626
5627 else
5628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5629 $as_echo "failed" >&6; }
5630 :
5631
5632 fi
5633 fi
5634
5635
5636 # check again for GNU_SOURCE for setresgid. May fail if setresgid
5637 # is not available at all. -D_FRSRESGID is to make this check unique.
5638 # otherwise we would get the previous cached result.
5639
5640
5641
5642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5643 $as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5644 cache=_D_GNU_SOURCE__D_FRSRESGID
5645 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5646   $as_echo_n "(cached) " >&6
5647 else
5648
5649 echo '
5650 #include <unistd.h>
5651
5652 int test() {
5653         int a = setresgid(0,0,0);
5654         a = setresuid(0,0,0);
5655         return a;
5656 }
5657 ' > conftest.c
5658 echo 'void f(){}' >>conftest.c
5659 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5660 eval "cv_prog_cc_flag_needed_$cache=no"
5661 else
5662
5663 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5664 eval "cv_prog_cc_flag_needed_$cache=yes"
5665 else
5666 eval "cv_prog_cc_flag_needed_$cache=fail"
5667 #echo 'Test with flag fails too!'
5668 #cat conftest.c
5669 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5670 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5671 #exit 1
5672 fi
5673
5674 fi
5675 rm -f conftest conftest.c conftest.o
5676
5677 fi
5678
5679 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5681 $as_echo "yes" >&6; }
5682 :
5683 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5684 else
5685 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5687 $as_echo "no" >&6; }
5688 #echo 'Test with flag is no!'
5689 #cat conftest.c
5690 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5691 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5692 #exit 1
5693 :
5694
5695 else
5696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5697 $as_echo "failed" >&6; }
5698 :
5699
5700 fi
5701 fi
5702
5703
5704
5705
5706
5707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5708 $as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5709 cache=_D_POSIX_C_SOURCE_200112
5710 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5711   $as_echo_n "(cached) " >&6
5712 else
5713
5714 echo '
5715 #include "confdefs.h"
5716 #ifdef HAVE_TIME_H
5717 #include <time.h>
5718 #endif
5719 #include <netdb.h>
5720
5721 int test() {
5722         int a = 0;
5723         char *t;
5724         time_t time = 0;
5725         char *buf = NULL;
5726         const char* str = NULL;
5727         t = ctime_r(&time, buf);
5728         str = gai_strerror(0);
5729         if(t && str)
5730                 a = 0;
5731         return a;
5732 }
5733 ' > conftest.c
5734 echo 'void f(){}' >>conftest.c
5735 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5736 eval "cv_prog_cc_flag_needed_$cache=no"
5737 else
5738
5739 if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5740 eval "cv_prog_cc_flag_needed_$cache=yes"
5741 else
5742 eval "cv_prog_cc_flag_needed_$cache=fail"
5743 #echo 'Test with flag fails too!'
5744 #cat conftest.c
5745 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5746 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5747 #exit 1
5748 fi
5749
5750 fi
5751 rm -f conftest conftest.c conftest.o
5752
5753 fi
5754
5755 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5757 $as_echo "yes" >&6; }
5758 :
5759 CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5760 else
5761 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5763 $as_echo "no" >&6; }
5764 #echo 'Test with flag is no!'
5765 #cat conftest.c
5766 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5767 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5768 #exit 1
5769 :
5770
5771 else
5772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5773 $as_echo "failed" >&6; }
5774 :
5775
5776 fi
5777 fi
5778
5779
5780
5781
5782
5783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5784 $as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5785 cache=_D__EXTENSIONS__
5786 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5787   $as_echo_n "(cached) " >&6
5788 else
5789
5790 echo '
5791 #include "confdefs.h"
5792 #include <stdlib.h>
5793 #include <ctype.h>
5794 #include <sys/time.h>
5795 #ifdef HAVE_TIME_H
5796 #include <time.h>
5797 #endif
5798 #include <unistd.h>
5799 #ifdef HAVE_GETOPT_H
5800 #include <getopt.h>
5801 #endif
5802
5803 int test() {
5804         int a;
5805         char **opts = NULL;
5806         struct timeval tv;
5807         tv.tv_usec = 10;
5808         srandom(32);
5809         a = getopt(2, opts, "a");
5810         a = isascii(32);
5811         if(tv.tv_usec)
5812                 a = 0;
5813         return a;
5814 }
5815 ' > conftest.c
5816 echo 'void f(){}' >>conftest.c
5817 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5818 eval "cv_prog_cc_flag_needed_$cache=no"
5819 else
5820
5821 if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5822 eval "cv_prog_cc_flag_needed_$cache=yes"
5823 else
5824 eval "cv_prog_cc_flag_needed_$cache=fail"
5825 #echo 'Test with flag fails too!'
5826 #cat conftest.c
5827 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5828 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5829 #exit 1
5830 fi
5831
5832 fi
5833 rm -f conftest conftest.c conftest.o
5834
5835 fi
5836
5837 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5839 $as_echo "yes" >&6; }
5840 :
5841 CFLAGS="$CFLAGS -D__EXTENSIONS__"
5842 else
5843 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5845 $as_echo "no" >&6; }
5846 #echo 'Test with flag is no!'
5847 #cat conftest.c
5848 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5849 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5850 #exit 1
5851 :
5852
5853 else
5854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5855 $as_echo "failed" >&6; }
5856 :
5857
5858 fi
5859 fi
5860
5861
5862
5863
5864 # debug mode flags warnings
5865 # Check whether --enable-checking was given.
5866 if test "${enable_checking+set}" = set; then :
5867   enableval=$enable_checking;
5868 fi
5869
5870 # Check whether --enable-debug was given.
5871 if test "${enable_debug+set}" = set; then :
5872   enableval=$enable_debug;
5873 fi
5874
5875 if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5876 else debug_enabled="$enable_checking"; fi
5877
5878 case "$debug_enabled" in
5879         yes)
5880
5881
5882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5883 $as_echo_n "checking whether $CC supports -W... " >&6; }
5884 cache=`echo W | sed 'y%.=/+-%___p_%'`
5885 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5886   $as_echo_n "(cached) " >&6
5887 else
5888
5889 echo 'void f(void){}' >conftest.c
5890 if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5891 eval "cv_prog_cc_flag_$cache=yes"
5892 else
5893 eval "cv_prog_cc_flag_$cache=no"
5894 fi
5895 rm -f conftest conftest.o conftest.c
5896
5897 fi
5898
5899 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5901 $as_echo "yes" >&6; }
5902 :
5903 CFLAGS="$CFLAGS -W"
5904 else
5905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5906 $as_echo "no" >&6; }
5907 :
5908
5909 fi
5910
5911
5912
5913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5914 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5915 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5916 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5917   $as_echo_n "(cached) " >&6
5918 else
5919
5920 echo 'void f(void){}' >conftest.c
5921 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5922 eval "cv_prog_cc_flag_$cache=yes"
5923 else
5924 eval "cv_prog_cc_flag_$cache=no"
5925 fi
5926 rm -f conftest conftest.o conftest.c
5927
5928 fi
5929
5930 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5932 $as_echo "yes" >&6; }
5933 :
5934 CFLAGS="$CFLAGS -Wall"
5935 else
5936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5937 $as_echo "no" >&6; }
5938 :
5939
5940 fi
5941
5942
5943
5944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5945 $as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5946 cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5947 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5948   $as_echo_n "(cached) " >&6
5949 else
5950
5951 echo 'void f(void){}' >conftest.c
5952 if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5953 eval "cv_prog_cc_flag_$cache=yes"
5954 else
5955 eval "cv_prog_cc_flag_$cache=no"
5956 fi
5957 rm -f conftest conftest.o conftest.c
5958
5959 fi
5960
5961 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5963 $as_echo "yes" >&6; }
5964 :
5965 CFLAGS="$CFLAGS -Wextra"
5966 else
5967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5968 $as_echo "no" >&6; }
5969 :
5970
5971 fi
5972
5973
5974
5975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
5976 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
5977 cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
5978 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5979   $as_echo_n "(cached) " >&6
5980 else
5981
5982 echo 'void f(void){}' >conftest.c
5983 if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
5984 eval "cv_prog_cc_flag_$cache=yes"
5985 else
5986 eval "cv_prog_cc_flag_$cache=no"
5987 fi
5988 rm -f conftest conftest.o conftest.c
5989
5990 fi
5991
5992 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5994 $as_echo "yes" >&6; }
5995 :
5996 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
5997 else
5998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5999 $as_echo "no" >&6; }
6000 :
6001
6002 fi
6003
6004
6005 $as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
6006
6007                 ;;
6008         no|*)
6009                 # nothing to do.
6010                 ;;
6011 esac
6012 if test "$default_cflags" = "yes"; then
6013         # only when CFLAGS was "" at the start, if the users wants to
6014         # override we shouldn't add default cflags, because they wouldn't
6015         # be able to turn off these options and set the CFLAGS wanted.
6016
6017     # Check whether --enable-flto was given.
6018 if test "${enable_flto+set}" = set; then :
6019   enableval=$enable_flto;
6020 fi
6021
6022     if test "x$enable_flto" != "xno"; then :
6023
6024         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
6025 $as_echo_n "checking if $CC supports -flto... " >&6; }
6026         BAKCFLAGS="$CFLAGS"
6027         CFLAGS="$CFLAGS -flto"
6028         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6029 /* end confdefs.h.  */
6030
6031 int
6032 main ()
6033 {
6034
6035   ;
6036   return 0;
6037 }
6038 _ACEOF
6039 if ac_fn_c_try_link "$LINENO"; then :
6040
6041             if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
6042                 CFLAGS="$BAKCFLAGS"
6043                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6044 $as_echo "no" >&6; }
6045             else
6046                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6047 $as_echo "yes" >&6; }
6048             fi
6049             rm -f conftest conftest.c conftest.o
6050
6051 else
6052   CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6053 $as_echo "no" >&6; }
6054 fi
6055 rm -f core conftest.err conftest.$ac_objext \
6056     conftest$ac_exeext conftest.$ac_ext
6057
6058 fi
6059
6060
6061     # Check whether --enable-pie was given.
6062 if test "${enable_pie+set}" = set; then :
6063   enableval=$enable_pie;
6064 fi
6065
6066     if test "x$enable_pie" = "xyes"; then :
6067
6068         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6069 $as_echo_n "checking if $CC supports PIE... " >&6; }
6070         BAKLDFLAGS="$LDFLAGS"
6071         BAKCFLAGS="$CFLAGS"
6072         LDFLAGS="$LDFLAGS -pie"
6073         CFLAGS="$CFLAGS -fPIE"
6074         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6075 /* end confdefs.h.  */
6076
6077 int
6078 main ()
6079 {
6080
6081   ;
6082   return 0;
6083 }
6084 _ACEOF
6085 if ac_fn_c_try_link "$LINENO"; then :
6086
6087             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6088                 LDFLAGS="$BAKLDFLAGS"
6089                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090 $as_echo "no" >&6; }
6091             else
6092                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6093 $as_echo "yes" >&6; }
6094             fi
6095             rm -f conftest conftest.c conftest.o
6096
6097 else
6098   LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6099 $as_echo "no" >&6; }
6100 fi
6101 rm -f core conftest.err conftest.$ac_objext \
6102     conftest$ac_exeext conftest.$ac_ext
6103
6104 fi
6105
6106
6107     # Check whether --enable-relro_now was given.
6108 if test "${enable_relro_now+set}" = set; then :
6109   enableval=$enable_relro_now;
6110 fi
6111
6112     if test "x$enable_relro_now" = "xyes"; then :
6113
6114         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6115 $as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6116         BAKLDFLAGS="$LDFLAGS"
6117         LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6118         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6119 /* end confdefs.h.  */
6120
6121 int
6122 main ()
6123 {
6124
6125   ;
6126   return 0;
6127 }
6128 _ACEOF
6129 if ac_fn_c_try_link "$LINENO"; then :
6130
6131             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6132                 LDFLAGS="$BAKLDFLAGS"
6133                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6134 $as_echo "no" >&6; }
6135             else
6136                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6137 $as_echo "yes" >&6; }
6138             fi
6139             rm -f conftest conftest.c conftest.o
6140
6141 else
6142   LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6143 $as_echo "no" >&6; }
6144 fi
6145 rm -f core conftest.err conftest.$ac_objext \
6146     conftest$ac_exeext conftest.$ac_ext
6147
6148 fi
6149
6150 fi
6151
6152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6153 $as_echo_n "checking for inline... " >&6; }
6154 if ${ac_cv_c_inline+:} false; then :
6155   $as_echo_n "(cached) " >&6
6156 else
6157   ac_cv_c_inline=no
6158 for ac_kw in inline __inline__ __inline; do
6159   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6160 /* end confdefs.h.  */
6161 #ifndef __cplusplus
6162 typedef int foo_t;
6163 static $ac_kw foo_t static_foo () {return 0; }
6164 $ac_kw foo_t foo () {return 0; }
6165 #endif
6166
6167 _ACEOF
6168 if ac_fn_c_try_compile "$LINENO"; then :
6169   ac_cv_c_inline=$ac_kw
6170 fi
6171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6172   test "$ac_cv_c_inline" != no && break
6173 done
6174
6175 fi
6176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6177 $as_echo "$ac_cv_c_inline" >&6; }
6178
6179 case $ac_cv_c_inline in
6180   inline | yes) ;;
6181   *)
6182     case $ac_cv_c_inline in
6183       no) ac_val=;;
6184       *) ac_val=$ac_cv_c_inline;;
6185     esac
6186     cat >>confdefs.h <<_ACEOF
6187 #ifndef __cplusplus
6188 #define inline $ac_val
6189 #endif
6190 _ACEOF
6191     ;;
6192 esac
6193
6194
6195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6196 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6197 if ${ac_cv_c_format_attribute+:} false; then :
6198   $as_echo_n "(cached) " >&6
6199 else
6200   ac_cv_c_format_attribute=no
6201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6202 /* end confdefs.h.  */
6203 #include <stdio.h>
6204 void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6205 void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6206
6207 int
6208 main ()
6209 {
6210
6211    f ("%s", "str");
6212
6213   ;
6214   return 0;
6215 }
6216 _ACEOF
6217 if ac_fn_c_try_compile "$LINENO"; then :
6218   ac_cv_c_format_attribute="yes"
6219 else
6220   ac_cv_c_format_attribute="no"
6221 fi
6222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6223
6224 fi
6225
6226
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6228 $as_echo "$ac_cv_c_format_attribute" >&6; }
6229 if test $ac_cv_c_format_attribute = yes; then
6230
6231 $as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6232
6233 fi
6234
6235
6236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6237 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6238 if ${ac_cv_c_unused_attribute+:} false; then :
6239   $as_echo_n "(cached) " >&6
6240 else
6241   ac_cv_c_unused_attribute=no
6242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6243 /* end confdefs.h.  */
6244 #include <stdio.h>
6245 void f (char *u __attribute__((unused)));
6246
6247 int
6248 main ()
6249 {
6250
6251    f ("x");
6252
6253   ;
6254   return 0;
6255 }
6256 _ACEOF
6257 if ac_fn_c_try_compile "$LINENO"; then :
6258   ac_cv_c_unused_attribute="yes"
6259 else
6260   ac_cv_c_unused_attribute="no"
6261 fi
6262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6263
6264 fi
6265
6266
6267
6268
6269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6270 $as_echo "$ac_cv_c_unused_attribute" >&6; }
6271 if test $ac_cv_c_unused_attribute = yes; then
6272
6273 $as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6274
6275 fi
6276
6277
6278
6279
6280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6281 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6282 if ${ac_cv_c_weak_attribute+:} false; then :
6283   $as_echo_n "(cached) " >&6
6284 else
6285   ac_cv_c_weak_attribute=no
6286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6287 /* end confdefs.h.  */
6288  #include <stdio.h>
6289 __attribute__((weak)) void f(int x) { printf("%d", x); }
6290
6291 int
6292 main ()
6293 {
6294
6295    f(1);
6296
6297   ;
6298   return 0;
6299 }
6300 _ACEOF
6301 if ac_fn_c_try_compile "$LINENO"; then :
6302   ac_cv_c_weak_attribute="yes"
6303 else
6304   ac_cv_c_weak_attribute="no"
6305 fi
6306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6307
6308 fi
6309
6310
6311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6312 $as_echo "$ac_cv_c_weak_attribute" >&6; }
6313 if test $ac_cv_c_weak_attribute = yes; then
6314
6315 $as_echo "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6316
6317
6318 $as_echo "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
6319
6320 fi
6321
6322
6323
6324
6325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
6326 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
6327 if ${ac_cv_c_noreturn_attribute+:} false; then :
6328   $as_echo_n "(cached) " >&6
6329 else
6330   ac_cv_c_noreturn_attribute=no
6331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6332 /* end confdefs.h.  */
6333  #include <stdio.h>
6334 __attribute__((noreturn)) void f(int x) { printf("%d", x); }
6335
6336 int
6337 main ()
6338 {
6339
6340    f(1);
6341
6342   ;
6343   return 0;
6344 }
6345 _ACEOF
6346 if ac_fn_c_try_compile "$LINENO"; then :
6347   ac_cv_c_noreturn_attribute="yes"
6348 else
6349   ac_cv_c_noreturn_attribute="no"
6350 fi
6351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6352
6353 fi
6354
6355
6356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
6357 $as_echo "$ac_cv_c_noreturn_attribute" >&6; }
6358 if test $ac_cv_c_noreturn_attribute = yes; then
6359
6360 $as_echo "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
6361
6362
6363 $as_echo "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
6364
6365 fi
6366
6367
6368 if test "$srcdir" != "."; then
6369         CPPFLAGS="$CPPFLAGS -I$srcdir"
6370 fi
6371
6372
6373
6374
6375
6376 for ac_prog in flex lex
6377 do
6378   # Extract the first word of "$ac_prog", so it can be a program name with args.
6379 set dummy $ac_prog; ac_word=$2
6380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6381 $as_echo_n "checking for $ac_word... " >&6; }
6382 if ${ac_cv_prog_LEX+:} false; then :
6383   $as_echo_n "(cached) " >&6
6384 else
6385   if test -n "$LEX"; then
6386   ac_cv_prog_LEX="$LEX" # Let the user override the test.
6387 else
6388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6389 for as_dir in $PATH
6390 do
6391   IFS=$as_save_IFS
6392   test -z "$as_dir" && as_dir=.
6393     for ac_exec_ext in '' $ac_executable_extensions; do
6394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6395     ac_cv_prog_LEX="$ac_prog"
6396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6397     break 2
6398   fi
6399 done
6400   done
6401 IFS=$as_save_IFS
6402
6403 fi
6404 fi
6405 LEX=$ac_cv_prog_LEX
6406 if test -n "$LEX"; then
6407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6408 $as_echo "$LEX" >&6; }
6409 else
6410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6411 $as_echo "no" >&6; }
6412 fi
6413
6414
6415   test -n "$LEX" && break
6416 done
6417 test -n "$LEX" || LEX=":"
6418
6419 if test "x$LEX" != "x:"; then
6420   cat >conftest.l <<_ACEOF
6421 %%
6422 a { ECHO; }
6423 b { REJECT; }
6424 c { yymore (); }
6425 d { yyless (1); }
6426 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6427     yyless ((input () != 0)); }
6428 f { unput (yytext[0]); }
6429 . { BEGIN INITIAL; }
6430 %%
6431 #ifdef YYTEXT_POINTER
6432 extern char *yytext;
6433 #endif
6434 int
6435 main (void)
6436 {
6437   return ! yylex () + ! yywrap ();
6438 }
6439 _ACEOF
6440 { { ac_try="$LEX conftest.l"
6441 case "(($ac_try" in
6442   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6443   *) ac_try_echo=$ac_try;;
6444 esac
6445 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6446 $as_echo "$ac_try_echo"; } >&5
6447   (eval "$LEX conftest.l") 2>&5
6448   ac_status=$?
6449   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6450   test $ac_status = 0; }
6451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6452 $as_echo_n "checking lex output file root... " >&6; }
6453 if ${ac_cv_prog_lex_root+:} false; then :
6454   $as_echo_n "(cached) " >&6
6455 else
6456
6457 if test -f lex.yy.c; then
6458   ac_cv_prog_lex_root=lex.yy
6459 elif test -f lexyy.c; then
6460   ac_cv_prog_lex_root=lexyy
6461 else
6462   as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6463 fi
6464 fi
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6466 $as_echo "$ac_cv_prog_lex_root" >&6; }
6467 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6468
6469 if test -z "${LEXLIB+set}"; then
6470   { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6471 $as_echo_n "checking lex library... " >&6; }
6472 if ${ac_cv_lib_lex+:} false; then :
6473   $as_echo_n "(cached) " >&6
6474 else
6475
6476     ac_save_LIBS=$LIBS
6477     ac_cv_lib_lex='none needed'
6478     for ac_lib in '' -lfl -ll; do
6479       LIBS="$ac_lib $ac_save_LIBS"
6480       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6481 /* end confdefs.h.  */
6482 `cat $LEX_OUTPUT_ROOT.c`
6483 _ACEOF
6484 if ac_fn_c_try_link "$LINENO"; then :
6485   ac_cv_lib_lex=$ac_lib
6486 fi
6487 rm -f core conftest.err conftest.$ac_objext \
6488     conftest$ac_exeext conftest.$ac_ext
6489       test "$ac_cv_lib_lex" != 'none needed' && break
6490     done
6491     LIBS=$ac_save_LIBS
6492
6493 fi
6494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6495 $as_echo "$ac_cv_lib_lex" >&6; }
6496   test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6497 fi
6498
6499
6500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6501 $as_echo_n "checking whether yytext is a pointer... " >&6; }
6502 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6503   $as_echo_n "(cached) " >&6
6504 else
6505   # POSIX says lex can declare yytext either as a pointer or an array; the
6506 # default is implementation-dependent.  Figure out which it is, since
6507 # not all implementations provide the %pointer and %array declarations.
6508 ac_cv_prog_lex_yytext_pointer=no
6509 ac_save_LIBS=$LIBS
6510 LIBS="$LEXLIB $ac_save_LIBS"
6511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6512 /* end confdefs.h.  */
6513
6514   #define YYTEXT_POINTER 1
6515 `cat $LEX_OUTPUT_ROOT.c`
6516 _ACEOF
6517 if ac_fn_c_try_link "$LINENO"; then :
6518   ac_cv_prog_lex_yytext_pointer=yes
6519 fi
6520 rm -f core conftest.err conftest.$ac_objext \
6521     conftest$ac_exeext conftest.$ac_ext
6522 LIBS=$ac_save_LIBS
6523
6524 fi
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6526 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6527 if test $ac_cv_prog_lex_yytext_pointer = yes; then
6528
6529 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6530
6531 fi
6532 rm -f conftest.l $LEX_OUTPUT_ROOT.c
6533
6534 fi
6535 if test "$LEX" != "" -a "$LEX" != ":"; then
6536
6537         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6538 $as_echo_n "checking for yylex_destroy... " >&6; }
6539         if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6540
6541 $as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6542
6543                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6544 $as_echo "yes" >&6; }
6545         else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6546 $as_echo "no" >&6; };
6547                 LEX=":"
6548         fi
6549
6550 fi
6551 if test "$LEX" != "" -a "$LEX" != ":"; then
6552
6553         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
6554 $as_echo_n "checking for lex %option... " >&6; }
6555         if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
6556 %option nounput
6557 %%
6558 EOF
6559                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6560 $as_echo "yes" >&6; }
6561         else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6562 $as_echo "no" >&6; };
6563                 LEX=":"
6564         fi
6565
6566 fi
6567 for ac_prog in 'bison -y' byacc
6568 do
6569   # Extract the first word of "$ac_prog", so it can be a program name with args.
6570 set dummy $ac_prog; ac_word=$2
6571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6572 $as_echo_n "checking for $ac_word... " >&6; }
6573 if ${ac_cv_prog_YACC+:} false; then :
6574   $as_echo_n "(cached) " >&6
6575 else
6576   if test -n "$YACC"; then
6577   ac_cv_prog_YACC="$YACC" # Let the user override the test.
6578 else
6579 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6580 for as_dir in $PATH
6581 do
6582   IFS=$as_save_IFS
6583   test -z "$as_dir" && as_dir=.
6584     for ac_exec_ext in '' $ac_executable_extensions; do
6585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6586     ac_cv_prog_YACC="$ac_prog"
6587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6588     break 2
6589   fi
6590 done
6591   done
6592 IFS=$as_save_IFS
6593
6594 fi
6595 fi
6596 YACC=$ac_cv_prog_YACC
6597 if test -n "$YACC"; then
6598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6599 $as_echo "$YACC" >&6; }
6600 else
6601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6602 $as_echo "no" >&6; }
6603 fi
6604
6605
6606   test -n "$YACC" && break
6607 done
6608 test -n "$YACC" || YACC="yacc"
6609
6610 # Extract the first word of "doxygen", so it can be a program name with args.
6611 set dummy doxygen; ac_word=$2
6612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6613 $as_echo_n "checking for $ac_word... " >&6; }
6614 if ${ac_cv_prog_doxygen+:} false; then :
6615   $as_echo_n "(cached) " >&6
6616 else
6617   if test -n "$doxygen"; then
6618   ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6619 else
6620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6621 for as_dir in $PATH
6622 do
6623   IFS=$as_save_IFS
6624   test -z "$as_dir" && as_dir=.
6625     for ac_exec_ext in '' $ac_executable_extensions; do
6626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6627     ac_cv_prog_doxygen="doxygen"
6628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6629     break 2
6630   fi
6631 done
6632   done
6633 IFS=$as_save_IFS
6634
6635 fi
6636 fi
6637 doxygen=$ac_cv_prog_doxygen
6638 if test -n "$doxygen"; then
6639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6640 $as_echo "$doxygen" >&6; }
6641 else
6642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6643 $as_echo "no" >&6; }
6644 fi
6645
6646
6647 if test -n "$ac_tool_prefix"; then
6648   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6649 set dummy ${ac_tool_prefix}strip; ac_word=$2
6650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6651 $as_echo_n "checking for $ac_word... " >&6; }
6652 if ${ac_cv_prog_STRIP+:} false; then :
6653   $as_echo_n "(cached) " >&6
6654 else
6655   if test -n "$STRIP"; then
6656   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6657 else
6658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6659 for as_dir in $PATH
6660 do
6661   IFS=$as_save_IFS
6662   test -z "$as_dir" && as_dir=.
6663     for ac_exec_ext in '' $ac_executable_extensions; do
6664   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6665     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6666     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6667     break 2
6668   fi
6669 done
6670   done
6671 IFS=$as_save_IFS
6672
6673 fi
6674 fi
6675 STRIP=$ac_cv_prog_STRIP
6676 if test -n "$STRIP"; then
6677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6678 $as_echo "$STRIP" >&6; }
6679 else
6680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6681 $as_echo "no" >&6; }
6682 fi
6683
6684
6685 fi
6686 if test -z "$ac_cv_prog_STRIP"; then
6687   ac_ct_STRIP=$STRIP
6688   # Extract the first word of "strip", so it can be a program name with args.
6689 set dummy strip; ac_word=$2
6690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6691 $as_echo_n "checking for $ac_word... " >&6; }
6692 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6693   $as_echo_n "(cached) " >&6
6694 else
6695   if test -n "$ac_ct_STRIP"; then
6696   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6697 else
6698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6699 for as_dir in $PATH
6700 do
6701   IFS=$as_save_IFS
6702   test -z "$as_dir" && as_dir=.
6703     for ac_exec_ext in '' $ac_executable_extensions; do
6704   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6705     ac_cv_prog_ac_ct_STRIP="strip"
6706     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6707     break 2
6708   fi
6709 done
6710   done
6711 IFS=$as_save_IFS
6712
6713 fi
6714 fi
6715 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6716 if test -n "$ac_ct_STRIP"; then
6717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6718 $as_echo "$ac_ct_STRIP" >&6; }
6719 else
6720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6721 $as_echo "no" >&6; }
6722 fi
6723
6724   if test "x$ac_ct_STRIP" = x; then
6725     STRIP=""
6726   else
6727     case $cross_compiling:$ac_tool_warned in
6728 yes:)
6729 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6730 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6731 ac_tool_warned=yes ;;
6732 esac
6733     STRIP=$ac_ct_STRIP
6734   fi
6735 else
6736   STRIP="$ac_cv_prog_STRIP"
6737 fi
6738
6739 ac_aux_dir=
6740 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6741   if test -f "$ac_dir/install-sh"; then
6742     ac_aux_dir=$ac_dir
6743     ac_install_sh="$ac_aux_dir/install-sh -c"
6744     break
6745   elif 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/shtool"; then
6750     ac_aux_dir=$ac_dir
6751     ac_install_sh="$ac_aux_dir/shtool install -c"
6752     break
6753   fi
6754 done
6755 if test -z "$ac_aux_dir"; then
6756   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6757 fi
6758
6759 # These three variables are undocumented and unsupported,
6760 # and are intended to be withdrawn in a future Autoconf release.
6761 # They can cause serious problems if a builder's source tree is in a directory
6762 # whose full name contains unusual characters.
6763 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6764 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6765 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6766
6767
6768 # Make sure we can run config.sub.
6769 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6770   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6771
6772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6773 $as_echo_n "checking build system type... " >&6; }
6774 if ${ac_cv_build+:} false; then :
6775   $as_echo_n "(cached) " >&6
6776 else
6777   ac_build_alias=$build_alias
6778 test "x$ac_build_alias" = x &&
6779   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6780 test "x$ac_build_alias" = x &&
6781   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6782 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6783   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6784
6785 fi
6786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6787 $as_echo "$ac_cv_build" >&6; }
6788 case $ac_cv_build in
6789 *-*-*) ;;
6790 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6791 esac
6792 build=$ac_cv_build
6793 ac_save_IFS=$IFS; IFS='-'
6794 set x $ac_cv_build
6795 shift
6796 build_cpu=$1
6797 build_vendor=$2
6798 shift; shift
6799 # Remember, the first character of IFS is used to create $*,
6800 # except with old shells:
6801 build_os=$*
6802 IFS=$ac_save_IFS
6803 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6804
6805
6806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6807 $as_echo_n "checking host system type... " >&6; }
6808 if ${ac_cv_host+:} false; then :
6809   $as_echo_n "(cached) " >&6
6810 else
6811   if test "x$host_alias" = x; then
6812   ac_cv_host=$ac_cv_build
6813 else
6814   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6815     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6816 fi
6817
6818 fi
6819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6820 $as_echo "$ac_cv_host" >&6; }
6821 case $ac_cv_host in
6822 *-*-*) ;;
6823 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6824 esac
6825 host=$ac_cv_host
6826 ac_save_IFS=$IFS; IFS='-'
6827 set x $ac_cv_host
6828 shift
6829 host_cpu=$1
6830 host_vendor=$2
6831 shift; shift
6832 # Remember, the first character of IFS is used to create $*,
6833 # except with old shells:
6834 host_os=$*
6835 IFS=$ac_save_IFS
6836 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6837
6838
6839
6840 # skip these tests, we do not need them.
6841
6842
6843
6844
6845
6846
6847
6848
6849 # always use ./libtool unless override from commandline (libtool=mylibtool)
6850 if test -z "$libtool"; then
6851         libtool="./libtool"
6852 fi
6853
6854 # avoid libtool max commandline length test on systems that fork slowly.
6855
6856 if echo "$host_os" | grep "sunos4" >/dev/null; then
6857         lt_cv_sys_max_cmd_len=32750;
6858 fi
6859 if test -n "$ac_tool_prefix"; then
6860   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6861 set dummy ${ac_tool_prefix}ar; ac_word=$2
6862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6863 $as_echo_n "checking for $ac_word... " >&6; }
6864 if ${ac_cv_path_AR+:} false; then :
6865   $as_echo_n "(cached) " >&6
6866 else
6867   case $AR in
6868   [\\/]* | ?:[\\/]*)
6869   ac_cv_path_AR="$AR" # Let the user override the test with a path.
6870   ;;
6871   *)
6872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6873 for as_dir in $PATH
6874 do
6875   IFS=$as_save_IFS
6876   test -z "$as_dir" && as_dir=.
6877     for ac_exec_ext in '' $ac_executable_extensions; do
6878   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6879     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6881     break 2
6882   fi
6883 done
6884   done
6885 IFS=$as_save_IFS
6886
6887   ;;
6888 esac
6889 fi
6890 AR=$ac_cv_path_AR
6891 if test -n "$AR"; then
6892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6893 $as_echo "$AR" >&6; }
6894 else
6895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6896 $as_echo "no" >&6; }
6897 fi
6898
6899
6900 fi
6901 if test -z "$ac_cv_path_AR"; then
6902   ac_pt_AR=$AR
6903   # Extract the first word of "ar", so it can be a program name with args.
6904 set dummy ar; ac_word=$2
6905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6906 $as_echo_n "checking for $ac_word... " >&6; }
6907 if ${ac_cv_path_ac_pt_AR+:} false; then :
6908   $as_echo_n "(cached) " >&6
6909 else
6910   case $ac_pt_AR in
6911   [\\/]* | ?:[\\/]*)
6912   ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6913   ;;
6914   *)
6915   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6916 for as_dir in $PATH
6917 do
6918   IFS=$as_save_IFS
6919   test -z "$as_dir" && as_dir=.
6920     for ac_exec_ext in '' $ac_executable_extensions; do
6921   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6922     ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6923     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6924     break 2
6925   fi
6926 done
6927   done
6928 IFS=$as_save_IFS
6929
6930   ;;
6931 esac
6932 fi
6933 ac_pt_AR=$ac_cv_path_ac_pt_AR
6934 if test -n "$ac_pt_AR"; then
6935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6936 $as_echo "$ac_pt_AR" >&6; }
6937 else
6938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6939 $as_echo "no" >&6; }
6940 fi
6941
6942   if test "x$ac_pt_AR" = x; then
6943     AR="false"
6944   else
6945     case $cross_compiling:$ac_tool_warned in
6946 yes:)
6947 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6948 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6949 ac_tool_warned=yes ;;
6950 esac
6951     AR=$ac_pt_AR
6952   fi
6953 else
6954   AR="$ac_cv_path_AR"
6955 fi
6956
6957 if test $AR = false; then
6958         as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
6959 fi
6960
6961 case `pwd` in
6962   *\ * | *\     *)
6963     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
6964 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
6965 esac
6966
6967
6968
6969 macro_version='2.4.6'
6970 macro_revision='2.4.6'
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984 ltmain=$ac_aux_dir/ltmain.sh
6985
6986 # Backslashify metacharacters that are still active within
6987 # double-quoted strings.
6988 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6989
6990 # Same as above, but do not quote variable references.
6991 double_quote_subst='s/\(["`\\]\)/\\\1/g'
6992
6993 # Sed substitution to delay expansion of an escaped shell variable in a
6994 # double_quote_subst'ed string.
6995 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6996
6997 # Sed substitution to delay expansion of an escaped single quote.
6998 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
6999
7000 # Sed substitution to avoid accidental globbing in evaled expressions
7001 no_glob_subst='s/\*/\\\*/g'
7002
7003 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7004 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7005 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7006
7007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7008 $as_echo_n "checking how to print strings... " >&6; }
7009 # Test print first, because it will be a builtin if present.
7010 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7011    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7012   ECHO='print -r --'
7013 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7014   ECHO='printf %s\n'
7015 else
7016   # Use this function as a fallback that always works.
7017   func_fallback_echo ()
7018   {
7019     eval 'cat <<_LTECHO_EOF
7020 $1
7021 _LTECHO_EOF'
7022   }
7023   ECHO='func_fallback_echo'
7024 fi
7025
7026 # func_echo_all arg...
7027 # Invoke $ECHO with all args, space-separated.
7028 func_echo_all ()
7029 {
7030     $ECHO ""
7031 }
7032
7033 case $ECHO in
7034   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
7035 $as_echo "printf" >&6; } ;;
7036   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
7037 $as_echo "print -r" >&6; } ;;
7038   *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
7039 $as_echo "cat" >&6; } ;;
7040 esac
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7056 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
7057 if ${ac_cv_path_SED+:} false; then :
7058   $as_echo_n "(cached) " >&6
7059 else
7060             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7061      for ac_i in 1 2 3 4 5 6 7; do
7062        ac_script="$ac_script$as_nl$ac_script"
7063      done
7064      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7065      { ac_script=; unset ac_script;}
7066      if test -z "$SED"; then
7067   ac_path_SED_found=false
7068   # Loop through the user's path and test for each of PROGNAME-LIST
7069   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7070 for as_dir in $PATH
7071 do
7072   IFS=$as_save_IFS
7073   test -z "$as_dir" && as_dir=.
7074     for ac_prog in sed gsed; do
7075     for ac_exec_ext in '' $ac_executable_extensions; do
7076       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
7077       as_fn_executable_p "$ac_path_SED" || continue
7078 # Check for GNU ac_path_SED and select it if it is found.
7079   # Check for GNU $ac_path_SED
7080 case `"$ac_path_SED" --version 2>&1` in
7081 *GNU*)
7082   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7083 *)
7084   ac_count=0
7085   $as_echo_n 0123456789 >"conftest.in"
7086   while :
7087   do
7088     cat "conftest.in" "conftest.in" >"conftest.tmp"
7089     mv "conftest.tmp" "conftest.in"
7090     cp "conftest.in" "conftest.nl"
7091     $as_echo '' >> "conftest.nl"
7092     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7093     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7094     as_fn_arith $ac_count + 1 && ac_count=$as_val
7095     if test $ac_count -gt ${ac_path_SED_max-0}; then
7096       # Best one so far, save it but keep looking for a better one
7097       ac_cv_path_SED="$ac_path_SED"
7098       ac_path_SED_max=$ac_count
7099     fi
7100     # 10*(2^10) chars as input seems more than enough
7101     test $ac_count -gt 10 && break
7102   done
7103   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7104 esac
7105
7106       $ac_path_SED_found && break 3
7107     done
7108   done
7109   done
7110 IFS=$as_save_IFS
7111   if test -z "$ac_cv_path_SED"; then
7112     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7113   fi
7114 else
7115   ac_cv_path_SED=$SED
7116 fi
7117
7118 fi
7119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7120 $as_echo "$ac_cv_path_SED" >&6; }
7121  SED="$ac_cv_path_SED"
7122   rm -f conftest.sed
7123
7124 test -z "$SED" && SED=sed
7125 Xsed="$SED -e 1s/^X//"
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7138 $as_echo_n "checking for fgrep... " >&6; }
7139 if ${ac_cv_path_FGREP+:} false; then :
7140   $as_echo_n "(cached) " >&6
7141 else
7142   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7143    then ac_cv_path_FGREP="$GREP -F"
7144    else
7145      if test -z "$FGREP"; then
7146   ac_path_FGREP_found=false
7147   # Loop through the user's path and test for each of PROGNAME-LIST
7148   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7149 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7150 do
7151   IFS=$as_save_IFS
7152   test -z "$as_dir" && as_dir=.
7153     for ac_prog in fgrep; do
7154     for ac_exec_ext in '' $ac_executable_extensions; do
7155       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
7156       as_fn_executable_p "$ac_path_FGREP" || continue
7157 # Check for GNU ac_path_FGREP and select it if it is found.
7158   # Check for GNU $ac_path_FGREP
7159 case `"$ac_path_FGREP" --version 2>&1` in
7160 *GNU*)
7161   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7162 *)
7163   ac_count=0
7164   $as_echo_n 0123456789 >"conftest.in"
7165   while :
7166   do
7167     cat "conftest.in" "conftest.in" >"conftest.tmp"
7168     mv "conftest.tmp" "conftest.in"
7169     cp "conftest.in" "conftest.nl"
7170     $as_echo 'FGREP' >> "conftest.nl"
7171     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7172     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7173     as_fn_arith $ac_count + 1 && ac_count=$as_val
7174     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7175       # Best one so far, save it but keep looking for a better one
7176       ac_cv_path_FGREP="$ac_path_FGREP"
7177       ac_path_FGREP_max=$ac_count
7178     fi
7179     # 10*(2^10) chars as input seems more than enough
7180     test $ac_count -gt 10 && break
7181   done
7182   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7183 esac
7184
7185       $ac_path_FGREP_found && break 3
7186     done
7187   done
7188   done
7189 IFS=$as_save_IFS
7190   if test -z "$ac_cv_path_FGREP"; then
7191     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7192   fi
7193 else
7194   ac_cv_path_FGREP=$FGREP
7195 fi
7196
7197    fi
7198 fi
7199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7200 $as_echo "$ac_cv_path_FGREP" >&6; }
7201  FGREP="$ac_cv_path_FGREP"
7202
7203
7204 test -z "$GREP" && GREP=grep
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224 # Check whether --with-gnu-ld was given.
7225 if test "${with_gnu_ld+set}" = set; then :
7226   withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7227 else
7228   with_gnu_ld=no
7229 fi
7230
7231 ac_prog=ld
7232 if test yes = "$GCC"; then
7233   # Check if gcc -print-prog-name=ld gives a path.
7234   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7235 $as_echo_n "checking for ld used by $CC... " >&6; }
7236   case $host in
7237   *-*-mingw*)
7238     # gcc leaves a trailing carriage return, which upsets mingw
7239     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7240   *)
7241     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7242   esac
7243   case $ac_prog in
7244     # Accept absolute paths.
7245     [\\/]* | ?:[\\/]*)
7246       re_direlt='/[^/][^/]*/\.\./'
7247       # Canonicalize the pathname of ld
7248       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7249       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7250         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7251       done
7252       test -z "$LD" && LD=$ac_prog
7253       ;;
7254   "")
7255     # If it fails, then pretend we aren't using GCC.
7256     ac_prog=ld
7257     ;;
7258   *)
7259     # If it is relative, then search for the first ld in PATH.
7260     with_gnu_ld=unknown
7261     ;;
7262   esac
7263 elif test yes = "$with_gnu_ld"; then
7264   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7265 $as_echo_n "checking for GNU ld... " >&6; }
7266 else
7267   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7268 $as_echo_n "checking for non-GNU ld... " >&6; }
7269 fi
7270 if ${lt_cv_path_LD+:} false; then :
7271   $as_echo_n "(cached) " >&6
7272 else
7273   if test -z "$LD"; then
7274   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7275   for ac_dir in $PATH; do
7276     IFS=$lt_save_ifs
7277     test -z "$ac_dir" && ac_dir=.
7278     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7279       lt_cv_path_LD=$ac_dir/$ac_prog
7280       # Check to see if the program is GNU ld.  I'd rather use --version,
7281       # but apparently some variants of GNU ld only accept -v.
7282       # Break only if it was the GNU/non-GNU ld that we prefer.
7283       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7284       *GNU* | *'with BFD'*)
7285         test no != "$with_gnu_ld" && break
7286         ;;
7287       *)
7288         test yes != "$with_gnu_ld" && break
7289         ;;
7290       esac
7291     fi
7292   done
7293   IFS=$lt_save_ifs
7294 else
7295   lt_cv_path_LD=$LD # Let the user override the test with a path.
7296 fi
7297 fi
7298
7299 LD=$lt_cv_path_LD
7300 if test -n "$LD"; then
7301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7302 $as_echo "$LD" >&6; }
7303 else
7304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7305 $as_echo "no" >&6; }
7306 fi
7307 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7309 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7310 if ${lt_cv_prog_gnu_ld+:} false; then :
7311   $as_echo_n "(cached) " >&6
7312 else
7313   # I'd rather use --version here, but apparently some GNU lds only accept -v.
7314 case `$LD -v 2>&1 </dev/null` in
7315 *GNU* | *'with BFD'*)
7316   lt_cv_prog_gnu_ld=yes
7317   ;;
7318 *)
7319   lt_cv_prog_gnu_ld=no
7320   ;;
7321 esac
7322 fi
7323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7324 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
7325 with_gnu_ld=$lt_cv_prog_gnu_ld
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7336 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7337 if ${lt_cv_path_NM+:} false; then :
7338   $as_echo_n "(cached) " >&6
7339 else
7340   if test -n "$NM"; then
7341   # Let the user override the test.
7342   lt_cv_path_NM=$NM
7343 else
7344   lt_nm_to_check=${ac_tool_prefix}nm
7345   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7346     lt_nm_to_check="$lt_nm_to_check nm"
7347   fi
7348   for lt_tmp_nm in $lt_nm_to_check; do
7349     lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7350     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7351       IFS=$lt_save_ifs
7352       test -z "$ac_dir" && ac_dir=.
7353       tmp_nm=$ac_dir/$lt_tmp_nm
7354       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7355         # Check to see if the nm accepts a BSD-compat flag.
7356         # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7357         #   nm: unknown option "B" ignored
7358         # Tru64's nm complains that /dev/null is an invalid object file
7359         # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7360         case $build_os in
7361         mingw*) lt_bad_file=conftest.nm/nofile ;;
7362         *) lt_bad_file=/dev/null ;;
7363         esac
7364         case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7365         *$lt_bad_file* | *'Invalid file or object type'*)
7366           lt_cv_path_NM="$tmp_nm -B"
7367           break 2
7368           ;;
7369         *)
7370           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7371           */dev/null*)
7372             lt_cv_path_NM="$tmp_nm -p"
7373             break 2
7374             ;;
7375           *)
7376             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7377             continue # so that we can try to find one that supports BSD flags
7378             ;;
7379           esac
7380           ;;
7381         esac
7382       fi
7383     done
7384     IFS=$lt_save_ifs
7385   done
7386   : ${lt_cv_path_NM=no}
7387 fi
7388 fi
7389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7390 $as_echo "$lt_cv_path_NM" >&6; }
7391 if test no != "$lt_cv_path_NM"; then
7392   NM=$lt_cv_path_NM
7393 else
7394   # Didn't find any BSD compatible name lister, look for dumpbin.
7395   if test -n "$DUMPBIN"; then :
7396     # Let the user override the test.
7397   else
7398     if test -n "$ac_tool_prefix"; then
7399   for ac_prog in dumpbin "link -dump"
7400   do
7401     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7402 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7404 $as_echo_n "checking for $ac_word... " >&6; }
7405 if ${ac_cv_prog_DUMPBIN+:} false; then :
7406   $as_echo_n "(cached) " >&6
7407 else
7408   if test -n "$DUMPBIN"; then
7409   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7410 else
7411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7412 for as_dir in $PATH
7413 do
7414   IFS=$as_save_IFS
7415   test -z "$as_dir" && as_dir=.
7416     for ac_exec_ext in '' $ac_executable_extensions; do
7417   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7418     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7419     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7420     break 2
7421   fi
7422 done
7423   done
7424 IFS=$as_save_IFS
7425
7426 fi
7427 fi
7428 DUMPBIN=$ac_cv_prog_DUMPBIN
7429 if test -n "$DUMPBIN"; then
7430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7431 $as_echo "$DUMPBIN" >&6; }
7432 else
7433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7434 $as_echo "no" >&6; }
7435 fi
7436
7437
7438     test -n "$DUMPBIN" && break
7439   done
7440 fi
7441 if test -z "$DUMPBIN"; then
7442   ac_ct_DUMPBIN=$DUMPBIN
7443   for ac_prog in dumpbin "link -dump"
7444 do
7445   # Extract the first word of "$ac_prog", so it can be a program name with args.
7446 set dummy $ac_prog; ac_word=$2
7447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7448 $as_echo_n "checking for $ac_word... " >&6; }
7449 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7450   $as_echo_n "(cached) " >&6
7451 else
7452   if test -n "$ac_ct_DUMPBIN"; then
7453   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7454 else
7455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7456 for as_dir in $PATH
7457 do
7458   IFS=$as_save_IFS
7459   test -z "$as_dir" && as_dir=.
7460     for ac_exec_ext in '' $ac_executable_extensions; do
7461   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7462     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7463     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7464     break 2
7465   fi
7466 done
7467   done
7468 IFS=$as_save_IFS
7469
7470 fi
7471 fi
7472 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7473 if test -n "$ac_ct_DUMPBIN"; then
7474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7475 $as_echo "$ac_ct_DUMPBIN" >&6; }
7476 else
7477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7478 $as_echo "no" >&6; }
7479 fi
7480
7481
7482   test -n "$ac_ct_DUMPBIN" && break
7483 done
7484
7485   if test "x$ac_ct_DUMPBIN" = x; then
7486     DUMPBIN=":"
7487   else
7488     case $cross_compiling:$ac_tool_warned in
7489 yes:)
7490 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7491 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7492 ac_tool_warned=yes ;;
7493 esac
7494     DUMPBIN=$ac_ct_DUMPBIN
7495   fi
7496 fi
7497
7498     case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7499     *COFF*)
7500       DUMPBIN="$DUMPBIN -symbols -headers"
7501       ;;
7502     *)
7503       DUMPBIN=:
7504       ;;
7505     esac
7506   fi
7507
7508   if test : != "$DUMPBIN"; then
7509     NM=$DUMPBIN
7510   fi
7511 fi
7512 test -z "$NM" && NM=nm
7513
7514
7515
7516
7517
7518
7519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7520 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
7521 if ${lt_cv_nm_interface+:} false; then :
7522   $as_echo_n "(cached) " >&6
7523 else
7524   lt_cv_nm_interface="BSD nm"
7525   echo "int some_variable = 0;" > conftest.$ac_ext
7526   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7527   (eval "$ac_compile" 2>conftest.err)
7528   cat conftest.err >&5
7529   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7530   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7531   cat conftest.err >&5
7532   (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7533   cat conftest.out >&5
7534   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7535     lt_cv_nm_interface="MS dumpbin"
7536   fi
7537   rm -f conftest*
7538 fi
7539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7540 $as_echo "$lt_cv_nm_interface" >&6; }
7541
7542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7543 $as_echo_n "checking whether ln -s works... " >&6; }
7544 LN_S=$as_ln_s
7545 if test "$LN_S" = "ln -s"; then
7546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7547 $as_echo "yes" >&6; }
7548 else
7549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7550 $as_echo "no, using $LN_S" >&6; }
7551 fi
7552
7553 # find the maximum length of command line arguments
7554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7555 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7556 if ${lt_cv_sys_max_cmd_len+:} false; then :
7557   $as_echo_n "(cached) " >&6
7558 else
7559     i=0
7560   teststring=ABCD
7561
7562   case $build_os in
7563   msdosdjgpp*)
7564     # On DJGPP, this test can blow up pretty badly due to problems in libc
7565     # (any single argument exceeding 2000 bytes causes a buffer overrun
7566     # during glob expansion).  Even if it were fixed, the result of this
7567     # check would be larger than it should be.
7568     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7569     ;;
7570
7571   gnu*)
7572     # Under GNU Hurd, this test is not required because there is
7573     # no limit to the length of command line arguments.
7574     # Libtool will interpret -1 as no limit whatsoever
7575     lt_cv_sys_max_cmd_len=-1;
7576     ;;
7577
7578   cygwin* | mingw* | cegcc*)
7579     # On Win9x/ME, this test blows up -- it succeeds, but takes
7580     # about 5 minutes as the teststring grows exponentially.
7581     # Worse, since 9x/ME are not pre-emptively multitasking,
7582     # you end up with a "frozen" computer, even though with patience
7583     # the test eventually succeeds (with a max line length of 256k).
7584     # Instead, let's just punt: use the minimum linelength reported by
7585     # all of the supported platforms: 8192 (on NT/2K/XP).
7586     lt_cv_sys_max_cmd_len=8192;
7587     ;;
7588
7589   mint*)
7590     # On MiNT this can take a long time and run out of memory.
7591     lt_cv_sys_max_cmd_len=8192;
7592     ;;
7593
7594   amigaos*)
7595     # On AmigaOS with pdksh, this test takes hours, literally.
7596     # So we just punt and use a minimum line length of 8192.
7597     lt_cv_sys_max_cmd_len=8192;
7598     ;;
7599
7600   bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7601     # This has been around since 386BSD, at least.  Likely further.
7602     if test -x /sbin/sysctl; then
7603       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7604     elif test -x /usr/sbin/sysctl; then
7605       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7606     else
7607       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7608     fi
7609     # And add a safety zone
7610     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7611     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7612     ;;
7613
7614   interix*)
7615     # We know the value 262144 and hardcode it with a safety zone (like BSD)
7616     lt_cv_sys_max_cmd_len=196608
7617     ;;
7618
7619   os2*)
7620     # The test takes a long time on OS/2.
7621     lt_cv_sys_max_cmd_len=8192
7622     ;;
7623
7624   osf*)
7625     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7626     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7627     # nice to cause kernel panics so lets avoid the loop below.
7628     # First set a reasonable default.
7629     lt_cv_sys_max_cmd_len=16384
7630     #
7631     if test -x /sbin/sysconfig; then
7632       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7633         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7634       esac
7635     fi
7636     ;;
7637   sco3.2v5*)
7638     lt_cv_sys_max_cmd_len=102400
7639     ;;
7640   sysv5* | sco5v6* | sysv4.2uw2*)
7641     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7642     if test -n "$kargmax"; then
7643       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[  ]//'`
7644     else
7645       lt_cv_sys_max_cmd_len=32768
7646     fi
7647     ;;
7648   *)
7649     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7650     if test -n "$lt_cv_sys_max_cmd_len" && \
7651        test undefined != "$lt_cv_sys_max_cmd_len"; then
7652       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7653       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7654     else
7655       # Make teststring a little bigger before we do anything with it.
7656       # a 1K string should be a reasonable start.
7657       for i in 1 2 3 4 5 6 7 8; do
7658         teststring=$teststring$teststring
7659       done
7660       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7661       # If test is not a shell built-in, we'll probably end up computing a
7662       # maximum length that is only half of the actual maximum length, but
7663       # we can't tell.
7664       while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7665                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7666               test 17 != "$i" # 1/2 MB should be enough
7667       do
7668         i=`expr $i + 1`
7669         teststring=$teststring$teststring
7670       done
7671       # Only check the string length outside the loop.
7672       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7673       teststring=
7674       # Add a significant safety factor because C++ compilers can tack on
7675       # massive amounts of additional arguments before passing them to the
7676       # linker.  It appears as though 1/2 is a usable value.
7677       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7678     fi
7679     ;;
7680   esac
7681
7682 fi
7683
7684 if test -n "$lt_cv_sys_max_cmd_len"; then
7685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7686 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7687 else
7688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7689 $as_echo "none" >&6; }
7690 fi
7691 max_cmd_len=$lt_cv_sys_max_cmd_len
7692
7693
7694
7695
7696
7697
7698 : ${CP="cp -f"}
7699 : ${MV="mv -f"}
7700 : ${RM="rm -f"}
7701
7702 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7703   lt_unset=unset
7704 else
7705   lt_unset=false
7706 fi
7707
7708
7709
7710
7711
7712 # test EBCDIC or ASCII
7713 case `echo X|tr X '\101'` in
7714  A) # ASCII based system
7715     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7716   lt_SP2NL='tr \040 \012'
7717   lt_NL2SP='tr \015\012 \040\040'
7718   ;;
7719  *) # EBCDIC based system
7720   lt_SP2NL='tr \100 \n'
7721   lt_NL2SP='tr \r\n \100\100'
7722   ;;
7723 esac
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7734 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7735 if ${lt_cv_to_host_file_cmd+:} false; then :
7736   $as_echo_n "(cached) " >&6
7737 else
7738   case $host in
7739   *-*-mingw* )
7740     case $build in
7741       *-*-mingw* ) # actually msys
7742         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7743         ;;
7744       *-*-cygwin* )
7745         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7746         ;;
7747       * ) # otherwise, assume *nix
7748         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7749         ;;
7750     esac
7751     ;;
7752   *-*-cygwin* )
7753     case $build in
7754       *-*-mingw* ) # actually msys
7755         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7756         ;;
7757       *-*-cygwin* )
7758         lt_cv_to_host_file_cmd=func_convert_file_noop
7759         ;;
7760       * ) # otherwise, assume *nix
7761         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7762         ;;
7763     esac
7764     ;;
7765   * ) # unhandled hosts (and "normal" native builds)
7766     lt_cv_to_host_file_cmd=func_convert_file_noop
7767     ;;
7768 esac
7769
7770 fi
7771
7772 to_host_file_cmd=$lt_cv_to_host_file_cmd
7773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7774 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
7775
7776
7777
7778
7779
7780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7781 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7782 if ${lt_cv_to_tool_file_cmd+:} false; then :
7783   $as_echo_n "(cached) " >&6
7784 else
7785   #assume ordinary cross tools, or native build.
7786 lt_cv_to_tool_file_cmd=func_convert_file_noop
7787 case $host in
7788   *-*-mingw* )
7789     case $build in
7790       *-*-mingw* ) # actually msys
7791         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7792         ;;
7793     esac
7794     ;;
7795 esac
7796
7797 fi
7798
7799 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7801 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7802
7803
7804
7805
7806
7807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7808 $as_echo_n "checking for $LD option to reload object files... " >&6; }
7809 if ${lt_cv_ld_reload_flag+:} false; then :
7810   $as_echo_n "(cached) " >&6
7811 else
7812   lt_cv_ld_reload_flag='-r'
7813 fi
7814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7815 $as_echo "$lt_cv_ld_reload_flag" >&6; }
7816 reload_flag=$lt_cv_ld_reload_flag
7817 case $reload_flag in
7818 "" | " "*) ;;
7819 *) reload_flag=" $reload_flag" ;;
7820 esac
7821 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7822 case $host_os in
7823   cygwin* | mingw* | pw32* | cegcc*)
7824     if test yes != "$GCC"; then
7825       reload_cmds=false
7826     fi
7827     ;;
7828   darwin*)
7829     if test yes = "$GCC"; then
7830       reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7831     else
7832       reload_cmds='$LD$reload_flag -o $output$reload_objs'
7833     fi
7834     ;;
7835 esac
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845 if test -n "$ac_tool_prefix"; then
7846   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7847 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7849 $as_echo_n "checking for $ac_word... " >&6; }
7850 if ${ac_cv_prog_OBJDUMP+:} false; then :
7851   $as_echo_n "(cached) " >&6
7852 else
7853   if test -n "$OBJDUMP"; then
7854   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7855 else
7856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7857 for as_dir in $PATH
7858 do
7859   IFS=$as_save_IFS
7860   test -z "$as_dir" && as_dir=.
7861     for ac_exec_ext in '' $ac_executable_extensions; do
7862   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7863     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7864     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7865     break 2
7866   fi
7867 done
7868   done
7869 IFS=$as_save_IFS
7870
7871 fi
7872 fi
7873 OBJDUMP=$ac_cv_prog_OBJDUMP
7874 if test -n "$OBJDUMP"; then
7875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7876 $as_echo "$OBJDUMP" >&6; }
7877 else
7878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7879 $as_echo "no" >&6; }
7880 fi
7881
7882
7883 fi
7884 if test -z "$ac_cv_prog_OBJDUMP"; then
7885   ac_ct_OBJDUMP=$OBJDUMP
7886   # Extract the first word of "objdump", so it can be a program name with args.
7887 set dummy objdump; ac_word=$2
7888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7889 $as_echo_n "checking for $ac_word... " >&6; }
7890 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7891   $as_echo_n "(cached) " >&6
7892 else
7893   if test -n "$ac_ct_OBJDUMP"; then
7894   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7895 else
7896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7897 for as_dir in $PATH
7898 do
7899   IFS=$as_save_IFS
7900   test -z "$as_dir" && as_dir=.
7901     for ac_exec_ext in '' $ac_executable_extensions; do
7902   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7903     ac_cv_prog_ac_ct_OBJDUMP="objdump"
7904     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7905     break 2
7906   fi
7907 done
7908   done
7909 IFS=$as_save_IFS
7910
7911 fi
7912 fi
7913 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7914 if test -n "$ac_ct_OBJDUMP"; then
7915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7916 $as_echo "$ac_ct_OBJDUMP" >&6; }
7917 else
7918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7919 $as_echo "no" >&6; }
7920 fi
7921
7922   if test "x$ac_ct_OBJDUMP" = x; then
7923     OBJDUMP="false"
7924   else
7925     case $cross_compiling:$ac_tool_warned in
7926 yes:)
7927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7928 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7929 ac_tool_warned=yes ;;
7930 esac
7931     OBJDUMP=$ac_ct_OBJDUMP
7932   fi
7933 else
7934   OBJDUMP="$ac_cv_prog_OBJDUMP"
7935 fi
7936
7937 test -z "$OBJDUMP" && OBJDUMP=objdump
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7948 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
7949 if ${lt_cv_deplibs_check_method+:} false; then :
7950   $as_echo_n "(cached) " >&6
7951 else
7952   lt_cv_file_magic_cmd='$MAGIC_CMD'
7953 lt_cv_file_magic_test_file=
7954 lt_cv_deplibs_check_method='unknown'
7955 # Need to set the preceding variable on all platforms that support
7956 # interlibrary dependencies.
7957 # 'none' -- dependencies not supported.
7958 # 'unknown' -- same as none, but documents that we really don't know.
7959 # 'pass_all' -- all dependencies passed with no checks.
7960 # 'test_compile' -- check by making test program.
7961 # 'file_magic [[regex]]' -- check by looking for files in library path
7962 # that responds to the $file_magic_cmd with a given extended regex.
7963 # If you have 'file' or equivalent on your system and you're not sure
7964 # whether 'pass_all' will *always* work, you probably want this one.
7965
7966 case $host_os in
7967 aix[4-9]*)
7968   lt_cv_deplibs_check_method=pass_all
7969   ;;
7970
7971 beos*)
7972   lt_cv_deplibs_check_method=pass_all
7973   ;;
7974
7975 bsdi[45]*)
7976   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
7977   lt_cv_file_magic_cmd='/usr/bin/file -L'
7978   lt_cv_file_magic_test_file=/shlib/libc.so
7979   ;;
7980
7981 cygwin*)
7982   # func_win32_libid is a shell function defined in ltmain.sh
7983   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7984   lt_cv_file_magic_cmd='func_win32_libid'
7985   ;;
7986
7987 mingw* | pw32*)
7988   # Base MSYS/MinGW do not provide the 'file' command needed by
7989   # func_win32_libid shell function, so use a weaker test based on 'objdump',
7990   # unless we find 'file', for example because we are cross-compiling.
7991   if ( file / ) >/dev/null 2>&1; then
7992     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7993     lt_cv_file_magic_cmd='func_win32_libid'
7994   else
7995     # Keep this pattern in sync with the one in func_win32_libid.
7996     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
7997     lt_cv_file_magic_cmd='$OBJDUMP -f'
7998   fi
7999   ;;
8000
8001 cegcc*)
8002   # use the weaker test based on 'objdump'. See mingw*.
8003   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
8004   lt_cv_file_magic_cmd='$OBJDUMP -f'
8005   ;;
8006
8007 darwin* | rhapsody*)
8008   lt_cv_deplibs_check_method=pass_all
8009   ;;
8010
8011 freebsd* | dragonfly*)
8012   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8013     case $host_cpu in
8014     i*86 )
8015       # Not sure whether the presence of OpenBSD here was a mistake.
8016       # Let's accept both of them until this is cleared up.
8017       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
8018       lt_cv_file_magic_cmd=/usr/bin/file
8019       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8020       ;;
8021     esac
8022   else
8023     lt_cv_deplibs_check_method=pass_all
8024   fi
8025   ;;
8026
8027 haiku*)
8028   lt_cv_deplibs_check_method=pass_all
8029   ;;
8030
8031 hpux10.20* | hpux11*)
8032   lt_cv_file_magic_cmd=/usr/bin/file
8033   case $host_cpu in
8034   ia64*)
8035     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
8036     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
8037     ;;
8038   hppa*64*)
8039     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]'
8040     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
8041     ;;
8042   *)
8043     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
8044     lt_cv_file_magic_test_file=/usr/lib/libc.sl
8045     ;;
8046   esac
8047   ;;
8048
8049 interix[3-9]*)
8050   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8051   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
8052   ;;
8053
8054 irix5* | irix6* | nonstopux*)
8055   case $LD in
8056   *-32|*"-32 ") libmagic=32-bit;;
8057   *-n32|*"-n32 ") libmagic=N32;;
8058   *-64|*"-64 ") libmagic=64-bit;;
8059   *) libmagic=never-match;;
8060   esac
8061   lt_cv_deplibs_check_method=pass_all
8062   ;;
8063
8064 # This must be glibc/ELF.
8065 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8066   lt_cv_deplibs_check_method=pass_all
8067   ;;
8068
8069 netbsd*)
8070   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8071     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8072   else
8073     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
8074   fi
8075   ;;
8076
8077 newos6*)
8078   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
8079   lt_cv_file_magic_cmd=/usr/bin/file
8080   lt_cv_file_magic_test_file=/usr/lib/libnls.so
8081   ;;
8082
8083 *nto* | *qnx*)
8084   lt_cv_deplibs_check_method=pass_all
8085   ;;
8086
8087 openbsd* | bitrig*)
8088   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
8089     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
8090   else
8091     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8092   fi
8093   ;;
8094
8095 osf3* | osf4* | osf5*)
8096   lt_cv_deplibs_check_method=pass_all
8097   ;;
8098
8099 rdos*)
8100   lt_cv_deplibs_check_method=pass_all
8101   ;;
8102
8103 solaris*)
8104   lt_cv_deplibs_check_method=pass_all
8105   ;;
8106
8107 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8108   lt_cv_deplibs_check_method=pass_all
8109   ;;
8110
8111 sysv4 | sysv4.3*)
8112   case $host_vendor in
8113   motorola)
8114     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]'
8115     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8116     ;;
8117   ncr)
8118     lt_cv_deplibs_check_method=pass_all
8119     ;;
8120   sequent)
8121     lt_cv_file_magic_cmd='/bin/file'
8122     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
8123     ;;
8124   sni)
8125     lt_cv_file_magic_cmd='/bin/file'
8126     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
8127     lt_cv_file_magic_test_file=/lib/libc.so
8128     ;;
8129   siemens)
8130     lt_cv_deplibs_check_method=pass_all
8131     ;;
8132   pc)
8133     lt_cv_deplibs_check_method=pass_all
8134     ;;
8135   esac
8136   ;;
8137
8138 tpf*)
8139   lt_cv_deplibs_check_method=pass_all
8140   ;;
8141 os2*)
8142   lt_cv_deplibs_check_method=pass_all
8143   ;;
8144 esac
8145
8146 fi
8147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
8148 $as_echo "$lt_cv_deplibs_check_method" >&6; }
8149
8150 file_magic_glob=
8151 want_nocaseglob=no
8152 if test "$build" = "$host"; then
8153   case $host_os in
8154   mingw* | pw32*)
8155     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
8156       want_nocaseglob=yes
8157     else
8158       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
8159     fi
8160     ;;
8161   esac
8162 fi
8163
8164 file_magic_cmd=$lt_cv_file_magic_cmd
8165 deplibs_check_method=$lt_cv_deplibs_check_method
8166 test -z "$deplibs_check_method" && deplibs_check_method=unknown
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189 if test -n "$ac_tool_prefix"; then
8190   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8191 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8193 $as_echo_n "checking for $ac_word... " >&6; }
8194 if ${ac_cv_prog_DLLTOOL+:} false; then :
8195   $as_echo_n "(cached) " >&6
8196 else
8197   if test -n "$DLLTOOL"; then
8198   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8199 else
8200 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8201 for as_dir in $PATH
8202 do
8203   IFS=$as_save_IFS
8204   test -z "$as_dir" && as_dir=.
8205     for ac_exec_ext in '' $ac_executable_extensions; do
8206   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8207     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8209     break 2
8210   fi
8211 done
8212   done
8213 IFS=$as_save_IFS
8214
8215 fi
8216 fi
8217 DLLTOOL=$ac_cv_prog_DLLTOOL
8218 if test -n "$DLLTOOL"; then
8219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8220 $as_echo "$DLLTOOL" >&6; }
8221 else
8222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8223 $as_echo "no" >&6; }
8224 fi
8225
8226
8227 fi
8228 if test -z "$ac_cv_prog_DLLTOOL"; then
8229   ac_ct_DLLTOOL=$DLLTOOL
8230   # Extract the first word of "dlltool", so it can be a program name with args.
8231 set dummy dlltool; ac_word=$2
8232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8233 $as_echo_n "checking for $ac_word... " >&6; }
8234 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8235   $as_echo_n "(cached) " >&6
8236 else
8237   if test -n "$ac_ct_DLLTOOL"; then
8238   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8239 else
8240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8241 for as_dir in $PATH
8242 do
8243   IFS=$as_save_IFS
8244   test -z "$as_dir" && as_dir=.
8245     for ac_exec_ext in '' $ac_executable_extensions; do
8246   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8247     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8248     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8249     break 2
8250   fi
8251 done
8252   done
8253 IFS=$as_save_IFS
8254
8255 fi
8256 fi
8257 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8258 if test -n "$ac_ct_DLLTOOL"; then
8259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8260 $as_echo "$ac_ct_DLLTOOL" >&6; }
8261 else
8262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8263 $as_echo "no" >&6; }
8264 fi
8265
8266   if test "x$ac_ct_DLLTOOL" = x; then
8267     DLLTOOL="false"
8268   else
8269     case $cross_compiling:$ac_tool_warned in
8270 yes:)
8271 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8272 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8273 ac_tool_warned=yes ;;
8274 esac
8275     DLLTOOL=$ac_ct_DLLTOOL
8276   fi
8277 else
8278   DLLTOOL="$ac_cv_prog_DLLTOOL"
8279 fi
8280
8281 test -z "$DLLTOOL" && DLLTOOL=dlltool
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8293 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8294 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8295   $as_echo_n "(cached) " >&6
8296 else
8297   lt_cv_sharedlib_from_linklib_cmd='unknown'
8298
8299 case $host_os in
8300 cygwin* | mingw* | pw32* | cegcc*)
8301   # two different shell functions defined in ltmain.sh;
8302   # decide which one to use based on capabilities of $DLLTOOL
8303   case `$DLLTOOL --help 2>&1` in
8304   *--identify-strict*)
8305     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8306     ;;
8307   *)
8308     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8309     ;;
8310   esac
8311   ;;
8312 *)
8313   # fallback: assume linklib IS sharedlib
8314   lt_cv_sharedlib_from_linklib_cmd=$ECHO
8315   ;;
8316 esac
8317
8318 fi
8319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8320 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8321 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8322 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8323
8324
8325
8326
8327
8328
8329
8330 if test -n "$ac_tool_prefix"; then
8331   for ac_prog in ar
8332   do
8333     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8334 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8336 $as_echo_n "checking for $ac_word... " >&6; }
8337 if ${ac_cv_prog_AR+:} false; then :
8338   $as_echo_n "(cached) " >&6
8339 else
8340   if test -n "$AR"; then
8341   ac_cv_prog_AR="$AR" # Let the user override the test.
8342 else
8343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8344 for as_dir in $PATH
8345 do
8346   IFS=$as_save_IFS
8347   test -z "$as_dir" && as_dir=.
8348     for ac_exec_ext in '' $ac_executable_extensions; do
8349   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8350     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8351     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8352     break 2
8353   fi
8354 done
8355   done
8356 IFS=$as_save_IFS
8357
8358 fi
8359 fi
8360 AR=$ac_cv_prog_AR
8361 if test -n "$AR"; then
8362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8363 $as_echo "$AR" >&6; }
8364 else
8365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8366 $as_echo "no" >&6; }
8367 fi
8368
8369
8370     test -n "$AR" && break
8371   done
8372 fi
8373 if test -z "$AR"; then
8374   ac_ct_AR=$AR
8375   for ac_prog in ar
8376 do
8377   # Extract the first word of "$ac_prog", so it can be a program name with args.
8378 set dummy $ac_prog; ac_word=$2
8379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8380 $as_echo_n "checking for $ac_word... " >&6; }
8381 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8382   $as_echo_n "(cached) " >&6
8383 else
8384   if test -n "$ac_ct_AR"; then
8385   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8386 else
8387 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8388 for as_dir in $PATH
8389 do
8390   IFS=$as_save_IFS
8391   test -z "$as_dir" && as_dir=.
8392     for ac_exec_ext in '' $ac_executable_extensions; do
8393   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8394     ac_cv_prog_ac_ct_AR="$ac_prog"
8395     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8396     break 2
8397   fi
8398 done
8399   done
8400 IFS=$as_save_IFS
8401
8402 fi
8403 fi
8404 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8405 if test -n "$ac_ct_AR"; then
8406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8407 $as_echo "$ac_ct_AR" >&6; }
8408 else
8409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8410 $as_echo "no" >&6; }
8411 fi
8412
8413
8414   test -n "$ac_ct_AR" && break
8415 done
8416
8417   if test "x$ac_ct_AR" = x; then
8418     AR="false"
8419   else
8420     case $cross_compiling:$ac_tool_warned in
8421 yes:)
8422 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8423 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8424 ac_tool_warned=yes ;;
8425 esac
8426     AR=$ac_ct_AR
8427   fi
8428 fi
8429
8430 : ${AR=ar}
8431 : ${AR_FLAGS=cru}
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8444 $as_echo_n "checking for archiver @FILE support... " >&6; }
8445 if ${lt_cv_ar_at_file+:} false; then :
8446   $as_echo_n "(cached) " >&6
8447 else
8448   lt_cv_ar_at_file=no
8449    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8450 /* end confdefs.h.  */
8451
8452 int
8453 main ()
8454 {
8455
8456   ;
8457   return 0;
8458 }
8459 _ACEOF
8460 if ac_fn_c_try_compile "$LINENO"; then :
8461   echo conftest.$ac_objext > conftest.lst
8462       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8463       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8464   (eval $lt_ar_try) 2>&5
8465   ac_status=$?
8466   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8467   test $ac_status = 0; }
8468       if test 0 -eq "$ac_status"; then
8469         # Ensure the archiver fails upon bogus file names.
8470         rm -f conftest.$ac_objext libconftest.a
8471         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8472   (eval $lt_ar_try) 2>&5
8473   ac_status=$?
8474   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8475   test $ac_status = 0; }
8476         if test 0 -ne "$ac_status"; then
8477           lt_cv_ar_at_file=@
8478         fi
8479       fi
8480       rm -f conftest.* libconftest.a
8481
8482 fi
8483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8484
8485 fi
8486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8487 $as_echo "$lt_cv_ar_at_file" >&6; }
8488
8489 if test no = "$lt_cv_ar_at_file"; then
8490   archiver_list_spec=
8491 else
8492   archiver_list_spec=$lt_cv_ar_at_file
8493 fi
8494
8495
8496
8497
8498
8499
8500
8501 if test -n "$ac_tool_prefix"; then
8502   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8503 set dummy ${ac_tool_prefix}strip; ac_word=$2
8504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8505 $as_echo_n "checking for $ac_word... " >&6; }
8506 if ${ac_cv_prog_STRIP+:} false; then :
8507   $as_echo_n "(cached) " >&6
8508 else
8509   if test -n "$STRIP"; then
8510   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8511 else
8512 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8513 for as_dir in $PATH
8514 do
8515   IFS=$as_save_IFS
8516   test -z "$as_dir" && as_dir=.
8517     for ac_exec_ext in '' $ac_executable_extensions; do
8518   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8519     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8520     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8521     break 2
8522   fi
8523 done
8524   done
8525 IFS=$as_save_IFS
8526
8527 fi
8528 fi
8529 STRIP=$ac_cv_prog_STRIP
8530 if test -n "$STRIP"; then
8531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8532 $as_echo "$STRIP" >&6; }
8533 else
8534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8535 $as_echo "no" >&6; }
8536 fi
8537
8538
8539 fi
8540 if test -z "$ac_cv_prog_STRIP"; then
8541   ac_ct_STRIP=$STRIP
8542   # Extract the first word of "strip", so it can be a program name with args.
8543 set dummy strip; ac_word=$2
8544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8545 $as_echo_n "checking for $ac_word... " >&6; }
8546 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8547   $as_echo_n "(cached) " >&6
8548 else
8549   if test -n "$ac_ct_STRIP"; then
8550   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8551 else
8552 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8553 for as_dir in $PATH
8554 do
8555   IFS=$as_save_IFS
8556   test -z "$as_dir" && as_dir=.
8557     for ac_exec_ext in '' $ac_executable_extensions; do
8558   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8559     ac_cv_prog_ac_ct_STRIP="strip"
8560     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8561     break 2
8562   fi
8563 done
8564   done
8565 IFS=$as_save_IFS
8566
8567 fi
8568 fi
8569 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8570 if test -n "$ac_ct_STRIP"; then
8571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8572 $as_echo "$ac_ct_STRIP" >&6; }
8573 else
8574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8575 $as_echo "no" >&6; }
8576 fi
8577
8578   if test "x$ac_ct_STRIP" = x; then
8579     STRIP=":"
8580   else
8581     case $cross_compiling:$ac_tool_warned in
8582 yes:)
8583 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8584 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8585 ac_tool_warned=yes ;;
8586 esac
8587     STRIP=$ac_ct_STRIP
8588   fi
8589 else
8590   STRIP="$ac_cv_prog_STRIP"
8591 fi
8592
8593 test -z "$STRIP" && STRIP=:
8594
8595
8596
8597
8598
8599
8600 if test -n "$ac_tool_prefix"; then
8601   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8602 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8604 $as_echo_n "checking for $ac_word... " >&6; }
8605 if ${ac_cv_prog_RANLIB+:} false; then :
8606   $as_echo_n "(cached) " >&6
8607 else
8608   if test -n "$RANLIB"; then
8609   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8610 else
8611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8612 for as_dir in $PATH
8613 do
8614   IFS=$as_save_IFS
8615   test -z "$as_dir" && as_dir=.
8616     for ac_exec_ext in '' $ac_executable_extensions; do
8617   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8618     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8619     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8620     break 2
8621   fi
8622 done
8623   done
8624 IFS=$as_save_IFS
8625
8626 fi
8627 fi
8628 RANLIB=$ac_cv_prog_RANLIB
8629 if test -n "$RANLIB"; then
8630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8631 $as_echo "$RANLIB" >&6; }
8632 else
8633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8634 $as_echo "no" >&6; }
8635 fi
8636
8637
8638 fi
8639 if test -z "$ac_cv_prog_RANLIB"; then
8640   ac_ct_RANLIB=$RANLIB
8641   # Extract the first word of "ranlib", so it can be a program name with args.
8642 set dummy ranlib; ac_word=$2
8643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8644 $as_echo_n "checking for $ac_word... " >&6; }
8645 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8646   $as_echo_n "(cached) " >&6
8647 else
8648   if test -n "$ac_ct_RANLIB"; then
8649   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8650 else
8651 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8652 for as_dir in $PATH
8653 do
8654   IFS=$as_save_IFS
8655   test -z "$as_dir" && as_dir=.
8656     for ac_exec_ext in '' $ac_executable_extensions; do
8657   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8658     ac_cv_prog_ac_ct_RANLIB="ranlib"
8659     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8660     break 2
8661   fi
8662 done
8663   done
8664 IFS=$as_save_IFS
8665
8666 fi
8667 fi
8668 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8669 if test -n "$ac_ct_RANLIB"; then
8670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8671 $as_echo "$ac_ct_RANLIB" >&6; }
8672 else
8673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8674 $as_echo "no" >&6; }
8675 fi
8676
8677   if test "x$ac_ct_RANLIB" = x; then
8678     RANLIB=":"
8679   else
8680     case $cross_compiling:$ac_tool_warned in
8681 yes:)
8682 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8683 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8684 ac_tool_warned=yes ;;
8685 esac
8686     RANLIB=$ac_ct_RANLIB
8687   fi
8688 else
8689   RANLIB="$ac_cv_prog_RANLIB"
8690 fi
8691
8692 test -z "$RANLIB" && RANLIB=:
8693
8694
8695
8696
8697
8698
8699 # Determine commands to create old-style static archives.
8700 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8701 old_postinstall_cmds='chmod 644 $oldlib'
8702 old_postuninstall_cmds=
8703
8704 if test -n "$RANLIB"; then
8705   case $host_os in
8706   bitrig* | openbsd*)
8707     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8708     ;;
8709   *)
8710     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8711     ;;
8712   esac
8713   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8714 fi
8715
8716 case $host_os in
8717   darwin*)
8718     lock_old_archive_extraction=yes ;;
8719   *)
8720     lock_old_archive_extraction=no ;;
8721 esac
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743 for ac_prog in gawk mawk nawk awk
8744 do
8745   # Extract the first word of "$ac_prog", so it can be a program name with args.
8746 set dummy $ac_prog; ac_word=$2
8747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8748 $as_echo_n "checking for $ac_word... " >&6; }
8749 if ${ac_cv_prog_AWK+:} false; then :
8750   $as_echo_n "(cached) " >&6
8751 else
8752   if test -n "$AWK"; then
8753   ac_cv_prog_AWK="$AWK" # Let the user override the test.
8754 else
8755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8756 for as_dir in $PATH
8757 do
8758   IFS=$as_save_IFS
8759   test -z "$as_dir" && as_dir=.
8760     for ac_exec_ext in '' $ac_executable_extensions; do
8761   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8762     ac_cv_prog_AWK="$ac_prog"
8763     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8764     break 2
8765   fi
8766 done
8767   done
8768 IFS=$as_save_IFS
8769
8770 fi
8771 fi
8772 AWK=$ac_cv_prog_AWK
8773 if test -n "$AWK"; then
8774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8775 $as_echo "$AWK" >&6; }
8776 else
8777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8778 $as_echo "no" >&6; }
8779 fi
8780
8781
8782   test -n "$AWK" && break
8783 done
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803 # If no C compiler was specified, use CC.
8804 LTCC=${LTCC-"$CC"}
8805
8806 # If no C compiler flags were specified, use CFLAGS.
8807 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8808
8809 # Allow CC to be a program name with arguments.
8810 compiler=$CC
8811
8812
8813 # Check for command to grab the raw symbol name followed by C symbol from nm.
8814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8815 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8816 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8817   $as_echo_n "(cached) " >&6
8818 else
8819
8820 # These are sane defaults that work on at least a few old systems.
8821 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8822
8823 # Character class describing NM global symbol codes.
8824 symcode='[BCDEGRST]'
8825
8826 # Regexp to match symbols that can be accessed directly from C.
8827 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8828
8829 # Define system-specific variables.
8830 case $host_os in
8831 aix*)
8832   symcode='[BCDT]'
8833   ;;
8834 cygwin* | mingw* | pw32* | cegcc*)
8835   symcode='[ABCDGISTW]'
8836   ;;
8837 hpux*)
8838   if test ia64 = "$host_cpu"; then
8839     symcode='[ABCDEGRST]'
8840   fi
8841   ;;
8842 irix* | nonstopux*)
8843   symcode='[BCDEGRST]'
8844   ;;
8845 osf*)
8846   symcode='[BCDEGQRST]'
8847   ;;
8848 solaris*)
8849   symcode='[BDRT]'
8850   ;;
8851 sco3.2v5*)
8852   symcode='[DT]'
8853   ;;
8854 sysv4.2uw2*)
8855   symcode='[DT]'
8856   ;;
8857 sysv5* | sco5v6* | unixware* | OpenUNIX*)
8858   symcode='[ABDT]'
8859   ;;
8860 sysv4)
8861   symcode='[DFNSTU]'
8862   ;;
8863 esac
8864
8865 # If we're using GNU nm, then use its standard symbol codes.
8866 case `$NM -V 2>&1` in
8867 *GNU* | *'with BFD'*)
8868   symcode='[ABCDGIRSTW]' ;;
8869 esac
8870
8871 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8872   # Gets list of data symbols to import.
8873   lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8874   # Adjust the below global symbol transforms to fixup imported variables.
8875   lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8876   lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
8877   lt_c_name_lib_hook="\
8878   -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
8879   -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
8880 else
8881   # Disable hooks by default.
8882   lt_cv_sys_global_symbol_to_import=
8883   lt_cdecl_hook=
8884   lt_c_name_hook=
8885   lt_c_name_lib_hook=
8886 fi
8887
8888 # Transform an extracted symbol line into a proper C declaration.
8889 # Some systems (esp. on ia64) link data and code symbols differently,
8890 # so use this general approach.
8891 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8892 $lt_cdecl_hook\
8893 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8894 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8895
8896 # Transform an extracted symbol line into symbol name and symbol address
8897 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8898 $lt_c_name_hook\
8899 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8900 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8901
8902 # Transform an extracted symbol line into symbol name with lib prefix and
8903 # symbol address.
8904 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8905 $lt_c_name_lib_hook\
8906 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8907 " -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8908 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8909
8910 # Handle CRLF in mingw tool chain
8911 opt_cr=
8912 case $build_os in
8913 mingw*)
8914   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8915   ;;
8916 esac
8917
8918 # Try without a prefix underscore, then with it.
8919 for ac_symprfx in "" "_"; do
8920
8921   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8922   symxfrm="\\1 $ac_symprfx\\2 \\2"
8923
8924   # Write the raw and C identifiers.
8925   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8926     # Fake it for dumpbin and say T for any non-static function,
8927     # D for any global variable and I for any imported variable.
8928     # Also find C++ and __fastcall symbols from MSVC++,
8929     # which start with @ or ?.
8930     lt_cv_sys_global_symbol_pipe="$AWK '"\
8931 "     {last_section=section; section=\$ 3};"\
8932 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8933 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8934 "     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8935 "     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8936 "     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8937 "     \$ 0!~/External *\|/{next};"\
8938 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8939 "     {if(hide[section]) next};"\
8940 "     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8941 "     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8942 "     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8943 "     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8944 "     ' prfx=^$ac_symprfx"
8945   else
8946     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8947   fi
8948   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8949
8950   # Check to see that the pipe works correctly.
8951   pipe_works=no
8952
8953   rm -f conftest*
8954   cat > conftest.$ac_ext <<_LT_EOF
8955 #ifdef __cplusplus
8956 extern "C" {
8957 #endif
8958 char nm_test_var;
8959 void nm_test_func(void);
8960 void nm_test_func(void){}
8961 #ifdef __cplusplus
8962 }
8963 #endif
8964 int main(){nm_test_var='a';nm_test_func();return(0);}
8965 _LT_EOF
8966
8967   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8968   (eval $ac_compile) 2>&5
8969   ac_status=$?
8970   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8971   test $ac_status = 0; }; then
8972     # Now try to grab the symbols.
8973     nlist=conftest.nm
8974     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
8975   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
8976   ac_status=$?
8977   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8978   test $ac_status = 0; } && test -s "$nlist"; then
8979       # Try sorting and uniquifying the output.
8980       if sort "$nlist" | uniq > "$nlist"T; then
8981         mv -f "$nlist"T "$nlist"
8982       else
8983         rm -f "$nlist"T
8984       fi
8985
8986       # Make sure that we snagged all the symbols we need.
8987       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
8988         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
8989           cat <<_LT_EOF > conftest.$ac_ext
8990 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
8991 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
8992 /* DATA imports from DLLs on WIN32 can't be const, because runtime
8993    relocations are performed -- see ld's documentation on pseudo-relocs.  */
8994 # define LT_DLSYM_CONST
8995 #elif defined __osf__
8996 /* This system does not cope well with relocations in const data.  */
8997 # define LT_DLSYM_CONST
8998 #else
8999 # define LT_DLSYM_CONST const
9000 #endif
9001
9002 #ifdef __cplusplus
9003 extern "C" {
9004 #endif
9005
9006 _LT_EOF
9007           # Now generate the symbol file.
9008           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
9009
9010           cat <<_LT_EOF >> conftest.$ac_ext
9011
9012 /* The mapping between symbol names and symbols.  */
9013 LT_DLSYM_CONST struct {
9014   const char *name;
9015   void       *address;
9016 }
9017 lt__PROGRAM__LTX_preloaded_symbols[] =
9018 {
9019   { "@PROGRAM@", (void *) 0 },
9020 _LT_EOF
9021           $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
9022           cat <<\_LT_EOF >> conftest.$ac_ext
9023   {0, (void *) 0}
9024 };
9025
9026 /* This works around a problem in FreeBSD linker */
9027 #ifdef FREEBSD_WORKAROUND
9028 static const void *lt_preloaded_setup() {
9029   return lt__PROGRAM__LTX_preloaded_symbols;
9030 }
9031 #endif
9032
9033 #ifdef __cplusplus
9034 }
9035 #endif
9036 _LT_EOF
9037           # Now try linking the two files.
9038           mv conftest.$ac_objext conftstm.$ac_objext
9039           lt_globsym_save_LIBS=$LIBS
9040           lt_globsym_save_CFLAGS=$CFLAGS
9041           LIBS=conftstm.$ac_objext
9042           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
9043           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9044   (eval $ac_link) 2>&5
9045   ac_status=$?
9046   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9047   test $ac_status = 0; } && test -s conftest$ac_exeext; then
9048             pipe_works=yes
9049           fi
9050           LIBS=$lt_globsym_save_LIBS
9051           CFLAGS=$lt_globsym_save_CFLAGS
9052         else
9053           echo "cannot find nm_test_func in $nlist" >&5
9054         fi
9055       else
9056         echo "cannot find nm_test_var in $nlist" >&5
9057       fi
9058     else
9059       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
9060     fi
9061   else
9062     echo "$progname: failed program was:" >&5
9063     cat conftest.$ac_ext >&5
9064   fi
9065   rm -rf conftest* conftst*
9066
9067   # Do not use the global_symbol_pipe unless it works.
9068   if test yes = "$pipe_works"; then
9069     break
9070   else
9071     lt_cv_sys_global_symbol_pipe=
9072   fi
9073 done
9074
9075 fi
9076
9077 if test -z "$lt_cv_sys_global_symbol_pipe"; then
9078   lt_cv_sys_global_symbol_to_cdecl=
9079 fi
9080 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
9082 $as_echo "failed" >&6; }
9083 else
9084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9085 $as_echo "ok" >&6; }
9086 fi
9087
9088 # Response file support.
9089 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9090   nm_file_list_spec='@'
9091 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
9092   nm_file_list_spec='@'
9093 fi
9094
9095
9096
9097
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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
9132 $as_echo_n "checking for sysroot... " >&6; }
9133
9134 # Check whether --with-sysroot was given.
9135 if test "${with_sysroot+set}" = set; then :
9136   withval=$with_sysroot;
9137 else
9138   with_sysroot=no
9139 fi
9140
9141
9142 lt_sysroot=
9143 case $with_sysroot in #(
9144  yes)
9145    if test yes = "$GCC"; then
9146      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
9147    fi
9148    ;; #(
9149  /*)
9150    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
9151    ;; #(
9152  no|'')
9153    ;; #(
9154  *)
9155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
9156 $as_echo "$with_sysroot" >&6; }
9157    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
9158    ;;
9159 esac
9160
9161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
9162 $as_echo "${lt_sysroot:-no}" >&6; }
9163
9164
9165
9166
9167
9168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
9169 $as_echo_n "checking for a working dd... " >&6; }
9170 if ${ac_cv_path_lt_DD+:} false; then :
9171   $as_echo_n "(cached) " >&6
9172 else
9173   printf 0123456789abcdef0123456789abcdef >conftest.i
9174 cat conftest.i conftest.i >conftest2.i
9175 : ${lt_DD:=$DD}
9176 if test -z "$lt_DD"; then
9177   ac_path_lt_DD_found=false
9178   # Loop through the user's path and test for each of PROGNAME-LIST
9179   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9180 for as_dir in $PATH
9181 do
9182   IFS=$as_save_IFS
9183   test -z "$as_dir" && as_dir=.
9184     for ac_prog in dd; do
9185     for ac_exec_ext in '' $ac_executable_extensions; do
9186       ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
9187       as_fn_executable_p "$ac_path_lt_DD" || continue
9188 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9189   cmp -s conftest.i conftest.out \
9190   && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
9191 fi
9192       $ac_path_lt_DD_found && break 3
9193     done
9194   done
9195   done
9196 IFS=$as_save_IFS
9197   if test -z "$ac_cv_path_lt_DD"; then
9198     :
9199   fi
9200 else
9201   ac_cv_path_lt_DD=$lt_DD
9202 fi
9203
9204 rm -f conftest.i conftest2.i conftest.out
9205 fi
9206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
9207 $as_echo "$ac_cv_path_lt_DD" >&6; }
9208
9209
9210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
9211 $as_echo_n "checking how to truncate binary pipes... " >&6; }
9212 if ${lt_cv_truncate_bin+:} false; then :
9213   $as_echo_n "(cached) " >&6
9214 else
9215   printf 0123456789abcdef0123456789abcdef >conftest.i
9216 cat conftest.i conftest.i >conftest2.i
9217 lt_cv_truncate_bin=
9218 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9219   cmp -s conftest.i conftest.out \
9220   && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
9221 fi
9222 rm -f conftest.i conftest2.i conftest.out
9223 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
9224 fi
9225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
9226 $as_echo "$lt_cv_truncate_bin" >&6; }
9227
9228
9229
9230
9231
9232
9233
9234 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
9235 func_cc_basename ()
9236 {
9237     for cc_temp in $*""; do
9238       case $cc_temp in
9239         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9240         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9241         \-*) ;;
9242         *) break;;
9243       esac
9244     done
9245     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9246 }
9247
9248 # Check whether --enable-libtool-lock was given.
9249 if test "${enable_libtool_lock+set}" = set; then :
9250   enableval=$enable_libtool_lock;
9251 fi
9252
9253 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
9254
9255 # Some flags need to be propagated to the compiler or linker for good
9256 # libtool support.
9257 case $host in
9258 ia64-*-hpux*)
9259   # Find out what ABI is being produced by ac_compile, and set mode
9260   # options accordingly.
9261   echo 'int i;' > conftest.$ac_ext
9262   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9263   (eval $ac_compile) 2>&5
9264   ac_status=$?
9265   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9266   test $ac_status = 0; }; then
9267     case `/usr/bin/file conftest.$ac_objext` in
9268       *ELF-32*)
9269         HPUX_IA64_MODE=32
9270         ;;
9271       *ELF-64*)
9272         HPUX_IA64_MODE=64
9273         ;;
9274     esac
9275   fi
9276   rm -rf conftest*
9277   ;;
9278 *-*-irix6*)
9279   # Find out what ABI is being produced by ac_compile, and set linker
9280   # options accordingly.
9281   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9282   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9283   (eval $ac_compile) 2>&5
9284   ac_status=$?
9285   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9286   test $ac_status = 0; }; then
9287     if test yes = "$lt_cv_prog_gnu_ld"; then
9288       case `/usr/bin/file conftest.$ac_objext` in
9289         *32-bit*)
9290           LD="${LD-ld} -melf32bsmip"
9291           ;;
9292         *N32*)
9293           LD="${LD-ld} -melf32bmipn32"
9294           ;;
9295         *64-bit*)
9296           LD="${LD-ld} -melf64bmip"
9297         ;;
9298       esac
9299     else
9300       case `/usr/bin/file conftest.$ac_objext` in
9301         *32-bit*)
9302           LD="${LD-ld} -32"
9303           ;;
9304         *N32*)
9305           LD="${LD-ld} -n32"
9306           ;;
9307         *64-bit*)
9308           LD="${LD-ld} -64"
9309           ;;
9310       esac
9311     fi
9312   fi
9313   rm -rf conftest*
9314   ;;
9315
9316 mips64*-*linux*)
9317   # Find out what ABI is being produced by ac_compile, and set linker
9318   # options accordingly.
9319   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9320   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9321   (eval $ac_compile) 2>&5
9322   ac_status=$?
9323   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9324   test $ac_status = 0; }; then
9325     emul=elf
9326     case `/usr/bin/file conftest.$ac_objext` in
9327       *32-bit*)
9328         emul="${emul}32"
9329         ;;
9330       *64-bit*)
9331         emul="${emul}64"
9332         ;;
9333     esac
9334     case `/usr/bin/file conftest.$ac_objext` in
9335       *MSB*)
9336         emul="${emul}btsmip"
9337         ;;
9338       *LSB*)
9339         emul="${emul}ltsmip"
9340         ;;
9341     esac
9342     case `/usr/bin/file conftest.$ac_objext` in
9343       *N32*)
9344         emul="${emul}n32"
9345         ;;
9346     esac
9347     LD="${LD-ld} -m $emul"
9348   fi
9349   rm -rf conftest*
9350   ;;
9351
9352 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9353 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9354   # Find out what ABI is being produced by ac_compile, and set linker
9355   # options accordingly.  Note that the listed cases only cover the
9356   # situations where additional linker options are needed (such as when
9357   # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9358   # vice versa); the common cases where no linker options are needed do
9359   # not appear in the list.
9360   echo 'int i;' > conftest.$ac_ext
9361   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9362   (eval $ac_compile) 2>&5
9363   ac_status=$?
9364   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9365   test $ac_status = 0; }; then
9366     case `/usr/bin/file conftest.o` in
9367       *32-bit*)
9368         case $host in
9369           x86_64-*kfreebsd*-gnu)
9370             LD="${LD-ld} -m elf_i386_fbsd"
9371             ;;
9372           x86_64-*linux*)
9373             case `/usr/bin/file conftest.o` in
9374               *x86-64*)
9375                 LD="${LD-ld} -m elf32_x86_64"
9376                 ;;
9377               *)
9378                 LD="${LD-ld} -m elf_i386"
9379                 ;;
9380             esac
9381             ;;
9382           powerpc64le-*linux*)
9383             LD="${LD-ld} -m elf32lppclinux"
9384             ;;
9385           powerpc64-*linux*)
9386             LD="${LD-ld} -m elf32ppclinux"
9387             ;;
9388           s390x-*linux*)
9389             LD="${LD-ld} -m elf_s390"
9390             ;;
9391           sparc64-*linux*)
9392             LD="${LD-ld} -m elf32_sparc"
9393             ;;
9394         esac
9395         ;;
9396       *64-bit*)
9397         case $host in
9398           x86_64-*kfreebsd*-gnu)
9399             LD="${LD-ld} -m elf_x86_64_fbsd"
9400             ;;
9401           x86_64-*linux*)
9402             LD="${LD-ld} -m elf_x86_64"
9403             ;;
9404           powerpcle-*linux*)
9405             LD="${LD-ld} -m elf64lppc"
9406             ;;
9407           powerpc-*linux*)
9408             LD="${LD-ld} -m elf64ppc"
9409             ;;
9410           s390*-*linux*|s390*-*tpf*)
9411             LD="${LD-ld} -m elf64_s390"
9412             ;;
9413           sparc*-*linux*)
9414             LD="${LD-ld} -m elf64_sparc"
9415             ;;
9416         esac
9417         ;;
9418     esac
9419   fi
9420   rm -rf conftest*
9421   ;;
9422
9423 *-*-sco3.2v5*)
9424   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9425   SAVE_CFLAGS=$CFLAGS
9426   CFLAGS="$CFLAGS -belf"
9427   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9428 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
9429 if ${lt_cv_cc_needs_belf+:} false; then :
9430   $as_echo_n "(cached) " >&6
9431 else
9432   ac_ext=c
9433 ac_cpp='$CPP $CPPFLAGS'
9434 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9435 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9436 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9437
9438      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9439 /* end confdefs.h.  */
9440
9441 int
9442 main ()
9443 {
9444
9445   ;
9446   return 0;
9447 }
9448 _ACEOF
9449 if ac_fn_c_try_link "$LINENO"; then :
9450   lt_cv_cc_needs_belf=yes
9451 else
9452   lt_cv_cc_needs_belf=no
9453 fi
9454 rm -f core conftest.err conftest.$ac_objext \
9455     conftest$ac_exeext conftest.$ac_ext
9456      ac_ext=c
9457 ac_cpp='$CPP $CPPFLAGS'
9458 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9459 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9460 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9461
9462 fi
9463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9464 $as_echo "$lt_cv_cc_needs_belf" >&6; }
9465   if test yes != "$lt_cv_cc_needs_belf"; then
9466     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9467     CFLAGS=$SAVE_CFLAGS
9468   fi
9469   ;;
9470 *-*solaris*)
9471   # Find out what ABI is being produced by ac_compile, and set linker
9472   # options accordingly.
9473   echo 'int i;' > conftest.$ac_ext
9474   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9475   (eval $ac_compile) 2>&5
9476   ac_status=$?
9477   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9478   test $ac_status = 0; }; then
9479     case `/usr/bin/file conftest.o` in
9480     *64-bit*)
9481       case $lt_cv_prog_gnu_ld in
9482       yes*)
9483         case $host in
9484         i?86-*-solaris*|x86_64-*-solaris*)
9485           LD="${LD-ld} -m elf_x86_64"
9486           ;;
9487         sparc*-*-solaris*)
9488           LD="${LD-ld} -m elf64_sparc"
9489           ;;
9490         esac
9491         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9492         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9493           LD=${LD-ld}_sol2
9494         fi
9495         ;;
9496       *)
9497         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9498           LD="${LD-ld} -64"
9499         fi
9500         ;;
9501       esac
9502       ;;
9503     esac
9504   fi
9505   rm -rf conftest*
9506   ;;
9507 esac
9508
9509 need_locks=$enable_libtool_lock
9510
9511 if test -n "$ac_tool_prefix"; then
9512   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9513 set dummy ${ac_tool_prefix}mt; ac_word=$2
9514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9515 $as_echo_n "checking for $ac_word... " >&6; }
9516 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9517   $as_echo_n "(cached) " >&6
9518 else
9519   if test -n "$MANIFEST_TOOL"; then
9520   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9521 else
9522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9523 for as_dir in $PATH
9524 do
9525   IFS=$as_save_IFS
9526   test -z "$as_dir" && as_dir=.
9527     for ac_exec_ext in '' $ac_executable_extensions; do
9528   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9529     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9531     break 2
9532   fi
9533 done
9534   done
9535 IFS=$as_save_IFS
9536
9537 fi
9538 fi
9539 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9540 if test -n "$MANIFEST_TOOL"; then
9541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9542 $as_echo "$MANIFEST_TOOL" >&6; }
9543 else
9544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9545 $as_echo "no" >&6; }
9546 fi
9547
9548
9549 fi
9550 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9551   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9552   # Extract the first word of "mt", so it can be a program name with args.
9553 set dummy mt; ac_word=$2
9554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9555 $as_echo_n "checking for $ac_word... " >&6; }
9556 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9557   $as_echo_n "(cached) " >&6
9558 else
9559   if test -n "$ac_ct_MANIFEST_TOOL"; then
9560   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9561 else
9562 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9563 for as_dir in $PATH
9564 do
9565   IFS=$as_save_IFS
9566   test -z "$as_dir" && as_dir=.
9567     for ac_exec_ext in '' $ac_executable_extensions; do
9568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9569     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9571     break 2
9572   fi
9573 done
9574   done
9575 IFS=$as_save_IFS
9576
9577 fi
9578 fi
9579 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9580 if test -n "$ac_ct_MANIFEST_TOOL"; then
9581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9582 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9583 else
9584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9585 $as_echo "no" >&6; }
9586 fi
9587
9588   if test "x$ac_ct_MANIFEST_TOOL" = x; then
9589     MANIFEST_TOOL=":"
9590   else
9591     case $cross_compiling:$ac_tool_warned in
9592 yes:)
9593 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9594 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9595 ac_tool_warned=yes ;;
9596 esac
9597     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9598   fi
9599 else
9600   MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9601 fi
9602
9603 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9605 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9606 if ${lt_cv_path_mainfest_tool+:} false; then :
9607   $as_echo_n "(cached) " >&6
9608 else
9609   lt_cv_path_mainfest_tool=no
9610   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9611   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9612   cat conftest.err >&5
9613   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9614     lt_cv_path_mainfest_tool=yes
9615   fi
9616   rm -f conftest*
9617 fi
9618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9619 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
9620 if test yes != "$lt_cv_path_mainfest_tool"; then
9621   MANIFEST_TOOL=:
9622 fi
9623
9624
9625
9626
9627
9628
9629   case $host_os in
9630     rhapsody* | darwin*)
9631     if test -n "$ac_tool_prefix"; then
9632   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9633 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9635 $as_echo_n "checking for $ac_word... " >&6; }
9636 if ${ac_cv_prog_DSYMUTIL+:} false; then :
9637   $as_echo_n "(cached) " >&6
9638 else
9639   if test -n "$DSYMUTIL"; then
9640   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9641 else
9642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9643 for as_dir in $PATH
9644 do
9645   IFS=$as_save_IFS
9646   test -z "$as_dir" && as_dir=.
9647     for ac_exec_ext in '' $ac_executable_extensions; do
9648   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9649     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9650     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9651     break 2
9652   fi
9653 done
9654   done
9655 IFS=$as_save_IFS
9656
9657 fi
9658 fi
9659 DSYMUTIL=$ac_cv_prog_DSYMUTIL
9660 if test -n "$DSYMUTIL"; then
9661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9662 $as_echo "$DSYMUTIL" >&6; }
9663 else
9664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9665 $as_echo "no" >&6; }
9666 fi
9667
9668
9669 fi
9670 if test -z "$ac_cv_prog_DSYMUTIL"; then
9671   ac_ct_DSYMUTIL=$DSYMUTIL
9672   # Extract the first word of "dsymutil", so it can be a program name with args.
9673 set dummy dsymutil; ac_word=$2
9674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9675 $as_echo_n "checking for $ac_word... " >&6; }
9676 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9677   $as_echo_n "(cached) " >&6
9678 else
9679   if test -n "$ac_ct_DSYMUTIL"; then
9680   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9681 else
9682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9683 for as_dir in $PATH
9684 do
9685   IFS=$as_save_IFS
9686   test -z "$as_dir" && as_dir=.
9687     for ac_exec_ext in '' $ac_executable_extensions; do
9688   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9689     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9690     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9691     break 2
9692   fi
9693 done
9694   done
9695 IFS=$as_save_IFS
9696
9697 fi
9698 fi
9699 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9700 if test -n "$ac_ct_DSYMUTIL"; then
9701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9702 $as_echo "$ac_ct_DSYMUTIL" >&6; }
9703 else
9704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9705 $as_echo "no" >&6; }
9706 fi
9707
9708   if test "x$ac_ct_DSYMUTIL" = x; then
9709     DSYMUTIL=":"
9710   else
9711     case $cross_compiling:$ac_tool_warned in
9712 yes:)
9713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9714 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9715 ac_tool_warned=yes ;;
9716 esac
9717     DSYMUTIL=$ac_ct_DSYMUTIL
9718   fi
9719 else
9720   DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9721 fi
9722
9723     if test -n "$ac_tool_prefix"; then
9724   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9725 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9727 $as_echo_n "checking for $ac_word... " >&6; }
9728 if ${ac_cv_prog_NMEDIT+:} false; then :
9729   $as_echo_n "(cached) " >&6
9730 else
9731   if test -n "$NMEDIT"; then
9732   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9733 else
9734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9735 for as_dir in $PATH
9736 do
9737   IFS=$as_save_IFS
9738   test -z "$as_dir" && as_dir=.
9739     for ac_exec_ext in '' $ac_executable_extensions; do
9740   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9741     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9742     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9743     break 2
9744   fi
9745 done
9746   done
9747 IFS=$as_save_IFS
9748
9749 fi
9750 fi
9751 NMEDIT=$ac_cv_prog_NMEDIT
9752 if test -n "$NMEDIT"; then
9753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9754 $as_echo "$NMEDIT" >&6; }
9755 else
9756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9757 $as_echo "no" >&6; }
9758 fi
9759
9760
9761 fi
9762 if test -z "$ac_cv_prog_NMEDIT"; then
9763   ac_ct_NMEDIT=$NMEDIT
9764   # Extract the first word of "nmedit", so it can be a program name with args.
9765 set dummy nmedit; ac_word=$2
9766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9767 $as_echo_n "checking for $ac_word... " >&6; }
9768 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9769   $as_echo_n "(cached) " >&6
9770 else
9771   if test -n "$ac_ct_NMEDIT"; then
9772   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9773 else
9774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9775 for as_dir in $PATH
9776 do
9777   IFS=$as_save_IFS
9778   test -z "$as_dir" && as_dir=.
9779     for ac_exec_ext in '' $ac_executable_extensions; do
9780   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9781     ac_cv_prog_ac_ct_NMEDIT="nmedit"
9782     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9783     break 2
9784   fi
9785 done
9786   done
9787 IFS=$as_save_IFS
9788
9789 fi
9790 fi
9791 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9792 if test -n "$ac_ct_NMEDIT"; then
9793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9794 $as_echo "$ac_ct_NMEDIT" >&6; }
9795 else
9796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9797 $as_echo "no" >&6; }
9798 fi
9799
9800   if test "x$ac_ct_NMEDIT" = x; then
9801     NMEDIT=":"
9802   else
9803     case $cross_compiling:$ac_tool_warned in
9804 yes:)
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9806 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9807 ac_tool_warned=yes ;;
9808 esac
9809     NMEDIT=$ac_ct_NMEDIT
9810   fi
9811 else
9812   NMEDIT="$ac_cv_prog_NMEDIT"
9813 fi
9814
9815     if test -n "$ac_tool_prefix"; then
9816   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9817 set dummy ${ac_tool_prefix}lipo; ac_word=$2
9818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9819 $as_echo_n "checking for $ac_word... " >&6; }
9820 if ${ac_cv_prog_LIPO+:} false; then :
9821   $as_echo_n "(cached) " >&6
9822 else
9823   if test -n "$LIPO"; then
9824   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9825 else
9826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9827 for as_dir in $PATH
9828 do
9829   IFS=$as_save_IFS
9830   test -z "$as_dir" && as_dir=.
9831     for ac_exec_ext in '' $ac_executable_extensions; do
9832   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9833     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9834     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9835     break 2
9836   fi
9837 done
9838   done
9839 IFS=$as_save_IFS
9840
9841 fi
9842 fi
9843 LIPO=$ac_cv_prog_LIPO
9844 if test -n "$LIPO"; then
9845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9846 $as_echo "$LIPO" >&6; }
9847 else
9848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9849 $as_echo "no" >&6; }
9850 fi
9851
9852
9853 fi
9854 if test -z "$ac_cv_prog_LIPO"; then
9855   ac_ct_LIPO=$LIPO
9856   # Extract the first word of "lipo", so it can be a program name with args.
9857 set dummy lipo; ac_word=$2
9858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9859 $as_echo_n "checking for $ac_word... " >&6; }
9860 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9861   $as_echo_n "(cached) " >&6
9862 else
9863   if test -n "$ac_ct_LIPO"; then
9864   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9865 else
9866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9867 for as_dir in $PATH
9868 do
9869   IFS=$as_save_IFS
9870   test -z "$as_dir" && as_dir=.
9871     for ac_exec_ext in '' $ac_executable_extensions; do
9872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9873     ac_cv_prog_ac_ct_LIPO="lipo"
9874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9875     break 2
9876   fi
9877 done
9878   done
9879 IFS=$as_save_IFS
9880
9881 fi
9882 fi
9883 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9884 if test -n "$ac_ct_LIPO"; then
9885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9886 $as_echo "$ac_ct_LIPO" >&6; }
9887 else
9888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9889 $as_echo "no" >&6; }
9890 fi
9891
9892   if test "x$ac_ct_LIPO" = x; then
9893     LIPO=":"
9894   else
9895     case $cross_compiling:$ac_tool_warned in
9896 yes:)
9897 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9898 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9899 ac_tool_warned=yes ;;
9900 esac
9901     LIPO=$ac_ct_LIPO
9902   fi
9903 else
9904   LIPO="$ac_cv_prog_LIPO"
9905 fi
9906
9907     if test -n "$ac_tool_prefix"; then
9908   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9909 set dummy ${ac_tool_prefix}otool; ac_word=$2
9910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9911 $as_echo_n "checking for $ac_word... " >&6; }
9912 if ${ac_cv_prog_OTOOL+:} false; then :
9913   $as_echo_n "(cached) " >&6
9914 else
9915   if test -n "$OTOOL"; then
9916   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9917 else
9918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9919 for as_dir in $PATH
9920 do
9921   IFS=$as_save_IFS
9922   test -z "$as_dir" && as_dir=.
9923     for ac_exec_ext in '' $ac_executable_extensions; do
9924   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9925     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9926     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9927     break 2
9928   fi
9929 done
9930   done
9931 IFS=$as_save_IFS
9932
9933 fi
9934 fi
9935 OTOOL=$ac_cv_prog_OTOOL
9936 if test -n "$OTOOL"; then
9937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9938 $as_echo "$OTOOL" >&6; }
9939 else
9940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9941 $as_echo "no" >&6; }
9942 fi
9943
9944
9945 fi
9946 if test -z "$ac_cv_prog_OTOOL"; then
9947   ac_ct_OTOOL=$OTOOL
9948   # Extract the first word of "otool", so it can be a program name with args.
9949 set dummy otool; ac_word=$2
9950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9951 $as_echo_n "checking for $ac_word... " >&6; }
9952 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9953   $as_echo_n "(cached) " >&6
9954 else
9955   if test -n "$ac_ct_OTOOL"; then
9956   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
9957 else
9958 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9959 for as_dir in $PATH
9960 do
9961   IFS=$as_save_IFS
9962   test -z "$as_dir" && as_dir=.
9963     for ac_exec_ext in '' $ac_executable_extensions; do
9964   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9965     ac_cv_prog_ac_ct_OTOOL="otool"
9966     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9967     break 2
9968   fi
9969 done
9970   done
9971 IFS=$as_save_IFS
9972
9973 fi
9974 fi
9975 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
9976 if test -n "$ac_ct_OTOOL"; then
9977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
9978 $as_echo "$ac_ct_OTOOL" >&6; }
9979 else
9980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9981 $as_echo "no" >&6; }
9982 fi
9983
9984   if test "x$ac_ct_OTOOL" = x; then
9985     OTOOL=":"
9986   else
9987     case $cross_compiling:$ac_tool_warned in
9988 yes:)
9989 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9990 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9991 ac_tool_warned=yes ;;
9992 esac
9993     OTOOL=$ac_ct_OTOOL
9994   fi
9995 else
9996   OTOOL="$ac_cv_prog_OTOOL"
9997 fi
9998
9999     if test -n "$ac_tool_prefix"; then
10000   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
10001 set dummy ${ac_tool_prefix}otool64; ac_word=$2
10002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10003 $as_echo_n "checking for $ac_word... " >&6; }
10004 if ${ac_cv_prog_OTOOL64+:} false; then :
10005   $as_echo_n "(cached) " >&6
10006 else
10007   if test -n "$OTOOL64"; then
10008   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
10009 else
10010 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10011 for as_dir in $PATH
10012 do
10013   IFS=$as_save_IFS
10014   test -z "$as_dir" && as_dir=.
10015     for ac_exec_ext in '' $ac_executable_extensions; do
10016   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10017     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
10018     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10019     break 2
10020   fi
10021 done
10022   done
10023 IFS=$as_save_IFS
10024
10025 fi
10026 fi
10027 OTOOL64=$ac_cv_prog_OTOOL64
10028 if test -n "$OTOOL64"; then
10029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
10030 $as_echo "$OTOOL64" >&6; }
10031 else
10032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10033 $as_echo "no" >&6; }
10034 fi
10035
10036
10037 fi
10038 if test -z "$ac_cv_prog_OTOOL64"; then
10039   ac_ct_OTOOL64=$OTOOL64
10040   # Extract the first word of "otool64", so it can be a program name with args.
10041 set dummy otool64; ac_word=$2
10042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10043 $as_echo_n "checking for $ac_word... " >&6; }
10044 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
10045   $as_echo_n "(cached) " >&6
10046 else
10047   if test -n "$ac_ct_OTOOL64"; then
10048   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
10049 else
10050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10051 for as_dir in $PATH
10052 do
10053   IFS=$as_save_IFS
10054   test -z "$as_dir" && as_dir=.
10055     for ac_exec_ext in '' $ac_executable_extensions; do
10056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10057     ac_cv_prog_ac_ct_OTOOL64="otool64"
10058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10059     break 2
10060   fi
10061 done
10062   done
10063 IFS=$as_save_IFS
10064
10065 fi
10066 fi
10067 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
10068 if test -n "$ac_ct_OTOOL64"; then
10069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
10070 $as_echo "$ac_ct_OTOOL64" >&6; }
10071 else
10072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10073 $as_echo "no" >&6; }
10074 fi
10075
10076   if test "x$ac_ct_OTOOL64" = x; then
10077     OTOOL64=":"
10078   else
10079     case $cross_compiling:$ac_tool_warned in
10080 yes:)
10081 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10082 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10083 ac_tool_warned=yes ;;
10084 esac
10085     OTOOL64=$ac_ct_OTOOL64
10086   fi
10087 else
10088   OTOOL64="$ac_cv_prog_OTOOL64"
10089 fi
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
10118 $as_echo_n "checking for -single_module linker flag... " >&6; }
10119 if ${lt_cv_apple_cc_single_mod+:} false; then :
10120   $as_echo_n "(cached) " >&6
10121 else
10122   lt_cv_apple_cc_single_mod=no
10123       if test -z "$LT_MULTI_MODULE"; then
10124         # By default we will add the -single_module flag. You can override
10125         # by either setting the environment variable LT_MULTI_MODULE
10126         # non-empty at configure time, or by adding -multi_module to the
10127         # link flags.
10128         rm -rf libconftest.dylib*
10129         echo "int foo(void){return 1;}" > conftest.c
10130         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10131 -dynamiclib -Wl,-single_module conftest.c" >&5
10132         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10133           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10134         _lt_result=$?
10135         # If there is a non-empty error log, and "single_module"
10136         # appears in it, assume the flag caused a linker warning
10137         if test -s conftest.err && $GREP single_module conftest.err; then
10138           cat conftest.err >&5
10139         # Otherwise, if the output was created with a 0 exit code from
10140         # the compiler, it worked.
10141         elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10142           lt_cv_apple_cc_single_mod=yes
10143         else
10144           cat conftest.err >&5
10145         fi
10146         rm -rf libconftest.dylib*
10147         rm -f conftest.*
10148       fi
10149 fi
10150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
10151 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
10152
10153     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
10154 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
10155 if ${lt_cv_ld_exported_symbols_list+:} false; then :
10156   $as_echo_n "(cached) " >&6
10157 else
10158   lt_cv_ld_exported_symbols_list=no
10159       save_LDFLAGS=$LDFLAGS
10160       echo "_main" > conftest.sym
10161       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10162       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10163 /* end confdefs.h.  */
10164
10165 int
10166 main ()
10167 {
10168
10169   ;
10170   return 0;
10171 }
10172 _ACEOF
10173 if ac_fn_c_try_link "$LINENO"; then :
10174   lt_cv_ld_exported_symbols_list=yes
10175 else
10176   lt_cv_ld_exported_symbols_list=no
10177 fi
10178 rm -f core conftest.err conftest.$ac_objext \
10179     conftest$ac_exeext conftest.$ac_ext
10180         LDFLAGS=$save_LDFLAGS
10181
10182 fi
10183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
10184 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
10185
10186     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
10187 $as_echo_n "checking for -force_load linker flag... " >&6; }
10188 if ${lt_cv_ld_force_load+:} false; then :
10189   $as_echo_n "(cached) " >&6
10190 else
10191   lt_cv_ld_force_load=no
10192       cat > conftest.c << _LT_EOF
10193 int forced_loaded() { return 2;}
10194 _LT_EOF
10195       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
10196       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
10197       echo "$AR cru libconftest.a conftest.o" >&5
10198       $AR cru libconftest.a conftest.o 2>&5
10199       echo "$RANLIB libconftest.a" >&5
10200       $RANLIB libconftest.a 2>&5
10201       cat > conftest.c << _LT_EOF
10202 int main() { return 0;}
10203 _LT_EOF
10204       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
10205       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10206       _lt_result=$?
10207       if test -s conftest.err && $GREP force_load conftest.err; then
10208         cat conftest.err >&5
10209       elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10210         lt_cv_ld_force_load=yes
10211       else
10212         cat conftest.err >&5
10213       fi
10214         rm -f conftest.err libconftest.a conftest conftest.c
10215         rm -rf conftest.dSYM
10216
10217 fi
10218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
10219 $as_echo "$lt_cv_ld_force_load" >&6; }
10220     case $host_os in
10221     rhapsody* | darwin1.[012])
10222       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10223     darwin1.*)
10224       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10225     darwin*) # darwin 5.x on
10226       # if running on 10.5 or later, the deployment target defaults
10227       # to the OS version, if on x86, and 10.4, the deployment
10228       # target defaults to 10.4. Don't you love it?
10229       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10230         10.0,*86*-darwin8*|10.0,*-darwin[91]*)
10231           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10232         10.[012][,.]*)
10233           _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10234         10.*)
10235           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10236       esac
10237     ;;
10238   esac
10239     if test yes = "$lt_cv_apple_cc_single_mod"; then
10240       _lt_dar_single_mod='$single_module'
10241     fi
10242     if test yes = "$lt_cv_ld_exported_symbols_list"; then
10243       _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10244     else
10245       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10246     fi
10247     if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10248       _lt_dsymutil='~$DSYMUTIL $lib || :'
10249     else
10250       _lt_dsymutil=
10251     fi
10252     ;;
10253   esac
10254
10255 # func_munge_path_list VARIABLE PATH
10256 # -----------------------------------
10257 # VARIABLE is name of variable containing _space_ separated list of
10258 # directories to be munged by the contents of PATH, which is string
10259 # having a format:
10260 # "DIR[:DIR]:"
10261 #       string "DIR[ DIR]" will be prepended to VARIABLE
10262 # ":DIR[:DIR]"
10263 #       string "DIR[ DIR]" will be appended to VARIABLE
10264 # "DIRP[:DIRP]::[DIRA:]DIRA"
10265 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
10266 #       "DIRA[ DIRA]" will be appended to VARIABLE
10267 # "DIR[:DIR]"
10268 #       VARIABLE will be replaced by "DIR[ DIR]"
10269 func_munge_path_list ()
10270 {
10271     case x$2 in
10272     x)
10273         ;;
10274     *:)
10275         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10276         ;;
10277     x:*)
10278         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10279         ;;
10280     *::*)
10281         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10282         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10283         ;;
10284     *)
10285         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10286         ;;
10287     esac
10288 }
10289
10290 for ac_header in dlfcn.h
10291 do :
10292   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10293 "
10294 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
10295   cat >>confdefs.h <<_ACEOF
10296 #define HAVE_DLFCN_H 1
10297 _ACEOF
10298
10299 fi
10300
10301 done
10302
10303
10304
10305
10306
10307
10308
10309 # Set options
10310
10311
10312
10313         enable_dlopen=no
10314
10315
10316   enable_win32_dll=no
10317
10318
10319             # Check whether --enable-shared was given.
10320 if test "${enable_shared+set}" = set; then :
10321   enableval=$enable_shared; p=${PACKAGE-default}
10322     case $enableval in
10323     yes) enable_shared=yes ;;
10324     no) enable_shared=no ;;
10325     *)
10326       enable_shared=no
10327       # Look at the argument we got.  We use all the common list separators.
10328       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10329       for pkg in $enableval; do
10330         IFS=$lt_save_ifs
10331         if test "X$pkg" = "X$p"; then
10332           enable_shared=yes
10333         fi
10334       done
10335       IFS=$lt_save_ifs
10336       ;;
10337     esac
10338 else
10339   enable_shared=yes
10340 fi
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350   # Check whether --enable-static was given.
10351 if test "${enable_static+set}" = set; then :
10352   enableval=$enable_static; p=${PACKAGE-default}
10353     case $enableval in
10354     yes) enable_static=yes ;;
10355     no) enable_static=no ;;
10356     *)
10357      enable_static=no
10358       # Look at the argument we got.  We use all the common list separators.
10359       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10360       for pkg in $enableval; do
10361         IFS=$lt_save_ifs
10362         if test "X$pkg" = "X$p"; then
10363           enable_static=yes
10364         fi
10365       done
10366       IFS=$lt_save_ifs
10367       ;;
10368     esac
10369 else
10370   enable_static=yes
10371 fi
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382 # Check whether --with-pic was given.
10383 if test "${with_pic+set}" = set; then :
10384   withval=$with_pic; lt_p=${PACKAGE-default}
10385     case $withval in
10386     yes|no) pic_mode=$withval ;;
10387     *)
10388       pic_mode=default
10389       # Look at the argument we got.  We use all the common list separators.
10390       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10391       for lt_pkg in $withval; do
10392         IFS=$lt_save_ifs
10393         if test "X$lt_pkg" = "X$lt_p"; then
10394           pic_mode=yes
10395         fi
10396       done
10397       IFS=$lt_save_ifs
10398       ;;
10399     esac
10400 else
10401   pic_mode=default
10402 fi
10403
10404
10405
10406
10407
10408
10409
10410
10411   # Check whether --enable-fast-install was given.
10412 if test "${enable_fast_install+set}" = set; then :
10413   enableval=$enable_fast_install; p=${PACKAGE-default}
10414     case $enableval in
10415     yes) enable_fast_install=yes ;;
10416     no) enable_fast_install=no ;;
10417     *)
10418       enable_fast_install=no
10419       # Look at the argument we got.  We use all the common list separators.
10420       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10421       for pkg in $enableval; do
10422         IFS=$lt_save_ifs
10423         if test "X$pkg" = "X$p"; then
10424           enable_fast_install=yes
10425         fi
10426       done
10427       IFS=$lt_save_ifs
10428       ;;
10429     esac
10430 else
10431   enable_fast_install=yes
10432 fi
10433
10434
10435
10436
10437
10438
10439
10440
10441   shared_archive_member_spec=
10442 case $host,$enable_shared in
10443 power*-*-aix[5-9]*,yes)
10444   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10445 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
10446
10447 # Check whether --with-aix-soname was given.
10448 if test "${with_aix_soname+set}" = set; then :
10449   withval=$with_aix_soname; case $withval in
10450     aix|svr4|both)
10451       ;;
10452     *)
10453       as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10454       ;;
10455     esac
10456     lt_cv_with_aix_soname=$with_aix_soname
10457 else
10458   if ${lt_cv_with_aix_soname+:} false; then :
10459   $as_echo_n "(cached) " >&6
10460 else
10461   lt_cv_with_aix_soname=aix
10462 fi
10463
10464     with_aix_soname=$lt_cv_with_aix_soname
10465 fi
10466
10467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10468 $as_echo "$with_aix_soname" >&6; }
10469   if test aix != "$with_aix_soname"; then
10470     # For the AIX way of multilib, we name the shared archive member
10471     # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10472     # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10473     # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10474     # the AIX toolchain works better with OBJECT_MODE set (default 32).
10475     if test 64 = "${OBJECT_MODE-32}"; then
10476       shared_archive_member_spec=shr_64
10477     else
10478       shared_archive_member_spec=shr
10479     fi
10480   fi
10481   ;;
10482 *)
10483   with_aix_soname=aix
10484   ;;
10485 esac
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496 # This can be used to rebuild libtool when needed
10497 LIBTOOL_DEPS=$ltmain
10498
10499 # Always use our own libtool.
10500 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
10501
10502
10503
10504
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 test -z "$LN_S" && LN_S="ln -s"
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546 if test -n "${ZSH_VERSION+set}"; then
10547    setopt NO_GLOB_SUBST
10548 fi
10549
10550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10551 $as_echo_n "checking for objdir... " >&6; }
10552 if ${lt_cv_objdir+:} false; then :
10553   $as_echo_n "(cached) " >&6
10554 else
10555   rm -f .libs 2>/dev/null
10556 mkdir .libs 2>/dev/null
10557 if test -d .libs; then
10558   lt_cv_objdir=.libs
10559 else
10560   # MS-DOS does not allow filenames that begin with a dot.
10561   lt_cv_objdir=_libs
10562 fi
10563 rmdir .libs 2>/dev/null
10564 fi
10565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10566 $as_echo "$lt_cv_objdir" >&6; }
10567 objdir=$lt_cv_objdir
10568
10569
10570
10571
10572
10573 cat >>confdefs.h <<_ACEOF
10574 #define LT_OBJDIR "$lt_cv_objdir/"
10575 _ACEOF
10576
10577
10578
10579
10580 case $host_os in
10581 aix3*)
10582   # AIX sometimes has problems with the GCC collect2 program.  For some
10583   # reason, if we set the COLLECT_NAMES environment variable, the problems
10584   # vanish in a puff of smoke.
10585   if test set != "${COLLECT_NAMES+set}"; then
10586     COLLECT_NAMES=
10587     export COLLECT_NAMES
10588   fi
10589   ;;
10590 esac
10591
10592 # Global variables:
10593 ofile=libtool
10594 can_build_shared=yes
10595
10596 # All known linkers require a '.a' archive for static linking (except MSVC,
10597 # which needs '.lib').
10598 libext=a
10599
10600 with_gnu_ld=$lt_cv_prog_gnu_ld
10601
10602 old_CC=$CC
10603 old_CFLAGS=$CFLAGS
10604
10605 # Set sane defaults for various variables
10606 test -z "$CC" && CC=cc
10607 test -z "$LTCC" && LTCC=$CC
10608 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10609 test -z "$LD" && LD=ld
10610 test -z "$ac_objext" && ac_objext=o
10611
10612 func_cc_basename $compiler
10613 cc_basename=$func_cc_basename_result
10614
10615
10616 # Only perform the check for file, if the check method requires it
10617 test -z "$MAGIC_CMD" && MAGIC_CMD=file
10618 case $deplibs_check_method in
10619 file_magic*)
10620   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10621     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10622 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10623 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10624   $as_echo_n "(cached) " >&6
10625 else
10626   case $MAGIC_CMD in
10627 [\\/*] |  ?:[\\/]*)
10628   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10629   ;;
10630 *)
10631   lt_save_MAGIC_CMD=$MAGIC_CMD
10632   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10633   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10634   for ac_dir in $ac_dummy; do
10635     IFS=$lt_save_ifs
10636     test -z "$ac_dir" && ac_dir=.
10637     if test -f "$ac_dir/${ac_tool_prefix}file"; then
10638       lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10639       if test -n "$file_magic_test_file"; then
10640         case $deplibs_check_method in
10641         "file_magic "*)
10642           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10643           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10644           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10645             $EGREP "$file_magic_regex" > /dev/null; then
10646             :
10647           else
10648             cat <<_LT_EOF 1>&2
10649
10650 *** Warning: the command libtool uses to detect shared libraries,
10651 *** $file_magic_cmd, produces output that libtool cannot recognize.
10652 *** The result is that libtool may fail to recognize shared libraries
10653 *** as such.  This will affect the creation of libtool libraries that
10654 *** depend on shared libraries, but programs linked with such libtool
10655 *** libraries will work regardless of this problem.  Nevertheless, you
10656 *** may want to report the problem to your system manager and/or to
10657 *** bug-libtool@gnu.org
10658
10659 _LT_EOF
10660           fi ;;
10661         esac
10662       fi
10663       break
10664     fi
10665   done
10666   IFS=$lt_save_ifs
10667   MAGIC_CMD=$lt_save_MAGIC_CMD
10668   ;;
10669 esac
10670 fi
10671
10672 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10673 if test -n "$MAGIC_CMD"; then
10674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10675 $as_echo "$MAGIC_CMD" >&6; }
10676 else
10677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10678 $as_echo "no" >&6; }
10679 fi
10680
10681
10682
10683
10684
10685 if test -z "$lt_cv_path_MAGIC_CMD"; then
10686   if test -n "$ac_tool_prefix"; then
10687     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10688 $as_echo_n "checking for file... " >&6; }
10689 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10690   $as_echo_n "(cached) " >&6
10691 else
10692   case $MAGIC_CMD in
10693 [\\/*] |  ?:[\\/]*)
10694   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10695   ;;
10696 *)
10697   lt_save_MAGIC_CMD=$MAGIC_CMD
10698   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10699   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10700   for ac_dir in $ac_dummy; do
10701     IFS=$lt_save_ifs
10702     test -z "$ac_dir" && ac_dir=.
10703     if test -f "$ac_dir/file"; then
10704       lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10705       if test -n "$file_magic_test_file"; then
10706         case $deplibs_check_method in
10707         "file_magic "*)
10708           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10709           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10710           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10711             $EGREP "$file_magic_regex" > /dev/null; then
10712             :
10713           else
10714             cat <<_LT_EOF 1>&2
10715
10716 *** Warning: the command libtool uses to detect shared libraries,
10717 *** $file_magic_cmd, produces output that libtool cannot recognize.
10718 *** The result is that libtool may fail to recognize shared libraries
10719 *** as such.  This will affect the creation of libtool libraries that
10720 *** depend on shared libraries, but programs linked with such libtool
10721 *** libraries will work regardless of this problem.  Nevertheless, you
10722 *** may want to report the problem to your system manager and/or to
10723 *** bug-libtool@gnu.org
10724
10725 _LT_EOF
10726           fi ;;
10727         esac
10728       fi
10729       break
10730     fi
10731   done
10732   IFS=$lt_save_ifs
10733   MAGIC_CMD=$lt_save_MAGIC_CMD
10734   ;;
10735 esac
10736 fi
10737
10738 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10739 if test -n "$MAGIC_CMD"; then
10740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10741 $as_echo "$MAGIC_CMD" >&6; }
10742 else
10743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10744 $as_echo "no" >&6; }
10745 fi
10746
10747
10748   else
10749     MAGIC_CMD=:
10750   fi
10751 fi
10752
10753   fi
10754   ;;
10755 esac
10756
10757 # Use C for the default configuration in the libtool script
10758
10759 lt_save_CC=$CC
10760 ac_ext=c
10761 ac_cpp='$CPP $CPPFLAGS'
10762 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10763 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10764 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10765
10766
10767 # Source file extension for C test sources.
10768 ac_ext=c
10769
10770 # Object file extension for compiled C test sources.
10771 objext=o
10772 objext=$objext
10773
10774 # Code to be used in simple compile tests
10775 lt_simple_compile_test_code="int some_variable = 0;"
10776
10777 # Code to be used in simple link tests
10778 lt_simple_link_test_code='int main(){return(0);}'
10779
10780
10781
10782
10783
10784
10785
10786 # If no C compiler was specified, use CC.
10787 LTCC=${LTCC-"$CC"}
10788
10789 # If no C compiler flags were specified, use CFLAGS.
10790 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10791
10792 # Allow CC to be a program name with arguments.
10793 compiler=$CC
10794
10795 # Save the default compiler, since it gets overwritten when the other
10796 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10797 compiler_DEFAULT=$CC
10798
10799 # save warnings/boilerplate of simple test code
10800 ac_outfile=conftest.$ac_objext
10801 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10802 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10803 _lt_compiler_boilerplate=`cat conftest.err`
10804 $RM conftest*
10805
10806 ac_outfile=conftest.$ac_objext
10807 echo "$lt_simple_link_test_code" >conftest.$ac_ext
10808 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10809 _lt_linker_boilerplate=`cat conftest.err`
10810 $RM -r conftest*
10811
10812
10813 if test -n "$compiler"; then
10814
10815 lt_prog_compiler_no_builtin_flag=
10816
10817 if test yes = "$GCC"; then
10818   case $cc_basename in
10819   nvcc*)
10820     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10821   *)
10822     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10823   esac
10824
10825   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10826 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10827 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10828   $as_echo_n "(cached) " >&6
10829 else
10830   lt_cv_prog_compiler_rtti_exceptions=no
10831    ac_outfile=conftest.$ac_objext
10832    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10833    lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
10834    # Insert the option either (1) after the last *FLAGS variable, or
10835    # (2) before a word containing "conftest.", or (3) at the end.
10836    # Note that $ac_compile itself does not contain backslashes and begins
10837    # with a dollar sign (not a hyphen), so the echo should work correctly.
10838    # The option is referenced via a variable to avoid confusing sed.
10839    lt_compile=`echo "$ac_compile" | $SED \
10840    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10841    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10842    -e 's:$: $lt_compiler_flag:'`
10843    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10844    (eval "$lt_compile" 2>conftest.err)
10845    ac_status=$?
10846    cat conftest.err >&5
10847    echo "$as_me:$LINENO: \$? = $ac_status" >&5
10848    if (exit $ac_status) && test -s "$ac_outfile"; then
10849      # The compiler can only warn and ignore the option if not recognized
10850      # So say no if there are warnings other than the usual output.
10851      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10852      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10853      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10854        lt_cv_prog_compiler_rtti_exceptions=yes
10855      fi
10856    fi
10857    $RM conftest*
10858
10859 fi
10860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10861 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10862
10863 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10864     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10865 else
10866     :
10867 fi
10868
10869 fi
10870
10871
10872
10873
10874
10875
10876   lt_prog_compiler_wl=
10877 lt_prog_compiler_pic=
10878 lt_prog_compiler_static=
10879
10880
10881   if test yes = "$GCC"; then
10882     lt_prog_compiler_wl='-Wl,'
10883     lt_prog_compiler_static='-static'
10884
10885     case $host_os in
10886       aix*)
10887       # All AIX code is PIC.
10888       if test ia64 = "$host_cpu"; then
10889         # AIX 5 now supports IA64 processor
10890         lt_prog_compiler_static='-Bstatic'
10891       fi
10892       lt_prog_compiler_pic='-fPIC'
10893       ;;
10894
10895     amigaos*)
10896       case $host_cpu in
10897       powerpc)
10898             # see comment about AmigaOS4 .so support
10899             lt_prog_compiler_pic='-fPIC'
10900         ;;
10901       m68k)
10902             # FIXME: we need at least 68020 code to build shared libraries, but
10903             # adding the '-m68020' flag to GCC prevents building anything better,
10904             # like '-m68040'.
10905             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10906         ;;
10907       esac
10908       ;;
10909
10910     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10911       # PIC is the default for these OSes.
10912       ;;
10913
10914     mingw* | cygwin* | pw32* | os2* | cegcc*)
10915       # This hack is so that the source file can tell whether it is being
10916       # built for inclusion in a dll (and should export symbols for example).
10917       # Although the cygwin gcc ignores -fPIC, still need this for old-style
10918       # (--disable-auto-import) libraries
10919       lt_prog_compiler_pic='-DDLL_EXPORT'
10920       case $host_os in
10921       os2*)
10922         lt_prog_compiler_static='$wl-static'
10923         ;;
10924       esac
10925       ;;
10926
10927     darwin* | rhapsody*)
10928       # PIC is the default on this platform
10929       # Common symbols not allowed in MH_DYLIB files
10930       lt_prog_compiler_pic='-fno-common'
10931       ;;
10932
10933     haiku*)
10934       # PIC is the default for Haiku.
10935       # The "-static" flag exists, but is broken.
10936       lt_prog_compiler_static=
10937       ;;
10938
10939     hpux*)
10940       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10941       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10942       # sets the default TLS model and affects inlining.
10943       case $host_cpu in
10944       hppa*64*)
10945         # +Z the default
10946         ;;
10947       *)
10948         lt_prog_compiler_pic='-fPIC'
10949         ;;
10950       esac
10951       ;;
10952
10953     interix[3-9]*)
10954       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10955       # Instead, we relocate shared libraries at runtime.
10956       ;;
10957
10958     msdosdjgpp*)
10959       # Just because we use GCC doesn't mean we suddenly get shared libraries
10960       # on systems that don't support them.
10961       lt_prog_compiler_can_build_shared=no
10962       enable_shared=no
10963       ;;
10964
10965     *nto* | *qnx*)
10966       # QNX uses GNU C++, but need to define -shared option too, otherwise
10967       # it will coredump.
10968       lt_prog_compiler_pic='-fPIC -shared'
10969       ;;
10970
10971     sysv4*MP*)
10972       if test -d /usr/nec; then
10973         lt_prog_compiler_pic=-Kconform_pic
10974       fi
10975       ;;
10976
10977     *)
10978       lt_prog_compiler_pic='-fPIC'
10979       ;;
10980     esac
10981
10982     case $cc_basename in
10983     nvcc*) # Cuda Compiler Driver 2.2
10984       lt_prog_compiler_wl='-Xlinker '
10985       if test -n "$lt_prog_compiler_pic"; then
10986         lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
10987       fi
10988       ;;
10989     esac
10990   else
10991     # PORTME Check for flag to pass linker flags through the system compiler.
10992     case $host_os in
10993     aix*)
10994       lt_prog_compiler_wl='-Wl,'
10995       if test ia64 = "$host_cpu"; then
10996         # AIX 5 now supports IA64 processor
10997         lt_prog_compiler_static='-Bstatic'
10998       else
10999         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
11000       fi
11001       ;;
11002
11003     darwin* | rhapsody*)
11004       # PIC is the default on this platform
11005       # Common symbols not allowed in MH_DYLIB files
11006       lt_prog_compiler_pic='-fno-common'
11007       case $cc_basename in
11008       nagfor*)
11009         # NAG Fortran compiler
11010         lt_prog_compiler_wl='-Wl,-Wl,,'
11011         lt_prog_compiler_pic='-PIC'
11012         lt_prog_compiler_static='-Bstatic'
11013         ;;
11014       esac
11015       ;;
11016
11017     mingw* | cygwin* | pw32* | os2* | cegcc*)
11018       # This hack is so that the source file can tell whether it is being
11019       # built for inclusion in a dll (and should export symbols for example).
11020       lt_prog_compiler_pic='-DDLL_EXPORT'
11021       case $host_os in
11022       os2*)
11023         lt_prog_compiler_static='$wl-static'
11024         ;;
11025       esac
11026       ;;
11027
11028     hpux9* | hpux10* | hpux11*)
11029       lt_prog_compiler_wl='-Wl,'
11030       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
11031       # not for PA HP-UX.
11032       case $host_cpu in
11033       hppa*64*|ia64*)
11034         # +Z the default
11035         ;;
11036       *)
11037         lt_prog_compiler_pic='+Z'
11038         ;;
11039       esac
11040       # Is there a better lt_prog_compiler_static that works with the bundled CC?
11041       lt_prog_compiler_static='$wl-a ${wl}archive'
11042       ;;
11043
11044     irix5* | irix6* | nonstopux*)
11045       lt_prog_compiler_wl='-Wl,'
11046       # PIC (with -KPIC) is the default.
11047       lt_prog_compiler_static='-non_shared'
11048       ;;
11049
11050     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11051       case $cc_basename in
11052       # old Intel for x86_64, which still supported -KPIC.
11053       ecc*)
11054         lt_prog_compiler_wl='-Wl,'
11055         lt_prog_compiler_pic='-KPIC'
11056         lt_prog_compiler_static='-static'
11057         ;;
11058       # icc used to be incompatible with GCC.
11059       # ICC 10 doesn't accept -KPIC any more.
11060       icc* | ifort*)
11061         lt_prog_compiler_wl='-Wl,'
11062         lt_prog_compiler_pic='-fPIC'
11063         lt_prog_compiler_static='-static'
11064         ;;
11065       # Lahey Fortran 8.1.
11066       lf95*)
11067         lt_prog_compiler_wl='-Wl,'
11068         lt_prog_compiler_pic='--shared'
11069         lt_prog_compiler_static='--static'
11070         ;;
11071       nagfor*)
11072         # NAG Fortran compiler
11073         lt_prog_compiler_wl='-Wl,-Wl,,'
11074         lt_prog_compiler_pic='-PIC'
11075         lt_prog_compiler_static='-Bstatic'
11076         ;;
11077       tcc*)
11078         # Fabrice Bellard et al's Tiny C Compiler
11079         lt_prog_compiler_wl='-Wl,'
11080         lt_prog_compiler_pic='-fPIC'
11081         lt_prog_compiler_static='-static'
11082         ;;
11083       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
11084         # Portland Group compilers (*not* the Pentium gcc compiler,
11085         # which looks to be a dead project)
11086         lt_prog_compiler_wl='-Wl,'
11087         lt_prog_compiler_pic='-fpic'
11088         lt_prog_compiler_static='-Bstatic'
11089         ;;
11090       ccc*)
11091         lt_prog_compiler_wl='-Wl,'
11092         # All Alpha code is PIC.
11093         lt_prog_compiler_static='-non_shared'
11094         ;;
11095       xl* | bgxl* | bgf* | mpixl*)
11096         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
11097         lt_prog_compiler_wl='-Wl,'
11098         lt_prog_compiler_pic='-qpic'
11099         lt_prog_compiler_static='-qstaticlink'
11100         ;;
11101       *)
11102         case `$CC -V 2>&1 | sed 5q` in
11103         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
11104           # Sun Fortran 8.3 passes all unrecognized flags to the linker
11105           lt_prog_compiler_pic='-KPIC'
11106           lt_prog_compiler_static='-Bstatic'
11107           lt_prog_compiler_wl=''
11108           ;;
11109         *Sun\ F* | *Sun*Fortran*)
11110           lt_prog_compiler_pic='-KPIC'
11111           lt_prog_compiler_static='-Bstatic'
11112           lt_prog_compiler_wl='-Qoption ld '
11113           ;;
11114         *Sun\ C*)
11115           # Sun C 5.9
11116           lt_prog_compiler_pic='-KPIC'
11117           lt_prog_compiler_static='-Bstatic'
11118           lt_prog_compiler_wl='-Wl,'
11119           ;;
11120         *Intel*\ [CF]*Compiler*)
11121           lt_prog_compiler_wl='-Wl,'
11122           lt_prog_compiler_pic='-fPIC'
11123           lt_prog_compiler_static='-static'
11124           ;;
11125         *Portland\ Group*)
11126           lt_prog_compiler_wl='-Wl,'
11127           lt_prog_compiler_pic='-fpic'
11128           lt_prog_compiler_static='-Bstatic'
11129           ;;
11130         esac
11131         ;;
11132       esac
11133       ;;
11134
11135     newsos6)
11136       lt_prog_compiler_pic='-KPIC'
11137       lt_prog_compiler_static='-Bstatic'
11138       ;;
11139
11140     *nto* | *qnx*)
11141       # QNX uses GNU C++, but need to define -shared option too, otherwise
11142       # it will coredump.
11143       lt_prog_compiler_pic='-fPIC -shared'
11144       ;;
11145
11146     osf3* | osf4* | osf5*)
11147       lt_prog_compiler_wl='-Wl,'
11148       # All OSF/1 code is PIC.
11149       lt_prog_compiler_static='-non_shared'
11150       ;;
11151
11152     rdos*)
11153       lt_prog_compiler_static='-non_shared'
11154       ;;
11155
11156     solaris*)
11157       lt_prog_compiler_pic='-KPIC'
11158       lt_prog_compiler_static='-Bstatic'
11159       case $cc_basename in
11160       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
11161         lt_prog_compiler_wl='-Qoption ld ';;
11162       *)
11163         lt_prog_compiler_wl='-Wl,';;
11164       esac
11165       ;;
11166
11167     sunos4*)
11168       lt_prog_compiler_wl='-Qoption ld '
11169       lt_prog_compiler_pic='-PIC'
11170       lt_prog_compiler_static='-Bstatic'
11171       ;;
11172
11173     sysv4 | sysv4.2uw2* | sysv4.3*)
11174       lt_prog_compiler_wl='-Wl,'
11175       lt_prog_compiler_pic='-KPIC'
11176       lt_prog_compiler_static='-Bstatic'
11177       ;;
11178
11179     sysv4*MP*)
11180       if test -d /usr/nec; then
11181         lt_prog_compiler_pic='-Kconform_pic'
11182         lt_prog_compiler_static='-Bstatic'
11183       fi
11184       ;;
11185
11186     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11187       lt_prog_compiler_wl='-Wl,'
11188       lt_prog_compiler_pic='-KPIC'
11189       lt_prog_compiler_static='-Bstatic'
11190       ;;
11191
11192     unicos*)
11193       lt_prog_compiler_wl='-Wl,'
11194       lt_prog_compiler_can_build_shared=no
11195       ;;
11196
11197     uts4*)
11198       lt_prog_compiler_pic='-pic'
11199       lt_prog_compiler_static='-Bstatic'
11200       ;;
11201
11202     *)
11203       lt_prog_compiler_can_build_shared=no
11204       ;;
11205     esac
11206   fi
11207
11208 case $host_os in
11209   # For platforms that do not support PIC, -DPIC is meaningless:
11210   *djgpp*)
11211     lt_prog_compiler_pic=
11212     ;;
11213   *)
11214     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11215     ;;
11216 esac
11217
11218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11219 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
11220 if ${lt_cv_prog_compiler_pic+:} false; then :
11221   $as_echo_n "(cached) " >&6
11222 else
11223   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11224 fi
11225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11226 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
11227 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11228
11229 #
11230 # Check to make sure the PIC flag actually works.
11231 #
11232 if test -n "$lt_prog_compiler_pic"; then
11233   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
11234 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
11235 if ${lt_cv_prog_compiler_pic_works+:} false; then :
11236   $as_echo_n "(cached) " >&6
11237 else
11238   lt_cv_prog_compiler_pic_works=no
11239    ac_outfile=conftest.$ac_objext
11240    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11241    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
11242    # Insert the option either (1) after the last *FLAGS variable, or
11243    # (2) before a word containing "conftest.", or (3) at the end.
11244    # Note that $ac_compile itself does not contain backslashes and begins
11245    # with a dollar sign (not a hyphen), so the echo should work correctly.
11246    # The option is referenced via a variable to avoid confusing sed.
11247    lt_compile=`echo "$ac_compile" | $SED \
11248    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11249    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11250    -e 's:$: $lt_compiler_flag:'`
11251    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11252    (eval "$lt_compile" 2>conftest.err)
11253    ac_status=$?
11254    cat conftest.err >&5
11255    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11256    if (exit $ac_status) && test -s "$ac_outfile"; then
11257      # The compiler can only warn and ignore the option if not recognized
11258      # So say no if there are warnings other than the usual output.
11259      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11260      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11261      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11262        lt_cv_prog_compiler_pic_works=yes
11263      fi
11264    fi
11265    $RM conftest*
11266
11267 fi
11268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
11269 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
11270
11271 if test yes = "$lt_cv_prog_compiler_pic_works"; then
11272     case $lt_prog_compiler_pic in
11273      "" | " "*) ;;
11274      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11275      esac
11276 else
11277     lt_prog_compiler_pic=
11278      lt_prog_compiler_can_build_shared=no
11279 fi
11280
11281 fi
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293 #
11294 # Check to make sure the static flag actually works.
11295 #
11296 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11298 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11299 if ${lt_cv_prog_compiler_static_works+:} false; then :
11300   $as_echo_n "(cached) " >&6
11301 else
11302   lt_cv_prog_compiler_static_works=no
11303    save_LDFLAGS=$LDFLAGS
11304    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11305    echo "$lt_simple_link_test_code" > conftest.$ac_ext
11306    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11307      # The linker can only warn and ignore the option if not recognized
11308      # So say no if there are warnings
11309      if test -s conftest.err; then
11310        # Append any errors to the config.log.
11311        cat conftest.err 1>&5
11312        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11313        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11314        if diff conftest.exp conftest.er2 >/dev/null; then
11315          lt_cv_prog_compiler_static_works=yes
11316        fi
11317      else
11318        lt_cv_prog_compiler_static_works=yes
11319      fi
11320    fi
11321    $RM -r conftest*
11322    LDFLAGS=$save_LDFLAGS
11323
11324 fi
11325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11326 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
11327
11328 if test yes = "$lt_cv_prog_compiler_static_works"; then
11329     :
11330 else
11331     lt_prog_compiler_static=
11332 fi
11333
11334
11335
11336
11337
11338
11339
11340   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11341 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11342 if ${lt_cv_prog_compiler_c_o+:} false; then :
11343   $as_echo_n "(cached) " >&6
11344 else
11345   lt_cv_prog_compiler_c_o=no
11346    $RM -r conftest 2>/dev/null
11347    mkdir conftest
11348    cd conftest
11349    mkdir out
11350    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11351
11352    lt_compiler_flag="-o out/conftest2.$ac_objext"
11353    # Insert the option either (1) after the last *FLAGS variable, or
11354    # (2) before a word containing "conftest.", or (3) at the end.
11355    # Note that $ac_compile itself does not contain backslashes and begins
11356    # with a dollar sign (not a hyphen), so the echo should work correctly.
11357    lt_compile=`echo "$ac_compile" | $SED \
11358    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11359    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11360    -e 's:$: $lt_compiler_flag:'`
11361    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11362    (eval "$lt_compile" 2>out/conftest.err)
11363    ac_status=$?
11364    cat out/conftest.err >&5
11365    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11366    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11367    then
11368      # The compiler can only warn and ignore the option if not recognized
11369      # So say no if there are warnings
11370      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11371      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11372      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11373        lt_cv_prog_compiler_c_o=yes
11374      fi
11375    fi
11376    chmod u+w . 2>&5
11377    $RM conftest*
11378    # SGI C++ compiler will create directory out/ii_files/ for
11379    # template instantiation
11380    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11381    $RM out/* && rmdir out
11382    cd ..
11383    $RM -r conftest
11384    $RM conftest*
11385
11386 fi
11387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11388 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11389
11390
11391
11392
11393
11394
11395   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11396 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11397 if ${lt_cv_prog_compiler_c_o+:} false; then :
11398   $as_echo_n "(cached) " >&6
11399 else
11400   lt_cv_prog_compiler_c_o=no
11401    $RM -r conftest 2>/dev/null
11402    mkdir conftest
11403    cd conftest
11404    mkdir out
11405    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11406
11407    lt_compiler_flag="-o out/conftest2.$ac_objext"
11408    # Insert the option either (1) after the last *FLAGS variable, or
11409    # (2) before a word containing "conftest.", or (3) at the end.
11410    # Note that $ac_compile itself does not contain backslashes and begins
11411    # with a dollar sign (not a hyphen), so the echo should work correctly.
11412    lt_compile=`echo "$ac_compile" | $SED \
11413    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11414    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11415    -e 's:$: $lt_compiler_flag:'`
11416    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11417    (eval "$lt_compile" 2>out/conftest.err)
11418    ac_status=$?
11419    cat out/conftest.err >&5
11420    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11421    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11422    then
11423      # The compiler can only warn and ignore the option if not recognized
11424      # So say no if there are warnings
11425      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11426      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11427      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11428        lt_cv_prog_compiler_c_o=yes
11429      fi
11430    fi
11431    chmod u+w . 2>&5
11432    $RM conftest*
11433    # SGI C++ compiler will create directory out/ii_files/ for
11434    # template instantiation
11435    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11436    $RM out/* && rmdir out
11437    cd ..
11438    $RM -r conftest
11439    $RM conftest*
11440
11441 fi
11442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11443 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11444
11445
11446
11447
11448 hard_links=nottested
11449 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11450   # do not overwrite the value of need_locks provided by the user
11451   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11452 $as_echo_n "checking if we can lock with hard links... " >&6; }
11453   hard_links=yes
11454   $RM conftest*
11455   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11456   touch conftest.a
11457   ln conftest.a conftest.b 2>&5 || hard_links=no
11458   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11460 $as_echo "$hard_links" >&6; }
11461   if test no = "$hard_links"; then
11462     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11463 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11464     need_locks=warn
11465   fi
11466 else
11467   need_locks=no
11468 fi
11469
11470
11471
11472
11473
11474
11475   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11476 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11477
11478   runpath_var=
11479   allow_undefined_flag=
11480   always_export_symbols=no
11481   archive_cmds=
11482   archive_expsym_cmds=
11483   compiler_needs_object=no
11484   enable_shared_with_static_runtimes=no
11485   export_dynamic_flag_spec=
11486   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11487   hardcode_automatic=no
11488   hardcode_direct=no
11489   hardcode_direct_absolute=no
11490   hardcode_libdir_flag_spec=
11491   hardcode_libdir_separator=
11492   hardcode_minus_L=no
11493   hardcode_shlibpath_var=unsupported
11494   inherit_rpath=no
11495   link_all_deplibs=unknown
11496   module_cmds=
11497   module_expsym_cmds=
11498   old_archive_from_new_cmds=
11499   old_archive_from_expsyms_cmds=
11500   thread_safe_flag_spec=
11501   whole_archive_flag_spec=
11502   # include_expsyms should be a list of space-separated symbols to be *always*
11503   # included in the symbol list
11504   include_expsyms=
11505   # exclude_expsyms can be an extended regexp of symbols to exclude
11506   # it will be wrapped by ' (' and ')$', so one must not match beginning or
11507   # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11508   # as well as any symbol that contains 'd'.
11509   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11510   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11511   # platforms (ab)use it in PIC code, but their linkers get confused if
11512   # the symbol is explicitly referenced.  Since portable code cannot
11513   # rely on this symbol name, it's probably fine to never include it in
11514   # preloaded symbol tables.
11515   # Exclude shared library initialization/finalization symbols.
11516   extract_expsyms_cmds=
11517
11518   case $host_os in
11519   cygwin* | mingw* | pw32* | cegcc*)
11520     # FIXME: the MSVC++ port hasn't been tested in a loooong time
11521     # When not using gcc, we currently assume that we are using
11522     # Microsoft Visual C++.
11523     if test yes != "$GCC"; then
11524       with_gnu_ld=no
11525     fi
11526     ;;
11527   interix*)
11528     # we just hope/assume this is gcc and not c89 (= MSVC++)
11529     with_gnu_ld=yes
11530     ;;
11531   openbsd* | bitrig*)
11532     with_gnu_ld=no
11533     ;;
11534   esac
11535
11536   ld_shlibs=yes
11537
11538   # On some targets, GNU ld is compatible enough with the native linker
11539   # that we're better off using the native interface for both.
11540   lt_use_gnu_ld_interface=no
11541   if test yes = "$with_gnu_ld"; then
11542     case $host_os in
11543       aix*)
11544         # The AIX port of GNU ld has always aspired to compatibility
11545         # with the native linker.  However, as the warning in the GNU ld
11546         # block says, versions before 2.19.5* couldn't really create working
11547         # shared libraries, regardless of the interface used.
11548         case `$LD -v 2>&1` in
11549           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11550           *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11551           *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11552           *)
11553             lt_use_gnu_ld_interface=yes
11554             ;;
11555         esac
11556         ;;
11557       *)
11558         lt_use_gnu_ld_interface=yes
11559         ;;
11560     esac
11561   fi
11562
11563   if test yes = "$lt_use_gnu_ld_interface"; then
11564     # If archive_cmds runs LD, not CC, wlarc should be empty
11565     wlarc='$wl'
11566
11567     # Set some defaults for GNU ld with shared library support. These
11568     # are reset later if shared libraries are not supported. Putting them
11569     # here allows them to be overridden if necessary.
11570     runpath_var=LD_RUN_PATH
11571     hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11572     export_dynamic_flag_spec='$wl--export-dynamic'
11573     # ancient GNU ld didn't support --whole-archive et. al.
11574     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11575       whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11576     else
11577       whole_archive_flag_spec=
11578     fi
11579     supports_anon_versioning=no
11580     case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11581       *GNU\ gold*) supports_anon_versioning=yes ;;
11582       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11583       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11584       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11585       *\ 2.11.*) ;; # other 2.11 versions
11586       *) supports_anon_versioning=yes ;;
11587     esac
11588
11589     # See if GNU ld supports shared libraries.
11590     case $host_os in
11591     aix[3-9]*)
11592       # On AIX/PPC, the GNU linker is very broken
11593       if test ia64 != "$host_cpu"; then
11594         ld_shlibs=no
11595         cat <<_LT_EOF 1>&2
11596
11597 *** Warning: the GNU linker, at least up to release 2.19, is reported
11598 *** to be unable to reliably create shared libraries on AIX.
11599 *** Therefore, libtool is disabling shared libraries support.  If you
11600 *** really care for shared libraries, you may want to install binutils
11601 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11602 *** You will then need to restart the configuration process.
11603
11604 _LT_EOF
11605       fi
11606       ;;
11607
11608     amigaos*)
11609       case $host_cpu in
11610       powerpc)
11611             # see comment about AmigaOS4 .so support
11612             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11613             archive_expsym_cmds=''
11614         ;;
11615       m68k)
11616             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)'
11617             hardcode_libdir_flag_spec='-L$libdir'
11618             hardcode_minus_L=yes
11619         ;;
11620       esac
11621       ;;
11622
11623     beos*)
11624       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11625         allow_undefined_flag=unsupported
11626         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11627         # support --undefined.  This deserves some investigation.  FIXME
11628         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11629       else
11630         ld_shlibs=no
11631       fi
11632       ;;
11633
11634     cygwin* | mingw* | pw32* | cegcc*)
11635       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11636       # as there is no search path for DLLs.
11637       hardcode_libdir_flag_spec='-L$libdir'
11638       export_dynamic_flag_spec='$wl--export-all-symbols'
11639       allow_undefined_flag=unsupported
11640       always_export_symbols=no
11641       enable_shared_with_static_runtimes=yes
11642       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'
11643       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11644
11645       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11646         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11647         # If the export-symbols file already is a .def file, use it as
11648         # is; otherwise, prepend EXPORTS...
11649         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11650           cp $export_symbols $output_objdir/$soname.def;
11651         else
11652           echo EXPORTS > $output_objdir/$soname.def;
11653           cat $export_symbols >> $output_objdir/$soname.def;
11654         fi~
11655         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11656       else
11657         ld_shlibs=no
11658       fi
11659       ;;
11660
11661     haiku*)
11662       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11663       link_all_deplibs=yes
11664       ;;
11665
11666     os2*)
11667       hardcode_libdir_flag_spec='-L$libdir'
11668       hardcode_minus_L=yes
11669       allow_undefined_flag=unsupported
11670       shrext_cmds=.dll
11671       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11672         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11673         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11674         $ECHO EXPORTS >> $output_objdir/$libname.def~
11675         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11676         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11677         emximp -o $lib $output_objdir/$libname.def'
11678       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11679         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11680         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11681         $ECHO EXPORTS >> $output_objdir/$libname.def~
11682         prefix_cmds="$SED"~
11683         if test EXPORTS = "`$SED 1q $export_symbols`"; then
11684           prefix_cmds="$prefix_cmds -e 1d";
11685         fi~
11686         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11687         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11688         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11689         emximp -o $lib $output_objdir/$libname.def'
11690       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11691       enable_shared_with_static_runtimes=yes
11692       ;;
11693
11694     interix[3-9]*)
11695       hardcode_direct=no
11696       hardcode_shlibpath_var=no
11697       hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11698       export_dynamic_flag_spec='$wl-E'
11699       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11700       # Instead, shared libraries are loaded at an image base (0x10000000 by
11701       # default) and relocated if they conflict, which is a slow very memory
11702       # consuming and fragmenting process.  To avoid this, we pick a random,
11703       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11704       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11705       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11706       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'
11707       ;;
11708
11709     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11710       tmp_diet=no
11711       if test linux-dietlibc = "$host_os"; then
11712         case $cc_basename in
11713           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
11714         esac
11715       fi
11716       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11717          && test no = "$tmp_diet"
11718       then
11719         tmp_addflag=' $pic_flag'
11720         tmp_sharedflag='-shared'
11721         case $cc_basename,$host_cpu in
11722         pgcc*)                          # Portland Group C compiler
11723           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'
11724           tmp_addflag=' $pic_flag'
11725           ;;
11726         pgf77* | pgf90* | pgf95* | pgfortran*)
11727                                         # Portland Group f77 and f90 compilers
11728           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'
11729           tmp_addflag=' $pic_flag -Mnomain' ;;
11730         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
11731           tmp_addflag=' -i_dynamic' ;;
11732         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
11733           tmp_addflag=' -i_dynamic -nofor_main' ;;
11734         ifc* | ifort*)                  # Intel Fortran compiler
11735           tmp_addflag=' -nofor_main' ;;
11736         lf95*)                          # Lahey Fortran 8.1
11737           whole_archive_flag_spec=
11738           tmp_sharedflag='--shared' ;;
11739         nagfor*)                        # NAGFOR 5.3
11740           tmp_sharedflag='-Wl,-shared' ;;
11741         xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11742           tmp_sharedflag='-qmkshrobj'
11743           tmp_addflag= ;;
11744         nvcc*)  # Cuda Compiler Driver 2.2
11745           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'
11746           compiler_needs_object=yes
11747           ;;
11748         esac
11749         case `$CC -V 2>&1 | sed 5q` in
11750         *Sun\ C*)                       # Sun C 5.9
11751           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'
11752           compiler_needs_object=yes
11753           tmp_sharedflag='-G' ;;
11754         *Sun\ F*)                       # Sun Fortran 8.3
11755           tmp_sharedflag='-G' ;;
11756         esac
11757         archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11758
11759         if test yes = "$supports_anon_versioning"; then
11760           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11761             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11762             echo "local: *; };" >> $output_objdir/$libname.ver~
11763             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11764         fi
11765
11766         case $cc_basename in
11767         tcc*)
11768           export_dynamic_flag_spec='-rdynamic'
11769           ;;
11770         xlf* | bgf* | bgxlf* | mpixlf*)
11771           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11772           whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11773           hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11774           archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11775           if test yes = "$supports_anon_versioning"; then
11776             archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11777               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11778               echo "local: *; };" >> $output_objdir/$libname.ver~
11779               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11780           fi
11781           ;;
11782         esac
11783       else
11784         ld_shlibs=no
11785       fi
11786       ;;
11787
11788     netbsd*)
11789       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11790         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11791         wlarc=
11792       else
11793         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11794         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11795       fi
11796       ;;
11797
11798     solaris*)
11799       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11800         ld_shlibs=no
11801         cat <<_LT_EOF 1>&2
11802
11803 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
11804 *** create shared libraries on Solaris systems.  Therefore, libtool
11805 *** is disabling shared libraries support.  We urge you to upgrade GNU
11806 *** binutils to release 2.9.1 or newer.  Another option is to modify
11807 *** your PATH or compiler configuration so that the native linker is
11808 *** used, and then restart.
11809
11810 _LT_EOF
11811       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11812         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11813         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11814       else
11815         ld_shlibs=no
11816       fi
11817       ;;
11818
11819     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11820       case `$LD -v 2>&1` in
11821         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11822         ld_shlibs=no
11823         cat <<_LT_EOF 1>&2
11824
11825 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11826 *** reliably create shared libraries on SCO systems.  Therefore, libtool
11827 *** is disabling shared libraries support.  We urge you to upgrade GNU
11828 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11829 *** your PATH or compiler configuration so that the native linker is
11830 *** used, and then restart.
11831
11832 _LT_EOF
11833         ;;
11834         *)
11835           # For security reasons, it is highly recommended that you always
11836           # use absolute paths for naming shared libraries, and exclude the
11837           # DT_RUNPATH tag from executables and libraries.  But doing so
11838           # requires that you compile everything twice, which is a pain.
11839           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11840             hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11841             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11842             archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11843           else
11844             ld_shlibs=no
11845           fi
11846         ;;
11847       esac
11848       ;;
11849
11850     sunos4*)
11851       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11852       wlarc=
11853       hardcode_direct=yes
11854       hardcode_shlibpath_var=no
11855       ;;
11856
11857     *)
11858       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11859         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11860         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11861       else
11862         ld_shlibs=no
11863       fi
11864       ;;
11865     esac
11866
11867     if test no = "$ld_shlibs"; then
11868       runpath_var=
11869       hardcode_libdir_flag_spec=
11870       export_dynamic_flag_spec=
11871       whole_archive_flag_spec=
11872     fi
11873   else
11874     # PORTME fill in a description of your system's linker (not GNU ld)
11875     case $host_os in
11876     aix3*)
11877       allow_undefined_flag=unsupported
11878       always_export_symbols=yes
11879       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'
11880       # Note: this linker hardcodes the directories in LIBPATH if there
11881       # are no directories specified by -L.
11882       hardcode_minus_L=yes
11883       if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11884         # Neither direct hardcoding nor static linking is supported with a
11885         # broken collect2.
11886         hardcode_direct=unsupported
11887       fi
11888       ;;
11889
11890     aix[4-9]*)
11891       if test ia64 = "$host_cpu"; then
11892         # On IA64, the linker does run time linking by default, so we don't
11893         # have to do anything special.
11894         aix_use_runtimelinking=no
11895         exp_sym_flag='-Bexport'
11896         no_entry_flag=
11897       else
11898         # If we're using GNU nm, then we don't want the "-C" option.
11899         # -C means demangle to GNU nm, but means don't demangle to AIX nm.
11900         # Without the "-l" option, or with the "-B" option, AIX nm treats
11901         # weak defined symbols like other global defined symbols, whereas
11902         # GNU nm marks them as "W".
11903         # While the 'weak' keyword is ignored in the Export File, we need
11904         # it in the Import File for the 'aix-soname' feature, so we have
11905         # to replace the "-B" option with "-P" for AIX nm.
11906         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11907           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'
11908         else
11909           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'
11910         fi
11911         aix_use_runtimelinking=no
11912
11913         # Test if we are trying to use run time linking or normal
11914         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
11915         # have runtime linking enabled, and use it for executables.
11916         # For shared libraries, we enable/disable runtime linking
11917         # depending on the kind of the shared library created -
11918         # when "with_aix_soname,aix_use_runtimelinking" is:
11919         # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
11920         # "aix,yes"  lib.so          shared, rtl:yes, for executables
11921         #            lib.a           static archive
11922         # "both,no"  lib.so.V(shr.o) shared, rtl:yes
11923         #            lib.a(lib.so.V) shared, rtl:no,  for executables
11924         # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11925         #            lib.a(lib.so.V) shared, rtl:no
11926         # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
11927         #            lib.a           static archive
11928         case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11929           for ld_flag in $LDFLAGS; do
11930           if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11931             aix_use_runtimelinking=yes
11932             break
11933           fi
11934           done
11935           if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11936             # With aix-soname=svr4, we create the lib.so.V shared archives only,
11937             # so we don't have lib.a shared libs to link our executables.
11938             # We have to force runtime linking in this case.
11939             aix_use_runtimelinking=yes
11940             LDFLAGS="$LDFLAGS -Wl,-brtl"
11941           fi
11942           ;;
11943         esac
11944
11945         exp_sym_flag='-bexport'
11946         no_entry_flag='-bnoentry'
11947       fi
11948
11949       # When large executables or shared objects are built, AIX ld can
11950       # have problems creating the table of contents.  If linking a library
11951       # or program results in "error TOC overflow" add -mminimal-toc to
11952       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11953       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11954
11955       archive_cmds=''
11956       hardcode_direct=yes
11957       hardcode_direct_absolute=yes
11958       hardcode_libdir_separator=':'
11959       link_all_deplibs=yes
11960       file_list_spec='$wl-f,'
11961       case $with_aix_soname,$aix_use_runtimelinking in
11962       aix,*) ;; # traditional, no import file
11963       svr4,* | *,yes) # use import file
11964         # The Import File defines what to hardcode.
11965         hardcode_direct=no
11966         hardcode_direct_absolute=no
11967         ;;
11968       esac
11969
11970       if test yes = "$GCC"; then
11971         case $host_os in aix4.[012]|aix4.[012].*)
11972         # We only want to do this on AIX 4.2 and lower, the check
11973         # below for broken collect2 doesn't work under 4.3+
11974           collect2name=`$CC -print-prog-name=collect2`
11975           if test -f "$collect2name" &&
11976            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
11977           then
11978           # We have reworked collect2
11979           :
11980           else
11981           # We have old collect2
11982           hardcode_direct=unsupported
11983           # It fails to find uninstalled libraries when the uninstalled
11984           # path is not listed in the libpath.  Setting hardcode_minus_L
11985           # to unsupported forces relinking
11986           hardcode_minus_L=yes
11987           hardcode_libdir_flag_spec='-L$libdir'
11988           hardcode_libdir_separator=
11989           fi
11990           ;;
11991         esac
11992         shared_flag='-shared'
11993         if test yes = "$aix_use_runtimelinking"; then
11994           shared_flag="$shared_flag "'$wl-G'
11995         fi
11996         # Need to ensure runtime linking is disabled for the traditional
11997         # shared library, or the linker may eventually find shared libraries
11998         # /with/ Import File - we do not want to mix them.
11999         shared_flag_aix='-shared'
12000         shared_flag_svr4='-shared $wl-G'
12001       else
12002         # not using gcc
12003         if test ia64 = "$host_cpu"; then
12004         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
12005         # chokes on -Wl,-G. The following line is correct:
12006           shared_flag='-G'
12007         else
12008           if test yes = "$aix_use_runtimelinking"; then
12009             shared_flag='$wl-G'
12010           else
12011             shared_flag='$wl-bM:SRE'
12012           fi
12013           shared_flag_aix='$wl-bM:SRE'
12014           shared_flag_svr4='$wl-G'
12015         fi
12016       fi
12017
12018       export_dynamic_flag_spec='$wl-bexpall'
12019       # It seems that -bexpall does not export symbols beginning with
12020       # underscore (_), so it is better to generate a list of symbols to export.
12021       always_export_symbols=yes
12022       if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
12023         # Warning - without using the other runtime loading flags (-brtl),
12024         # -berok will link without error, but may produce a broken library.
12025         allow_undefined_flag='-berok'
12026         # Determine the default libpath from the value encoded in an
12027         # empty executable.
12028         if test set = "${lt_cv_aix_libpath+set}"; then
12029   aix_libpath=$lt_cv_aix_libpath
12030 else
12031   if ${lt_cv_aix_libpath_+:} false; then :
12032   $as_echo_n "(cached) " >&6
12033 else
12034   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12035 /* end confdefs.h.  */
12036
12037 int
12038 main ()
12039 {
12040
12041   ;
12042   return 0;
12043 }
12044 _ACEOF
12045 if ac_fn_c_try_link "$LINENO"; then :
12046
12047   lt_aix_libpath_sed='
12048       /Import File Strings/,/^$/ {
12049           /^0/ {
12050               s/^0  *\([^ ]*\) *$/\1/
12051               p
12052           }
12053       }'
12054   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12055   # Check for a 64-bit object if we didn't find anything.
12056   if test -z "$lt_cv_aix_libpath_"; then
12057     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12058   fi
12059 fi
12060 rm -f core conftest.err conftest.$ac_objext \
12061     conftest$ac_exeext conftest.$ac_ext
12062   if test -z "$lt_cv_aix_libpath_"; then
12063     lt_cv_aix_libpath_=/usr/lib:/lib
12064   fi
12065
12066 fi
12067
12068   aix_libpath=$lt_cv_aix_libpath_
12069 fi
12070
12071         hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12072         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
12073       else
12074         if test ia64 = "$host_cpu"; then
12075           hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
12076           allow_undefined_flag="-z nodefs"
12077           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"
12078         else
12079          # Determine the default libpath from the value encoded in an
12080          # empty executable.
12081          if test set = "${lt_cv_aix_libpath+set}"; then
12082   aix_libpath=$lt_cv_aix_libpath
12083 else
12084   if ${lt_cv_aix_libpath_+:} false; then :
12085   $as_echo_n "(cached) " >&6
12086 else
12087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12088 /* end confdefs.h.  */
12089
12090 int
12091 main ()
12092 {
12093
12094   ;
12095   return 0;
12096 }
12097 _ACEOF
12098 if ac_fn_c_try_link "$LINENO"; then :
12099
12100   lt_aix_libpath_sed='
12101       /Import File Strings/,/^$/ {
12102           /^0/ {
12103               s/^0  *\([^ ]*\) *$/\1/
12104               p
12105           }
12106       }'
12107   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12108   # Check for a 64-bit object if we didn't find anything.
12109   if test -z "$lt_cv_aix_libpath_"; then
12110     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12111   fi
12112 fi
12113 rm -f core conftest.err conftest.$ac_objext \
12114     conftest$ac_exeext conftest.$ac_ext
12115   if test -z "$lt_cv_aix_libpath_"; then
12116     lt_cv_aix_libpath_=/usr/lib:/lib
12117   fi
12118
12119 fi
12120
12121   aix_libpath=$lt_cv_aix_libpath_
12122 fi
12123
12124          hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12125           # Warning - without using the other run time loading flags,
12126           # -berok will link without error, but may produce a broken library.
12127           no_undefined_flag=' $wl-bernotok'
12128           allow_undefined_flag=' $wl-berok'
12129           if test yes = "$with_gnu_ld"; then
12130             # We only use this code for GNU lds that support --whole-archive.
12131             whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
12132           else
12133             # Exported symbols can be pulled into shared objects from archives
12134             whole_archive_flag_spec='$convenience'
12135           fi
12136           archive_cmds_need_lc=yes
12137           archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
12138           # -brtl affects multiple linker settings, -berok does not and is overridden later
12139           compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
12140           if test svr4 != "$with_aix_soname"; then
12141             # This is similar to how AIX traditionally builds its shared libraries.
12142             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'
12143           fi
12144           if test aix != "$with_aix_soname"; then
12145             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'
12146           else
12147             # used by -dlpreopen to get the symbols
12148             archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
12149           fi
12150           archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
12151         fi
12152       fi
12153       ;;
12154
12155     amigaos*)
12156       case $host_cpu in
12157       powerpc)
12158             # see comment about AmigaOS4 .so support
12159             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12160             archive_expsym_cmds=''
12161         ;;
12162       m68k)
12163             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)'
12164             hardcode_libdir_flag_spec='-L$libdir'
12165             hardcode_minus_L=yes
12166         ;;
12167       esac
12168       ;;
12169
12170     bsdi[45]*)
12171       export_dynamic_flag_spec=-rdynamic
12172       ;;
12173
12174     cygwin* | mingw* | pw32* | cegcc*)
12175       # When not using gcc, we currently assume that we are using
12176       # Microsoft Visual C++.
12177       # hardcode_libdir_flag_spec is actually meaningless, as there is
12178       # no search path for DLLs.
12179       case $cc_basename in
12180       cl*)
12181         # Native MSVC
12182         hardcode_libdir_flag_spec=' '
12183         allow_undefined_flag=unsupported
12184         always_export_symbols=yes
12185         file_list_spec='@'
12186         # Tell ltmain to make .lib files, not .a files.
12187         libext=lib
12188         # Tell ltmain to make .dll files, not .so files.
12189         shrext_cmds=.dll
12190         # FIXME: Setting linknames here is a bad hack.
12191         archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
12192         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12193             cp "$export_symbols" "$output_objdir/$soname.def";
12194             echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
12195           else
12196             $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
12197           fi~
12198           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12199           linknames='
12200         # The linker will not automatically build a static lib if we build a DLL.
12201         # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12202         enable_shared_with_static_runtimes=yes
12203         exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
12204         export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12205         # Don't use ranlib
12206         old_postinstall_cmds='chmod 644 $oldlib'
12207         postlink_cmds='lt_outputfile="@OUTPUT@"~
12208           lt_tool_outputfile="@TOOL_OUTPUT@"~
12209           case $lt_outputfile in
12210             *.exe|*.EXE) ;;
12211             *)
12212               lt_outputfile=$lt_outputfile.exe
12213               lt_tool_outputfile=$lt_tool_outputfile.exe
12214               ;;
12215           esac~
12216           if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
12217             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12218             $RM "$lt_outputfile.manifest";
12219           fi'
12220         ;;
12221       *)
12222         # Assume MSVC wrapper
12223         hardcode_libdir_flag_spec=' '
12224         allow_undefined_flag=unsupported
12225         # Tell ltmain to make .lib files, not .a files.
12226         libext=lib
12227         # Tell ltmain to make .dll files, not .so files.
12228         shrext_cmds=.dll
12229         # FIXME: Setting linknames here is a bad hack.
12230         archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12231         # The linker will automatically build a .lib file if we build a DLL.
12232         old_archive_from_new_cmds='true'
12233         # FIXME: Should let the user specify the lib program.
12234         old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12235         enable_shared_with_static_runtimes=yes
12236         ;;
12237       esac
12238       ;;
12239
12240     darwin* | rhapsody*)
12241
12242
12243   archive_cmds_need_lc=no
12244   hardcode_direct=no
12245   hardcode_automatic=yes
12246   hardcode_shlibpath_var=unsupported
12247   if test yes = "$lt_cv_ld_force_load"; then
12248     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\"`'
12249
12250   else
12251     whole_archive_flag_spec=''
12252   fi
12253   link_all_deplibs=yes
12254   allow_undefined_flag=$_lt_dar_allow_undefined
12255   case $cc_basename in
12256      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
12257      *) _lt_dar_can_shared=$GCC ;;
12258   esac
12259   if test yes = "$_lt_dar_can_shared"; then
12260     output_verbose_link_cmd=func_echo_all
12261     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
12262     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
12263     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"
12264     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"
12265
12266   else
12267   ld_shlibs=no
12268   fi
12269
12270       ;;
12271
12272     dgux*)
12273       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12274       hardcode_libdir_flag_spec='-L$libdir'
12275       hardcode_shlibpath_var=no
12276       ;;
12277
12278     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12279     # support.  Future versions do this automatically, but an explicit c++rt0.o
12280     # does not break anything, and helps significantly (at the cost of a little
12281     # extra space).
12282     freebsd2.2*)
12283       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12284       hardcode_libdir_flag_spec='-R$libdir'
12285       hardcode_direct=yes
12286       hardcode_shlibpath_var=no
12287       ;;
12288
12289     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12290     freebsd2.*)
12291       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12292       hardcode_direct=yes
12293       hardcode_minus_L=yes
12294       hardcode_shlibpath_var=no
12295       ;;
12296
12297     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12298     freebsd* | dragonfly*)
12299       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12300       hardcode_libdir_flag_spec='-R$libdir'
12301       hardcode_direct=yes
12302       hardcode_shlibpath_var=no
12303       ;;
12304
12305     hpux9*)
12306       if test yes = "$GCC"; then
12307         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'
12308       else
12309         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'
12310       fi
12311       hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12312       hardcode_libdir_separator=:
12313       hardcode_direct=yes
12314
12315       # hardcode_minus_L: Not really in the search PATH,
12316       # but as the default location of the library.
12317       hardcode_minus_L=yes
12318       export_dynamic_flag_spec='$wl-E'
12319       ;;
12320
12321     hpux10*)
12322       if test yes,no = "$GCC,$with_gnu_ld"; then
12323         archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12324       else
12325         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12326       fi
12327       if test no = "$with_gnu_ld"; then
12328         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12329         hardcode_libdir_separator=:
12330         hardcode_direct=yes
12331         hardcode_direct_absolute=yes
12332         export_dynamic_flag_spec='$wl-E'
12333         # hardcode_minus_L: Not really in the search PATH,
12334         # but as the default location of the library.
12335         hardcode_minus_L=yes
12336       fi
12337       ;;
12338
12339     hpux11*)
12340       if test yes,no = "$GCC,$with_gnu_ld"; then
12341         case $host_cpu in
12342         hppa*64*)
12343           archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12344           ;;
12345         ia64*)
12346           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12347           ;;
12348         *)
12349           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12350           ;;
12351         esac
12352       else
12353         case $host_cpu in
12354         hppa*64*)
12355           archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12356           ;;
12357         ia64*)
12358           archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12359           ;;
12360         *)
12361
12362           # Older versions of the 11.00 compiler do not understand -b yet
12363           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12364           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12365 $as_echo_n "checking if $CC understands -b... " >&6; }
12366 if ${lt_cv_prog_compiler__b+:} false; then :
12367   $as_echo_n "(cached) " >&6
12368 else
12369   lt_cv_prog_compiler__b=no
12370    save_LDFLAGS=$LDFLAGS
12371    LDFLAGS="$LDFLAGS -b"
12372    echo "$lt_simple_link_test_code" > conftest.$ac_ext
12373    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12374      # The linker can only warn and ignore the option if not recognized
12375      # So say no if there are warnings
12376      if test -s conftest.err; then
12377        # Append any errors to the config.log.
12378        cat conftest.err 1>&5
12379        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12380        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12381        if diff conftest.exp conftest.er2 >/dev/null; then
12382          lt_cv_prog_compiler__b=yes
12383        fi
12384      else
12385        lt_cv_prog_compiler__b=yes
12386      fi
12387    fi
12388    $RM -r conftest*
12389    LDFLAGS=$save_LDFLAGS
12390
12391 fi
12392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12393 $as_echo "$lt_cv_prog_compiler__b" >&6; }
12394
12395 if test yes = "$lt_cv_prog_compiler__b"; then
12396     archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12397 else
12398     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12399 fi
12400
12401           ;;
12402         esac
12403       fi
12404       if test no = "$with_gnu_ld"; then
12405         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12406         hardcode_libdir_separator=:
12407
12408         case $host_cpu in
12409         hppa*64*|ia64*)
12410           hardcode_direct=no
12411           hardcode_shlibpath_var=no
12412           ;;
12413         *)
12414           hardcode_direct=yes
12415           hardcode_direct_absolute=yes
12416           export_dynamic_flag_spec='$wl-E'
12417
12418           # hardcode_minus_L: Not really in the search PATH,
12419           # but as the default location of the library.
12420           hardcode_minus_L=yes
12421           ;;
12422         esac
12423       fi
12424       ;;
12425
12426     irix5* | irix6* | nonstopux*)
12427       if test yes = "$GCC"; then
12428         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'
12429         # Try to use the -exported_symbol ld option, if it does not
12430         # work, assume that -exports_file does not work either and
12431         # implicitly export all symbols.
12432         # This should be the same for all languages, so no per-tag cache variable.
12433         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12434 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12435 if ${lt_cv_irix_exported_symbol+:} false; then :
12436   $as_echo_n "(cached) " >&6
12437 else
12438   save_LDFLAGS=$LDFLAGS
12439            LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12440            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12441 /* end confdefs.h.  */
12442 int foo (void) { return 0; }
12443 _ACEOF
12444 if ac_fn_c_try_link "$LINENO"; then :
12445   lt_cv_irix_exported_symbol=yes
12446 else
12447   lt_cv_irix_exported_symbol=no
12448 fi
12449 rm -f core conftest.err conftest.$ac_objext \
12450     conftest$ac_exeext conftest.$ac_ext
12451            LDFLAGS=$save_LDFLAGS
12452 fi
12453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12454 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
12455         if test yes = "$lt_cv_irix_exported_symbol"; then
12456           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'
12457         fi
12458       else
12459         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'
12460         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'
12461       fi
12462       archive_cmds_need_lc='no'
12463       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12464       hardcode_libdir_separator=:
12465       inherit_rpath=yes
12466       link_all_deplibs=yes
12467       ;;
12468
12469     linux*)
12470       case $cc_basename in
12471       tcc*)
12472         # Fabrice Bellard et al's Tiny C Compiler
12473         ld_shlibs=yes
12474         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12475         ;;
12476       esac
12477       ;;
12478
12479     netbsd*)
12480       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12481         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12482       else
12483         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12484       fi
12485       hardcode_libdir_flag_spec='-R$libdir'
12486       hardcode_direct=yes
12487       hardcode_shlibpath_var=no
12488       ;;
12489
12490     newsos6)
12491       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12492       hardcode_direct=yes
12493       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12494       hardcode_libdir_separator=:
12495       hardcode_shlibpath_var=no
12496       ;;
12497
12498     *nto* | *qnx*)
12499       ;;
12500
12501     openbsd* | bitrig*)
12502       if test -f /usr/libexec/ld.so; then
12503         hardcode_direct=yes
12504         hardcode_shlibpath_var=no
12505         hardcode_direct_absolute=yes
12506         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12507           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12508           archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12509           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12510           export_dynamic_flag_spec='$wl-E'
12511         else
12512           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12513           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12514         fi
12515       else
12516         ld_shlibs=no
12517       fi
12518       ;;
12519
12520     os2*)
12521       hardcode_libdir_flag_spec='-L$libdir'
12522       hardcode_minus_L=yes
12523       allow_undefined_flag=unsupported
12524       shrext_cmds=.dll
12525       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12526         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12527         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12528         $ECHO EXPORTS >> $output_objdir/$libname.def~
12529         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12530         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12531         emximp -o $lib $output_objdir/$libname.def'
12532       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12533         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12534         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12535         $ECHO EXPORTS >> $output_objdir/$libname.def~
12536         prefix_cmds="$SED"~
12537         if test EXPORTS = "`$SED 1q $export_symbols`"; then
12538           prefix_cmds="$prefix_cmds -e 1d";
12539         fi~
12540         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12541         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12542         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12543         emximp -o $lib $output_objdir/$libname.def'
12544       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12545       enable_shared_with_static_runtimes=yes
12546       ;;
12547
12548     osf3*)
12549       if test yes = "$GCC"; then
12550         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12551         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'
12552       else
12553         allow_undefined_flag=' -expect_unresolved \*'
12554         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'
12555       fi
12556       archive_cmds_need_lc='no'
12557       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12558       hardcode_libdir_separator=:
12559       ;;
12560
12561     osf4* | osf5*)      # as osf3* with the addition of -msym flag
12562       if test yes = "$GCC"; then
12563         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12564         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'
12565         hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12566       else
12567         allow_undefined_flag=' -expect_unresolved \*'
12568         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'
12569         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~
12570           $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'
12571
12572         # Both c and cxx compiler support -rpath directly
12573         hardcode_libdir_flag_spec='-rpath $libdir'
12574       fi
12575       archive_cmds_need_lc='no'
12576       hardcode_libdir_separator=:
12577       ;;
12578
12579     solaris*)
12580       no_undefined_flag=' -z defs'
12581       if test yes = "$GCC"; then
12582         wlarc='$wl'
12583         archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12584         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12585           $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'
12586       else
12587         case `$CC -V 2>&1` in
12588         *"Compilers 5.0"*)
12589           wlarc=''
12590           archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12591           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12592             $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12593           ;;
12594         *)
12595           wlarc='$wl'
12596           archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12597           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12598             $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12599           ;;
12600         esac
12601       fi
12602       hardcode_libdir_flag_spec='-R$libdir'
12603       hardcode_shlibpath_var=no
12604       case $host_os in
12605       solaris2.[0-5] | solaris2.[0-5].*) ;;
12606       *)
12607         # The compiler driver will combine and reorder linker options,
12608         # but understands '-z linker_flag'.  GCC discards it without '$wl',
12609         # but is careful enough not to reorder.
12610         # Supported since Solaris 2.6 (maybe 2.5.1?)
12611         if test yes = "$GCC"; then
12612           whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12613         else
12614           whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12615         fi
12616         ;;
12617       esac
12618       link_all_deplibs=yes
12619       ;;
12620
12621     sunos4*)
12622       if test sequent = "$host_vendor"; then
12623         # Use $CC to link under sequent, because it throws in some extra .o
12624         # files that make .init and .fini sections work.
12625         archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12626       else
12627         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12628       fi
12629       hardcode_libdir_flag_spec='-L$libdir'
12630       hardcode_direct=yes
12631       hardcode_minus_L=yes
12632       hardcode_shlibpath_var=no
12633       ;;
12634
12635     sysv4)
12636       case $host_vendor in
12637         sni)
12638           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12639           hardcode_direct=yes # is this really true???
12640         ;;
12641         siemens)
12642           ## LD is ld it makes a PLAMLIB
12643           ## CC just makes a GrossModule.
12644           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12645           reload_cmds='$CC -r -o $output$reload_objs'
12646           hardcode_direct=no
12647         ;;
12648         motorola)
12649           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12650           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12651         ;;
12652       esac
12653       runpath_var='LD_RUN_PATH'
12654       hardcode_shlibpath_var=no
12655       ;;
12656
12657     sysv4.3*)
12658       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12659       hardcode_shlibpath_var=no
12660       export_dynamic_flag_spec='-Bexport'
12661       ;;
12662
12663     sysv4*MP*)
12664       if test -d /usr/nec; then
12665         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12666         hardcode_shlibpath_var=no
12667         runpath_var=LD_RUN_PATH
12668         hardcode_runpath_var=yes
12669         ld_shlibs=yes
12670       fi
12671       ;;
12672
12673     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12674       no_undefined_flag='$wl-z,text'
12675       archive_cmds_need_lc=no
12676       hardcode_shlibpath_var=no
12677       runpath_var='LD_RUN_PATH'
12678
12679       if test yes = "$GCC"; then
12680         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12681         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12682       else
12683         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12684         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12685       fi
12686       ;;
12687
12688     sysv5* | sco3.2v5* | sco5v6*)
12689       # Note: We CANNOT use -z defs as we might desire, because we do not
12690       # link with -lc, and that would cause any symbols used from libc to
12691       # always be unresolved, which means just about no library would
12692       # ever link correctly.  If we're not using GNU ld we use -z text
12693       # though, which does catch some bad symbols but isn't as heavy-handed
12694       # as -z defs.
12695       no_undefined_flag='$wl-z,text'
12696       allow_undefined_flag='$wl-z,nodefs'
12697       archive_cmds_need_lc=no
12698       hardcode_shlibpath_var=no
12699       hardcode_libdir_flag_spec='$wl-R,$libdir'
12700       hardcode_libdir_separator=':'
12701       link_all_deplibs=yes
12702       export_dynamic_flag_spec='$wl-Bexport'
12703       runpath_var='LD_RUN_PATH'
12704
12705       if test yes = "$GCC"; then
12706         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12707         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12708       else
12709         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12710         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12711       fi
12712       ;;
12713
12714     uts4*)
12715       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12716       hardcode_libdir_flag_spec='-L$libdir'
12717       hardcode_shlibpath_var=no
12718       ;;
12719
12720     *)
12721       ld_shlibs=no
12722       ;;
12723     esac
12724
12725     if test sni = "$host_vendor"; then
12726       case $host in
12727       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12728         export_dynamic_flag_spec='$wl-Blargedynsym'
12729         ;;
12730       esac
12731     fi
12732   fi
12733
12734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12735 $as_echo "$ld_shlibs" >&6; }
12736 test no = "$ld_shlibs" && can_build_shared=no
12737
12738 with_gnu_ld=$with_gnu_ld
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754 #
12755 # Do we need to explicitly link libc?
12756 #
12757 case "x$archive_cmds_need_lc" in
12758 x|xyes)
12759   # Assume -lc should be added
12760   archive_cmds_need_lc=yes
12761
12762   if test yes,yes = "$GCC,$enable_shared"; then
12763     case $archive_cmds in
12764     *'~'*)
12765       # FIXME: we may have to deal with multi-command sequences.
12766       ;;
12767     '$CC '*)
12768       # Test whether the compiler implicitly links with -lc since on some
12769       # systems, -lgcc has to come before -lc. If gcc already passes -lc
12770       # to ld, don't add -lc before -lgcc.
12771       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12772 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12773 if ${lt_cv_archive_cmds_need_lc+:} false; then :
12774   $as_echo_n "(cached) " >&6
12775 else
12776   $RM conftest*
12777         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12778
12779         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12780   (eval $ac_compile) 2>&5
12781   ac_status=$?
12782   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12783   test $ac_status = 0; } 2>conftest.err; then
12784           soname=conftest
12785           lib=conftest
12786           libobjs=conftest.$ac_objext
12787           deplibs=
12788           wl=$lt_prog_compiler_wl
12789           pic_flag=$lt_prog_compiler_pic
12790           compiler_flags=-v
12791           linker_flags=-v
12792           verstring=
12793           output_objdir=.
12794           libname=conftest
12795           lt_save_allow_undefined_flag=$allow_undefined_flag
12796           allow_undefined_flag=
12797           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12798   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12799   ac_status=$?
12800   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12801   test $ac_status = 0; }
12802           then
12803             lt_cv_archive_cmds_need_lc=no
12804           else
12805             lt_cv_archive_cmds_need_lc=yes
12806           fi
12807           allow_undefined_flag=$lt_save_allow_undefined_flag
12808         else
12809           cat conftest.err 1>&5
12810         fi
12811         $RM conftest*
12812
12813 fi
12814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12815 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12816       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12817       ;;
12818     esac
12819   fi
12820   ;;
12821 esac
12822
12823
12824
12825
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   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12975 $as_echo_n "checking dynamic linker characteristics... " >&6; }
12976
12977 if test yes = "$GCC"; then
12978   case $host_os in
12979     darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
12980     *) lt_awk_arg='/^libraries:/' ;;
12981   esac
12982   case $host_os in
12983     mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
12984     *) lt_sed_strip_eq='s|=/|/|g' ;;
12985   esac
12986   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
12987   case $lt_search_path_spec in
12988   *\;*)
12989     # if the path contains ";" then we assume it to be the separator
12990     # otherwise default to the standard path separator (i.e. ":") - it is
12991     # assumed that no part of a normal pathname contains ";" but that should
12992     # okay in the real world where ";" in dirpaths is itself problematic.
12993     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
12994     ;;
12995   *)
12996     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
12997     ;;
12998   esac
12999   # Ok, now we have the path, separated by spaces, we can step through it
13000   # and add multilib dir if necessary...
13001   lt_tmp_lt_search_path_spec=
13002   lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
13003   # ...but if some path component already ends with the multilib dir we assume
13004   # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
13005   case "$lt_multi_os_dir; $lt_search_path_spec " in
13006   "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
13007     lt_multi_os_dir=
13008     ;;
13009   esac
13010   for lt_sys_path in $lt_search_path_spec; do
13011     if test -d "$lt_sys_path$lt_multi_os_dir"; then
13012       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
13013     elif test -n "$lt_multi_os_dir"; then
13014       test -d "$lt_sys_path" && \
13015         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
13016     fi
13017   done
13018   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
13019 BEGIN {RS = " "; FS = "/|\n";} {
13020   lt_foo = "";
13021   lt_count = 0;
13022   for (lt_i = NF; lt_i > 0; lt_i--) {
13023     if ($lt_i != "" && $lt_i != ".") {
13024       if ($lt_i == "..") {
13025         lt_count++;
13026       } else {
13027         if (lt_count == 0) {
13028           lt_foo = "/" $lt_i lt_foo;
13029         } else {
13030           lt_count--;
13031         }
13032       }
13033     }
13034   }
13035   if (lt_foo != "") { lt_freq[lt_foo]++; }
13036   if (lt_freq[lt_foo] == 1) { print lt_foo; }
13037 }'`
13038   # AWK program above erroneously prepends '/' to C:/dos/paths
13039   # for these hosts.
13040   case $host_os in
13041     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
13042       $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
13043   esac
13044   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
13045 else
13046   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13047 fi
13048 library_names_spec=
13049 libname_spec='lib$name'
13050 soname_spec=
13051 shrext_cmds=.so
13052 postinstall_cmds=
13053 postuninstall_cmds=
13054 finish_cmds=
13055 finish_eval=
13056 shlibpath_var=
13057 shlibpath_overrides_runpath=unknown
13058 version_type=none
13059 dynamic_linker="$host_os ld.so"
13060 sys_lib_dlsearch_path_spec="/lib /usr/lib"
13061 need_lib_prefix=unknown
13062 hardcode_into_libs=no
13063
13064 # when you set need_version to no, make sure it does not cause -set_version
13065 # flags to be left without arguments
13066 need_version=unknown
13067
13068
13069
13070 case $host_os in
13071 aix3*)
13072   version_type=linux # correct to gnu/linux during the next big refactor
13073   library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
13074   shlibpath_var=LIBPATH
13075
13076   # AIX 3 has no versioning support, so we append a major version to the name.
13077   soname_spec='$libname$release$shared_ext$major'
13078   ;;
13079
13080 aix[4-9]*)
13081   version_type=linux # correct to gnu/linux during the next big refactor
13082   need_lib_prefix=no
13083   need_version=no
13084   hardcode_into_libs=yes
13085   if test ia64 = "$host_cpu"; then
13086     # AIX 5 supports IA64
13087     library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
13088     shlibpath_var=LD_LIBRARY_PATH
13089   else
13090     # With GCC up to 2.95.x, collect2 would create an import file
13091     # for dependence libraries.  The import file would start with
13092     # the line '#! .'.  This would cause the generated library to
13093     # depend on '.', always an invalid library.  This was fixed in
13094     # development snapshots of GCC prior to 3.0.
13095     case $host_os in
13096       aix4 | aix4.[01] | aix4.[01].*)
13097       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
13098            echo ' yes '
13099            echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
13100         :
13101       else
13102         can_build_shared=no
13103       fi
13104       ;;
13105     esac
13106     # Using Import Files as archive members, it is possible to support
13107     # filename-based versioning of shared library archives on AIX. While
13108     # this would work for both with and without runtime linking, it will
13109     # prevent static linking of such archives. So we do filename-based
13110     # shared library versioning with .so extension only, which is used
13111     # when both runtime linking and shared linking is enabled.
13112     # Unfortunately, runtime linking may impact performance, so we do
13113     # not want this to be the default eventually. Also, we use the
13114     # versioned .so libs for executables only if there is the -brtl
13115     # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
13116     # To allow for filename-based versioning support, we need to create
13117     # libNAME.so.V as an archive file, containing:
13118     # *) an Import File, referring to the versioned filename of the
13119     #    archive as well as the shared archive member, telling the
13120     #    bitwidth (32 or 64) of that shared object, and providing the
13121     #    list of exported symbols of that shared object, eventually
13122     #    decorated with the 'weak' keyword
13123     # *) the shared object with the F_LOADONLY flag set, to really avoid
13124     #    it being seen by the linker.
13125     # At run time we better use the real file rather than another symlink,
13126     # but for link time we create the symlink libNAME.so -> libNAME.so.V
13127
13128     case $with_aix_soname,$aix_use_runtimelinking in
13129     # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
13130     # soname into executable. Probably we can add versioning support to
13131     # collect2, so additional links can be useful in future.
13132     aix,yes) # traditional libtool
13133       dynamic_linker='AIX unversionable lib.so'
13134       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
13135       # instead of lib<name>.a to let people know that these are not
13136       # typical AIX shared libraries.
13137       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13138       ;;
13139     aix,no) # traditional AIX only
13140       dynamic_linker='AIX lib.a(lib.so.V)'
13141       # We preserve .a as extension for shared libraries through AIX4.2
13142       # and later when we are not doing run time linking.
13143       library_names_spec='$libname$release.a $libname.a'
13144       soname_spec='$libname$release$shared_ext$major'
13145       ;;
13146     svr4,*) # full svr4 only
13147       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
13148       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13149       # We do not specify a path in Import Files, so LIBPATH fires.
13150       shlibpath_overrides_runpath=yes
13151       ;;
13152     *,yes) # both, prefer svr4
13153       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
13154       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13155       # unpreferred sharedlib libNAME.a needs extra handling
13156       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"'
13157       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"'
13158       # We do not specify a path in Import Files, so LIBPATH fires.
13159       shlibpath_overrides_runpath=yes
13160       ;;
13161     *,no) # both, prefer aix
13162       dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
13163       library_names_spec='$libname$release.a $libname.a'
13164       soname_spec='$libname$release$shared_ext$major'
13165       # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
13166       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)'
13167       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"'
13168       ;;
13169     esac
13170     shlibpath_var=LIBPATH
13171   fi
13172   ;;
13173
13174 amigaos*)
13175   case $host_cpu in
13176   powerpc)
13177     # Since July 2007 AmigaOS4 officially supports .so libraries.
13178     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
13179     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13180     ;;
13181   m68k)
13182     library_names_spec='$libname.ixlibrary $libname.a'
13183     # Create ${libname}_ixlibrary.a entries in /sys/libs.
13184     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'
13185     ;;
13186   esac
13187   ;;
13188
13189 beos*)
13190   library_names_spec='$libname$shared_ext'
13191   dynamic_linker="$host_os ld.so"
13192   shlibpath_var=LIBRARY_PATH
13193   ;;
13194
13195 bsdi[45]*)
13196   version_type=linux # correct to gnu/linux during the next big refactor
13197   need_version=no
13198   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13199   soname_spec='$libname$release$shared_ext$major'
13200   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13201   shlibpath_var=LD_LIBRARY_PATH
13202   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13203   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13204   # the default ld.so.conf also contains /usr/contrib/lib and
13205   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13206   # libtool to hard-code these into programs
13207   ;;
13208
13209 cygwin* | mingw* | pw32* | cegcc*)
13210   version_type=windows
13211   shrext_cmds=.dll
13212   need_version=no
13213   need_lib_prefix=no
13214
13215   case $GCC,$cc_basename in
13216   yes,*)
13217     # gcc
13218     library_names_spec='$libname.dll.a'
13219     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13220     postinstall_cmds='base_file=`basename \$file`~
13221       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13222       dldir=$destdir/`dirname \$dlpath`~
13223       test -d \$dldir || mkdir -p \$dldir~
13224       $install_prog $dir/$dlname \$dldir/$dlname~
13225       chmod a+x \$dldir/$dlname~
13226       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13227         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13228       fi'
13229     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13230       dlpath=$dir/\$dldll~
13231        $RM \$dlpath'
13232     shlibpath_overrides_runpath=yes
13233
13234     case $host_os in
13235     cygwin*)
13236       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13237       soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13238
13239       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
13240       ;;
13241     mingw* | cegcc*)
13242       # MinGW DLLs use traditional 'lib' prefix
13243       soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13244       ;;
13245     pw32*)
13246       # pw32 DLLs use 'pw' prefix rather than 'lib'
13247       library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13248       ;;
13249     esac
13250     dynamic_linker='Win32 ld.exe'
13251     ;;
13252
13253   *,cl*)
13254     # Native MSVC
13255     libname_spec='$name'
13256     soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13257     library_names_spec='$libname.dll.lib'
13258
13259     case $build_os in
13260     mingw*)
13261       sys_lib_search_path_spec=
13262       lt_save_ifs=$IFS
13263       IFS=';'
13264       for lt_path in $LIB
13265       do
13266         IFS=$lt_save_ifs
13267         # Let DOS variable expansion print the short 8.3 style file name.
13268         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
13269         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13270       done
13271       IFS=$lt_save_ifs
13272       # Convert to MSYS style.
13273       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13274       ;;
13275     cygwin*)
13276       # Convert to unix form, then to dos form, then back to unix form
13277       # but this time dos style (no spaces!) so that the unix form looks
13278       # like /cygdrive/c/PROGRA~1:/cygdr...
13279       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13280       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13281       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13282       ;;
13283     *)
13284       sys_lib_search_path_spec=$LIB
13285       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13286         # It is most probably a Windows format PATH.
13287         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13288       else
13289         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13290       fi
13291       # FIXME: find the short name or the path components, as spaces are
13292       # common. (e.g. "Program Files" -> "PROGRA~1")
13293       ;;
13294     esac
13295
13296     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13297     postinstall_cmds='base_file=`basename \$file`~
13298       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13299       dldir=$destdir/`dirname \$dlpath`~
13300       test -d \$dldir || mkdir -p \$dldir~
13301       $install_prog $dir/$dlname \$dldir/$dlname'
13302     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13303       dlpath=$dir/\$dldll~
13304        $RM \$dlpath'
13305     shlibpath_overrides_runpath=yes
13306     dynamic_linker='Win32 link.exe'
13307     ;;
13308
13309   *)
13310     # Assume MSVC wrapper
13311     library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13312     dynamic_linker='Win32 ld.exe'
13313     ;;
13314   esac
13315   # FIXME: first we should search . and the directory the executable is in
13316   shlibpath_var=PATH
13317   ;;
13318
13319 darwin* | rhapsody*)
13320   dynamic_linker="$host_os dyld"
13321   version_type=darwin
13322   need_lib_prefix=no
13323   need_version=no
13324   library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13325   soname_spec='$libname$release$major$shared_ext'
13326   shlibpath_overrides_runpath=yes
13327   shlibpath_var=DYLD_LIBRARY_PATH
13328   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13329
13330   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13331   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13332   ;;
13333
13334 dgux*)
13335   version_type=linux # correct to gnu/linux during the next big refactor
13336   need_lib_prefix=no
13337   need_version=no
13338   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13339   soname_spec='$libname$release$shared_ext$major'
13340   shlibpath_var=LD_LIBRARY_PATH
13341   ;;
13342
13343 freebsd* | dragonfly*)
13344   # DragonFly does not have aout.  When/if they implement a new
13345   # versioning mechanism, adjust this.
13346   if test -x /usr/bin/objformat; then
13347     objformat=`/usr/bin/objformat`
13348   else
13349     case $host_os in
13350     freebsd[23].*) objformat=aout ;;
13351     *) objformat=elf ;;
13352     esac
13353   fi
13354   version_type=freebsd-$objformat
13355   case $version_type in
13356     freebsd-elf*)
13357       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13358       soname_spec='$libname$release$shared_ext$major'
13359       need_version=no
13360       need_lib_prefix=no
13361       ;;
13362     freebsd-*)
13363       library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13364       need_version=yes
13365       ;;
13366   esac
13367   shlibpath_var=LD_LIBRARY_PATH
13368   case $host_os in
13369   freebsd2.*)
13370     shlibpath_overrides_runpath=yes
13371     ;;
13372   freebsd3.[01]* | freebsdelf3.[01]*)
13373     shlibpath_overrides_runpath=yes
13374     hardcode_into_libs=yes
13375     ;;
13376   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13377   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13378     shlibpath_overrides_runpath=no
13379     hardcode_into_libs=yes
13380     ;;
13381   *) # from 4.6 on, and DragonFly
13382     shlibpath_overrides_runpath=yes
13383     hardcode_into_libs=yes
13384     ;;
13385   esac
13386   ;;
13387
13388 haiku*)
13389   version_type=linux # correct to gnu/linux during the next big refactor
13390   need_lib_prefix=no
13391   need_version=no
13392   dynamic_linker="$host_os runtime_loader"
13393   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13394   soname_spec='$libname$release$shared_ext$major'
13395   shlibpath_var=LIBRARY_PATH
13396   shlibpath_overrides_runpath=no
13397   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13398   hardcode_into_libs=yes
13399   ;;
13400
13401 hpux9* | hpux10* | hpux11*)
13402   # Give a soname corresponding to the major version so that dld.sl refuses to
13403   # link against other versions.
13404   version_type=sunos
13405   need_lib_prefix=no
13406   need_version=no
13407   case $host_cpu in
13408   ia64*)
13409     shrext_cmds='.so'
13410     hardcode_into_libs=yes
13411     dynamic_linker="$host_os dld.so"
13412     shlibpath_var=LD_LIBRARY_PATH
13413     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13414     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13415     soname_spec='$libname$release$shared_ext$major'
13416     if test 32 = "$HPUX_IA64_MODE"; then
13417       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13418       sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13419     else
13420       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13421       sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13422     fi
13423     ;;
13424   hppa*64*)
13425     shrext_cmds='.sl'
13426     hardcode_into_libs=yes
13427     dynamic_linker="$host_os dld.sl"
13428     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13429     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13430     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13431     soname_spec='$libname$release$shared_ext$major'
13432     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13433     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13434     ;;
13435   *)
13436     shrext_cmds='.sl'
13437     dynamic_linker="$host_os dld.sl"
13438     shlibpath_var=SHLIB_PATH
13439     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13440     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13441     soname_spec='$libname$release$shared_ext$major'
13442     ;;
13443   esac
13444   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13445   postinstall_cmds='chmod 555 $lib'
13446   # or fails outright, so override atomically:
13447   install_override_mode=555
13448   ;;
13449
13450 interix[3-9]*)
13451   version_type=linux # correct to gnu/linux during the next big refactor
13452   need_lib_prefix=no
13453   need_version=no
13454   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13455   soname_spec='$libname$release$shared_ext$major'
13456   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13457   shlibpath_var=LD_LIBRARY_PATH
13458   shlibpath_overrides_runpath=no
13459   hardcode_into_libs=yes
13460   ;;
13461
13462 irix5* | irix6* | nonstopux*)
13463   case $host_os in
13464     nonstopux*) version_type=nonstopux ;;
13465     *)
13466         if test yes = "$lt_cv_prog_gnu_ld"; then
13467                 version_type=linux # correct to gnu/linux during the next big refactor
13468         else
13469                 version_type=irix
13470         fi ;;
13471   esac
13472   need_lib_prefix=no
13473   need_version=no
13474   soname_spec='$libname$release$shared_ext$major'
13475   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13476   case $host_os in
13477   irix5* | nonstopux*)
13478     libsuff= shlibsuff=
13479     ;;
13480   *)
13481     case $LD in # libtool.m4 will add one of these switches to LD
13482     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13483       libsuff= shlibsuff= libmagic=32-bit;;
13484     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13485       libsuff=32 shlibsuff=N32 libmagic=N32;;
13486     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13487       libsuff=64 shlibsuff=64 libmagic=64-bit;;
13488     *) libsuff= shlibsuff= libmagic=never-match;;
13489     esac
13490     ;;
13491   esac
13492   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13493   shlibpath_overrides_runpath=no
13494   sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13495   sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13496   hardcode_into_libs=yes
13497   ;;
13498
13499 # No shared lib support for Linux oldld, aout, or coff.
13500 linux*oldld* | linux*aout* | linux*coff*)
13501   dynamic_linker=no
13502   ;;
13503
13504 linux*android*)
13505   version_type=none # Android doesn't support versioned libraries.
13506   need_lib_prefix=no
13507   need_version=no
13508   library_names_spec='$libname$release$shared_ext'
13509   soname_spec='$libname$release$shared_ext'
13510   finish_cmds=
13511   shlibpath_var=LD_LIBRARY_PATH
13512   shlibpath_overrides_runpath=yes
13513
13514   # This implies no fast_install, which is unacceptable.
13515   # Some rework will be needed to allow for fast_install
13516   # before this can be enabled.
13517   hardcode_into_libs=yes
13518
13519   dynamic_linker='Android linker'
13520   # Don't embed -rpath directories since the linker doesn't support them.
13521   hardcode_libdir_flag_spec='-L$libdir'
13522   ;;
13523
13524 # This must be glibc/ELF.
13525 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13526   version_type=linux # correct to gnu/linux during the next big refactor
13527   need_lib_prefix=no
13528   need_version=no
13529   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13530   soname_spec='$libname$release$shared_ext$major'
13531   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13532   shlibpath_var=LD_LIBRARY_PATH
13533   shlibpath_overrides_runpath=no
13534
13535   # Some binutils ld are patched to set DT_RUNPATH
13536   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
13537   $as_echo_n "(cached) " >&6
13538 else
13539   lt_cv_shlibpath_overrides_runpath=no
13540     save_LDFLAGS=$LDFLAGS
13541     save_libdir=$libdir
13542     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13543          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13544     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13545 /* end confdefs.h.  */
13546
13547 int
13548 main ()
13549 {
13550
13551   ;
13552   return 0;
13553 }
13554 _ACEOF
13555 if ac_fn_c_try_link "$LINENO"; then :
13556   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
13557   lt_cv_shlibpath_overrides_runpath=yes
13558 fi
13559 fi
13560 rm -f core conftest.err conftest.$ac_objext \
13561     conftest$ac_exeext conftest.$ac_ext
13562     LDFLAGS=$save_LDFLAGS
13563     libdir=$save_libdir
13564
13565 fi
13566
13567   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13568
13569   # This implies no fast_install, which is unacceptable.
13570   # Some rework will be needed to allow for fast_install
13571   # before this can be enabled.
13572   hardcode_into_libs=yes
13573
13574   # Add ABI-specific directories to the system library path.
13575   sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
13576
13577   # Ideally, we could use ldconfig to report *all* directores which are
13578   # searched for libraries, however this is still not possible.  Aside from not
13579   # being certain /sbin/ldconfig is available, command
13580   # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13581   # even though it is searched at run-time.  Try to do the best guess by
13582   # appending ld.so.conf contents (and includes) to the search path.
13583   if test -f /etc/ld.so.conf; then
13584     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' ' '`
13585     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
13586   fi
13587
13588   # We used to test for /lib/ld.so.1 and disable shared libraries on
13589   # powerpc, because MkLinux only supported shared libraries with the
13590   # GNU dynamic linker.  Since this was broken with cross compilers,
13591   # most powerpc-linux boxes support dynamic linking these days and
13592   # people can always --disable-shared, the test was removed, and we
13593   # assume the GNU/Linux dynamic linker is in use.
13594   dynamic_linker='GNU/Linux ld.so'
13595   ;;
13596
13597 netbsd*)
13598   version_type=sunos
13599   need_lib_prefix=no
13600   need_version=no
13601   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13602     library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13603     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13604     dynamic_linker='NetBSD (a.out) ld.so'
13605   else
13606     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13607     soname_spec='$libname$release$shared_ext$major'
13608     dynamic_linker='NetBSD ld.elf_so'
13609   fi
13610   shlibpath_var=LD_LIBRARY_PATH
13611   shlibpath_overrides_runpath=yes
13612   hardcode_into_libs=yes
13613   ;;
13614
13615 newsos6)
13616   version_type=linux # correct to gnu/linux during the next big refactor
13617   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13618   shlibpath_var=LD_LIBRARY_PATH
13619   shlibpath_overrides_runpath=yes
13620   ;;
13621
13622 *nto* | *qnx*)
13623   version_type=qnx
13624   need_lib_prefix=no
13625   need_version=no
13626   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13627   soname_spec='$libname$release$shared_ext$major'
13628   shlibpath_var=LD_LIBRARY_PATH
13629   shlibpath_overrides_runpath=no
13630   hardcode_into_libs=yes
13631   dynamic_linker='ldqnx.so'
13632   ;;
13633
13634 openbsd* | bitrig*)
13635   version_type=sunos
13636   sys_lib_dlsearch_path_spec=/usr/lib
13637   need_lib_prefix=no
13638   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13639     need_version=no
13640   else
13641     need_version=yes
13642   fi
13643   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13644   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13645   shlibpath_var=LD_LIBRARY_PATH
13646   shlibpath_overrides_runpath=yes
13647   ;;
13648
13649 os2*)
13650   libname_spec='$name'
13651   version_type=windows
13652   shrext_cmds=.dll
13653   need_version=no
13654   need_lib_prefix=no
13655   # OS/2 can only load a DLL with a base name of 8 characters or less.
13656   soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13657     v=$($ECHO $release$versuffix | tr -d .-);
13658     n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13659     $ECHO $n$v`$shared_ext'
13660   library_names_spec='${libname}_dll.$libext'
13661   dynamic_linker='OS/2 ld.exe'
13662   shlibpath_var=BEGINLIBPATH
13663   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13664   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13665   postinstall_cmds='base_file=`basename \$file`~
13666     dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13667     dldir=$destdir/`dirname \$dlpath`~
13668     test -d \$dldir || mkdir -p \$dldir~
13669     $install_prog $dir/$dlname \$dldir/$dlname~
13670     chmod a+x \$dldir/$dlname~
13671     if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13672       eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13673     fi'
13674   postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13675     dlpath=$dir/\$dldll~
13676     $RM \$dlpath'
13677   ;;
13678
13679 osf3* | osf4* | osf5*)
13680   version_type=osf
13681   need_lib_prefix=no
13682   need_version=no
13683   soname_spec='$libname$release$shared_ext$major'
13684   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13685   shlibpath_var=LD_LIBRARY_PATH
13686   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13687   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13688   ;;
13689
13690 rdos*)
13691   dynamic_linker=no
13692   ;;
13693
13694 solaris*)
13695   version_type=linux # correct to gnu/linux during the next big refactor
13696   need_lib_prefix=no
13697   need_version=no
13698   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13699   soname_spec='$libname$release$shared_ext$major'
13700   shlibpath_var=LD_LIBRARY_PATH
13701   shlibpath_overrides_runpath=yes
13702   hardcode_into_libs=yes
13703   # ldd complains unless libraries are executable
13704   postinstall_cmds='chmod +x $lib'
13705   ;;
13706
13707 sunos4*)
13708   version_type=sunos
13709   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13710   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13711   shlibpath_var=LD_LIBRARY_PATH
13712   shlibpath_overrides_runpath=yes
13713   if test yes = "$with_gnu_ld"; then
13714     need_lib_prefix=no
13715   fi
13716   need_version=yes
13717   ;;
13718
13719 sysv4 | sysv4.3*)
13720   version_type=linux # correct to gnu/linux during the next big refactor
13721   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13722   soname_spec='$libname$release$shared_ext$major'
13723   shlibpath_var=LD_LIBRARY_PATH
13724   case $host_vendor in
13725     sni)
13726       shlibpath_overrides_runpath=no
13727       need_lib_prefix=no
13728       runpath_var=LD_RUN_PATH
13729       ;;
13730     siemens)
13731       need_lib_prefix=no
13732       ;;
13733     motorola)
13734       need_lib_prefix=no
13735       need_version=no
13736       shlibpath_overrides_runpath=no
13737       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13738       ;;
13739   esac
13740   ;;
13741
13742 sysv4*MP*)
13743   if test -d /usr/nec; then
13744     version_type=linux # correct to gnu/linux during the next big refactor
13745     library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13746     soname_spec='$libname$shared_ext.$major'
13747     shlibpath_var=LD_LIBRARY_PATH
13748   fi
13749   ;;
13750
13751 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13752   version_type=sco
13753   need_lib_prefix=no
13754   need_version=no
13755   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13756   soname_spec='$libname$release$shared_ext$major'
13757   shlibpath_var=LD_LIBRARY_PATH
13758   shlibpath_overrides_runpath=yes
13759   hardcode_into_libs=yes
13760   if test yes = "$with_gnu_ld"; then
13761     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13762   else
13763     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13764     case $host_os in
13765       sco3.2v5*)
13766         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13767         ;;
13768     esac
13769   fi
13770   sys_lib_dlsearch_path_spec='/usr/lib'
13771   ;;
13772
13773 tpf*)
13774   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13775   version_type=linux # correct to gnu/linux during the next big refactor
13776   need_lib_prefix=no
13777   need_version=no
13778   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13779   shlibpath_var=LD_LIBRARY_PATH
13780   shlibpath_overrides_runpath=no
13781   hardcode_into_libs=yes
13782   ;;
13783
13784 uts4*)
13785   version_type=linux # correct to gnu/linux during the next big refactor
13786   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13787   soname_spec='$libname$release$shared_ext$major'
13788   shlibpath_var=LD_LIBRARY_PATH
13789   ;;
13790
13791 *)
13792   dynamic_linker=no
13793   ;;
13794 esac
13795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13796 $as_echo "$dynamic_linker" >&6; }
13797 test no = "$dynamic_linker" && can_build_shared=no
13798
13799 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13800 if test yes = "$GCC"; then
13801   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13802 fi
13803
13804 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13805   sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13806 fi
13807
13808 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13809   sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13810 fi
13811
13812 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13813 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13814
13815 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13816 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13817
13818 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13819 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
13820
13821
13822
13823
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   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13918 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13919 hardcode_action=
13920 if test -n "$hardcode_libdir_flag_spec" ||
13921    test -n "$runpath_var" ||
13922    test yes = "$hardcode_automatic"; then
13923
13924   # We can hardcode non-existent directories.
13925   if test no != "$hardcode_direct" &&
13926      # If the only mechanism to avoid hardcoding is shlibpath_var, we
13927      # have to relink, otherwise we might link with an installed library
13928      # when we should be linking with a yet-to-be-installed one
13929      ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13930      test no != "$hardcode_minus_L"; then
13931     # Linking always hardcodes the temporary library directory.
13932     hardcode_action=relink
13933   else
13934     # We can link without hardcoding, and we can hardcode nonexisting dirs.
13935     hardcode_action=immediate
13936   fi
13937 else
13938   # We cannot hardcode anything, or else we can only hardcode existing
13939   # directories.
13940   hardcode_action=unsupported
13941 fi
13942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13943 $as_echo "$hardcode_action" >&6; }
13944
13945 if test relink = "$hardcode_action" ||
13946    test yes = "$inherit_rpath"; then
13947   # Fast installation is not supported
13948   enable_fast_install=no
13949 elif test yes = "$shlibpath_overrides_runpath" ||
13950      test no = "$enable_shared"; then
13951   # Fast installation is not necessary
13952   enable_fast_install=needless
13953 fi
13954
13955
13956
13957
13958
13959
13960   if test yes != "$enable_dlopen"; then
13961   enable_dlopen=unknown
13962   enable_dlopen_self=unknown
13963   enable_dlopen_self_static=unknown
13964 else
13965   lt_cv_dlopen=no
13966   lt_cv_dlopen_libs=
13967
13968   case $host_os in
13969   beos*)
13970     lt_cv_dlopen=load_add_on
13971     lt_cv_dlopen_libs=
13972     lt_cv_dlopen_self=yes
13973     ;;
13974
13975   mingw* | pw32* | cegcc*)
13976     lt_cv_dlopen=LoadLibrary
13977     lt_cv_dlopen_libs=
13978     ;;
13979
13980   cygwin*)
13981     lt_cv_dlopen=dlopen
13982     lt_cv_dlopen_libs=
13983     ;;
13984
13985   darwin*)
13986     # if libdl is installed we need to link against it
13987     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13988 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13989 if ${ac_cv_lib_dl_dlopen+:} false; then :
13990   $as_echo_n "(cached) " >&6
13991 else
13992   ac_check_lib_save_LIBS=$LIBS
13993 LIBS="-ldl  $LIBS"
13994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13995 /* end confdefs.h.  */
13996
13997 /* Override any GCC internal prototype to avoid an error.
13998    Use char because int might match the return type of a GCC
13999    builtin and then its argument prototype would still apply.  */
14000 #ifdef __cplusplus
14001 extern "C"
14002 #endif
14003 char dlopen ();
14004 int
14005 main ()
14006 {
14007 return dlopen ();
14008   ;
14009   return 0;
14010 }
14011 _ACEOF
14012 if ac_fn_c_try_link "$LINENO"; then :
14013   ac_cv_lib_dl_dlopen=yes
14014 else
14015   ac_cv_lib_dl_dlopen=no
14016 fi
14017 rm -f core conftest.err conftest.$ac_objext \
14018     conftest$ac_exeext conftest.$ac_ext
14019 LIBS=$ac_check_lib_save_LIBS
14020 fi
14021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14022 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14023 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14024   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14025 else
14026
14027     lt_cv_dlopen=dyld
14028     lt_cv_dlopen_libs=
14029     lt_cv_dlopen_self=yes
14030
14031 fi
14032
14033     ;;
14034
14035   tpf*)
14036     # Don't try to run any link tests for TPF.  We know it's impossible
14037     # because TPF is a cross-compiler, and we know how we open DSOs.
14038     lt_cv_dlopen=dlopen
14039     lt_cv_dlopen_libs=
14040     lt_cv_dlopen_self=no
14041     ;;
14042
14043   *)
14044     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
14045 if test "x$ac_cv_func_shl_load" = xyes; then :
14046   lt_cv_dlopen=shl_load
14047 else
14048   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
14049 $as_echo_n "checking for shl_load in -ldld... " >&6; }
14050 if ${ac_cv_lib_dld_shl_load+:} false; then :
14051   $as_echo_n "(cached) " >&6
14052 else
14053   ac_check_lib_save_LIBS=$LIBS
14054 LIBS="-ldld  $LIBS"
14055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14056 /* end confdefs.h.  */
14057
14058 /* Override any GCC internal prototype to avoid an error.
14059    Use char because int might match the return type of a GCC
14060    builtin and then its argument prototype would still apply.  */
14061 #ifdef __cplusplus
14062 extern "C"
14063 #endif
14064 char shl_load ();
14065 int
14066 main ()
14067 {
14068 return shl_load ();
14069   ;
14070   return 0;
14071 }
14072 _ACEOF
14073 if ac_fn_c_try_link "$LINENO"; then :
14074   ac_cv_lib_dld_shl_load=yes
14075 else
14076   ac_cv_lib_dld_shl_load=no
14077 fi
14078 rm -f core conftest.err conftest.$ac_objext \
14079     conftest$ac_exeext conftest.$ac_ext
14080 LIBS=$ac_check_lib_save_LIBS
14081 fi
14082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
14083 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
14084 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
14085   lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
14086 else
14087   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
14088 if test "x$ac_cv_func_dlopen" = xyes; then :
14089   lt_cv_dlopen=dlopen
14090 else
14091   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14092 $as_echo_n "checking for dlopen in -ldl... " >&6; }
14093 if ${ac_cv_lib_dl_dlopen+:} false; then :
14094   $as_echo_n "(cached) " >&6
14095 else
14096   ac_check_lib_save_LIBS=$LIBS
14097 LIBS="-ldl  $LIBS"
14098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14099 /* end confdefs.h.  */
14100
14101 /* Override any GCC internal prototype to avoid an error.
14102    Use char because int might match the return type of a GCC
14103    builtin and then its argument prototype would still apply.  */
14104 #ifdef __cplusplus
14105 extern "C"
14106 #endif
14107 char dlopen ();
14108 int
14109 main ()
14110 {
14111 return dlopen ();
14112   ;
14113   return 0;
14114 }
14115 _ACEOF
14116 if ac_fn_c_try_link "$LINENO"; then :
14117   ac_cv_lib_dl_dlopen=yes
14118 else
14119   ac_cv_lib_dl_dlopen=no
14120 fi
14121 rm -f core conftest.err conftest.$ac_objext \
14122     conftest$ac_exeext conftest.$ac_ext
14123 LIBS=$ac_check_lib_save_LIBS
14124 fi
14125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14126 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14127 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14128   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14129 else
14130   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
14131 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
14132 if ${ac_cv_lib_svld_dlopen+:} false; then :
14133   $as_echo_n "(cached) " >&6
14134 else
14135   ac_check_lib_save_LIBS=$LIBS
14136 LIBS="-lsvld  $LIBS"
14137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14138 /* end confdefs.h.  */
14139
14140 /* Override any GCC internal prototype to avoid an error.
14141    Use char because int might match the return type of a GCC
14142    builtin and then its argument prototype would still apply.  */
14143 #ifdef __cplusplus
14144 extern "C"
14145 #endif
14146 char dlopen ();
14147 int
14148 main ()
14149 {
14150 return dlopen ();
14151   ;
14152   return 0;
14153 }
14154 _ACEOF
14155 if ac_fn_c_try_link "$LINENO"; then :
14156   ac_cv_lib_svld_dlopen=yes
14157 else
14158   ac_cv_lib_svld_dlopen=no
14159 fi
14160 rm -f core conftest.err conftest.$ac_objext \
14161     conftest$ac_exeext conftest.$ac_ext
14162 LIBS=$ac_check_lib_save_LIBS
14163 fi
14164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
14165 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
14166 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
14167   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
14168 else
14169   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
14170 $as_echo_n "checking for dld_link in -ldld... " >&6; }
14171 if ${ac_cv_lib_dld_dld_link+:} false; then :
14172   $as_echo_n "(cached) " >&6
14173 else
14174   ac_check_lib_save_LIBS=$LIBS
14175 LIBS="-ldld  $LIBS"
14176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14177 /* end confdefs.h.  */
14178
14179 /* Override any GCC internal prototype to avoid an error.
14180    Use char because int might match the return type of a GCC
14181    builtin and then its argument prototype would still apply.  */
14182 #ifdef __cplusplus
14183 extern "C"
14184 #endif
14185 char dld_link ();
14186 int
14187 main ()
14188 {
14189 return dld_link ();
14190   ;
14191   return 0;
14192 }
14193 _ACEOF
14194 if ac_fn_c_try_link "$LINENO"; then :
14195   ac_cv_lib_dld_dld_link=yes
14196 else
14197   ac_cv_lib_dld_dld_link=no
14198 fi
14199 rm -f core conftest.err conftest.$ac_objext \
14200     conftest$ac_exeext conftest.$ac_ext
14201 LIBS=$ac_check_lib_save_LIBS
14202 fi
14203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
14204 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
14205 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
14206   lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
14207 fi
14208
14209
14210 fi
14211
14212
14213 fi
14214
14215
14216 fi
14217
14218
14219 fi
14220
14221
14222 fi
14223
14224     ;;
14225   esac
14226
14227   if test no = "$lt_cv_dlopen"; then
14228     enable_dlopen=no
14229   else
14230     enable_dlopen=yes
14231   fi
14232
14233   case $lt_cv_dlopen in
14234   dlopen)
14235     save_CPPFLAGS=$CPPFLAGS
14236     test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14237
14238     save_LDFLAGS=$LDFLAGS
14239     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14240
14241     save_LIBS=$LIBS
14242     LIBS="$lt_cv_dlopen_libs $LIBS"
14243
14244     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
14245 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
14246 if ${lt_cv_dlopen_self+:} false; then :
14247   $as_echo_n "(cached) " >&6
14248 else
14249           if test yes = "$cross_compiling"; then :
14250   lt_cv_dlopen_self=cross
14251 else
14252   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14253   lt_status=$lt_dlunknown
14254   cat > conftest.$ac_ext <<_LT_EOF
14255 #line $LINENO "configure"
14256 #include "confdefs.h"
14257
14258 #if HAVE_DLFCN_H
14259 #include <dlfcn.h>
14260 #endif
14261
14262 #include <stdio.h>
14263
14264 #ifdef RTLD_GLOBAL
14265 #  define LT_DLGLOBAL           RTLD_GLOBAL
14266 #else
14267 #  ifdef DL_GLOBAL
14268 #    define LT_DLGLOBAL         DL_GLOBAL
14269 #  else
14270 #    define LT_DLGLOBAL         0
14271 #  endif
14272 #endif
14273
14274 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14275    find out it does not work in some platform. */
14276 #ifndef LT_DLLAZY_OR_NOW
14277 #  ifdef RTLD_LAZY
14278 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14279 #  else
14280 #    ifdef DL_LAZY
14281 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14282 #    else
14283 #      ifdef RTLD_NOW
14284 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14285 #      else
14286 #        ifdef DL_NOW
14287 #          define LT_DLLAZY_OR_NOW      DL_NOW
14288 #        else
14289 #          define LT_DLLAZY_OR_NOW      0
14290 #        endif
14291 #      endif
14292 #    endif
14293 #  endif
14294 #endif
14295
14296 /* When -fvisibility=hidden is used, assume the code has been annotated
14297    correspondingly for the symbols needed.  */
14298 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14299 int fnord () __attribute__((visibility("default")));
14300 #endif
14301
14302 int fnord () { return 42; }
14303 int main ()
14304 {
14305   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14306   int status = $lt_dlunknown;
14307
14308   if (self)
14309     {
14310       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14311       else
14312         {
14313           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14314           else puts (dlerror ());
14315         }
14316       /* dlclose (self); */
14317     }
14318   else
14319     puts (dlerror ());
14320
14321   return status;
14322 }
14323 _LT_EOF
14324   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14325   (eval $ac_link) 2>&5
14326   ac_status=$?
14327   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14328   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14329     (./conftest; exit; ) >&5 2>/dev/null
14330     lt_status=$?
14331     case x$lt_status in
14332       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14333       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14334       x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14335     esac
14336   else :
14337     # compilation failed
14338     lt_cv_dlopen_self=no
14339   fi
14340 fi
14341 rm -fr conftest*
14342
14343
14344 fi
14345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14346 $as_echo "$lt_cv_dlopen_self" >&6; }
14347
14348     if test yes = "$lt_cv_dlopen_self"; then
14349       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14350       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14351 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
14352 if ${lt_cv_dlopen_self_static+:} false; then :
14353   $as_echo_n "(cached) " >&6
14354 else
14355           if test yes = "$cross_compiling"; then :
14356   lt_cv_dlopen_self_static=cross
14357 else
14358   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14359   lt_status=$lt_dlunknown
14360   cat > conftest.$ac_ext <<_LT_EOF
14361 #line $LINENO "configure"
14362 #include "confdefs.h"
14363
14364 #if HAVE_DLFCN_H
14365 #include <dlfcn.h>
14366 #endif
14367
14368 #include <stdio.h>
14369
14370 #ifdef RTLD_GLOBAL
14371 #  define LT_DLGLOBAL           RTLD_GLOBAL
14372 #else
14373 #  ifdef DL_GLOBAL
14374 #    define LT_DLGLOBAL         DL_GLOBAL
14375 #  else
14376 #    define LT_DLGLOBAL         0
14377 #  endif
14378 #endif
14379
14380 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14381    find out it does not work in some platform. */
14382 #ifndef LT_DLLAZY_OR_NOW
14383 #  ifdef RTLD_LAZY
14384 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14385 #  else
14386 #    ifdef DL_LAZY
14387 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14388 #    else
14389 #      ifdef RTLD_NOW
14390 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14391 #      else
14392 #        ifdef DL_NOW
14393 #          define LT_DLLAZY_OR_NOW      DL_NOW
14394 #        else
14395 #          define LT_DLLAZY_OR_NOW      0
14396 #        endif
14397 #      endif
14398 #    endif
14399 #  endif
14400 #endif
14401
14402 /* When -fvisibility=hidden is used, assume the code has been annotated
14403    correspondingly for the symbols needed.  */
14404 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14405 int fnord () __attribute__((visibility("default")));
14406 #endif
14407
14408 int fnord () { return 42; }
14409 int main ()
14410 {
14411   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14412   int status = $lt_dlunknown;
14413
14414   if (self)
14415     {
14416       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14417       else
14418         {
14419           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14420           else puts (dlerror ());
14421         }
14422       /* dlclose (self); */
14423     }
14424   else
14425     puts (dlerror ());
14426
14427   return status;
14428 }
14429 _LT_EOF
14430   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14431   (eval $ac_link) 2>&5
14432   ac_status=$?
14433   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14434   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14435     (./conftest; exit; ) >&5 2>/dev/null
14436     lt_status=$?
14437     case x$lt_status in
14438       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14439       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14440       x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14441     esac
14442   else :
14443     # compilation failed
14444     lt_cv_dlopen_self_static=no
14445   fi
14446 fi
14447 rm -fr conftest*
14448
14449
14450 fi
14451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14452 $as_echo "$lt_cv_dlopen_self_static" >&6; }
14453     fi
14454
14455     CPPFLAGS=$save_CPPFLAGS
14456     LDFLAGS=$save_LDFLAGS
14457     LIBS=$save_LIBS
14458     ;;
14459   esac
14460
14461   case $lt_cv_dlopen_self in
14462   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14463   *) enable_dlopen_self=unknown ;;
14464   esac
14465
14466   case $lt_cv_dlopen_self_static in
14467   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14468   *) enable_dlopen_self_static=unknown ;;
14469   esac
14470 fi
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488 striplib=
14489 old_striplib=
14490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14491 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
14492 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14493   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14494   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14496 $as_echo "yes" >&6; }
14497 else
14498 # FIXME - insert some real tests, host_os isn't really good enough
14499   case $host_os in
14500   darwin*)
14501     if test -n "$STRIP"; then
14502       striplib="$STRIP -x"
14503       old_striplib="$STRIP -S"
14504       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14505 $as_echo "yes" >&6; }
14506     else
14507       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14508 $as_echo "no" >&6; }
14509     fi
14510     ;;
14511   *)
14512     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14513 $as_echo "no" >&6; }
14514     ;;
14515   esac
14516 fi
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529   # Report what library types will actually be built
14530   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14531 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
14532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14533 $as_echo "$can_build_shared" >&6; }
14534
14535   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14536 $as_echo_n "checking whether to build shared libraries... " >&6; }
14537   test no = "$can_build_shared" && enable_shared=no
14538
14539   # On AIX, shared libraries and static libraries use the same namespace, and
14540   # are all built from PIC.
14541   case $host_os in
14542   aix3*)
14543     test yes = "$enable_shared" && enable_static=no
14544     if test -n "$RANLIB"; then
14545       archive_cmds="$archive_cmds~\$RANLIB \$lib"
14546       postinstall_cmds='$RANLIB $lib'
14547     fi
14548     ;;
14549
14550   aix[4-9]*)
14551     if test ia64 != "$host_cpu"; then
14552       case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14553       yes,aix,yes) ;;                   # shared object as lib.so file only
14554       yes,svr4,*) ;;                    # shared object as lib.so archive member only
14555       yes,*) enable_static=no ;;        # shared object in lib.a archive as well
14556       esac
14557     fi
14558     ;;
14559   esac
14560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14561 $as_echo "$enable_shared" >&6; }
14562
14563   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14564 $as_echo_n "checking whether to build static libraries... " >&6; }
14565   # Make sure either enable_shared or enable_static is yes.
14566   test yes = "$enable_shared" || enable_static=yes
14567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14568 $as_echo "$enable_static" >&6; }
14569
14570
14571
14572
14573 fi
14574 ac_ext=c
14575 ac_cpp='$CPP $CPPFLAGS'
14576 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14577 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14578 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14579
14580 CC=$lt_save_CC
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596         ac_config_commands="$ac_config_commands libtool"
14597
14598
14599
14600
14601 # Only expand once:
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
14614         if test -n "$ac_tool_prefix"; then
14615   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
14616 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
14617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14618 $as_echo_n "checking for $ac_word... " >&6; }
14619 if ${ac_cv_path_PKG_CONFIG+:} false; then :
14620   $as_echo_n "(cached) " >&6
14621 else
14622   case $PKG_CONFIG in
14623   [\\/]* | ?:[\\/]*)
14624   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
14625   ;;
14626   *)
14627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14628 for as_dir in $PATH
14629 do
14630   IFS=$as_save_IFS
14631   test -z "$as_dir" && as_dir=.
14632     for ac_exec_ext in '' $ac_executable_extensions; do
14633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14634     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14636     break 2
14637   fi
14638 done
14639   done
14640 IFS=$as_save_IFS
14641
14642   ;;
14643 esac
14644 fi
14645 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
14646 if test -n "$PKG_CONFIG"; then
14647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
14648 $as_echo "$PKG_CONFIG" >&6; }
14649 else
14650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14651 $as_echo "no" >&6; }
14652 fi
14653
14654
14655 fi
14656 if test -z "$ac_cv_path_PKG_CONFIG"; then
14657   ac_pt_PKG_CONFIG=$PKG_CONFIG
14658   # Extract the first word of "pkg-config", so it can be a program name with args.
14659 set dummy pkg-config; ac_word=$2
14660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14661 $as_echo_n "checking for $ac_word... " >&6; }
14662 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
14663   $as_echo_n "(cached) " >&6
14664 else
14665   case $ac_pt_PKG_CONFIG in
14666   [\\/]* | ?:[\\/]*)
14667   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
14668   ;;
14669   *)
14670   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14671 for as_dir in $PATH
14672 do
14673   IFS=$as_save_IFS
14674   test -z "$as_dir" && as_dir=.
14675     for ac_exec_ext in '' $ac_executable_extensions; do
14676   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14677     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14678     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14679     break 2
14680   fi
14681 done
14682   done
14683 IFS=$as_save_IFS
14684
14685   ;;
14686 esac
14687 fi
14688 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
14689 if test -n "$ac_pt_PKG_CONFIG"; then
14690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
14691 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
14692 else
14693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14694 $as_echo "no" >&6; }
14695 fi
14696
14697   if test "x$ac_pt_PKG_CONFIG" = x; then
14698     PKG_CONFIG=""
14699   else
14700     case $cross_compiling:$ac_tool_warned in
14701 yes:)
14702 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14703 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14704 ac_tool_warned=yes ;;
14705 esac
14706     PKG_CONFIG=$ac_pt_PKG_CONFIG
14707   fi
14708 else
14709   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
14710 fi
14711
14712 fi
14713 if test -n "$PKG_CONFIG"; then
14714         _pkg_min_version=0.9.0
14715         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
14716 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
14717         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
14718                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14719 $as_echo "yes" >&6; }
14720         else
14721                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14722 $as_echo "no" >&6; }
14723                 PKG_CONFIG=""
14724         fi
14725 fi
14726
14727 # Checks for header files.
14728 for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h
14729 do :
14730   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14731 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
14732 "
14733 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14734   cat >>confdefs.h <<_ACEOF
14735 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14736 _ACEOF
14737
14738 fi
14739
14740 done
14741
14742
14743 # Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH
14744 for ac_header in TargetConditionals.h
14745 do :
14746   ac_fn_c_check_header_mongrel "$LINENO" "TargetConditionals.h" "ac_cv_header_TargetConditionals_h" "$ac_includes_default"
14747 if test "x$ac_cv_header_TargetConditionals_h" = xyes; then :
14748   cat >>confdefs.h <<_ACEOF
14749 #define HAVE_TARGETCONDITIONALS_H 1
14750 _ACEOF
14751
14752 fi
14753
14754 done
14755
14756
14757 # check for types.
14758 # Using own tests for int64* because autoconf builtin only give 32bit.
14759 ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
14760 if test "x$ac_cv_type_int8_t" = xyes; then :
14761
14762 else
14763
14764 cat >>confdefs.h <<_ACEOF
14765 #define int8_t signed char
14766 _ACEOF
14767
14768 fi
14769
14770 ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
14771 if test "x$ac_cv_type_int16_t" = xyes; then :
14772
14773 else
14774
14775 cat >>confdefs.h <<_ACEOF
14776 #define int16_t short
14777 _ACEOF
14778
14779 fi
14780
14781 ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
14782 if test "x$ac_cv_type_int32_t" = xyes; then :
14783
14784 else
14785
14786 cat >>confdefs.h <<_ACEOF
14787 #define int32_t int
14788 _ACEOF
14789
14790 fi
14791
14792 ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
14793 if test "x$ac_cv_type_int64_t" = xyes; then :
14794
14795 else
14796
14797 cat >>confdefs.h <<_ACEOF
14798 #define int64_t long long
14799 _ACEOF
14800
14801 fi
14802
14803 ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
14804 if test "x$ac_cv_type_uint8_t" = xyes; then :
14805
14806 else
14807
14808 cat >>confdefs.h <<_ACEOF
14809 #define uint8_t unsigned char
14810 _ACEOF
14811
14812 fi
14813
14814 ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
14815 if test "x$ac_cv_type_uint16_t" = xyes; then :
14816
14817 else
14818
14819 cat >>confdefs.h <<_ACEOF
14820 #define uint16_t unsigned short
14821 _ACEOF
14822
14823 fi
14824
14825 ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
14826 if test "x$ac_cv_type_uint32_t" = xyes; then :
14827
14828 else
14829
14830 cat >>confdefs.h <<_ACEOF
14831 #define uint32_t unsigned int
14832 _ACEOF
14833
14834 fi
14835
14836 ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
14837 if test "x$ac_cv_type_uint64_t" = xyes; then :
14838
14839 else
14840
14841 cat >>confdefs.h <<_ACEOF
14842 #define uint64_t unsigned long long
14843 _ACEOF
14844
14845 fi
14846
14847 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14848 if test "x$ac_cv_type_size_t" = xyes; then :
14849
14850 else
14851
14852 cat >>confdefs.h <<_ACEOF
14853 #define size_t unsigned int
14854 _ACEOF
14855
14856 fi
14857
14858 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
14859 if test "x$ac_cv_type_ssize_t" = xyes; then :
14860
14861 else
14862
14863 cat >>confdefs.h <<_ACEOF
14864 #define ssize_t int
14865 _ACEOF
14866
14867 fi
14868
14869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
14870 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
14871 if ${ac_cv_type_uid_t+:} false; then :
14872   $as_echo_n "(cached) " >&6
14873 else
14874   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14875 /* end confdefs.h.  */
14876 #include <sys/types.h>
14877
14878 _ACEOF
14879 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14880   $EGREP "uid_t" >/dev/null 2>&1; then :
14881   ac_cv_type_uid_t=yes
14882 else
14883   ac_cv_type_uid_t=no
14884 fi
14885 rm -f conftest*
14886
14887 fi
14888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
14889 $as_echo "$ac_cv_type_uid_t" >&6; }
14890 if test $ac_cv_type_uid_t = no; then
14891
14892 $as_echo "#define uid_t int" >>confdefs.h
14893
14894
14895 $as_echo "#define gid_t int" >>confdefs.h
14896
14897 fi
14898
14899 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14900 if test "x$ac_cv_type_pid_t" = xyes; then :
14901
14902 else
14903
14904 cat >>confdefs.h <<_ACEOF
14905 #define pid_t int
14906 _ACEOF
14907
14908 fi
14909
14910 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
14911 if test "x$ac_cv_type_off_t" = xyes; then :
14912
14913 else
14914
14915 cat >>confdefs.h <<_ACEOF
14916 #define off_t long int
14917 _ACEOF
14918
14919 fi
14920
14921 ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
14922 $ac_includes_default
14923 #ifdef HAVE_WINSOCK2_H
14924 #  include <winsock2.h>
14925 #endif
14926
14927 "
14928 if test "x$ac_cv_type_u_char" = xyes; then :
14929
14930 else
14931
14932 $as_echo "#define u_char unsigned char" >>confdefs.h
14933
14934 fi
14935
14936 ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
14937 $ac_includes_default
14938 #ifdef HAVE_SYS_RESOURCE_H
14939 #  include <sys/resource.h>
14940 #endif
14941
14942 "
14943 if test "x$ac_cv_type_rlim_t" = xyes; then :
14944
14945 else
14946
14947 $as_echo "#define rlim_t unsigned long" >>confdefs.h
14948
14949 fi
14950
14951
14952 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
14953 $ac_includes_default
14954 #ifdef HAVE_SYS_SOCKET_H
14955 #  include <sys/socket.h>
14956 #endif
14957 #ifdef HAVE_WS2TCPIP_H
14958 #  include <ws2tcpip.h>
14959 #endif
14960
14961 "
14962 if test "x$ac_cv_type_socklen_t" = xyes; then :
14963
14964 else
14965
14966 $as_echo "#define socklen_t int" >>confdefs.h
14967
14968 fi
14969
14970  ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
14971 $ac_includes_default
14972 #ifdef HAVE_SYS_TYPES_H
14973 # include <sys/types.h>
14974 #endif
14975 #ifdef HAVE_NETINET_IN_H
14976 # include <netinet/in.h>
14977 #endif
14978
14979 "
14980 if test "x$ac_cv_type_in_addr_t" = xyes; then :
14981
14982 else
14983
14984 $as_echo "#define in_addr_t uint32_t" >>confdefs.h
14985
14986 fi
14987
14988  ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
14989 $ac_includes_default
14990 #ifdef HAVE_SYS_TYPES_H
14991 # include <sys/types.h>
14992 #endif
14993 #ifdef HAVE_NETINET_IN_H
14994 # include <netinet/in.h>
14995 #endif
14996
14997 "
14998 if test "x$ac_cv_type_in_port_t" = xyes; then :
14999
15000 else
15001
15002 $as_echo "#define in_port_t uint16_t" >>confdefs.h
15003
15004 fi
15005
15006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
15007 $as_echo_n "checking if memcmp compares unsigned... " >&6; }
15008 if test "$cross_compiling" = yes; then :
15009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
15010 $as_echo "cross-compile no" >&6; }
15011
15012 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
15013
15014   case " $LIBOBJS " in
15015   *" memcmp.$ac_objext "* ) ;;
15016   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
15017  ;;
15018 esac
15019
15020
15021 else
15022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15023 /* end confdefs.h.  */
15024
15025 #include <stdio.h>
15026 #include <stdlib.h>
15027 #include <string.h>
15028 int main(void)
15029 {
15030         char a = 255, b = 0;
15031         if(memcmp(&a, &b, 1) < 0)
15032                 return 1;
15033         return 0;
15034 }
15035
15036 _ACEOF
15037 if ac_fn_c_try_run "$LINENO"; then :
15038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15039 $as_echo "yes" >&6; }
15040 else
15041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15042 $as_echo "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 fi
15054 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15055   conftest.$ac_objext conftest.beam conftest.$ac_ext
15056 fi
15057
15058
15059 # The cast to long int works around a bug in the HP C Compiler
15060 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15061 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15062 # This bug is HP SR number 8606223364.
15063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
15064 $as_echo_n "checking size of time_t... " >&6; }
15065 if ${ac_cv_sizeof_time_t+:} false; then :
15066   $as_echo_n "(cached) " >&6
15067 else
15068   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
15069 $ac_includes_default
15070 #ifdef TIME_WITH_SYS_TIME
15071 # include <sys/time.h>
15072 # include <time.h>
15073 #else
15074 # ifdef HAVE_SYS_TIME_H
15075 #  include <sys/time.h>
15076 # else
15077 #  include <time.h>
15078 # endif
15079 #endif
15080
15081 "; then :
15082
15083 else
15084   if test "$ac_cv_type_time_t" = yes; then
15085      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15086 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15087 as_fn_error 77 "cannot compute sizeof (time_t)
15088 See \`config.log' for more details" "$LINENO" 5; }
15089    else
15090      ac_cv_sizeof_time_t=0
15091    fi
15092 fi
15093
15094 fi
15095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
15096 $as_echo "$ac_cv_sizeof_time_t" >&6; }
15097
15098
15099
15100 cat >>confdefs.h <<_ACEOF
15101 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
15102 _ACEOF
15103
15104
15105 # The cast to long int works around a bug in the HP C Compiler
15106 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15107 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15108 # This bug is HP SR number 8606223364.
15109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
15110 $as_echo_n "checking size of size_t... " >&6; }
15111 if ${ac_cv_sizeof_size_t+:} false; then :
15112   $as_echo_n "(cached) " >&6
15113 else
15114   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
15115
15116 else
15117   if test "$ac_cv_type_size_t" = yes; then
15118      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15119 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15120 as_fn_error 77 "cannot compute sizeof (size_t)
15121 See \`config.log' for more details" "$LINENO" 5; }
15122    else
15123      ac_cv_sizeof_size_t=0
15124    fi
15125 fi
15126
15127 fi
15128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
15129 $as_echo "$ac_cv_sizeof_size_t" >&6; }
15130
15131
15132
15133 cat >>confdefs.h <<_ACEOF
15134 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
15135 _ACEOF
15136
15137
15138
15139 # add option to disable the evil rpath
15140
15141 # Check whether --enable-rpath was given.
15142 if test "${enable_rpath+set}" = set; then :
15143   enableval=$enable_rpath; enable_rpath=$enableval
15144 else
15145   enable_rpath=yes
15146 fi
15147
15148 if test "x$enable_rpath" = xno; then
15149                 ac_config_commands="$ac_config_commands disable-rpath"
15150
15151 fi
15152
15153
15154
15155 # check to see if libraries are needed for these functions.
15156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
15157 $as_echo_n "checking for library containing inet_pton... " >&6; }
15158 if ${ac_cv_search_inet_pton+:} false; then :
15159   $as_echo_n "(cached) " >&6
15160 else
15161   ac_func_search_save_LIBS=$LIBS
15162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15163 /* end confdefs.h.  */
15164
15165 /* Override any GCC internal prototype to avoid an error.
15166    Use char because int might match the return type of a GCC
15167    builtin and then its argument prototype would still apply.  */
15168 #ifdef __cplusplus
15169 extern "C"
15170 #endif
15171 char inet_pton ();
15172 int
15173 main ()
15174 {
15175 return inet_pton ();
15176   ;
15177   return 0;
15178 }
15179 _ACEOF
15180 for ac_lib in '' nsl; do
15181   if test -z "$ac_lib"; then
15182     ac_res="none required"
15183   else
15184     ac_res=-l$ac_lib
15185     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15186   fi
15187   if ac_fn_c_try_link "$LINENO"; then :
15188   ac_cv_search_inet_pton=$ac_res
15189 fi
15190 rm -f core conftest.err conftest.$ac_objext \
15191     conftest$ac_exeext
15192   if ${ac_cv_search_inet_pton+:} false; then :
15193   break
15194 fi
15195 done
15196 if ${ac_cv_search_inet_pton+:} false; then :
15197
15198 else
15199   ac_cv_search_inet_pton=no
15200 fi
15201 rm conftest.$ac_ext
15202 LIBS=$ac_func_search_save_LIBS
15203 fi
15204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
15205 $as_echo "$ac_cv_search_inet_pton" >&6; }
15206 ac_res=$ac_cv_search_inet_pton
15207 if test "$ac_res" != no; then :
15208   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15209
15210 fi
15211
15212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
15213 $as_echo_n "checking for library containing socket... " >&6; }
15214 if ${ac_cv_search_socket+:} false; then :
15215   $as_echo_n "(cached) " >&6
15216 else
15217   ac_func_search_save_LIBS=$LIBS
15218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15219 /* end confdefs.h.  */
15220
15221 /* Override any GCC internal prototype to avoid an error.
15222    Use char because int might match the return type of a GCC
15223    builtin and then its argument prototype would still apply.  */
15224 #ifdef __cplusplus
15225 extern "C"
15226 #endif
15227 char socket ();
15228 int
15229 main ()
15230 {
15231 return socket ();
15232   ;
15233   return 0;
15234 }
15235 _ACEOF
15236 for ac_lib in '' socket; do
15237   if test -z "$ac_lib"; then
15238     ac_res="none required"
15239   else
15240     ac_res=-l$ac_lib
15241     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15242   fi
15243   if ac_fn_c_try_link "$LINENO"; then :
15244   ac_cv_search_socket=$ac_res
15245 fi
15246 rm -f core conftest.err conftest.$ac_objext \
15247     conftest$ac_exeext
15248   if ${ac_cv_search_socket+:} false; then :
15249   break
15250 fi
15251 done
15252 if ${ac_cv_search_socket+:} false; then :
15253
15254 else
15255   ac_cv_search_socket=no
15256 fi
15257 rm conftest.$ac_ext
15258 LIBS=$ac_func_search_save_LIBS
15259 fi
15260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
15261 $as_echo "$ac_cv_search_socket" >&6; }
15262 ac_res=$ac_cv_search_socket
15263 if test "$ac_res" != no; then :
15264   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15265
15266 fi
15267
15268
15269 # check wether strptime also works
15270
15271 # check some functions of the OS before linking libs (while still runnable).
15272 for ac_header in unistd.h
15273 do :
15274   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
15275 if test "x$ac_cv_header_unistd_h" = xyes; then :
15276   cat >>confdefs.h <<_ACEOF
15277 #define HAVE_UNISTD_H 1
15278 _ACEOF
15279
15280 fi
15281
15282 done
15283
15284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
15285 $as_echo_n "checking for working chown... " >&6; }
15286 if ${ac_cv_func_chown_works+:} false; then :
15287   $as_echo_n "(cached) " >&6
15288 else
15289   if test "$cross_compiling" = yes; then :
15290   ac_cv_func_chown_works=no
15291 else
15292   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15293 /* end confdefs.h.  */
15294 $ac_includes_default
15295 #include <fcntl.h>
15296
15297 int
15298 main ()
15299 {
15300   char *f = "conftest.chown";
15301   struct stat before, after;
15302
15303   if (creat (f, 0600) < 0)
15304     return 1;
15305   if (stat (f, &before) < 0)
15306     return 1;
15307   if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
15308     return 1;
15309   if (stat (f, &after) < 0)
15310     return 1;
15311   return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
15312
15313   ;
15314   return 0;
15315 }
15316 _ACEOF
15317 if ac_fn_c_try_run "$LINENO"; then :
15318   ac_cv_func_chown_works=yes
15319 else
15320   ac_cv_func_chown_works=no
15321 fi
15322 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15323   conftest.$ac_objext conftest.beam conftest.$ac_ext
15324 fi
15325
15326 rm -f conftest.chown
15327
15328 fi
15329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
15330 $as_echo "$ac_cv_func_chown_works" >&6; }
15331 if test $ac_cv_func_chown_works = yes; then
15332
15333 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
15334
15335 fi
15336
15337 for ac_header in vfork.h
15338 do :
15339   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15340 if test "x$ac_cv_header_vfork_h" = xyes; then :
15341   cat >>confdefs.h <<_ACEOF
15342 #define HAVE_VFORK_H 1
15343 _ACEOF
15344
15345 fi
15346
15347 done
15348
15349 for ac_func in fork vfork
15350 do :
15351   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15352 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15353 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15354   cat >>confdefs.h <<_ACEOF
15355 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15356 _ACEOF
15357
15358 fi
15359 done
15360
15361 if test "x$ac_cv_func_fork" = xyes; then
15362   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15363 $as_echo_n "checking for working fork... " >&6; }
15364 if ${ac_cv_func_fork_works+:} false; then :
15365   $as_echo_n "(cached) " >&6
15366 else
15367   if test "$cross_compiling" = yes; then :
15368   ac_cv_func_fork_works=cross
15369 else
15370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15371 /* end confdefs.h.  */
15372 $ac_includes_default
15373 int
15374 main ()
15375 {
15376
15377           /* By Ruediger Kuhlmann. */
15378           return fork () < 0;
15379
15380   ;
15381   return 0;
15382 }
15383 _ACEOF
15384 if ac_fn_c_try_run "$LINENO"; then :
15385   ac_cv_func_fork_works=yes
15386 else
15387   ac_cv_func_fork_works=no
15388 fi
15389 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15390   conftest.$ac_objext conftest.beam conftest.$ac_ext
15391 fi
15392
15393 fi
15394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15395 $as_echo "$ac_cv_func_fork_works" >&6; }
15396
15397 else
15398   ac_cv_func_fork_works=$ac_cv_func_fork
15399 fi
15400 if test "x$ac_cv_func_fork_works" = xcross; then
15401   case $host in
15402     *-*-amigaos* | *-*-msdosdjgpp*)
15403       # Override, as these systems have only a dummy fork() stub
15404       ac_cv_func_fork_works=no
15405       ;;
15406     *)
15407       ac_cv_func_fork_works=yes
15408       ;;
15409   esac
15410   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15411 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15412 fi
15413 ac_cv_func_vfork_works=$ac_cv_func_vfork
15414 if test "x$ac_cv_func_vfork" = xyes; then
15415   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15416 $as_echo_n "checking for working vfork... " >&6; }
15417 if ${ac_cv_func_vfork_works+:} false; then :
15418   $as_echo_n "(cached) " >&6
15419 else
15420   if test "$cross_compiling" = yes; then :
15421   ac_cv_func_vfork_works=cross
15422 else
15423   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15424 /* end confdefs.h.  */
15425 /* Thanks to Paul Eggert for this test.  */
15426 $ac_includes_default
15427 #include <sys/wait.h>
15428 #ifdef HAVE_VFORK_H
15429 # include <vfork.h>
15430 #endif
15431 /* On some sparc systems, changes by the child to local and incoming
15432    argument registers are propagated back to the parent.  The compiler
15433    is told about this with #include <vfork.h>, but some compilers
15434    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15435    static variable whose address is put into a register that is
15436    clobbered by the vfork.  */
15437 static void
15438 #ifdef __cplusplus
15439 sparc_address_test (int arg)
15440 # else
15441 sparc_address_test (arg) int arg;
15442 #endif
15443 {
15444   static pid_t child;
15445   if (!child) {
15446     child = vfork ();
15447     if (child < 0) {
15448       perror ("vfork");
15449       _exit(2);
15450     }
15451     if (!child) {
15452       arg = getpid();
15453       write(-1, "", 0);
15454       _exit (arg);
15455     }
15456   }
15457 }
15458
15459 int
15460 main ()
15461 {
15462   pid_t parent = getpid ();
15463   pid_t child;
15464
15465   sparc_address_test (0);
15466
15467   child = vfork ();
15468
15469   if (child == 0) {
15470     /* Here is another test for sparc vfork register problems.  This
15471        test uses lots of local variables, at least as many local
15472        variables as main has allocated so far including compiler
15473        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15474        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15475        reuse the register of parent for one of the local variables,
15476        since it will think that parent can't possibly be used any more
15477        in this routine.  Assigning to the local variable will thus
15478        munge parent in the parent process.  */
15479     pid_t
15480       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15481       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15482     /* Convince the compiler that p..p7 are live; otherwise, it might
15483        use the same hardware register for all 8 local variables.  */
15484     if (p != p1 || p != p2 || p != p3 || p != p4
15485         || p != p5 || p != p6 || p != p7)
15486       _exit(1);
15487
15488     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15489        from child file descriptors.  If the child closes a descriptor
15490        before it execs or exits, this munges the parent's descriptor
15491        as well.  Test for this by closing stdout in the child.  */
15492     _exit(close(fileno(stdout)) != 0);
15493   } else {
15494     int status;
15495     struct stat st;
15496
15497     while (wait(&status) != child)
15498       ;
15499     return (
15500          /* Was there some problem with vforking?  */
15501          child < 0
15502
15503          /* Did the child fail?  (This shouldn't happen.)  */
15504          || status
15505
15506          /* Did the vfork/compiler bug occur?  */
15507          || parent != getpid()
15508
15509          /* Did the file descriptor bug occur?  */
15510          || fstat(fileno(stdout), &st) != 0
15511          );
15512   }
15513 }
15514 _ACEOF
15515 if ac_fn_c_try_run "$LINENO"; then :
15516   ac_cv_func_vfork_works=yes
15517 else
15518   ac_cv_func_vfork_works=no
15519 fi
15520 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15521   conftest.$ac_objext conftest.beam conftest.$ac_ext
15522 fi
15523
15524 fi
15525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15526 $as_echo "$ac_cv_func_vfork_works" >&6; }
15527
15528 fi;
15529 if test "x$ac_cv_func_fork_works" = xcross; then
15530   ac_cv_func_vfork_works=$ac_cv_func_vfork
15531   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15532 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15533 fi
15534
15535 if test "x$ac_cv_func_vfork_works" = xyes; then
15536
15537 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15538
15539 else
15540
15541 $as_echo "#define vfork fork" >>confdefs.h
15542
15543 fi
15544 if test "x$ac_cv_func_fork_works" = xyes; then
15545
15546 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15547
15548 fi
15549
15550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
15551 $as_echo_n "checking return type of signal handlers... " >&6; }
15552 if ${ac_cv_type_signal+:} false; then :
15553   $as_echo_n "(cached) " >&6
15554 else
15555   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15556 /* end confdefs.h.  */
15557 #include <sys/types.h>
15558 #include <signal.h>
15559
15560 int
15561 main ()
15562 {
15563 return *(signal (0, 0)) (0) == 1;
15564   ;
15565   return 0;
15566 }
15567 _ACEOF
15568 if ac_fn_c_try_compile "$LINENO"; then :
15569   ac_cv_type_signal=int
15570 else
15571   ac_cv_type_signal=void
15572 fi
15573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15574 fi
15575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
15576 $as_echo "$ac_cv_type_signal" >&6; }
15577
15578 cat >>confdefs.h <<_ACEOF
15579 #define RETSIGTYPE $ac_cv_type_signal
15580 _ACEOF
15581
15582
15583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15584 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15585 if ${ac_cv_sys_largefile_source+:} false; then :
15586   $as_echo_n "(cached) " >&6
15587 else
15588   while :; do
15589   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15590 /* end confdefs.h.  */
15591 #include <sys/types.h> /* for off_t */
15592      #include <stdio.h>
15593 int
15594 main ()
15595 {
15596 int (*fp) (FILE *, off_t, int) = fseeko;
15597      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15598   ;
15599   return 0;
15600 }
15601 _ACEOF
15602 if ac_fn_c_try_link "$LINENO"; then :
15603   ac_cv_sys_largefile_source=no; break
15604 fi
15605 rm -f core conftest.err conftest.$ac_objext \
15606     conftest$ac_exeext conftest.$ac_ext
15607   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15608 /* end confdefs.h.  */
15609 #define _LARGEFILE_SOURCE 1
15610 #include <sys/types.h> /* for off_t */
15611      #include <stdio.h>
15612 int
15613 main ()
15614 {
15615 int (*fp) (FILE *, off_t, int) = fseeko;
15616      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15617   ;
15618   return 0;
15619 }
15620 _ACEOF
15621 if ac_fn_c_try_link "$LINENO"; then :
15622   ac_cv_sys_largefile_source=1; break
15623 fi
15624 rm -f core conftest.err conftest.$ac_objext \
15625     conftest$ac_exeext conftest.$ac_ext
15626   ac_cv_sys_largefile_source=unknown
15627   break
15628 done
15629 fi
15630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15631 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15632 case $ac_cv_sys_largefile_source in #(
15633   no | unknown) ;;
15634   *)
15635 cat >>confdefs.h <<_ACEOF
15636 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15637 _ACEOF
15638 ;;
15639 esac
15640 rm -rf conftest*
15641
15642 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15643 # in glibc 2.1.3, but that breaks too many other things.
15644 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15645 if test $ac_cv_sys_largefile_source != unknown; then
15646
15647 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15648
15649 fi
15650
15651
15652 # Check whether --enable-largefile was given.
15653 if test "${enable_largefile+set}" = set; then :
15654   enableval=$enable_largefile;
15655 fi
15656
15657 if test "$enable_largefile" != no; then
15658
15659   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15660 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15661 if ${ac_cv_sys_largefile_CC+:} false; then :
15662   $as_echo_n "(cached) " >&6
15663 else
15664   ac_cv_sys_largefile_CC=no
15665      if test "$GCC" != yes; then
15666        ac_save_CC=$CC
15667        while :; do
15668          # IRIX 6.2 and later do not support large files by default,
15669          # so use the C compiler's -n32 option if that helps.
15670          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15671 /* end confdefs.h.  */
15672 #include <sys/types.h>
15673  /* Check that off_t can represent 2**63 - 1 correctly.
15674     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15675     since some C++ compilers masquerading as C compilers
15676     incorrectly reject 9223372036854775807.  */
15677 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15678   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15679                        && LARGE_OFF_T % 2147483647 == 1)
15680                       ? 1 : -1];
15681 int
15682 main ()
15683 {
15684
15685   ;
15686   return 0;
15687 }
15688 _ACEOF
15689          if ac_fn_c_try_compile "$LINENO"; then :
15690   break
15691 fi
15692 rm -f core conftest.err conftest.$ac_objext
15693          CC="$CC -n32"
15694          if ac_fn_c_try_compile "$LINENO"; then :
15695   ac_cv_sys_largefile_CC=' -n32'; break
15696 fi
15697 rm -f core conftest.err conftest.$ac_objext
15698          break
15699        done
15700        CC=$ac_save_CC
15701        rm -f conftest.$ac_ext
15702     fi
15703 fi
15704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15705 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15706   if test "$ac_cv_sys_largefile_CC" != no; then
15707     CC=$CC$ac_cv_sys_largefile_CC
15708   fi
15709
15710   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15711 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15712 if ${ac_cv_sys_file_offset_bits+:} false; then :
15713   $as_echo_n "(cached) " >&6
15714 else
15715   while :; do
15716   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15717 /* end confdefs.h.  */
15718 #include <sys/types.h>
15719  /* Check that off_t can represent 2**63 - 1 correctly.
15720     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15721     since some C++ compilers masquerading as C compilers
15722     incorrectly reject 9223372036854775807.  */
15723 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15724   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15725                        && LARGE_OFF_T % 2147483647 == 1)
15726                       ? 1 : -1];
15727 int
15728 main ()
15729 {
15730
15731   ;
15732   return 0;
15733 }
15734 _ACEOF
15735 if ac_fn_c_try_compile "$LINENO"; then :
15736   ac_cv_sys_file_offset_bits=no; break
15737 fi
15738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15740 /* end confdefs.h.  */
15741 #define _FILE_OFFSET_BITS 64
15742 #include <sys/types.h>
15743  /* Check that off_t can represent 2**63 - 1 correctly.
15744     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15745     since some C++ compilers masquerading as C compilers
15746     incorrectly reject 9223372036854775807.  */
15747 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15748   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15749                        && LARGE_OFF_T % 2147483647 == 1)
15750                       ? 1 : -1];
15751 int
15752 main ()
15753 {
15754
15755   ;
15756   return 0;
15757 }
15758 _ACEOF
15759 if ac_fn_c_try_compile "$LINENO"; then :
15760   ac_cv_sys_file_offset_bits=64; break
15761 fi
15762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15763   ac_cv_sys_file_offset_bits=unknown
15764   break
15765 done
15766 fi
15767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15768 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15769 case $ac_cv_sys_file_offset_bits in #(
15770   no | unknown) ;;
15771   *)
15772 cat >>confdefs.h <<_ACEOF
15773 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15774 _ACEOF
15775 ;;
15776 esac
15777 rm -rf conftest*
15778   if test $ac_cv_sys_file_offset_bits = unknown; then
15779     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15780 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15781 if ${ac_cv_sys_large_files+:} false; then :
15782   $as_echo_n "(cached) " >&6
15783 else
15784   while :; do
15785   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15786 /* end confdefs.h.  */
15787 #include <sys/types.h>
15788  /* Check that off_t can represent 2**63 - 1 correctly.
15789     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15790     since some C++ compilers masquerading as C compilers
15791     incorrectly reject 9223372036854775807.  */
15792 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15793   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15794                        && LARGE_OFF_T % 2147483647 == 1)
15795                       ? 1 : -1];
15796 int
15797 main ()
15798 {
15799
15800   ;
15801   return 0;
15802 }
15803 _ACEOF
15804 if ac_fn_c_try_compile "$LINENO"; then :
15805   ac_cv_sys_large_files=no; break
15806 fi
15807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15808   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15809 /* end confdefs.h.  */
15810 #define _LARGE_FILES 1
15811 #include <sys/types.h>
15812  /* Check that off_t can represent 2**63 - 1 correctly.
15813     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15814     since some C++ compilers masquerading as C compilers
15815     incorrectly reject 9223372036854775807.  */
15816 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15817   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15818                        && LARGE_OFF_T % 2147483647 == 1)
15819                       ? 1 : -1];
15820 int
15821 main ()
15822 {
15823
15824   ;
15825   return 0;
15826 }
15827 _ACEOF
15828 if ac_fn_c_try_compile "$LINENO"; then :
15829   ac_cv_sys_large_files=1; break
15830 fi
15831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15832   ac_cv_sys_large_files=unknown
15833   break
15834 done
15835 fi
15836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15837 $as_echo "$ac_cv_sys_large_files" >&6; }
15838 case $ac_cv_sys_large_files in #(
15839   no | unknown) ;;
15840   *)
15841 cat >>confdefs.h <<_ACEOF
15842 #define _LARGE_FILES $ac_cv_sys_large_files
15843 _ACEOF
15844 ;;
15845 esac
15846 rm -rf conftest*
15847   fi
15848
15849
15850 fi
15851
15852
15853
15854
15855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
15856 $as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
15857 cache=_D_LARGEFILE_SOURCE_1
15858 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
15859   $as_echo_n "(cached) " >&6
15860 else
15861
15862 echo '
15863 #include <stdio.h>
15864 int test() {
15865         int a = fseeko(stdin, 0, 0);
15866         return a;
15867 }
15868 ' > conftest.c
15869 echo 'void f(){}' >>conftest.c
15870 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
15871 eval "cv_prog_cc_flag_needed_$cache=no"
15872 else
15873
15874 if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
15875 eval "cv_prog_cc_flag_needed_$cache=yes"
15876 else
15877 eval "cv_prog_cc_flag_needed_$cache=fail"
15878 #echo 'Test with flag fails too!'
15879 #cat conftest.c
15880 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15881 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15882 #exit 1
15883 fi
15884
15885 fi
15886 rm -f conftest conftest.c conftest.o
15887
15888 fi
15889
15890 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
15891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15892 $as_echo "yes" >&6; }
15893 :
15894 CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
15895 else
15896 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
15897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15898 $as_echo "no" >&6; }
15899 #echo 'Test with flag is no!'
15900 #cat conftest.c
15901 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15902 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15903 #exit 1
15904 :
15905
15906 else
15907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15908 $as_echo "failed" >&6; }
15909 :
15910
15911 fi
15912 fi
15913
15914
15915
15916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
15917 $as_echo_n "checking if nonblocking sockets work... " >&6; }
15918 if echo $target | grep mingw32 >/dev/null; then
15919         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
15920 $as_echo "no (windows)" >&6; }
15921
15922 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15923
15924 else
15925 if test "$cross_compiling" = yes; then :
15926
15927         { $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
15928 $as_echo "crosscompile(yes)" >&6; }
15929
15930 else
15931   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15932 /* end confdefs.h.  */
15933
15934
15935 #include <stdio.h>
15936 #include <string.h>
15937 #include <stdlib.h>
15938 #include <fcntl.h>
15939 #include <errno.h>
15940 #ifdef HAVE_SYS_TYPES_H
15941 #include <sys/types.h>
15942 #endif
15943 #ifdef HAVE_SYS_SOCKET_H
15944 #include <sys/socket.h>
15945 #endif
15946 #ifdef HAVE_NETINET_IN_H
15947 #include <netinet/in.h>
15948 #endif
15949 #ifdef HAVE_ARPA_INET_H
15950 #include <arpa/inet.h>
15951 #endif
15952 #ifdef HAVE_UNISTD_H
15953 #include <unistd.h>
15954 #endif
15955 #ifdef HAVE_TIME_H
15956 #include <time.h>
15957 #endif
15958
15959 int main(void)
15960 {
15961         int port;
15962         int sfd, cfd;
15963         int num = 10;
15964         int i, p;
15965         struct sockaddr_in a;
15966         /* test if select and nonblocking reads work well together */
15967         /* open port.
15968            fork child to send 10 messages.
15969            select to read.
15970            then try to nonblocking read the 10 messages
15971            then, nonblocking read must give EAGAIN
15972         */
15973
15974         port = 12345 + (time(0)%32);
15975         sfd = socket(PF_INET, SOCK_DGRAM, 0);
15976         if(sfd == -1) {
15977                 perror("socket");
15978                 return 1;
15979         }
15980         memset(&a, 0, sizeof(a));
15981         a.sin_family = AF_INET;
15982         a.sin_port = htons(port);
15983         a.sin_addr.s_addr = inet_addr("127.0.0.1");
15984         if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15985                 perror("bind");
15986                 return 1;
15987         }
15988         if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
15989                 perror("fcntl");
15990                 return 1;
15991         }
15992
15993         cfd = socket(PF_INET, SOCK_DGRAM, 0);
15994         if(cfd == -1) {
15995                 perror("client socket");
15996                 return 1;
15997         }
15998         a.sin_port = 0;
15999         if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
16000                 perror("client bind");
16001                 return 1;
16002         }
16003         a.sin_port = htons(port);
16004
16005         /* no handler, causes exit in 10 seconds */
16006         alarm(10);
16007
16008         /* send and receive on the socket */
16009         if((p=fork()) == 0) {
16010                 for(i=0; i<num; i++) {
16011                         if(sendto(cfd, &i, sizeof(i), 0,
16012                                 (struct sockaddr*)&a, sizeof(a)) < 0) {
16013                                 perror("sendto");
16014                                 return 1;
16015                         }
16016                 }
16017         } else {
16018                 /* parent */
16019                 fd_set rset;
16020                 int x;
16021                 if(p == -1) {
16022                         perror("fork");
16023                         return 1;
16024                 }
16025                 FD_ZERO(&rset);
16026                 FD_SET(sfd, &rset);
16027                 if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
16028                         perror("select");
16029                         return 1;
16030                 }
16031                 i = 0;
16032                 while(i < num) {
16033                         if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
16034                                 if(errno == EAGAIN)
16035                                         continue;
16036                                 perror("recv");
16037                                 return 1;
16038                         }
16039                         i++;
16040                 }
16041                 /* now we want to get EAGAIN: nonblocking goodness */
16042                 errno = 0;
16043                 recv(sfd, &x, sizeof(x), 0);
16044                 if(errno != EAGAIN) {
16045                         perror("trying to recv again");
16046                         return 1;
16047                 }
16048                 /* EAGAIN encountered */
16049         }
16050
16051         close(sfd);
16052         close(cfd);
16053         return 0;
16054 }
16055
16056 _ACEOF
16057 if ac_fn_c_try_run "$LINENO"; then :
16058
16059         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16060 $as_echo "yes" >&6; }
16061
16062 else
16063
16064         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16065 $as_echo "no" >&6; }
16066
16067 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
16068
16069
16070 fi
16071 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16072   conftest.$ac_objext conftest.beam conftest.$ac_ext
16073 fi
16074
16075 fi
16076
16077
16078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
16079 $as_echo_n "checking whether mkdir has one arg... " >&6; }
16080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16081 /* end confdefs.h.  */
16082
16083 #include <stdio.h>
16084 #include <unistd.h>
16085 #ifdef HAVE_WINSOCK2_H
16086 #include <winsock2.h>
16087 #endif
16088 #ifdef HAVE_SYS_STAT_H
16089 #include <sys/stat.h>
16090 #endif
16091
16092 int
16093 main ()
16094 {
16095
16096         (void)mkdir("directory");
16097
16098   ;
16099   return 0;
16100 }
16101 _ACEOF
16102 if ac_fn_c_try_compile "$LINENO"; then :
16103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16104 $as_echo "yes" >&6; }
16105
16106 $as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
16107
16108
16109 else
16110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16111 $as_echo "no" >&6; }
16112
16113 fi
16114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16115
16116 for ac_func in strptime
16117 do :
16118   ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
16119 if test "x$ac_cv_func_strptime" = xyes; then :
16120   cat >>confdefs.h <<_ACEOF
16121 #define HAVE_STRPTIME 1
16122 _ACEOF
16123
16124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
16125 $as_echo_n "checking whether strptime works... " >&6; }
16126 if test c${cross_compiling} = cno; then
16127 if test "$cross_compiling" = yes; then :
16128   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16129 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16130 as_fn_error $? "cannot run test program while cross compiling
16131 See \`config.log' for more details" "$LINENO" 5; }
16132 else
16133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16134 /* end confdefs.h.  */
16135
16136 #define _XOPEN_SOURCE 600
16137 #include <time.h>
16138 int main(void) { struct tm tm; char *res;
16139 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);
16140 if (!res) return 2;
16141 res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
16142 if (!res) return 1; return 0; }
16143
16144 _ACEOF
16145 if ac_fn_c_try_run "$LINENO"; then :
16146   eval "ac_cv_c_strptime_works=yes"
16147 else
16148   eval "ac_cv_c_strptime_works=no"
16149 fi
16150 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16151   conftest.$ac_objext conftest.beam conftest.$ac_ext
16152 fi
16153
16154 else
16155 eval "ac_cv_c_strptime_works=maybe"
16156 fi
16157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
16158 $as_echo "$ac_cv_c_strptime_works" >&6; }
16159 if test $ac_cv_c_strptime_works = no; then
16160 case " $LIBOBJS " in
16161   *" strptime.$ac_objext "* ) ;;
16162   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
16163  ;;
16164 esac
16165
16166 else
16167
16168 cat >>confdefs.h <<_ACEOF
16169 #define STRPTIME_WORKS 1
16170 _ACEOF
16171
16172 fi
16173
16174 else
16175   case " $LIBOBJS " in
16176   *" strptime.$ac_objext "* ) ;;
16177   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
16178  ;;
16179 esac
16180
16181 fi
16182 done
16183
16184
16185 # check if we can use SO_REUSEPORT
16186 if echo "$host" | $GREP -i -e linux -e dragonfly >/dev/null; then
16187
16188 $as_echo "#define REUSEPORT_DEFAULT 1" >>confdefs.h
16189
16190 else
16191
16192 $as_echo "#define REUSEPORT_DEFAULT 0" >>confdefs.h
16193
16194 fi
16195
16196 # Include systemd.m4 - begin
16197 #   macros for configuring systemd
16198 #   Copyright 2015, Sami Kerola, CloudFlare.
16199 #   BSD licensed.
16200 # Check whether --enable-systemd was given.
16201 if test "${enable_systemd+set}" = set; then :
16202   enableval=$enable_systemd;
16203 else
16204   enable_systemd=no
16205 fi
16206
16207 have_systemd=no
16208 if test "x$enable_systemd" != xno; then :
16209
16210
16211
16212 pkg_failed=no
16213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
16214 $as_echo_n "checking for SYSTEMD... " >&6; }
16215
16216 if test -n "$SYSTEMD_CFLAGS"; then
16217     pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
16218  elif test -n "$PKG_CONFIG"; then
16219     if test -n "$PKG_CONFIG" && \
16220     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
16221   ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
16222   ac_status=$?
16223   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16224   test $ac_status = 0; }; then
16225   pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
16226                       test "x$?" != "x0" && pkg_failed=yes
16227 else
16228   pkg_failed=yes
16229 fi
16230  else
16231     pkg_failed=untried
16232 fi
16233 if test -n "$SYSTEMD_LIBS"; then
16234     pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
16235  elif test -n "$PKG_CONFIG"; then
16236     if test -n "$PKG_CONFIG" && \
16237     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
16238   ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
16239   ac_status=$?
16240   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16241   test $ac_status = 0; }; then
16242   pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
16243                       test "x$?" != "x0" && pkg_failed=yes
16244 else
16245   pkg_failed=yes
16246 fi
16247  else
16248     pkg_failed=untried
16249 fi
16250
16251
16252
16253 if test $pkg_failed = yes; then
16254         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16255 $as_echo "no" >&6; }
16256
16257 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
16258         _pkg_short_errors_supported=yes
16259 else
16260         _pkg_short_errors_supported=no
16261 fi
16262         if test $_pkg_short_errors_supported = yes; then
16263                 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
16264         else
16265                 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
16266         fi
16267         # Put the nasty error message in config.log where it belongs
16268         echo "$SYSTEMD_PKG_ERRORS" >&5
16269
16270         have_systemd=no
16271 elif test $pkg_failed = untried; then
16272         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16273 $as_echo "no" >&6; }
16274         have_systemd=no
16275 else
16276         SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
16277         SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
16278         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16279 $as_echo "yes" >&6; }
16280         have_systemd=yes
16281 fi
16282                 if test "x$have_systemd" != "xyes"; then :
16283
16284
16285 pkg_failed=no
16286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
16287 $as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
16288
16289 if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
16290     pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
16291  elif test -n "$PKG_CONFIG"; then
16292     if test -n "$PKG_CONFIG" && \
16293     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
16294   ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
16295   ac_status=$?
16296   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16297   test $ac_status = 0; }; then
16298   pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
16299                       test "x$?" != "x0" && pkg_failed=yes
16300 else
16301   pkg_failed=yes
16302 fi
16303  else
16304     pkg_failed=untried
16305 fi
16306 if test -n "$SYSTEMD_DAEMON_LIBS"; then
16307     pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
16308  elif test -n "$PKG_CONFIG"; then
16309     if test -n "$PKG_CONFIG" && \
16310     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
16311   ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
16312   ac_status=$?
16313   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16314   test $ac_status = 0; }; then
16315   pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
16316                       test "x$?" != "x0" && pkg_failed=yes
16317 else
16318   pkg_failed=yes
16319 fi
16320  else
16321     pkg_failed=untried
16322 fi
16323
16324
16325
16326 if test $pkg_failed = yes; then
16327         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16328 $as_echo "no" >&6; }
16329
16330 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
16331         _pkg_short_errors_supported=yes
16332 else
16333         _pkg_short_errors_supported=no
16334 fi
16335         if test $_pkg_short_errors_supported = yes; then
16336                 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
16337         else
16338                 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
16339         fi
16340         # Put the nasty error message in config.log where it belongs
16341         echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
16342
16343         have_systemd_daemon=no
16344 elif test $pkg_failed = untried; then
16345         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16346 $as_echo "no" >&6; }
16347         have_systemd_daemon=no
16348 else
16349         SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
16350         SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
16351         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16352 $as_echo "yes" >&6; }
16353         have_systemd_daemon=yes
16354 fi
16355                 if test "x$have_systemd_daemon" = "xyes"; then :
16356   have_systemd=yes
16357 fi
16358
16359 fi
16360         case $enable_systemd:$have_systemd in #(
16361   yes:no) :
16362     as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
16363   *:yes) :
16364
16365 $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
16366
16367                 LIBS="$LIBS $SYSTEMD_LIBS"
16368
16369          ;; #(
16370   *) :
16371      ;;
16372 esac
16373
16374
16375 fi
16376  if test "x$have_systemd" = xyes; then
16377   USE_SYSTEMD_TRUE=
16378   USE_SYSTEMD_FALSE='#'
16379 else
16380   USE_SYSTEMD_TRUE='#'
16381   USE_SYSTEMD_FALSE=
16382 fi
16383
16384
16385 # Include systemd.m4 - end
16386
16387 # set memory allocation checking if requested
16388 # Check whether --enable-alloc-checks was given.
16389 if test "${enable_alloc_checks+set}" = set; then :
16390   enableval=$enable_alloc_checks;
16391 fi
16392
16393 # Check whether --enable-alloc-lite was given.
16394 if test "${enable_alloc_lite+set}" = set; then :
16395   enableval=$enable_alloc_lite;
16396 fi
16397
16398 # Check whether --enable-alloc-nonregional was given.
16399 if test "${enable_alloc_nonregional+set}" = set; then :
16400   enableval=$enable_alloc_nonregional;
16401 fi
16402
16403 if test x_$enable_alloc_nonregional = x_yes; then
16404
16405 $as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
16406
16407 fi
16408 if test x_$enable_alloc_checks = x_yes; then
16409
16410 $as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
16411
16412         SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo"
16413
16414         ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ="alloc.lo"
16415
16416 else
16417         if test x_$enable_alloc_lite = x_yes; then
16418
16419 $as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
16420
16421         else
16422
16423         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
16424 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
16425         if test "$cross_compiling" = yes; then :
16426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
16427 $as_echo "no (crosscompile)" >&6; }
16428         case " $LIBOBJS " in
16429   *" malloc.$ac_objext "* ) ;;
16430   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
16431  ;;
16432 esac
16433
16434
16435 cat >>confdefs.h <<_ACEOF
16436 #define malloc rpl_malloc_unbound
16437 _ACEOF
16438
16439 else
16440   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16441 /* end confdefs.h.  */
16442 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
16443 #include <stdlib.h>
16444 #else
16445 char *malloc ();
16446 #endif
16447
16448 int
16449 main ()
16450 {
16451  if(malloc(0) != 0) return 1;
16452   ;
16453   return 0;
16454 }
16455
16456 _ACEOF
16457 if ac_fn_c_try_run "$LINENO"; then :
16458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16459 $as_echo "no" >&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   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16473 $as_echo "yes" >&6; }
16474
16475 $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
16476
16477 fi
16478 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16479   conftest.$ac_objext conftest.beam conftest.$ac_ext
16480 fi
16481
16482
16483         fi
16484 fi
16485
16486 # check windows threads (we use them, not pthreads, on windows).
16487 if test "$on_mingw" = "yes"; then
16488 # check windows threads
16489         for ac_header in windows.h
16490 do :
16491   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
16492 "
16493 if test "x$ac_cv_header_windows_h" = xyes; then :
16494   cat >>confdefs.h <<_ACEOF
16495 #define HAVE_WINDOWS_H 1
16496 _ACEOF
16497
16498 fi
16499
16500 done
16501
16502         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
16503 $as_echo_n "checking for CreateThread... " >&6; }
16504         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16505 /* end confdefs.h.  */
16506
16507 #ifdef HAVE_WINDOWS_H
16508 #include <windows.h>
16509 #endif
16510
16511 int
16512 main ()
16513 {
16514
16515         HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
16516
16517   ;
16518   return 0;
16519 }
16520 _ACEOF
16521 if ac_fn_c_try_compile "$LINENO"; then :
16522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16523 $as_echo "yes" >&6; }
16524
16525 $as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
16526
16527
16528 else
16529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16530 $as_echo "no" >&6; }
16531
16532 fi
16533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16534
16535 else
16536 # not on mingw, check thread libraries.
16537
16538 # check for thread library.
16539 # check this first, so that the pthread lib does not get linked in via
16540 # libssl or libpython, and thus distorts the tests, and we end up using
16541 # the non-threadsafe C libraries.
16542
16543 # Check whether --with-pthreads was given.
16544 if test "${with_pthreads+set}" = set; then :
16545   withval=$with_pthreads;
16546 else
16547    withval="yes"
16548 fi
16549
16550 ub_have_pthreads=no
16551 if test x_$withval != x_no; then
16552
16553
16554 ac_ext=c
16555 ac_cpp='$CPP $CPPFLAGS'
16556 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16557 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16558 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16559
16560 ax_pthread_ok=no
16561
16562 # We used to check for pthread.h first, but this fails if pthread.h
16563 # requires special compiler flags (e.g. on True64 or Sequent).
16564 # It gets checked for in the link test anyway.
16565
16566 # First of all, check if the user has set any of the PTHREAD_LIBS,
16567 # etcetera environment variables, and if threads linking works using
16568 # them:
16569 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16570         save_CFLAGS="$CFLAGS"
16571         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16572         save_LIBS="$LIBS"
16573         LIBS="$PTHREAD_LIBS $LIBS"
16574         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16575 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
16576         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16577 /* end confdefs.h.  */
16578
16579 /* Override any GCC internal prototype to avoid an error.
16580    Use char because int might match the return type of a GCC
16581    builtin and then its argument prototype would still apply.  */
16582 #ifdef __cplusplus
16583 extern "C"
16584 #endif
16585 char pthread_join ();
16586 int
16587 main ()
16588 {
16589 return pthread_join ();
16590   ;
16591   return 0;
16592 }
16593 _ACEOF
16594 if ac_fn_c_try_link "$LINENO"; then :
16595   ax_pthread_ok=yes
16596 fi
16597 rm -f core conftest.err conftest.$ac_objext \
16598     conftest$ac_exeext conftest.$ac_ext
16599         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16600 $as_echo "$ax_pthread_ok" >&6; }
16601         if test x"$ax_pthread_ok" = xno; then
16602                 PTHREAD_LIBS=""
16603                 PTHREAD_CFLAGS=""
16604         fi
16605         LIBS="$save_LIBS"
16606         CFLAGS="$save_CFLAGS"
16607 fi
16608
16609 # We must check for the threads library under a number of different
16610 # names; the ordering is very important because some systems
16611 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16612 # libraries is broken (non-POSIX).
16613
16614 # Create a list of thread flags to try.  Items starting with a "-" are
16615 # C compiler flags, and other items are library names, except for "none"
16616 # which indicates that we try without any flags at all, and "pthread-config"
16617 # which is a program returning the flags for the Pth emulation library.
16618
16619 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
16620
16621 # The ordering *is* (sometimes) important.  Some notes on the
16622 # individual items follow:
16623
16624 # pthreads: AIX (must check this before -lpthread)
16625 # none: in case threads are in libc; should be tried before -Kthread and
16626 #       other compiler flags to prevent continual compiler warnings
16627 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16628 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16629 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16630 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16631 # -pthreads: Solaris/gcc
16632 # -mthreads: Mingw32/gcc, Lynx/gcc
16633 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16634 #      doesn't hurt to check since this sometimes defines pthreads too;
16635 #      also defines -D_REENTRANT)
16636 #      ... -mt is also the pthreads flag for HP/aCC
16637 # pthread: Linux, etcetera
16638 # --thread-safe: KAI C++
16639 # pthread-config: use pthread-config program (for GNU Pth library)
16640
16641 case ${host_os} in
16642         solaris*)
16643
16644         # On Solaris (at least, for some versions), libc contains stubbed
16645         # (non-functional) versions of the pthreads routines, so link-based
16646         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
16647         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16648         # a function called by this macro, so we could check for that, but
16649         # who knows whether they'll stub that too in a future libc.)  So,
16650         # we'll just look for -pthreads and -lpthread first:
16651
16652         ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
16653         ;;
16654
16655         darwin*)
16656         ax_pthread_flags="-pthread $ax_pthread_flags"
16657         ;;
16658 esac
16659
16660 # Clang doesn't consider unrecognized options an error unless we specify
16661 # -Werror. We throw in some extra Clang-specific options to ensure that
16662 # this doesn't happen for GCC, which also accepts -Werror.
16663
16664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
16665 $as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
16666 save_CFLAGS="$CFLAGS"
16667 ax_pthread_extra_flags="-Werror"
16668 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
16669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16670 /* end confdefs.h.  */
16671 int foo(void);
16672 int
16673 main ()
16674 {
16675 foo()
16676   ;
16677   return 0;
16678 }
16679 _ACEOF
16680 if ac_fn_c_try_compile "$LINENO"; then :
16681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16682 $as_echo "yes" >&6; }
16683 else
16684   ax_pthread_extra_flags=
16685                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16686 $as_echo "no" >&6; }
16687 fi
16688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16689 CFLAGS="$save_CFLAGS"
16690
16691 if test x"$ax_pthread_ok" = xno; then
16692 for flag in $ax_pthread_flags; do
16693
16694         case $flag in
16695                 none)
16696                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
16697 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
16698                 ;;
16699
16700                 -*)
16701                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
16702 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
16703                 PTHREAD_CFLAGS="$flag"
16704                 ;;
16705
16706                 pthread-config)
16707                 # Extract the first word of "pthread-config", so it can be a program name with args.
16708 set dummy pthread-config; ac_word=$2
16709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16710 $as_echo_n "checking for $ac_word... " >&6; }
16711 if ${ac_cv_prog_ax_pthread_config+:} false; then :
16712   $as_echo_n "(cached) " >&6
16713 else
16714   if test -n "$ax_pthread_config"; then
16715   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
16716 else
16717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16718 for as_dir in $PATH
16719 do
16720   IFS=$as_save_IFS
16721   test -z "$as_dir" && as_dir=.
16722     for ac_exec_ext in '' $ac_executable_extensions; do
16723   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16724     ac_cv_prog_ax_pthread_config="yes"
16725     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16726     break 2
16727   fi
16728 done
16729   done
16730 IFS=$as_save_IFS
16731
16732   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
16733 fi
16734 fi
16735 ax_pthread_config=$ac_cv_prog_ax_pthread_config
16736 if test -n "$ax_pthread_config"; then
16737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
16738 $as_echo "$ax_pthread_config" >&6; }
16739 else
16740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16741 $as_echo "no" >&6; }
16742 fi
16743
16744
16745                 if test x"$ax_pthread_config" = xno; then continue; fi
16746                 PTHREAD_CFLAGS="`pthread-config --cflags`"
16747                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16748                 ;;
16749
16750                 *)
16751                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
16752 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
16753                 PTHREAD_LIBS="-l$flag"
16754                 ;;
16755         esac
16756
16757         save_LIBS="$LIBS"
16758         save_CFLAGS="$CFLAGS"
16759         LIBS="$PTHREAD_LIBS $LIBS"
16760         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
16761
16762         # Check for various functions.  We must include pthread.h,
16763         # since some functions may be macros.  (On the Sequent, we
16764         # need a special flag -Kthread to make this header compile.)
16765         # We check for pthread_join because it is in -lpthread on IRIX
16766         # while pthread_create is in libc.  We check for pthread_attr_init
16767         # due to DEC craziness with -lpthreads.  We check for
16768         # pthread_cleanup_push because it is one of the few pthread
16769         # functions on Solaris that doesn't have a non-functional libc stub.
16770         # We try pthread_create on general principles.
16771         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16772 /* end confdefs.h.  */
16773 #include <pthread.h>
16774                         static void routine(void *a) { *((int*)a) = 0; }
16775                         static void *start_routine(void *a) { return a; }
16776 int
16777 main ()
16778 {
16779 pthread_t th; pthread_attr_t attr;
16780                         pthread_create(&th, 0, start_routine, 0);
16781                         pthread_join(th, 0);
16782                         pthread_attr_init(&attr);
16783                         pthread_cleanup_push(routine, 0);
16784                         pthread_cleanup_pop(0) /* ; */
16785   ;
16786   return 0;
16787 }
16788 _ACEOF
16789 if ac_fn_c_try_link "$LINENO"; then :
16790   ax_pthread_ok=yes
16791 fi
16792 rm -f core conftest.err conftest.$ac_objext \
16793     conftest$ac_exeext conftest.$ac_ext
16794
16795         LIBS="$save_LIBS"
16796         CFLAGS="$save_CFLAGS"
16797
16798         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16799 $as_echo "$ax_pthread_ok" >&6; }
16800         if test "x$ax_pthread_ok" = xyes; then
16801                 break;
16802         fi
16803
16804         PTHREAD_LIBS=""
16805         PTHREAD_CFLAGS=""
16806 done
16807 fi
16808
16809 # Various other checks:
16810 if test "x$ax_pthread_ok" = xyes; then
16811         save_LIBS="$LIBS"
16812         LIBS="$PTHREAD_LIBS $LIBS"
16813         save_CFLAGS="$CFLAGS"
16814         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16815
16816         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
16817         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
16818 $as_echo_n "checking for joinable pthread attribute... " >&6; }
16819         attr_name=unknown
16820         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
16821             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16822 /* end confdefs.h.  */
16823 #include <pthread.h>
16824 int
16825 main ()
16826 {
16827 int attr = $attr; return attr /* ; */
16828   ;
16829   return 0;
16830 }
16831 _ACEOF
16832 if ac_fn_c_try_link "$LINENO"; then :
16833   attr_name=$attr; break
16834 fi
16835 rm -f core conftest.err conftest.$ac_objext \
16836     conftest$ac_exeext conftest.$ac_ext
16837         done
16838         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
16839 $as_echo "$attr_name" >&6; }
16840         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
16841
16842 cat >>confdefs.h <<_ACEOF
16843 #define PTHREAD_CREATE_JOINABLE $attr_name
16844 _ACEOF
16845
16846         fi
16847
16848         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
16849 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
16850         flag=no
16851         case ${host_os} in
16852             aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
16853             osf* | hpux*) flag="-D_REENTRANT";;
16854             solaris*)
16855             if test "$GCC" = "yes"; then
16856                 flag="-D_REENTRANT"
16857             else
16858                 # TODO: What about Clang on Solaris?
16859                 flag="-mt -D_REENTRANT"
16860             fi
16861             ;;
16862         esac
16863         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
16864 $as_echo "$flag" >&6; }
16865         if test "x$flag" != xno; then
16866             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16867         fi
16868
16869         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
16870 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
16871 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
16872   $as_echo_n "(cached) " >&6
16873 else
16874
16875                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16876 /* end confdefs.h.  */
16877 #include <pthread.h>
16878 int
16879 main ()
16880 {
16881 int i = PTHREAD_PRIO_INHERIT;
16882   ;
16883   return 0;
16884 }
16885 _ACEOF
16886 if ac_fn_c_try_link "$LINENO"; then :
16887   ax_cv_PTHREAD_PRIO_INHERIT=yes
16888 else
16889   ax_cv_PTHREAD_PRIO_INHERIT=no
16890 fi
16891 rm -f core conftest.err conftest.$ac_objext \
16892     conftest$ac_exeext conftest.$ac_ext
16893
16894 fi
16895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
16896 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
16897         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
16898
16899 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
16900
16901 fi
16902
16903         LIBS="$save_LIBS"
16904         CFLAGS="$save_CFLAGS"
16905
16906         # More AIX lossage: compile with *_r variant
16907         if test "x$GCC" != xyes; then
16908             case $host_os in
16909                 aix*)
16910                 case "x/$CC" in #(
16911   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
16912     #handle absolute path differently from PATH based program lookup
16913                    case "x$CC" in #(
16914   x/*) :
16915     if as_fn_executable_p ${CC}_r; then :
16916   PTHREAD_CC="${CC}_r"
16917 fi ;; #(
16918   *) :
16919     for ac_prog in ${CC}_r
16920 do
16921   # Extract the first word of "$ac_prog", so it can be a program name with args.
16922 set dummy $ac_prog; ac_word=$2
16923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16924 $as_echo_n "checking for $ac_word... " >&6; }
16925 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
16926   $as_echo_n "(cached) " >&6
16927 else
16928   if test -n "$PTHREAD_CC"; then
16929   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16930 else
16931 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16932 for as_dir in $PATH
16933 do
16934   IFS=$as_save_IFS
16935   test -z "$as_dir" && as_dir=.
16936     for ac_exec_ext in '' $ac_executable_extensions; do
16937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16938     ac_cv_prog_PTHREAD_CC="$ac_prog"
16939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16940     break 2
16941   fi
16942 done
16943   done
16944 IFS=$as_save_IFS
16945
16946 fi
16947 fi
16948 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16949 if test -n "$PTHREAD_CC"; then
16950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
16951 $as_echo "$PTHREAD_CC" >&6; }
16952 else
16953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16954 $as_echo "no" >&6; }
16955 fi
16956
16957
16958   test -n "$PTHREAD_CC" && break
16959 done
16960 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16961  ;;
16962 esac ;; #(
16963   *) :
16964      ;;
16965 esac
16966                 ;;
16967             esac
16968         fi
16969 fi
16970
16971 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16972
16973
16974
16975
16976
16977 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16978 if test x"$ax_pthread_ok" = xyes; then
16979
16980
16981 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
16982
16983                 if test -n "$PTHREAD_LIBS"; then
16984                   LIBS="$PTHREAD_LIBS $LIBS"
16985                 fi
16986                 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16987                 CC="$PTHREAD_CC"
16988                 ub_have_pthreads=yes
16989                 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
16990 "
16991 if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
16992
16993 cat >>confdefs.h <<_ACEOF
16994 #define HAVE_PTHREAD_SPINLOCK_T 1
16995 _ACEOF
16996
16997
16998 fi
16999 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
17000 "
17001 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
17002
17003 cat >>confdefs.h <<_ACEOF
17004 #define HAVE_PTHREAD_RWLOCK_T 1
17005 _ACEOF
17006
17007
17008 fi
17009
17010
17011                 if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
17012                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
17013 $as_echo_n "checking if -pthread unused during linking... " >&6; }
17014                 # catch clang warning 'argument unused during compilation'
17015                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17016 /* end confdefs.h.  */
17017 $ac_includes_default
17018
17019 int main(void) {return 0;}
17020
17021 _ACEOF
17022                 pthread_unused="yes"
17023                 # first compile
17024                 echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
17025                 $CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
17026                 if test $? = 0; then
17027                         # then link
17028                         echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
17029                         $CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
17030                         if test $? -ne 0; then
17031                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17032 $as_echo "yes" >&6; }
17033                                 CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
17034                                 PTHREAD_CFLAGS_ONLY="-pthread"
17035
17036                         else
17037                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17038 $as_echo "no" >&6; }
17039                         fi
17040                 else
17041                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17042 $as_echo "no" >&6; }
17043                 fi # endif cc successful
17044                 rm -f conftest conftest.c conftest.o
17045                 fi # endif -pthread in CFLAGS
17046
17047
17048         :
17049 else
17050         ax_pthread_ok=no
17051
17052 fi
17053 ac_ext=c
17054 ac_cpp='$CPP $CPPFLAGS'
17055 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17056 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17057 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17058
17059
17060 fi
17061
17062 # check solaris thread library
17063
17064 # Check whether --with-solaris-threads was given.
17065 if test "${with_solaris_threads+set}" = set; then :
17066   withval=$with_solaris_threads;
17067 else
17068    withval="no"
17069 fi
17070
17071 ub_have_sol_threads=no
17072 if test x_$withval != x_no; then
17073         if test x_$ub_have_pthreads != x_no; then
17074             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
17075 $as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
17076         else
17077         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
17078 $as_echo_n "checking for library containing thr_create... " >&6; }
17079 if ${ac_cv_search_thr_create+:} false; then :
17080   $as_echo_n "(cached) " >&6
17081 else
17082   ac_func_search_save_LIBS=$LIBS
17083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17084 /* end confdefs.h.  */
17085
17086 /* Override any GCC internal prototype to avoid an error.
17087    Use char because int might match the return type of a GCC
17088    builtin and then its argument prototype would still apply.  */
17089 #ifdef __cplusplus
17090 extern "C"
17091 #endif
17092 char thr_create ();
17093 int
17094 main ()
17095 {
17096 return thr_create ();
17097   ;
17098   return 0;
17099 }
17100 _ACEOF
17101 for ac_lib in '' thread; do
17102   if test -z "$ac_lib"; then
17103     ac_res="none required"
17104   else
17105     ac_res=-l$ac_lib
17106     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17107   fi
17108   if ac_fn_c_try_link "$LINENO"; then :
17109   ac_cv_search_thr_create=$ac_res
17110 fi
17111 rm -f core conftest.err conftest.$ac_objext \
17112     conftest$ac_exeext
17113   if ${ac_cv_search_thr_create+:} false; then :
17114   break
17115 fi
17116 done
17117 if ${ac_cv_search_thr_create+:} false; then :
17118
17119 else
17120   ac_cv_search_thr_create=no
17121 fi
17122 rm conftest.$ac_ext
17123 LIBS=$ac_func_search_save_LIBS
17124 fi
17125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
17126 $as_echo "$ac_cv_search_thr_create" >&6; }
17127 ac_res=$ac_cv_search_thr_create
17128 if test "$ac_res" != no; then :
17129   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17130
17131
17132 $as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
17133
17134
17135
17136
17137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
17138 $as_echo_n "checking whether $CC supports -mt... " >&6; }
17139 cache=`echo mt | sed 'y%.=/+-%___p_%'`
17140 if eval \${cv_prog_cc_flag_$cache+:} false; then :
17141   $as_echo_n "(cached) " >&6
17142 else
17143
17144 echo 'void f(void){}' >conftest.c
17145 if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
17146 eval "cv_prog_cc_flag_$cache=yes"
17147 else
17148 eval "cv_prog_cc_flag_$cache=no"
17149 fi
17150 rm -f conftest conftest.o conftest.c
17151
17152 fi
17153
17154 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
17155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17156 $as_echo "yes" >&6; }
17157 :
17158 CFLAGS="$CFLAGS -mt"
17159 else
17160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17161 $as_echo "no" >&6; }
17162 :
17163 CFLAGS="$CFLAGS -D_REENTRANT"
17164 fi
17165
17166                 ub_have_sol_threads=yes
17167
17168 else
17169
17170                 as_fn_error $? "no solaris threads found." "$LINENO" 5
17171
17172 fi
17173
17174         fi
17175 fi
17176
17177 fi # end of non-mingw check of thread libraries
17178
17179 # Check for SYSLOG_FACILITY
17180
17181 # Check whether --with-syslog-facility was given.
17182 if test "${with_syslog_facility+set}" = set; then :
17183   withval=$with_syslog_facility;  UNBOUND_SYSLOG_FACILITY="$withval"
17184 fi
17185
17186 case "${UNBOUND_SYSLOG_FACILITY}" in
17187
17188   LOCAL[0-7]) UNBOUND_SYSLOG_FACILITY="LOG_${UNBOUND_SYSLOG_FACILITY}" ;;
17189
17190            *) UNBOUND_SYSLOG_FACILITY="LOG_DAEMON" ;;
17191
17192 esac
17193
17194 cat >>confdefs.h <<_ACEOF
17195 #define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY}
17196 _ACEOF
17197
17198
17199 # Check for dynamic library module
17200
17201 # Check whether --with-dynlibmodule was given.
17202 if test "${with_dynlibmodule+set}" = set; then :
17203   withval=$with_dynlibmodule;
17204 else
17205    withval="no"
17206 fi
17207
17208
17209 if test x_$withval != x_no; then
17210
17211 $as_echo "#define WITH_DYNLIBMODULE 1" >>confdefs.h
17212
17213   WITH_DYNLIBMODULE=yes
17214
17215   DYNLIBMOD_OBJ="dynlibmod.lo"
17216
17217   DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
17218
17219   if test $on_mingw = "no"; then
17220     DYNLIBMOD_EXTRALIBS="-ldl -export-dynamic"
17221   else
17222     DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.a"
17223   fi
17224
17225 fi
17226
17227 # Check for PyUnbound
17228
17229 # Check whether --with-pyunbound was given.
17230 if test "${with_pyunbound+set}" = set; then :
17231   withval=$with_pyunbound;
17232 else
17233    withval="no"
17234 fi
17235
17236
17237 ub_test_python=no
17238 ub_with_pyunbound=no
17239 if test x_$withval != x_no; then
17240    ub_with_pyunbound=yes
17241    ub_test_python=yes
17242 fi
17243
17244 # Check for Python module
17245
17246 # Check whether --with-pythonmodule was given.
17247 if test "${with_pythonmodule+set}" = set; then :
17248   withval=$with_pythonmodule;
17249 else
17250    withval="no"
17251 fi
17252
17253
17254 ub_with_pythonmod=no
17255 if test x_$withval != x_no; then
17256    ub_with_pythonmod=yes
17257    ub_test_python=yes
17258 fi
17259
17260 # Check for Python & SWIG only on PyUnbound or PyModule
17261 if test x_$ub_test_python != x_no; then
17262
17263    # Check for Python
17264    ub_have_python=no
17265    ac_save_LIBS="$LIBS"
17266         #
17267         # Allow the use of a (user set) custom python version
17268         #
17269
17270
17271         # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
17272 set dummy python$PYTHON_VERSION; ac_word=$2
17273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17274 $as_echo_n "checking for $ac_word... " >&6; }
17275 if ${ac_cv_path_PYTHON+:} false; then :
17276   $as_echo_n "(cached) " >&6
17277 else
17278   case $PYTHON in
17279   [\\/]* | ?:[\\/]*)
17280   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
17281   ;;
17282   *)
17283   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17284 for as_dir in $PATH
17285 do
17286   IFS=$as_save_IFS
17287   test -z "$as_dir" && as_dir=.
17288     for ac_exec_ext in '' $ac_executable_extensions; do
17289   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17290     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
17291     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17292     break 2
17293   fi
17294 done
17295   done
17296 IFS=$as_save_IFS
17297
17298   ;;
17299 esac
17300 fi
17301 PYTHON=$ac_cv_path_PYTHON
17302 if test -n "$PYTHON"; then
17303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
17304 $as_echo "$PYTHON" >&6; }
17305 else
17306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17307 $as_echo "no" >&6; }
17308 fi
17309
17310
17311         if test -z "$PYTHON"; then
17312            as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
17313            PYTHON_VERSION=""
17314         fi
17315
17316         if test -z "$PYTHON_VERSION"; then
17317                 PYTHON_VERSION=`$PYTHON -c "import sys; \
17318                         print(sys.version.split()[0])"`
17319         fi
17320
17321         #
17322         # Check if you have distutils, else fail
17323         #
17324         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
17325 $as_echo_n "checking for the distutils Python package... " >&6; }
17326         if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then
17327                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17328 $as_echo "yes" >&6; }
17329         else
17330                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17331 $as_echo "no" >&6; }
17332                 as_fn_error $? "cannot import Python module \"distutils\".
17333 Please check your Python installation. The error was:
17334 $ac_distutils_result" "$LINENO" 5
17335                 PYTHON_VERSION=""
17336         fi
17337
17338         #
17339         # Check for Python include path
17340         #
17341         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
17342 $as_echo_n "checking for Python include path... " >&6; }
17343         if test -z "$PYTHON_CPPFLAGS"; then
17344                 python_path=`$PYTHON -c "import distutils.sysconfig; \
17345                         print(distutils.sysconfig.get_python_inc());"`
17346                 if test -n "${python_path}"; then
17347                         python_path="-I$python_path"
17348                 fi
17349                 PYTHON_CPPFLAGS=$python_path
17350         fi
17351         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
17352 $as_echo "$PYTHON_CPPFLAGS" >&6; }
17353
17354
17355         #
17356         # Check for Python library path
17357         #
17358         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
17359 $as_echo_n "checking for Python library path... " >&6; }
17360         if test -z "$PYTHON_LDFLAGS"; then
17361                 PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
17362                         print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
17363         fi
17364         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
17365 $as_echo "$PYTHON_LDFLAGS" >&6; }
17366
17367
17368         if test -z "$PYTHON_LIBDIR"; then
17369                 PYTHON_LIBDIR=`$PYTHON -c "from distutils.sysconfig import *; \
17370                         print(get_config_var('LIBDIR'));"`
17371         fi
17372
17373         #
17374         # Check for site packages
17375         #
17376         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
17377 $as_echo_n "checking for Python site-packages path... " >&6; }
17378         if test -z "$PYTHON_SITE_PKG"; then
17379                 PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
17380                         print(distutils.sysconfig.get_python_lib(1,0));"`
17381         fi
17382         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
17383 $as_echo "$PYTHON_SITE_PKG" >&6; }
17384
17385
17386         #
17387         # final check to see if everything compiles alright
17388         #
17389         { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
17390 $as_echo_n "checking consistency of all components of python development environment... " >&6; }
17391         ac_ext=c
17392 ac_cpp='$CPP $CPPFLAGS'
17393 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17394 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17395 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17396
17397         # save current global flags
17398         ac_save_LIBS="$LIBS"
17399         ac_save_CPPFLAGS="$CPPFLAGS"
17400
17401         LIBS="$LIBS $PYTHON_LDFLAGS"
17402         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
17403         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17404 /* end confdefs.h.  */
17405
17406                 #include <Python.h>
17407
17408 int
17409 main ()
17410 {
17411
17412                 Py_Initialize();
17413
17414   ;
17415   return 0;
17416 }
17417 _ACEOF
17418 if ac_fn_c_try_link "$LINENO"; then :
17419   pythonexists=yes
17420 else
17421   pythonexists=no
17422 fi
17423 rm -f core conftest.err conftest.$ac_objext \
17424     conftest$ac_exeext conftest.$ac_ext
17425
17426         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
17427 $as_echo "$pythonexists" >&6; }
17428
17429         if test ! "$pythonexists" = "yes"; then
17430            as_fn_error $? "
17431   Could not link test program to Python. Maybe the main Python library has been
17432   installed in some non-standard library path. If so, pass it to configure,
17433   via the LDFLAGS environment variable.
17434   Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
17435   ============================================================================
17436    ERROR!
17437    You probably have to install the development version of the Python package
17438    for your distribution.  The exact name of this package varies among them.
17439   ============================================================================
17440            " "$LINENO" 5
17441           PYTHON_VERSION=""
17442         fi
17443         ac_ext=c
17444 ac_cpp='$CPP $CPPFLAGS'
17445 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17446 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17447 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17448
17449         # turn back to default flags
17450         CPPFLAGS="$ac_save_CPPFLAGS"
17451         LIBS="$ac_save_LIBS"
17452
17453         #
17454         # all done!
17455         #
17456
17457    if test ! -z "$PYTHON_VERSION"; then
17458         if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
17459                 as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
17460         fi
17461
17462       PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
17463
17464       # Have Python
17465
17466 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
17467
17468       if test -n "$LIBS"; then
17469         LIBS="$PYTHON_LDFLAGS $LIBS"
17470       else
17471         LIBS="$PYTHON_LDFLAGS"
17472       fi
17473       if test -n "$CPPFLAGS"; then
17474         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
17475       else
17476         CPPFLAGS="$PYTHON_CPPFLAGS"
17477       fi
17478       if test "$PYTHON_LIBDIR" != "/usr/lib" -a "$PYTHON_LIBDIR" != "" -a "$PYTHON_LIBDIR" != "/usr/lib64"; then
17479
17480         if test "x$enable_rpath" = xyes; then
17481                 if echo "$PYTHON_LIBDIR" | grep "^/" >/dev/null; then
17482                         RUNTIME_PATH="$RUNTIME_PATH -R$PYTHON_LIBDIR"
17483                 fi
17484         fi
17485
17486       fi
17487       ub_have_python=yes
17488       if test -n "$PKG_CONFIG" && \
17489     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
17490   ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
17491   ac_status=$?
17492   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17493   test $ac_status = 0; }; then
17494   PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
17495 else
17496   PC_PY_DEPENDENCY="python"
17497 fi
17498
17499
17500       # Check for SWIG
17501       ub_have_swig=no
17502       # Check whether --enable-swig-version-check was given.
17503 if test "${enable_swig_version_check+set}" = set; then :
17504   enableval=$enable_swig_version_check;
17505 fi
17506
17507       if test "$enable_swig_version_check" = "yes"; then
17508
17509         # Extract the first word of "swig", so it can be a program name with args.
17510 set dummy swig; ac_word=$2
17511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17512 $as_echo_n "checking for $ac_word... " >&6; }
17513 if ${ac_cv_path_SWIG+:} false; then :
17514   $as_echo_n "(cached) " >&6
17515 else
17516   case $SWIG in
17517   [\\/]* | ?:[\\/]*)
17518   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17519   ;;
17520   *)
17521   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17522 for as_dir in $PATH
17523 do
17524   IFS=$as_save_IFS
17525   test -z "$as_dir" && as_dir=.
17526     for ac_exec_ext in '' $ac_executable_extensions; do
17527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17528     ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17530     break 2
17531   fi
17532 done
17533   done
17534 IFS=$as_save_IFS
17535
17536   ;;
17537 esac
17538 fi
17539 SWIG=$ac_cv_path_SWIG
17540 if test -n "$SWIG"; then
17541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17542 $as_echo "$SWIG" >&6; }
17543 else
17544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17545 $as_echo "no" >&6; }
17546 fi
17547
17548
17549         if test -z "$SWIG" ; then
17550                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17551 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17552                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17553         elif test -n "2.0.1" ; then
17554                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17555 $as_echo_n "checking for SWIG version... " >&6; }
17556                 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'`
17557                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17558 $as_echo "$swig_version" >&6; }
17559                 if test -n "$swig_version" ; then
17560                         # Calculate the required version number components
17561                         required=2.0.1
17562                         required_major=`echo $required | sed 's/[^0-9].*//'`
17563                         if test -z "$required_major" ; then
17564                                 required_major=0
17565                         fi
17566                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17567                         required_minor=`echo $required | sed 's/[^0-9].*//'`
17568                         if test -z "$required_minor" ; then
17569                                 required_minor=0
17570                         fi
17571                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17572                         required_patch=`echo $required | sed 's/[^0-9].*//'`
17573                         if test -z "$required_patch" ; then
17574                                 required_patch=0
17575                         fi
17576                         # Calculate the available version number components
17577                         available=$swig_version
17578                         available_major=`echo $available | sed 's/[^0-9].*//'`
17579                         if test -z "$available_major" ; then
17580                                 available_major=0
17581                         fi
17582                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17583                         available_minor=`echo $available | sed 's/[^0-9].*//'`
17584                         if test -z "$available_minor" ; then
17585                                 available_minor=0
17586                         fi
17587                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17588                         available_patch=`echo $available | sed 's/[^0-9].*//'`
17589                         if test -z "$available_patch" ; then
17590                                 available_patch=0
17591                         fi
17592                         badversion=0
17593                         if test $available_major -lt $required_major ; then
17594                                 badversion=1
17595                         fi
17596                         if test $available_major -eq $required_major \
17597                                 -a $available_minor -lt $required_minor ; then
17598                                 badversion=1
17599                         fi
17600                         if test $available_major -eq $required_major \
17601                                 -a $available_minor -eq $required_minor \
17602                                 -a $available_patch -lt $required_patch ; then
17603                                 badversion=1
17604                         fi
17605                         if test $badversion -eq 1 ; then
17606                                 { $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
17607 $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;}
17608                                 SWIG='echo "Error: SWIG version >= 2.0.1 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17609                         else
17610                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17611 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17612                                 SWIG_LIB=`$SWIG -swiglib`
17613                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17614 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17615                         fi
17616                 else
17617                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17618 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17619                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17620                 fi
17621         fi
17622
17623
17624       else
17625
17626         # Extract the first word of "swig", so it can be a program name with args.
17627 set dummy swig; ac_word=$2
17628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17629 $as_echo_n "checking for $ac_word... " >&6; }
17630 if ${ac_cv_path_SWIG+:} false; then :
17631   $as_echo_n "(cached) " >&6
17632 else
17633   case $SWIG in
17634   [\\/]* | ?:[\\/]*)
17635   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17636   ;;
17637   *)
17638   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17639 for as_dir in $PATH
17640 do
17641   IFS=$as_save_IFS
17642   test -z "$as_dir" && as_dir=.
17643     for ac_exec_ext in '' $ac_executable_extensions; do
17644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17645     ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17647     break 2
17648   fi
17649 done
17650   done
17651 IFS=$as_save_IFS
17652
17653   ;;
17654 esac
17655 fi
17656 SWIG=$ac_cv_path_SWIG
17657 if test -n "$SWIG"; then
17658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17659 $as_echo "$SWIG" >&6; }
17660 else
17661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17662 $as_echo "no" >&6; }
17663 fi
17664
17665
17666         if test -z "$SWIG" ; then
17667                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17668 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17669                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17670         elif test -n "" ; then
17671                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17672 $as_echo_n "checking for SWIG version... " >&6; }
17673                 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'`
17674                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17675 $as_echo "$swig_version" >&6; }
17676                 if test -n "$swig_version" ; then
17677                         # Calculate the required version number components
17678                         required=
17679                         required_major=`echo $required | sed 's/[^0-9].*//'`
17680                         if test -z "$required_major" ; then
17681                                 required_major=0
17682                         fi
17683                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17684                         required_minor=`echo $required | sed 's/[^0-9].*//'`
17685                         if test -z "$required_minor" ; then
17686                                 required_minor=0
17687                         fi
17688                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17689                         required_patch=`echo $required | sed 's/[^0-9].*//'`
17690                         if test -z "$required_patch" ; then
17691                                 required_patch=0
17692                         fi
17693                         # Calculate the available version number components
17694                         available=$swig_version
17695                         available_major=`echo $available | sed 's/[^0-9].*//'`
17696                         if test -z "$available_major" ; then
17697                                 available_major=0
17698                         fi
17699                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17700                         available_minor=`echo $available | sed 's/[^0-9].*//'`
17701                         if test -z "$available_minor" ; then
17702                                 available_minor=0
17703                         fi
17704                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17705                         available_patch=`echo $available | sed 's/[^0-9].*//'`
17706                         if test -z "$available_patch" ; then
17707                                 available_patch=0
17708                         fi
17709                         badversion=0
17710                         if test $available_major -lt $required_major ; then
17711                                 badversion=1
17712                         fi
17713                         if test $available_major -eq $required_major \
17714                                 -a $available_minor -lt $required_minor ; then
17715                                 badversion=1
17716                         fi
17717                         if test $available_major -eq $required_major \
17718                                 -a $available_minor -eq $required_minor \
17719                                 -a $available_patch -lt $required_patch ; then
17720                                 badversion=1
17721                         fi
17722                         if test $badversion -eq 1 ; then
17723                                 { $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
17724 $as_echo "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
17725                                 SWIG='echo "Error: SWIG version >=  is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17726                         else
17727                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17728 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17729                                 SWIG_LIB=`$SWIG -swiglib`
17730                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17731 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17732                         fi
17733                 else
17734                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17735 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17736                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17737                 fi
17738         fi
17739
17740
17741       fi
17742       { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
17743 $as_echo_n "checking SWIG... " >&6; }
17744       if test ! -x "$SWIG"; then
17745          as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
17746       else
17747
17748 $as_echo "#define HAVE_SWIG 1" >>confdefs.h
17749
17750          swig="$SWIG"
17751
17752          { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
17753 $as_echo "present" >&6; }
17754
17755          # If have Python & SWIG
17756          # Declare PythonMod
17757          if test x_$ub_with_pythonmod != x_no; then
17758
17759 $as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
17760
17761             WITH_PYTHONMODULE=yes
17762
17763             PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
17764
17765             PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
17766
17767             PYTHONMOD_INSTALL=pythonmod-install
17768
17769             PYTHONMOD_UNINSTALL=pythonmod-uninstall
17770
17771          fi
17772
17773          # Declare PyUnbound
17774          if test x_$ub_with_pyunbound != x_no; then
17775
17776 $as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
17777
17778             WITH_PYUNBOUND=yes
17779
17780             PYUNBOUND_OBJ="libunbound_wrap.lo"
17781
17782             PYUNBOUND_TARGET="_unbound.la"
17783
17784             PYUNBOUND_INSTALL=pyunbound-install
17785
17786             PYUNBOUND_UNINSTALL=pyunbound-uninstall
17787
17788          fi
17789       fi
17790    else
17791       { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
17792 $as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
17793       ub_with_pyunbound=no
17794       ub_with_pythonmod=no
17795    fi
17796 fi
17797
17798 if test "`uname`" = "NetBSD"; then
17799         NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
17800
17801 fi
17802 CONFIG_DATE=`date +%Y%m%d`
17803
17804
17805 # Checks for libraries.
17806
17807 # libnss
17808 USE_NSS="no"
17809
17810 # Check whether --with-nss was given.
17811 if test "${with_nss+set}" = set; then :
17812   withval=$with_nss;
17813         USE_NSS="yes"
17814
17815 $as_echo "#define HAVE_NSS 1" >>confdefs.h
17816
17817         if test "$withval" != "" -a "$withval" != "yes"; then
17818                 CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
17819                 LDFLAGS="$LDFLAGS -L$withval/lib"
17820
17821         if test "x$enable_rpath" = xyes; then
17822                 if echo "$withval/lib" | grep "^/" >/dev/null; then
17823                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17824                 fi
17825         fi
17826
17827                 CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
17828         else
17829                 CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
17830                 CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
17831         fi
17832         LIBS="$LIBS -lnss3 -lnspr4"
17833         SSLLIB=""
17834         PC_CRYPTO_DEPENDENCY="nss nspr"
17835
17836
17837
17838 fi
17839
17840
17841 # libnettle
17842 USE_NETTLE="no"
17843
17844 # Check whether --with-nettle was given.
17845 if test "${with_nettle+set}" = set; then :
17846   withval=$with_nettle;
17847         USE_NETTLE="yes"
17848
17849 $as_echo "#define HAVE_NETTLE 1" >>confdefs.h
17850
17851         for ac_header in nettle/dsa-compat.h
17852 do :
17853   ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
17854 "
17855 if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then :
17856   cat >>confdefs.h <<_ACEOF
17857 #define HAVE_NETTLE_DSA_COMPAT_H 1
17858 _ACEOF
17859
17860 fi
17861
17862 done
17863
17864         if test "$withval" != "" -a "$withval" != "yes"; then
17865                 CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
17866                 LDFLAGS="$LDFLAGS -L$withval/lib"
17867
17868         if test "x$enable_rpath" = xyes; then
17869                 if echo "$withval/lib" | grep "^/" >/dev/null; then
17870                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17871                 fi
17872         fi
17873
17874         else
17875                 CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
17876         fi
17877         LIBS="$LIBS -lhogweed -lnettle -lgmp"
17878         SSLLIB=""
17879         PC_CRYPTO_DEPENDENCY="hogweed nettle"
17880
17881
17882
17883 fi
17884
17885
17886 # openssl
17887 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17888
17889
17890 # Check whether --with-ssl was given.
17891 if test "${with_ssl+set}" = set; then :
17892   withval=$with_ssl;
17893
17894 else
17895
17896             withval="yes"
17897
17898 fi
17899
17900     if test x_$withval = x_no; then
17901         as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
17902     fi
17903
17904     withval=$withval
17905     if test x_$withval != x_no; then
17906         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
17907 $as_echo_n "checking for SSL... " >&6; }
17908         if test x_$withval = x_ -o x_$withval = x_yes; then
17909             withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
17910         fi
17911         for dir in $withval; do
17912             ssldir="$dir"
17913             if test -f "$dir/include/openssl/ssl.h"; then
17914                 found_ssl="yes"
17915
17916 cat >>confdefs.h <<_ACEOF
17917 #define HAVE_SSL /**/
17918 _ACEOF
17919
17920                                 if test "$ssldir" != "/usr"; then
17921                         CPPFLAGS="$CPPFLAGS -I$ssldir/include"
17922                         LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
17923                 fi
17924                 break;
17925             fi
17926         done
17927         if test x_$found_ssl != x_yes; then
17928             as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
17929         else
17930             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
17931 $as_echo "found in $ssldir" >&6; }
17932             HAVE_SSL=yes
17933                         if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
17934                 LDFLAGS="$LDFLAGS -L$ssldir/lib"
17935                 LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
17936
17937         if test "x$enable_rpath" = xyes; then
17938                 if echo "$ssldir/lib" | grep "^/" >/dev/null; then
17939                         RUNTIME_PATH="$RUNTIME_PATH -R$ssldir/lib"
17940                 fi
17941         fi
17942
17943             fi
17944
17945             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_Update in -lcrypto" >&5
17946 $as_echo_n "checking for HMAC_Update in -lcrypto... " >&6; }
17947             LIBS="$LIBS -lcrypto"
17948             LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
17949             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17950 /* end confdefs.h.  */
17951
17952 int
17953 main ()
17954 {
17955
17956                 int HMAC_Update(void);
17957                 (void)HMAC_Update();
17958
17959   ;
17960   return 0;
17961 }
17962 _ACEOF
17963 if ac_fn_c_try_link "$LINENO"; then :
17964
17965                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17966 $as_echo "yes" >&6; }
17967
17968 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17969
17970
17971 else
17972
17973                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17974 $as_echo "no" >&6; }
17975                 # check if -lwsock32 or -lgdi32 are needed.
17976                 BAKLIBS="$LIBS"
17977                 BAKSSLLIBS="$LIBSSL_LIBS"
17978                 LIBS="$LIBS -lgdi32 -lws2_32"
17979                 LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
17980                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
17981 $as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
17982                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17983 /* end confdefs.h.  */
17984
17985 int
17986 main ()
17987 {
17988
17989                     int HMAC_Update(void);
17990                     (void)HMAC_Update();
17991
17992   ;
17993   return 0;
17994 }
17995 _ACEOF
17996 if ac_fn_c_try_link "$LINENO"; then :
17997
17998
17999 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
18000
18001                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18002 $as_echo "yes" >&6; }
18003
18004 else
18005
18006                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18007 $as_echo "no" >&6; }
18008                     LIBS="$BAKLIBS"
18009                     LIBSSL_LIBS="$BAKSSLLIBS"
18010                     LIBS="$LIBS -ldl"
18011                     LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
18012                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
18013 $as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
18014                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18015 /* end confdefs.h.  */
18016
18017 int
18018 main ()
18019 {
18020
18021                         int HMAC_Update(void);
18022                         (void)HMAC_Update();
18023
18024   ;
18025   return 0;
18026 }
18027 _ACEOF
18028 if ac_fn_c_try_link "$LINENO"; then :
18029
18030
18031 $as_echo "#define HAVE_HMAC_UPDATE 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 -pthread"
18043                         LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
18044                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
18045 $as_echo_n "checking if -lcrypto needs -ldl -pthread... " >&6; }
18046                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18047 /* end confdefs.h.  */
18048
18049 int
18050 main ()
18051 {
18052
18053                             int HMAC_Update(void);
18054                             (void)HMAC_Update();
18055
18056   ;
18057   return 0;
18058 }
18059 _ACEOF
18060 if ac_fn_c_try_link "$LINENO"; then :
18061
18062
18063 $as_echo "#define HAVE_HMAC_UPDATE 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                             as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
18073
18074 fi
18075 rm -f core conftest.err conftest.$ac_objext \
18076     conftest$ac_exeext conftest.$ac_ext
18077
18078 fi
18079 rm -f core conftest.err conftest.$ac_objext \
18080     conftest$ac_exeext conftest.$ac_ext
18081
18082 fi
18083 rm -f core conftest.err conftest.$ac_objext \
18084     conftest$ac_exeext conftest.$ac_ext
18085
18086 fi
18087 rm -f core conftest.err conftest.$ac_objext \
18088     conftest$ac_exeext conftest.$ac_ext
18089         fi
18090
18091
18092     fi
18093 for ac_header in openssl/ssl.h
18094 do :
18095   ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
18096 "
18097 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
18098   cat >>confdefs.h <<_ACEOF
18099 #define HAVE_OPENSSL_SSL_H 1
18100 _ACEOF
18101
18102 fi
18103
18104 done
18105
18106 for ac_header in openssl/err.h
18107 do :
18108   ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
18109 "
18110 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
18111   cat >>confdefs.h <<_ACEOF
18112 #define HAVE_OPENSSL_ERR_H 1
18113 _ACEOF
18114
18115 fi
18116
18117 done
18118
18119 for ac_header in openssl/rand.h
18120 do :
18121   ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
18122 "
18123 if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
18124   cat >>confdefs.h <<_ACEOF
18125 #define HAVE_OPENSSL_RAND_H 1
18126 _ACEOF
18127
18128 fi
18129
18130 done
18131
18132
18133
18134
18135 # check if libssl needs libdl
18136 BAKLIBS="$LIBS"
18137 LIBS="-lssl $LIBS"
18138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
18139 $as_echo_n "checking if libssl needs libdl... " >&6; }
18140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18141 /* end confdefs.h.  */
18142
18143 /* Override any GCC internal prototype to avoid an error.
18144    Use char because int might match the return type of a GCC
18145    builtin and then its argument prototype would still apply.  */
18146 #ifdef __cplusplus
18147 extern "C"
18148 #endif
18149 char SSL_CTX_new ();
18150 int
18151 main ()
18152 {
18153 return SSL_CTX_new ();
18154   ;
18155   return 0;
18156 }
18157 _ACEOF
18158 if ac_fn_c_try_link "$LINENO"; then :
18159
18160         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18161 $as_echo "no" >&6; }
18162         LIBS="$BAKLIBS"
18163
18164 else
18165
18166         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18167 $as_echo "yes" >&6; }
18168         LIBS="$BAKLIBS"
18169         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
18170 $as_echo_n "checking for library containing dlopen... " >&6; }
18171 if ${ac_cv_search_dlopen+:} false; then :
18172   $as_echo_n "(cached) " >&6
18173 else
18174   ac_func_search_save_LIBS=$LIBS
18175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18176 /* end confdefs.h.  */
18177
18178 /* Override any GCC internal prototype to avoid an error.
18179    Use char because int might match the return type of a GCC
18180    builtin and then its argument prototype would still apply.  */
18181 #ifdef __cplusplus
18182 extern "C"
18183 #endif
18184 char dlopen ();
18185 int
18186 main ()
18187 {
18188 return dlopen ();
18189   ;
18190   return 0;
18191 }
18192 _ACEOF
18193 for ac_lib in '' dl; do
18194   if test -z "$ac_lib"; then
18195     ac_res="none required"
18196   else
18197     ac_res=-l$ac_lib
18198     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18199   fi
18200   if ac_fn_c_try_link "$LINENO"; then :
18201   ac_cv_search_dlopen=$ac_res
18202 fi
18203 rm -f core conftest.err conftest.$ac_objext \
18204     conftest$ac_exeext
18205   if ${ac_cv_search_dlopen+:} false; then :
18206   break
18207 fi
18208 done
18209 if ${ac_cv_search_dlopen+:} false; then :
18210
18211 else
18212   ac_cv_search_dlopen=no
18213 fi
18214 rm conftest.$ac_ext
18215 LIBS=$ac_func_search_save_LIBS
18216 fi
18217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
18218 $as_echo "$ac_cv_search_dlopen" >&6; }
18219 ac_res=$ac_cv_search_dlopen
18220 if test "$ac_res" != no; then :
18221   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18222
18223 fi
18224
18225
18226 fi
18227 rm -f core conftest.err conftest.$ac_objext \
18228     conftest$ac_exeext conftest.$ac_ext
18229 SSLLIB="-lssl"
18230
18231 PC_CRYPTO_DEPENDENCY="libcrypto libssl"
18232
18233
18234 # check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
18235 BAKLIBS="$LIBS"
18236 LIBS="-lssl $LIBS"
18237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
18238 $as_echo_n "checking if libssl needs -lcrypt32... " >&6; }
18239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18240 /* end confdefs.h.  */
18241
18242 /* Override any GCC internal prototype to avoid an error.
18243    Use char because int might match the return type of a GCC
18244    builtin and then its argument prototype would still apply.  */
18245 #ifdef __cplusplus
18246 extern "C"
18247 #endif
18248 char HMAC_Update ();
18249 int
18250 main ()
18251 {
18252 return HMAC_Update ();
18253   ;
18254   return 0;
18255 }
18256 _ACEOF
18257 if ac_fn_c_try_link "$LINENO"; then :
18258
18259         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18260 $as_echo "no" >&6; }
18261         LIBS="$BAKLIBS"
18262
18263 else
18264
18265         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18266 $as_echo "yes" >&6; }
18267         LIBS="$BAKLIBS"
18268         LIBS="$LIBS -lcrypt32"
18269
18270 fi
18271 rm -f core conftest.err conftest.$ac_objext \
18272     conftest$ac_exeext conftest.$ac_ext
18273
18274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
18275 $as_echo_n "checking for LibreSSL... " >&6; }
18276 if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
18277         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18278 $as_echo "yes" >&6; }
18279
18280 $as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
18281
18282         # libressl provides these compat functions, but they may also be
18283         # declared by the OS in libc.  See if they have been declared.
18284         ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
18285 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
18286   ac_have_decl=1
18287 else
18288   ac_have_decl=0
18289 fi
18290
18291 cat >>confdefs.h <<_ACEOF
18292 #define HAVE_DECL_STRLCPY $ac_have_decl
18293 _ACEOF
18294 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
18295 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
18296   ac_have_decl=1
18297 else
18298   ac_have_decl=0
18299 fi
18300
18301 cat >>confdefs.h <<_ACEOF
18302 #define HAVE_DECL_STRLCAT $ac_have_decl
18303 _ACEOF
18304 ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
18305 if test "x$ac_cv_have_decl_arc4random" = xyes; then :
18306   ac_have_decl=1
18307 else
18308   ac_have_decl=0
18309 fi
18310
18311 cat >>confdefs.h <<_ACEOF
18312 #define HAVE_DECL_ARC4RANDOM $ac_have_decl
18313 _ACEOF
18314 ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
18315 if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
18316   ac_have_decl=1
18317 else
18318   ac_have_decl=0
18319 fi
18320
18321 cat >>confdefs.h <<_ACEOF
18322 #define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
18323 _ACEOF
18324
18325 else
18326         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18327 $as_echo "no" >&6; }
18328 fi
18329 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
18330 do :
18331   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18332 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
18333 "
18334 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18335   cat >>confdefs.h <<_ACEOF
18336 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18337 _ACEOF
18338
18339 fi
18340
18341 done
18342
18343 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
18344 do :
18345   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18346 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18347 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18348   cat >>confdefs.h <<_ACEOF
18349 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18350 _ACEOF
18351
18352 fi
18353 done
18354
18355
18356 # these check_funcs need -lssl
18357 BAKLIBS="$LIBS"
18358 LIBS="-lssl $LIBS"
18359 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
18360 do :
18361   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18362 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18363 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18364   cat >>confdefs.h <<_ACEOF
18365 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18366 _ACEOF
18367
18368 fi
18369 done
18370
18371 LIBS="$BAKLIBS"
18372
18373 ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
18374 $ac_includes_default
18375 #ifdef HAVE_OPENSSL_ERR_H
18376 #include <openssl/err.h>
18377 #endif
18378
18379 #ifdef HAVE_OPENSSL_RAND_H
18380 #include <openssl/rand.h>
18381 #endif
18382
18383 #ifdef HAVE_OPENSSL_CONF_H
18384 #include <openssl/conf.h>
18385 #endif
18386
18387 #ifdef HAVE_OPENSSL_ENGINE_H
18388 #include <openssl/engine.h>
18389 #endif
18390 #include <openssl/ssl.h>
18391 #include <openssl/evp.h>
18392
18393 "
18394 if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
18395   ac_have_decl=1
18396 else
18397   ac_have_decl=0
18398 fi
18399
18400 cat >>confdefs.h <<_ACEOF
18401 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
18402 _ACEOF
18403 ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
18404 $ac_includes_default
18405 #ifdef HAVE_OPENSSL_ERR_H
18406 #include <openssl/err.h>
18407 #endif
18408
18409 #ifdef HAVE_OPENSSL_RAND_H
18410 #include <openssl/rand.h>
18411 #endif
18412
18413 #ifdef HAVE_OPENSSL_CONF_H
18414 #include <openssl/conf.h>
18415 #endif
18416
18417 #ifdef HAVE_OPENSSL_ENGINE_H
18418 #include <openssl/engine.h>
18419 #endif
18420 #include <openssl/ssl.h>
18421 #include <openssl/evp.h>
18422
18423 "
18424 if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
18425   ac_have_decl=1
18426 else
18427   ac_have_decl=0
18428 fi
18429
18430 cat >>confdefs.h <<_ACEOF
18431 #define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
18432 _ACEOF
18433 ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
18434 $ac_includes_default
18435 #ifdef HAVE_OPENSSL_ERR_H
18436 #include <openssl/err.h>
18437 #endif
18438
18439 #ifdef HAVE_OPENSSL_RAND_H
18440 #include <openssl/rand.h>
18441 #endif
18442
18443 #ifdef HAVE_OPENSSL_CONF_H
18444 #include <openssl/conf.h>
18445 #endif
18446
18447 #ifdef HAVE_OPENSSL_ENGINE_H
18448 #include <openssl/engine.h>
18449 #endif
18450 #include <openssl/ssl.h>
18451 #include <openssl/evp.h>
18452
18453 "
18454 if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
18455   ac_have_decl=1
18456 else
18457   ac_have_decl=0
18458 fi
18459
18460 cat >>confdefs.h <<_ACEOF
18461 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
18462 _ACEOF
18463
18464
18465 if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then
18466 # check function return type.
18467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5
18468 $as_echo_n "checking the return type of HMAC_Init_ex... " >&6; }
18469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18470 /* end confdefs.h.  */
18471
18472 #ifdef HAVE_OPENSSL_ERR_H
18473 #include <openssl/err.h>
18474 #endif
18475
18476 #ifdef HAVE_OPENSSL_RAND_H
18477 #include <openssl/rand.h>
18478 #endif
18479
18480 #ifdef HAVE_OPENSSL_CONF_H
18481 #include <openssl/conf.h>
18482 #endif
18483
18484 #ifdef HAVE_OPENSSL_ENGINE_H
18485 #include <openssl/engine.h>
18486 #endif
18487 #include <openssl/ssl.h>
18488 #include <openssl/evp.h>
18489
18490 int
18491 main ()
18492 {
18493
18494         HMAC_CTX* hmac_ctx = NULL;
18495         void* hmac_key = NULL;
18496         const EVP_MD* digest = NULL;
18497         int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);
18498         (void)x;
18499
18500   ;
18501   return 0;
18502 }
18503 _ACEOF
18504 if ac_fn_c_try_compile "$LINENO"; then :
18505
18506         { $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5
18507 $as_echo "int" >&6; }
18508
18509 else
18510
18511         { $as_echo "$as_me:${as_lineno-$LINENO}: result: void" >&5
18512 $as_echo "void" >&6; }
18513
18514 $as_echo "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h
18515
18516
18517 fi
18518 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18519 fi
18520
18521 fi
18522
18523
18524 # libbsd
18525
18526 # Check whether --with-libbsd was given.
18527 if test "${with_libbsd+set}" = set; then :
18528   withval=$with_libbsd;
18529         for ac_header in bsd/string.h bsd/stdlib.h
18530 do :
18531   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18532 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
18533 "
18534 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18535   cat >>confdefs.h <<_ACEOF
18536 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18537 _ACEOF
18538
18539 fi
18540
18541 done
18542
18543         if test "x$ac_cv_header_bsd_string_h" = xyes -a "x$ac_cv_header_bsd_stdlib_h" = xyes; then
18544                 for func in strlcpy strlcat arc4random arc4random_uniform reallocarray; do
18545                         as_ac_Search=`$as_echo "ac_cv_search_$func" | $as_tr_sh`
18546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $func" >&5
18547 $as_echo_n "checking for library containing $func... " >&6; }
18548 if eval \${$as_ac_Search+:} false; then :
18549   $as_echo_n "(cached) " >&6
18550 else
18551   ac_func_search_save_LIBS=$LIBS
18552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18553 /* end confdefs.h.  */
18554
18555 /* Override any GCC internal prototype to avoid an error.
18556    Use char because int might match the return type of a GCC
18557    builtin and then its argument prototype would still apply.  */
18558 #ifdef __cplusplus
18559 extern "C"
18560 #endif
18561 char $func ();
18562 int
18563 main ()
18564 {
18565 return $func ();
18566   ;
18567   return 0;
18568 }
18569 _ACEOF
18570 for ac_lib in '' bsd; do
18571   if test -z "$ac_lib"; then
18572     ac_res="none required"
18573   else
18574     ac_res=-l$ac_lib
18575     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18576   fi
18577   if ac_fn_c_try_link "$LINENO"; then :
18578   eval "$as_ac_Search=\$ac_res"
18579 fi
18580 rm -f core conftest.err conftest.$ac_objext \
18581     conftest$ac_exeext
18582   if eval \${$as_ac_Search+:} false; then :
18583   break
18584 fi
18585 done
18586 if eval \${$as_ac_Search+:} false; then :
18587
18588 else
18589   eval "$as_ac_Search=no"
18590 fi
18591 rm conftest.$ac_ext
18592 LIBS=$ac_func_search_save_LIBS
18593 fi
18594 eval ac_res=\$$as_ac_Search
18595                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18596 $as_echo "$ac_res" >&6; }
18597 eval ac_res=\$$as_ac_Search
18598 if test "$ac_res" != no; then :
18599   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18600
18601
18602 $as_echo "#define HAVE_LIBBSD 1" >>confdefs.h
18603
18604                                 PC_LIBBSD_DEPENDENCY=libbsd
18605
18606
18607 fi
18608
18609                 done
18610         fi
18611
18612 fi
18613
18614
18615 # Check whether --enable-sha1 was given.
18616 if test "${enable_sha1+set}" = set; then :
18617   enableval=$enable_sha1;
18618 fi
18619
18620 case "$enable_sha1" in
18621         no)
18622         ;;
18623         yes|*)
18624
18625 $as_echo "#define USE_SHA1 1" >>confdefs.h
18626
18627         ;;
18628 esac
18629
18630
18631 # Check whether --enable-sha2 was given.
18632 if test "${enable_sha2+set}" = set; then :
18633   enableval=$enable_sha2;
18634 fi
18635
18636 case "$enable_sha2" in
18637         no)
18638         ;;
18639         yes|*)
18640
18641 $as_echo "#define USE_SHA2 1" >>confdefs.h
18642
18643         ;;
18644 esac
18645
18646 # Check whether --enable-subnet was given.
18647 if test "${enable_subnet+set}" = set; then :
18648   enableval=$enable_subnet;
18649 fi
18650
18651 case "$enable_subnet" in
18652         yes)
18653
18654 $as_echo "#define CLIENT_SUBNET 1" >>confdefs.h
18655
18656         SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
18657
18658         SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
18659
18660         ;;
18661         no|*)
18662         ;;
18663 esac
18664
18665 # check wether gost also works
18666
18667 # Check whether --enable-gost was given.
18668 if test "${enable_gost+set}" = set; then :
18669   enableval=$enable_gost;
18670 fi
18671
18672 use_gost="no"
18673 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18674 case "$enable_gost" in
18675         no)
18676         ;;
18677         *)
18678         ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
18679 if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
18680   :
18681 else
18682   as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
18683 fi
18684
18685         ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
18686 if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
18687
18688 else
18689   as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
18690 fi
18691
18692
18693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
18694 $as_echo_n "checking if GOST works... " >&6; }
18695 if test c${cross_compiling} = cno; then
18696 BAKCFLAGS="$CFLAGS"
18697 if test -n "$ssldir"; then
18698         CFLAGS="$CFLAGS -Wl,-rpath,$ssldir/lib"
18699 fi
18700 if test "$cross_compiling" = yes; then :
18701   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18702 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18703 as_fn_error $? "cannot run test program while cross compiling
18704 See \`config.log' for more details" "$LINENO" 5; }
18705 else
18706   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18707 /* end confdefs.h.  */
18708
18709 #include <string.h>
18710 #include <openssl/ssl.h>
18711 #include <openssl/evp.h>
18712 #include <openssl/engine.h>
18713 #include <openssl/conf.h>
18714 /* routine to load gost (from sldns) */
18715 int load_gost_id(void)
18716 {
18717         static int gost_id = 0;
18718         const EVP_PKEY_ASN1_METHOD* meth;
18719         ENGINE* e;
18720
18721         if(gost_id) return gost_id;
18722
18723         /* see if configuration loaded gost implementation from other engine*/
18724         meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
18725         if(meth) {
18726                 EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18727                 return gost_id;
18728         }
18729
18730         /* see if engine can be loaded already */
18731         e = ENGINE_by_id("gost");
18732         if(!e) {
18733                 /* load it ourself, in case statically linked */
18734                 ENGINE_load_builtin_engines();
18735                 ENGINE_load_dynamic();
18736                 e = ENGINE_by_id("gost");
18737         }
18738         if(!e) {
18739                 /* no gost engine in openssl */
18740                 return 0;
18741         }
18742         if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
18743                 ENGINE_finish(e);
18744                 ENGINE_free(e);
18745                 return 0;
18746         }
18747
18748         meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
18749         if(!meth) {
18750                 /* algo not found */
18751                 ENGINE_finish(e);
18752                 ENGINE_free(e);
18753                 return 0;
18754         }
18755         EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18756         return gost_id;
18757 }
18758 int main(void) {
18759         EVP_MD_CTX* ctx;
18760         const EVP_MD* md;
18761         unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
18762         const char* str = "Hello world";
18763         const unsigned char check[] = {
18764                 0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
18765                 0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
18766                 0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
18767                 0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
18768         };
18769         OPENSSL_config(NULL);
18770         (void)load_gost_id();
18771         md = EVP_get_digestbyname("md_gost94");
18772         if(!md) return 1;
18773         memset(digest, 0, sizeof(digest));
18774         ctx = EVP_MD_CTX_create();
18775         if(!ctx) return 2;
18776         if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
18777         if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
18778         if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
18779         /* uncomment to see the hash calculated.
18780                 {int i;
18781                 for(i=0; i<32; i++)
18782                         printf(" %2.2x", (int)digest[i]);
18783                 printf("\n");}
18784         */
18785         if(memcmp(digest, check, sizeof(check)) != 0)
18786                 return 6;
18787         return 0;
18788 }
18789
18790 _ACEOF
18791 if ac_fn_c_try_run "$LINENO"; then :
18792   eval "ac_cv_c_gost_works=yes"
18793 else
18794   eval "ac_cv_c_gost_works=no"
18795 fi
18796 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18797   conftest.$ac_objext conftest.beam conftest.$ac_ext
18798 fi
18799
18800 CFLAGS="$BAKCFLAGS"
18801 else
18802 eval "ac_cv_c_gost_works=maybe"
18803 fi
18804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
18805 $as_echo "$ac_cv_c_gost_works" >&6; }
18806
18807         if test "$ac_cv_c_gost_works" != no; then
18808                 use_gost="yes"
18809
18810 $as_echo "#define USE_GOST 1" >>confdefs.h
18811
18812         fi
18813         ;;
18814 esac
18815 fi
18816 # Check whether --enable-ecdsa was given.
18817 if test "${enable_ecdsa+set}" = set; then :
18818   enableval=$enable_ecdsa;
18819 fi
18820
18821 use_ecdsa="no"
18822 case "$enable_ecdsa" in
18823     no)
18824       ;;
18825     *)
18826       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18827               ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
18828 if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
18829
18830 else
18831   as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18832 fi
18833
18834               ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
18835 if test "x$ac_cv_func_SHA384_Init" = xyes; then :
18836
18837 else
18838   as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18839 fi
18840
18841               ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
18842 #include <openssl/evp.h>
18843
18844 "
18845 if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
18846   ac_have_decl=1
18847 else
18848   ac_have_decl=0
18849 fi
18850
18851 cat >>confdefs.h <<_ACEOF
18852 #define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
18853 _ACEOF
18854 if test $ac_have_decl = 1; then :
18855
18856 else
18857   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18858 fi
18859 ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
18860 #include <openssl/evp.h>
18861
18862 "
18863 if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
18864   ac_have_decl=1
18865 else
18866   ac_have_decl=0
18867 fi
18868
18869 cat >>confdefs.h <<_ACEOF
18870 #define HAVE_DECL_NID_SECP384R1 $ac_have_decl
18871 _ACEOF
18872 if test $ac_have_decl = 1; then :
18873
18874 else
18875   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18876 fi
18877
18878               # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
18879               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
18880 $as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
18881               if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
18882                 if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
18883                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18884 $as_echo "no" >&6; }
18885
18886 cat >>confdefs.h <<_ACEOF
18887 #define USE_ECDSA_EVP_WORKAROUND 1
18888 _ACEOF
18889
18890                 else
18891                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18892 $as_echo "yes" >&6; }
18893                 fi
18894               else
18895                 # not OpenSSL, thus likely LibreSSL, which supports it
18896                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18897 $as_echo "yes" >&6; }
18898               fi
18899       fi
18900       # we now know we have ECDSA and the required curves.
18901
18902 cat >>confdefs.h <<_ACEOF
18903 #define USE_ECDSA 1
18904 _ACEOF
18905
18906       use_ecdsa="yes"
18907       ;;
18908 esac
18909
18910 # Check whether --enable-dsa was given.
18911 if test "${enable_dsa+set}" = set; then :
18912   enableval=$enable_dsa;
18913 fi
18914
18915 use_dsa="no"
18916 case "$enable_dsa" in
18917     yes)
18918       # detect if DSA is supported, and turn it off if not.
18919       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18920       ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
18921 if test "x$ac_cv_func_DSA_SIG_new" = xyes; then :
18922
18923       as_ac_Type=`$as_echo "ac_cv_type_DSA_SIG*" | $as_tr_sh`
18924 ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
18925 $ac_includes_default
18926 #ifdef HAVE_OPENSSL_ERR_H
18927 #include <openssl/err.h>
18928 #endif
18929
18930 #ifdef HAVE_OPENSSL_RAND_H
18931 #include <openssl/rand.h>
18932 #endif
18933
18934 #ifdef HAVE_OPENSSL_CONF_H
18935 #include <openssl/conf.h>
18936 #endif
18937
18938 #ifdef HAVE_OPENSSL_ENGINE_H
18939 #include <openssl/engine.h>
18940 #endif
18941
18942 "
18943 if eval test \"x\$"$as_ac_Type"\" = x"yes"; then :
18944
18945
18946 cat >>confdefs.h <<_ACEOF
18947 #define USE_DSA 1
18948 _ACEOF
18949
18950
18951 else
18952   if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
18953                fi
18954 fi
18955
18956
18957 else
18958   if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
18959                fi
18960 fi
18961
18962       else
18963
18964 cat >>confdefs.h <<_ACEOF
18965 #define USE_DSA 1
18966 _ACEOF
18967
18968       fi
18969       ;;
18970     *)
18971       # disable dsa by default, RFC 8624 section 3.1, validators MUST NOT
18972       # support DSA for DNSSEC Validation.
18973       ;;
18974 esac
18975
18976 # Check whether --enable-ed25519 was given.
18977 if test "${enable_ed25519+set}" = set; then :
18978   enableval=$enable_ed25519;
18979 fi
18980
18981 use_ed25519="no"
18982 case "$enable_ed25519" in
18983     no)
18984       ;;
18985     *)
18986       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18987               ac_fn_c_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
18988 #include <openssl/evp.h>
18989
18990 "
18991 if test "x$ac_cv_have_decl_NID_ED25519" = xyes; then :
18992   ac_have_decl=1
18993 else
18994   ac_have_decl=0
18995 fi
18996
18997 cat >>confdefs.h <<_ACEOF
18998 #define HAVE_DECL_NID_ED25519 $ac_have_decl
18999 _ACEOF
19000 if test $ac_have_decl = 1; then :
19001
19002                 use_ed25519="yes"
19003
19004 else
19005    if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
19006                 fi
19007 fi
19008
19009       fi
19010       if test $USE_NETTLE = "yes"; then
19011                 for ac_header in nettle/eddsa.h
19012 do :
19013   ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
19014 "
19015 if test "x$ac_cv_header_nettle_eddsa_h" = xyes; then :
19016   cat >>confdefs.h <<_ACEOF
19017 #define HAVE_NETTLE_EDDSA_H 1
19018 _ACEOF
19019  use_ed25519="yes"
19020 fi
19021
19022 done
19023
19024       fi
19025       if test $use_ed25519 = "yes"; then
19026
19027 cat >>confdefs.h <<_ACEOF
19028 #define USE_ED25519 1
19029 _ACEOF
19030
19031       fi
19032       ;;
19033 esac
19034
19035 # Check whether --enable-ed448 was given.
19036 if test "${enable_ed448+set}" = set; then :
19037   enableval=$enable_ed448;
19038 fi
19039
19040 use_ed448="no"
19041 case "$enable_ed448" in
19042     no)
19043       ;;
19044     *)
19045       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19046               ac_fn_c_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
19047 #include <openssl/evp.h>
19048
19049 "
19050 if test "x$ac_cv_have_decl_NID_ED448" = xyes; then :
19051   ac_have_decl=1
19052 else
19053   ac_have_decl=0
19054 fi
19055
19056 cat >>confdefs.h <<_ACEOF
19057 #define HAVE_DECL_NID_ED448 $ac_have_decl
19058 _ACEOF
19059 if test $ac_have_decl = 1; then :
19060
19061                 use_ed448="yes"
19062
19063 else
19064    if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
19065                 fi
19066 fi
19067
19068       fi
19069       if test $use_ed448 = "yes"; then
19070
19071 cat >>confdefs.h <<_ACEOF
19072 #define USE_ED448 1
19073 _ACEOF
19074
19075       fi
19076       ;;
19077 esac
19078
19079 # Check whether --enable-event-api was given.
19080 if test "${enable_event_api+set}" = set; then :
19081   enableval=$enable_event_api;
19082 fi
19083
19084 case "$enable_event_api" in
19085     yes)
19086       UNBOUND_EVENT_INSTALL=unbound-event-install
19087
19088       UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
19089
19090       ;;
19091     *)
19092       ;;
19093 esac
19094
19095 # Check whether --enable-tfo-client was given.
19096 if test "${enable_tfo_client+set}" = set; then :
19097   enableval=$enable_tfo_client;
19098 fi
19099
19100 case "$enable_tfo_client" in
19101         yes)
19102                 case `uname` in
19103                         Linux) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
19104 #include <netinet/tcp.h>
19105
19106 "
19107 if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then :
19108   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
19109 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
19110 else
19111   as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
19112 fi
19113
19114
19115 cat >>confdefs.h <<_ACEOF
19116 #define USE_MSG_FASTOPEN 1
19117 _ACEOF
19118
19119                           ;;
19120                         Darwin) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
19121 #include <sys/socket.h>
19122
19123 "
19124 if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then :
19125   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
19126 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
19127 else
19128   as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
19129 fi
19130
19131
19132 cat >>confdefs.h <<_ACEOF
19133 #define USE_OSX_MSG_FASTOPEN 1
19134 _ACEOF
19135
19136                           ;;
19137                 esac
19138         ;;
19139         no|*)
19140                 ;;
19141 esac
19142
19143 # Check whether --enable-tfo-server was given.
19144 if test "${enable_tfo_server+set}" = set; then :
19145   enableval=$enable_tfo_server;
19146 fi
19147
19148 case "$enable_tfo_server" in
19149         yes)
19150               ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
19151 #include <netinet/tcp.h>
19152
19153 "
19154 if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then :
19155   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
19156 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
19157 else
19158   as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
19159 fi
19160
19161
19162 cat >>confdefs.h <<_ACEOF
19163 #define USE_TCP_FASTOPEN 1
19164 _ACEOF
19165
19166                 ;;
19167         no|*)
19168                 ;;
19169 esac
19170
19171 # check for libevent
19172
19173 # Check whether --with-libevent was given.
19174 if test "${with_libevent+set}" = set; then :
19175   withval=$with_libevent;
19176 else
19177    with_libevent="no"
19178 fi
19179
19180 if test "x_$with_libevent" != x_no; then
19181
19182 $as_echo "#define USE_LIBEVENT 1" >>confdefs.h
19183
19184         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
19185 $as_echo_n "checking for libevent... " >&6; }
19186         if test "x_$with_libevent" = x_ -o "x_$with_libevent" = x_yes; then
19187             with_libevent="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19188         fi
19189         for dir in $with_libevent; do
19190             thedir="$dir"
19191             if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
19192                 found_libevent="yes"
19193                                                                 if test "$thedir" != "/usr"; then
19194                                     CPPFLAGS="$CPPFLAGS -I$thedir/include"
19195                                 fi
19196                                 break;
19197                     fi
19198         done
19199         if test x_$found_libevent != x_yes; then
19200                 if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
19201                         # libevent source directory
19202                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
19203 $as_echo "found in $thedir" >&6; }
19204                         CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
19205                         BAK_LDFLAGS_SET="1"
19206                         BAK_LDFLAGS="$LDFLAGS"
19207                         # remove evdns from linking
19208                         mkdir build >/dev/null 2>&1
19209                         mkdir build/libevent >/dev/null 2>&1
19210                         mkdir build/libevent/.libs >/dev/null 2>&1
19211                         ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
19212                         ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
19213                         ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
19214                         cp $ev_files_o build/libevent
19215                         cp $ev_files_lo build/libevent
19216                         cp $ev_files_libso build/libevent/.libs
19217                         LATE_LDFLAGS="build/libevent/*.lo -lm"
19218                         LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
19219                 else
19220             as_fn_error $? "Cannot find the libevent library in $with_libevent
19221 You can restart ./configure --with-libevent=no to use a builtin alternative.
19222 Please note that this alternative is not as capable as libevent when using
19223 large outgoing port ranges.  " "$LINENO" 5
19224                 fi
19225         else
19226             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
19227 $as_echo "found in $thedir" >&6; }
19228                     if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
19229                     LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
19230
19231         if test "x$enable_rpath" = xyes; then
19232                 if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
19233                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
19234                 fi
19235         fi
19236
19237             else
19238                                     if test "$thedir" != "/usr" -a "$thedir" != ""; then
19239                         LDFLAGS="$LDFLAGS -L$thedir/lib"
19240
19241         if test "x$enable_rpath" = xyes; then
19242                 if echo "$thedir/lib" | grep "^/" >/dev/null; then
19243                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
19244                 fi
19245         fi
19246
19247                     fi
19248             fi
19249         fi
19250         # check for library used by libevent after 1.3c
19251         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19252 $as_echo_n "checking for library containing clock_gettime... " >&6; }
19253 if ${ac_cv_search_clock_gettime+:} false; then :
19254   $as_echo_n "(cached) " >&6
19255 else
19256   ac_func_search_save_LIBS=$LIBS
19257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19258 /* end confdefs.h.  */
19259
19260 /* Override any GCC internal prototype to avoid an error.
19261    Use char because int might match the return type of a GCC
19262    builtin and then its argument prototype would still apply.  */
19263 #ifdef __cplusplus
19264 extern "C"
19265 #endif
19266 char clock_gettime ();
19267 int
19268 main ()
19269 {
19270 return clock_gettime ();
19271   ;
19272   return 0;
19273 }
19274 _ACEOF
19275 for ac_lib in '' rt; do
19276   if test -z "$ac_lib"; then
19277     ac_res="none required"
19278   else
19279     ac_res=-l$ac_lib
19280     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19281   fi
19282   if ac_fn_c_try_link "$LINENO"; then :
19283   ac_cv_search_clock_gettime=$ac_res
19284 fi
19285 rm -f core conftest.err conftest.$ac_objext \
19286     conftest$ac_exeext
19287   if ${ac_cv_search_clock_gettime+:} false; then :
19288   break
19289 fi
19290 done
19291 if ${ac_cv_search_clock_gettime+:} false; then :
19292
19293 else
19294   ac_cv_search_clock_gettime=no
19295 fi
19296 rm conftest.$ac_ext
19297 LIBS=$ac_func_search_save_LIBS
19298 fi
19299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19300 $as_echo "$ac_cv_search_clock_gettime" >&6; }
19301 ac_res=$ac_cv_search_clock_gettime
19302 if test "$ac_res" != no; then :
19303   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19304
19305 fi
19306
19307
19308         # is the event.h header libev or libevent?
19309         for ac_header in event.h
19310 do :
19311   ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
19312 "
19313 if test "x$ac_cv_header_event_h" = xyes; then :
19314   cat >>confdefs.h <<_ACEOF
19315 #define HAVE_EVENT_H 1
19316 _ACEOF
19317
19318 fi
19319
19320 done
19321
19322         ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
19323 #include <event.h>
19324
19325 "
19326 if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
19327
19328                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
19329 $as_echo_n "checking for library containing event_set... " >&6; }
19330 if ${ac_cv_search_event_set+:} false; then :
19331   $as_echo_n "(cached) " >&6
19332 else
19333   ac_func_search_save_LIBS=$LIBS
19334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19335 /* end confdefs.h.  */
19336
19337 /* Override any GCC internal prototype to avoid an error.
19338    Use char because int might match the return type of a GCC
19339    builtin and then its argument prototype would still apply.  */
19340 #ifdef __cplusplus
19341 extern "C"
19342 #endif
19343 char event_set ();
19344 int
19345 main ()
19346 {
19347 return event_set ();
19348   ;
19349   return 0;
19350 }
19351 _ACEOF
19352 for ac_lib in '' ev; do
19353   if test -z "$ac_lib"; then
19354     ac_res="none required"
19355   else
19356     ac_res=-l$ac_lib
19357     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19358   fi
19359   if ac_fn_c_try_link "$LINENO"; then :
19360   ac_cv_search_event_set=$ac_res
19361 fi
19362 rm -f core conftest.err conftest.$ac_objext \
19363     conftest$ac_exeext
19364   if ${ac_cv_search_event_set+:} false; then :
19365   break
19366 fi
19367 done
19368 if ${ac_cv_search_event_set+:} false; then :
19369
19370 else
19371   ac_cv_search_event_set=no
19372 fi
19373 rm conftest.$ac_ext
19374 LIBS=$ac_func_search_save_LIBS
19375 fi
19376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
19377 $as_echo "$ac_cv_search_event_set" >&6; }
19378 ac_res=$ac_cv_search_event_set
19379 if test "$ac_res" != no; then :
19380   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19381
19382 fi
19383
19384
19385 else
19386
19387                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
19388 $as_echo_n "checking for library containing event_set... " >&6; }
19389 if ${ac_cv_search_event_set+:} false; then :
19390   $as_echo_n "(cached) " >&6
19391 else
19392   ac_func_search_save_LIBS=$LIBS
19393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19394 /* end confdefs.h.  */
19395
19396 /* Override any GCC internal prototype to avoid an error.
19397    Use char because int might match the return type of a GCC
19398    builtin and then its argument prototype would still apply.  */
19399 #ifdef __cplusplus
19400 extern "C"
19401 #endif
19402 char event_set ();
19403 int
19404 main ()
19405 {
19406 return event_set ();
19407   ;
19408   return 0;
19409 }
19410 _ACEOF
19411 for ac_lib in '' event; do
19412   if test -z "$ac_lib"; then
19413     ac_res="none required"
19414   else
19415     ac_res=-l$ac_lib
19416     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19417   fi
19418   if ac_fn_c_try_link "$LINENO"; then :
19419   ac_cv_search_event_set=$ac_res
19420 fi
19421 rm -f core conftest.err conftest.$ac_objext \
19422     conftest$ac_exeext
19423   if ${ac_cv_search_event_set+:} false; then :
19424   break
19425 fi
19426 done
19427 if ${ac_cv_search_event_set+:} false; then :
19428
19429 else
19430   ac_cv_search_event_set=no
19431 fi
19432 rm conftest.$ac_ext
19433 LIBS=$ac_func_search_save_LIBS
19434 fi
19435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
19436 $as_echo "$ac_cv_search_event_set" >&6; }
19437 ac_res=$ac_cv_search_event_set
19438 if test "$ac_res" != no; then :
19439   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19440
19441 fi
19442
19443
19444 fi
19445
19446         for ac_func in event_base_free
19447 do :
19448   ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
19449 if test "x$ac_cv_func_event_base_free" = xyes; then :
19450   cat >>confdefs.h <<_ACEOF
19451 #define HAVE_EVENT_BASE_FREE 1
19452 _ACEOF
19453
19454 fi
19455 done
19456  # only in libevent 1.2 and later
19457         for ac_func in event_base_once
19458 do :
19459   ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
19460 if test "x$ac_cv_func_event_base_once" = xyes; then :
19461   cat >>confdefs.h <<_ACEOF
19462 #define HAVE_EVENT_BASE_ONCE 1
19463 _ACEOF
19464
19465 fi
19466 done
19467  # only in libevent 1.4.1 and later
19468         for ac_func in event_base_new
19469 do :
19470   ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
19471 if test "x$ac_cv_func_event_base_new" = xyes; then :
19472   cat >>confdefs.h <<_ACEOF
19473 #define HAVE_EVENT_BASE_NEW 1
19474 _ACEOF
19475
19476 fi
19477 done
19478  # only in libevent 1.4.1 and later
19479         for ac_func in event_base_get_method
19480 do :
19481   ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
19482 if test "x$ac_cv_func_event_base_get_method" = xyes; then :
19483   cat >>confdefs.h <<_ACEOF
19484 #define HAVE_EVENT_BASE_GET_METHOD 1
19485 _ACEOF
19486
19487 fi
19488 done
19489  # only in libevent 1.4.3 and later
19490         for ac_func in ev_loop
19491 do :
19492   ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
19493 if test "x$ac_cv_func_ev_loop" = xyes; then :
19494   cat >>confdefs.h <<_ACEOF
19495 #define HAVE_EV_LOOP 1
19496 _ACEOF
19497
19498 fi
19499 done
19500  # only in libev. (tested on 3.51)
19501         for ac_func in ev_default_loop
19502 do :
19503   ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
19504 if test "x$ac_cv_func_ev_default_loop" = xyes; then :
19505   cat >>confdefs.h <<_ACEOF
19506 #define HAVE_EV_DEFAULT_LOOP 1
19507 _ACEOF
19508
19509 fi
19510 done
19511  # only in libev. (tested on 4.00)
19512         for ac_func in event_assign
19513 do :
19514   ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign"
19515 if test "x$ac_cv_func_event_assign" = xyes; then :
19516   cat >>confdefs.h <<_ACEOF
19517 #define HAVE_EVENT_ASSIGN 1
19518 _ACEOF
19519
19520 fi
19521 done
19522  # in libevent, for thread-safety
19523         ac_fn_c_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default
19524 #ifdef HAVE_EVENT_H
19525 #  include <event.h>
19526 #else
19527 #  include \"event2/event.h\"
19528 #endif
19529
19530 "
19531 if test "x$ac_cv_have_decl_evsignal_assign" = xyes; then :
19532   ac_have_decl=1
19533 else
19534   ac_have_decl=0
19535 fi
19536
19537 cat >>confdefs.h <<_ACEOF
19538 #define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl
19539 _ACEOF
19540
19541         PC_LIBEVENT_DEPENDENCY="libevent"
19542
19543         if test -n "$BAK_LDFLAGS_SET"; then
19544                 LDFLAGS="$BAK_LDFLAGS"
19545         fi
19546 else
19547
19548 $as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
19549
19550 fi
19551
19552 # check for libexpat
19553
19554 # Check whether --with-libexpat was given.
19555 if test "${with_libexpat+set}" = set; then :
19556   withval=$with_libexpat;
19557 else
19558    withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19559 fi
19560
19561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
19562 $as_echo_n "checking for libexpat... " >&6; }
19563 found_libexpat="no"
19564 for dir in $withval ; do
19565             if test -f "$dir/include/expat.h"; then
19566                 found_libexpat="yes"
19567                                 if test "$dir" != "/usr"; then
19568                     CPPFLAGS="$CPPFLAGS -I$dir/include"
19569                     LDFLAGS="$LDFLAGS -L$dir/lib"
19570                 fi
19571                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19572 $as_echo "found in $dir" >&6; }
19573                 break;
19574             fi
19575 done
19576 if test x_$found_libexpat != x_yes; then
19577         as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
19578 fi
19579 for ac_header in expat.h
19580 do :
19581   ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
19582 "
19583 if test "x$ac_cv_header_expat_h" = xyes; then :
19584   cat >>confdefs.h <<_ACEOF
19585 #define HAVE_EXPAT_H 1
19586 _ACEOF
19587
19588 fi
19589
19590 done
19591
19592 ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
19593 #include <expat.h>
19594
19595 "
19596 if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then :
19597   ac_have_decl=1
19598 else
19599   ac_have_decl=0
19600 fi
19601
19602 cat >>confdefs.h <<_ACEOF
19603 #define HAVE_DECL_XML_STOPPARSER $ac_have_decl
19604 _ACEOF
19605
19606
19607 # hiredis (redis C client for cachedb)
19608
19609 # Check whether --with-libhiredis was given.
19610 if test "${with_libhiredis+set}" = set; then :
19611   withval=$with_libhiredis;
19612 else
19613    withval="no"
19614 fi
19615
19616 found_libhiredis="no"
19617 if test x_$withval = x_yes -o x_$withval != x_no; then
19618    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
19619 $as_echo_n "checking for libhiredis... " >&6; }
19620    if test x_$withval = x_ -o x_$withval = x_yes; then
19621             withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19622    fi
19623    for dir in $withval ; do
19624             if test -f "$dir/include/hiredis/hiredis.h"; then
19625                 found_libhiredis="yes"
19626                                 if test "$dir" != "/usr"; then
19627                     CPPFLAGS="$CPPFLAGS -I$dir/include"
19628                     LDFLAGS="$LDFLAGS -L$dir/lib"
19629                 fi
19630                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19631 $as_echo "found in $dir" >&6; }
19632
19633 $as_echo "#define USE_REDIS 1" >>confdefs.h
19634
19635                 LIBS="$LIBS -lhiredis"
19636                 break;
19637             fi
19638     done
19639     if test x_$found_libhiredis != x_yes; then
19640         as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
19641     fi
19642     for ac_header in hiredis/hiredis.h
19643 do :
19644   ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
19645 "
19646 if test "x$ac_cv_header_hiredis_hiredis_h" = xyes; then :
19647   cat >>confdefs.h <<_ACEOF
19648 #define HAVE_HIREDIS_HIREDIS_H 1
19649 _ACEOF
19650
19651 fi
19652
19653 done
19654
19655     ac_fn_c_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
19656     #include <hiredis/hiredis.h>
19657
19658 "
19659 if test "x$ac_cv_have_decl_redisConnect" = xyes; then :
19660   ac_have_decl=1
19661 else
19662   ac_have_decl=0
19663 fi
19664
19665 cat >>confdefs.h <<_ACEOF
19666 #define HAVE_DECL_REDISCONNECT $ac_have_decl
19667 _ACEOF
19668
19669 fi
19670
19671 # set static linking for uninstalled libraries if requested
19672
19673 staticexe=""
19674 # Check whether --enable-static-exe was given.
19675 if test "${enable_static_exe+set}" = set; then :
19676   enableval=$enable_static_exe;
19677 fi
19678
19679 if test x_$enable_static_exe = x_yes; then
19680         staticexe="-static"
19681         if test "$on_mingw" = yes; then
19682                 staticexe="-all-static"
19683                 # for static compile, include gdi32 and zlib here.
19684                 if echo $LIBS | grep 'lgdi32' >/dev/null; then
19685                         :
19686                 else
19687                         LIBS="$LIBS -lgdi32"
19688                 fi
19689                 LIBS="$LIBS -lz"
19690         fi
19691 fi
19692
19693 # set full static linking if requested
19694 # Check whether --enable-fully-static was given.
19695 if test "${enable_fully_static+set}" = set; then :
19696   enableval=$enable_fully_static;
19697 fi
19698
19699 if test x_$enable_fully_static = x_yes; then
19700         staticexe="-all-static"
19701         if test "$on_mingw" = yes; then
19702                 # for static compile, include gdi32 and zlib here.
19703                 if echo $LIBS | grep 'lgdi32' >/dev/null; then
19704                         :
19705                 else
19706                         LIBS="$LIBS -lgdi32"
19707                 fi
19708                 LIBS="$LIBS -lz"
19709         fi
19710 fi
19711
19712 # set lock checking if requested
19713 # Check whether --enable-lock_checks was given.
19714 if test "${enable_lock_checks+set}" = set; then :
19715   enableval=$enable_lock_checks;
19716 fi
19717
19718 if test x_$enable_lock_checks = x_yes; then
19719
19720 $as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
19721
19722         CHECKLOCK_OBJ="checklocks.lo"
19723
19724 fi
19725
19726
19727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
19728 $as_echo_n "checking for getaddrinfo... " >&6; }
19729 ac_cv_func_getaddrinfo=no
19730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19731 /* end confdefs.h.  */
19732
19733 #ifdef __cplusplus
19734 extern "C"
19735 {
19736 #endif
19737 char* getaddrinfo();
19738 char* (*f) () = getaddrinfo;
19739 #ifdef __cplusplus
19740 }
19741 #endif
19742 int main() {
19743         ;
19744         return 0;
19745 }
19746
19747 _ACEOF
19748 if ac_fn_c_try_link "$LINENO"; then :
19749   ac_cv_func_getaddrinfo="yes"
19750 if test "$ac_cv_header_windows_h" = "yes"; then
19751
19752 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
19753
19754         USE_WINSOCK="1"
19755         if echo $LIBS | grep 'lws2_32' >/dev/null; then
19756                 :
19757         else
19758                 LIBS="$LIBS -lws2_32"
19759         fi
19760 fi
19761
19762 else
19763   ORIGLIBS="$LIBS"
19764 LIBS="$LIBS -lws2_32"
19765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19766 /* end confdefs.h.  */
19767
19768 #ifdef HAVE_WS2TCPIP_H
19769 #include <ws2tcpip.h>
19770 #endif
19771
19772 int
19773 main ()
19774 {
19775
19776         (void)getaddrinfo(NULL, NULL, NULL, NULL);
19777
19778
19779   ;
19780   return 0;
19781 }
19782 _ACEOF
19783 if ac_fn_c_try_link "$LINENO"; then :
19784
19785 ac_cv_func_getaddrinfo="yes"
19786
19787 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
19788
19789 USE_WINSOCK="1"
19790
19791 else
19792
19793 ac_cv_func_getaddrinfo="no"
19794 LIBS="$ORIGLIBS"
19795
19796 fi
19797 rm -f core conftest.err conftest.$ac_objext \
19798     conftest$ac_exeext conftest.$ac_ext
19799
19800 fi
19801 rm -f core conftest.err conftest.$ac_objext \
19802     conftest$ac_exeext conftest.$ac_ext
19803
19804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
19805 $as_echo "$ac_cv_func_getaddrinfo" >&6; }
19806 if test $ac_cv_func_getaddrinfo = yes; then
19807
19808 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
19809
19810 fi
19811
19812 if test "$USE_WINSOCK" = 1; then
19813
19814 $as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
19815
19816         for ac_header in iphlpapi.h
19817 do :
19818   ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
19819 #include <windows.h>
19820
19821 "
19822 if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
19823   cat >>confdefs.h <<_ACEOF
19824 #define HAVE_IPHLPAPI_H 1
19825 _ACEOF
19826
19827 fi
19828
19829 done
19830
19831         if test -n "$ac_tool_prefix"; then
19832   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
19833 set dummy ${ac_tool_prefix}windres; ac_word=$2
19834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19835 $as_echo_n "checking for $ac_word... " >&6; }
19836 if ${ac_cv_prog_WINDRES+:} false; then :
19837   $as_echo_n "(cached) " >&6
19838 else
19839   if test -n "$WINDRES"; then
19840   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
19841 else
19842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19843 for as_dir in $PATH
19844 do
19845   IFS=$as_save_IFS
19846   test -z "$as_dir" && as_dir=.
19847     for ac_exec_ext in '' $ac_executable_extensions; do
19848   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19849     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
19850     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19851     break 2
19852   fi
19853 done
19854   done
19855 IFS=$as_save_IFS
19856
19857 fi
19858 fi
19859 WINDRES=$ac_cv_prog_WINDRES
19860 if test -n "$WINDRES"; then
19861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
19862 $as_echo "$WINDRES" >&6; }
19863 else
19864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19865 $as_echo "no" >&6; }
19866 fi
19867
19868
19869 fi
19870 if test -z "$ac_cv_prog_WINDRES"; then
19871   ac_ct_WINDRES=$WINDRES
19872   # Extract the first word of "windres", so it can be a program name with args.
19873 set dummy windres; ac_word=$2
19874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19875 $as_echo_n "checking for $ac_word... " >&6; }
19876 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
19877   $as_echo_n "(cached) " >&6
19878 else
19879   if test -n "$ac_ct_WINDRES"; then
19880   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
19881 else
19882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19883 for as_dir in $PATH
19884 do
19885   IFS=$as_save_IFS
19886   test -z "$as_dir" && as_dir=.
19887     for ac_exec_ext in '' $ac_executable_extensions; do
19888   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19889     ac_cv_prog_ac_ct_WINDRES="windres"
19890     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19891     break 2
19892   fi
19893 done
19894   done
19895 IFS=$as_save_IFS
19896
19897 fi
19898 fi
19899 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
19900 if test -n "$ac_ct_WINDRES"; then
19901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
19902 $as_echo "$ac_ct_WINDRES" >&6; }
19903 else
19904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19905 $as_echo "no" >&6; }
19906 fi
19907
19908   if test "x$ac_ct_WINDRES" = x; then
19909     WINDRES=""
19910   else
19911     case $cross_compiling:$ac_tool_warned in
19912 yes:)
19913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19914 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19915 ac_tool_warned=yes ;;
19916 esac
19917     WINDRES=$ac_ct_WINDRES
19918   fi
19919 else
19920   WINDRES="$ac_cv_prog_WINDRES"
19921 fi
19922
19923         LIBS="$LIBS -liphlpapi -lcrypt32"
19924         WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
19925
19926         WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
19927
19928         WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
19929
19930         WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
19931
19932         WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
19933
19934         WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
19935
19936         WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
19937
19938         WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
19939
19940 fi
19941 if test $ac_cv_func_getaddrinfo = no; then
19942         case " $LIBOBJS " in
19943   *" fake-rfc2553.$ac_objext "* ) ;;
19944   *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
19945  ;;
19946 esac
19947
19948 fi
19949 # check after getaddrinfo for its libraries
19950
19951 # check ioctlsocket
19952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
19953 $as_echo_n "checking for ioctlsocket... " >&6; }
19954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19955 /* end confdefs.h.  */
19956
19957 #ifdef HAVE_WINSOCK2_H
19958 #include <winsock2.h>
19959 #endif
19960
19961 int
19962 main ()
19963 {
19964
19965         (void)ioctlsocket(0, 0, NULL);
19966
19967   ;
19968   return 0;
19969 }
19970 _ACEOF
19971 if ac_fn_c_try_link "$LINENO"; then :
19972
19973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19974 $as_echo "yes" >&6; }
19975
19976 $as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
19977
19978
19979 else
19980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19981 $as_echo "no" >&6; }
19982 fi
19983 rm -f core conftest.err conftest.$ac_objext \
19984     conftest$ac_exeext conftest.$ac_ext
19985
19986
19987 # see if daemon(3) exists, and if it is deprecated.
19988 for ac_func in daemon
19989 do :
19990   ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
19991 if test "x$ac_cv_func_daemon" = xyes; then :
19992   cat >>confdefs.h <<_ACEOF
19993 #define HAVE_DAEMON 1
19994 _ACEOF
19995
19996 fi
19997 done
19998
19999 if test $ac_cv_func_daemon = yes; then
20000
20001
20002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
20003 $as_echo_n "checking if daemon is deprecated... " >&6; }
20004 cache=`echo daemon | sed 'y%.=/+-%___p_%'`
20005 if eval \${cv_cc_deprecated_$cache+:} false; then :
20006   $as_echo_n "(cached) " >&6
20007 else
20008
20009 echo '
20010 #include <stdlib.h>
20011 ' >conftest.c
20012 echo 'void f(){ (void)daemon(0, 0); }' >>conftest.c
20013 if test -z "`$CC -c conftest.c 2>&1 | grep deprecated`"; then
20014 eval "cv_cc_deprecated_$cache=no"
20015 else
20016 eval "cv_cc_deprecated_$cache=yes"
20017 fi
20018 rm -f conftest conftest.o conftest.c
20019
20020 fi
20021
20022 if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
20023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20024 $as_echo "yes" >&6; }
20025
20026 cat >>confdefs.h <<_ACEOF
20027 #define DEPRECATED_DAEMON 1
20028 _ACEOF
20029
20030 :
20031
20032 else
20033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20034 $as_echo "no" >&6; }
20035 :
20036
20037 fi
20038
20039 fi
20040
20041 ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
20042 $ac_includes_default
20043 #ifdef HAVE_SYS_UN_H
20044 #include <sys/un.h>
20045 #endif
20046
20047 "
20048 if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
20049
20050 cat >>confdefs.h <<_ACEOF
20051 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
20052 _ACEOF
20053
20054
20055 fi
20056
20057 ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
20058 $ac_includes_default
20059 #if HAVE_SYS_PARAM_H
20060 #include <sys/param.h>
20061 #endif
20062
20063 #ifdef HAVE_SYS_SOCKET_H
20064 #include <sys/socket.h>
20065 #endif
20066
20067 #ifdef HAVE_SYS_UIO_H
20068 #include <sys/uio.h>
20069 #endif
20070
20071 #ifdef HAVE_NETINET_IN_H
20072 #include <netinet/in.h>
20073 #endif
20074
20075 #ifdef HAVE_NETINET_TCP_H
20076 #include <netinet/tcp.h>
20077 #endif
20078
20079 #ifdef HAVE_ARPA_INET_H
20080 #include <arpa/inet.h>
20081 #endif
20082
20083 #ifdef HAVE_WINSOCK2_H
20084 #include <winsock2.h>
20085 #endif
20086
20087 #ifdef HAVE_WS2TCPIP_H
20088 #include <ws2tcpip.h>
20089 #endif
20090
20091 "
20092 if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
20093
20094 cat >>confdefs.h <<_ACEOF
20095 #define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
20096 _ACEOF
20097
20098
20099 fi
20100
20101
20102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htobe64" >&5
20103 $as_echo_n "checking for htobe64... " >&6; }
20104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20105 /* end confdefs.h.  */
20106
20107 #include <stdio.h>
20108 #ifdef HAVE_ENDIAN_H
20109 #  include <endian.h>
20110 #endif
20111 #ifdef HAVE_SYS_ENDIAN_H
20112 #  include <sys/endian.h>
20113 #endif
20114
20115 int
20116 main ()
20117 {
20118 unsigned long long x = htobe64(0); printf("%u", (unsigned)x);
20119   ;
20120   return 0;
20121 }
20122 _ACEOF
20123 if ac_fn_c_try_link "$LINENO"; then :
20124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20125 $as_echo "yes" >&6; }
20126
20127 $as_echo "#define HAVE_HTOBE64 1" >>confdefs.h
20128
20129 else
20130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20131 $as_echo "no" >&6; }
20132 fi
20133 rm -f core conftest.err conftest.$ac_objext \
20134     conftest$ac_exeext conftest.$ac_ext
20135
20136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for be64toh" >&5
20137 $as_echo_n "checking for be64toh... " >&6; }
20138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20139 /* end confdefs.h.  */
20140
20141 #include <stdio.h>
20142 #ifdef HAVE_ENDIAN_H
20143 #  include <endian.h>
20144 #endif
20145 #ifdef HAVE_SYS_ENDIAN_H
20146 #  include <sys/endian.h>
20147 #endif
20148
20149 int
20150 main ()
20151 {
20152 unsigned long long x = be64toh(0); printf("%u", (unsigned)x);
20153   ;
20154   return 0;
20155 }
20156 _ACEOF
20157 if ac_fn_c_try_link "$LINENO"; then :
20158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20159 $as_echo "yes" >&6; }
20160
20161 $as_echo "#define HAVE_BE64TOH 1" >>confdefs.h
20162
20163 else
20164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20165 $as_echo "no" >&6; }
20166 fi
20167 rm -f core conftest.err conftest.$ac_objext \
20168     conftest$ac_exeext conftest.$ac_ext
20169
20170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
20171 $as_echo_n "checking for library containing setusercontext... " >&6; }
20172 if ${ac_cv_search_setusercontext+:} false; then :
20173   $as_echo_n "(cached) " >&6
20174 else
20175   ac_func_search_save_LIBS=$LIBS
20176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20177 /* end confdefs.h.  */
20178
20179 /* Override any GCC internal prototype to avoid an error.
20180    Use char because int might match the return type of a GCC
20181    builtin and then its argument prototype would still apply.  */
20182 #ifdef __cplusplus
20183 extern "C"
20184 #endif
20185 char setusercontext ();
20186 int
20187 main ()
20188 {
20189 return setusercontext ();
20190   ;
20191   return 0;
20192 }
20193 _ACEOF
20194 for ac_lib in '' util; do
20195   if test -z "$ac_lib"; then
20196     ac_res="none required"
20197   else
20198     ac_res=-l$ac_lib
20199     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20200   fi
20201   if ac_fn_c_try_link "$LINENO"; then :
20202   ac_cv_search_setusercontext=$ac_res
20203 fi
20204 rm -f core conftest.err conftest.$ac_objext \
20205     conftest$ac_exeext
20206   if ${ac_cv_search_setusercontext+:} false; then :
20207   break
20208 fi
20209 done
20210 if ${ac_cv_search_setusercontext+:} false; then :
20211
20212 else
20213   ac_cv_search_setusercontext=no
20214 fi
20215 rm conftest.$ac_ext
20216 LIBS=$ac_func_search_save_LIBS
20217 fi
20218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
20219 $as_echo "$ac_cv_search_setusercontext" >&6; }
20220 ac_res=$ac_cv_search_setusercontext
20221 if test "$ac_res" != no; then :
20222   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20223
20224 fi
20225
20226 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
20227 do :
20228   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20229 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20230 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20231   cat >>confdefs.h <<_ACEOF
20232 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20233 _ACEOF
20234
20235 fi
20236 done
20237
20238 for ac_func in setresuid
20239 do :
20240   ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
20241 if test "x$ac_cv_func_setresuid" = xyes; then :
20242   cat >>confdefs.h <<_ACEOF
20243 #define HAVE_SETRESUID 1
20244 _ACEOF
20245
20246 else
20247   for ac_func in setreuid
20248 do :
20249   ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
20250 if test "x$ac_cv_func_setreuid" = xyes; then :
20251   cat >>confdefs.h <<_ACEOF
20252 #define HAVE_SETREUID 1
20253 _ACEOF
20254
20255 fi
20256 done
20257
20258 fi
20259 done
20260
20261 for ac_func in setresgid
20262 do :
20263   ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
20264 if test "x$ac_cv_func_setresgid" = xyes; then :
20265   cat >>confdefs.h <<_ACEOF
20266 #define HAVE_SETRESGID 1
20267 _ACEOF
20268
20269 else
20270   for ac_func in setregid
20271 do :
20272   ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
20273 if test "x$ac_cv_func_setregid" = xyes; then :
20274   cat >>confdefs.h <<_ACEOF
20275 #define HAVE_SETREGID 1
20276 _ACEOF
20277
20278 fi
20279 done
20280
20281 fi
20282 done
20283
20284
20285 # check if setreuid en setregid fail, on MacOSX10.4(darwin8).
20286 if echo $target_os | grep darwin8 > /dev/null; then
20287
20288 $as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
20289
20290 fi
20291 ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
20292 $ac_includes_default
20293 #ifdef HAVE_NETINET_IN_H
20294 #include <netinet/in.h>
20295 #endif
20296
20297 #ifdef HAVE_NETINET_TCP_H
20298 #include <netinet/tcp.h>
20299 #endif
20300
20301 #ifdef HAVE_ARPA_INET_H
20302 #include <arpa/inet.h>
20303 #endif
20304
20305 #ifdef HAVE_WINSOCK2_H
20306 #include <winsock2.h>
20307 #endif
20308
20309 #ifdef HAVE_WS2TCPIP_H
20310 #include <ws2tcpip.h>
20311 #endif
20312
20313 "
20314 if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
20315   ac_have_decl=1
20316 else
20317   ac_have_decl=0
20318 fi
20319
20320 cat >>confdefs.h <<_ACEOF
20321 #define HAVE_DECL_INET_PTON $ac_have_decl
20322 _ACEOF
20323 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
20324 $ac_includes_default
20325 #ifdef HAVE_NETINET_IN_H
20326 #include <netinet/in.h>
20327 #endif
20328
20329 #ifdef HAVE_NETINET_TCP_H
20330 #include <netinet/tcp.h>
20331 #endif
20332
20333 #ifdef HAVE_ARPA_INET_H
20334 #include <arpa/inet.h>
20335 #endif
20336
20337 #ifdef HAVE_WINSOCK2_H
20338 #include <winsock2.h>
20339 #endif
20340
20341 #ifdef HAVE_WS2TCPIP_H
20342 #include <ws2tcpip.h>
20343 #endif
20344
20345 "
20346 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20347   ac_have_decl=1
20348 else
20349   ac_have_decl=0
20350 fi
20351
20352 cat >>confdefs.h <<_ACEOF
20353 #define HAVE_DECL_INET_NTOP $ac_have_decl
20354 _ACEOF
20355
20356 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
20357 if test "x$ac_cv_func_inet_aton" = xyes; then :
20358   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
20359
20360 else
20361   case " $LIBOBJS " in
20362   *" inet_aton.$ac_objext "* ) ;;
20363   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
20364  ;;
20365 esac
20366
20367 fi
20368
20369
20370 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
20371 if test "x$ac_cv_func_inet_pton" = xyes; then :
20372   $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
20373
20374 else
20375   case " $LIBOBJS " in
20376   *" inet_pton.$ac_objext "* ) ;;
20377   *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
20378  ;;
20379 esac
20380
20381 fi
20382
20383
20384 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
20385 if test "x$ac_cv_func_inet_ntop" = xyes; then :
20386   $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
20387
20388 else
20389   case " $LIBOBJS " in
20390   *" inet_ntop.$ac_objext "* ) ;;
20391   *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
20392  ;;
20393 esac
20394
20395 fi
20396
20397
20398 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
20399 if test "x$ac_cv_func_snprintf" = xyes; then :
20400   $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
20401
20402 else
20403   case " $LIBOBJS " in
20404   *" snprintf.$ac_objext "* ) ;;
20405   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
20406  ;;
20407 esac
20408
20409 fi
20410
20411
20412 # test if snprintf return the proper length
20413 if test "x$ac_cv_func_snprintf" = xyes; then
20414     if test c${cross_compiling} = cno; then
20415         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
20416 $as_echo_n "checking for correct snprintf return value... " >&6; }
20417         if test "$cross_compiling" = yes; then :
20418   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20419 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20420 as_fn_error $? "cannot run test program while cross compiling
20421 See \`config.log' for more details" "$LINENO" 5; }
20422 else
20423   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20424 /* end confdefs.h.  */
20425 $ac_includes_default
20426
20427 int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
20428
20429 _ACEOF
20430 if ac_fn_c_try_run "$LINENO"; then :
20431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20432 $as_echo "yes" >&6; }
20433 else
20434
20435                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20436 $as_echo "no" >&6; }
20437
20438 $as_echo "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
20439
20440                 case " $LIBOBJS " in
20441   *" snprintf.$ac_objext "* ) ;;
20442   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
20443  ;;
20444 esac
20445
20446
20447 fi
20448 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20449   conftest.$ac_objext conftest.beam conftest.$ac_ext
20450 fi
20451
20452     fi
20453 fi
20454 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
20455 if test "x$ac_cv_func_strlcat" = xyes; then :
20456   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
20457
20458 else
20459   case " $LIBOBJS " in
20460   *" strlcat.$ac_objext "* ) ;;
20461   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
20462  ;;
20463 esac
20464
20465 fi
20466
20467
20468 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
20469 if test "x$ac_cv_func_strlcpy" = xyes; then :
20470   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
20471
20472 else
20473   case " $LIBOBJS " in
20474   *" strlcpy.$ac_objext "* ) ;;
20475   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
20476  ;;
20477 esac
20478
20479 fi
20480
20481
20482 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
20483 if test "x$ac_cv_func_memmove" = xyes; then :
20484   $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
20485
20486 else
20487   case " $LIBOBJS " in
20488   *" memmove.$ac_objext "* ) ;;
20489   *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
20490  ;;
20491 esac
20492
20493 fi
20494
20495
20496 ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
20497 if test "x$ac_cv_func_gmtime_r" = xyes; then :
20498   $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
20499
20500 else
20501   case " $LIBOBJS " in
20502   *" gmtime_r.$ac_objext "* ) ;;
20503   *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
20504  ;;
20505 esac
20506
20507 fi
20508
20509
20510 ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
20511 if test "x$ac_cv_func_isblank" = xyes; then :
20512   $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
20513
20514 else
20515   case " $LIBOBJS " in
20516   *" isblank.$ac_objext "* ) ;;
20517   *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
20518  ;;
20519 esac
20520
20521 fi
20522
20523
20524 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
20525 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
20526   $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
20527
20528 else
20529   case " $LIBOBJS " in
20530   *" explicit_bzero.$ac_objext "* ) ;;
20531   *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
20532  ;;
20533 esac
20534
20535 fi
20536
20537
20538 LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
20539
20540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
20541 $as_echo_n "checking for reallocarray... " >&6; }
20542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20543 /* end confdefs.h.  */
20544 $ac_includes_default
20545
20546 #ifndef _OPENBSD_SOURCE
20547 #define _OPENBSD_SOURCE 1
20548 #endif
20549 #include <stdlib.h>
20550 int main(void) {
20551         void* p = reallocarray(NULL, 10, 100);
20552         free(p);
20553         return 0;
20554 }
20555
20556 _ACEOF
20557 if ac_fn_c_try_link "$LINENO"; then :
20558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20559 $as_echo "yes" >&6; }
20560
20561 $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
20562
20563
20564 else
20565
20566         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20567 $as_echo "no" >&6; }
20568         case " $LIBOBJS " in
20569   *" reallocarray.$ac_objext "* ) ;;
20570   *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
20571  ;;
20572 esac
20573
20574
20575 fi
20576 rm -f core conftest.err conftest.$ac_objext \
20577     conftest$ac_exeext conftest.$ac_ext
20578 ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
20579 if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
20580   ac_have_decl=1
20581 else
20582   ac_have_decl=0
20583 fi
20584
20585 cat >>confdefs.h <<_ACEOF
20586 #define HAVE_DECL_REALLOCARRAY $ac_have_decl
20587 _ACEOF
20588
20589 if test "$USE_NSS" = "no"; then
20590         ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
20591 if test "x$ac_cv_func_arc4random" = xyes; then :
20592   $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
20593
20594 else
20595   case " $LIBOBJS " in
20596   *" arc4random.$ac_objext "* ) ;;
20597   *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
20598  ;;
20599 esac
20600
20601 fi
20602
20603
20604         ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
20605 if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
20606   $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
20607
20608 else
20609   case " $LIBOBJS " in
20610   *" arc4random_uniform.$ac_objext "* ) ;;
20611   *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
20612  ;;
20613 esac
20614
20615 fi
20616
20617
20618         if test "$ac_cv_func_arc4random" = "no"; then
20619                 case " $LIBOBJS " in
20620   *" arc4_lock.$ac_objext "* ) ;;
20621   *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
20622  ;;
20623 esac
20624
20625                 for ac_func in getentropy
20626 do :
20627   ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
20628 if test "x$ac_cv_func_getentropy" = xyes; then :
20629   cat >>confdefs.h <<_ACEOF
20630 #define HAVE_GETENTROPY 1
20631 _ACEOF
20632
20633 else
20634
20635                     if test "$USE_WINSOCK" = 1; then
20636                         case " $LIBOBJS " in
20637   *" getentropy_win.$ac_objext "* ) ;;
20638   *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
20639  ;;
20640 esac
20641
20642                     else
20643                         case "$host" in
20644                         Darwin|*darwin*)
20645                                 case " $LIBOBJS " in
20646   *" getentropy_osx.$ac_objext "* ) ;;
20647   *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
20648  ;;
20649 esac
20650
20651                         ;;
20652                         *solaris*|*sunos*|SunOS)
20653                                 case " $LIBOBJS " in
20654   *" getentropy_solaris.$ac_objext "* ) ;;
20655   *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
20656  ;;
20657 esac
20658
20659                                 for ac_header in sys/sha2.h
20660 do :
20661   ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
20662 "
20663 if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
20664   cat >>confdefs.h <<_ACEOF
20665 #define HAVE_SYS_SHA2_H 1
20666 _ACEOF
20667
20668 else
20669
20670                                         for ac_func in SHA512_Update
20671 do :
20672   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20673 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20674   cat >>confdefs.h <<_ACEOF
20675 #define HAVE_SHA512_UPDATE 1
20676 _ACEOF
20677
20678 else
20679
20680                                                 case " $LIBOBJS " in
20681   *" sha512.$ac_objext "* ) ;;
20682   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20683  ;;
20684 esac
20685
20686
20687 fi
20688 done
20689
20690
20691 fi
20692
20693 done
20694
20695                                 if test "$ac_cv_header_sys_sha2_h" = "yes"; then
20696                                         # this lib needed for sha2 on solaris
20697                                         LIBS="$LIBS -lmd"
20698                                 fi
20699                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20700 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20701 if ${ac_cv_search_clock_gettime+:} false; then :
20702   $as_echo_n "(cached) " >&6
20703 else
20704   ac_func_search_save_LIBS=$LIBS
20705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20706 /* end confdefs.h.  */
20707
20708 /* Override any GCC internal prototype to avoid an error.
20709    Use char because int might match the return type of a GCC
20710    builtin and then its argument prototype would still apply.  */
20711 #ifdef __cplusplus
20712 extern "C"
20713 #endif
20714 char clock_gettime ();
20715 int
20716 main ()
20717 {
20718 return clock_gettime ();
20719   ;
20720   return 0;
20721 }
20722 _ACEOF
20723 for ac_lib in '' rt; do
20724   if test -z "$ac_lib"; then
20725     ac_res="none required"
20726   else
20727     ac_res=-l$ac_lib
20728     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20729   fi
20730   if ac_fn_c_try_link "$LINENO"; then :
20731   ac_cv_search_clock_gettime=$ac_res
20732 fi
20733 rm -f core conftest.err conftest.$ac_objext \
20734     conftest$ac_exeext
20735   if ${ac_cv_search_clock_gettime+:} false; then :
20736   break
20737 fi
20738 done
20739 if ${ac_cv_search_clock_gettime+:} false; then :
20740
20741 else
20742   ac_cv_search_clock_gettime=no
20743 fi
20744 rm conftest.$ac_ext
20745 LIBS=$ac_func_search_save_LIBS
20746 fi
20747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20748 $as_echo "$ac_cv_search_clock_gettime" >&6; }
20749 ac_res=$ac_cv_search_clock_gettime
20750 if test "$ac_res" != no; then :
20751   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20752
20753 fi
20754
20755                         ;;
20756                         *freebsd*|*FreeBSD)
20757                                 case " $LIBOBJS " in
20758   *" getentropy_freebsd.$ac_objext "* ) ;;
20759   *) LIBOBJS="$LIBOBJS getentropy_freebsd.$ac_objext"
20760  ;;
20761 esac
20762
20763                         ;;
20764                         *linux*|Linux|*)
20765                                 case " $LIBOBJS " in
20766   *" getentropy_linux.$ac_objext "* ) ;;
20767   *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
20768  ;;
20769 esac
20770
20771                                 for ac_func in SHA512_Update
20772 do :
20773   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20774 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20775   cat >>confdefs.h <<_ACEOF
20776 #define HAVE_SHA512_UPDATE 1
20777 _ACEOF
20778
20779 else
20780
20781
20782 $as_echo "#define COMPAT_SHA512 1" >>confdefs.h
20783
20784                                         case " $LIBOBJS " in
20785   *" sha512.$ac_objext "* ) ;;
20786   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20787  ;;
20788 esac
20789
20790
20791 fi
20792 done
20793
20794                                 for ac_header in sys/sysctl.h
20795 do :
20796   ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
20797 "
20798 if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
20799   cat >>confdefs.h <<_ACEOF
20800 #define HAVE_SYS_SYSCTL_H 1
20801 _ACEOF
20802
20803 fi
20804
20805 done
20806
20807                                 for ac_func in getauxval
20808 do :
20809   ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
20810 if test "x$ac_cv_func_getauxval" = xyes; then :
20811   cat >>confdefs.h <<_ACEOF
20812 #define HAVE_GETAUXVAL 1
20813 _ACEOF
20814
20815 fi
20816 done
20817
20818                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20819 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20820 if ${ac_cv_search_clock_gettime+:} false; then :
20821   $as_echo_n "(cached) " >&6
20822 else
20823   ac_func_search_save_LIBS=$LIBS
20824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20825 /* end confdefs.h.  */
20826
20827 /* Override any GCC internal prototype to avoid an error.
20828    Use char because int might match the return type of a GCC
20829    builtin and then its argument prototype would still apply.  */
20830 #ifdef __cplusplus
20831 extern "C"
20832 #endif
20833 char clock_gettime ();
20834 int
20835 main ()
20836 {
20837 return clock_gettime ();
20838   ;
20839   return 0;
20840 }
20841 _ACEOF
20842 for ac_lib in '' rt; do
20843   if test -z "$ac_lib"; then
20844     ac_res="none required"
20845   else
20846     ac_res=-l$ac_lib
20847     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20848   fi
20849   if ac_fn_c_try_link "$LINENO"; then :
20850   ac_cv_search_clock_gettime=$ac_res
20851 fi
20852 rm -f core conftest.err conftest.$ac_objext \
20853     conftest$ac_exeext
20854   if ${ac_cv_search_clock_gettime+:} false; then :
20855   break
20856 fi
20857 done
20858 if ${ac_cv_search_clock_gettime+:} false; then :
20859
20860 else
20861   ac_cv_search_clock_gettime=no
20862 fi
20863 rm conftest.$ac_ext
20864 LIBS=$ac_func_search_save_LIBS
20865 fi
20866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20867 $as_echo "$ac_cv_search_clock_gettime" >&6; }
20868 ac_res=$ac_cv_search_clock_gettime
20869 if test "$ac_res" != no; then :
20870   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20871
20872 fi
20873
20874                         ;;
20875                         esac
20876                     fi
20877
20878 fi
20879 done
20880
20881         fi
20882 fi
20883 LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
20884
20885 ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
20886 if test "x$ac_cv_func_ctime_r" = xyes; then :
20887   $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
20888
20889 else
20890   case " $LIBOBJS " in
20891   *" ctime_r.$ac_objext "* ) ;;
20892   *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
20893  ;;
20894 esac
20895
20896 fi
20897
20898
20899 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
20900 if test "x$ac_cv_func_strsep" = xyes; then :
20901   $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
20902
20903 else
20904   case " $LIBOBJS " in
20905   *" strsep.$ac_objext "* ) ;;
20906   *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
20907  ;;
20908 esac
20909
20910 fi
20911
20912
20913
20914 # Check whether --enable-allsymbols was given.
20915 if test "${enable_allsymbols+set}" = set; then :
20916   enableval=$enable_allsymbols;
20917 fi
20918
20919 case "$enable_allsymbols" in
20920         yes)
20921         COMMON_OBJ_ALL_SYMBOLS=""
20922         UBSYMS=""
20923         EXTRALINK="-L. -L.libs -lunbound"
20924
20925 $as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
20926
20927         ;;
20928         no|*)
20929         COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
20930         UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
20931         EXTRALINK=""
20932         ;;
20933 esac
20934
20935
20936
20937 if test x_$enable_lock_checks = x_yes; then
20938         UBSYMS="-export-symbols clubsyms.def"
20939         cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
20940         echo lock_protect >> clubsyms.def
20941         echo lock_unprotect >> clubsyms.def
20942         echo lock_get_mem >> clubsyms.def
20943         echo checklock_start >> clubsyms.def
20944         echo checklock_stop >> clubsyms.def
20945         echo checklock_lock >> clubsyms.def
20946         echo checklock_unlock >> clubsyms.def
20947         echo checklock_init >> clubsyms.def
20948         echo checklock_thrcreate >> clubsyms.def
20949         echo checklock_thrjoin >> clubsyms.def
20950 fi
20951
20952 # check for dnstap if requested
20953
20954   # Check whether --enable-dnstap was given.
20955 if test "${enable_dnstap+set}" = set; then :
20956   enableval=$enable_dnstap; opt_dnstap=$enableval
20957 else
20958   opt_dnstap=no
20959 fi
20960
20961
20962
20963 # Check whether --with-dnstap-socket-path was given.
20964 if test "${with_dnstap_socket_path+set}" = set; then :
20965   withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
20966 else
20967   opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
20968 fi
20969
20970
20971   if test "x$opt_dnstap" != "xno"; then
20972     # Extract the first word of "protoc-c", so it can be a program name with args.
20973 set dummy protoc-c; ac_word=$2
20974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20975 $as_echo_n "checking for $ac_word... " >&6; }
20976 if ${ac_cv_path_PROTOC_C+:} false; then :
20977   $as_echo_n "(cached) " >&6
20978 else
20979   case $PROTOC_C in
20980   [\\/]* | ?:[\\/]*)
20981   ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
20982   ;;
20983   *)
20984   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20985 for as_dir in $PATH
20986 do
20987   IFS=$as_save_IFS
20988   test -z "$as_dir" && as_dir=.
20989     for ac_exec_ext in '' $ac_executable_extensions; do
20990   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20991     ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
20992     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20993     break 2
20994   fi
20995 done
20996   done
20997 IFS=$as_save_IFS
20998
20999   ;;
21000 esac
21001 fi
21002 PROTOC_C=$ac_cv_path_PROTOC_C
21003 if test -n "$PROTOC_C"; then
21004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
21005 $as_echo "$PROTOC_C" >&6; }
21006 else
21007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21008 $as_echo "no" >&6; }
21009 fi
21010
21011
21012     if test -z "$PROTOC_C"; then
21013       as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
21014     fi
21015
21016 # Check whether --with-protobuf-c was given.
21017 if test "${with_protobuf_c+set}" = set; then :
21018   withval=$with_protobuf_c;
21019           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
21020           if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
21021             CFLAGS="$CFLAGS -I$withval/include/google"
21022           else
21023             CFLAGS="$CFLAGS -I$withval/include"
21024           fi
21025           LDFLAGS="$LDFLAGS -L$withval/lib"
21026
21027 else
21028
21029           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
21030           if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
21031             CFLAGS="$CFLAGS -I/usr/include/google"
21032           else
21033             if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
21034               CFLAGS="$CFLAGS -I/usr/local/include/google"
21035               LDFLAGS="$LDFLAGS -L/usr/local/lib"
21036             fi
21037           fi
21038
21039 fi
21040
21041     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
21042 $as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
21043 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21044   $as_echo_n "(cached) " >&6
21045 else
21046   ac_func_search_save_LIBS=$LIBS
21047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21048 /* end confdefs.h.  */
21049
21050 /* Override any GCC internal prototype to avoid an error.
21051    Use char because int might match the return type of a GCC
21052    builtin and then its argument prototype would still apply.  */
21053 #ifdef __cplusplus
21054 extern "C"
21055 #endif
21056 char protobuf_c_message_pack ();
21057 int
21058 main ()
21059 {
21060 return protobuf_c_message_pack ();
21061   ;
21062   return 0;
21063 }
21064 _ACEOF
21065 for ac_lib in '' protobuf-c; do
21066   if test -z "$ac_lib"; then
21067     ac_res="none required"
21068   else
21069     ac_res=-l$ac_lib
21070     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21071   fi
21072   if ac_fn_c_try_link "$LINENO"; then :
21073   ac_cv_search_protobuf_c_message_pack=$ac_res
21074 fi
21075 rm -f core conftest.err conftest.$ac_objext \
21076     conftest$ac_exeext
21077   if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21078   break
21079 fi
21080 done
21081 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21082
21083 else
21084   ac_cv_search_protobuf_c_message_pack=no
21085 fi
21086 rm conftest.$ac_ext
21087 LIBS=$ac_func_search_save_LIBS
21088 fi
21089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
21090 $as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
21091 ac_res=$ac_cv_search_protobuf_c_message_pack
21092 if test "$ac_res" != no; then :
21093   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21094
21095 else
21096   as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
21097 fi
21098
21099
21100
21101 $as_echo "#define USE_DNSTAP 1" >>confdefs.h
21102
21103         ENABLE_DNSTAP=1
21104
21105
21106
21107         hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
21108
21109
21110 cat >>confdefs.h <<_ACEOF
21111 #define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
21112 _ACEOF
21113
21114         DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path"
21115
21116
21117         DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"
21118
21119         DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"
21120
21121
21122   else
21123
21124         ENABLE_DNSTAP=0
21125
21126
21127
21128   fi
21129
21130
21131 # check for dnscrypt if requested
21132
21133   # Check whether --enable-dnscrypt was given.
21134 if test "${enable_dnscrypt+set}" = set; then :
21135   enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
21136 else
21137   opt_dnscrypt=no
21138 fi
21139
21140
21141   if test "x$opt_dnscrypt" != "xno"; then
21142
21143 # Check whether --with-libsodium was given.
21144 if test "${with_libsodium+set}" = set; then :
21145   withval=$with_libsodium;
21146         CFLAGS="$CFLAGS -I$withval/include"
21147         LDFLAGS="$LDFLAGS -L$withval/lib"
21148
21149 fi
21150
21151     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
21152 $as_echo_n "checking for library containing sodium_init... " >&6; }
21153 if ${ac_cv_search_sodium_init+:} false; then :
21154   $as_echo_n "(cached) " >&6
21155 else
21156   ac_func_search_save_LIBS=$LIBS
21157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21158 /* end confdefs.h.  */
21159
21160 /* Override any GCC internal prototype to avoid an error.
21161    Use char because int might match the return type of a GCC
21162    builtin and then its argument prototype would still apply.  */
21163 #ifdef __cplusplus
21164 extern "C"
21165 #endif
21166 char sodium_init ();
21167 int
21168 main ()
21169 {
21170 return sodium_init ();
21171   ;
21172   return 0;
21173 }
21174 _ACEOF
21175 for ac_lib in '' sodium; do
21176   if test -z "$ac_lib"; then
21177     ac_res="none required"
21178   else
21179     ac_res=-l$ac_lib
21180     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21181   fi
21182   if ac_fn_c_try_link "$LINENO"; then :
21183   ac_cv_search_sodium_init=$ac_res
21184 fi
21185 rm -f core conftest.err conftest.$ac_objext \
21186     conftest$ac_exeext
21187   if ${ac_cv_search_sodium_init+:} false; then :
21188   break
21189 fi
21190 done
21191 if ${ac_cv_search_sodium_init+:} false; then :
21192
21193 else
21194   ac_cv_search_sodium_init=no
21195 fi
21196 rm conftest.$ac_ext
21197 LIBS=$ac_func_search_save_LIBS
21198 fi
21199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
21200 $as_echo "$ac_cv_search_sodium_init" >&6; }
21201 ac_res=$ac_cv_search_sodium_init
21202 if test "$ac_res" != no; then :
21203   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21204
21205 else
21206   as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
21207 fi
21208
21209     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
21210 $as_echo_n "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
21211 if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21212   $as_echo_n "(cached) " >&6
21213 else
21214   ac_func_search_save_LIBS=$LIBS
21215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21216 /* end confdefs.h.  */
21217
21218 /* Override any GCC internal prototype to avoid an error.
21219    Use char because int might match the return type of a GCC
21220    builtin and then its argument prototype would still apply.  */
21221 #ifdef __cplusplus
21222 extern "C"
21223 #endif
21224 char crypto_box_curve25519xchacha20poly1305_beforenm ();
21225 int
21226 main ()
21227 {
21228 return crypto_box_curve25519xchacha20poly1305_beforenm ();
21229   ;
21230   return 0;
21231 }
21232 _ACEOF
21233 for ac_lib in '' sodium; do
21234   if test -z "$ac_lib"; then
21235     ac_res="none required"
21236   else
21237     ac_res=-l$ac_lib
21238     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21239   fi
21240   if ac_fn_c_try_link "$LINENO"; then :
21241   ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
21242 fi
21243 rm -f core conftest.err conftest.$ac_objext \
21244     conftest$ac_exeext
21245   if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21246   break
21247 fi
21248 done
21249 if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21250
21251 else
21252   ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
21253 fi
21254 rm conftest.$ac_ext
21255 LIBS=$ac_func_search_save_LIBS
21256 fi
21257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
21258 $as_echo "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
21259 ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
21260 if test "$ac_res" != no; then :
21261   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21262
21263             ENABLE_DNSCRYPT_XCHACHA20=1
21264
21265
21266 $as_echo "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
21267
21268
21269 else
21270
21271             ENABLE_DNSCRYPT_XCHACHA20=0
21272
21273
21274 fi
21275
21276     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
21277 $as_echo_n "checking for library containing sodium_set_misuse_handler... " >&6; }
21278 if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21279   $as_echo_n "(cached) " >&6
21280 else
21281   ac_func_search_save_LIBS=$LIBS
21282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21283 /* end confdefs.h.  */
21284
21285 /* Override any GCC internal prototype to avoid an error.
21286    Use char because int might match the return type of a GCC
21287    builtin and then its argument prototype would still apply.  */
21288 #ifdef __cplusplus
21289 extern "C"
21290 #endif
21291 char sodium_set_misuse_handler ();
21292 int
21293 main ()
21294 {
21295 return sodium_set_misuse_handler ();
21296   ;
21297   return 0;
21298 }
21299 _ACEOF
21300 for ac_lib in '' sodium; do
21301   if test -z "$ac_lib"; then
21302     ac_res="none required"
21303   else
21304     ac_res=-l$ac_lib
21305     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21306   fi
21307   if ac_fn_c_try_link "$LINENO"; then :
21308   ac_cv_search_sodium_set_misuse_handler=$ac_res
21309 fi
21310 rm -f core conftest.err conftest.$ac_objext \
21311     conftest$ac_exeext
21312   if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21313   break
21314 fi
21315 done
21316 if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21317
21318 else
21319   ac_cv_search_sodium_set_misuse_handler=no
21320 fi
21321 rm conftest.$ac_ext
21322 LIBS=$ac_func_search_save_LIBS
21323 fi
21324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
21325 $as_echo "$ac_cv_search_sodium_set_misuse_handler" >&6; }
21326 ac_res=$ac_cv_search_sodium_set_misuse_handler
21327 if test "$ac_res" != no; then :
21328   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21329
21330
21331 $as_echo "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
21332
21333
21334 fi
21335
21336
21337
21338 $as_echo "#define USE_DNSCRYPT 1" >>confdefs.h
21339
21340         ENABLE_DNSCRYPT=1
21341
21342
21343         DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
21344
21345         DNSCRYPT_OBJ="dnscrypt.lo"
21346
21347
21348   else
21349     ENABLE_DNSCRYPT_XCHACHA20=0
21350
21351
21352         ENABLE_DNSCRYPT=0
21353
21354
21355
21356   fi
21357
21358
21359 # check for cachedb if requested
21360 # Check whether --enable-cachedb was given.
21361 if test "${enable_cachedb+set}" = set; then :
21362   enableval=$enable_cachedb;
21363 fi
21364
21365 # turn on cachedb when hiredis support is enabled.
21366 if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
21367 case "$enable_cachedb" in
21368     yes)
21369
21370 $as_echo "#define USE_CACHEDB 1" >>confdefs.h
21371
21372         ;;
21373     no|*)
21374         # nothing
21375         ;;
21376 esac
21377
21378 # check for ipsecmod if requested
21379 # Check whether --enable-ipsecmod was given.
21380 if test "${enable_ipsecmod+set}" = set; then :
21381   enableval=$enable_ipsecmod;
21382 fi
21383
21384 case "$enable_ipsecmod" in
21385         yes)
21386
21387 $as_echo "#define USE_IPSECMOD 1" >>confdefs.h
21388
21389                 IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
21390
21391                 IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
21392
21393                 ;;
21394         no|*)
21395                 # nothing
21396                 ;;
21397 esac
21398
21399 # check for ipset if requested
21400 # Check whether --enable-ipset was given.
21401 if test "${enable_ipset+set}" = set; then :
21402   enableval=$enable_ipset;
21403 fi
21404
21405 case "$enable_ipset" in
21406     yes)
21407
21408 $as_echo "#define USE_IPSET 1" >>confdefs.h
21409
21410                 IPSET_SRC="ipset/ipset.c"
21411
21412                 IPSET_OBJ="ipset.lo"
21413
21414
21415                 # mnl
21416
21417 # Check whether --with-libmnl was given.
21418 if test "${with_libmnl+set}" = set; then :
21419   withval=$with_libmnl;
21420 else
21421    withval="yes"
21422 fi
21423
21424                 found_libmnl="no"
21425                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
21426 $as_echo_n "checking for libmnl... " >&6; }
21427                 if test x_$withval = x_ -o x_$withval = x_yes; then
21428                         withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
21429                 fi
21430                 for dir in $withval ; do
21431                         if test -f "$dir/include/libmnl/libmnl.h"; then
21432                                 found_libmnl="yes"
21433                                                                 if test "$dir" != "/usr"; then
21434                                         CPPFLAGS="$CPPFLAGS -I$dir/include"
21435                                         LDFLAGS="$LDFLAGS -L$dir/lib"
21436                                 fi
21437                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
21438 $as_echo "found in $dir" >&6; }
21439                                 LIBS="$LIBS -lmnl"
21440                                 break;
21441                         fi
21442                 done
21443                 if test x_$found_libmnl != x_yes; then
21444                         as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5
21445                 fi
21446                 ;;
21447     no|*)
21448         # nothing
21449                 ;;
21450 esac
21451 # Check whether --enable-explicit-port-randomisation was given.
21452 if test "${enable_explicit_port_randomisation+set}" = set; then :
21453   enableval=$enable_explicit_port_randomisation;
21454 fi
21455
21456 case "$enable_explicit_port_randomisation" in
21457         no)
21458
21459 $as_echo "#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1" >>confdefs.h
21460
21461                 ;;
21462         yes|*)
21463                 ;;
21464 esac
21465
21466
21467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
21468 $as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
21469 # on openBSD, the implicit rule make $< work.
21470 # on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
21471 # gmake works.
21472 cat >conftest.make <<EOF
21473 all:    conftest.lo
21474
21475 conftest.lo foo.lo bla.lo:
21476         if test -f "\$<"; then touch \$@; fi
21477
21478 .SUFFIXES: .lo
21479 .c.lo:
21480         if test -f "\$<"; then touch \$@; fi
21481
21482 conftest.lo:        conftest.dir/conftest.c
21483 EOF
21484 mkdir conftest.dir
21485 touch conftest.dir/conftest.c
21486 rm -f conftest.lo conftest.c
21487 ${MAKE:-make} -f conftest.make >/dev/null
21488 rm -f conftest.make conftest.c conftest.dir/conftest.c
21489 rm -rf conftest.dir
21490 if test ! -f conftest.lo; then
21491         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21492 $as_echo "no" >&6; }
21493         SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
21494         SOURCEFILE='`cat .source`'
21495 else
21496         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21497 $as_echo "yes" >&6; }
21498         SOURCEDETERMINE=':'
21499         SOURCEFILE='$<'
21500 fi
21501 rm -f conftest.lo
21502
21503
21504
21505 # see if we want to build the library or everything
21506 ALLTARGET="alltargets"
21507 INSTALLTARGET="install-all"
21508
21509 # Check whether --with-libunbound-only was given.
21510 if test "${with_libunbound_only+set}" = set; then :
21511   withval=$with_libunbound_only;
21512         if test "$withval" = "yes"; then
21513                 ALLTARGET="lib"
21514                 INSTALLTARGET="install-lib"
21515         fi
21516
21517 fi
21518
21519 if test $ALLTARGET = "alltargets"; then
21520         if test $USE_NSS = "yes"; then
21521                 as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
21522         fi
21523         if test $USE_NETTLE = "yes"; then
21524                 as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
21525         fi
21526 fi
21527
21528
21529
21530
21531
21532   { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
21533 $as_echo "$as_me: Stripping extension flags..." >&6;}
21534
21535   if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
21536     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
21537
21538 $as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
21539
21540   fi
21541
21542
21543   if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
21544     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
21545
21546 $as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
21547
21548   fi
21549
21550
21551   if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
21552     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
21553
21554 $as_echo "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
21555
21556   fi
21557
21558
21559   if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
21560     CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
21561
21562 $as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
21563
21564   fi
21565
21566
21567   if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
21568     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
21569
21570 $as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
21571
21572   fi
21573
21574
21575   if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
21576     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
21577
21578 $as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
21579
21580   fi
21581
21582
21583   if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
21584     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
21585
21586 $as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
21587
21588   fi
21589
21590
21591   if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
21592     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
21593
21594 $as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
21595
21596   fi
21597
21598
21599   if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
21600     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
21601
21602 $as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
21603
21604   fi
21605
21606
21607 if test -n "$LATE_LDFLAGS"; then
21608   LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
21609 fi
21610 # remove start spaces
21611 LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
21612 LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
21613
21614
21615 cat >>confdefs.h <<_ACEOF
21616 #define MAXSYSLOGMSGLEN 10240
21617 _ACEOF
21618
21619
21620
21621
21622 version=1.11.0
21623
21624 date=`date +'%b %e, %Y'`
21625
21626
21627 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"
21628
21629 ac_config_headers="$ac_config_headers config.h"
21630
21631 cat >confcache <<\_ACEOF
21632 # This file is a shell script that caches the results of configure
21633 # tests run on this system so they can be shared between configure
21634 # scripts and configure runs, see configure's option --config-cache.
21635 # It is not useful on other systems.  If it contains results you don't
21636 # want to keep, you may remove or edit it.
21637 #
21638 # config.status only pays attention to the cache file if you give it
21639 # the --recheck option to rerun configure.
21640 #
21641 # `ac_cv_env_foo' variables (set or unset) will be overridden when
21642 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21643 # following values.
21644
21645 _ACEOF
21646
21647 # The following way of writing the cache mishandles newlines in values,
21648 # but we know of no workaround that is simple, portable, and efficient.
21649 # So, we kill variables containing newlines.
21650 # Ultrix sh set writes to stderr and can't be redirected directly,
21651 # and sets the high bit in the cache file unless we assign to the vars.
21652 (
21653   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21654     eval ac_val=\$$ac_var
21655     case $ac_val in #(
21656     *${as_nl}*)
21657       case $ac_var in #(
21658       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
21659 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
21660       esac
21661       case $ac_var in #(
21662       _ | IFS | as_nl) ;; #(
21663       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
21664       *) { eval $ac_var=; unset $ac_var;} ;;
21665       esac ;;
21666     esac
21667   done
21668
21669   (set) 2>&1 |
21670     case $as_nl`(ac_space=' '; set) 2>&1` in #(
21671     *${as_nl}ac_space=\ *)
21672       # `set' does not quote correctly, so add quotes: double-quote
21673       # substitution turns \\\\ into \\, and sed turns \\ into \.
21674       sed -n \
21675         "s/'/'\\\\''/g;
21676           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21677       ;; #(
21678     *)
21679       # `set' quotes correctly as required by POSIX, so do not add quotes.
21680       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
21681       ;;
21682     esac |
21683     sort
21684 ) |
21685   sed '
21686      /^ac_cv_env_/b end
21687      t clear
21688      :clear
21689      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21690      t end
21691      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21692      :end' >>confcache
21693 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21694   if test -w "$cache_file"; then
21695     if test "x$cache_file" != "x/dev/null"; then
21696       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
21697 $as_echo "$as_me: updating cache $cache_file" >&6;}
21698       if test ! -f "$cache_file" || test -h "$cache_file"; then
21699         cat confcache >"$cache_file"
21700       else
21701         case $cache_file in #(
21702         */* | ?:*)
21703           mv -f confcache "$cache_file"$$ &&
21704           mv -f "$cache_file"$$ "$cache_file" ;; #(
21705         *)
21706           mv -f confcache "$cache_file" ;;
21707         esac
21708       fi
21709     fi
21710   else
21711     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
21712 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21713   fi
21714 fi
21715 rm -f confcache
21716
21717 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21718 # Let make expand exec_prefix.
21719 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21720
21721 DEFS=-DHAVE_CONFIG_H
21722
21723 ac_libobjs=
21724 ac_ltlibobjs=
21725 U=
21726 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21727   # 1. Remove the extension, and $U if already installed.
21728   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21729   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21730   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
21731   #    will be set to the directory where LIBOBJS objects are built.
21732   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21733   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
21734 done
21735 LIBOBJS=$ac_libobjs
21736
21737 LTLIBOBJS=$ac_ltlibobjs
21738
21739
21740 if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
21741   as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
21742 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21743 fi
21744
21745 : "${CONFIG_STATUS=./config.status}"
21746 ac_write_fail=0
21747 ac_clean_files_save=$ac_clean_files
21748 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21749 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
21750 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
21751 as_write_fail=0
21752 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
21753 #! $SHELL
21754 # Generated by $as_me.
21755 # Run this file to recreate the current configuration.
21756 # Compiler output produced by configure, useful for debugging
21757 # configure, is in config.log if it exists.
21758
21759 debug=false
21760 ac_cs_recheck=false
21761 ac_cs_silent=false
21762
21763 SHELL=\${CONFIG_SHELL-$SHELL}
21764 export SHELL
21765 _ASEOF
21766 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
21767 ## -------------------- ##
21768 ## M4sh Initialization. ##
21769 ## -------------------- ##
21770
21771 # Be more Bourne compatible
21772 DUALCASE=1; export DUALCASE # for MKS sh
21773 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
21774   emulate sh
21775   NULLCMD=:
21776   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21777   # is contrary to our usage.  Disable this feature.
21778   alias -g '${1+"$@"}'='"$@"'
21779   setopt NO_GLOB_SUBST
21780 else
21781   case `(set -o) 2>/dev/null` in #(
21782   *posix*) :
21783     set -o posix ;; #(
21784   *) :
21785      ;;
21786 esac
21787 fi
21788
21789
21790 as_nl='
21791 '
21792 export as_nl
21793 # Printing a long string crashes Solaris 7 /usr/bin/printf.
21794 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
21795 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
21796 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
21797 # Prefer a ksh shell builtin over an external printf program on Solaris,
21798 # but without wasting forks for bash or zsh.
21799 if test -z "$BASH_VERSION$ZSH_VERSION" \
21800     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
21801   as_echo='print -r --'
21802   as_echo_n='print -rn --'
21803 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
21804   as_echo='printf %s\n'
21805   as_echo_n='printf %s'
21806 else
21807   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
21808     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
21809     as_echo_n='/usr/ucb/echo -n'
21810   else
21811     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
21812     as_echo_n_body='eval
21813       arg=$1;
21814       case $arg in #(
21815       *"$as_nl"*)
21816         expr "X$arg" : "X\\(.*\\)$as_nl";
21817         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
21818       esac;
21819       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
21820     '
21821     export as_echo_n_body
21822     as_echo_n='sh -c $as_echo_n_body as_echo'
21823   fi
21824   export as_echo_body
21825   as_echo='sh -c $as_echo_body as_echo'
21826 fi
21827
21828 # The user is always right.
21829 if test "${PATH_SEPARATOR+set}" != set; then
21830   PATH_SEPARATOR=:
21831   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
21832     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
21833       PATH_SEPARATOR=';'
21834   }
21835 fi
21836
21837
21838 # IFS
21839 # We need space, tab and new line, in precisely that order.  Quoting is
21840 # there to prevent editors from complaining about space-tab.
21841 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
21842 # splitting by setting IFS to empty value.)
21843 IFS=" ""        $as_nl"
21844
21845 # Find who we are.  Look in the path if we contain no directory separator.
21846 as_myself=
21847 case $0 in #((
21848   *[\\/]* ) as_myself=$0 ;;
21849   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21850 for as_dir in $PATH
21851 do
21852   IFS=$as_save_IFS
21853   test -z "$as_dir" && as_dir=.
21854     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21855   done
21856 IFS=$as_save_IFS
21857
21858      ;;
21859 esac
21860 # We did not find ourselves, most probably we were run as `sh COMMAND'
21861 # in which case we are not to be found in the path.
21862 if test "x$as_myself" = x; then
21863   as_myself=$0
21864 fi
21865 if test ! -f "$as_myself"; then
21866   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
21867   exit 1
21868 fi
21869
21870 # Unset variables that we do not need and which cause bugs (e.g. in
21871 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
21872 # suppresses any "Segmentation fault" message there.  '((' could
21873 # trigger a bug in pdksh 5.2.14.
21874 for as_var in BASH_ENV ENV MAIL MAILPATH
21875 do eval test x\${$as_var+set} = xset \
21876   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
21877 done
21878 PS1='$ '
21879 PS2='> '
21880 PS4='+ '
21881
21882 # NLS nuisances.
21883 LC_ALL=C
21884 export LC_ALL
21885 LANGUAGE=C
21886 export LANGUAGE
21887
21888 # CDPATH.
21889 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21890
21891
21892 # as_fn_error STATUS ERROR [LINENO LOG_FD]
21893 # ----------------------------------------
21894 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
21895 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
21896 # script with STATUS, using 1 if that was 0.
21897 as_fn_error ()
21898 {
21899   as_status=$1; test $as_status -eq 0 && as_status=1
21900   if test "$4"; then
21901     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
21902     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
21903   fi
21904   $as_echo "$as_me: error: $2" >&2
21905   as_fn_exit $as_status
21906 } # as_fn_error
21907
21908
21909 # as_fn_set_status STATUS
21910 # -----------------------
21911 # Set $? to STATUS, without forking.
21912 as_fn_set_status ()
21913 {
21914   return $1
21915 } # as_fn_set_status
21916
21917 # as_fn_exit STATUS
21918 # -----------------
21919 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
21920 as_fn_exit ()
21921 {
21922   set +e
21923   as_fn_set_status $1
21924   exit $1
21925 } # as_fn_exit
21926
21927 # as_fn_unset VAR
21928 # ---------------
21929 # Portably unset VAR.
21930 as_fn_unset ()
21931 {
21932   { eval $1=; unset $1;}
21933 }
21934 as_unset=as_fn_unset
21935 # as_fn_append VAR VALUE
21936 # ----------------------
21937 # Append the text in VALUE to the end of the definition contained in VAR. Take
21938 # advantage of any shell optimizations that allow amortized linear growth over
21939 # repeated appends, instead of the typical quadratic growth present in naive
21940 # implementations.
21941 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
21942   eval 'as_fn_append ()
21943   {
21944     eval $1+=\$2
21945   }'
21946 else
21947   as_fn_append ()
21948   {
21949     eval $1=\$$1\$2
21950   }
21951 fi # as_fn_append
21952
21953 # as_fn_arith ARG...
21954 # ------------------
21955 # Perform arithmetic evaluation on the ARGs, and store the result in the
21956 # global $as_val. Take advantage of shells that can avoid forks. The arguments
21957 # must be portable across $(()) and expr.
21958 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
21959   eval 'as_fn_arith ()
21960   {
21961     as_val=$(( $* ))
21962   }'
21963 else
21964   as_fn_arith ()
21965   {
21966     as_val=`expr "$@" || test $? -eq 1`
21967   }
21968 fi # as_fn_arith
21969
21970
21971 if expr a : '\(a\)' >/dev/null 2>&1 &&
21972    test "X`expr 00001 : '.*\(...\)'`" = X001; then
21973   as_expr=expr
21974 else
21975   as_expr=false
21976 fi
21977
21978 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
21979   as_basename=basename
21980 else
21981   as_basename=false
21982 fi
21983
21984 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
21985   as_dirname=dirname
21986 else
21987   as_dirname=false
21988 fi
21989
21990 as_me=`$as_basename -- "$0" ||
21991 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21992          X"$0" : 'X\(//\)$' \| \
21993          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
21994 $as_echo X/"$0" |
21995     sed '/^.*\/\([^/][^/]*\)\/*$/{
21996             s//\1/
21997             q
21998           }
21999           /^X\/\(\/\/\)$/{
22000             s//\1/
22001             q
22002           }
22003           /^X\/\(\/\).*/{
22004             s//\1/
22005             q
22006           }
22007           s/.*/./; q'`
22008
22009 # Avoid depending upon Character Ranges.
22010 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22011 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22012 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22013 as_cr_digits='0123456789'
22014 as_cr_alnum=$as_cr_Letters$as_cr_digits
22015
22016 ECHO_C= ECHO_N= ECHO_T=
22017 case `echo -n x` in #(((((
22018 -n*)
22019   case `echo 'xy\c'` in
22020   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
22021   xy)  ECHO_C='\c';;
22022   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
22023        ECHO_T=' ';;
22024   esac;;
22025 *)
22026   ECHO_N='-n';;
22027 esac
22028
22029 rm -f conf$$ conf$$.exe conf$$.file
22030 if test -d conf$$.dir; then
22031   rm -f conf$$.dir/conf$$.file
22032 else
22033   rm -f conf$$.dir
22034   mkdir conf$$.dir 2>/dev/null
22035 fi
22036 if (echo >conf$$.file) 2>/dev/null; then
22037   if ln -s conf$$.file conf$$ 2>/dev/null; then
22038     as_ln_s='ln -s'
22039     # ... but there are two gotchas:
22040     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
22041     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
22042     # In both cases, we have to default to `cp -pR'.
22043     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
22044       as_ln_s='cp -pR'
22045   elif ln conf$$.file conf$$ 2>/dev/null; then
22046     as_ln_s=ln
22047   else
22048     as_ln_s='cp -pR'
22049   fi
22050 else
22051   as_ln_s='cp -pR'
22052 fi
22053 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
22054 rmdir conf$$.dir 2>/dev/null
22055
22056
22057 # as_fn_mkdir_p
22058 # -------------
22059 # Create "$as_dir" as a directory, including parents if necessary.
22060 as_fn_mkdir_p ()
22061 {
22062
22063   case $as_dir in #(
22064   -*) as_dir=./$as_dir;;
22065   esac
22066   test -d "$as_dir" || eval $as_mkdir_p || {
22067     as_dirs=
22068     while :; do
22069       case $as_dir in #(
22070       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
22071       *) as_qdir=$as_dir;;
22072       esac
22073       as_dirs="'$as_qdir' $as_dirs"
22074       as_dir=`$as_dirname -- "$as_dir" ||
22075 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22076          X"$as_dir" : 'X\(//\)[^/]' \| \
22077          X"$as_dir" : 'X\(//\)$' \| \
22078          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
22079 $as_echo X"$as_dir" |
22080     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22081             s//\1/
22082             q
22083           }
22084           /^X\(\/\/\)[^/].*/{
22085             s//\1/
22086             q
22087           }
22088           /^X\(\/\/\)$/{
22089             s//\1/
22090             q
22091           }
22092           /^X\(\/\).*/{
22093             s//\1/
22094             q
22095           }
22096           s/.*/./; q'`
22097       test -d "$as_dir" && break
22098     done
22099     test -z "$as_dirs" || eval "mkdir $as_dirs"
22100   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
22101
22102
22103 } # as_fn_mkdir_p
22104 if mkdir -p . 2>/dev/null; then
22105   as_mkdir_p='mkdir -p "$as_dir"'
22106 else
22107   test -d ./-p && rmdir ./-p
22108   as_mkdir_p=false
22109 fi
22110
22111
22112 # as_fn_executable_p FILE
22113 # -----------------------
22114 # Test if FILE is an executable regular file.
22115 as_fn_executable_p ()
22116 {
22117   test -f "$1" && test -x "$1"
22118 } # as_fn_executable_p
22119 as_test_x='test -x'
22120 as_executable_p=as_fn_executable_p
22121
22122 # Sed expression to map a string onto a valid CPP name.
22123 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22124
22125 # Sed expression to map a string onto a valid variable name.
22126 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22127
22128
22129 exec 6>&1
22130 ## ----------------------------------- ##
22131 ## Main body of $CONFIG_STATUS script. ##
22132 ## ----------------------------------- ##
22133 _ASEOF
22134 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
22135
22136 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22137 # Save the log message, to keep $0 and so on meaningful, and to
22138 # report actual input values of CONFIG_FILES etc. instead of their
22139 # values after options handling.
22140 ac_log="
22141 This file was extended by unbound $as_me 1.11.0, which was
22142 generated by GNU Autoconf 2.69.  Invocation command line was
22143
22144   CONFIG_FILES    = $CONFIG_FILES
22145   CONFIG_HEADERS  = $CONFIG_HEADERS
22146   CONFIG_LINKS    = $CONFIG_LINKS
22147   CONFIG_COMMANDS = $CONFIG_COMMANDS
22148   $ $0 $@
22149
22150 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22151 "
22152
22153 _ACEOF
22154
22155 case $ac_config_files in *"
22156 "*) set x $ac_config_files; shift; ac_config_files=$*;;
22157 esac
22158
22159 case $ac_config_headers in *"
22160 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
22161 esac
22162
22163
22164 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22165 # Files that config.status was made for.
22166 config_files="$ac_config_files"
22167 config_headers="$ac_config_headers"
22168 config_commands="$ac_config_commands"
22169
22170 _ACEOF
22171
22172 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22173 ac_cs_usage="\
22174 \`$as_me' instantiates files and other configuration actions
22175 from templates according to the current configuration.  Unless the files
22176 and actions are specified as TAGs, all are instantiated by default.
22177
22178 Usage: $0 [OPTION]... [TAG]...
22179
22180   -h, --help       print this help, then exit
22181   -V, --version    print version number and configuration settings, then exit
22182       --config     print configuration, then exit
22183   -q, --quiet, --silent
22184                    do not print progress messages
22185   -d, --debug      don't remove temporary files
22186       --recheck    update $as_me by reconfiguring in the same conditions
22187       --file=FILE[:TEMPLATE]
22188                    instantiate the configuration file FILE
22189       --header=FILE[:TEMPLATE]
22190                    instantiate the configuration header FILE
22191
22192 Configuration files:
22193 $config_files
22194
22195 Configuration headers:
22196 $config_headers
22197
22198 Configuration commands:
22199 $config_commands
22200
22201 Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>."
22202
22203 _ACEOF
22204 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22205 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
22206 ac_cs_version="\\
22207 unbound config.status 1.11.0
22208 configured by $0, generated by GNU Autoconf 2.69,
22209   with options \\"\$ac_cs_config\\"
22210
22211 Copyright (C) 2012 Free Software Foundation, Inc.
22212 This config.status script is free software; the Free Software Foundation
22213 gives unlimited permission to copy, distribute and modify it."
22214
22215 ac_pwd='$ac_pwd'
22216 srcdir='$srcdir'
22217 AWK='$AWK'
22218 test -n "\$AWK" || AWK=awk
22219 _ACEOF
22220
22221 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22222 # The default lists apply if the user does not specify any file.
22223 ac_need_defaults=:
22224 while test $# != 0
22225 do
22226   case $1 in
22227   --*=?*)
22228     ac_option=`expr "X$1" : 'X\([^=]*\)='`
22229     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
22230     ac_shift=:
22231     ;;
22232   --*=)
22233     ac_option=`expr "X$1" : 'X\([^=]*\)='`
22234     ac_optarg=
22235     ac_shift=:
22236     ;;
22237   *)
22238     ac_option=$1
22239     ac_optarg=$2
22240     ac_shift=shift
22241     ;;
22242   esac
22243
22244   case $ac_option in
22245   # Handling of the options.
22246   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22247     ac_cs_recheck=: ;;
22248   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
22249     $as_echo "$ac_cs_version"; exit ;;
22250   --config | --confi | --conf | --con | --co | --c )
22251     $as_echo "$ac_cs_config"; exit ;;
22252   --debug | --debu | --deb | --de | --d | -d )
22253     debug=: ;;
22254   --file | --fil | --fi | --f )
22255     $ac_shift
22256     case $ac_optarg in
22257     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22258     '') as_fn_error $? "missing file argument" ;;
22259     esac
22260     as_fn_append CONFIG_FILES " '$ac_optarg'"
22261     ac_need_defaults=false;;
22262   --header | --heade | --head | --hea )
22263     $ac_shift
22264     case $ac_optarg in
22265     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22266     esac
22267     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
22268     ac_need_defaults=false;;
22269   --he | --h)
22270     # Conflict between --help and --header
22271     as_fn_error $? "ambiguous option: \`$1'
22272 Try \`$0 --help' for more information.";;
22273   --help | --hel | -h )
22274     $as_echo "$ac_cs_usage"; exit ;;
22275   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22276   | -silent | --silent | --silen | --sile | --sil | --si | --s)
22277     ac_cs_silent=: ;;
22278
22279   # This is an error.
22280   -*) as_fn_error $? "unrecognized option: \`$1'
22281 Try \`$0 --help' for more information." ;;
22282
22283   *) as_fn_append ac_config_targets " $1"
22284      ac_need_defaults=false ;;
22285
22286   esac
22287   shift
22288 done
22289
22290 ac_configure_extra_args=
22291
22292 if $ac_cs_silent; then
22293   exec 6>/dev/null
22294   ac_configure_extra_args="$ac_configure_extra_args --silent"
22295 fi
22296
22297 _ACEOF
22298 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22299 if \$ac_cs_recheck; then
22300   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22301   shift
22302   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
22303   CONFIG_SHELL='$SHELL'
22304   export CONFIG_SHELL
22305   exec "\$@"
22306 fi
22307
22308 _ACEOF
22309 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22310 exec 5>>config.log
22311 {
22312   echo
22313   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22314 ## Running $as_me. ##
22315 _ASBOX
22316   $as_echo "$ac_log"
22317 } >&5
22318
22319 _ACEOF
22320 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22321 #
22322 # INIT-COMMANDS
22323 #
22324
22325
22326 # The HP-UX ksh and POSIX shell print the target directory to stdout
22327 # if CDPATH is set.
22328 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
22329
22330 sed_quote_subst='$sed_quote_subst'
22331 double_quote_subst='$double_quote_subst'
22332 delay_variable_subst='$delay_variable_subst'
22333 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
22334 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
22335 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
22336 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
22337 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
22338 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
22339 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
22340 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
22341 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
22342 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
22343 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
22344 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
22345 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
22346 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
22347 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
22348 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
22349 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
22350 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
22351 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
22352 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
22353 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
22354 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
22355 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
22356 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
22357 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
22358 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
22359 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
22360 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
22361 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
22362 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
22363 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
22364 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
22365 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
22366 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
22367 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
22368 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
22369 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
22370 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
22371 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
22372 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
22373 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
22374 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
22375 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
22376 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
22377 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
22378 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
22379 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
22380 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
22381 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
22382 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
22383 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
22384 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
22385 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
22386 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
22387 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
22388 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
22389 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
22390 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
22391 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"`'
22392 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
22393 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
22394 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
22395 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
22396 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
22397 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
22398 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
22399 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
22400 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
22401 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
22402 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
22403 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
22404 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
22405 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
22406 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
22407 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
22408 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
22409 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
22410 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
22411 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
22412 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
22413 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
22414 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
22415 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
22416 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
22417 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
22418 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
22419 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
22420 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
22421 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
22422 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
22423 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
22424 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
22425 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
22426 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
22427 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
22428 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
22429 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
22430 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
22431 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
22432 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
22433 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
22434 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
22435 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
22436 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
22437 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
22438 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
22439 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
22440 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
22441 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
22442 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
22443 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
22444 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
22445 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
22446 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
22447 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
22448 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
22449 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
22450 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
22451 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
22452 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
22453 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
22454 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
22455 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
22456 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
22457 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
22458 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
22459 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
22460 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
22461 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
22462 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
22463 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
22464 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
22465 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
22466 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
22467 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
22468
22469 LTCC='$LTCC'
22470 LTCFLAGS='$LTCFLAGS'
22471 compiler='$compiler_DEFAULT'
22472
22473 # A function that is used when there is no print builtin or printf.
22474 func_fallback_echo ()
22475 {
22476   eval 'cat <<_LTECHO_EOF
22477 \$1
22478 _LTECHO_EOF'
22479 }
22480
22481 # Quote evaled strings.
22482 for var in SHELL \
22483 ECHO \
22484 PATH_SEPARATOR \
22485 SED \
22486 GREP \
22487 EGREP \
22488 FGREP \
22489 LD \
22490 NM \
22491 LN_S \
22492 lt_SP2NL \
22493 lt_NL2SP \
22494 reload_flag \
22495 OBJDUMP \
22496 deplibs_check_method \
22497 file_magic_cmd \
22498 file_magic_glob \
22499 want_nocaseglob \
22500 DLLTOOL \
22501 sharedlib_from_linklib_cmd \
22502 AR \
22503 AR_FLAGS \
22504 archiver_list_spec \
22505 STRIP \
22506 RANLIB \
22507 CC \
22508 CFLAGS \
22509 compiler \
22510 lt_cv_sys_global_symbol_pipe \
22511 lt_cv_sys_global_symbol_to_cdecl \
22512 lt_cv_sys_global_symbol_to_import \
22513 lt_cv_sys_global_symbol_to_c_name_address \
22514 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
22515 lt_cv_nm_interface \
22516 nm_file_list_spec \
22517 lt_cv_truncate_bin \
22518 lt_prog_compiler_no_builtin_flag \
22519 lt_prog_compiler_pic \
22520 lt_prog_compiler_wl \
22521 lt_prog_compiler_static \
22522 lt_cv_prog_compiler_c_o \
22523 need_locks \
22524 MANIFEST_TOOL \
22525 DSYMUTIL \
22526 NMEDIT \
22527 LIPO \
22528 OTOOL \
22529 OTOOL64 \
22530 shrext_cmds \
22531 export_dynamic_flag_spec \
22532 whole_archive_flag_spec \
22533 compiler_needs_object \
22534 with_gnu_ld \
22535 allow_undefined_flag \
22536 no_undefined_flag \
22537 hardcode_libdir_flag_spec \
22538 hardcode_libdir_separator \
22539 exclude_expsyms \
22540 include_expsyms \
22541 file_list_spec \
22542 variables_saved_for_relink \
22543 libname_spec \
22544 library_names_spec \
22545 soname_spec \
22546 install_override_mode \
22547 finish_eval \
22548 old_striplib \
22549 striplib; do
22550     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22551     *[\\\\\\\`\\"\\\$]*)
22552       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22553       ;;
22554     *)
22555       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22556       ;;
22557     esac
22558 done
22559
22560 # Double-quote double-evaled strings.
22561 for var in reload_cmds \
22562 old_postinstall_cmds \
22563 old_postuninstall_cmds \
22564 old_archive_cmds \
22565 extract_expsyms_cmds \
22566 old_archive_from_new_cmds \
22567 old_archive_from_expsyms_cmds \
22568 archive_cmds \
22569 archive_expsym_cmds \
22570 module_cmds \
22571 module_expsym_cmds \
22572 export_symbols_cmds \
22573 prelink_cmds \
22574 postlink_cmds \
22575 postinstall_cmds \
22576 postuninstall_cmds \
22577 finish_cmds \
22578 sys_lib_search_path_spec \
22579 configure_time_dlsearch_path \
22580 configure_time_lt_sys_library_path; do
22581     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22582     *[\\\\\\\`\\"\\\$]*)
22583       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22584       ;;
22585     *)
22586       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22587       ;;
22588     esac
22589 done
22590
22591 ac_aux_dir='$ac_aux_dir'
22592
22593 # See if we are running on zsh, and set the options that allow our
22594 # commands through without removal of \ escapes INIT.
22595 if test -n "\${ZSH_VERSION+set}"; then
22596    setopt NO_GLOB_SUBST
22597 fi
22598
22599
22600     PACKAGE='$PACKAGE'
22601     VERSION='$VERSION'
22602     RM='$RM'
22603     ofile='$ofile'
22604
22605
22606
22607
22608 _ACEOF
22609
22610 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22611
22612 # Handling of arguments.
22613 for ac_config_target in $ac_config_targets
22614 do
22615   case $ac_config_target in
22616     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
22617     "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
22618     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22619     "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
22620     "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
22621     "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
22622     "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
22623     "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
22624     "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
22625     "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
22626     "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
22627     "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
22628     "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
22629     "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
22630     "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
22631     "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
22632     "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
22633     "contrib/unbound_portable.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound_portable.service" ;;
22634     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
22635
22636   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
22637   esac
22638 done
22639
22640
22641 # If the user did not use the arguments to specify the items to instantiate,
22642 # then the envvar interface is used.  Set only those that are not.
22643 # We use the long form for the default assignment because of an extremely
22644 # bizarre bug on SunOS 4.1.3.
22645 if $ac_need_defaults; then
22646   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22647   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22648   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22649 fi
22650
22651 # Have a temporary directory for convenience.  Make it in the build tree
22652 # simply because there is no reason against having it here, and in addition,
22653 # creating and moving files from /tmp can sometimes cause problems.
22654 # Hook for its removal unless debugging.
22655 # Note that there is a small window in which the directory will not be cleaned:
22656 # after its creation but before its name has been assigned to `$tmp'.
22657 $debug ||
22658 {
22659   tmp= ac_tmp=
22660   trap 'exit_status=$?
22661   : "${ac_tmp:=$tmp}"
22662   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
22663 ' 0
22664   trap 'as_fn_exit 1' 1 2 13 15
22665 }
22666 # Create a (secure) tmp directory for tmp files.
22667
22668 {
22669   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
22670   test -d "$tmp"
22671 }  ||
22672 {
22673   tmp=./conf$$-$RANDOM
22674   (umask 077 && mkdir "$tmp")
22675 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
22676 ac_tmp=$tmp
22677
22678 # Set up the scripts for CONFIG_FILES section.
22679 # No need to generate them if there are no CONFIG_FILES.
22680 # This happens for instance with `./config.status config.h'.
22681 if test -n "$CONFIG_FILES"; then
22682
22683
22684 ac_cr=`echo X | tr X '\015'`
22685 # On cygwin, bash can eat \r inside `` if the user requested igncr.
22686 # But we know of no other shell where ac_cr would be empty at this
22687 # point, so we can use a bashism as a fallback.
22688 if test "x$ac_cr" = x; then
22689   eval ac_cr=\$\'\\r\'
22690 fi
22691 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
22692 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
22693   ac_cs_awk_cr='\\r'
22694 else
22695   ac_cs_awk_cr=$ac_cr
22696 fi
22697
22698 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
22699 _ACEOF
22700
22701
22702 {
22703   echo "cat >conf$$subs.awk <<_ACEOF" &&
22704   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
22705   echo "_ACEOF"
22706 } >conf$$subs.sh ||
22707   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22708 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
22709 ac_delim='%!_!# '
22710 for ac_last_try in false false false false false :; do
22711   . ./conf$$subs.sh ||
22712     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22713
22714   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
22715   if test $ac_delim_n = $ac_delim_num; then
22716     break
22717   elif $ac_last_try; then
22718     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22719   else
22720     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22721   fi
22722 done
22723 rm -f conf$$subs.sh
22724
22725 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22726 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
22727 _ACEOF
22728 sed -n '
22729 h
22730 s/^/S["/; s/!.*/"]=/
22731 p
22732 g
22733 s/^[^!]*!//
22734 :repl
22735 t repl
22736 s/'"$ac_delim"'$//
22737 t delim
22738 :nl
22739 h
22740 s/\(.\{148\}\)..*/\1/
22741 t more1
22742 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
22743 p
22744 n
22745 b repl
22746 :more1
22747 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22748 p
22749 g
22750 s/.\{148\}//
22751 t nl
22752 :delim
22753 h
22754 s/\(.\{148\}\)..*/\1/
22755 t more2
22756 s/["\\]/\\&/g; s/^/"/; s/$/"/
22757 p
22758 b
22759 :more2
22760 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22761 p
22762 g
22763 s/.\{148\}//
22764 t delim
22765 ' <conf$$subs.awk | sed '
22766 /^[^""]/{
22767   N
22768   s/\n//
22769 }
22770 ' >>$CONFIG_STATUS || ac_write_fail=1
22771 rm -f conf$$subs.awk
22772 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22773 _ACAWK
22774 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
22775   for (key in S) S_is_set[key] = 1
22776   FS = "\a"
22777
22778 }
22779 {
22780   line = $ 0
22781   nfields = split(line, field, "@")
22782   substed = 0
22783   len = length(field[1])
22784   for (i = 2; i < nfields; i++) {
22785     key = field[i]
22786     keylen = length(key)
22787     if (S_is_set[key]) {
22788       value = S[key]
22789       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
22790       len += length(value) + length(field[++i])
22791       substed = 1
22792     } else
22793       len += 1 + keylen
22794   }
22795
22796   print line
22797 }
22798
22799 _ACAWK
22800 _ACEOF
22801 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22802 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22803   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
22804 else
22805   cat
22806 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
22807   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
22808 _ACEOF
22809
22810 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
22811 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
22812 # trailing colons and then remove the whole line if VPATH becomes empty
22813 # (actually we leave an empty line to preserve line numbers).
22814 if test "x$srcdir" = x.; then
22815   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
22816 h
22817 s///
22818 s/^/:/
22819 s/[      ]*$/:/
22820 s/:\$(srcdir):/:/g
22821 s/:\${srcdir}:/:/g
22822 s/:@srcdir@:/:/g
22823 s/^:*//
22824 s/:*$//
22825 x
22826 s/\(=[   ]*\).*/\1/
22827 G
22828 s/\n//
22829 s/^[^=]*=[       ]*$//
22830 }'
22831 fi
22832
22833 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22834 fi # test -n "$CONFIG_FILES"
22835
22836 # Set up the scripts for CONFIG_HEADERS section.
22837 # No need to generate them if there are no CONFIG_HEADERS.
22838 # This happens for instance with `./config.status Makefile'.
22839 if test -n "$CONFIG_HEADERS"; then
22840 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
22841 BEGIN {
22842 _ACEOF
22843
22844 # Transform confdefs.h into an awk script `defines.awk', embedded as
22845 # here-document in config.status, that substitutes the proper values into
22846 # config.h.in to produce config.h.
22847
22848 # Create a delimiter string that does not exist in confdefs.h, to ease
22849 # handling of long lines.
22850 ac_delim='%!_!# '
22851 for ac_last_try in false false :; do
22852   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
22853   if test -z "$ac_tt"; then
22854     break
22855   elif $ac_last_try; then
22856     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
22857   else
22858     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22859   fi
22860 done
22861
22862 # For the awk script, D is an array of macro values keyed by name,
22863 # likewise P contains macro parameters if any.  Preserve backslash
22864 # newline sequences.
22865
22866 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
22867 sed -n '
22868 s/.\{148\}/&'"$ac_delim"'/g
22869 t rset
22870 :rset
22871 s/^[     ]*#[    ]*define[       ][      ]*/ /
22872 t def
22873 d
22874 :def
22875 s/\\$//
22876 t bsnl
22877 s/["\\]/\\&/g
22878 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22879 D["\1"]=" \3"/p
22880 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
22881 d
22882 :bsnl
22883 s/["\\]/\\&/g
22884 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22885 D["\1"]=" \3\\\\\\n"\\/p
22886 t cont
22887 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
22888 t cont
22889 d
22890 :cont
22891 n
22892 s/.\{148\}/&'"$ac_delim"'/g
22893 t clear
22894 :clear
22895 s/\\$//
22896 t bsnlc
22897 s/["\\]/\\&/g; s/^/"/; s/$/"/p
22898 d
22899 :bsnlc
22900 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
22901 b cont
22902 ' <confdefs.h | sed '
22903 s/'"$ac_delim"'/"\\\
22904 "/g' >>$CONFIG_STATUS || ac_write_fail=1
22905
22906 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22907   for (key in D) D_is_set[key] = 1
22908   FS = "\a"
22909 }
22910 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
22911   line = \$ 0
22912   split(line, arg, " ")
22913   if (arg[1] == "#") {
22914     defundef = arg[2]
22915     mac1 = arg[3]
22916   } else {
22917     defundef = substr(arg[1], 2)
22918     mac1 = arg[2]
22919   }
22920   split(mac1, mac2, "(") #)
22921   macro = mac2[1]
22922   prefix = substr(line, 1, index(line, defundef) - 1)
22923   if (D_is_set[macro]) {
22924     # Preserve the white space surrounding the "#".
22925     print prefix "define", macro P[macro] D[macro]
22926     next
22927   } else {
22928     # Replace #undef with comments.  This is necessary, for example,
22929     # in the case of _POSIX_SOURCE, which is predefined and required
22930     # on some systems where configure will not decide to define it.
22931     if (defundef == "undef") {
22932       print "/*", prefix defundef, macro, "*/"
22933       next
22934     }
22935   }
22936 }
22937 { print }
22938 _ACAWK
22939 _ACEOF
22940 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22941   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
22942 fi # test -n "$CONFIG_HEADERS"
22943
22944
22945 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
22946 shift
22947 for ac_tag
22948 do
22949   case $ac_tag in
22950   :[FHLC]) ac_mode=$ac_tag; continue;;
22951   esac
22952   case $ac_mode$ac_tag in
22953   :[FHL]*:*);;
22954   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
22955   :[FH]-) ac_tag=-:-;;
22956   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22957   esac
22958   ac_save_IFS=$IFS
22959   IFS=:
22960   set x $ac_tag
22961   IFS=$ac_save_IFS
22962   shift
22963   ac_file=$1
22964   shift
22965
22966   case $ac_mode in
22967   :L) ac_source=$1;;
22968   :[FH])
22969     ac_file_inputs=
22970     for ac_f
22971     do
22972       case $ac_f in
22973       -) ac_f="$ac_tmp/stdin";;
22974       *) # Look for the file first in the build tree, then in the source tree
22975          # (if the path is not absolute).  The absolute path cannot be DOS-style,
22976          # because $ac_f cannot contain `:'.
22977          test -f "$ac_f" ||
22978            case $ac_f in
22979            [\\/$]*) false;;
22980            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22981            esac ||
22982            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
22983       esac
22984       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
22985       as_fn_append ac_file_inputs " '$ac_f'"
22986     done
22987
22988     # Let's still pretend it is `configure' which instantiates (i.e., don't
22989     # use $as_me), people would be surprised to read:
22990     #    /* config.h.  Generated by config.status.  */
22991     configure_input='Generated from '`
22992           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
22993         `' by configure.'
22994     if test x"$ac_file" != x-; then
22995       configure_input="$ac_file.  $configure_input"
22996       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
22997 $as_echo "$as_me: creating $ac_file" >&6;}
22998     fi
22999     # Neutralize special characters interpreted by sed in replacement strings.
23000     case $configure_input in #(
23001     *\&* | *\|* | *\\* )
23002        ac_sed_conf_input=`$as_echo "$configure_input" |
23003        sed 's/[\\\\&|]/\\\\&/g'`;; #(
23004     *) ac_sed_conf_input=$configure_input;;
23005     esac
23006
23007     case $ac_tag in
23008     *:-:* | *:-) cat >"$ac_tmp/stdin" \
23009       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
23010     esac
23011     ;;
23012   esac
23013
23014   ac_dir=`$as_dirname -- "$ac_file" ||
23015 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23016          X"$ac_file" : 'X\(//\)[^/]' \| \
23017          X"$ac_file" : 'X\(//\)$' \| \
23018          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
23019 $as_echo X"$ac_file" |
23020     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23021             s//\1/
23022             q
23023           }
23024           /^X\(\/\/\)[^/].*/{
23025             s//\1/
23026             q
23027           }
23028           /^X\(\/\/\)$/{
23029             s//\1/
23030             q
23031           }
23032           /^X\(\/\).*/{
23033             s//\1/
23034             q
23035           }
23036           s/.*/./; q'`
23037   as_dir="$ac_dir"; as_fn_mkdir_p
23038   ac_builddir=.
23039
23040 case "$ac_dir" in
23041 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
23042 *)
23043   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
23044   # A ".." for each directory in $ac_dir_suffix.
23045   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
23046   case $ac_top_builddir_sub in
23047   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
23048   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
23049   esac ;;
23050 esac
23051 ac_abs_top_builddir=$ac_pwd
23052 ac_abs_builddir=$ac_pwd$ac_dir_suffix
23053 # for backward compatibility:
23054 ac_top_builddir=$ac_top_build_prefix
23055
23056 case $srcdir in
23057   .)  # We are building in place.
23058     ac_srcdir=.
23059     ac_top_srcdir=$ac_top_builddir_sub
23060     ac_abs_top_srcdir=$ac_pwd ;;
23061   [\\/]* | ?:[\\/]* )  # Absolute name.
23062     ac_srcdir=$srcdir$ac_dir_suffix;
23063     ac_top_srcdir=$srcdir
23064     ac_abs_top_srcdir=$srcdir ;;
23065   *) # Relative name.
23066     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
23067     ac_top_srcdir=$ac_top_build_prefix$srcdir
23068     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
23069 esac
23070 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
23071
23072
23073   case $ac_mode in
23074   :F)
23075   #
23076   # CONFIG_FILE
23077   #
23078
23079 _ACEOF
23080
23081 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23082 # If the template does not know about datarootdir, expand it.
23083 # FIXME: This hack should be removed a few years after 2.60.
23084 ac_datarootdir_hack=; ac_datarootdir_seen=
23085 ac_sed_dataroot='
23086 /datarootdir/ {
23087   p
23088   q
23089 }
23090 /@datadir@/p
23091 /@docdir@/p
23092 /@infodir@/p
23093 /@localedir@/p
23094 /@mandir@/p'
23095 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
23096 *datarootdir*) ac_datarootdir_seen=yes;;
23097 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
23098   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
23099 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
23100 _ACEOF
23101 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23102   ac_datarootdir_hack='
23103   s&@datadir@&$datadir&g
23104   s&@docdir@&$docdir&g
23105   s&@infodir@&$infodir&g
23106   s&@localedir@&$localedir&g
23107   s&@mandir@&$mandir&g
23108   s&\\\${datarootdir}&$datarootdir&g' ;;
23109 esac
23110 _ACEOF
23111
23112 # Neutralize VPATH when `$srcdir' = `.'.
23113 # Shell code in configure.ac might set extrasub.
23114 # FIXME: do we really want to maintain this feature?
23115 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23116 ac_sed_extra="$ac_vpsub
23117 $extrasub
23118 _ACEOF
23119 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23120 :t
23121 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23122 s|@configure_input@|$ac_sed_conf_input|;t t
23123 s&@top_builddir@&$ac_top_builddir_sub&;t t
23124 s&@top_build_prefix@&$ac_top_build_prefix&;t t
23125 s&@srcdir@&$ac_srcdir&;t t
23126 s&@abs_srcdir@&$ac_abs_srcdir&;t t
23127 s&@top_srcdir@&$ac_top_srcdir&;t t
23128 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
23129 s&@builddir@&$ac_builddir&;t t
23130 s&@abs_builddir@&$ac_abs_builddir&;t t
23131 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
23132 $ac_datarootdir_hack
23133 "
23134 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
23135   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23136
23137 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
23138   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
23139   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
23140       "$ac_tmp/out"`; test -z "$ac_out"; } &&
23141   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23142 which seems to be undefined.  Please make sure it is defined" >&5
23143 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23144 which seems to be undefined.  Please make sure it is defined" >&2;}
23145
23146   rm -f "$ac_tmp/stdin"
23147   case $ac_file in
23148   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
23149   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
23150   esac \
23151   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23152  ;;
23153   :H)
23154   #
23155   # CONFIG_HEADER
23156   #
23157   if test x"$ac_file" != x-; then
23158     {
23159       $as_echo "/* $configure_input  */" \
23160       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
23161     } >"$ac_tmp/config.h" \
23162       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23163     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
23164       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
23165 $as_echo "$as_me: $ac_file is unchanged" >&6;}
23166     else
23167       rm -f "$ac_file"
23168       mv "$ac_tmp/config.h" "$ac_file" \
23169         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23170     fi
23171   else
23172     $as_echo "/* $configure_input  */" \
23173       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
23174       || as_fn_error $? "could not create -" "$LINENO" 5
23175   fi
23176  ;;
23177
23178   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
23179 $as_echo "$as_me: executing $ac_file commands" >&6;}
23180  ;;
23181   esac
23182
23183
23184   case $ac_file$ac_mode in
23185     "libtool":C)
23186
23187     # See if we are running on zsh, and set the options that allow our
23188     # commands through without removal of \ escapes.
23189     if test -n "${ZSH_VERSION+set}"; then
23190       setopt NO_GLOB_SUBST
23191     fi
23192
23193     cfgfile=${ofile}T
23194     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
23195     $RM "$cfgfile"
23196
23197     cat <<_LT_EOF >> "$cfgfile"
23198 #! $SHELL
23199 # Generated automatically by $as_me ($PACKAGE) $VERSION
23200 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23201 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
23202
23203 # Provide generalized library-building support services.
23204 # Written by Gordon Matzigkeit, 1996
23205
23206 # Copyright (C) 2014 Free Software Foundation, Inc.
23207 # This is free software; see the source for copying conditions.  There is NO
23208 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23209
23210 # GNU Libtool is free software; you can redistribute it and/or modify
23211 # it under the terms of the GNU General Public License as published by
23212 # the Free Software Foundation; either version 2 of of the License, or
23213 # (at your option) any later version.
23214 #
23215 # As a special exception to the GNU General Public License, if you
23216 # distribute this file as part of a program or library that is built
23217 # using GNU Libtool, you may include this file under the  same
23218 # distribution terms that you use for the rest of that program.
23219 #
23220 # GNU Libtool is distributed in the hope that it will be useful, but
23221 # WITHOUT ANY WARRANTY; without even the implied warranty of
23222 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23223 # GNU General Public License for more details.
23224 #
23225 # You should have received a copy of the GNU General Public License
23226 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
23227
23228
23229 # The names of the tagged configurations supported by this script.
23230 available_tags=''
23231
23232 # Configured defaults for sys_lib_dlsearch_path munging.
23233 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
23234
23235 # ### BEGIN LIBTOOL CONFIG
23236
23237 # Which release of libtool.m4 was used?
23238 macro_version=$macro_version
23239 macro_revision=$macro_revision
23240
23241 # Whether or not to build shared libraries.
23242 build_libtool_libs=$enable_shared
23243
23244 # Whether or not to build static libraries.
23245 build_old_libs=$enable_static
23246
23247 # What type of objects to build.
23248 pic_mode=$pic_mode
23249
23250 # Whether or not to optimize for fast installation.
23251 fast_install=$enable_fast_install
23252
23253 # Shared archive member basename,for filename based shared library versioning on AIX.
23254 shared_archive_member_spec=$shared_archive_member_spec
23255
23256 # Shell to use when invoking shell scripts.
23257 SHELL=$lt_SHELL
23258
23259 # An echo program that protects backslashes.
23260 ECHO=$lt_ECHO
23261
23262 # The PATH separator for the build system.
23263 PATH_SEPARATOR=$lt_PATH_SEPARATOR
23264
23265 # The host system.
23266 host_alias=$host_alias
23267 host=$host
23268 host_os=$host_os
23269
23270 # The build system.
23271 build_alias=$build_alias
23272 build=$build
23273 build_os=$build_os
23274
23275 # A sed program that does not truncate output.
23276 SED=$lt_SED
23277
23278 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
23279 Xsed="\$SED -e 1s/^X//"
23280
23281 # A grep program that handles long lines.
23282 GREP=$lt_GREP
23283
23284 # An ERE matcher.
23285 EGREP=$lt_EGREP
23286
23287 # A literal string matcher.
23288 FGREP=$lt_FGREP
23289
23290 # A BSD- or MS-compatible name lister.
23291 NM=$lt_NM
23292
23293 # Whether we need soft or hard links.
23294 LN_S=$lt_LN_S
23295
23296 # What is the maximum length of a command?
23297 max_cmd_len=$max_cmd_len
23298
23299 # Object file suffix (normally "o").
23300 objext=$ac_objext
23301
23302 # Executable file suffix (normally "").
23303 exeext=$exeext
23304
23305 # whether the shell understands "unset".
23306 lt_unset=$lt_unset
23307
23308 # turn spaces into newlines.
23309 SP2NL=$lt_lt_SP2NL
23310
23311 # turn newlines into spaces.
23312 NL2SP=$lt_lt_NL2SP
23313
23314 # convert \$build file names to \$host format.
23315 to_host_file_cmd=$lt_cv_to_host_file_cmd
23316
23317 # convert \$build files to toolchain format.
23318 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
23319
23320 # An object symbol dumper.
23321 OBJDUMP=$lt_OBJDUMP
23322
23323 # Method to check whether dependent libraries are shared objects.
23324 deplibs_check_method=$lt_deplibs_check_method
23325
23326 # Command to use when deplibs_check_method = "file_magic".
23327 file_magic_cmd=$lt_file_magic_cmd
23328
23329 # How to find potential files when deplibs_check_method = "file_magic".
23330 file_magic_glob=$lt_file_magic_glob
23331
23332 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
23333 want_nocaseglob=$lt_want_nocaseglob
23334
23335 # DLL creation program.
23336 DLLTOOL=$lt_DLLTOOL
23337
23338 # Command to associate shared and link libraries.
23339 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
23340
23341 # The archiver.
23342 AR=$lt_AR
23343
23344 # Flags to create an archive.
23345 AR_FLAGS=$lt_AR_FLAGS
23346
23347 # How to feed a file listing to the archiver.
23348 archiver_list_spec=$lt_archiver_list_spec
23349
23350 # A symbol stripping program.
23351 STRIP=$lt_STRIP
23352
23353 # Commands used to install an old-style archive.
23354 RANLIB=$lt_RANLIB
23355 old_postinstall_cmds=$lt_old_postinstall_cmds
23356 old_postuninstall_cmds=$lt_old_postuninstall_cmds
23357
23358 # Whether to use a lock for old archive extraction.
23359 lock_old_archive_extraction=$lock_old_archive_extraction
23360
23361 # A C compiler.
23362 LTCC=$lt_CC
23363
23364 # LTCC compiler flags.
23365 LTCFLAGS=$lt_CFLAGS
23366
23367 # Take the output of nm and produce a listing of raw symbols and C names.
23368 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
23369
23370 # Transform the output of nm in a proper C declaration.
23371 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
23372
23373 # Transform the output of nm into a list of symbols to manually relocate.
23374 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
23375
23376 # Transform the output of nm in a C name address pair.
23377 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
23378
23379 # Transform the output of nm in a C name address pair when lib prefix is needed.
23380 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
23381
23382 # The name lister interface.
23383 nm_interface=$lt_lt_cv_nm_interface
23384
23385 # Specify filename containing input files for \$NM.
23386 nm_file_list_spec=$lt_nm_file_list_spec
23387
23388 # The root where to search for dependent libraries,and where our libraries should be installed.
23389 lt_sysroot=$lt_sysroot
23390
23391 # Command to truncate a binary pipe.
23392 lt_truncate_bin=$lt_lt_cv_truncate_bin
23393
23394 # The name of the directory that contains temporary libtool files.
23395 objdir=$objdir
23396
23397 # Used to examine libraries when file_magic_cmd begins with "file".
23398 MAGIC_CMD=$MAGIC_CMD
23399
23400 # Must we lock files when doing compilation?
23401 need_locks=$lt_need_locks
23402
23403 # Manifest tool.
23404 MANIFEST_TOOL=$lt_MANIFEST_TOOL
23405
23406 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
23407 DSYMUTIL=$lt_DSYMUTIL
23408
23409 # Tool to change global to local symbols on Mac OS X.
23410 NMEDIT=$lt_NMEDIT
23411
23412 # Tool to manipulate fat objects and archives on Mac OS X.
23413 LIPO=$lt_LIPO
23414
23415 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
23416 OTOOL=$lt_OTOOL
23417
23418 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
23419 OTOOL64=$lt_OTOOL64
23420
23421 # Old archive suffix (normally "a").
23422 libext=$libext
23423
23424 # Shared library suffix (normally ".so").
23425 shrext_cmds=$lt_shrext_cmds
23426
23427 # The commands to extract the exported symbol list from a shared archive.
23428 extract_expsyms_cmds=$lt_extract_expsyms_cmds
23429
23430 # Variables whose values should be saved in libtool wrapper scripts and
23431 # restored at link time.
23432 variables_saved_for_relink=$lt_variables_saved_for_relink
23433
23434 # Do we need the "lib" prefix for modules?
23435 need_lib_prefix=$need_lib_prefix
23436
23437 # Do we need a version for libraries?
23438 need_version=$need_version
23439
23440 # Library versioning type.
23441 version_type=$version_type
23442
23443 # Shared library runtime path variable.
23444 runpath_var=$runpath_var
23445
23446 # Shared library path variable.
23447 shlibpath_var=$shlibpath_var
23448
23449 # Is shlibpath searched before the hard-coded library search path?
23450 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
23451
23452 # Format of library name prefix.
23453 libname_spec=$lt_libname_spec
23454
23455 # List of archive names.  First name is the real one, the rest are links.
23456 # The last name is the one that the linker finds with -lNAME
23457 library_names_spec=$lt_library_names_spec
23458
23459 # The coded name of the library, if different from the real name.
23460 soname_spec=$lt_soname_spec
23461
23462 # Permission mode override for installation of shared libraries.
23463 install_override_mode=$lt_install_override_mode
23464
23465 # Command to use after installation of a shared archive.
23466 postinstall_cmds=$lt_postinstall_cmds
23467
23468 # Command to use after uninstallation of a shared archive.
23469 postuninstall_cmds=$lt_postuninstall_cmds
23470
23471 # Commands used to finish a libtool library installation in a directory.
23472 finish_cmds=$lt_finish_cmds
23473
23474 # As "finish_cmds", except a single script fragment to be evaled but
23475 # not shown.
23476 finish_eval=$lt_finish_eval
23477
23478 # Whether we should hardcode library paths into libraries.
23479 hardcode_into_libs=$hardcode_into_libs
23480
23481 # Compile-time system search path for libraries.
23482 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
23483
23484 # Detected run-time system search path for libraries.
23485 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
23486
23487 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
23488 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
23489
23490 # Whether dlopen is supported.
23491 dlopen_support=$enable_dlopen
23492
23493 # Whether dlopen of programs is supported.
23494 dlopen_self=$enable_dlopen_self
23495
23496 # Whether dlopen of statically linked programs is supported.
23497 dlopen_self_static=$enable_dlopen_self_static
23498
23499 # Commands to strip libraries.
23500 old_striplib=$lt_old_striplib
23501 striplib=$lt_striplib
23502
23503
23504 # The linker used to build libraries.
23505 LD=$lt_LD
23506
23507 # How to create reloadable object files.
23508 reload_flag=$lt_reload_flag
23509 reload_cmds=$lt_reload_cmds
23510
23511 # Commands used to build an old-style archive.
23512 old_archive_cmds=$lt_old_archive_cmds
23513
23514 # A language specific compiler.
23515 CC=$lt_compiler
23516
23517 # Is the compiler the GNU compiler?
23518 with_gcc=$GCC
23519
23520 # Compiler flag to turn off builtin functions.
23521 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
23522
23523 # Additional compiler flags for building library objects.
23524 pic_flag=$lt_lt_prog_compiler_pic
23525
23526 # How to pass a linker flag through the compiler.
23527 wl=$lt_lt_prog_compiler_wl
23528
23529 # Compiler flag to prevent dynamic linking.
23530 link_static_flag=$lt_lt_prog_compiler_static
23531
23532 # Does compiler simultaneously support -c and -o options?
23533 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
23534
23535 # Whether or not to add -lc for building shared libraries.
23536 build_libtool_need_lc=$archive_cmds_need_lc
23537
23538 # Whether or not to disallow shared libs when runtime libs are static.
23539 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
23540
23541 # Compiler flag to allow reflexive dlopens.
23542 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
23543
23544 # Compiler flag to generate shared objects directly from archives.
23545 whole_archive_flag_spec=$lt_whole_archive_flag_spec
23546
23547 # Whether the compiler copes with passing no objects directly.
23548 compiler_needs_object=$lt_compiler_needs_object
23549
23550 # Create an old-style archive from a shared archive.
23551 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
23552
23553 # Create a temporary old-style archive to link instead of a shared archive.
23554 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
23555
23556 # Commands used to build a shared archive.
23557 archive_cmds=$lt_archive_cmds
23558 archive_expsym_cmds=$lt_archive_expsym_cmds
23559
23560 # Commands used to build a loadable module if different from building
23561 # a shared archive.
23562 module_cmds=$lt_module_cmds
23563 module_expsym_cmds=$lt_module_expsym_cmds
23564
23565 # Whether we are building with GNU ld or not.
23566 with_gnu_ld=$lt_with_gnu_ld
23567
23568 # Flag that allows shared libraries with undefined symbols to be built.
23569 allow_undefined_flag=$lt_allow_undefined_flag
23570
23571 # Flag that enforces no undefined symbols.
23572 no_undefined_flag=$lt_no_undefined_flag
23573
23574 # Flag to hardcode \$libdir into a binary during linking.
23575 # This must work even if \$libdir does not exist
23576 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
23577
23578 # Whether we need a single "-rpath" flag with a separated argument.
23579 hardcode_libdir_separator=$lt_hardcode_libdir_separator
23580
23581 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23582 # DIR into the resulting binary.
23583 hardcode_direct=$hardcode_direct
23584
23585 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23586 # DIR into the resulting binary and the resulting library dependency is
23587 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
23588 # library is relocated.
23589 hardcode_direct_absolute=$hardcode_direct_absolute
23590
23591 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
23592 # into the resulting binary.
23593 hardcode_minus_L=$hardcode_minus_L
23594
23595 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
23596 # into the resulting binary.
23597 hardcode_shlibpath_var=$hardcode_shlibpath_var
23598
23599 # Set to "yes" if building a shared library automatically hardcodes DIR
23600 # into the library and all subsequent libraries and executables linked
23601 # against it.
23602 hardcode_automatic=$hardcode_automatic
23603
23604 # Set to yes if linker adds runtime paths of dependent libraries
23605 # to runtime path list.
23606 inherit_rpath=$inherit_rpath
23607
23608 # Whether libtool must link a program against all its dependency libraries.
23609 link_all_deplibs=$link_all_deplibs
23610
23611 # Set to "yes" if exported symbols are required.
23612 always_export_symbols=$always_export_symbols
23613
23614 # The commands to list exported symbols.
23615 export_symbols_cmds=$lt_export_symbols_cmds
23616
23617 # Symbols that should not be listed in the preloaded symbols.
23618 exclude_expsyms=$lt_exclude_expsyms
23619
23620 # Symbols that must always be exported.
23621 include_expsyms=$lt_include_expsyms
23622
23623 # Commands necessary for linking programs (against libraries) with templates.
23624 prelink_cmds=$lt_prelink_cmds
23625
23626 # Commands necessary for finishing linking programs.
23627 postlink_cmds=$lt_postlink_cmds
23628
23629 # Specify filename containing input files.
23630 file_list_spec=$lt_file_list_spec
23631
23632 # How to hardcode a shared library path into an executable.
23633 hardcode_action=$hardcode_action
23634
23635 # ### END LIBTOOL CONFIG
23636
23637 _LT_EOF
23638
23639     cat <<'_LT_EOF' >> "$cfgfile"
23640
23641 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
23642
23643 # func_munge_path_list VARIABLE PATH
23644 # -----------------------------------
23645 # VARIABLE is name of variable containing _space_ separated list of
23646 # directories to be munged by the contents of PATH, which is string
23647 # having a format:
23648 # "DIR[:DIR]:"
23649 #       string "DIR[ DIR]" will be prepended to VARIABLE
23650 # ":DIR[:DIR]"
23651 #       string "DIR[ DIR]" will be appended to VARIABLE
23652 # "DIRP[:DIRP]::[DIRA:]DIRA"
23653 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
23654 #       "DIRA[ DIRA]" will be appended to VARIABLE
23655 # "DIR[:DIR]"
23656 #       VARIABLE will be replaced by "DIR[ DIR]"
23657 func_munge_path_list ()
23658 {
23659     case x$2 in
23660     x)
23661         ;;
23662     *:)
23663         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
23664         ;;
23665     x:*)
23666         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
23667         ;;
23668     *::*)
23669         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
23670         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
23671         ;;
23672     *)
23673         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
23674         ;;
23675     esac
23676 }
23677
23678
23679 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
23680 func_cc_basename ()
23681 {
23682     for cc_temp in $*""; do
23683       case $cc_temp in
23684         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
23685         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
23686         \-*) ;;
23687         *) break;;
23688       esac
23689     done
23690     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
23691 }
23692
23693
23694 # ### END FUNCTIONS SHARED WITH CONFIGURE
23695
23696 _LT_EOF
23697
23698   case $host_os in
23699   aix3*)
23700     cat <<\_LT_EOF >> "$cfgfile"
23701 # AIX sometimes has problems with the GCC collect2 program.  For some
23702 # reason, if we set the COLLECT_NAMES environment variable, the problems
23703 # vanish in a puff of smoke.
23704 if test set != "${COLLECT_NAMES+set}"; then
23705   COLLECT_NAMES=
23706   export COLLECT_NAMES
23707 fi
23708 _LT_EOF
23709     ;;
23710   esac
23711
23712
23713 ltmain=$ac_aux_dir/ltmain.sh
23714
23715
23716   # We use sed instead of cat because bash on DJGPP gets confused if
23717   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
23718   # text mode, it properly converts lines to CR/LF.  This bash problem
23719   # is reportedly fixed, but why not run on old versions too?
23720   sed '$q' "$ltmain" >> "$cfgfile" \
23721      || (rm -f "$cfgfile"; exit 1)
23722
23723    mv -f "$cfgfile" "$ofile" ||
23724     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
23725   chmod +x "$ofile"
23726
23727  ;;
23728     "disable-rpath":C)
23729         sed < libtool > libtool-2 \
23730         's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
23731         mv libtool-2 libtool
23732         chmod 755 libtool
23733         libtool="./libtool"
23734          ;;
23735
23736   esac
23737 done # for ac_tag
23738
23739
23740 as_fn_exit 0
23741 _ACEOF
23742 ac_clean_files=$ac_clean_files_save
23743
23744 test $ac_write_fail = 0 ||
23745   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
23746
23747
23748 # configure is writing to config.log, and then calls config.status.
23749 # config.status does its own redirection, appending to config.log.
23750 # Unfortunately, on DOS this fails, as config.log is still kept open
23751 # by configure, so config.status won't be able to write to it; its
23752 # output is simply discarded.  So we exec the FD to /dev/null,
23753 # effectively closing config.log, so it can be properly (re)opened and
23754 # appended to by config.status.  When coming back to configure, we
23755 # need to make the FD available again.
23756 if test "$no_create" != yes; then
23757   ac_cs_success=:
23758   ac_config_status_args=
23759   test "$silent" = yes &&
23760     ac_config_status_args="$ac_config_status_args --quiet"
23761   exec 5>/dev/null
23762   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23763   exec 5>>config.log
23764   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23765   # would make configure fail if this is the last instruction.
23766   $ac_cs_success || as_fn_exit 1
23767 fi
23768 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
23769   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
23770 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
23771 fi
23772