]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/unbound/configure
Fix possibly unitialized variables in __cxa_demangle_gnu3()
[FreeBSD/FreeBSD.git] / contrib / unbound / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for unbound 1.13.1.
4 #
5 # Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
16
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20   emulate sh
21   NULLCMD=:
22   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23   # is contrary to our usage.  Disable this feature.
24   alias -g '${1+"$@"}'='"$@"'
25   setopt NO_GLOB_SUBST
26 else
27   case `(set -o) 2>/dev/null` in #(
28   *posix*) :
29     set -o posix ;; #(
30   *) :
31      ;;
32 esac
33 fi
34
35
36 as_nl='
37 '
38 export as_nl
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47   as_echo='print -r --'
48   as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50   as_echo='printf %s\n'
51   as_echo_n='printf %s'
52 else
53   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55     as_echo_n='/usr/ucb/echo -n'
56   else
57     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58     as_echo_n_body='eval
59       arg=$1;
60       case $arg in #(
61       *"$as_nl"*)
62         expr "X$arg" : "X\\(.*\\)$as_nl";
63         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64       esac;
65       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66     '
67     export as_echo_n_body
68     as_echo_n='sh -c $as_echo_n_body as_echo'
69   fi
70   export as_echo_body
71   as_echo='sh -c $as_echo_body as_echo'
72 fi
73
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
76   PATH_SEPARATOR=:
77   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79       PATH_SEPARATOR=';'
80   }
81 fi
82
83
84 # IFS
85 # We need space, tab and new line, in precisely that order.  Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
89 IFS=" ""        $as_nl"
90
91 # Find who we are.  Look in the path if we contain no directory separator.
92 as_myself=
93 case $0 in #((
94   *[\\/]* ) as_myself=$0 ;;
95   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96 for as_dir in $PATH
97 do
98   IFS=$as_save_IFS
99   test -z "$as_dir" && as_dir=.
100     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101   done
102 IFS=$as_save_IFS
103
104      ;;
105 esac
106 # We did not find ourselves, most probably we were run as `sh COMMAND'
107 # in which case we are not to be found in the path.
108 if test "x$as_myself" = x; then
109   as_myself=$0
110 fi
111 if test ! -f "$as_myself"; then
112   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113   exit 1
114 fi
115
116 # Unset variables that we do not need and which cause bugs (e.g. in
117 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118 # suppresses any "Segmentation fault" message there.  '((' could
119 # trigger a bug in pdksh 5.2.14.
120 for as_var in BASH_ENV ENV MAIL MAILPATH
121 do eval test x\${$as_var+set} = xset \
122   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123 done
124 PS1='$ '
125 PS2='> '
126 PS4='+ '
127
128 # NLS nuisances.
129 LC_ALL=C
130 export LC_ALL
131 LANGUAGE=C
132 export LANGUAGE
133
134 # CDPATH.
135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137 # Use a proper internal environment variable to ensure we don't fall
138   # into an infinite loop, continuously re-executing ourselves.
139   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140     _as_can_reexec=no; export _as_can_reexec;
141     # We cannot yet assume a decent shell, so we have to provide a
142 # neutralization value for shells without unset; and this also
143 # works around shells that cannot unset nonexistent variables.
144 # Preserve -v and -x to the replacement shell.
145 BASH_ENV=/dev/null
146 ENV=/dev/null
147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148 case $- in # ((((
149   *v*x* | *x*v* ) as_opts=-vx ;;
150   *v* ) as_opts=-v ;;
151   *x* ) as_opts=-x ;;
152   * ) as_opts= ;;
153 esac
154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155 # Admittedly, this is quite paranoid, since all the known shells bail
156 # out after a failed `exec'.
157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158 as_fn_exit 255
159   fi
160   # We don't want this to propagate to other subprocesses.
161           { _as_can_reexec=; unset _as_can_reexec;}
162 if test "x$CONFIG_SHELL" = x; then
163   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164   emulate sh
165   NULLCMD=:
166   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167   # is contrary to our usage.  Disable this feature.
168   alias -g '\${1+\"\$@\"}'='\"\$@\"'
169   setopt NO_GLOB_SUBST
170 else
171   case \`(set -o) 2>/dev/null\` in #(
172   *posix*) :
173     set -o posix ;; #(
174   *) :
175      ;;
176 esac
177 fi
178 "
179   as_required="as_fn_return () { (exit \$1); }
180 as_fn_success () { as_fn_return 0; }
181 as_fn_failure () { as_fn_return 1; }
182 as_fn_ret_success () { return 0; }
183 as_fn_ret_failure () { return 1; }
184
185 exitcode=0
186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192 else
193   exitcode=1; echo positional parameters were not saved.
194 fi
195 test x\$exitcode = x0 || exit 1
196 test -x / || exit 1"
197   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201 test \$(( 1 + 1 )) = 2 || exit 1
202
203   test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
204     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
205     ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
206     ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
207     PATH=/empty FPATH=/empty; export PATH FPATH
208     test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
209       || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
210   if (eval "$as_required") 2>/dev/null; then :
211   as_have_required=yes
212 else
213   as_have_required=no
214 fi
215   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
216
217 else
218   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
219 as_found=false
220 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
221 do
222   IFS=$as_save_IFS
223   test -z "$as_dir" && as_dir=.
224   as_found=:
225   case $as_dir in #(
226          /*)
227            for as_base in sh bash ksh sh5; do
228              # Try only shells that exist, to save several forks.
229              as_shell=$as_dir/$as_base
230              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
231                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
232   CONFIG_SHELL=$as_shell as_have_required=yes
233                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
234   break 2
235 fi
236 fi
237            done;;
238        esac
239   as_found=false
240 done
241 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
242               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
243   CONFIG_SHELL=$SHELL as_have_required=yes
244 fi; }
245 IFS=$as_save_IFS
246
247
248       if test "x$CONFIG_SHELL" != x; then :
249   export CONFIG_SHELL
250              # We cannot yet assume a decent shell, so we have to provide a
251 # neutralization value for shells without unset; and this also
252 # works around shells that cannot unset nonexistent variables.
253 # Preserve -v and -x to the replacement shell.
254 BASH_ENV=/dev/null
255 ENV=/dev/null
256 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
257 case $- in # ((((
258   *v*x* | *x*v* ) as_opts=-vx ;;
259   *v* ) as_opts=-v ;;
260   *x* ) as_opts=-x ;;
261   * ) as_opts= ;;
262 esac
263 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
264 # Admittedly, this is quite paranoid, since all the known shells bail
265 # out after a failed `exec'.
266 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
267 exit 255
268 fi
269
270     if test x$as_have_required = xno; then :
271   $as_echo "$0: This script requires a shell more modern than all"
272   $as_echo "$0: the shells that I found on your system."
273   if test x${ZSH_VERSION+set} = xset ; then
274     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
275     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
276   else
277     $as_echo "$0: Please tell bug-autoconf@gnu.org and
278 $0: unbound-bugs@nlnetlabs.nl or
279 $0: https://github.com/NLnetLabs/unbound/issues about your
280 $0: system, including any error possibly output before this
281 $0: message. Then install a modern shell, or manually run
282 $0: the script under such a shell if you do have one."
283   fi
284   exit 1
285 fi
286 fi
287 fi
288 SHELL=${CONFIG_SHELL-/bin/sh}
289 export SHELL
290 # Unset more variables known to interfere with behavior of common tools.
291 CLICOLOR_FORCE= GREP_OPTIONS=
292 unset CLICOLOR_FORCE GREP_OPTIONS
293
294 ## --------------------- ##
295 ## M4sh Shell Functions. ##
296 ## --------------------- ##
297 # as_fn_unset VAR
298 # ---------------
299 # Portably unset VAR.
300 as_fn_unset ()
301 {
302   { eval $1=; unset $1;}
303 }
304 as_unset=as_fn_unset
305
306 # as_fn_set_status STATUS
307 # -----------------------
308 # Set $? to STATUS, without forking.
309 as_fn_set_status ()
310 {
311   return $1
312 } # as_fn_set_status
313
314 # as_fn_exit STATUS
315 # -----------------
316 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
317 as_fn_exit ()
318 {
319   set +e
320   as_fn_set_status $1
321   exit $1
322 } # as_fn_exit
323
324 # as_fn_mkdir_p
325 # -------------
326 # Create "$as_dir" as a directory, including parents if necessary.
327 as_fn_mkdir_p ()
328 {
329
330   case $as_dir in #(
331   -*) as_dir=./$as_dir;;
332   esac
333   test -d "$as_dir" || eval $as_mkdir_p || {
334     as_dirs=
335     while :; do
336       case $as_dir in #(
337       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
338       *) as_qdir=$as_dir;;
339       esac
340       as_dirs="'$as_qdir' $as_dirs"
341       as_dir=`$as_dirname -- "$as_dir" ||
342 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
343          X"$as_dir" : 'X\(//\)[^/]' \| \
344          X"$as_dir" : 'X\(//\)$' \| \
345          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
346 $as_echo X"$as_dir" |
347     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
348             s//\1/
349             q
350           }
351           /^X\(\/\/\)[^/].*/{
352             s//\1/
353             q
354           }
355           /^X\(\/\/\)$/{
356             s//\1/
357             q
358           }
359           /^X\(\/\).*/{
360             s//\1/
361             q
362           }
363           s/.*/./; q'`
364       test -d "$as_dir" && break
365     done
366     test -z "$as_dirs" || eval "mkdir $as_dirs"
367   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
368
369
370 } # as_fn_mkdir_p
371
372 # as_fn_executable_p FILE
373 # -----------------------
374 # Test if FILE is an executable regular file.
375 as_fn_executable_p ()
376 {
377   test -f "$1" && test -x "$1"
378 } # as_fn_executable_p
379 # as_fn_append VAR VALUE
380 # ----------------------
381 # Append the text in VALUE to the end of the definition contained in VAR. Take
382 # advantage of any shell optimizations that allow amortized linear growth over
383 # repeated appends, instead of the typical quadratic growth present in naive
384 # implementations.
385 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
386   eval 'as_fn_append ()
387   {
388     eval $1+=\$2
389   }'
390 else
391   as_fn_append ()
392   {
393     eval $1=\$$1\$2
394   }
395 fi # as_fn_append
396
397 # as_fn_arith ARG...
398 # ------------------
399 # Perform arithmetic evaluation on the ARGs, and store the result in the
400 # global $as_val. Take advantage of shells that can avoid forks. The arguments
401 # must be portable across $(()) and expr.
402 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
403   eval 'as_fn_arith ()
404   {
405     as_val=$(( $* ))
406   }'
407 else
408   as_fn_arith ()
409   {
410     as_val=`expr "$@" || test $? -eq 1`
411   }
412 fi # as_fn_arith
413
414
415 # as_fn_error STATUS ERROR [LINENO LOG_FD]
416 # ----------------------------------------
417 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
418 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
419 # script with STATUS, using 1 if that was 0.
420 as_fn_error ()
421 {
422   as_status=$1; test $as_status -eq 0 && as_status=1
423   if test "$4"; then
424     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
425     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
426   fi
427   $as_echo "$as_me: error: $2" >&2
428   as_fn_exit $as_status
429 } # as_fn_error
430
431 if expr a : '\(a\)' >/dev/null 2>&1 &&
432    test "X`expr 00001 : '.*\(...\)'`" = X001; then
433   as_expr=expr
434 else
435   as_expr=false
436 fi
437
438 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
439   as_basename=basename
440 else
441   as_basename=false
442 fi
443
444 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
445   as_dirname=dirname
446 else
447   as_dirname=false
448 fi
449
450 as_me=`$as_basename -- "$0" ||
451 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
452          X"$0" : 'X\(//\)$' \| \
453          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
454 $as_echo X/"$0" |
455     sed '/^.*\/\([^/][^/]*\)\/*$/{
456             s//\1/
457             q
458           }
459           /^X\/\(\/\/\)$/{
460             s//\1/
461             q
462           }
463           /^X\/\(\/\).*/{
464             s//\1/
465             q
466           }
467           s/.*/./; q'`
468
469 # Avoid depending upon Character Ranges.
470 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
471 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
472 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
473 as_cr_digits='0123456789'
474 as_cr_alnum=$as_cr_Letters$as_cr_digits
475
476
477   as_lineno_1=$LINENO as_lineno_1a=$LINENO
478   as_lineno_2=$LINENO as_lineno_2a=$LINENO
479   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
480   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
481   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
482   sed -n '
483     p
484     /[$]LINENO/=
485   ' <$as_myself |
486     sed '
487       s/[$]LINENO.*/&-/
488       t lineno
489       b
490       :lineno
491       N
492       :loop
493       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
494       t loop
495       s/-\n.*//
496     ' >$as_me.lineno &&
497   chmod +x "$as_me.lineno" ||
498     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
499
500   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
501   # already done that, so ensure we don't try to do so again and fall
502   # in an infinite loop.  This has already happened in practice.
503   _as_can_reexec=no; export _as_can_reexec
504   # Don't try to exec as it changes $[0], causing all sort of problems
505   # (the dirname of $[0] is not the place where we might find the
506   # original and so on.  Autoconf is especially sensitive to this).
507   . "./$as_me.lineno"
508   # Exit status is that of the last command.
509   exit
510 }
511
512 ECHO_C= ECHO_N= ECHO_T=
513 case `echo -n x` in #(((((
514 -n*)
515   case `echo 'xy\c'` in
516   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
517   xy)  ECHO_C='\c';;
518   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
519        ECHO_T=' ';;
520   esac;;
521 *)
522   ECHO_N='-n';;
523 esac
524
525 rm -f conf$$ conf$$.exe conf$$.file
526 if test -d conf$$.dir; then
527   rm -f conf$$.dir/conf$$.file
528 else
529   rm -f conf$$.dir
530   mkdir conf$$.dir 2>/dev/null
531 fi
532 if (echo >conf$$.file) 2>/dev/null; then
533   if ln -s conf$$.file conf$$ 2>/dev/null; then
534     as_ln_s='ln -s'
535     # ... but there are two gotchas:
536     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
537     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
538     # In both cases, we have to default to `cp -pR'.
539     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
540       as_ln_s='cp -pR'
541   elif ln conf$$.file conf$$ 2>/dev/null; then
542     as_ln_s=ln
543   else
544     as_ln_s='cp -pR'
545   fi
546 else
547   as_ln_s='cp -pR'
548 fi
549 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
550 rmdir conf$$.dir 2>/dev/null
551
552 if mkdir -p . 2>/dev/null; then
553   as_mkdir_p='mkdir -p "$as_dir"'
554 else
555   test -d ./-p && rmdir ./-p
556   as_mkdir_p=false
557 fi
558
559 as_test_x='test -x'
560 as_executable_p=as_fn_executable_p
561
562 # Sed expression to map a string onto a valid CPP name.
563 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
564
565 # Sed expression to map a string onto a valid variable name.
566 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
567
568 SHELL=${CONFIG_SHELL-/bin/sh}
569
570
571 test -n "$DJDIR" || exec 7<&0 </dev/null
572 exec 6>&1
573
574 # Name of the host.
575 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
576 # so uname gets run too.
577 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
578
579 #
580 # Initializations.
581 #
582 ac_default_prefix=/usr/local
583 ac_clean_files=
584 ac_config_libobj_dir=.
585 LIBOBJS=
586 cross_compiling=no
587 subdirs=
588 MFLAGS=
589 MAKEFLAGS=
590
591 # Identity of this package.
592 PACKAGE_NAME='unbound'
593 PACKAGE_TARNAME='unbound'
594 PACKAGE_VERSION='1.13.1'
595 PACKAGE_STRING='unbound 1.13.1'
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_TESTBIN
653 DNSTAP_SOCKET_PATH
654 opt_dnstap_socket_path
655 ENABLE_DNSTAP
656 PROTOC_C
657 UBSYMS
658 EXTRALINK
659 COMMON_OBJ_ALL_SYMBOLS
660 LIBOBJ_WITHOUT_CTIME
661 LIBOBJ_WITHOUT_CTIMEARC4
662 WIN_CHECKCONF_OBJ_LINK
663 WIN_CONTROL_OBJ_LINK
664 WIN_UBANCHOR_OBJ_LINK
665 WIN_HOST_OBJ_LINK
666 WIN_DAEMON_OBJ_LINK
667 WIN_DAEMON_OBJ
668 WIN_DAEMON_SRC
669 WINAPPS
670 WINDRES
671 CHECKLOCK_OBJ
672 staticexe
673 PC_LIBEVENT_DEPENDENCY
674 UNBOUND_EVENT_UNINSTALL
675 UNBOUND_EVENT_INSTALL
676 SUBNET_HEADER
677 SUBNET_OBJ
678 PC_LIBBSD_DEPENDENCY
679 SSLLIB
680 HAVE_SSL
681 PC_CRYPTO_DEPENDENCY
682 CONFIG_DATE
683 NETBSD_LINTFLAGS
684 PYUNBOUND_UNINSTALL
685 PYUNBOUND_INSTALL
686 PYUNBOUND_TARGET
687 PYUNBOUND_OBJ
688 WITH_PYUNBOUND
689 PYTHONMOD_UNINSTALL
690 PYTHONMOD_INSTALL
691 PYTHONMOD_HEADER
692 PYTHONMOD_OBJ
693 WITH_PYTHONMODULE
694 swig
695 SWIG_LIB
696 SWIG
697 PC_PY_DEPENDENCY
698 PY_MAJOR_VERSION
699 PYTHON_SITE_PKG
700 PYTHON_LDFLAGS
701 PYTHON_CPPFLAGS
702 PYTHON
703 PYTHON_VERSION
704 DYNLIBMOD_EXTRALIBS
705 DYNLIBMOD_HEADER
706 DYNLIBMOD_OBJ
707 WITH_DYNLIBMODULE
708 PTHREAD_CFLAGS_ONLY
709 PTHREAD_CFLAGS
710 PTHREAD_LIBS
711 PTHREAD_CC
712 ax_pthread_config
713 ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ
714 SLDNS_ALLOCCHECK_EXTRA_OBJ
715 USE_SYSTEMD_FALSE
716 USE_SYSTEMD_TRUE
717 SYSTEMD_DAEMON_LIBS
718 SYSTEMD_DAEMON_CFLAGS
719 SYSTEMD_LIBS
720 SYSTEMD_CFLAGS
721 RUNTIME_PATH
722 LIBOBJS
723 PKG_CONFIG_LIBDIR
724 PKG_CONFIG_PATH
725 PKG_CONFIG
726 LT_SYS_LIBRARY_PATH
727 OTOOL64
728 OTOOL
729 LIPO
730 NMEDIT
731 DSYMUTIL
732 MANIFEST_TOOL
733 AWK
734 RANLIB
735 ac_ct_AR
736 DLLTOOL
737 OBJDUMP
738 LN_S
739 NM
740 ac_ct_DUMPBIN
741 DUMPBIN
742 LD
743 FGREP
744 SED
745 LIBTOOL
746 AR
747 host_os
748 host_vendor
749 host_cpu
750 host
751 build_os
752 build_vendor
753 build_cpu
754 build
755 libtool
756 STRIP
757 doxygen
758 YFLAGS
759 YACC
760 LEXLIB
761 LEX_OUTPUT_ROOT
762 LEX
763 debug_enabled
764 DEPFLAG
765 UNBOUND_USERNAME
766 UNBOUND_ROOTCERT_FILE
767 UNBOUND_ROOTKEY_FILE
768 UNBOUND_PIDFILE
769 UNBOUND_SHARE_DIR
770 UNBOUND_CHROOT_DIR
771 UNBOUND_RUN_DIR
772 ub_conf_dir
773 ub_conf_file
774 UNBOUND_LOCALSTATE_DIR
775 UNBOUND_SYSCONF_DIR
776 UNBOUND_SBIN_DIR
777 EGREP
778 GREP
779 CPP
780 OBJEXT
781 EXEEXT
782 ac_ct_CC
783 CPPFLAGS
784 LDFLAGS
785 CFLAGS
786 CC
787 LIBUNBOUND_AGE
788 LIBUNBOUND_REVISION
789 LIBUNBOUND_CURRENT
790 UNBOUND_VERSION_MICRO
791 UNBOUND_VERSION_MINOR
792 UNBOUND_VERSION_MAJOR
793 target_alias
794 host_alias
795 build_alias
796 LIBS
797 ECHO_T
798 ECHO_N
799 ECHO_C
800 DEFS
801 mandir
802 localedir
803 libdir
804 psdir
805 pdfdir
806 dvidir
807 htmldir
808 infodir
809 docdir
810 oldincludedir
811 includedir
812 localstatedir
813 sharedstatedir
814 sysconfdir
815 datadir
816 datarootdir
817 libexecdir
818 sbindir
819 bindir
820 program_transform_name
821 prefix
822 exec_prefix
823 PACKAGE_URL
824 PACKAGE_BUGREPORT
825 PACKAGE_STRING
826 PACKAGE_VERSION
827 PACKAGE_TARNAME
828 PACKAGE_NAME
829 PATH_SEPARATOR
830 SHELL'
831 ac_subst_files=''
832 ac_user_opts='
833 enable_option_checking
834 with_conf_file
835 with_run_dir
836 with_chroot_dir
837 with_share_dir
838 with_pidfile
839 with_rootkey_file
840 with_rootcert_file
841 with_username
842 enable_checking
843 enable_debug
844 enable_flto
845 enable_pie
846 enable_relro_now
847 enable_shared
848 enable_static
849 with_pic
850 enable_fast_install
851 with_aix_soname
852 with_gnu_ld
853 with_sysroot
854 enable_libtool_lock
855 enable_rpath
856 enable_largefile
857 enable_systemd
858 enable_alloc_checks
859 enable_alloc_lite
860 enable_alloc_nonregional
861 with_pthreads
862 with_solaris_threads
863 with_syslog_facility
864 with_dynlibmodule
865 with_pyunbound
866 with_pythonmodule
867 enable_swig_version_check
868 with_nss
869 with_nettle
870 with_ssl
871 with_libbsd
872 enable_sha1
873 enable_sha2
874 enable_subnet
875 enable_gost
876 enable_ecdsa
877 enable_dsa
878 enable_ed25519
879 enable_ed448
880 enable_event_api
881 enable_tfo_client
882 enable_tfo_server
883 with_libevent
884 with_libexpat
885 with_libhiredis
886 with_libnghttp2
887 enable_static_exe
888 enable_fully_static
889 enable_lock_checks
890 enable_allsymbols
891 enable_dnstap
892 with_dnstap_socket_path
893 with_protobuf_c
894 enable_dnscrypt
895 with_libsodium
896 enable_cachedb
897 enable_ipsecmod
898 enable_ipset
899 with_libmnl
900 enable_explicit_port_randomisation
901 with_libunbound_only
902 '
903       ac_precious_vars='build_alias
904 host_alias
905 target_alias
906 CC
907 CFLAGS
908 LDFLAGS
909 LIBS
910 CPPFLAGS
911 CPP
912 YACC
913 YFLAGS
914 LT_SYS_LIBRARY_PATH
915 PKG_CONFIG
916 PKG_CONFIG_PATH
917 PKG_CONFIG_LIBDIR
918 SYSTEMD_CFLAGS
919 SYSTEMD_LIBS
920 SYSTEMD_DAEMON_CFLAGS
921 SYSTEMD_DAEMON_LIBS
922 PYTHON_VERSION'
923
924
925 # Initialize some variables set by options.
926 ac_init_help=
927 ac_init_version=false
928 ac_unrecognized_opts=
929 ac_unrecognized_sep=
930 # The variables have the same names as the options, with
931 # dashes changed to underlines.
932 cache_file=/dev/null
933 exec_prefix=NONE
934 no_create=
935 no_recursion=
936 prefix=NONE
937 program_prefix=NONE
938 program_suffix=NONE
939 program_transform_name=s,x,x,
940 silent=
941 site=
942 srcdir=
943 verbose=
944 x_includes=NONE
945 x_libraries=NONE
946
947 # Installation directory options.
948 # These are left unexpanded so users can "make install exec_prefix=/foo"
949 # and all the variables that are supposed to be based on exec_prefix
950 # by default will actually change.
951 # Use braces instead of parens because sh, perl, etc. also accept them.
952 # (The list follows the same order as the GNU Coding Standards.)
953 bindir='${exec_prefix}/bin'
954 sbindir='${exec_prefix}/sbin'
955 libexecdir='${exec_prefix}/libexec'
956 datarootdir='${prefix}/share'
957 datadir='${datarootdir}'
958 sysconfdir='${prefix}/etc'
959 sharedstatedir='${prefix}/com'
960 localstatedir='${prefix}/var'
961 includedir='${prefix}/include'
962 oldincludedir='/usr/include'
963 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
964 infodir='${datarootdir}/info'
965 htmldir='${docdir}'
966 dvidir='${docdir}'
967 pdfdir='${docdir}'
968 psdir='${docdir}'
969 libdir='${exec_prefix}/lib'
970 localedir='${datarootdir}/locale'
971 mandir='${datarootdir}/man'
972
973 ac_prev=
974 ac_dashdash=
975 for ac_option
976 do
977   # If the previous option needs an argument, assign it.
978   if test -n "$ac_prev"; then
979     eval $ac_prev=\$ac_option
980     ac_prev=
981     continue
982   fi
983
984   case $ac_option in
985   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
986   *=)   ac_optarg= ;;
987   *)    ac_optarg=yes ;;
988   esac
989
990   # Accept the important Cygnus configure options, so we can diagnose typos.
991
992   case $ac_dashdash$ac_option in
993   --)
994     ac_dashdash=yes ;;
995
996   -bindir | --bindir | --bindi | --bind | --bin | --bi)
997     ac_prev=bindir ;;
998   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
999     bindir=$ac_optarg ;;
1000
1001   -build | --build | --buil | --bui | --bu)
1002     ac_prev=build_alias ;;
1003   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1004     build_alias=$ac_optarg ;;
1005
1006   -cache-file | --cache-file | --cache-fil | --cache-fi \
1007   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1008     ac_prev=cache_file ;;
1009   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1010   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1011     cache_file=$ac_optarg ;;
1012
1013   --config-cache | -C)
1014     cache_file=config.cache ;;
1015
1016   -datadir | --datadir | --datadi | --datad)
1017     ac_prev=datadir ;;
1018   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1019     datadir=$ac_optarg ;;
1020
1021   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1022   | --dataroo | --dataro | --datar)
1023     ac_prev=datarootdir ;;
1024   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1025   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1026     datarootdir=$ac_optarg ;;
1027
1028   -disable-* | --disable-*)
1029     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1030     # Reject names that are not valid shell variable names.
1031     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1032       as_fn_error $? "invalid feature name: $ac_useropt"
1033     ac_useropt_orig=$ac_useropt
1034     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1035     case $ac_user_opts in
1036       *"
1037 "enable_$ac_useropt"
1038 "*) ;;
1039       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1040          ac_unrecognized_sep=', ';;
1041     esac
1042     eval enable_$ac_useropt=no ;;
1043
1044   -docdir | --docdir | --docdi | --doc | --do)
1045     ac_prev=docdir ;;
1046   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1047     docdir=$ac_optarg ;;
1048
1049   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1050     ac_prev=dvidir ;;
1051   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1052     dvidir=$ac_optarg ;;
1053
1054   -enable-* | --enable-*)
1055     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1056     # Reject names that are not valid shell variable names.
1057     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1058       as_fn_error $? "invalid feature name: $ac_useropt"
1059     ac_useropt_orig=$ac_useropt
1060     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1061     case $ac_user_opts in
1062       *"
1063 "enable_$ac_useropt"
1064 "*) ;;
1065       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1066          ac_unrecognized_sep=', ';;
1067     esac
1068     eval enable_$ac_useropt=\$ac_optarg ;;
1069
1070   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1071   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1072   | --exec | --exe | --ex)
1073     ac_prev=exec_prefix ;;
1074   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1075   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1076   | --exec=* | --exe=* | --ex=*)
1077     exec_prefix=$ac_optarg ;;
1078
1079   -gas | --gas | --ga | --g)
1080     # Obsolete; use --with-gas.
1081     with_gas=yes ;;
1082
1083   -help | --help | --hel | --he | -h)
1084     ac_init_help=long ;;
1085   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1086     ac_init_help=recursive ;;
1087   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1088     ac_init_help=short ;;
1089
1090   -host | --host | --hos | --ho)
1091     ac_prev=host_alias ;;
1092   -host=* | --host=* | --hos=* | --ho=*)
1093     host_alias=$ac_optarg ;;
1094
1095   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1096     ac_prev=htmldir ;;
1097   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1098   | --ht=*)
1099     htmldir=$ac_optarg ;;
1100
1101   -includedir | --includedir | --includedi | --included | --include \
1102   | --includ | --inclu | --incl | --inc)
1103     ac_prev=includedir ;;
1104   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1105   | --includ=* | --inclu=* | --incl=* | --inc=*)
1106     includedir=$ac_optarg ;;
1107
1108   -infodir | --infodir | --infodi | --infod | --info | --inf)
1109     ac_prev=infodir ;;
1110   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1111     infodir=$ac_optarg ;;
1112
1113   -libdir | --libdir | --libdi | --libd)
1114     ac_prev=libdir ;;
1115   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1116     libdir=$ac_optarg ;;
1117
1118   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1119   | --libexe | --libex | --libe)
1120     ac_prev=libexecdir ;;
1121   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1122   | --libexe=* | --libex=* | --libe=*)
1123     libexecdir=$ac_optarg ;;
1124
1125   -localedir | --localedir | --localedi | --localed | --locale)
1126     ac_prev=localedir ;;
1127   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1128     localedir=$ac_optarg ;;
1129
1130   -localstatedir | --localstatedir | --localstatedi | --localstated \
1131   | --localstate | --localstat | --localsta | --localst | --locals)
1132     ac_prev=localstatedir ;;
1133   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1134   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1135     localstatedir=$ac_optarg ;;
1136
1137   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1138     ac_prev=mandir ;;
1139   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1140     mandir=$ac_optarg ;;
1141
1142   -nfp | --nfp | --nf)
1143     # Obsolete; use --without-fp.
1144     with_fp=no ;;
1145
1146   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1147   | --no-cr | --no-c | -n)
1148     no_create=yes ;;
1149
1150   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1151   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1152     no_recursion=yes ;;
1153
1154   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1155   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1156   | --oldin | --oldi | --old | --ol | --o)
1157     ac_prev=oldincludedir ;;
1158   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1159   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1160   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1161     oldincludedir=$ac_optarg ;;
1162
1163   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1164     ac_prev=prefix ;;
1165   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1166     prefix=$ac_optarg ;;
1167
1168   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1169   | --program-pre | --program-pr | --program-p)
1170     ac_prev=program_prefix ;;
1171   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1172   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1173     program_prefix=$ac_optarg ;;
1174
1175   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1176   | --program-suf | --program-su | --program-s)
1177     ac_prev=program_suffix ;;
1178   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1179   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1180     program_suffix=$ac_optarg ;;
1181
1182   -program-transform-name | --program-transform-name \
1183   | --program-transform-nam | --program-transform-na \
1184   | --program-transform-n | --program-transform- \
1185   | --program-transform | --program-transfor \
1186   | --program-transfo | --program-transf \
1187   | --program-trans | --program-tran \
1188   | --progr-tra | --program-tr | --program-t)
1189     ac_prev=program_transform_name ;;
1190   -program-transform-name=* | --program-transform-name=* \
1191   | --program-transform-nam=* | --program-transform-na=* \
1192   | --program-transform-n=* | --program-transform-=* \
1193   | --program-transform=* | --program-transfor=* \
1194   | --program-transfo=* | --program-transf=* \
1195   | --program-trans=* | --program-tran=* \
1196   | --progr-tra=* | --program-tr=* | --program-t=*)
1197     program_transform_name=$ac_optarg ;;
1198
1199   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1200     ac_prev=pdfdir ;;
1201   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1202     pdfdir=$ac_optarg ;;
1203
1204   -psdir | --psdir | --psdi | --psd | --ps)
1205     ac_prev=psdir ;;
1206   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1207     psdir=$ac_optarg ;;
1208
1209   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1210   | -silent | --silent | --silen | --sile | --sil)
1211     silent=yes ;;
1212
1213   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1214     ac_prev=sbindir ;;
1215   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1216   | --sbi=* | --sb=*)
1217     sbindir=$ac_optarg ;;
1218
1219   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1220   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1221   | --sharedst | --shareds | --shared | --share | --shar \
1222   | --sha | --sh)
1223     ac_prev=sharedstatedir ;;
1224   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1225   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1226   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1227   | --sha=* | --sh=*)
1228     sharedstatedir=$ac_optarg ;;
1229
1230   -site | --site | --sit)
1231     ac_prev=site ;;
1232   -site=* | --site=* | --sit=*)
1233     site=$ac_optarg ;;
1234
1235   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1236     ac_prev=srcdir ;;
1237   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1238     srcdir=$ac_optarg ;;
1239
1240   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1241   | --syscon | --sysco | --sysc | --sys | --sy)
1242     ac_prev=sysconfdir ;;
1243   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1244   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1245     sysconfdir=$ac_optarg ;;
1246
1247   -target | --target | --targe | --targ | --tar | --ta | --t)
1248     ac_prev=target_alias ;;
1249   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1250     target_alias=$ac_optarg ;;
1251
1252   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1253     verbose=yes ;;
1254
1255   -version | --version | --versio | --versi | --vers | -V)
1256     ac_init_version=: ;;
1257
1258   -with-* | --with-*)
1259     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1260     # Reject names that are not valid shell variable names.
1261     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1262       as_fn_error $? "invalid package name: $ac_useropt"
1263     ac_useropt_orig=$ac_useropt
1264     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1265     case $ac_user_opts in
1266       *"
1267 "with_$ac_useropt"
1268 "*) ;;
1269       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1270          ac_unrecognized_sep=', ';;
1271     esac
1272     eval with_$ac_useropt=\$ac_optarg ;;
1273
1274   -without-* | --without-*)
1275     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1276     # Reject names that are not valid shell variable names.
1277     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1278       as_fn_error $? "invalid package name: $ac_useropt"
1279     ac_useropt_orig=$ac_useropt
1280     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1281     case $ac_user_opts in
1282       *"
1283 "with_$ac_useropt"
1284 "*) ;;
1285       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1286          ac_unrecognized_sep=', ';;
1287     esac
1288     eval with_$ac_useropt=no ;;
1289
1290   --x)
1291     # Obsolete; use --with-x.
1292     with_x=yes ;;
1293
1294   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1295   | --x-incl | --x-inc | --x-in | --x-i)
1296     ac_prev=x_includes ;;
1297   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1298   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1299     x_includes=$ac_optarg ;;
1300
1301   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1302   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1303     ac_prev=x_libraries ;;
1304   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1305   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1306     x_libraries=$ac_optarg ;;
1307
1308   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1309 Try \`$0 --help' for more information"
1310     ;;
1311
1312   *=*)
1313     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1314     # Reject names that are not valid shell variable names.
1315     case $ac_envvar in #(
1316       '' | [0-9]* | *[!_$as_cr_alnum]* )
1317       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1318     esac
1319     eval $ac_envvar=\$ac_optarg
1320     export $ac_envvar ;;
1321
1322   *)
1323     # FIXME: should be removed in autoconf 3.0.
1324     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1325     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1326       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1327     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1328     ;;
1329
1330   esac
1331 done
1332
1333 if test -n "$ac_prev"; then
1334   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1335   as_fn_error $? "missing argument to $ac_option"
1336 fi
1337
1338 if test -n "$ac_unrecognized_opts"; then
1339   case $enable_option_checking in
1340     no) ;;
1341     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1342     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1343   esac
1344 fi
1345
1346 # Check all directory arguments for consistency.
1347 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1348                 datadir sysconfdir sharedstatedir localstatedir includedir \
1349                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1350                 libdir localedir mandir
1351 do
1352   eval ac_val=\$$ac_var
1353   # Remove trailing slashes.
1354   case $ac_val in
1355     */ )
1356       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1357       eval $ac_var=\$ac_val;;
1358   esac
1359   # Be sure to have absolute directory names.
1360   case $ac_val in
1361     [\\/$]* | ?:[\\/]* )  continue;;
1362     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1363   esac
1364   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1365 done
1366
1367 # There might be people who depend on the old broken behavior: `$host'
1368 # used to hold the argument of --host etc.
1369 # FIXME: To remove some day.
1370 build=$build_alias
1371 host=$host_alias
1372 target=$target_alias
1373
1374 # FIXME: To remove some day.
1375 if test "x$host_alias" != x; then
1376   if test "x$build_alias" = x; then
1377     cross_compiling=maybe
1378   elif test "x$build_alias" != "x$host_alias"; then
1379     cross_compiling=yes
1380   fi
1381 fi
1382
1383 ac_tool_prefix=
1384 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1385
1386 test "$silent" = yes && exec 6>/dev/null
1387
1388
1389 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1390 ac_ls_di=`ls -di .` &&
1391 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1392   as_fn_error $? "working directory cannot be determined"
1393 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1394   as_fn_error $? "pwd does not report name of working directory"
1395
1396
1397 # Find the source files, if location was not specified.
1398 if test -z "$srcdir"; then
1399   ac_srcdir_defaulted=yes
1400   # Try the directory containing this script, then the parent directory.
1401   ac_confdir=`$as_dirname -- "$as_myself" ||
1402 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1403          X"$as_myself" : 'X\(//\)[^/]' \| \
1404          X"$as_myself" : 'X\(//\)$' \| \
1405          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1406 $as_echo X"$as_myself" |
1407     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1408             s//\1/
1409             q
1410           }
1411           /^X\(\/\/\)[^/].*/{
1412             s//\1/
1413             q
1414           }
1415           /^X\(\/\/\)$/{
1416             s//\1/
1417             q
1418           }
1419           /^X\(\/\).*/{
1420             s//\1/
1421             q
1422           }
1423           s/.*/./; q'`
1424   srcdir=$ac_confdir
1425   if test ! -r "$srcdir/$ac_unique_file"; then
1426     srcdir=..
1427   fi
1428 else
1429   ac_srcdir_defaulted=no
1430 fi
1431 if test ! -r "$srcdir/$ac_unique_file"; then
1432   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1433   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1434 fi
1435 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1436 ac_abs_confdir=`(
1437         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1438         pwd)`
1439 # When building in place, set srcdir=.
1440 if test "$ac_abs_confdir" = "$ac_pwd"; then
1441   srcdir=.
1442 fi
1443 # Remove unnecessary trailing slashes from srcdir.
1444 # Double slashes in file names in object file debugging info
1445 # mess up M-x gdb in Emacs.
1446 case $srcdir in
1447 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1448 esac
1449 for ac_var in $ac_precious_vars; do
1450   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1451   eval ac_env_${ac_var}_value=\$${ac_var}
1452   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1453   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1454 done
1455
1456 #
1457 # Report the --help message.
1458 #
1459 if test "$ac_init_help" = "long"; then
1460   # Omit some internal or obsolete options to make the list less imposing.
1461   # This message is too long to be a string in the A/UX 3.1 sh.
1462   cat <<_ACEOF
1463 \`configure' configures unbound 1.13.1 to adapt to many kinds of systems.
1464
1465 Usage: $0 [OPTION]... [VAR=VALUE]...
1466
1467 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1468 VAR=VALUE.  See below for descriptions of some of the useful variables.
1469
1470 Defaults for the options are specified in brackets.
1471
1472 Configuration:
1473   -h, --help              display this help and exit
1474       --help=short        display options specific to this package
1475       --help=recursive    display the short help of all the included packages
1476   -V, --version           display version information and exit
1477   -q, --quiet, --silent   do not print \`checking ...' messages
1478       --cache-file=FILE   cache test results in FILE [disabled]
1479   -C, --config-cache      alias for \`--cache-file=config.cache'
1480   -n, --no-create         do not create output files
1481       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1482
1483 Installation directories:
1484   --prefix=PREFIX         install architecture-independent files in PREFIX
1485                           [$ac_default_prefix]
1486   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1487                           [PREFIX]
1488
1489 By default, \`make install' will install all the files in
1490 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1491 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1492 for instance \`--prefix=\$HOME'.
1493
1494 For better control, use the options below.
1495
1496 Fine tuning of the installation directories:
1497   --bindir=DIR            user executables [EPREFIX/bin]
1498   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1499   --libexecdir=DIR        program executables [EPREFIX/libexec]
1500   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1501   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1502   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1503   --libdir=DIR            object code libraries [EPREFIX/lib]
1504   --includedir=DIR        C header files [PREFIX/include]
1505   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1506   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1507   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1508   --infodir=DIR           info documentation [DATAROOTDIR/info]
1509   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1510   --mandir=DIR            man documentation [DATAROOTDIR/man]
1511   --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1512   --htmldir=DIR           html documentation [DOCDIR]
1513   --dvidir=DIR            dvi documentation [DOCDIR]
1514   --pdfdir=DIR            pdf documentation [DOCDIR]
1515   --psdir=DIR             ps documentation [DOCDIR]
1516 _ACEOF
1517
1518   cat <<\_ACEOF
1519
1520 System types:
1521   --build=BUILD     configure for building on BUILD [guessed]
1522   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1523 _ACEOF
1524 fi
1525
1526 if test -n "$ac_init_help"; then
1527   case $ac_init_help in
1528      short | recursive ) echo "Configuration of unbound 1.13.1:";;
1529    esac
1530   cat <<\_ACEOF
1531
1532 Optional Features:
1533   --disable-option-checking  ignore unrecognized --enable/--with options
1534   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1535   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1536   --enable-checking       Enable warnings, asserts, makefile-dependencies
1537   --enable-debug          same as enable-checking
1538   --disable-flto          Disable link-time optimization (gcc specific option)
1539   --enable-pie            Enable Position-Independent Executable (eg. to fully
1540                           benefit from ASLR, small performance penalty)
1541   --enable-relro-now      Enable full relocation binding at load-time (RELRO
1542                           NOW, to protect GOT and .dtor areas)
1543   --enable-shared[=PKGS]  build shared libraries [default=yes]
1544   --enable-static[=PKGS]  build static libraries [default=yes]
1545   --enable-fast-install[=PKGS]
1546                           optimize for fast installation [default=yes]
1547   --disable-libtool-lock  avoid locking (might break parallel builds)
1548   --disable-rpath         disable hardcoded rpath (default=enabled)
1549   --disable-largefile     omit support for large files
1550   --enable-systemd        compile with systemd support
1551   --enable-alloc-checks   enable to memory allocation statistics, for debug
1552                           purposes
1553   --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1554                           purposes
1555   --enable-alloc-nonregional
1556                           enable nonregional allocs, slow but exposes regional
1557                           allocations to other memory purifiers, for debug
1558                           purposes
1559   --disable-swig-version-check
1560                           Disable swig version check to build python modules
1561                           with older swig even though that is unreliable
1562   --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1563                           support
1564   --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1565   --enable-subnet         Enable client subnet
1566   --disable-gost          Disable GOST support
1567   --disable-ecdsa         Disable ECDSA support
1568   --disable-dsa           Disable DSA support
1569   --disable-ed25519       Disable ED25519 support
1570   --disable-ed448         Disable ED448 support
1571   --enable-event-api      Enable (experimental) pluggable event base
1572                           libunbound API installed to unbound-event.h
1573   --enable-tfo-client     Enable TCP Fast Open for client mode
1574   --enable-tfo-server     Enable TCP Fast Open for server mode
1575   --enable-static-exe     enable to compile executables statically against
1576                           (event) uninstalled libs, for debug purposes
1577   --enable-fully-static   enable to compile fully static
1578   --enable-lock-checks    enable to check lock and unlock calls, for debug
1579                           purposes
1580   --enable-allsymbols     export all symbols from libunbound and link binaries
1581                           to it, smaller install size but libunbound export
1582                           table is polluted by internal symbols
1583   --enable-dnstap         Enable dnstap support (requires protobuf-c)
1584   --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1585   --enable-cachedb        enable cachedb module that can use external cache
1586                           storage
1587   --enable-ipsecmod       Enable ipsecmod module that facilitates
1588                           opportunistic IPsec
1589   --enable-ipset          enable ipset module
1590   --disable-explicit-port-randomisation
1591                           disable explicit source port randomisation and rely
1592                           on the kernel to provide random source ports
1593
1594 Optional Packages:
1595   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1596   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1597   --with-conf-file=path   Pathname to the Unbound configuration file
1598   --with-run-dir=path     set default directory to chdir to (by default dir
1599                           part of cfg file)
1600   --with-chroot-dir=path  set default directory to chroot to (by default same
1601                           as run-dir)
1602   --with-share-dir=path   set default directory with shared data (by default
1603                           same as share/unbound)
1604   --with-pidfile=filename set default pathname to unbound pidfile (default
1605                           run-dir/unbound.pid)
1606   --with-rootkey-file=filename
1607                           set default pathname to root key file (default
1608                           run-dir/root.key). This file is read and written.
1609   --with-rootcert-file=filename
1610                           set default pathname to root update certificate file
1611                           (default run-dir/icannbundle.pem). This file need
1612                           not exist if you are content with the builtin.
1613   --with-username=user    set default user that unbound changes to (default
1614                           user is unbound)
1615   --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1616                           both]
1617   --with-aix-soname=aix|svr4|both
1618                           shared library versioning (aka "SONAME") variant to
1619                           provide on AIX, [default=aix].
1620   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1621   --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1622                           compiler's sysroot if not specified).
1623   --with-pthreads         use pthreads library, or --without-pthreads to
1624                           disable threading support.
1625   --with-solaris-threads  use solaris native thread library.
1626   --with-syslog-facility=LOCAL0 - LOCAL7
1627                           set SYSLOG_FACILITY, default DAEMON
1628   --with-dynlibmodule     build dynamic library module, or
1629                           --without-dynlibmodule to disable it. (default=no)
1630   --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1631                           (default=no)
1632   --with-pythonmodule     build Python module, or --without-pythonmodule to
1633                           disable script engine. (default=no)
1634   --with-nss=path         use libnss instead of openssl, installed at path.
1635   --with-nettle=path      use libnettle as crypto library, installed at path.
1636   --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1637                           /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1638                           /usr)
1639   --with-libbsd           Use portable libbsd functions
1640   --with-libevent=pathname
1641                           use libevent (will check /usr/local /opt/local
1642                           /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1643                           an explicit path). Slower, but allows use of large
1644                           outgoing port ranges.
1645   --with-libexpat=path    specify explicit path for libexpat.
1646   --with-libhiredis=path  specify explicit path for libhiredis.
1647   --with-libnghttp2=path  specify explicit path for libnghttp2.
1648   --with-dnstap-socket-path=pathname
1649                           set default dnstap socket path
1650   --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1651   --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1652   --with-libmnl=path      specify explicit path for libmnl.
1653   --with-libunbound-only  do not build daemon and tool programs
1654
1655 Some influential environment variables:
1656   CC          C compiler command
1657   CFLAGS      C compiler flags
1658   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1659               nonstandard directory <lib dir>
1660   LIBS        libraries to pass to the linker, e.g. -l<library>
1661   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1662               you have headers in a nonstandard directory <include dir>
1663   CPP         C preprocessor
1664   YACC        The `Yet Another Compiler Compiler' implementation to use.
1665               Defaults to the first program found out of: `bison -y', `byacc',
1666               `yacc'.
1667   YFLAGS      The list of arguments that will be passed by default to $YACC.
1668               This script will default YFLAGS to the empty string to avoid a
1669               default value of `-d' given by some make applications.
1670   LT_SYS_LIBRARY_PATH
1671               User-defined run-time library search path.
1672   PKG_CONFIG  path to pkg-config utility
1673   PKG_CONFIG_PATH
1674               directories to add to pkg-config's search path
1675   PKG_CONFIG_LIBDIR
1676               path overriding pkg-config's built-in search path
1677   SYSTEMD_CFLAGS
1678               C compiler flags for SYSTEMD, overriding pkg-config
1679   SYSTEMD_LIBS
1680               linker flags for SYSTEMD, overriding pkg-config
1681   SYSTEMD_DAEMON_CFLAGS
1682               C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1683   SYSTEMD_DAEMON_LIBS
1684               linker flags for SYSTEMD_DAEMON, overriding pkg-config
1685   PYTHON_VERSION
1686               The installed Python version to use, for example '2.3'. This
1687               string will be appended to the Python interpreter canonical
1688               name.
1689
1690 Use these variables to override the choices made by `configure' or to help
1691 it to find libraries and programs with nonstandard names/locations.
1692
1693 Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
1694 _ACEOF
1695 ac_status=$?
1696 fi
1697
1698 if test "$ac_init_help" = "recursive"; then
1699   # If there are subdirs, report their specific --help.
1700   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1701     test -d "$ac_dir" ||
1702       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1703       continue
1704     ac_builddir=.
1705
1706 case "$ac_dir" in
1707 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1708 *)
1709   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1710   # A ".." for each directory in $ac_dir_suffix.
1711   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1712   case $ac_top_builddir_sub in
1713   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1714   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1715   esac ;;
1716 esac
1717 ac_abs_top_builddir=$ac_pwd
1718 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1719 # for backward compatibility:
1720 ac_top_builddir=$ac_top_build_prefix
1721
1722 case $srcdir in
1723   .)  # We are building in place.
1724     ac_srcdir=.
1725     ac_top_srcdir=$ac_top_builddir_sub
1726     ac_abs_top_srcdir=$ac_pwd ;;
1727   [\\/]* | ?:[\\/]* )  # Absolute name.
1728     ac_srcdir=$srcdir$ac_dir_suffix;
1729     ac_top_srcdir=$srcdir
1730     ac_abs_top_srcdir=$srcdir ;;
1731   *) # Relative name.
1732     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1733     ac_top_srcdir=$ac_top_build_prefix$srcdir
1734     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1735 esac
1736 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1737
1738     cd "$ac_dir" || { ac_status=$?; continue; }
1739     # Check for guested configure.
1740     if test -f "$ac_srcdir/configure.gnu"; then
1741       echo &&
1742       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1743     elif test -f "$ac_srcdir/configure"; then
1744       echo &&
1745       $SHELL "$ac_srcdir/configure" --help=recursive
1746     else
1747       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1748     fi || ac_status=$?
1749     cd "$ac_pwd" || { ac_status=$?; break; }
1750   done
1751 fi
1752
1753 test -n "$ac_init_help" && exit $ac_status
1754 if $ac_init_version; then
1755   cat <<\_ACEOF
1756 unbound configure 1.13.1
1757 generated by GNU Autoconf 2.69
1758
1759 Copyright (C) 2012 Free Software Foundation, Inc.
1760 This configure script is free software; the Free Software Foundation
1761 gives unlimited permission to copy, distribute and modify it.
1762 _ACEOF
1763   exit
1764 fi
1765
1766 ## ------------------------ ##
1767 ## Autoconf initialization. ##
1768 ## ------------------------ ##
1769
1770 # ac_fn_c_try_compile LINENO
1771 # --------------------------
1772 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1773 ac_fn_c_try_compile ()
1774 {
1775   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1776   rm -f conftest.$ac_objext
1777   if { { ac_try="$ac_compile"
1778 case "(($ac_try" in
1779   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1780   *) ac_try_echo=$ac_try;;
1781 esac
1782 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1783 $as_echo "$ac_try_echo"; } >&5
1784   (eval "$ac_compile") 2>conftest.err
1785   ac_status=$?
1786   if test -s conftest.err; then
1787     grep -v '^ *+' conftest.err >conftest.er1
1788     cat conftest.er1 >&5
1789     mv -f conftest.er1 conftest.err
1790   fi
1791   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1792   test $ac_status = 0; } && {
1793          test -z "$ac_c_werror_flag" ||
1794          test ! -s conftest.err
1795        } && test -s conftest.$ac_objext; then :
1796   ac_retval=0
1797 else
1798   $as_echo "$as_me: failed program was:" >&5
1799 sed 's/^/| /' conftest.$ac_ext >&5
1800
1801         ac_retval=1
1802 fi
1803   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1804   as_fn_set_status $ac_retval
1805
1806 } # ac_fn_c_try_compile
1807
1808 # ac_fn_c_try_cpp LINENO
1809 # ----------------------
1810 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1811 ac_fn_c_try_cpp ()
1812 {
1813   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1814   if { { ac_try="$ac_cpp conftest.$ac_ext"
1815 case "(($ac_try" in
1816   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1817   *) ac_try_echo=$ac_try;;
1818 esac
1819 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1820 $as_echo "$ac_try_echo"; } >&5
1821   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1822   ac_status=$?
1823   if test -s conftest.err; then
1824     grep -v '^ *+' conftest.err >conftest.er1
1825     cat conftest.er1 >&5
1826     mv -f conftest.er1 conftest.err
1827   fi
1828   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1829   test $ac_status = 0; } > conftest.i && {
1830          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1831          test ! -s conftest.err
1832        }; then :
1833   ac_retval=0
1834 else
1835   $as_echo "$as_me: failed program was:" >&5
1836 sed 's/^/| /' conftest.$ac_ext >&5
1837
1838     ac_retval=1
1839 fi
1840   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1841   as_fn_set_status $ac_retval
1842
1843 } # ac_fn_c_try_cpp
1844
1845 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1846 # -------------------------------------------------------
1847 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1848 # the include files in INCLUDES and setting the cache variable VAR
1849 # accordingly.
1850 ac_fn_c_check_header_mongrel ()
1851 {
1852   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1853   if eval \${$3+:} false; then :
1854   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1855 $as_echo_n "checking for $2... " >&6; }
1856 if eval \${$3+:} false; then :
1857   $as_echo_n "(cached) " >&6
1858 fi
1859 eval ac_res=\$$3
1860                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1861 $as_echo "$ac_res" >&6; }
1862 else
1863   # Is the header compilable?
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1865 $as_echo_n "checking $2 usability... " >&6; }
1866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1867 /* end confdefs.h.  */
1868 $4
1869 #include <$2>
1870 _ACEOF
1871 if ac_fn_c_try_compile "$LINENO"; then :
1872   ac_header_compiler=yes
1873 else
1874   ac_header_compiler=no
1875 fi
1876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1878 $as_echo "$ac_header_compiler" >&6; }
1879
1880 # Is the header present?
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1882 $as_echo_n "checking $2 presence... " >&6; }
1883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1884 /* end confdefs.h.  */
1885 #include <$2>
1886 _ACEOF
1887 if ac_fn_c_try_cpp "$LINENO"; then :
1888   ac_header_preproc=yes
1889 else
1890   ac_header_preproc=no
1891 fi
1892 rm -f conftest.err conftest.i conftest.$ac_ext
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1894 $as_echo "$ac_header_preproc" >&6; }
1895
1896 # So?  What about this header?
1897 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1898   yes:no: )
1899     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1900 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1901     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1902 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1903     ;;
1904   no:yes:* )
1905     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1906 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1907     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1908 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1909     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1910 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1911     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1912 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1913     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1914 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1915 ( $as_echo "## --------------------------------------------------------------------------------------- ##
1916 ## Report this to unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues ##
1917 ## --------------------------------------------------------------------------------------- ##"
1918      ) | sed "s/^/$as_me: WARNING:     /" >&2
1919     ;;
1920 esac
1921   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1922 $as_echo_n "checking for $2... " >&6; }
1923 if eval \${$3+:} false; then :
1924   $as_echo_n "(cached) " >&6
1925 else
1926   eval "$3=\$ac_header_compiler"
1927 fi
1928 eval ac_res=\$$3
1929                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1930 $as_echo "$ac_res" >&6; }
1931 fi
1932   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1933
1934 } # ac_fn_c_check_header_mongrel
1935
1936 # ac_fn_c_try_run LINENO
1937 # ----------------------
1938 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1939 # that executables *can* be run.
1940 ac_fn_c_try_run ()
1941 {
1942   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1943   if { { ac_try="$ac_link"
1944 case "(($ac_try" in
1945   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1946   *) ac_try_echo=$ac_try;;
1947 esac
1948 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1949 $as_echo "$ac_try_echo"; } >&5
1950   (eval "$ac_link") 2>&5
1951   ac_status=$?
1952   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1953   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1954   { { case "(($ac_try" in
1955   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1956   *) ac_try_echo=$ac_try;;
1957 esac
1958 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1959 $as_echo "$ac_try_echo"; } >&5
1960   (eval "$ac_try") 2>&5
1961   ac_status=$?
1962   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1963   test $ac_status = 0; }; }; then :
1964   ac_retval=0
1965 else
1966   $as_echo "$as_me: program exited with status $ac_status" >&5
1967        $as_echo "$as_me: failed program was:" >&5
1968 sed 's/^/| /' conftest.$ac_ext >&5
1969
1970        ac_retval=$ac_status
1971 fi
1972   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1973   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1974   as_fn_set_status $ac_retval
1975
1976 } # ac_fn_c_try_run
1977
1978 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1979 # -------------------------------------------------------
1980 # Tests whether HEADER exists and can be compiled using the include files in
1981 # INCLUDES, setting the cache variable VAR accordingly.
1982 ac_fn_c_check_header_compile ()
1983 {
1984   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1986 $as_echo_n "checking for $2... " >&6; }
1987 if eval \${$3+:} false; then :
1988   $as_echo_n "(cached) " >&6
1989 else
1990   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1991 /* end confdefs.h.  */
1992 $4
1993 #include <$2>
1994 _ACEOF
1995 if ac_fn_c_try_compile "$LINENO"; then :
1996   eval "$3=yes"
1997 else
1998   eval "$3=no"
1999 fi
2000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2001 fi
2002 eval ac_res=\$$3
2003                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2004 $as_echo "$ac_res" >&6; }
2005   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2006
2007 } # ac_fn_c_check_header_compile
2008
2009 # ac_fn_c_try_link LINENO
2010 # -----------------------
2011 # Try to link conftest.$ac_ext, and return whether this succeeded.
2012 ac_fn_c_try_link ()
2013 {
2014   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2015   rm -f conftest.$ac_objext conftest$ac_exeext
2016   if { { ac_try="$ac_link"
2017 case "(($ac_try" in
2018   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2019   *) ac_try_echo=$ac_try;;
2020 esac
2021 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2022 $as_echo "$ac_try_echo"; } >&5
2023   (eval "$ac_link") 2>conftest.err
2024   ac_status=$?
2025   if test -s conftest.err; then
2026     grep -v '^ *+' conftest.err >conftest.er1
2027     cat conftest.er1 >&5
2028     mv -f conftest.er1 conftest.err
2029   fi
2030   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2031   test $ac_status = 0; } && {
2032          test -z "$ac_c_werror_flag" ||
2033          test ! -s conftest.err
2034        } && test -s conftest$ac_exeext && {
2035          test "$cross_compiling" = yes ||
2036          test -x conftest$ac_exeext
2037        }; then :
2038   ac_retval=0
2039 else
2040   $as_echo "$as_me: failed program was:" >&5
2041 sed 's/^/| /' conftest.$ac_ext >&5
2042
2043         ac_retval=1
2044 fi
2045   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2046   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2047   # interfere with the next link command; also delete a directory that is
2048   # left behind by Apple's compiler.  We do this before executing the actions.
2049   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2050   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2051   as_fn_set_status $ac_retval
2052
2053 } # ac_fn_c_try_link
2054
2055 # ac_fn_c_check_func LINENO FUNC VAR
2056 # ----------------------------------
2057 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2058 ac_fn_c_check_func ()
2059 {
2060   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2061   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2062 $as_echo_n "checking for $2... " >&6; }
2063 if eval \${$3+:} false; then :
2064   $as_echo_n "(cached) " >&6
2065 else
2066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067 /* end confdefs.h.  */
2068 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2069    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2070 #define $2 innocuous_$2
2071
2072 /* System header to define __stub macros and hopefully few prototypes,
2073     which can conflict with char $2 (); below.
2074     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2075     <limits.h> exists even on freestanding compilers.  */
2076
2077 #ifdef __STDC__
2078 # include <limits.h>
2079 #else
2080 # include <assert.h>
2081 #endif
2082
2083 #undef $2
2084
2085 /* Override any GCC internal prototype to avoid an error.
2086    Use char because int might match the return type of a GCC
2087    builtin and then its argument prototype would still apply.  */
2088 #ifdef __cplusplus
2089 extern "C"
2090 #endif
2091 char $2 ();
2092 /* The GNU C library defines this for functions which it implements
2093     to always fail with ENOSYS.  Some functions are actually named
2094     something starting with __ and the normal name is an alias.  */
2095 #if defined __stub_$2 || defined __stub___$2
2096 choke me
2097 #endif
2098
2099 int
2100 main ()
2101 {
2102 return $2 ();
2103   ;
2104   return 0;
2105 }
2106 _ACEOF
2107 if ac_fn_c_try_link "$LINENO"; then :
2108   eval "$3=yes"
2109 else
2110   eval "$3=no"
2111 fi
2112 rm -f core conftest.err conftest.$ac_objext \
2113     conftest$ac_exeext conftest.$ac_ext
2114 fi
2115 eval ac_res=\$$3
2116                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2117 $as_echo "$ac_res" >&6; }
2118   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2119
2120 } # ac_fn_c_check_func
2121
2122 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2123 # -------------------------------------------
2124 # Tests whether TYPE exists after having included INCLUDES, setting cache
2125 # variable VAR accordingly.
2126 ac_fn_c_check_type ()
2127 {
2128   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2129   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2130 $as_echo_n "checking for $2... " >&6; }
2131 if eval \${$3+:} false; then :
2132   $as_echo_n "(cached) " >&6
2133 else
2134   eval "$3=no"
2135   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2136 /* end confdefs.h.  */
2137 $4
2138 int
2139 main ()
2140 {
2141 if (sizeof ($2))
2142          return 0;
2143   ;
2144   return 0;
2145 }
2146 _ACEOF
2147 if ac_fn_c_try_compile "$LINENO"; then :
2148   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2149 /* end confdefs.h.  */
2150 $4
2151 int
2152 main ()
2153 {
2154 if (sizeof (($2)))
2155             return 0;
2156   ;
2157   return 0;
2158 }
2159 _ACEOF
2160 if ac_fn_c_try_compile "$LINENO"; then :
2161
2162 else
2163   eval "$3=yes"
2164 fi
2165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2166 fi
2167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2168 fi
2169 eval ac_res=\$$3
2170                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2171 $as_echo "$ac_res" >&6; }
2172   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2173
2174 } # ac_fn_c_check_type
2175
2176 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2177 # --------------------------------------------
2178 # Tries to find the compile-time value of EXPR in a program that includes
2179 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2180 # computed
2181 ac_fn_c_compute_int ()
2182 {
2183   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2184   if test "$cross_compiling" = yes; then
2185     # Depending upon the size, compute the lo and hi bounds.
2186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2187 /* end confdefs.h.  */
2188 $4
2189 int
2190 main ()
2191 {
2192 static int test_array [1 - 2 * !(($2) >= 0)];
2193 test_array [0] = 0;
2194 return test_array [0];
2195
2196   ;
2197   return 0;
2198 }
2199 _ACEOF
2200 if ac_fn_c_try_compile "$LINENO"; then :
2201   ac_lo=0 ac_mid=0
2202   while :; do
2203     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2204 /* end confdefs.h.  */
2205 $4
2206 int
2207 main ()
2208 {
2209 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2210 test_array [0] = 0;
2211 return test_array [0];
2212
2213   ;
2214   return 0;
2215 }
2216 _ACEOF
2217 if ac_fn_c_try_compile "$LINENO"; then :
2218   ac_hi=$ac_mid; break
2219 else
2220   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2221                         if test $ac_lo -le $ac_mid; then
2222                           ac_lo= ac_hi=
2223                           break
2224                         fi
2225                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2226 fi
2227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2228   done
2229 else
2230   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2231 /* end confdefs.h.  */
2232 $4
2233 int
2234 main ()
2235 {
2236 static int test_array [1 - 2 * !(($2) < 0)];
2237 test_array [0] = 0;
2238 return test_array [0];
2239
2240   ;
2241   return 0;
2242 }
2243 _ACEOF
2244 if ac_fn_c_try_compile "$LINENO"; then :
2245   ac_hi=-1 ac_mid=-1
2246   while :; do
2247     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248 /* end confdefs.h.  */
2249 $4
2250 int
2251 main ()
2252 {
2253 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2254 test_array [0] = 0;
2255 return test_array [0];
2256
2257   ;
2258   return 0;
2259 }
2260 _ACEOF
2261 if ac_fn_c_try_compile "$LINENO"; then :
2262   ac_lo=$ac_mid; break
2263 else
2264   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2265                         if test $ac_mid -le $ac_hi; then
2266                           ac_lo= ac_hi=
2267                           break
2268                         fi
2269                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2270 fi
2271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2272   done
2273 else
2274   ac_lo= ac_hi=
2275 fi
2276 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2277 fi
2278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279 # Binary search between lo and hi bounds.
2280 while test "x$ac_lo" != "x$ac_hi"; do
2281   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2282   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2283 /* end confdefs.h.  */
2284 $4
2285 int
2286 main ()
2287 {
2288 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2289 test_array [0] = 0;
2290 return test_array [0];
2291
2292   ;
2293   return 0;
2294 }
2295 _ACEOF
2296 if ac_fn_c_try_compile "$LINENO"; then :
2297   ac_hi=$ac_mid
2298 else
2299   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2300 fi
2301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2302 done
2303 case $ac_lo in #((
2304 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2305 '') ac_retval=1 ;;
2306 esac
2307   else
2308     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309 /* end confdefs.h.  */
2310 $4
2311 static long int longval () { return $2; }
2312 static unsigned long int ulongval () { return $2; }
2313 #include <stdio.h>
2314 #include <stdlib.h>
2315 int
2316 main ()
2317 {
2318
2319   FILE *f = fopen ("conftest.val", "w");
2320   if (! f)
2321     return 1;
2322   if (($2) < 0)
2323     {
2324       long int i = longval ();
2325       if (i != ($2))
2326         return 1;
2327       fprintf (f, "%ld", i);
2328     }
2329   else
2330     {
2331       unsigned long int i = ulongval ();
2332       if (i != ($2))
2333         return 1;
2334       fprintf (f, "%lu", i);
2335     }
2336   /* Do not output a trailing newline, as this causes \r\n confusion
2337      on some platforms.  */
2338   return ferror (f) || fclose (f) != 0;
2339
2340   ;
2341   return 0;
2342 }
2343 _ACEOF
2344 if ac_fn_c_try_run "$LINENO"; then :
2345   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2346 else
2347   ac_retval=1
2348 fi
2349 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2350   conftest.$ac_objext conftest.beam conftest.$ac_ext
2351 rm -f conftest.val
2352
2353   fi
2354   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2355   as_fn_set_status $ac_retval
2356
2357 } # ac_fn_c_compute_int
2358
2359 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2360 # ---------------------------------------------
2361 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2362 # accordingly.
2363 ac_fn_c_check_decl ()
2364 {
2365   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2366   as_decl_name=`echo $2|sed 's/ *(.*//'`
2367   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2368   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2369 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2370 if eval \${$3+:} false; then :
2371   $as_echo_n "(cached) " >&6
2372 else
2373   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2374 /* end confdefs.h.  */
2375 $4
2376 int
2377 main ()
2378 {
2379 #ifndef $as_decl_name
2380 #ifdef __cplusplus
2381   (void) $as_decl_use;
2382 #else
2383   (void) $as_decl_name;
2384 #endif
2385 #endif
2386
2387   ;
2388   return 0;
2389 }
2390 _ACEOF
2391 if ac_fn_c_try_compile "$LINENO"; then :
2392   eval "$3=yes"
2393 else
2394   eval "$3=no"
2395 fi
2396 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2397 fi
2398 eval ac_res=\$$3
2399                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2400 $as_echo "$ac_res" >&6; }
2401   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2402
2403 } # ac_fn_c_check_decl
2404
2405 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2406 # ----------------------------------------------------
2407 # Tries to find if the field MEMBER exists in type AGGR, after including
2408 # INCLUDES, setting cache variable VAR accordingly.
2409 ac_fn_c_check_member ()
2410 {
2411   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2412   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2413 $as_echo_n "checking for $2.$3... " >&6; }
2414 if eval \${$4+:} false; then :
2415   $as_echo_n "(cached) " >&6
2416 else
2417   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2418 /* end confdefs.h.  */
2419 $5
2420 int
2421 main ()
2422 {
2423 static $2 ac_aggr;
2424 if (ac_aggr.$3)
2425 return 0;
2426   ;
2427   return 0;
2428 }
2429 _ACEOF
2430 if ac_fn_c_try_compile "$LINENO"; then :
2431   eval "$4=yes"
2432 else
2433   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2434 /* end confdefs.h.  */
2435 $5
2436 int
2437 main ()
2438 {
2439 static $2 ac_aggr;
2440 if (sizeof ac_aggr.$3)
2441 return 0;
2442   ;
2443   return 0;
2444 }
2445 _ACEOF
2446 if ac_fn_c_try_compile "$LINENO"; then :
2447   eval "$4=yes"
2448 else
2449   eval "$4=no"
2450 fi
2451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2452 fi
2453 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2454 fi
2455 eval ac_res=\$$4
2456                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2457 $as_echo "$ac_res" >&6; }
2458   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2459
2460 } # ac_fn_c_check_member
2461 cat >config.log <<_ACEOF
2462 This file contains any messages produced by compilers while
2463 running configure, to aid debugging if configure makes a mistake.
2464
2465 It was created by unbound $as_me 1.13.1, which was
2466 generated by GNU Autoconf 2.69.  Invocation command line was
2467
2468   $ $0 $@
2469
2470 _ACEOF
2471 exec 5>>config.log
2472 {
2473 cat <<_ASUNAME
2474 ## --------- ##
2475 ## Platform. ##
2476 ## --------- ##
2477
2478 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2479 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2480 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2481 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2482 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2483
2484 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2485 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2486
2487 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2488 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2489 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2490 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2491 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2492 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2493 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2494
2495 _ASUNAME
2496
2497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2498 for as_dir in $PATH
2499 do
2500   IFS=$as_save_IFS
2501   test -z "$as_dir" && as_dir=.
2502     $as_echo "PATH: $as_dir"
2503   done
2504 IFS=$as_save_IFS
2505
2506 } >&5
2507
2508 cat >&5 <<_ACEOF
2509
2510
2511 ## ----------- ##
2512 ## Core tests. ##
2513 ## ----------- ##
2514
2515 _ACEOF
2516
2517
2518 # Keep a trace of the command line.
2519 # Strip out --no-create and --no-recursion so they do not pile up.
2520 # Strip out --silent because we don't want to record it for future runs.
2521 # Also quote any args containing shell meta-characters.
2522 # Make two passes to allow for proper duplicate-argument suppression.
2523 ac_configure_args=
2524 ac_configure_args0=
2525 ac_configure_args1=
2526 ac_must_keep_next=false
2527 for ac_pass in 1 2
2528 do
2529   for ac_arg
2530   do
2531     case $ac_arg in
2532     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2533     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2534     | -silent | --silent | --silen | --sile | --sil)
2535       continue ;;
2536     *\'*)
2537       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2538     esac
2539     case $ac_pass in
2540     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2541     2)
2542       as_fn_append ac_configure_args1 " '$ac_arg'"
2543       if test $ac_must_keep_next = true; then
2544         ac_must_keep_next=false # Got value, back to normal.
2545       else
2546         case $ac_arg in
2547           *=* | --config-cache | -C | -disable-* | --disable-* \
2548           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2549           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2550           | -with-* | --with-* | -without-* | --without-* | --x)
2551             case "$ac_configure_args0 " in
2552               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2553             esac
2554             ;;
2555           -* ) ac_must_keep_next=true ;;
2556         esac
2557       fi
2558       as_fn_append ac_configure_args " '$ac_arg'"
2559       ;;
2560     esac
2561   done
2562 done
2563 { ac_configure_args0=; unset ac_configure_args0;}
2564 { ac_configure_args1=; unset ac_configure_args1;}
2565
2566 # When interrupted or exit'd, cleanup temporary files, and complete
2567 # config.log.  We remove comments because anyway the quotes in there
2568 # would cause problems or look ugly.
2569 # WARNING: Use '\'' to represent an apostrophe within the trap.
2570 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2571 trap 'exit_status=$?
2572   # Save into config.log some information that might help in debugging.
2573   {
2574     echo
2575
2576     $as_echo "## ---------------- ##
2577 ## Cache variables. ##
2578 ## ---------------- ##"
2579     echo
2580     # The following way of writing the cache mishandles newlines in values,
2581 (
2582   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2583     eval ac_val=\$$ac_var
2584     case $ac_val in #(
2585     *${as_nl}*)
2586       case $ac_var in #(
2587       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2588 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2589       esac
2590       case $ac_var in #(
2591       _ | IFS | as_nl) ;; #(
2592       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2593       *) { eval $ac_var=; unset $ac_var;} ;;
2594       esac ;;
2595     esac
2596   done
2597   (set) 2>&1 |
2598     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2599     *${as_nl}ac_space=\ *)
2600       sed -n \
2601         "s/'\''/'\''\\\\'\'''\''/g;
2602           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2603       ;; #(
2604     *)
2605       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2606       ;;
2607     esac |
2608     sort
2609 )
2610     echo
2611
2612     $as_echo "## ----------------- ##
2613 ## Output variables. ##
2614 ## ----------------- ##"
2615     echo
2616     for ac_var in $ac_subst_vars
2617     do
2618       eval ac_val=\$$ac_var
2619       case $ac_val in
2620       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2621       esac
2622       $as_echo "$ac_var='\''$ac_val'\''"
2623     done | sort
2624     echo
2625
2626     if test -n "$ac_subst_files"; then
2627       $as_echo "## ------------------- ##
2628 ## File substitutions. ##
2629 ## ------------------- ##"
2630       echo
2631       for ac_var in $ac_subst_files
2632       do
2633         eval ac_val=\$$ac_var
2634         case $ac_val in
2635         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2636         esac
2637         $as_echo "$ac_var='\''$ac_val'\''"
2638       done | sort
2639       echo
2640     fi
2641
2642     if test -s confdefs.h; then
2643       $as_echo "## ----------- ##
2644 ## confdefs.h. ##
2645 ## ----------- ##"
2646       echo
2647       cat confdefs.h
2648       echo
2649     fi
2650     test "$ac_signal" != 0 &&
2651       $as_echo "$as_me: caught signal $ac_signal"
2652     $as_echo "$as_me: exit $exit_status"
2653   } >&5
2654   rm -f core *.core core.conftest.* &&
2655     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2656     exit $exit_status
2657 ' 0
2658 for ac_signal in 1 2 13 15; do
2659   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2660 done
2661 ac_signal=0
2662
2663 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2664 rm -f -r conftest* confdefs.h
2665
2666 $as_echo "/* confdefs.h */" > confdefs.h
2667
2668 # Predefined preprocessor variables.
2669
2670 cat >>confdefs.h <<_ACEOF
2671 #define PACKAGE_NAME "$PACKAGE_NAME"
2672 _ACEOF
2673
2674 cat >>confdefs.h <<_ACEOF
2675 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2676 _ACEOF
2677
2678 cat >>confdefs.h <<_ACEOF
2679 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2680 _ACEOF
2681
2682 cat >>confdefs.h <<_ACEOF
2683 #define PACKAGE_STRING "$PACKAGE_STRING"
2684 _ACEOF
2685
2686 cat >>confdefs.h <<_ACEOF
2687 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2688 _ACEOF
2689
2690 cat >>confdefs.h <<_ACEOF
2691 #define PACKAGE_URL "$PACKAGE_URL"
2692 _ACEOF
2693
2694
2695 # Let the site file select an alternate cache file if it wants to.
2696 # Prefer an explicitly selected file to automatically selected ones.
2697 ac_site_file1=NONE
2698 ac_site_file2=NONE
2699 if test -n "$CONFIG_SITE"; then
2700   # We do not want a PATH search for config.site.
2701   case $CONFIG_SITE in #((
2702     -*)  ac_site_file1=./$CONFIG_SITE;;
2703     */*) ac_site_file1=$CONFIG_SITE;;
2704     *)   ac_site_file1=./$CONFIG_SITE;;
2705   esac
2706 elif test "x$prefix" != xNONE; then
2707   ac_site_file1=$prefix/share/config.site
2708   ac_site_file2=$prefix/etc/config.site
2709 else
2710   ac_site_file1=$ac_default_prefix/share/config.site
2711   ac_site_file2=$ac_default_prefix/etc/config.site
2712 fi
2713 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2714 do
2715   test "x$ac_site_file" = xNONE && continue
2716   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2717     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2718 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2719     sed 's/^/| /' "$ac_site_file" >&5
2720     . "$ac_site_file" \
2721       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2722 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2723 as_fn_error $? "failed to load site script $ac_site_file
2724 See \`config.log' for more details" "$LINENO" 5; }
2725   fi
2726 done
2727
2728 if test -r "$cache_file"; then
2729   # Some versions of bash will fail to source /dev/null (special files
2730   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2731   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2732     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2733 $as_echo "$as_me: loading cache $cache_file" >&6;}
2734     case $cache_file in
2735       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2736       *)                      . "./$cache_file";;
2737     esac
2738   fi
2739 else
2740   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2741 $as_echo "$as_me: creating cache $cache_file" >&6;}
2742   >$cache_file
2743 fi
2744
2745 # Check that the precious variables saved in the cache have kept the same
2746 # value.
2747 ac_cache_corrupted=false
2748 for ac_var in $ac_precious_vars; do
2749   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2750   eval ac_new_set=\$ac_env_${ac_var}_set
2751   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2752   eval ac_new_val=\$ac_env_${ac_var}_value
2753   case $ac_old_set,$ac_new_set in
2754     set,)
2755       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2756 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2757       ac_cache_corrupted=: ;;
2758     ,set)
2759       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2760 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2761       ac_cache_corrupted=: ;;
2762     ,);;
2763     *)
2764       if test "x$ac_old_val" != "x$ac_new_val"; then
2765         # differences in whitespace do not lead to failure.
2766         ac_old_val_w=`echo x $ac_old_val`
2767         ac_new_val_w=`echo x $ac_new_val`
2768         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2769           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2770 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2771           ac_cache_corrupted=:
2772         else
2773           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2774 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2775           eval $ac_var=\$ac_old_val
2776         fi
2777         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2778 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2779         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2780 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2781       fi;;
2782   esac
2783   # Pass precious variables to config.status.
2784   if test "$ac_new_set" = set; then
2785     case $ac_new_val in
2786     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2787     *) ac_arg=$ac_var=$ac_new_val ;;
2788     esac
2789     case " $ac_configure_args " in
2790       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2791       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2792     esac
2793   fi
2794 done
2795 if $ac_cache_corrupted; then
2796   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2797 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2798   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2799 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2800   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2801 fi
2802 ## -------------------- ##
2803 ## Main body of script. ##
2804 ## -------------------- ##
2805
2806 ac_ext=c
2807 ac_cpp='$CPP $CPPFLAGS'
2808 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2809 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2810 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2811
2812
2813 UNBOUND_VERSION_MAJOR=1
2814
2815 UNBOUND_VERSION_MINOR=13
2816
2817 UNBOUND_VERSION_MICRO=1
2818
2819
2820 LIBUNBOUND_CURRENT=9
2821 LIBUNBOUND_REVISION=12
2822 LIBUNBOUND_AGE=1
2823 # 1.0.0 had 0:12:0
2824 # 1.0.1 had 0:13:0
2825 # 1.0.2 had 0:14:0
2826 # 1.1.0 had 0:15:0
2827 # 1.1.1 had 0:16:0
2828 # 1.2.0 had 0:17:0
2829 # 1.2.1 had 0:18:0
2830 # 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
2831 # 1.3.1 had 1:1:0
2832 # 1.3.2 had 1:2:0
2833 # 1.3.3 had 1:3:0
2834 # 1.3.4 had 1:4:0
2835 # 1.4.0-snapshots had 1:5:0
2836 # 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
2837 # 1.4.1 had 2:1:0
2838 # 1.4.2 had 2:2:0
2839 # 1.4.3 had 2:3:0
2840 # 1.4.4 had 2:4:0
2841 # 1.4.5 had 2:5:0
2842 # 1.4.6 had 2:6:0
2843 # 1.4.7 had 2:7:0
2844 # 1.4.8 had 2:8:0
2845 # 1.4.9 had 2:9:0
2846 # 1.4.10 had 2:10:0
2847 # 1.4.11 had 2:11:0
2848 # 1.4.12 had 2:12:0
2849 # 1.4.13 had 2:13:0
2850 # and 1.4.13p1 and 1.4.13.p2
2851 # 1.4.14 had 2:14:0
2852 # 1.4.15 had 3:0:1 # adds ub_version()
2853 # 1.4.16 had 3:1:1
2854 # 1.4.17 had 3:2:1
2855 # 1.4.18 had 3:3:1
2856 # 1.4.19 had 3:4:1
2857 # 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
2858 # 1.4.21 had 4:1:2
2859 # 1.4.22 had 4:1:2
2860 # 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2861 # 1.5.1 had 5:3:3
2862 # 1.5.2 had 5:5:3
2863 # 1.5.3 had 5:6:3
2864 # 1.5.4 had 5:7:3
2865 # 1.5.5 had 5:8:3
2866 # 1.5.6 had 5:9:3
2867 # 1.5.7 had 5:10:3
2868 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
2869 # 1.5.9 had 6:1:4
2870 # 1.5.10 had 6:2:4
2871 # 1.6.0 had 6:3:4
2872 # 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
2873 # 1.6.2 had 7:1:5
2874 # 1.6.3 had 7:2:5
2875 # 1.6.4 had 7:3:5
2876 # 1.6.5 had 7:4:5
2877 # 1.6.6 had 7:5:5
2878 # 1.6.7 had 7:6:5
2879 # 1.6.8 had 7:7:5
2880 # 1.7.0 had 7:8:5
2881 # 1.7.1 had 7:9:5
2882 # 1.7.2 had 7:10:5
2883 # 1.7.3 had 7:11:5
2884 # 1.8.0 had 8:0:0 # changes the event callback function signature
2885 # 1.8.1 had 8:1:0
2886 # 1.8.2 had 8:2:0
2887 # 1.8.3 had 8:3:0
2888 # 1.9.0 had 9:0:1 # add ub_ctx_set_tls
2889 # 1.9.1 had 9:1:1
2890 # 1.9.2 had 9:2:1
2891 # 1.9.3 had 9:3:1
2892 # 1.9.4 had 9:4:1
2893 # 1.9.5 had 9:5:1
2894 # 1.9.6 had 9:6:1
2895 # 1.10.0 had 9:7:1
2896 # 1.10.1 had 9:8:1
2897 # 1.11.0 had 9:9:1
2898 # 1.12.0 had 9:10:1
2899 # 1.13.0 had 9:11:1
2900 # 1.13.1 had 9:12:1
2901
2902 #   Current  -- the number of the binary API that we're implementing
2903 #   Revision -- which iteration of the implementation of the binary
2904 #               API are we supplying?
2905 #   Age      -- How many previous binary API versions do we also
2906 #               support?
2907 #
2908 # If we release a new version that does not change the binary API,
2909 # increment Revision.
2910 #
2911 # If we release a new version that changes the binary API, but does
2912 # not break programs compiled against the old binary API, increment
2913 # Current and Age.  Set Revision to 0, since this is the first
2914 # implementation of the new API.
2915 #
2916 # Otherwise, we're changing the binary API and breaking backward
2917 # compatibility with old binaries.  Increment Current.  Set Age to 0,
2918 # since we're backward compatible with no previous APIs.  Set Revision
2919 # to 0 too.
2920
2921
2922
2923
2924
2925 cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`"
2926
2927 cat >>confdefs.h <<_ACEOF
2928 #define CONFCMDLINE "$cmdln"
2929 _ACEOF
2930
2931
2932 CFLAGS="$CFLAGS"
2933 ac_ext=c
2934 ac_cpp='$CPP $CPPFLAGS'
2935 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2936 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2937 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2938 if test -n "$ac_tool_prefix"; then
2939   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2940 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2942 $as_echo_n "checking for $ac_word... " >&6; }
2943 if ${ac_cv_prog_CC+:} false; then :
2944   $as_echo_n "(cached) " >&6
2945 else
2946   if test -n "$CC"; then
2947   ac_cv_prog_CC="$CC" # Let the user override the test.
2948 else
2949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2950 for as_dir in $PATH
2951 do
2952   IFS=$as_save_IFS
2953   test -z "$as_dir" && as_dir=.
2954     for ac_exec_ext in '' $ac_executable_extensions; do
2955   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2956     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2957     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2958     break 2
2959   fi
2960 done
2961   done
2962 IFS=$as_save_IFS
2963
2964 fi
2965 fi
2966 CC=$ac_cv_prog_CC
2967 if test -n "$CC"; then
2968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2969 $as_echo "$CC" >&6; }
2970 else
2971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2972 $as_echo "no" >&6; }
2973 fi
2974
2975
2976 fi
2977 if test -z "$ac_cv_prog_CC"; then
2978   ac_ct_CC=$CC
2979   # Extract the first word of "gcc", so it can be a program name with args.
2980 set dummy gcc; ac_word=$2
2981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2982 $as_echo_n "checking for $ac_word... " >&6; }
2983 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2984   $as_echo_n "(cached) " >&6
2985 else
2986   if test -n "$ac_ct_CC"; then
2987   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2988 else
2989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2990 for as_dir in $PATH
2991 do
2992   IFS=$as_save_IFS
2993   test -z "$as_dir" && as_dir=.
2994     for ac_exec_ext in '' $ac_executable_extensions; do
2995   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2996     ac_cv_prog_ac_ct_CC="gcc"
2997     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2998     break 2
2999   fi
3000 done
3001   done
3002 IFS=$as_save_IFS
3003
3004 fi
3005 fi
3006 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3007 if test -n "$ac_ct_CC"; then
3008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3009 $as_echo "$ac_ct_CC" >&6; }
3010 else
3011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3012 $as_echo "no" >&6; }
3013 fi
3014
3015   if test "x$ac_ct_CC" = x; then
3016     CC=""
3017   else
3018     case $cross_compiling:$ac_tool_warned in
3019 yes:)
3020 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3021 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3022 ac_tool_warned=yes ;;
3023 esac
3024     CC=$ac_ct_CC
3025   fi
3026 else
3027   CC="$ac_cv_prog_CC"
3028 fi
3029
3030 if test -z "$CC"; then
3031           if test -n "$ac_tool_prefix"; then
3032     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3033 set dummy ${ac_tool_prefix}cc; ac_word=$2
3034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3035 $as_echo_n "checking for $ac_word... " >&6; }
3036 if ${ac_cv_prog_CC+:} false; then :
3037   $as_echo_n "(cached) " >&6
3038 else
3039   if test -n "$CC"; then
3040   ac_cv_prog_CC="$CC" # Let the user override the test.
3041 else
3042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3043 for as_dir in $PATH
3044 do
3045   IFS=$as_save_IFS
3046   test -z "$as_dir" && as_dir=.
3047     for ac_exec_ext in '' $ac_executable_extensions; do
3048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3049     ac_cv_prog_CC="${ac_tool_prefix}cc"
3050     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3051     break 2
3052   fi
3053 done
3054   done
3055 IFS=$as_save_IFS
3056
3057 fi
3058 fi
3059 CC=$ac_cv_prog_CC
3060 if test -n "$CC"; then
3061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3062 $as_echo "$CC" >&6; }
3063 else
3064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3065 $as_echo "no" >&6; }
3066 fi
3067
3068
3069   fi
3070 fi
3071 if test -z "$CC"; then
3072   # Extract the first word of "cc", so it can be a program name with args.
3073 set dummy cc; ac_word=$2
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3075 $as_echo_n "checking for $ac_word... " >&6; }
3076 if ${ac_cv_prog_CC+:} false; then :
3077   $as_echo_n "(cached) " >&6
3078 else
3079   if test -n "$CC"; then
3080   ac_cv_prog_CC="$CC" # Let the user override the test.
3081 else
3082   ac_prog_rejected=no
3083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3084 for as_dir in $PATH
3085 do
3086   IFS=$as_save_IFS
3087   test -z "$as_dir" && as_dir=.
3088     for ac_exec_ext in '' $ac_executable_extensions; do
3089   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3090     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3091        ac_prog_rejected=yes
3092        continue
3093      fi
3094     ac_cv_prog_CC="cc"
3095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3096     break 2
3097   fi
3098 done
3099   done
3100 IFS=$as_save_IFS
3101
3102 if test $ac_prog_rejected = yes; then
3103   # We found a bogon in the path, so make sure we never use it.
3104   set dummy $ac_cv_prog_CC
3105   shift
3106   if test $# != 0; then
3107     # We chose a different compiler from the bogus one.
3108     # However, it has the same basename, so the bogon will be chosen
3109     # first if we set CC to just the basename; use the full file name.
3110     shift
3111     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3112   fi
3113 fi
3114 fi
3115 fi
3116 CC=$ac_cv_prog_CC
3117 if test -n "$CC"; then
3118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3119 $as_echo "$CC" >&6; }
3120 else
3121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3122 $as_echo "no" >&6; }
3123 fi
3124
3125
3126 fi
3127 if test -z "$CC"; then
3128   if test -n "$ac_tool_prefix"; then
3129   for ac_prog in cl.exe
3130   do
3131     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3132 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3134 $as_echo_n "checking for $ac_word... " >&6; }
3135 if ${ac_cv_prog_CC+:} false; then :
3136   $as_echo_n "(cached) " >&6
3137 else
3138   if test -n "$CC"; then
3139   ac_cv_prog_CC="$CC" # Let the user override the test.
3140 else
3141 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3142 for as_dir in $PATH
3143 do
3144   IFS=$as_save_IFS
3145   test -z "$as_dir" && as_dir=.
3146     for ac_exec_ext in '' $ac_executable_extensions; do
3147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3148     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3150     break 2
3151   fi
3152 done
3153   done
3154 IFS=$as_save_IFS
3155
3156 fi
3157 fi
3158 CC=$ac_cv_prog_CC
3159 if test -n "$CC"; then
3160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3161 $as_echo "$CC" >&6; }
3162 else
3163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3164 $as_echo "no" >&6; }
3165 fi
3166
3167
3168     test -n "$CC" && break
3169   done
3170 fi
3171 if test -z "$CC"; then
3172   ac_ct_CC=$CC
3173   for ac_prog in cl.exe
3174 do
3175   # Extract the first word of "$ac_prog", so it can be a program name with args.
3176 set dummy $ac_prog; ac_word=$2
3177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3178 $as_echo_n "checking for $ac_word... " >&6; }
3179 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3180   $as_echo_n "(cached) " >&6
3181 else
3182   if test -n "$ac_ct_CC"; then
3183   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3184 else
3185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3186 for as_dir in $PATH
3187 do
3188   IFS=$as_save_IFS
3189   test -z "$as_dir" && as_dir=.
3190     for ac_exec_ext in '' $ac_executable_extensions; do
3191   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3192     ac_cv_prog_ac_ct_CC="$ac_prog"
3193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3194     break 2
3195   fi
3196 done
3197   done
3198 IFS=$as_save_IFS
3199
3200 fi
3201 fi
3202 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3203 if test -n "$ac_ct_CC"; then
3204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3205 $as_echo "$ac_ct_CC" >&6; }
3206 else
3207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3208 $as_echo "no" >&6; }
3209 fi
3210
3211
3212   test -n "$ac_ct_CC" && break
3213 done
3214
3215   if test "x$ac_ct_CC" = x; then
3216     CC=""
3217   else
3218     case $cross_compiling:$ac_tool_warned in
3219 yes:)
3220 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3221 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3222 ac_tool_warned=yes ;;
3223 esac
3224     CC=$ac_ct_CC
3225   fi
3226 fi
3227
3228 fi
3229
3230
3231 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3232 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3233 as_fn_error $? "no acceptable C compiler found in \$PATH
3234 See \`config.log' for more details" "$LINENO" 5; }
3235
3236 # Provide some information about the compiler.
3237 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3238 set X $ac_compile
3239 ac_compiler=$2
3240 for ac_option in --version -v -V -qversion; do
3241   { { ac_try="$ac_compiler $ac_option >&5"
3242 case "(($ac_try" in
3243   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3244   *) ac_try_echo=$ac_try;;
3245 esac
3246 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3247 $as_echo "$ac_try_echo"; } >&5
3248   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3249   ac_status=$?
3250   if test -s conftest.err; then
3251     sed '10a\
3252 ... rest of stderr output deleted ...
3253          10q' conftest.err >conftest.er1
3254     cat conftest.er1 >&5
3255   fi
3256   rm -f conftest.er1 conftest.err
3257   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3258   test $ac_status = 0; }
3259 done
3260
3261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3262 /* end confdefs.h.  */
3263
3264 int
3265 main ()
3266 {
3267
3268   ;
3269   return 0;
3270 }
3271 _ACEOF
3272 ac_clean_files_save=$ac_clean_files
3273 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3274 # Try to create an executable without -o first, disregard a.out.
3275 # It will help us diagnose broken compilers, and finding out an intuition
3276 # of exeext.
3277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3278 $as_echo_n "checking whether the C compiler works... " >&6; }
3279 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3280
3281 # The possible output files:
3282 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3283
3284 ac_rmfiles=
3285 for ac_file in $ac_files
3286 do
3287   case $ac_file in
3288     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3289     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3290   esac
3291 done
3292 rm -f $ac_rmfiles
3293
3294 if { { ac_try="$ac_link_default"
3295 case "(($ac_try" in
3296   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3297   *) ac_try_echo=$ac_try;;
3298 esac
3299 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3300 $as_echo "$ac_try_echo"; } >&5
3301   (eval "$ac_link_default") 2>&5
3302   ac_status=$?
3303   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3304   test $ac_status = 0; }; then :
3305   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3306 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3307 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3308 # so that the user can short-circuit this test for compilers unknown to
3309 # Autoconf.
3310 for ac_file in $ac_files ''
3311 do
3312   test -f "$ac_file" || continue
3313   case $ac_file in
3314     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3315         ;;
3316     [ab].out )
3317         # We found the default executable, but exeext='' is most
3318         # certainly right.
3319         break;;
3320     *.* )
3321         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3322         then :; else
3323            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3324         fi
3325         # We set ac_cv_exeext here because the later test for it is not
3326         # safe: cross compilers may not add the suffix if given an `-o'
3327         # argument, so we may need to know it at that point already.
3328         # Even if this section looks crufty: it has the advantage of
3329         # actually working.
3330         break;;
3331     * )
3332         break;;
3333   esac
3334 done
3335 test "$ac_cv_exeext" = no && ac_cv_exeext=
3336
3337 else
3338   ac_file=''
3339 fi
3340 if test -z "$ac_file"; then :
3341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3342 $as_echo "no" >&6; }
3343 $as_echo "$as_me: failed program was:" >&5
3344 sed 's/^/| /' conftest.$ac_ext >&5
3345
3346 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3347 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3348 as_fn_error 77 "C compiler cannot create executables
3349 See \`config.log' for more details" "$LINENO" 5; }
3350 else
3351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3352 $as_echo "yes" >&6; }
3353 fi
3354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3355 $as_echo_n "checking for C compiler default output file name... " >&6; }
3356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3357 $as_echo "$ac_file" >&6; }
3358 ac_exeext=$ac_cv_exeext
3359
3360 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3361 ac_clean_files=$ac_clean_files_save
3362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3363 $as_echo_n "checking for suffix of executables... " >&6; }
3364 if { { ac_try="$ac_link"
3365 case "(($ac_try" in
3366   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3367   *) ac_try_echo=$ac_try;;
3368 esac
3369 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3370 $as_echo "$ac_try_echo"; } >&5
3371   (eval "$ac_link") 2>&5
3372   ac_status=$?
3373   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3374   test $ac_status = 0; }; then :
3375   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3376 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3377 # work properly (i.e., refer to `conftest.exe'), while it won't with
3378 # `rm'.
3379 for ac_file in conftest.exe conftest conftest.*; do
3380   test -f "$ac_file" || continue
3381   case $ac_file in
3382     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3383     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3384           break;;
3385     * ) break;;
3386   esac
3387 done
3388 else
3389   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3390 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3391 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3392 See \`config.log' for more details" "$LINENO" 5; }
3393 fi
3394 rm -f conftest conftest$ac_cv_exeext
3395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3396 $as_echo "$ac_cv_exeext" >&6; }
3397
3398 rm -f conftest.$ac_ext
3399 EXEEXT=$ac_cv_exeext
3400 ac_exeext=$EXEEXT
3401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3402 /* end confdefs.h.  */
3403 #include <stdio.h>
3404 int
3405 main ()
3406 {
3407 FILE *f = fopen ("conftest.out", "w");
3408  return ferror (f) || fclose (f) != 0;
3409
3410   ;
3411   return 0;
3412 }
3413 _ACEOF
3414 ac_clean_files="$ac_clean_files conftest.out"
3415 # Check that the compiler produces executables we can run.  If not, either
3416 # the compiler is broken, or we cross compile.
3417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3418 $as_echo_n "checking whether we are cross compiling... " >&6; }
3419 if test "$cross_compiling" != yes; then
3420   { { ac_try="$ac_link"
3421 case "(($ac_try" in
3422   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3423   *) ac_try_echo=$ac_try;;
3424 esac
3425 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3426 $as_echo "$ac_try_echo"; } >&5
3427   (eval "$ac_link") 2>&5
3428   ac_status=$?
3429   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3430   test $ac_status = 0; }
3431   if { ac_try='./conftest$ac_cv_exeext'
3432   { { case "(($ac_try" in
3433   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3434   *) ac_try_echo=$ac_try;;
3435 esac
3436 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3437 $as_echo "$ac_try_echo"; } >&5
3438   (eval "$ac_try") 2>&5
3439   ac_status=$?
3440   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3441   test $ac_status = 0; }; }; then
3442     cross_compiling=no
3443   else
3444     if test "$cross_compiling" = maybe; then
3445         cross_compiling=yes
3446     else
3447         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3448 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3449 as_fn_error $? "cannot run C compiled programs.
3450 If you meant to cross compile, use \`--host'.
3451 See \`config.log' for more details" "$LINENO" 5; }
3452     fi
3453   fi
3454 fi
3455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3456 $as_echo "$cross_compiling" >&6; }
3457
3458 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3459 ac_clean_files=$ac_clean_files_save
3460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3461 $as_echo_n "checking for suffix of object files... " >&6; }
3462 if ${ac_cv_objext+:} false; then :
3463   $as_echo_n "(cached) " >&6
3464 else
3465   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3466 /* end confdefs.h.  */
3467
3468 int
3469 main ()
3470 {
3471
3472   ;
3473   return 0;
3474 }
3475 _ACEOF
3476 rm -f conftest.o conftest.obj
3477 if { { ac_try="$ac_compile"
3478 case "(($ac_try" in
3479   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3480   *) ac_try_echo=$ac_try;;
3481 esac
3482 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3483 $as_echo "$ac_try_echo"; } >&5
3484   (eval "$ac_compile") 2>&5
3485   ac_status=$?
3486   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3487   test $ac_status = 0; }; then :
3488   for ac_file in conftest.o conftest.obj conftest.*; do
3489   test -f "$ac_file" || continue;
3490   case $ac_file in
3491     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3492     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3493        break;;
3494   esac
3495 done
3496 else
3497   $as_echo "$as_me: failed program was:" >&5
3498 sed 's/^/| /' conftest.$ac_ext >&5
3499
3500 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3501 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3502 as_fn_error $? "cannot compute suffix of object files: cannot compile
3503 See \`config.log' for more details" "$LINENO" 5; }
3504 fi
3505 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3506 fi
3507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3508 $as_echo "$ac_cv_objext" >&6; }
3509 OBJEXT=$ac_cv_objext
3510 ac_objext=$OBJEXT
3511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3512 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3513 if ${ac_cv_c_compiler_gnu+:} false; then :
3514   $as_echo_n "(cached) " >&6
3515 else
3516   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3517 /* end confdefs.h.  */
3518
3519 int
3520 main ()
3521 {
3522 #ifndef __GNUC__
3523        choke me
3524 #endif
3525
3526   ;
3527   return 0;
3528 }
3529 _ACEOF
3530 if ac_fn_c_try_compile "$LINENO"; then :
3531   ac_compiler_gnu=yes
3532 else
3533   ac_compiler_gnu=no
3534 fi
3535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3536 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3537
3538 fi
3539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3540 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3541 if test $ac_compiler_gnu = yes; then
3542   GCC=yes
3543 else
3544   GCC=
3545 fi
3546 ac_test_CFLAGS=${CFLAGS+set}
3547 ac_save_CFLAGS=$CFLAGS
3548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3549 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3550 if ${ac_cv_prog_cc_g+:} false; then :
3551   $as_echo_n "(cached) " >&6
3552 else
3553   ac_save_c_werror_flag=$ac_c_werror_flag
3554    ac_c_werror_flag=yes
3555    ac_cv_prog_cc_g=no
3556    CFLAGS="-g"
3557    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3558 /* end confdefs.h.  */
3559
3560 int
3561 main ()
3562 {
3563
3564   ;
3565   return 0;
3566 }
3567 _ACEOF
3568 if ac_fn_c_try_compile "$LINENO"; then :
3569   ac_cv_prog_cc_g=yes
3570 else
3571   CFLAGS=""
3572       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3573 /* end confdefs.h.  */
3574
3575 int
3576 main ()
3577 {
3578
3579   ;
3580   return 0;
3581 }
3582 _ACEOF
3583 if ac_fn_c_try_compile "$LINENO"; then :
3584
3585 else
3586   ac_c_werror_flag=$ac_save_c_werror_flag
3587          CFLAGS="-g"
3588          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3589 /* end confdefs.h.  */
3590
3591 int
3592 main ()
3593 {
3594
3595   ;
3596   return 0;
3597 }
3598 _ACEOF
3599 if ac_fn_c_try_compile "$LINENO"; then :
3600   ac_cv_prog_cc_g=yes
3601 fi
3602 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3603 fi
3604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3605 fi
3606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3607    ac_c_werror_flag=$ac_save_c_werror_flag
3608 fi
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3610 $as_echo "$ac_cv_prog_cc_g" >&6; }
3611 if test "$ac_test_CFLAGS" = set; then
3612   CFLAGS=$ac_save_CFLAGS
3613 elif test $ac_cv_prog_cc_g = yes; then
3614   if test "$GCC" = yes; then
3615     CFLAGS="-g -O2"
3616   else
3617     CFLAGS="-g"
3618   fi
3619 else
3620   if test "$GCC" = yes; then
3621     CFLAGS="-O2"
3622   else
3623     CFLAGS=
3624   fi
3625 fi
3626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3627 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3628 if ${ac_cv_prog_cc_c89+:} false; then :
3629   $as_echo_n "(cached) " >&6
3630 else
3631   ac_cv_prog_cc_c89=no
3632 ac_save_CC=$CC
3633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3634 /* end confdefs.h.  */
3635 #include <stdarg.h>
3636 #include <stdio.h>
3637 struct stat;
3638 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3639 struct buf { int x; };
3640 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3641 static char *e (p, i)
3642      char **p;
3643      int i;
3644 {
3645   return p[i];
3646 }
3647 static char *f (char * (*g) (char **, int), char **p, ...)
3648 {
3649   char *s;
3650   va_list v;
3651   va_start (v,p);
3652   s = g (p, va_arg (v,int));
3653   va_end (v);
3654   return s;
3655 }
3656
3657 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3658    function prototypes and stuff, but not '\xHH' hex character constants.
3659    These don't provoke an error unfortunately, instead are silently treated
3660    as 'x'.  The following induces an error, until -std is added to get
3661    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3662    array size at least.  It's necessary to write '\x00'==0 to get something
3663    that's true only with -std.  */
3664 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3665
3666 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3667    inside strings and character constants.  */
3668 #define FOO(x) 'x'
3669 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3670
3671 int test (int i, double x);
3672 struct s1 {int (*f) (int a);};
3673 struct s2 {int (*f) (double a);};
3674 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3675 int argc;
3676 char **argv;
3677 int
3678 main ()
3679 {
3680 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3681   ;
3682   return 0;
3683 }
3684 _ACEOF
3685 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3686         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3687 do
3688   CC="$ac_save_CC $ac_arg"
3689   if ac_fn_c_try_compile "$LINENO"; then :
3690   ac_cv_prog_cc_c89=$ac_arg
3691 fi
3692 rm -f core conftest.err conftest.$ac_objext
3693   test "x$ac_cv_prog_cc_c89" != "xno" && break
3694 done
3695 rm -f conftest.$ac_ext
3696 CC=$ac_save_CC
3697
3698 fi
3699 # AC_CACHE_VAL
3700 case "x$ac_cv_prog_cc_c89" in
3701   x)
3702     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3703 $as_echo "none needed" >&6; } ;;
3704   xno)
3705     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3706 $as_echo "unsupported" >&6; } ;;
3707   *)
3708     CC="$CC $ac_cv_prog_cc_c89"
3709     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3710 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3711 esac
3712 if test "x$ac_cv_prog_cc_c89" != xno; then :
3713
3714 fi
3715
3716 ac_ext=c
3717 ac_cpp='$CPP $CPPFLAGS'
3718 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3719 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3720 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3721
3722
3723 ac_ext=c
3724 ac_cpp='$CPP $CPPFLAGS'
3725 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3726 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3727 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3729 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3730 # On Suns, sometimes $CPP names a directory.
3731 if test -n "$CPP" && test -d "$CPP"; then
3732   CPP=
3733 fi
3734 if test -z "$CPP"; then
3735   if ${ac_cv_prog_CPP+:} false; then :
3736   $as_echo_n "(cached) " >&6
3737 else
3738       # Double quotes because CPP needs to be expanded
3739     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3740     do
3741       ac_preproc_ok=false
3742 for ac_c_preproc_warn_flag in '' yes
3743 do
3744   # Use a header file that comes with gcc, so configuring glibc
3745   # with a fresh cross-compiler works.
3746   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3747   # <limits.h> exists even on freestanding compilers.
3748   # On the NeXT, cc -E runs the code through the compiler's parser,
3749   # not just through cpp. "Syntax error" is here to catch this case.
3750   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3751 /* end confdefs.h.  */
3752 #ifdef __STDC__
3753 # include <limits.h>
3754 #else
3755 # include <assert.h>
3756 #endif
3757                      Syntax error
3758 _ACEOF
3759 if ac_fn_c_try_cpp "$LINENO"; then :
3760
3761 else
3762   # Broken: fails on valid input.
3763 continue
3764 fi
3765 rm -f conftest.err conftest.i conftest.$ac_ext
3766
3767   # OK, works on sane cases.  Now check whether nonexistent headers
3768   # can be detected and how.
3769   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3770 /* end confdefs.h.  */
3771 #include <ac_nonexistent.h>
3772 _ACEOF
3773 if ac_fn_c_try_cpp "$LINENO"; then :
3774   # Broken: success on invalid input.
3775 continue
3776 else
3777   # Passes both tests.
3778 ac_preproc_ok=:
3779 break
3780 fi
3781 rm -f conftest.err conftest.i conftest.$ac_ext
3782
3783 done
3784 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3785 rm -f conftest.i conftest.err conftest.$ac_ext
3786 if $ac_preproc_ok; then :
3787   break
3788 fi
3789
3790     done
3791     ac_cv_prog_CPP=$CPP
3792
3793 fi
3794   CPP=$ac_cv_prog_CPP
3795 else
3796   ac_cv_prog_CPP=$CPP
3797 fi
3798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3799 $as_echo "$CPP" >&6; }
3800 ac_preproc_ok=false
3801 for ac_c_preproc_warn_flag in '' yes
3802 do
3803   # Use a header file that comes with gcc, so configuring glibc
3804   # with a fresh cross-compiler works.
3805   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3806   # <limits.h> exists even on freestanding compilers.
3807   # On the NeXT, cc -E runs the code through the compiler's parser,
3808   # not just through cpp. "Syntax error" is here to catch this case.
3809   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3810 /* end confdefs.h.  */
3811 #ifdef __STDC__
3812 # include <limits.h>
3813 #else
3814 # include <assert.h>
3815 #endif
3816                      Syntax error
3817 _ACEOF
3818 if ac_fn_c_try_cpp "$LINENO"; then :
3819
3820 else
3821   # Broken: fails on valid input.
3822 continue
3823 fi
3824 rm -f conftest.err conftest.i conftest.$ac_ext
3825
3826   # OK, works on sane cases.  Now check whether nonexistent headers
3827   # can be detected and how.
3828   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3829 /* end confdefs.h.  */
3830 #include <ac_nonexistent.h>
3831 _ACEOF
3832 if ac_fn_c_try_cpp "$LINENO"; then :
3833   # Broken: success on invalid input.
3834 continue
3835 else
3836   # Passes both tests.
3837 ac_preproc_ok=:
3838 break
3839 fi
3840 rm -f conftest.err conftest.i conftest.$ac_ext
3841
3842 done
3843 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3844 rm -f conftest.i conftest.err conftest.$ac_ext
3845 if $ac_preproc_ok; then :
3846
3847 else
3848   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3849 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3850 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3851 See \`config.log' for more details" "$LINENO" 5; }
3852 fi
3853
3854 ac_ext=c
3855 ac_cpp='$CPP $CPPFLAGS'
3856 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3857 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3858 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3859
3860
3861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3862 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3863 if ${ac_cv_path_GREP+:} false; then :
3864   $as_echo_n "(cached) " >&6
3865 else
3866   if test -z "$GREP"; then
3867   ac_path_GREP_found=false
3868   # Loop through the user's path and test for each of PROGNAME-LIST
3869   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3870 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3871 do
3872   IFS=$as_save_IFS
3873   test -z "$as_dir" && as_dir=.
3874     for ac_prog in grep ggrep; do
3875     for ac_exec_ext in '' $ac_executable_extensions; do
3876       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3877       as_fn_executable_p "$ac_path_GREP" || continue
3878 # Check for GNU ac_path_GREP and select it if it is found.
3879   # Check for GNU $ac_path_GREP
3880 case `"$ac_path_GREP" --version 2>&1` in
3881 *GNU*)
3882   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3883 *)
3884   ac_count=0
3885   $as_echo_n 0123456789 >"conftest.in"
3886   while :
3887   do
3888     cat "conftest.in" "conftest.in" >"conftest.tmp"
3889     mv "conftest.tmp" "conftest.in"
3890     cp "conftest.in" "conftest.nl"
3891     $as_echo 'GREP' >> "conftest.nl"
3892     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3893     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3894     as_fn_arith $ac_count + 1 && ac_count=$as_val
3895     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3896       # Best one so far, save it but keep looking for a better one
3897       ac_cv_path_GREP="$ac_path_GREP"
3898       ac_path_GREP_max=$ac_count
3899     fi
3900     # 10*(2^10) chars as input seems more than enough
3901     test $ac_count -gt 10 && break
3902   done
3903   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3904 esac
3905
3906       $ac_path_GREP_found && break 3
3907     done
3908   done
3909   done
3910 IFS=$as_save_IFS
3911   if test -z "$ac_cv_path_GREP"; then
3912     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3913   fi
3914 else
3915   ac_cv_path_GREP=$GREP
3916 fi
3917
3918 fi
3919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3920 $as_echo "$ac_cv_path_GREP" >&6; }
3921  GREP="$ac_cv_path_GREP"
3922
3923
3924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3925 $as_echo_n "checking for egrep... " >&6; }
3926 if ${ac_cv_path_EGREP+:} false; then :
3927   $as_echo_n "(cached) " >&6
3928 else
3929   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3930    then ac_cv_path_EGREP="$GREP -E"
3931    else
3932      if test -z "$EGREP"; then
3933   ac_path_EGREP_found=false
3934   # Loop through the user's path and test for each of PROGNAME-LIST
3935   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3936 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3937 do
3938   IFS=$as_save_IFS
3939   test -z "$as_dir" && as_dir=.
3940     for ac_prog in egrep; do
3941     for ac_exec_ext in '' $ac_executable_extensions; do
3942       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3943       as_fn_executable_p "$ac_path_EGREP" || continue
3944 # Check for GNU ac_path_EGREP and select it if it is found.
3945   # Check for GNU $ac_path_EGREP
3946 case `"$ac_path_EGREP" --version 2>&1` in
3947 *GNU*)
3948   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3949 *)
3950   ac_count=0
3951   $as_echo_n 0123456789 >"conftest.in"
3952   while :
3953   do
3954     cat "conftest.in" "conftest.in" >"conftest.tmp"
3955     mv "conftest.tmp" "conftest.in"
3956     cp "conftest.in" "conftest.nl"
3957     $as_echo 'EGREP' >> "conftest.nl"
3958     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3959     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3960     as_fn_arith $ac_count + 1 && ac_count=$as_val
3961     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3962       # Best one so far, save it but keep looking for a better one
3963       ac_cv_path_EGREP="$ac_path_EGREP"
3964       ac_path_EGREP_max=$ac_count
3965     fi
3966     # 10*(2^10) chars as input seems more than enough
3967     test $ac_count -gt 10 && break
3968   done
3969   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3970 esac
3971
3972       $ac_path_EGREP_found && break 3
3973     done
3974   done
3975   done
3976 IFS=$as_save_IFS
3977   if test -z "$ac_cv_path_EGREP"; then
3978     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3979   fi
3980 else
3981   ac_cv_path_EGREP=$EGREP
3982 fi
3983
3984    fi
3985 fi
3986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3987 $as_echo "$ac_cv_path_EGREP" >&6; }
3988  EGREP="$ac_cv_path_EGREP"
3989
3990
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3992 $as_echo_n "checking for ANSI C header files... " >&6; }
3993 if ${ac_cv_header_stdc+:} false; then :
3994   $as_echo_n "(cached) " >&6
3995 else
3996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3997 /* end confdefs.h.  */
3998 #include <stdlib.h>
3999 #include <stdarg.h>
4000 #include <string.h>
4001 #include <float.h>
4002
4003 int
4004 main ()
4005 {
4006
4007   ;
4008   return 0;
4009 }
4010 _ACEOF
4011 if ac_fn_c_try_compile "$LINENO"; then :
4012   ac_cv_header_stdc=yes
4013 else
4014   ac_cv_header_stdc=no
4015 fi
4016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4017
4018 if test $ac_cv_header_stdc = yes; then
4019   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4020   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4021 /* end confdefs.h.  */
4022 #include <string.h>
4023
4024 _ACEOF
4025 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4026   $EGREP "memchr" >/dev/null 2>&1; then :
4027
4028 else
4029   ac_cv_header_stdc=no
4030 fi
4031 rm -f conftest*
4032
4033 fi
4034
4035 if test $ac_cv_header_stdc = yes; then
4036   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4037   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4038 /* end confdefs.h.  */
4039 #include <stdlib.h>
4040
4041 _ACEOF
4042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4043   $EGREP "free" >/dev/null 2>&1; then :
4044
4045 else
4046   ac_cv_header_stdc=no
4047 fi
4048 rm -f conftest*
4049
4050 fi
4051
4052 if test $ac_cv_header_stdc = yes; then
4053   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4054   if test "$cross_compiling" = yes; then :
4055   :
4056 else
4057   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4058 /* end confdefs.h.  */
4059 #include <ctype.h>
4060 #include <stdlib.h>
4061 #if ((' ' & 0x0FF) == 0x020)
4062 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4063 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4064 #else
4065 # define ISLOWER(c) \
4066                    (('a' <= (c) && (c) <= 'i') \
4067                      || ('j' <= (c) && (c) <= 'r') \
4068                      || ('s' <= (c) && (c) <= 'z'))
4069 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4070 #endif
4071
4072 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4073 int
4074 main ()
4075 {
4076   int i;
4077   for (i = 0; i < 256; i++)
4078     if (XOR (islower (i), ISLOWER (i))
4079         || toupper (i) != TOUPPER (i))
4080       return 2;
4081   return 0;
4082 }
4083 _ACEOF
4084 if ac_fn_c_try_run "$LINENO"; then :
4085
4086 else
4087   ac_cv_header_stdc=no
4088 fi
4089 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4090   conftest.$ac_objext conftest.beam conftest.$ac_ext
4091 fi
4092
4093 fi
4094 fi
4095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4096 $as_echo "$ac_cv_header_stdc" >&6; }
4097 if test $ac_cv_header_stdc = yes; then
4098
4099 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4100
4101 fi
4102
4103 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4104 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4105                   inttypes.h stdint.h unistd.h
4106 do :
4107   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4108 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4109 "
4110 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4111   cat >>confdefs.h <<_ACEOF
4112 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4113 _ACEOF
4114
4115 fi
4116
4117 done
4118
4119
4120
4121   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4122 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4123   MINIX=yes
4124 else
4125   MINIX=
4126 fi
4127
4128
4129   if test "$MINIX" = yes; then
4130
4131 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4132
4133
4134 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4135
4136
4137 $as_echo "#define _MINIX 1" >>confdefs.h
4138
4139   fi
4140
4141
4142   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4143 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4144 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4145   $as_echo_n "(cached) " >&6
4146 else
4147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4148 /* end confdefs.h.  */
4149
4150 #         define __EXTENSIONS__ 1
4151           $ac_includes_default
4152 int
4153 main ()
4154 {
4155
4156   ;
4157   return 0;
4158 }
4159 _ACEOF
4160 if ac_fn_c_try_compile "$LINENO"; then :
4161   ac_cv_safe_to_define___extensions__=yes
4162 else
4163   ac_cv_safe_to_define___extensions__=no
4164 fi
4165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4166 fi
4167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4168 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4169   test $ac_cv_safe_to_define___extensions__ = yes &&
4170     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4171
4172   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4173
4174   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4175
4176   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4177
4178   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4179
4180
4181 if test "$ac_cv_header_minix_config_h" = "yes"; then
4182
4183 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4184
4185 fi
4186
4187 case "$prefix" in
4188         NONE)
4189                 prefix="/usr/local"
4190         ;;
4191 esac
4192 case "$exec_prefix" in
4193         NONE)
4194                 exec_prefix="$prefix"
4195         ;;
4196 esac
4197
4198 # are we on MinGW?
4199 if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
4200 else
4201         if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes"
4202         else on_mingw="no"; fi
4203 fi
4204
4205 #
4206 # Determine configuration file
4207 # the eval is to evaluate shell expansion twice
4208 UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4209
4210 UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4211
4212 UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4213
4214 if test $on_mingw = "no"; then
4215   ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4216 else
4217   ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4218 fi
4219
4220 # Check whether --with-conf_file was given.
4221 if test "${with_conf_file+set}" = set; then :
4222   withval=$with_conf_file; ub_conf_file="$withval"
4223 fi
4224
4225
4226 hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4227
4228
4229 cat >>confdefs.h <<_ACEOF
4230 #define CONFIGFILE "$hdr_config"
4231 _ACEOF
4232
4233 ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4234 $as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4235          X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4236          X"$ub_conf_file" : 'X\(//\)$' \| \
4237          X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4238 $as_echo X"$ub_conf_file" |
4239     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4240             s//\1/
4241             q
4242           }
4243           /^X\(\/\/\)[^/].*/{
4244             s//\1/
4245             q
4246           }
4247           /^X\(\/\/\)$/{
4248             s//\1/
4249             q
4250           }
4251           /^X\(\/\).*/{
4252             s//\1/
4253             q
4254           }
4255           s/.*/./; q'`
4256
4257
4258 # Determine run, chroot directory and pidfile locations
4259
4260 # Check whether --with-run-dir was given.
4261 if test "${with_run_dir+set}" = set; then :
4262   withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4263 else
4264   if test $on_mingw = no; then
4265     UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4266 else
4267     UNBOUND_RUN_DIR=""
4268 fi
4269
4270 fi
4271
4272
4273 hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4274
4275
4276 cat >>confdefs.h <<_ACEOF
4277 #define RUN_DIR "$hdr_run"
4278 _ACEOF
4279
4280
4281
4282 # Check whether --with-chroot-dir was given.
4283 if test "${with_chroot_dir+set}" = set; then :
4284   withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4285 else
4286   if test $on_mingw = no; then
4287     UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4288 else
4289     UNBOUND_CHROOT_DIR=""
4290 fi
4291
4292 fi
4293
4294
4295 hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4296
4297
4298 cat >>confdefs.h <<_ACEOF
4299 #define CHROOT_DIR "$hdr_chroot"
4300 _ACEOF
4301
4302
4303
4304 # Check whether --with-share-dir was given.
4305 if test "${with_share_dir+set}" = set; then :
4306   withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4307 else
4308   UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4309 fi
4310
4311
4312
4313 cat >>confdefs.h <<_ACEOF
4314 #define SHARE_DIR "$UNBOUND_SHARE_DIR"
4315 _ACEOF
4316
4317
4318
4319 # Check whether --with-pidfile was given.
4320 if test "${with_pidfile+set}" = set; then :
4321   withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4322 else
4323   if test $on_mingw = no; then
4324     UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4325 else
4326     UNBOUND_PIDFILE=""
4327 fi
4328
4329 fi
4330
4331
4332 hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4333
4334
4335 cat >>confdefs.h <<_ACEOF
4336 #define PIDFILE "$hdr_pid"
4337 _ACEOF
4338
4339
4340
4341 # Check whether --with-rootkey-file was given.
4342 if test "${with_rootkey_file+set}" = set; then :
4343   withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4344 else
4345   if test $on_mingw = no; then
4346     UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4347 else
4348     UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4349 fi
4350
4351 fi
4352
4353
4354 hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4355
4356
4357 cat >>confdefs.h <<_ACEOF
4358 #define ROOT_ANCHOR_FILE "$hdr_rkey"
4359 _ACEOF
4360
4361
4362
4363 # Check whether --with-rootcert-file was given.
4364 if test "${with_rootcert_file+set}" = set; then :
4365   withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4366 else
4367   if test $on_mingw = no; then
4368     UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4369 else
4370     UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4371 fi
4372
4373 fi
4374
4375
4376 hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4377
4378
4379 cat >>confdefs.h <<_ACEOF
4380 #define ROOT_CERT_FILE "$hdr_rpem"
4381 _ACEOF
4382
4383
4384
4385 # Check whether --with-username was given.
4386 if test "${with_username+set}" = set; then :
4387   withval=$with_username; UNBOUND_USERNAME="$withval"
4388 else
4389   UNBOUND_USERNAME="unbound"
4390 fi
4391
4392
4393
4394 cat >>confdefs.h <<_ACEOF
4395 #define UB_USERNAME "$UNBOUND_USERNAME"
4396 _ACEOF
4397
4398
4399
4400 $as_echo "#define WINVER 0x0502" >>confdefs.h
4401
4402 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/' `
4403
4404
4405 cat >>confdefs.h <<_ACEOF
4406 #define RSRC_PACKAGE_VERSION $wnvs
4407 _ACEOF
4408
4409
4410 # Checks for typedefs, structures, and compiler characteristics.
4411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4412 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4413 if ${ac_cv_c_const+:} false; then :
4414   $as_echo_n "(cached) " >&6
4415 else
4416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4417 /* end confdefs.h.  */
4418
4419 int
4420 main ()
4421 {
4422
4423 #ifndef __cplusplus
4424   /* Ultrix mips cc rejects this sort of thing.  */
4425   typedef int charset[2];
4426   const charset cs = { 0, 0 };
4427   /* SunOS 4.1.1 cc rejects this.  */
4428   char const *const *pcpcc;
4429   char **ppc;
4430   /* NEC SVR4.0.2 mips cc rejects this.  */
4431   struct point {int x, y;};
4432   static struct point const zero = {0,0};
4433   /* AIX XL C 1.02.0.0 rejects this.
4434      It does not let you subtract one const X* pointer from another in
4435      an arm of an if-expression whose if-part is not a constant
4436      expression */
4437   const char *g = "string";
4438   pcpcc = &g + (g ? g-g : 0);
4439   /* HPUX 7.0 cc rejects these. */
4440   ++pcpcc;
4441   ppc = (char**) pcpcc;
4442   pcpcc = (char const *const *) ppc;
4443   { /* SCO 3.2v4 cc rejects this sort of thing.  */
4444     char tx;
4445     char *t = &tx;
4446     char const *s = 0 ? (char *) 0 : (char const *) 0;
4447
4448     *t++ = 0;
4449     if (s) return 0;
4450   }
4451   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4452     int x[] = {25, 17};
4453     const int *foo = &x[0];
4454     ++foo;
4455   }
4456   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4457     typedef const int *iptr;
4458     iptr p = 0;
4459     ++p;
4460   }
4461   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4462        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4463     struct s { int j; const int *ap[3]; } bx;
4464     struct s *b = &bx; b->j = 5;
4465   }
4466   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4467     const int foo = 10;
4468     if (!foo) return 0;
4469   }
4470   return !cs[0] && !zero.x;
4471 #endif
4472
4473   ;
4474   return 0;
4475 }
4476 _ACEOF
4477 if ac_fn_c_try_compile "$LINENO"; then :
4478   ac_cv_c_const=yes
4479 else
4480   ac_cv_c_const=no
4481 fi
4482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4483 fi
4484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4485 $as_echo "$ac_cv_c_const" >&6; }
4486 if test $ac_cv_c_const = no; then
4487
4488 $as_echo "#define const /**/" >>confdefs.h
4489
4490 fi
4491
4492 ac_ext=c
4493 ac_cpp='$CPP $CPPFLAGS'
4494 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4495 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4496 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4497
4498 # allow user to override the -g -O2 flags.
4499 default_cflags=no
4500 if test "x$CFLAGS" = "x" ; then
4501
4502
4503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4504 $as_echo_n "checking whether $CC supports -g... " >&6; }
4505 cache=`echo g | sed 'y%.=/+-%___p_%'`
4506 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4507   $as_echo_n "(cached) " >&6
4508 else
4509
4510 echo 'void f(void){}' >conftest.c
4511 if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4512 eval "cv_prog_cc_flag_$cache=yes"
4513 else
4514 eval "cv_prog_cc_flag_$cache=no"
4515 fi
4516 rm -f conftest conftest.o conftest.c
4517
4518 fi
4519
4520 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4522 $as_echo "yes" >&6; }
4523 :
4524 CFLAGS="$CFLAGS -g"
4525 else
4526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4527 $as_echo "no" >&6; }
4528 :
4529
4530 fi
4531
4532
4533
4534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4535 $as_echo_n "checking whether $CC supports -O2... " >&6; }
4536 cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4537 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4538   $as_echo_n "(cached) " >&6
4539 else
4540
4541 echo 'void f(void){}' >conftest.c
4542 if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4543 eval "cv_prog_cc_flag_$cache=yes"
4544 else
4545 eval "cv_prog_cc_flag_$cache=no"
4546 fi
4547 rm -f conftest conftest.o conftest.c
4548
4549 fi
4550
4551 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4553 $as_echo "yes" >&6; }
4554 :
4555 CFLAGS="$CFLAGS -O2"
4556 else
4557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4558 $as_echo "no" >&6; }
4559 :
4560
4561 fi
4562
4563 default_cflags=yes
4564 fi
4565 ac_ext=c
4566 ac_cpp='$CPP $CPPFLAGS'
4567 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4568 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4569 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4570 if test -n "$ac_tool_prefix"; then
4571   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4572 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4574 $as_echo_n "checking for $ac_word... " >&6; }
4575 if ${ac_cv_prog_CC+:} false; then :
4576   $as_echo_n "(cached) " >&6
4577 else
4578   if test -n "$CC"; then
4579   ac_cv_prog_CC="$CC" # Let the user override the test.
4580 else
4581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4582 for as_dir in $PATH
4583 do
4584   IFS=$as_save_IFS
4585   test -z "$as_dir" && as_dir=.
4586     for ac_exec_ext in '' $ac_executable_extensions; do
4587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4588     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4590     break 2
4591   fi
4592 done
4593   done
4594 IFS=$as_save_IFS
4595
4596 fi
4597 fi
4598 CC=$ac_cv_prog_CC
4599 if test -n "$CC"; then
4600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4601 $as_echo "$CC" >&6; }
4602 else
4603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4604 $as_echo "no" >&6; }
4605 fi
4606
4607
4608 fi
4609 if test -z "$ac_cv_prog_CC"; then
4610   ac_ct_CC=$CC
4611   # Extract the first word of "gcc", so it can be a program name with args.
4612 set dummy gcc; ac_word=$2
4613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4614 $as_echo_n "checking for $ac_word... " >&6; }
4615 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4616   $as_echo_n "(cached) " >&6
4617 else
4618   if test -n "$ac_ct_CC"; then
4619   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4620 else
4621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4622 for as_dir in $PATH
4623 do
4624   IFS=$as_save_IFS
4625   test -z "$as_dir" && as_dir=.
4626     for ac_exec_ext in '' $ac_executable_extensions; do
4627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4628     ac_cv_prog_ac_ct_CC="gcc"
4629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4630     break 2
4631   fi
4632 done
4633   done
4634 IFS=$as_save_IFS
4635
4636 fi
4637 fi
4638 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4639 if test -n "$ac_ct_CC"; then
4640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4641 $as_echo "$ac_ct_CC" >&6; }
4642 else
4643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4644 $as_echo "no" >&6; }
4645 fi
4646
4647   if test "x$ac_ct_CC" = x; then
4648     CC=""
4649   else
4650     case $cross_compiling:$ac_tool_warned in
4651 yes:)
4652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4653 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4654 ac_tool_warned=yes ;;
4655 esac
4656     CC=$ac_ct_CC
4657   fi
4658 else
4659   CC="$ac_cv_prog_CC"
4660 fi
4661
4662 if test -z "$CC"; then
4663           if test -n "$ac_tool_prefix"; then
4664     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4665 set dummy ${ac_tool_prefix}cc; ac_word=$2
4666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4667 $as_echo_n "checking for $ac_word... " >&6; }
4668 if ${ac_cv_prog_CC+:} false; then :
4669   $as_echo_n "(cached) " >&6
4670 else
4671   if test -n "$CC"; then
4672   ac_cv_prog_CC="$CC" # Let the user override the test.
4673 else
4674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4675 for as_dir in $PATH
4676 do
4677   IFS=$as_save_IFS
4678   test -z "$as_dir" && as_dir=.
4679     for ac_exec_ext in '' $ac_executable_extensions; do
4680   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4681     ac_cv_prog_CC="${ac_tool_prefix}cc"
4682     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4683     break 2
4684   fi
4685 done
4686   done
4687 IFS=$as_save_IFS
4688
4689 fi
4690 fi
4691 CC=$ac_cv_prog_CC
4692 if test -n "$CC"; then
4693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4694 $as_echo "$CC" >&6; }
4695 else
4696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4697 $as_echo "no" >&6; }
4698 fi
4699
4700
4701   fi
4702 fi
4703 if test -z "$CC"; then
4704   # Extract the first word of "cc", so it can be a program name with args.
4705 set dummy cc; ac_word=$2
4706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4707 $as_echo_n "checking for $ac_word... " >&6; }
4708 if ${ac_cv_prog_CC+:} false; then :
4709   $as_echo_n "(cached) " >&6
4710 else
4711   if test -n "$CC"; then
4712   ac_cv_prog_CC="$CC" # Let the user override the test.
4713 else
4714   ac_prog_rejected=no
4715 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4716 for as_dir in $PATH
4717 do
4718   IFS=$as_save_IFS
4719   test -z "$as_dir" && as_dir=.
4720     for ac_exec_ext in '' $ac_executable_extensions; do
4721   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4722     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4723        ac_prog_rejected=yes
4724        continue
4725      fi
4726     ac_cv_prog_CC="cc"
4727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4728     break 2
4729   fi
4730 done
4731   done
4732 IFS=$as_save_IFS
4733
4734 if test $ac_prog_rejected = yes; then
4735   # We found a bogon in the path, so make sure we never use it.
4736   set dummy $ac_cv_prog_CC
4737   shift
4738   if test $# != 0; then
4739     # We chose a different compiler from the bogus one.
4740     # However, it has the same basename, so the bogon will be chosen
4741     # first if we set CC to just the basename; use the full file name.
4742     shift
4743     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4744   fi
4745 fi
4746 fi
4747 fi
4748 CC=$ac_cv_prog_CC
4749 if test -n "$CC"; then
4750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4751 $as_echo "$CC" >&6; }
4752 else
4753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4754 $as_echo "no" >&6; }
4755 fi
4756
4757
4758 fi
4759 if test -z "$CC"; then
4760   if test -n "$ac_tool_prefix"; then
4761   for ac_prog in cl.exe
4762   do
4763     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4764 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4766 $as_echo_n "checking for $ac_word... " >&6; }
4767 if ${ac_cv_prog_CC+:} false; then :
4768   $as_echo_n "(cached) " >&6
4769 else
4770   if test -n "$CC"; then
4771   ac_cv_prog_CC="$CC" # Let the user override the test.
4772 else
4773 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4774 for as_dir in $PATH
4775 do
4776   IFS=$as_save_IFS
4777   test -z "$as_dir" && as_dir=.
4778     for ac_exec_ext in '' $ac_executable_extensions; do
4779   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4780     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4782     break 2
4783   fi
4784 done
4785   done
4786 IFS=$as_save_IFS
4787
4788 fi
4789 fi
4790 CC=$ac_cv_prog_CC
4791 if test -n "$CC"; then
4792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4793 $as_echo "$CC" >&6; }
4794 else
4795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4796 $as_echo "no" >&6; }
4797 fi
4798
4799
4800     test -n "$CC" && break
4801   done
4802 fi
4803 if test -z "$CC"; then
4804   ac_ct_CC=$CC
4805   for ac_prog in cl.exe
4806 do
4807   # Extract the first word of "$ac_prog", so it can be a program name with args.
4808 set dummy $ac_prog; ac_word=$2
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4810 $as_echo_n "checking for $ac_word... " >&6; }
4811 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4812   $as_echo_n "(cached) " >&6
4813 else
4814   if test -n "$ac_ct_CC"; then
4815   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4816 else
4817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4818 for as_dir in $PATH
4819 do
4820   IFS=$as_save_IFS
4821   test -z "$as_dir" && as_dir=.
4822     for ac_exec_ext in '' $ac_executable_extensions; do
4823   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4824     ac_cv_prog_ac_ct_CC="$ac_prog"
4825     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4826     break 2
4827   fi
4828 done
4829   done
4830 IFS=$as_save_IFS
4831
4832 fi
4833 fi
4834 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4835 if test -n "$ac_ct_CC"; then
4836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4837 $as_echo "$ac_ct_CC" >&6; }
4838 else
4839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4840 $as_echo "no" >&6; }
4841 fi
4842
4843
4844   test -n "$ac_ct_CC" && break
4845 done
4846
4847   if test "x$ac_ct_CC" = x; then
4848     CC=""
4849   else
4850     case $cross_compiling:$ac_tool_warned in
4851 yes:)
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4853 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4854 ac_tool_warned=yes ;;
4855 esac
4856     CC=$ac_ct_CC
4857   fi
4858 fi
4859
4860 fi
4861
4862
4863 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4864 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4865 as_fn_error $? "no acceptable C compiler found in \$PATH
4866 See \`config.log' for more details" "$LINENO" 5; }
4867
4868 # Provide some information about the compiler.
4869 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4870 set X $ac_compile
4871 ac_compiler=$2
4872 for ac_option in --version -v -V -qversion; do
4873   { { ac_try="$ac_compiler $ac_option >&5"
4874 case "(($ac_try" in
4875   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4876   *) ac_try_echo=$ac_try;;
4877 esac
4878 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4879 $as_echo "$ac_try_echo"; } >&5
4880   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4881   ac_status=$?
4882   if test -s conftest.err; then
4883     sed '10a\
4884 ... rest of stderr output deleted ...
4885          10q' conftest.err >conftest.er1
4886     cat conftest.er1 >&5
4887   fi
4888   rm -f conftest.er1 conftest.err
4889   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4890   test $ac_status = 0; }
4891 done
4892
4893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4894 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4895 if ${ac_cv_c_compiler_gnu+:} false; then :
4896   $as_echo_n "(cached) " >&6
4897 else
4898   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4899 /* end confdefs.h.  */
4900
4901 int
4902 main ()
4903 {
4904 #ifndef __GNUC__
4905        choke me
4906 #endif
4907
4908   ;
4909   return 0;
4910 }
4911 _ACEOF
4912 if ac_fn_c_try_compile "$LINENO"; then :
4913   ac_compiler_gnu=yes
4914 else
4915   ac_compiler_gnu=no
4916 fi
4917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4918 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4919
4920 fi
4921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4922 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4923 if test $ac_compiler_gnu = yes; then
4924   GCC=yes
4925 else
4926   GCC=
4927 fi
4928 ac_test_CFLAGS=${CFLAGS+set}
4929 ac_save_CFLAGS=$CFLAGS
4930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4931 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4932 if ${ac_cv_prog_cc_g+:} false; then :
4933   $as_echo_n "(cached) " >&6
4934 else
4935   ac_save_c_werror_flag=$ac_c_werror_flag
4936    ac_c_werror_flag=yes
4937    ac_cv_prog_cc_g=no
4938    CFLAGS="-g"
4939    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4940 /* end confdefs.h.  */
4941
4942 int
4943 main ()
4944 {
4945
4946   ;
4947   return 0;
4948 }
4949 _ACEOF
4950 if ac_fn_c_try_compile "$LINENO"; then :
4951   ac_cv_prog_cc_g=yes
4952 else
4953   CFLAGS=""
4954       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4955 /* end confdefs.h.  */
4956
4957 int
4958 main ()
4959 {
4960
4961   ;
4962   return 0;
4963 }
4964 _ACEOF
4965 if ac_fn_c_try_compile "$LINENO"; then :
4966
4967 else
4968   ac_c_werror_flag=$ac_save_c_werror_flag
4969          CFLAGS="-g"
4970          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4971 /* end confdefs.h.  */
4972
4973 int
4974 main ()
4975 {
4976
4977   ;
4978   return 0;
4979 }
4980 _ACEOF
4981 if ac_fn_c_try_compile "$LINENO"; then :
4982   ac_cv_prog_cc_g=yes
4983 fi
4984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4985 fi
4986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4987 fi
4988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4989    ac_c_werror_flag=$ac_save_c_werror_flag
4990 fi
4991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4992 $as_echo "$ac_cv_prog_cc_g" >&6; }
4993 if test "$ac_test_CFLAGS" = set; then
4994   CFLAGS=$ac_save_CFLAGS
4995 elif test $ac_cv_prog_cc_g = yes; then
4996   if test "$GCC" = yes; then
4997     CFLAGS="-g -O2"
4998   else
4999     CFLAGS="-g"
5000   fi
5001 else
5002   if test "$GCC" = yes; then
5003     CFLAGS="-O2"
5004   else
5005     CFLAGS=
5006   fi
5007 fi
5008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5009 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5010 if ${ac_cv_prog_cc_c89+:} false; then :
5011   $as_echo_n "(cached) " >&6
5012 else
5013   ac_cv_prog_cc_c89=no
5014 ac_save_CC=$CC
5015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5016 /* end confdefs.h.  */
5017 #include <stdarg.h>
5018 #include <stdio.h>
5019 struct stat;
5020 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5021 struct buf { int x; };
5022 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5023 static char *e (p, i)
5024      char **p;
5025      int i;
5026 {
5027   return p[i];
5028 }
5029 static char *f (char * (*g) (char **, int), char **p, ...)
5030 {
5031   char *s;
5032   va_list v;
5033   va_start (v,p);
5034   s = g (p, va_arg (v,int));
5035   va_end (v);
5036   return s;
5037 }
5038
5039 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5040    function prototypes and stuff, but not '\xHH' hex character constants.
5041    These don't provoke an error unfortunately, instead are silently treated
5042    as 'x'.  The following induces an error, until -std is added to get
5043    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5044    array size at least.  It's necessary to write '\x00'==0 to get something
5045    that's true only with -std.  */
5046 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5047
5048 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5049    inside strings and character constants.  */
5050 #define FOO(x) 'x'
5051 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5052
5053 int test (int i, double x);
5054 struct s1 {int (*f) (int a);};
5055 struct s2 {int (*f) (double a);};
5056 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5057 int argc;
5058 char **argv;
5059 int
5060 main ()
5061 {
5062 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5063   ;
5064   return 0;
5065 }
5066 _ACEOF
5067 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5068         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5069 do
5070   CC="$ac_save_CC $ac_arg"
5071   if ac_fn_c_try_compile "$LINENO"; then :
5072   ac_cv_prog_cc_c89=$ac_arg
5073 fi
5074 rm -f core conftest.err conftest.$ac_objext
5075   test "x$ac_cv_prog_cc_c89" != "xno" && break
5076 done
5077 rm -f conftest.$ac_ext
5078 CC=$ac_save_CC
5079
5080 fi
5081 # AC_CACHE_VAL
5082 case "x$ac_cv_prog_cc_c89" in
5083   x)
5084     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5085 $as_echo "none needed" >&6; } ;;
5086   xno)
5087     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5088 $as_echo "unsupported" >&6; } ;;
5089   *)
5090     CC="$CC $ac_cv_prog_cc_c89"
5091     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5092 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5093 esac
5094 if test "x$ac_cv_prog_cc_c89" != xno; then :
5095
5096 fi
5097
5098 ac_ext=c
5099 ac_cpp='$CPP $CPPFLAGS'
5100 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5101 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5102 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5103
5104
5105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5106 $as_echo_n "checking $CC dependency flag... " >&6; }
5107 echo 'void f(){}' >conftest.c
5108 if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5109         DEPFLAG="-MM"
5110 else
5111   if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5112         DEPFLAG="-xM1"
5113   else
5114         DEPFLAG="-MM"  # dunno do something
5115   fi
5116 fi
5117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5118 $as_echo "$DEPFLAG" >&6; }
5119 rm -f conftest.c
5120
5121
5122
5123
5124
5125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5126 $as_echo_n "checking whether $CC supports -Werror... " >&6; }
5127 cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5128 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5129   $as_echo_n "(cached) " >&6
5130 else
5131
5132 echo 'void f(void){}' >conftest.c
5133 if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5134 eval "cv_prog_cc_flag_$cache=yes"
5135 else
5136 eval "cv_prog_cc_flag_$cache=no"
5137 fi
5138 rm -f conftest conftest.o conftest.c
5139
5140 fi
5141
5142 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5144 $as_echo "yes" >&6; }
5145 :
5146 ERRFLAG="-Werror"
5147 else
5148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5149 $as_echo "no" >&6; }
5150 :
5151 ERRFLAG="-errwarn"
5152 fi
5153
5154
5155
5156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5157 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5158 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5159 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5160   $as_echo_n "(cached) " >&6
5161 else
5162
5163 echo 'void f(void){}' >conftest.c
5164 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5165 eval "cv_prog_cc_flag_$cache=yes"
5166 else
5167 eval "cv_prog_cc_flag_$cache=no"
5168 fi
5169 rm -f conftest conftest.o conftest.c
5170
5171 fi
5172
5173 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5175 $as_echo "yes" >&6; }
5176 :
5177 ERRFLAG="$ERRFLAG -Wall"
5178 else
5179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5180 $as_echo "no" >&6; }
5181 :
5182 ERRFLAG="$ERRFLAG -errfmt"
5183 fi
5184
5185
5186
5187
5188
5189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5190 $as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5191 cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5192 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5193   $as_echo_n "(cached) " >&6
5194 else
5195
5196 echo 'void f(void){}' >conftest.c
5197 if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5198 eval "cv_prog_cc_flag_$cache=yes"
5199 else
5200 eval "cv_prog_cc_flag_$cache=no"
5201 fi
5202 rm -f conftest conftest.o conftest.c
5203
5204 fi
5205
5206 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5208 $as_echo "yes" >&6; }
5209 :
5210 C99FLAG="-std=c99"
5211 else
5212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5213 $as_echo "no" >&6; }
5214 :
5215
5216 fi
5217
5218
5219
5220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5221 $as_echo_n "checking whether $CC supports -xc99... " >&6; }
5222 cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5223 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5224   $as_echo_n "(cached) " >&6
5225 else
5226
5227 echo 'void f(void){}' >conftest.c
5228 if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5229 eval "cv_prog_cc_flag_$cache=yes"
5230 else
5231 eval "cv_prog_cc_flag_$cache=no"
5232 fi
5233 rm -f conftest conftest.o conftest.c
5234
5235 fi
5236
5237 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5239 $as_echo "yes" >&6; }
5240 :
5241 C99FLAG="-xc99"
5242 else
5243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5244 $as_echo "no" >&6; }
5245 :
5246
5247 fi
5248
5249
5250 for ac_header in getopt.h time.h
5251 do :
5252   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5253 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5254 "
5255 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5256   cat >>confdefs.h <<_ACEOF
5257 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5258 _ACEOF
5259
5260 fi
5261
5262 done
5263
5264
5265
5266
5267
5268 { $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
5269 $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; }
5270 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`
5271 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5272   $as_echo_n "(cached) " >&6
5273 else
5274
5275 echo '
5276 #include "confdefs.h"
5277 #include <stdlib.h>
5278 #include <ctype.h>
5279 #include <sys/time.h>
5280 #ifdef HAVE_TIME_H
5281 #include <time.h>
5282 #endif
5283 #include <unistd.h>
5284 #include <netdb.h>
5285 #ifdef HAVE_GETOPT_H
5286 #include <getopt.h>
5287 #endif
5288
5289 int test() {
5290         int a;
5291         char **opts = NULL;
5292         struct timeval tv;
5293         char *t;
5294         time_t time = 0;
5295         char *buf = NULL;
5296         const char* str = NULL;
5297         struct msghdr msg;
5298         msg.msg_control = 0;
5299         t = ctime_r(&time, buf);
5300         tv.tv_usec = 10;
5301         srandom(32);
5302         a = getopt(2, opts, "a");
5303         a = isascii(32);
5304         str = gai_strerror(0);
5305         if(str && t && tv.tv_usec && msg.msg_control)
5306                 a = 0;
5307         return a;
5308 }
5309 ' > conftest.c
5310 echo 'void f(){}' >>conftest.c
5311 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5312 eval "cv_prog_cc_flag_needed_$cache=no"
5313 else
5314
5315 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
5316 eval "cv_prog_cc_flag_needed_$cache=yes"
5317 else
5318 eval "cv_prog_cc_flag_needed_$cache=fail"
5319 #echo 'Test with flag fails too!'
5320 #cat conftest.c
5321 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5322 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5323 #exit 1
5324 fi
5325
5326 fi
5327 rm -f conftest conftest.c conftest.o
5328
5329 fi
5330
5331 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5333 $as_echo "yes" >&6; }
5334 :
5335 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"
5336 else
5337 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5339 $as_echo "no" >&6; }
5340 #echo 'Test with flag is no!'
5341 #cat conftest.c
5342 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5343 #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`
5344 #exit 1
5345 :
5346
5347 else
5348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5349 $as_echo "failed" >&6; }
5350 :
5351
5352 fi
5353 fi
5354
5355
5356
5357
5358
5359 { $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
5360 $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; }
5361 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`
5362 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5363   $as_echo_n "(cached) " >&6
5364 else
5365
5366 echo '
5367 #include "confdefs.h"
5368 #include <stdlib.h>
5369 #include <ctype.h>
5370 #include <sys/time.h>
5371 #ifdef HAVE_TIME_H
5372 #include <time.h>
5373 #endif
5374 #include <unistd.h>
5375 #include <netdb.h>
5376 #ifdef HAVE_GETOPT_H
5377 #include <getopt.h>
5378 #endif
5379
5380 int test() {
5381         int a;
5382         char **opts = NULL;
5383         struct timeval tv;
5384         char *t;
5385         time_t time = 0;
5386         char *buf = NULL;
5387         const char* str = NULL;
5388         struct msghdr msg;
5389         msg.msg_control = 0;
5390         t = ctime_r(&time, buf);
5391         tv.tv_usec = 10;
5392         srandom(32);
5393         a = getopt(2, opts, "a");
5394         a = isascii(32);
5395         str = gai_strerror(0);
5396         if(str && t && tv.tv_usec && msg.msg_control)
5397                 a = 0;
5398         return a;
5399 }
5400 ' > conftest.c
5401 echo 'void f(){}' >>conftest.c
5402 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5403 eval "cv_prog_cc_flag_needed_$cache=no"
5404 else
5405
5406 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
5407 eval "cv_prog_cc_flag_needed_$cache=yes"
5408 else
5409 eval "cv_prog_cc_flag_needed_$cache=fail"
5410 #echo 'Test with flag fails too!'
5411 #cat conftest.c
5412 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5413 #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`
5414 #exit 1
5415 fi
5416
5417 fi
5418 rm -f conftest conftest.c conftest.o
5419
5420 fi
5421
5422 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5424 $as_echo "yes" >&6; }
5425 :
5426 CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5427 else
5428 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5430 $as_echo "no" >&6; }
5431 #echo 'Test with flag is no!'
5432 #cat conftest.c
5433 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5434 #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`
5435 #exit 1
5436 :
5437
5438 else
5439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5440 $as_echo "failed" >&6; }
5441 :
5442
5443 fi
5444 fi
5445
5446
5447
5448
5449
5450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5451 $as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5452 cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5453 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5454   $as_echo_n "(cached) " >&6
5455 else
5456
5457 echo '
5458 #include <stdbool.h>
5459 #include <ctype.h>
5460 int test() {
5461         int a = 0;
5462         return a;
5463 }
5464 ' > conftest.c
5465 echo 'void f(){}' >>conftest.c
5466 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5467 eval "cv_prog_cc_flag_needed_$cache=no"
5468 else
5469
5470 if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5471 eval "cv_prog_cc_flag_needed_$cache=yes"
5472 else
5473 eval "cv_prog_cc_flag_needed_$cache=fail"
5474 #echo 'Test with flag fails too!'
5475 #cat conftest.c
5476 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5477 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5478 #exit 1
5479 fi
5480
5481 fi
5482 rm -f conftest conftest.c conftest.o
5483
5484 fi
5485
5486 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5488 $as_echo "yes" >&6; }
5489 :
5490 CFLAGS="$CFLAGS $C99FLAG"
5491 else
5492 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5494 $as_echo "no" >&6; }
5495 #echo 'Test with flag is no!'
5496 #cat conftest.c
5497 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5498 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5499 #exit 1
5500 :
5501
5502 else
5503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5504 $as_echo "failed" >&6; }
5505 :
5506
5507 fi
5508 fi
5509
5510
5511
5512
5513
5514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
5515 $as_echo_n "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
5516 cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
5517 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5518   $as_echo_n "(cached) " >&6
5519 else
5520
5521 echo '
5522 #include <ctype.h>
5523
5524 int test() {
5525         int a;
5526         a = isascii(32);
5527         return a;
5528 }
5529 ' > conftest.c
5530 echo 'void f(){}' >>conftest.c
5531 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5532 eval "cv_prog_cc_flag_needed_$cache=no"
5533 else
5534
5535 if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5536 eval "cv_prog_cc_flag_needed_$cache=yes"
5537 else
5538 eval "cv_prog_cc_flag_needed_$cache=fail"
5539 #echo 'Test with flag fails too!'
5540 #cat conftest.c
5541 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5542 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5543 #exit 1
5544 fi
5545
5546 fi
5547 rm -f conftest conftest.c conftest.o
5548
5549 fi
5550
5551 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5553 $as_echo "yes" >&6; }
5554 :
5555 CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
5556 else
5557 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5559 $as_echo "no" >&6; }
5560 #echo 'Test with flag is no!'
5561 #cat conftest.c
5562 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5563 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5564 #exit 1
5565 :
5566
5567 else
5568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5569 $as_echo "failed" >&6; }
5570 :
5571
5572 fi
5573 fi
5574
5575
5576
5577
5578
5579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5580 $as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5581 cache=_D_GNU_SOURCE
5582 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5583   $as_echo_n "(cached) " >&6
5584 else
5585
5586 echo '
5587 #include <netinet/in.h>
5588
5589 int test() {
5590         struct in6_pktinfo inf;
5591         int a = (int)sizeof(inf);
5592         return a;
5593 }
5594 ' > conftest.c
5595 echo 'void f(){}' >>conftest.c
5596 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5597 eval "cv_prog_cc_flag_needed_$cache=no"
5598 else
5599
5600 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5601 eval "cv_prog_cc_flag_needed_$cache=yes"
5602 else
5603 eval "cv_prog_cc_flag_needed_$cache=fail"
5604 #echo 'Test with flag fails too!'
5605 #cat conftest.c
5606 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5607 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5608 #exit 1
5609 fi
5610
5611 fi
5612 rm -f conftest conftest.c conftest.o
5613
5614 fi
5615
5616 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5618 $as_echo "yes" >&6; }
5619 :
5620 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5621 else
5622 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5624 $as_echo "no" >&6; }
5625 #echo 'Test with flag is no!'
5626 #cat conftest.c
5627 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5628 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5629 #exit 1
5630 :
5631
5632 else
5633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5634 $as_echo "failed" >&6; }
5635 :
5636
5637 fi
5638 fi
5639
5640
5641 # check again for GNU_SOURCE for setresgid. May fail if setresgid
5642 # is not available at all. -D_FRSRESGID is to make this check unique.
5643 # otherwise we would get the previous cached result.
5644
5645
5646
5647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5648 $as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5649 cache=_D_GNU_SOURCE__D_FRSRESGID
5650 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5651   $as_echo_n "(cached) " >&6
5652 else
5653
5654 echo '
5655 #include <unistd.h>
5656
5657 int test() {
5658         int a = setresgid(0,0,0);
5659         a = setresuid(0,0,0);
5660         return a;
5661 }
5662 ' > conftest.c
5663 echo 'void f(){}' >>conftest.c
5664 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5665 eval "cv_prog_cc_flag_needed_$cache=no"
5666 else
5667
5668 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5669 eval "cv_prog_cc_flag_needed_$cache=yes"
5670 else
5671 eval "cv_prog_cc_flag_needed_$cache=fail"
5672 #echo 'Test with flag fails too!'
5673 #cat conftest.c
5674 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5675 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5676 #exit 1
5677 fi
5678
5679 fi
5680 rm -f conftest conftest.c conftest.o
5681
5682 fi
5683
5684 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5686 $as_echo "yes" >&6; }
5687 :
5688 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5689 else
5690 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692 $as_echo "no" >&6; }
5693 #echo 'Test with flag is no!'
5694 #cat conftest.c
5695 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5696 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5697 #exit 1
5698 :
5699
5700 else
5701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5702 $as_echo "failed" >&6; }
5703 :
5704
5705 fi
5706 fi
5707
5708
5709
5710
5711
5712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5713 $as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5714 cache=_D_POSIX_C_SOURCE_200112
5715 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5716   $as_echo_n "(cached) " >&6
5717 else
5718
5719 echo '
5720 #include "confdefs.h"
5721 #ifdef HAVE_TIME_H
5722 #include <time.h>
5723 #endif
5724 #include <netdb.h>
5725
5726 int test() {
5727         int a = 0;
5728         char *t;
5729         time_t time = 0;
5730         char *buf = NULL;
5731         const char* str = NULL;
5732         t = ctime_r(&time, buf);
5733         str = gai_strerror(0);
5734         if(t && str)
5735                 a = 0;
5736         return a;
5737 }
5738 ' > conftest.c
5739 echo 'void f(){}' >>conftest.c
5740 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5741 eval "cv_prog_cc_flag_needed_$cache=no"
5742 else
5743
5744 if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5745 eval "cv_prog_cc_flag_needed_$cache=yes"
5746 else
5747 eval "cv_prog_cc_flag_needed_$cache=fail"
5748 #echo 'Test with flag fails too!'
5749 #cat conftest.c
5750 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5751 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5752 #exit 1
5753 fi
5754
5755 fi
5756 rm -f conftest conftest.c conftest.o
5757
5758 fi
5759
5760 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5762 $as_echo "yes" >&6; }
5763 :
5764 CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5765 else
5766 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5768 $as_echo "no" >&6; }
5769 #echo 'Test with flag is no!'
5770 #cat conftest.c
5771 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5772 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5773 #exit 1
5774 :
5775
5776 else
5777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5778 $as_echo "failed" >&6; }
5779 :
5780
5781 fi
5782 fi
5783
5784
5785
5786
5787
5788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5789 $as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5790 cache=_D__EXTENSIONS__
5791 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5792   $as_echo_n "(cached) " >&6
5793 else
5794
5795 echo '
5796 #include "confdefs.h"
5797 #include <stdlib.h>
5798 #include <ctype.h>
5799 #include <sys/time.h>
5800 #ifdef HAVE_TIME_H
5801 #include <time.h>
5802 #endif
5803 #include <unistd.h>
5804 #ifdef HAVE_GETOPT_H
5805 #include <getopt.h>
5806 #endif
5807
5808 int test() {
5809         int a;
5810         char **opts = NULL;
5811         struct timeval tv;
5812         tv.tv_usec = 10;
5813         srandom(32);
5814         a = getopt(2, opts, "a");
5815         a = isascii(32);
5816         if(tv.tv_usec)
5817                 a = 0;
5818         return a;
5819 }
5820 ' > conftest.c
5821 echo 'void f(){}' >>conftest.c
5822 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5823 eval "cv_prog_cc_flag_needed_$cache=no"
5824 else
5825
5826 if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5827 eval "cv_prog_cc_flag_needed_$cache=yes"
5828 else
5829 eval "cv_prog_cc_flag_needed_$cache=fail"
5830 #echo 'Test with flag fails too!'
5831 #cat conftest.c
5832 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5833 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5834 #exit 1
5835 fi
5836
5837 fi
5838 rm -f conftest conftest.c conftest.o
5839
5840 fi
5841
5842 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5844 $as_echo "yes" >&6; }
5845 :
5846 CFLAGS="$CFLAGS -D__EXTENSIONS__"
5847 else
5848 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5850 $as_echo "no" >&6; }
5851 #echo 'Test with flag is no!'
5852 #cat conftest.c
5853 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5854 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5855 #exit 1
5856 :
5857
5858 else
5859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5860 $as_echo "failed" >&6; }
5861 :
5862
5863 fi
5864 fi
5865
5866
5867
5868
5869 # debug mode flags warnings
5870 # Check whether --enable-checking was given.
5871 if test "${enable_checking+set}" = set; then :
5872   enableval=$enable_checking;
5873 fi
5874
5875 # Check whether --enable-debug was given.
5876 if test "${enable_debug+set}" = set; then :
5877   enableval=$enable_debug;
5878 fi
5879
5880 if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5881 else debug_enabled="$enable_checking"; fi
5882
5883 case "$debug_enabled" in
5884         yes)
5885
5886
5887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5888 $as_echo_n "checking whether $CC supports -W... " >&6; }
5889 cache=`echo W | sed 'y%.=/+-%___p_%'`
5890 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5891   $as_echo_n "(cached) " >&6
5892 else
5893
5894 echo 'void f(void){}' >conftest.c
5895 if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5896 eval "cv_prog_cc_flag_$cache=yes"
5897 else
5898 eval "cv_prog_cc_flag_$cache=no"
5899 fi
5900 rm -f conftest conftest.o conftest.c
5901
5902 fi
5903
5904 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5906 $as_echo "yes" >&6; }
5907 :
5908 CFLAGS="$CFLAGS -W"
5909 else
5910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5911 $as_echo "no" >&6; }
5912 :
5913
5914 fi
5915
5916
5917
5918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5919 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5920 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5921 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5922   $as_echo_n "(cached) " >&6
5923 else
5924
5925 echo 'void f(void){}' >conftest.c
5926 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5927 eval "cv_prog_cc_flag_$cache=yes"
5928 else
5929 eval "cv_prog_cc_flag_$cache=no"
5930 fi
5931 rm -f conftest conftest.o conftest.c
5932
5933 fi
5934
5935 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5937 $as_echo "yes" >&6; }
5938 :
5939 CFLAGS="$CFLAGS -Wall"
5940 else
5941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5942 $as_echo "no" >&6; }
5943 :
5944
5945 fi
5946
5947
5948
5949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5950 $as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5951 cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5952 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5953   $as_echo_n "(cached) " >&6
5954 else
5955
5956 echo 'void f(void){}' >conftest.c
5957 if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5958 eval "cv_prog_cc_flag_$cache=yes"
5959 else
5960 eval "cv_prog_cc_flag_$cache=no"
5961 fi
5962 rm -f conftest conftest.o conftest.c
5963
5964 fi
5965
5966 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5968 $as_echo "yes" >&6; }
5969 :
5970 CFLAGS="$CFLAGS -Wextra"
5971 else
5972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5973 $as_echo "no" >&6; }
5974 :
5975
5976 fi
5977
5978
5979
5980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
5981 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
5982 cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
5983 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5984   $as_echo_n "(cached) " >&6
5985 else
5986
5987 echo 'void f(void){}' >conftest.c
5988 if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
5989 eval "cv_prog_cc_flag_$cache=yes"
5990 else
5991 eval "cv_prog_cc_flag_$cache=no"
5992 fi
5993 rm -f conftest conftest.o conftest.c
5994
5995 fi
5996
5997 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5999 $as_echo "yes" >&6; }
6000 :
6001 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
6002 else
6003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6004 $as_echo "no" >&6; }
6005 :
6006
6007 fi
6008
6009
6010 $as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
6011
6012                 ;;
6013         no|*)
6014                 # nothing to do.
6015                 ;;
6016 esac
6017 if test "$default_cflags" = "yes"; then
6018         # only when CFLAGS was "" at the start, if the users wants to
6019         # override we shouldn't add default cflags, because they wouldn't
6020         # be able to turn off these options and set the CFLAGS wanted.
6021
6022     # Check whether --enable-flto was given.
6023 if test "${enable_flto+set}" = set; then :
6024   enableval=$enable_flto;
6025 fi
6026
6027     if test "x$enable_flto" != "xno"; then :
6028
6029         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
6030 $as_echo_n "checking if $CC supports -flto... " >&6; }
6031         BAKCFLAGS="$CFLAGS"
6032         CFLAGS="$CFLAGS -flto"
6033         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6034 /* end confdefs.h.  */
6035
6036 int
6037 main ()
6038 {
6039
6040   ;
6041   return 0;
6042 }
6043 _ACEOF
6044 if ac_fn_c_try_link "$LINENO"; then :
6045
6046             if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
6047                 CFLAGS="$BAKCFLAGS"
6048                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6049 $as_echo "no" >&6; }
6050             else
6051                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6052 $as_echo "yes" >&6; }
6053             fi
6054             rm -f conftest conftest.c conftest.o
6055
6056 else
6057   CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6058 $as_echo "no" >&6; }
6059 fi
6060 rm -f core conftest.err conftest.$ac_objext \
6061     conftest$ac_exeext conftest.$ac_ext
6062
6063 fi
6064
6065
6066     # Check whether --enable-pie was given.
6067 if test "${enable_pie+set}" = set; then :
6068   enableval=$enable_pie;
6069 fi
6070
6071     if test "x$enable_pie" = "xyes"; then :
6072
6073         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6074 $as_echo_n "checking if $CC supports PIE... " >&6; }
6075         BAKLDFLAGS="$LDFLAGS"
6076         BAKCFLAGS="$CFLAGS"
6077         LDFLAGS="$LDFLAGS -pie"
6078         CFLAGS="$CFLAGS -fPIE"
6079         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6080 /* end confdefs.h.  */
6081
6082 int
6083 main ()
6084 {
6085
6086   ;
6087   return 0;
6088 }
6089 _ACEOF
6090 if ac_fn_c_try_link "$LINENO"; then :
6091
6092             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6093                 LDFLAGS="$BAKLDFLAGS"
6094                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6095 $as_echo "no" >&6; }
6096             else
6097                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6098 $as_echo "yes" >&6; }
6099             fi
6100             rm -f conftest conftest.c conftest.o
6101
6102 else
6103   LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6104 $as_echo "no" >&6; }
6105 fi
6106 rm -f core conftest.err conftest.$ac_objext \
6107     conftest$ac_exeext conftest.$ac_ext
6108
6109 fi
6110
6111
6112     # Check whether --enable-relro_now was given.
6113 if test "${enable_relro_now+set}" = set; then :
6114   enableval=$enable_relro_now;
6115 fi
6116
6117     if test "x$enable_relro_now" = "xyes"; then :
6118
6119         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6120 $as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6121         BAKLDFLAGS="$LDFLAGS"
6122         LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6123         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6124 /* end confdefs.h.  */
6125
6126 int
6127 main ()
6128 {
6129
6130   ;
6131   return 0;
6132 }
6133 _ACEOF
6134 if ac_fn_c_try_link "$LINENO"; then :
6135
6136             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6137                 LDFLAGS="$BAKLDFLAGS"
6138                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6139 $as_echo "no" >&6; }
6140             else
6141                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6142 $as_echo "yes" >&6; }
6143             fi
6144             rm -f conftest conftest.c conftest.o
6145
6146 else
6147   LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6148 $as_echo "no" >&6; }
6149 fi
6150 rm -f core conftest.err conftest.$ac_objext \
6151     conftest$ac_exeext conftest.$ac_ext
6152
6153 fi
6154
6155 fi
6156
6157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6158 $as_echo_n "checking for inline... " >&6; }
6159 if ${ac_cv_c_inline+:} false; then :
6160   $as_echo_n "(cached) " >&6
6161 else
6162   ac_cv_c_inline=no
6163 for ac_kw in inline __inline__ __inline; do
6164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6165 /* end confdefs.h.  */
6166 #ifndef __cplusplus
6167 typedef int foo_t;
6168 static $ac_kw foo_t static_foo () {return 0; }
6169 $ac_kw foo_t foo () {return 0; }
6170 #endif
6171
6172 _ACEOF
6173 if ac_fn_c_try_compile "$LINENO"; then :
6174   ac_cv_c_inline=$ac_kw
6175 fi
6176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6177   test "$ac_cv_c_inline" != no && break
6178 done
6179
6180 fi
6181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6182 $as_echo "$ac_cv_c_inline" >&6; }
6183
6184 case $ac_cv_c_inline in
6185   inline | yes) ;;
6186   *)
6187     case $ac_cv_c_inline in
6188       no) ac_val=;;
6189       *) ac_val=$ac_cv_c_inline;;
6190     esac
6191     cat >>confdefs.h <<_ACEOF
6192 #ifndef __cplusplus
6193 #define inline $ac_val
6194 #endif
6195 _ACEOF
6196     ;;
6197 esac
6198
6199
6200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6201 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6202 if ${ac_cv_c_format_attribute+:} false; then :
6203   $as_echo_n "(cached) " >&6
6204 else
6205   ac_cv_c_format_attribute=no
6206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6207 /* end confdefs.h.  */
6208 #include <stdio.h>
6209 void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6210 void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6211
6212 int
6213 main ()
6214 {
6215
6216    f ("%s", "str");
6217
6218   ;
6219   return 0;
6220 }
6221 _ACEOF
6222 if ac_fn_c_try_compile "$LINENO"; then :
6223   ac_cv_c_format_attribute="yes"
6224 else
6225   ac_cv_c_format_attribute="no"
6226 fi
6227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6228
6229 fi
6230
6231
6232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6233 $as_echo "$ac_cv_c_format_attribute" >&6; }
6234 if test $ac_cv_c_format_attribute = yes; then
6235
6236 $as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6237
6238 fi
6239
6240
6241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6242 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6243 if ${ac_cv_c_unused_attribute+:} false; then :
6244   $as_echo_n "(cached) " >&6
6245 else
6246   ac_cv_c_unused_attribute=no
6247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6248 /* end confdefs.h.  */
6249 #include <stdio.h>
6250 void f (char *u __attribute__((unused)));
6251
6252 int
6253 main ()
6254 {
6255
6256    f ("x");
6257
6258   ;
6259   return 0;
6260 }
6261 _ACEOF
6262 if ac_fn_c_try_compile "$LINENO"; then :
6263   ac_cv_c_unused_attribute="yes"
6264 else
6265   ac_cv_c_unused_attribute="no"
6266 fi
6267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6268
6269 fi
6270
6271
6272
6273
6274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6275 $as_echo "$ac_cv_c_unused_attribute" >&6; }
6276 if test $ac_cv_c_unused_attribute = yes; then
6277
6278 $as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6279
6280 fi
6281
6282
6283
6284
6285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6286 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6287 if ${ac_cv_c_weak_attribute+:} false; then :
6288   $as_echo_n "(cached) " >&6
6289 else
6290   ac_cv_c_weak_attribute=no
6291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6292 /* end confdefs.h.  */
6293  #include <stdio.h>
6294 __attribute__((weak)) void f(int x) { printf("%d", x); }
6295
6296 int
6297 main ()
6298 {
6299
6300    f(1);
6301
6302   ;
6303   return 0;
6304 }
6305 _ACEOF
6306 if ac_fn_c_try_compile "$LINENO"; then :
6307   ac_cv_c_weak_attribute="yes"
6308 else
6309   ac_cv_c_weak_attribute="no"
6310 fi
6311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6312
6313 fi
6314
6315
6316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6317 $as_echo "$ac_cv_c_weak_attribute" >&6; }
6318 if test $ac_cv_c_weak_attribute = yes; then
6319
6320 $as_echo "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6321
6322
6323 $as_echo "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
6324
6325 fi
6326
6327
6328
6329
6330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
6331 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
6332 if ${ac_cv_c_noreturn_attribute+:} false; then :
6333   $as_echo_n "(cached) " >&6
6334 else
6335   ac_cv_c_noreturn_attribute=no
6336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6337 /* end confdefs.h.  */
6338  #include <stdio.h>
6339 __attribute__((noreturn)) void f(int x) { printf("%d", x); }
6340
6341 int
6342 main ()
6343 {
6344
6345    f(1);
6346
6347   ;
6348   return 0;
6349 }
6350 _ACEOF
6351 if ac_fn_c_try_compile "$LINENO"; then :
6352   ac_cv_c_noreturn_attribute="yes"
6353 else
6354   ac_cv_c_noreturn_attribute="no"
6355 fi
6356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6357
6358 fi
6359
6360
6361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
6362 $as_echo "$ac_cv_c_noreturn_attribute" >&6; }
6363 if test $ac_cv_c_noreturn_attribute = yes; then
6364
6365 $as_echo "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
6366
6367
6368 $as_echo "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
6369
6370 fi
6371
6372
6373 if test "$srcdir" != "."; then
6374         CPPFLAGS="$CPPFLAGS -I$srcdir"
6375 fi
6376
6377
6378
6379
6380
6381 for ac_prog in flex lex
6382 do
6383   # Extract the first word of "$ac_prog", so it can be a program name with args.
6384 set dummy $ac_prog; ac_word=$2
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6386 $as_echo_n "checking for $ac_word... " >&6; }
6387 if ${ac_cv_prog_LEX+:} false; then :
6388   $as_echo_n "(cached) " >&6
6389 else
6390   if test -n "$LEX"; then
6391   ac_cv_prog_LEX="$LEX" # Let the user override the test.
6392 else
6393 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6394 for as_dir in $PATH
6395 do
6396   IFS=$as_save_IFS
6397   test -z "$as_dir" && as_dir=.
6398     for ac_exec_ext in '' $ac_executable_extensions; do
6399   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6400     ac_cv_prog_LEX="$ac_prog"
6401     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6402     break 2
6403   fi
6404 done
6405   done
6406 IFS=$as_save_IFS
6407
6408 fi
6409 fi
6410 LEX=$ac_cv_prog_LEX
6411 if test -n "$LEX"; then
6412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6413 $as_echo "$LEX" >&6; }
6414 else
6415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6416 $as_echo "no" >&6; }
6417 fi
6418
6419
6420   test -n "$LEX" && break
6421 done
6422 test -n "$LEX" || LEX=":"
6423
6424 if test "x$LEX" != "x:"; then
6425   cat >conftest.l <<_ACEOF
6426 %%
6427 a { ECHO; }
6428 b { REJECT; }
6429 c { yymore (); }
6430 d { yyless (1); }
6431 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6432     yyless ((input () != 0)); }
6433 f { unput (yytext[0]); }
6434 . { BEGIN INITIAL; }
6435 %%
6436 #ifdef YYTEXT_POINTER
6437 extern char *yytext;
6438 #endif
6439 int
6440 main (void)
6441 {
6442   return ! yylex () + ! yywrap ();
6443 }
6444 _ACEOF
6445 { { ac_try="$LEX conftest.l"
6446 case "(($ac_try" in
6447   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6448   *) ac_try_echo=$ac_try;;
6449 esac
6450 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6451 $as_echo "$ac_try_echo"; } >&5
6452   (eval "$LEX conftest.l") 2>&5
6453   ac_status=$?
6454   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6455   test $ac_status = 0; }
6456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6457 $as_echo_n "checking lex output file root... " >&6; }
6458 if ${ac_cv_prog_lex_root+:} false; then :
6459   $as_echo_n "(cached) " >&6
6460 else
6461
6462 if test -f lex.yy.c; then
6463   ac_cv_prog_lex_root=lex.yy
6464 elif test -f lexyy.c; then
6465   ac_cv_prog_lex_root=lexyy
6466 else
6467   as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6468 fi
6469 fi
6470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6471 $as_echo "$ac_cv_prog_lex_root" >&6; }
6472 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6473
6474 if test -z "${LEXLIB+set}"; then
6475   { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6476 $as_echo_n "checking lex library... " >&6; }
6477 if ${ac_cv_lib_lex+:} false; then :
6478   $as_echo_n "(cached) " >&6
6479 else
6480
6481     ac_save_LIBS=$LIBS
6482     ac_cv_lib_lex='none needed'
6483     for ac_lib in '' -lfl -ll; do
6484       LIBS="$ac_lib $ac_save_LIBS"
6485       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6486 /* end confdefs.h.  */
6487 `cat $LEX_OUTPUT_ROOT.c`
6488 _ACEOF
6489 if ac_fn_c_try_link "$LINENO"; then :
6490   ac_cv_lib_lex=$ac_lib
6491 fi
6492 rm -f core conftest.err conftest.$ac_objext \
6493     conftest$ac_exeext conftest.$ac_ext
6494       test "$ac_cv_lib_lex" != 'none needed' && break
6495     done
6496     LIBS=$ac_save_LIBS
6497
6498 fi
6499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6500 $as_echo "$ac_cv_lib_lex" >&6; }
6501   test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6502 fi
6503
6504
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6506 $as_echo_n "checking whether yytext is a pointer... " >&6; }
6507 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6508   $as_echo_n "(cached) " >&6
6509 else
6510   # POSIX says lex can declare yytext either as a pointer or an array; the
6511 # default is implementation-dependent.  Figure out which it is, since
6512 # not all implementations provide the %pointer and %array declarations.
6513 ac_cv_prog_lex_yytext_pointer=no
6514 ac_save_LIBS=$LIBS
6515 LIBS="$LEXLIB $ac_save_LIBS"
6516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6517 /* end confdefs.h.  */
6518
6519   #define YYTEXT_POINTER 1
6520 `cat $LEX_OUTPUT_ROOT.c`
6521 _ACEOF
6522 if ac_fn_c_try_link "$LINENO"; then :
6523   ac_cv_prog_lex_yytext_pointer=yes
6524 fi
6525 rm -f core conftest.err conftest.$ac_objext \
6526     conftest$ac_exeext conftest.$ac_ext
6527 LIBS=$ac_save_LIBS
6528
6529 fi
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6531 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6532 if test $ac_cv_prog_lex_yytext_pointer = yes; then
6533
6534 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6535
6536 fi
6537 rm -f conftest.l $LEX_OUTPUT_ROOT.c
6538
6539 fi
6540 if test "$LEX" != "" -a "$LEX" != ":"; then
6541
6542         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6543 $as_echo_n "checking for yylex_destroy... " >&6; }
6544         if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6545
6546 $as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6547
6548                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6549 $as_echo "yes" >&6; }
6550         else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6551 $as_echo "no" >&6; };
6552                 LEX=":"
6553         fi
6554
6555 fi
6556 if test "$LEX" != "" -a "$LEX" != ":"; then
6557
6558         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
6559 $as_echo_n "checking for lex %option... " >&6; }
6560         if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
6561 %option nounput
6562 %%
6563 EOF
6564                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6565 $as_echo "yes" >&6; }
6566         else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6567 $as_echo "no" >&6; };
6568                 LEX=":"
6569         fi
6570
6571 fi
6572 for ac_prog in 'bison -y' byacc
6573 do
6574   # Extract the first word of "$ac_prog", so it can be a program name with args.
6575 set dummy $ac_prog; ac_word=$2
6576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6577 $as_echo_n "checking for $ac_word... " >&6; }
6578 if ${ac_cv_prog_YACC+:} false; then :
6579   $as_echo_n "(cached) " >&6
6580 else
6581   if test -n "$YACC"; then
6582   ac_cv_prog_YACC="$YACC" # Let the user override the test.
6583 else
6584 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6585 for as_dir in $PATH
6586 do
6587   IFS=$as_save_IFS
6588   test -z "$as_dir" && as_dir=.
6589     for ac_exec_ext in '' $ac_executable_extensions; do
6590   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6591     ac_cv_prog_YACC="$ac_prog"
6592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6593     break 2
6594   fi
6595 done
6596   done
6597 IFS=$as_save_IFS
6598
6599 fi
6600 fi
6601 YACC=$ac_cv_prog_YACC
6602 if test -n "$YACC"; then
6603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6604 $as_echo "$YACC" >&6; }
6605 else
6606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6607 $as_echo "no" >&6; }
6608 fi
6609
6610
6611   test -n "$YACC" && break
6612 done
6613 test -n "$YACC" || YACC="yacc"
6614
6615 # Extract the first word of "doxygen", so it can be a program name with args.
6616 set dummy doxygen; ac_word=$2
6617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6618 $as_echo_n "checking for $ac_word... " >&6; }
6619 if ${ac_cv_prog_doxygen+:} false; then :
6620   $as_echo_n "(cached) " >&6
6621 else
6622   if test -n "$doxygen"; then
6623   ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6624 else
6625 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6626 for as_dir in $PATH
6627 do
6628   IFS=$as_save_IFS
6629   test -z "$as_dir" && as_dir=.
6630     for ac_exec_ext in '' $ac_executable_extensions; do
6631   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6632     ac_cv_prog_doxygen="doxygen"
6633     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6634     break 2
6635   fi
6636 done
6637   done
6638 IFS=$as_save_IFS
6639
6640 fi
6641 fi
6642 doxygen=$ac_cv_prog_doxygen
6643 if test -n "$doxygen"; then
6644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6645 $as_echo "$doxygen" >&6; }
6646 else
6647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6648 $as_echo "no" >&6; }
6649 fi
6650
6651
6652 if test -n "$ac_tool_prefix"; then
6653   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6654 set dummy ${ac_tool_prefix}strip; ac_word=$2
6655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6656 $as_echo_n "checking for $ac_word... " >&6; }
6657 if ${ac_cv_prog_STRIP+:} false; then :
6658   $as_echo_n "(cached) " >&6
6659 else
6660   if test -n "$STRIP"; then
6661   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6662 else
6663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6664 for as_dir in $PATH
6665 do
6666   IFS=$as_save_IFS
6667   test -z "$as_dir" && as_dir=.
6668     for ac_exec_ext in '' $ac_executable_extensions; do
6669   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6670     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6671     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6672     break 2
6673   fi
6674 done
6675   done
6676 IFS=$as_save_IFS
6677
6678 fi
6679 fi
6680 STRIP=$ac_cv_prog_STRIP
6681 if test -n "$STRIP"; then
6682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6683 $as_echo "$STRIP" >&6; }
6684 else
6685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6686 $as_echo "no" >&6; }
6687 fi
6688
6689
6690 fi
6691 if test -z "$ac_cv_prog_STRIP"; then
6692   ac_ct_STRIP=$STRIP
6693   # Extract the first word of "strip", so it can be a program name with args.
6694 set dummy strip; ac_word=$2
6695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6696 $as_echo_n "checking for $ac_word... " >&6; }
6697 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6698   $as_echo_n "(cached) " >&6
6699 else
6700   if test -n "$ac_ct_STRIP"; then
6701   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6702 else
6703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6704 for as_dir in $PATH
6705 do
6706   IFS=$as_save_IFS
6707   test -z "$as_dir" && as_dir=.
6708     for ac_exec_ext in '' $ac_executable_extensions; do
6709   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6710     ac_cv_prog_ac_ct_STRIP="strip"
6711     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6712     break 2
6713   fi
6714 done
6715   done
6716 IFS=$as_save_IFS
6717
6718 fi
6719 fi
6720 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6721 if test -n "$ac_ct_STRIP"; then
6722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6723 $as_echo "$ac_ct_STRIP" >&6; }
6724 else
6725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6726 $as_echo "no" >&6; }
6727 fi
6728
6729   if test "x$ac_ct_STRIP" = x; then
6730     STRIP=""
6731   else
6732     case $cross_compiling:$ac_tool_warned in
6733 yes:)
6734 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6735 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6736 ac_tool_warned=yes ;;
6737 esac
6738     STRIP=$ac_ct_STRIP
6739   fi
6740 else
6741   STRIP="$ac_cv_prog_STRIP"
6742 fi
6743
6744 ac_aux_dir=
6745 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6746   if test -f "$ac_dir/install-sh"; then
6747     ac_aux_dir=$ac_dir
6748     ac_install_sh="$ac_aux_dir/install-sh -c"
6749     break
6750   elif test -f "$ac_dir/install.sh"; then
6751     ac_aux_dir=$ac_dir
6752     ac_install_sh="$ac_aux_dir/install.sh -c"
6753     break
6754   elif test -f "$ac_dir/shtool"; then
6755     ac_aux_dir=$ac_dir
6756     ac_install_sh="$ac_aux_dir/shtool install -c"
6757     break
6758   fi
6759 done
6760 if test -z "$ac_aux_dir"; then
6761   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6762 fi
6763
6764 # These three variables are undocumented and unsupported,
6765 # and are intended to be withdrawn in a future Autoconf release.
6766 # They can cause serious problems if a builder's source tree is in a directory
6767 # whose full name contains unusual characters.
6768 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6769 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6770 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6771
6772
6773 # Make sure we can run config.sub.
6774 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6775   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6776
6777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6778 $as_echo_n "checking build system type... " >&6; }
6779 if ${ac_cv_build+:} false; then :
6780   $as_echo_n "(cached) " >&6
6781 else
6782   ac_build_alias=$build_alias
6783 test "x$ac_build_alias" = x &&
6784   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6785 test "x$ac_build_alias" = x &&
6786   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6787 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6788   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6789
6790 fi
6791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6792 $as_echo "$ac_cv_build" >&6; }
6793 case $ac_cv_build in
6794 *-*-*) ;;
6795 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6796 esac
6797 build=$ac_cv_build
6798 ac_save_IFS=$IFS; IFS='-'
6799 set x $ac_cv_build
6800 shift
6801 build_cpu=$1
6802 build_vendor=$2
6803 shift; shift
6804 # Remember, the first character of IFS is used to create $*,
6805 # except with old shells:
6806 build_os=$*
6807 IFS=$ac_save_IFS
6808 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6809
6810
6811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6812 $as_echo_n "checking host system type... " >&6; }
6813 if ${ac_cv_host+:} false; then :
6814   $as_echo_n "(cached) " >&6
6815 else
6816   if test "x$host_alias" = x; then
6817   ac_cv_host=$ac_cv_build
6818 else
6819   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6820     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6821 fi
6822
6823 fi
6824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6825 $as_echo "$ac_cv_host" >&6; }
6826 case $ac_cv_host in
6827 *-*-*) ;;
6828 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6829 esac
6830 host=$ac_cv_host
6831 ac_save_IFS=$IFS; IFS='-'
6832 set x $ac_cv_host
6833 shift
6834 host_cpu=$1
6835 host_vendor=$2
6836 shift; shift
6837 # Remember, the first character of IFS is used to create $*,
6838 # except with old shells:
6839 host_os=$*
6840 IFS=$ac_save_IFS
6841 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6842
6843
6844
6845 # skip these tests, we do not need them.
6846
6847
6848
6849
6850
6851
6852
6853
6854 # always use ./libtool unless override from commandline (libtool=mylibtool)
6855 if test -z "$libtool"; then
6856         libtool="./libtool"
6857 fi
6858
6859 # avoid libtool max commandline length test on systems that fork slowly.
6860
6861 if echo "$host_os" | grep "sunos4" >/dev/null; then
6862         lt_cv_sys_max_cmd_len=32750;
6863 fi
6864 if test -n "$ac_tool_prefix"; then
6865   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6866 set dummy ${ac_tool_prefix}ar; ac_word=$2
6867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6868 $as_echo_n "checking for $ac_word... " >&6; }
6869 if ${ac_cv_path_AR+:} false; then :
6870   $as_echo_n "(cached) " >&6
6871 else
6872   case $AR in
6873   [\\/]* | ?:[\\/]*)
6874   ac_cv_path_AR="$AR" # Let the user override the test with a path.
6875   ;;
6876   *)
6877   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6878 for as_dir in $PATH
6879 do
6880   IFS=$as_save_IFS
6881   test -z "$as_dir" && as_dir=.
6882     for ac_exec_ext in '' $ac_executable_extensions; do
6883   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6884     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6885     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6886     break 2
6887   fi
6888 done
6889   done
6890 IFS=$as_save_IFS
6891
6892   ;;
6893 esac
6894 fi
6895 AR=$ac_cv_path_AR
6896 if test -n "$AR"; then
6897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6898 $as_echo "$AR" >&6; }
6899 else
6900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6901 $as_echo "no" >&6; }
6902 fi
6903
6904
6905 fi
6906 if test -z "$ac_cv_path_AR"; then
6907   ac_pt_AR=$AR
6908   # Extract the first word of "ar", so it can be a program name with args.
6909 set dummy ar; ac_word=$2
6910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6911 $as_echo_n "checking for $ac_word... " >&6; }
6912 if ${ac_cv_path_ac_pt_AR+:} false; then :
6913   $as_echo_n "(cached) " >&6
6914 else
6915   case $ac_pt_AR in
6916   [\\/]* | ?:[\\/]*)
6917   ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6918   ;;
6919   *)
6920   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6921 for as_dir in $PATH
6922 do
6923   IFS=$as_save_IFS
6924   test -z "$as_dir" && as_dir=.
6925     for ac_exec_ext in '' $ac_executable_extensions; do
6926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6927     ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6929     break 2
6930   fi
6931 done
6932   done
6933 IFS=$as_save_IFS
6934
6935   ;;
6936 esac
6937 fi
6938 ac_pt_AR=$ac_cv_path_ac_pt_AR
6939 if test -n "$ac_pt_AR"; then
6940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6941 $as_echo "$ac_pt_AR" >&6; }
6942 else
6943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6944 $as_echo "no" >&6; }
6945 fi
6946
6947   if test "x$ac_pt_AR" = x; then
6948     AR="false"
6949   else
6950     case $cross_compiling:$ac_tool_warned in
6951 yes:)
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6953 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6954 ac_tool_warned=yes ;;
6955 esac
6956     AR=$ac_pt_AR
6957   fi
6958 else
6959   AR="$ac_cv_path_AR"
6960 fi
6961
6962 if test $AR = false; then
6963         as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
6964 fi
6965
6966 case `pwd` in
6967   *\ * | *\     *)
6968     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
6969 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
6970 esac
6971
6972
6973
6974 macro_version='2.4.6'
6975 macro_revision='2.4.6'
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989 ltmain=$ac_aux_dir/ltmain.sh
6990
6991 # Backslashify metacharacters that are still active within
6992 # double-quoted strings.
6993 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6994
6995 # Same as above, but do not quote variable references.
6996 double_quote_subst='s/\(["`\\]\)/\\\1/g'
6997
6998 # Sed substitution to delay expansion of an escaped shell variable in a
6999 # double_quote_subst'ed string.
7000 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7001
7002 # Sed substitution to delay expansion of an escaped single quote.
7003 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7004
7005 # Sed substitution to avoid accidental globbing in evaled expressions
7006 no_glob_subst='s/\*/\\\*/g'
7007
7008 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7009 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7010 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7011
7012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7013 $as_echo_n "checking how to print strings... " >&6; }
7014 # Test print first, because it will be a builtin if present.
7015 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7016    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7017   ECHO='print -r --'
7018 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7019   ECHO='printf %s\n'
7020 else
7021   # Use this function as a fallback that always works.
7022   func_fallback_echo ()
7023   {
7024     eval 'cat <<_LTECHO_EOF
7025 $1
7026 _LTECHO_EOF'
7027   }
7028   ECHO='func_fallback_echo'
7029 fi
7030
7031 # func_echo_all arg...
7032 # Invoke $ECHO with all args, space-separated.
7033 func_echo_all ()
7034 {
7035     $ECHO ""
7036 }
7037
7038 case $ECHO in
7039   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
7040 $as_echo "printf" >&6; } ;;
7041   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
7042 $as_echo "print -r" >&6; } ;;
7043   *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
7044 $as_echo "cat" >&6; } ;;
7045 esac
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7061 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
7062 if ${ac_cv_path_SED+:} false; then :
7063   $as_echo_n "(cached) " >&6
7064 else
7065             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7066      for ac_i in 1 2 3 4 5 6 7; do
7067        ac_script="$ac_script$as_nl$ac_script"
7068      done
7069      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7070      { ac_script=; unset ac_script;}
7071      if test -z "$SED"; then
7072   ac_path_SED_found=false
7073   # Loop through the user's path and test for each of PROGNAME-LIST
7074   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7075 for as_dir in $PATH
7076 do
7077   IFS=$as_save_IFS
7078   test -z "$as_dir" && as_dir=.
7079     for ac_prog in sed gsed; do
7080     for ac_exec_ext in '' $ac_executable_extensions; do
7081       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
7082       as_fn_executable_p "$ac_path_SED" || continue
7083 # Check for GNU ac_path_SED and select it if it is found.
7084   # Check for GNU $ac_path_SED
7085 case `"$ac_path_SED" --version 2>&1` in
7086 *GNU*)
7087   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7088 *)
7089   ac_count=0
7090   $as_echo_n 0123456789 >"conftest.in"
7091   while :
7092   do
7093     cat "conftest.in" "conftest.in" >"conftest.tmp"
7094     mv "conftest.tmp" "conftest.in"
7095     cp "conftest.in" "conftest.nl"
7096     $as_echo '' >> "conftest.nl"
7097     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7098     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7099     as_fn_arith $ac_count + 1 && ac_count=$as_val
7100     if test $ac_count -gt ${ac_path_SED_max-0}; then
7101       # Best one so far, save it but keep looking for a better one
7102       ac_cv_path_SED="$ac_path_SED"
7103       ac_path_SED_max=$ac_count
7104     fi
7105     # 10*(2^10) chars as input seems more than enough
7106     test $ac_count -gt 10 && break
7107   done
7108   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7109 esac
7110
7111       $ac_path_SED_found && break 3
7112     done
7113   done
7114   done
7115 IFS=$as_save_IFS
7116   if test -z "$ac_cv_path_SED"; then
7117     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7118   fi
7119 else
7120   ac_cv_path_SED=$SED
7121 fi
7122
7123 fi
7124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7125 $as_echo "$ac_cv_path_SED" >&6; }
7126  SED="$ac_cv_path_SED"
7127   rm -f conftest.sed
7128
7129 test -z "$SED" && SED=sed
7130 Xsed="$SED -e 1s/^X//"
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7143 $as_echo_n "checking for fgrep... " >&6; }
7144 if ${ac_cv_path_FGREP+:} false; then :
7145   $as_echo_n "(cached) " >&6
7146 else
7147   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7148    then ac_cv_path_FGREP="$GREP -F"
7149    else
7150      if test -z "$FGREP"; then
7151   ac_path_FGREP_found=false
7152   # Loop through the user's path and test for each of PROGNAME-LIST
7153   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7154 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7155 do
7156   IFS=$as_save_IFS
7157   test -z "$as_dir" && as_dir=.
7158     for ac_prog in fgrep; do
7159     for ac_exec_ext in '' $ac_executable_extensions; do
7160       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
7161       as_fn_executable_p "$ac_path_FGREP" || continue
7162 # Check for GNU ac_path_FGREP and select it if it is found.
7163   # Check for GNU $ac_path_FGREP
7164 case `"$ac_path_FGREP" --version 2>&1` in
7165 *GNU*)
7166   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7167 *)
7168   ac_count=0
7169   $as_echo_n 0123456789 >"conftest.in"
7170   while :
7171   do
7172     cat "conftest.in" "conftest.in" >"conftest.tmp"
7173     mv "conftest.tmp" "conftest.in"
7174     cp "conftest.in" "conftest.nl"
7175     $as_echo 'FGREP' >> "conftest.nl"
7176     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7177     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7178     as_fn_arith $ac_count + 1 && ac_count=$as_val
7179     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7180       # Best one so far, save it but keep looking for a better one
7181       ac_cv_path_FGREP="$ac_path_FGREP"
7182       ac_path_FGREP_max=$ac_count
7183     fi
7184     # 10*(2^10) chars as input seems more than enough
7185     test $ac_count -gt 10 && break
7186   done
7187   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7188 esac
7189
7190       $ac_path_FGREP_found && break 3
7191     done
7192   done
7193   done
7194 IFS=$as_save_IFS
7195   if test -z "$ac_cv_path_FGREP"; then
7196     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7197   fi
7198 else
7199   ac_cv_path_FGREP=$FGREP
7200 fi
7201
7202    fi
7203 fi
7204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7205 $as_echo "$ac_cv_path_FGREP" >&6; }
7206  FGREP="$ac_cv_path_FGREP"
7207
7208
7209 test -z "$GREP" && GREP=grep
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229 # Check whether --with-gnu-ld was given.
7230 if test "${with_gnu_ld+set}" = set; then :
7231   withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7232 else
7233   with_gnu_ld=no
7234 fi
7235
7236 ac_prog=ld
7237 if test yes = "$GCC"; then
7238   # Check if gcc -print-prog-name=ld gives a path.
7239   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7240 $as_echo_n "checking for ld used by $CC... " >&6; }
7241   case $host in
7242   *-*-mingw*)
7243     # gcc leaves a trailing carriage return, which upsets mingw
7244     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7245   *)
7246     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7247   esac
7248   case $ac_prog in
7249     # Accept absolute paths.
7250     [\\/]* | ?:[\\/]*)
7251       re_direlt='/[^/][^/]*/\.\./'
7252       # Canonicalize the pathname of ld
7253       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7254       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7255         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7256       done
7257       test -z "$LD" && LD=$ac_prog
7258       ;;
7259   "")
7260     # If it fails, then pretend we aren't using GCC.
7261     ac_prog=ld
7262     ;;
7263   *)
7264     # If it is relative, then search for the first ld in PATH.
7265     with_gnu_ld=unknown
7266     ;;
7267   esac
7268 elif test yes = "$with_gnu_ld"; then
7269   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7270 $as_echo_n "checking for GNU ld... " >&6; }
7271 else
7272   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7273 $as_echo_n "checking for non-GNU ld... " >&6; }
7274 fi
7275 if ${lt_cv_path_LD+:} false; then :
7276   $as_echo_n "(cached) " >&6
7277 else
7278   if test -z "$LD"; then
7279   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7280   for ac_dir in $PATH; do
7281     IFS=$lt_save_ifs
7282     test -z "$ac_dir" && ac_dir=.
7283     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7284       lt_cv_path_LD=$ac_dir/$ac_prog
7285       # Check to see if the program is GNU ld.  I'd rather use --version,
7286       # but apparently some variants of GNU ld only accept -v.
7287       # Break only if it was the GNU/non-GNU ld that we prefer.
7288       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7289       *GNU* | *'with BFD'*)
7290         test no != "$with_gnu_ld" && break
7291         ;;
7292       *)
7293         test yes != "$with_gnu_ld" && break
7294         ;;
7295       esac
7296     fi
7297   done
7298   IFS=$lt_save_ifs
7299 else
7300   lt_cv_path_LD=$LD # Let the user override the test with a path.
7301 fi
7302 fi
7303
7304 LD=$lt_cv_path_LD
7305 if test -n "$LD"; then
7306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7307 $as_echo "$LD" >&6; }
7308 else
7309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7310 $as_echo "no" >&6; }
7311 fi
7312 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7314 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7315 if ${lt_cv_prog_gnu_ld+:} false; then :
7316   $as_echo_n "(cached) " >&6
7317 else
7318   # I'd rather use --version here, but apparently some GNU lds only accept -v.
7319 case `$LD -v 2>&1 </dev/null` in
7320 *GNU* | *'with BFD'*)
7321   lt_cv_prog_gnu_ld=yes
7322   ;;
7323 *)
7324   lt_cv_prog_gnu_ld=no
7325   ;;
7326 esac
7327 fi
7328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7329 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
7330 with_gnu_ld=$lt_cv_prog_gnu_ld
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7341 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7342 if ${lt_cv_path_NM+:} false; then :
7343   $as_echo_n "(cached) " >&6
7344 else
7345   if test -n "$NM"; then
7346   # Let the user override the test.
7347   lt_cv_path_NM=$NM
7348 else
7349   lt_nm_to_check=${ac_tool_prefix}nm
7350   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7351     lt_nm_to_check="$lt_nm_to_check nm"
7352   fi
7353   for lt_tmp_nm in $lt_nm_to_check; do
7354     lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7355     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7356       IFS=$lt_save_ifs
7357       test -z "$ac_dir" && ac_dir=.
7358       tmp_nm=$ac_dir/$lt_tmp_nm
7359       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7360         # Check to see if the nm accepts a BSD-compat flag.
7361         # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7362         #   nm: unknown option "B" ignored
7363         # Tru64's nm complains that /dev/null is an invalid object file
7364         # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7365         case $build_os in
7366         mingw*) lt_bad_file=conftest.nm/nofile ;;
7367         *) lt_bad_file=/dev/null ;;
7368         esac
7369         case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7370         *$lt_bad_file* | *'Invalid file or object type'*)
7371           lt_cv_path_NM="$tmp_nm -B"
7372           break 2
7373           ;;
7374         *)
7375           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7376           */dev/null*)
7377             lt_cv_path_NM="$tmp_nm -p"
7378             break 2
7379             ;;
7380           *)
7381             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7382             continue # so that we can try to find one that supports BSD flags
7383             ;;
7384           esac
7385           ;;
7386         esac
7387       fi
7388     done
7389     IFS=$lt_save_ifs
7390   done
7391   : ${lt_cv_path_NM=no}
7392 fi
7393 fi
7394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7395 $as_echo "$lt_cv_path_NM" >&6; }
7396 if test no != "$lt_cv_path_NM"; then
7397   NM=$lt_cv_path_NM
7398 else
7399   # Didn't find any BSD compatible name lister, look for dumpbin.
7400   if test -n "$DUMPBIN"; then :
7401     # Let the user override the test.
7402   else
7403     if test -n "$ac_tool_prefix"; then
7404   for ac_prog in dumpbin "link -dump"
7405   do
7406     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7407 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7409 $as_echo_n "checking for $ac_word... " >&6; }
7410 if ${ac_cv_prog_DUMPBIN+:} false; then :
7411   $as_echo_n "(cached) " >&6
7412 else
7413   if test -n "$DUMPBIN"; then
7414   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7415 else
7416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7417 for as_dir in $PATH
7418 do
7419   IFS=$as_save_IFS
7420   test -z "$as_dir" && as_dir=.
7421     for ac_exec_ext in '' $ac_executable_extensions; do
7422   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7423     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7424     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7425     break 2
7426   fi
7427 done
7428   done
7429 IFS=$as_save_IFS
7430
7431 fi
7432 fi
7433 DUMPBIN=$ac_cv_prog_DUMPBIN
7434 if test -n "$DUMPBIN"; then
7435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7436 $as_echo "$DUMPBIN" >&6; }
7437 else
7438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7439 $as_echo "no" >&6; }
7440 fi
7441
7442
7443     test -n "$DUMPBIN" && break
7444   done
7445 fi
7446 if test -z "$DUMPBIN"; then
7447   ac_ct_DUMPBIN=$DUMPBIN
7448   for ac_prog in dumpbin "link -dump"
7449 do
7450   # Extract the first word of "$ac_prog", so it can be a program name with args.
7451 set dummy $ac_prog; ac_word=$2
7452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7453 $as_echo_n "checking for $ac_word... " >&6; }
7454 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7455   $as_echo_n "(cached) " >&6
7456 else
7457   if test -n "$ac_ct_DUMPBIN"; then
7458   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7459 else
7460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7461 for as_dir in $PATH
7462 do
7463   IFS=$as_save_IFS
7464   test -z "$as_dir" && as_dir=.
7465     for ac_exec_ext in '' $ac_executable_extensions; do
7466   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7467     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7468     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7469     break 2
7470   fi
7471 done
7472   done
7473 IFS=$as_save_IFS
7474
7475 fi
7476 fi
7477 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7478 if test -n "$ac_ct_DUMPBIN"; then
7479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7480 $as_echo "$ac_ct_DUMPBIN" >&6; }
7481 else
7482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7483 $as_echo "no" >&6; }
7484 fi
7485
7486
7487   test -n "$ac_ct_DUMPBIN" && break
7488 done
7489
7490   if test "x$ac_ct_DUMPBIN" = x; then
7491     DUMPBIN=":"
7492   else
7493     case $cross_compiling:$ac_tool_warned in
7494 yes:)
7495 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7496 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7497 ac_tool_warned=yes ;;
7498 esac
7499     DUMPBIN=$ac_ct_DUMPBIN
7500   fi
7501 fi
7502
7503     case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7504     *COFF*)
7505       DUMPBIN="$DUMPBIN -symbols -headers"
7506       ;;
7507     *)
7508       DUMPBIN=:
7509       ;;
7510     esac
7511   fi
7512
7513   if test : != "$DUMPBIN"; then
7514     NM=$DUMPBIN
7515   fi
7516 fi
7517 test -z "$NM" && NM=nm
7518
7519
7520
7521
7522
7523
7524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7525 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
7526 if ${lt_cv_nm_interface+:} false; then :
7527   $as_echo_n "(cached) " >&6
7528 else
7529   lt_cv_nm_interface="BSD nm"
7530   echo "int some_variable = 0;" > conftest.$ac_ext
7531   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7532   (eval "$ac_compile" 2>conftest.err)
7533   cat conftest.err >&5
7534   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7535   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7536   cat conftest.err >&5
7537   (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7538   cat conftest.out >&5
7539   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7540     lt_cv_nm_interface="MS dumpbin"
7541   fi
7542   rm -f conftest*
7543 fi
7544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7545 $as_echo "$lt_cv_nm_interface" >&6; }
7546
7547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7548 $as_echo_n "checking whether ln -s works... " >&6; }
7549 LN_S=$as_ln_s
7550 if test "$LN_S" = "ln -s"; then
7551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7552 $as_echo "yes" >&6; }
7553 else
7554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7555 $as_echo "no, using $LN_S" >&6; }
7556 fi
7557
7558 # find the maximum length of command line arguments
7559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7560 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7561 if ${lt_cv_sys_max_cmd_len+:} false; then :
7562   $as_echo_n "(cached) " >&6
7563 else
7564     i=0
7565   teststring=ABCD
7566
7567   case $build_os in
7568   msdosdjgpp*)
7569     # On DJGPP, this test can blow up pretty badly due to problems in libc
7570     # (any single argument exceeding 2000 bytes causes a buffer overrun
7571     # during glob expansion).  Even if it were fixed, the result of this
7572     # check would be larger than it should be.
7573     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7574     ;;
7575
7576   gnu*)
7577     # Under GNU Hurd, this test is not required because there is
7578     # no limit to the length of command line arguments.
7579     # Libtool will interpret -1 as no limit whatsoever
7580     lt_cv_sys_max_cmd_len=-1;
7581     ;;
7582
7583   cygwin* | mingw* | cegcc*)
7584     # On Win9x/ME, this test blows up -- it succeeds, but takes
7585     # about 5 minutes as the teststring grows exponentially.
7586     # Worse, since 9x/ME are not pre-emptively multitasking,
7587     # you end up with a "frozen" computer, even though with patience
7588     # the test eventually succeeds (with a max line length of 256k).
7589     # Instead, let's just punt: use the minimum linelength reported by
7590     # all of the supported platforms: 8192 (on NT/2K/XP).
7591     lt_cv_sys_max_cmd_len=8192;
7592     ;;
7593
7594   mint*)
7595     # On MiNT this can take a long time and run out of memory.
7596     lt_cv_sys_max_cmd_len=8192;
7597     ;;
7598
7599   amigaos*)
7600     # On AmigaOS with pdksh, this test takes hours, literally.
7601     # So we just punt and use a minimum line length of 8192.
7602     lt_cv_sys_max_cmd_len=8192;
7603     ;;
7604
7605   bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7606     # This has been around since 386BSD, at least.  Likely further.
7607     if test -x /sbin/sysctl; then
7608       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7609     elif test -x /usr/sbin/sysctl; then
7610       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7611     else
7612       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7613     fi
7614     # And add a safety zone
7615     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7616     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7617     ;;
7618
7619   interix*)
7620     # We know the value 262144 and hardcode it with a safety zone (like BSD)
7621     lt_cv_sys_max_cmd_len=196608
7622     ;;
7623
7624   os2*)
7625     # The test takes a long time on OS/2.
7626     lt_cv_sys_max_cmd_len=8192
7627     ;;
7628
7629   osf*)
7630     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7631     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7632     # nice to cause kernel panics so lets avoid the loop below.
7633     # First set a reasonable default.
7634     lt_cv_sys_max_cmd_len=16384
7635     #
7636     if test -x /sbin/sysconfig; then
7637       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7638         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7639       esac
7640     fi
7641     ;;
7642   sco3.2v5*)
7643     lt_cv_sys_max_cmd_len=102400
7644     ;;
7645   sysv5* | sco5v6* | sysv4.2uw2*)
7646     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7647     if test -n "$kargmax"; then
7648       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[  ]//'`
7649     else
7650       lt_cv_sys_max_cmd_len=32768
7651     fi
7652     ;;
7653   *)
7654     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7655     if test -n "$lt_cv_sys_max_cmd_len" && \
7656        test undefined != "$lt_cv_sys_max_cmd_len"; then
7657       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7658       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7659     else
7660       # Make teststring a little bigger before we do anything with it.
7661       # a 1K string should be a reasonable start.
7662       for i in 1 2 3 4 5 6 7 8; do
7663         teststring=$teststring$teststring
7664       done
7665       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7666       # If test is not a shell built-in, we'll probably end up computing a
7667       # maximum length that is only half of the actual maximum length, but
7668       # we can't tell.
7669       while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7670                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7671               test 17 != "$i" # 1/2 MB should be enough
7672       do
7673         i=`expr $i + 1`
7674         teststring=$teststring$teststring
7675       done
7676       # Only check the string length outside the loop.
7677       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7678       teststring=
7679       # Add a significant safety factor because C++ compilers can tack on
7680       # massive amounts of additional arguments before passing them to the
7681       # linker.  It appears as though 1/2 is a usable value.
7682       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7683     fi
7684     ;;
7685   esac
7686
7687 fi
7688
7689 if test -n "$lt_cv_sys_max_cmd_len"; then
7690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7691 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7692 else
7693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7694 $as_echo "none" >&6; }
7695 fi
7696 max_cmd_len=$lt_cv_sys_max_cmd_len
7697
7698
7699
7700
7701
7702
7703 : ${CP="cp -f"}
7704 : ${MV="mv -f"}
7705 : ${RM="rm -f"}
7706
7707 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7708   lt_unset=unset
7709 else
7710   lt_unset=false
7711 fi
7712
7713
7714
7715
7716
7717 # test EBCDIC or ASCII
7718 case `echo X|tr X '\101'` in
7719  A) # ASCII based system
7720     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7721   lt_SP2NL='tr \040 \012'
7722   lt_NL2SP='tr \015\012 \040\040'
7723   ;;
7724  *) # EBCDIC based system
7725   lt_SP2NL='tr \100 \n'
7726   lt_NL2SP='tr \r\n \100\100'
7727   ;;
7728 esac
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7739 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7740 if ${lt_cv_to_host_file_cmd+:} false; then :
7741   $as_echo_n "(cached) " >&6
7742 else
7743   case $host in
7744   *-*-mingw* )
7745     case $build in
7746       *-*-mingw* ) # actually msys
7747         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7748         ;;
7749       *-*-cygwin* )
7750         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7751         ;;
7752       * ) # otherwise, assume *nix
7753         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7754         ;;
7755     esac
7756     ;;
7757   *-*-cygwin* )
7758     case $build in
7759       *-*-mingw* ) # actually msys
7760         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7761         ;;
7762       *-*-cygwin* )
7763         lt_cv_to_host_file_cmd=func_convert_file_noop
7764         ;;
7765       * ) # otherwise, assume *nix
7766         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7767         ;;
7768     esac
7769     ;;
7770   * ) # unhandled hosts (and "normal" native builds)
7771     lt_cv_to_host_file_cmd=func_convert_file_noop
7772     ;;
7773 esac
7774
7775 fi
7776
7777 to_host_file_cmd=$lt_cv_to_host_file_cmd
7778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7779 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
7780
7781
7782
7783
7784
7785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7786 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7787 if ${lt_cv_to_tool_file_cmd+:} false; then :
7788   $as_echo_n "(cached) " >&6
7789 else
7790   #assume ordinary cross tools, or native build.
7791 lt_cv_to_tool_file_cmd=func_convert_file_noop
7792 case $host in
7793   *-*-mingw* )
7794     case $build in
7795       *-*-mingw* ) # actually msys
7796         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7797         ;;
7798     esac
7799     ;;
7800 esac
7801
7802 fi
7803
7804 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7806 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7807
7808
7809
7810
7811
7812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7813 $as_echo_n "checking for $LD option to reload object files... " >&6; }
7814 if ${lt_cv_ld_reload_flag+:} false; then :
7815   $as_echo_n "(cached) " >&6
7816 else
7817   lt_cv_ld_reload_flag='-r'
7818 fi
7819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7820 $as_echo "$lt_cv_ld_reload_flag" >&6; }
7821 reload_flag=$lt_cv_ld_reload_flag
7822 case $reload_flag in
7823 "" | " "*) ;;
7824 *) reload_flag=" $reload_flag" ;;
7825 esac
7826 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7827 case $host_os in
7828   cygwin* | mingw* | pw32* | cegcc*)
7829     if test yes != "$GCC"; then
7830       reload_cmds=false
7831     fi
7832     ;;
7833   darwin*)
7834     if test yes = "$GCC"; then
7835       reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7836     else
7837       reload_cmds='$LD$reload_flag -o $output$reload_objs'
7838     fi
7839     ;;
7840 esac
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850 if test -n "$ac_tool_prefix"; then
7851   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7852 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7854 $as_echo_n "checking for $ac_word... " >&6; }
7855 if ${ac_cv_prog_OBJDUMP+:} false; then :
7856   $as_echo_n "(cached) " >&6
7857 else
7858   if test -n "$OBJDUMP"; then
7859   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7860 else
7861 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7862 for as_dir in $PATH
7863 do
7864   IFS=$as_save_IFS
7865   test -z "$as_dir" && as_dir=.
7866     for ac_exec_ext in '' $ac_executable_extensions; do
7867   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7868     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7869     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7870     break 2
7871   fi
7872 done
7873   done
7874 IFS=$as_save_IFS
7875
7876 fi
7877 fi
7878 OBJDUMP=$ac_cv_prog_OBJDUMP
7879 if test -n "$OBJDUMP"; then
7880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7881 $as_echo "$OBJDUMP" >&6; }
7882 else
7883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7884 $as_echo "no" >&6; }
7885 fi
7886
7887
7888 fi
7889 if test -z "$ac_cv_prog_OBJDUMP"; then
7890   ac_ct_OBJDUMP=$OBJDUMP
7891   # Extract the first word of "objdump", so it can be a program name with args.
7892 set dummy objdump; ac_word=$2
7893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7894 $as_echo_n "checking for $ac_word... " >&6; }
7895 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7896   $as_echo_n "(cached) " >&6
7897 else
7898   if test -n "$ac_ct_OBJDUMP"; then
7899   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7900 else
7901 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7902 for as_dir in $PATH
7903 do
7904   IFS=$as_save_IFS
7905   test -z "$as_dir" && as_dir=.
7906     for ac_exec_ext in '' $ac_executable_extensions; do
7907   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7908     ac_cv_prog_ac_ct_OBJDUMP="objdump"
7909     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7910     break 2
7911   fi
7912 done
7913   done
7914 IFS=$as_save_IFS
7915
7916 fi
7917 fi
7918 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7919 if test -n "$ac_ct_OBJDUMP"; then
7920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7921 $as_echo "$ac_ct_OBJDUMP" >&6; }
7922 else
7923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7924 $as_echo "no" >&6; }
7925 fi
7926
7927   if test "x$ac_ct_OBJDUMP" = x; then
7928     OBJDUMP="false"
7929   else
7930     case $cross_compiling:$ac_tool_warned in
7931 yes:)
7932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7933 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7934 ac_tool_warned=yes ;;
7935 esac
7936     OBJDUMP=$ac_ct_OBJDUMP
7937   fi
7938 else
7939   OBJDUMP="$ac_cv_prog_OBJDUMP"
7940 fi
7941
7942 test -z "$OBJDUMP" && OBJDUMP=objdump
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7953 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
7954 if ${lt_cv_deplibs_check_method+:} false; then :
7955   $as_echo_n "(cached) " >&6
7956 else
7957   lt_cv_file_magic_cmd='$MAGIC_CMD'
7958 lt_cv_file_magic_test_file=
7959 lt_cv_deplibs_check_method='unknown'
7960 # Need to set the preceding variable on all platforms that support
7961 # interlibrary dependencies.
7962 # 'none' -- dependencies not supported.
7963 # 'unknown' -- same as none, but documents that we really don't know.
7964 # 'pass_all' -- all dependencies passed with no checks.
7965 # 'test_compile' -- check by making test program.
7966 # 'file_magic [[regex]]' -- check by looking for files in library path
7967 # that responds to the $file_magic_cmd with a given extended regex.
7968 # If you have 'file' or equivalent on your system and you're not sure
7969 # whether 'pass_all' will *always* work, you probably want this one.
7970
7971 case $host_os in
7972 aix[4-9]*)
7973   lt_cv_deplibs_check_method=pass_all
7974   ;;
7975
7976 beos*)
7977   lt_cv_deplibs_check_method=pass_all
7978   ;;
7979
7980 bsdi[45]*)
7981   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
7982   lt_cv_file_magic_cmd='/usr/bin/file -L'
7983   lt_cv_file_magic_test_file=/shlib/libc.so
7984   ;;
7985
7986 cygwin*)
7987   # func_win32_libid is a shell function defined in ltmain.sh
7988   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7989   lt_cv_file_magic_cmd='func_win32_libid'
7990   ;;
7991
7992 mingw* | pw32*)
7993   # Base MSYS/MinGW do not provide the 'file' command needed by
7994   # func_win32_libid shell function, so use a weaker test based on 'objdump',
7995   # unless we find 'file', for example because we are cross-compiling.
7996   if ( file / ) >/dev/null 2>&1; then
7997     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7998     lt_cv_file_magic_cmd='func_win32_libid'
7999   else
8000     # Keep this pattern in sync with the one in func_win32_libid.
8001     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
8002     lt_cv_file_magic_cmd='$OBJDUMP -f'
8003   fi
8004   ;;
8005
8006 cegcc*)
8007   # use the weaker test based on 'objdump'. See mingw*.
8008   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
8009   lt_cv_file_magic_cmd='$OBJDUMP -f'
8010   ;;
8011
8012 darwin* | rhapsody*)
8013   lt_cv_deplibs_check_method=pass_all
8014   ;;
8015
8016 freebsd* | dragonfly*)
8017   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8018     case $host_cpu in
8019     i*86 )
8020       # Not sure whether the presence of OpenBSD here was a mistake.
8021       # Let's accept both of them until this is cleared up.
8022       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
8023       lt_cv_file_magic_cmd=/usr/bin/file
8024       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8025       ;;
8026     esac
8027   else
8028     lt_cv_deplibs_check_method=pass_all
8029   fi
8030   ;;
8031
8032 haiku*)
8033   lt_cv_deplibs_check_method=pass_all
8034   ;;
8035
8036 hpux10.20* | hpux11*)
8037   lt_cv_file_magic_cmd=/usr/bin/file
8038   case $host_cpu in
8039   ia64*)
8040     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
8041     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
8042     ;;
8043   hppa*64*)
8044     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]'
8045     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
8046     ;;
8047   *)
8048     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
8049     lt_cv_file_magic_test_file=/usr/lib/libc.sl
8050     ;;
8051   esac
8052   ;;
8053
8054 interix[3-9]*)
8055   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8056   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
8057   ;;
8058
8059 irix5* | irix6* | nonstopux*)
8060   case $LD in
8061   *-32|*"-32 ") libmagic=32-bit;;
8062   *-n32|*"-n32 ") libmagic=N32;;
8063   *-64|*"-64 ") libmagic=64-bit;;
8064   *) libmagic=never-match;;
8065   esac
8066   lt_cv_deplibs_check_method=pass_all
8067   ;;
8068
8069 # This must be glibc/ELF.
8070 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8071   lt_cv_deplibs_check_method=pass_all
8072   ;;
8073
8074 netbsd*)
8075   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8076     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8077   else
8078     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
8079   fi
8080   ;;
8081
8082 newos6*)
8083   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
8084   lt_cv_file_magic_cmd=/usr/bin/file
8085   lt_cv_file_magic_test_file=/usr/lib/libnls.so
8086   ;;
8087
8088 *nto* | *qnx*)
8089   lt_cv_deplibs_check_method=pass_all
8090   ;;
8091
8092 openbsd* | bitrig*)
8093   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
8094     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
8095   else
8096     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8097   fi
8098   ;;
8099
8100 osf3* | osf4* | osf5*)
8101   lt_cv_deplibs_check_method=pass_all
8102   ;;
8103
8104 rdos*)
8105   lt_cv_deplibs_check_method=pass_all
8106   ;;
8107
8108 solaris*)
8109   lt_cv_deplibs_check_method=pass_all
8110   ;;
8111
8112 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8113   lt_cv_deplibs_check_method=pass_all
8114   ;;
8115
8116 sysv4 | sysv4.3*)
8117   case $host_vendor in
8118   motorola)
8119     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]'
8120     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8121     ;;
8122   ncr)
8123     lt_cv_deplibs_check_method=pass_all
8124     ;;
8125   sequent)
8126     lt_cv_file_magic_cmd='/bin/file'
8127     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
8128     ;;
8129   sni)
8130     lt_cv_file_magic_cmd='/bin/file'
8131     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
8132     lt_cv_file_magic_test_file=/lib/libc.so
8133     ;;
8134   siemens)
8135     lt_cv_deplibs_check_method=pass_all
8136     ;;
8137   pc)
8138     lt_cv_deplibs_check_method=pass_all
8139     ;;
8140   esac
8141   ;;
8142
8143 tpf*)
8144   lt_cv_deplibs_check_method=pass_all
8145   ;;
8146 os2*)
8147   lt_cv_deplibs_check_method=pass_all
8148   ;;
8149 esac
8150
8151 fi
8152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
8153 $as_echo "$lt_cv_deplibs_check_method" >&6; }
8154
8155 file_magic_glob=
8156 want_nocaseglob=no
8157 if test "$build" = "$host"; then
8158   case $host_os in
8159   mingw* | pw32*)
8160     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
8161       want_nocaseglob=yes
8162     else
8163       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
8164     fi
8165     ;;
8166   esac
8167 fi
8168
8169 file_magic_cmd=$lt_cv_file_magic_cmd
8170 deplibs_check_method=$lt_cv_deplibs_check_method
8171 test -z "$deplibs_check_method" && deplibs_check_method=unknown
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194 if test -n "$ac_tool_prefix"; then
8195   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8196 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8198 $as_echo_n "checking for $ac_word... " >&6; }
8199 if ${ac_cv_prog_DLLTOOL+:} false; then :
8200   $as_echo_n "(cached) " >&6
8201 else
8202   if test -n "$DLLTOOL"; then
8203   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8204 else
8205 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8206 for as_dir in $PATH
8207 do
8208   IFS=$as_save_IFS
8209   test -z "$as_dir" && as_dir=.
8210     for ac_exec_ext in '' $ac_executable_extensions; do
8211   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8212     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8213     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8214     break 2
8215   fi
8216 done
8217   done
8218 IFS=$as_save_IFS
8219
8220 fi
8221 fi
8222 DLLTOOL=$ac_cv_prog_DLLTOOL
8223 if test -n "$DLLTOOL"; then
8224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8225 $as_echo "$DLLTOOL" >&6; }
8226 else
8227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8228 $as_echo "no" >&6; }
8229 fi
8230
8231
8232 fi
8233 if test -z "$ac_cv_prog_DLLTOOL"; then
8234   ac_ct_DLLTOOL=$DLLTOOL
8235   # Extract the first word of "dlltool", so it can be a program name with args.
8236 set dummy dlltool; ac_word=$2
8237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8238 $as_echo_n "checking for $ac_word... " >&6; }
8239 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8240   $as_echo_n "(cached) " >&6
8241 else
8242   if test -n "$ac_ct_DLLTOOL"; then
8243   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8244 else
8245 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8246 for as_dir in $PATH
8247 do
8248   IFS=$as_save_IFS
8249   test -z "$as_dir" && as_dir=.
8250     for ac_exec_ext in '' $ac_executable_extensions; do
8251   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8252     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8253     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8254     break 2
8255   fi
8256 done
8257   done
8258 IFS=$as_save_IFS
8259
8260 fi
8261 fi
8262 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8263 if test -n "$ac_ct_DLLTOOL"; then
8264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8265 $as_echo "$ac_ct_DLLTOOL" >&6; }
8266 else
8267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8268 $as_echo "no" >&6; }
8269 fi
8270
8271   if test "x$ac_ct_DLLTOOL" = x; then
8272     DLLTOOL="false"
8273   else
8274     case $cross_compiling:$ac_tool_warned in
8275 yes:)
8276 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8277 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8278 ac_tool_warned=yes ;;
8279 esac
8280     DLLTOOL=$ac_ct_DLLTOOL
8281   fi
8282 else
8283   DLLTOOL="$ac_cv_prog_DLLTOOL"
8284 fi
8285
8286 test -z "$DLLTOOL" && DLLTOOL=dlltool
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8298 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8299 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8300   $as_echo_n "(cached) " >&6
8301 else
8302   lt_cv_sharedlib_from_linklib_cmd='unknown'
8303
8304 case $host_os in
8305 cygwin* | mingw* | pw32* | cegcc*)
8306   # two different shell functions defined in ltmain.sh;
8307   # decide which one to use based on capabilities of $DLLTOOL
8308   case `$DLLTOOL --help 2>&1` in
8309   *--identify-strict*)
8310     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8311     ;;
8312   *)
8313     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8314     ;;
8315   esac
8316   ;;
8317 *)
8318   # fallback: assume linklib IS sharedlib
8319   lt_cv_sharedlib_from_linklib_cmd=$ECHO
8320   ;;
8321 esac
8322
8323 fi
8324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8325 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8326 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8327 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8328
8329
8330
8331
8332
8333
8334
8335 if test -n "$ac_tool_prefix"; then
8336   for ac_prog in ar
8337   do
8338     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8339 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8341 $as_echo_n "checking for $ac_word... " >&6; }
8342 if ${ac_cv_prog_AR+:} false; then :
8343   $as_echo_n "(cached) " >&6
8344 else
8345   if test -n "$AR"; then
8346   ac_cv_prog_AR="$AR" # Let the user override the test.
8347 else
8348 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8349 for as_dir in $PATH
8350 do
8351   IFS=$as_save_IFS
8352   test -z "$as_dir" && as_dir=.
8353     for ac_exec_ext in '' $ac_executable_extensions; do
8354   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8355     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8356     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8357     break 2
8358   fi
8359 done
8360   done
8361 IFS=$as_save_IFS
8362
8363 fi
8364 fi
8365 AR=$ac_cv_prog_AR
8366 if test -n "$AR"; then
8367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8368 $as_echo "$AR" >&6; }
8369 else
8370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8371 $as_echo "no" >&6; }
8372 fi
8373
8374
8375     test -n "$AR" && break
8376   done
8377 fi
8378 if test -z "$AR"; then
8379   ac_ct_AR=$AR
8380   for ac_prog in ar
8381 do
8382   # Extract the first word of "$ac_prog", so it can be a program name with args.
8383 set dummy $ac_prog; ac_word=$2
8384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8385 $as_echo_n "checking for $ac_word... " >&6; }
8386 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8387   $as_echo_n "(cached) " >&6
8388 else
8389   if test -n "$ac_ct_AR"; then
8390   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8391 else
8392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8393 for as_dir in $PATH
8394 do
8395   IFS=$as_save_IFS
8396   test -z "$as_dir" && as_dir=.
8397     for ac_exec_ext in '' $ac_executable_extensions; do
8398   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8399     ac_cv_prog_ac_ct_AR="$ac_prog"
8400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8401     break 2
8402   fi
8403 done
8404   done
8405 IFS=$as_save_IFS
8406
8407 fi
8408 fi
8409 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8410 if test -n "$ac_ct_AR"; then
8411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8412 $as_echo "$ac_ct_AR" >&6; }
8413 else
8414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8415 $as_echo "no" >&6; }
8416 fi
8417
8418
8419   test -n "$ac_ct_AR" && break
8420 done
8421
8422   if test "x$ac_ct_AR" = x; then
8423     AR="false"
8424   else
8425     case $cross_compiling:$ac_tool_warned in
8426 yes:)
8427 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8428 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8429 ac_tool_warned=yes ;;
8430 esac
8431     AR=$ac_ct_AR
8432   fi
8433 fi
8434
8435 : ${AR=ar}
8436 : ${AR_FLAGS=cru}
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8449 $as_echo_n "checking for archiver @FILE support... " >&6; }
8450 if ${lt_cv_ar_at_file+:} false; then :
8451   $as_echo_n "(cached) " >&6
8452 else
8453   lt_cv_ar_at_file=no
8454    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8455 /* end confdefs.h.  */
8456
8457 int
8458 main ()
8459 {
8460
8461   ;
8462   return 0;
8463 }
8464 _ACEOF
8465 if ac_fn_c_try_compile "$LINENO"; then :
8466   echo conftest.$ac_objext > conftest.lst
8467       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8468       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8469   (eval $lt_ar_try) 2>&5
8470   ac_status=$?
8471   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8472   test $ac_status = 0; }
8473       if test 0 -eq "$ac_status"; then
8474         # Ensure the archiver fails upon bogus file names.
8475         rm -f conftest.$ac_objext libconftest.a
8476         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8477   (eval $lt_ar_try) 2>&5
8478   ac_status=$?
8479   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8480   test $ac_status = 0; }
8481         if test 0 -ne "$ac_status"; then
8482           lt_cv_ar_at_file=@
8483         fi
8484       fi
8485       rm -f conftest.* libconftest.a
8486
8487 fi
8488 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8489
8490 fi
8491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8492 $as_echo "$lt_cv_ar_at_file" >&6; }
8493
8494 if test no = "$lt_cv_ar_at_file"; then
8495   archiver_list_spec=
8496 else
8497   archiver_list_spec=$lt_cv_ar_at_file
8498 fi
8499
8500
8501
8502
8503
8504
8505
8506 if test -n "$ac_tool_prefix"; then
8507   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8508 set dummy ${ac_tool_prefix}strip; ac_word=$2
8509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8510 $as_echo_n "checking for $ac_word... " >&6; }
8511 if ${ac_cv_prog_STRIP+:} false; then :
8512   $as_echo_n "(cached) " >&6
8513 else
8514   if test -n "$STRIP"; then
8515   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8516 else
8517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8518 for as_dir in $PATH
8519 do
8520   IFS=$as_save_IFS
8521   test -z "$as_dir" && as_dir=.
8522     for ac_exec_ext in '' $ac_executable_extensions; do
8523   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8524     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8526     break 2
8527   fi
8528 done
8529   done
8530 IFS=$as_save_IFS
8531
8532 fi
8533 fi
8534 STRIP=$ac_cv_prog_STRIP
8535 if test -n "$STRIP"; then
8536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8537 $as_echo "$STRIP" >&6; }
8538 else
8539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8540 $as_echo "no" >&6; }
8541 fi
8542
8543
8544 fi
8545 if test -z "$ac_cv_prog_STRIP"; then
8546   ac_ct_STRIP=$STRIP
8547   # Extract the first word of "strip", so it can be a program name with args.
8548 set dummy strip; ac_word=$2
8549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8550 $as_echo_n "checking for $ac_word... " >&6; }
8551 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8552   $as_echo_n "(cached) " >&6
8553 else
8554   if test -n "$ac_ct_STRIP"; then
8555   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8556 else
8557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8558 for as_dir in $PATH
8559 do
8560   IFS=$as_save_IFS
8561   test -z "$as_dir" && as_dir=.
8562     for ac_exec_ext in '' $ac_executable_extensions; do
8563   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8564     ac_cv_prog_ac_ct_STRIP="strip"
8565     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8566     break 2
8567   fi
8568 done
8569   done
8570 IFS=$as_save_IFS
8571
8572 fi
8573 fi
8574 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8575 if test -n "$ac_ct_STRIP"; then
8576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8577 $as_echo "$ac_ct_STRIP" >&6; }
8578 else
8579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8580 $as_echo "no" >&6; }
8581 fi
8582
8583   if test "x$ac_ct_STRIP" = x; then
8584     STRIP=":"
8585   else
8586     case $cross_compiling:$ac_tool_warned in
8587 yes:)
8588 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8589 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8590 ac_tool_warned=yes ;;
8591 esac
8592     STRIP=$ac_ct_STRIP
8593   fi
8594 else
8595   STRIP="$ac_cv_prog_STRIP"
8596 fi
8597
8598 test -z "$STRIP" && STRIP=:
8599
8600
8601
8602
8603
8604
8605 if test -n "$ac_tool_prefix"; then
8606   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8607 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8609 $as_echo_n "checking for $ac_word... " >&6; }
8610 if ${ac_cv_prog_RANLIB+:} false; then :
8611   $as_echo_n "(cached) " >&6
8612 else
8613   if test -n "$RANLIB"; then
8614   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8615 else
8616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8617 for as_dir in $PATH
8618 do
8619   IFS=$as_save_IFS
8620   test -z "$as_dir" && as_dir=.
8621     for ac_exec_ext in '' $ac_executable_extensions; do
8622   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8623     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8624     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8625     break 2
8626   fi
8627 done
8628   done
8629 IFS=$as_save_IFS
8630
8631 fi
8632 fi
8633 RANLIB=$ac_cv_prog_RANLIB
8634 if test -n "$RANLIB"; then
8635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8636 $as_echo "$RANLIB" >&6; }
8637 else
8638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8639 $as_echo "no" >&6; }
8640 fi
8641
8642
8643 fi
8644 if test -z "$ac_cv_prog_RANLIB"; then
8645   ac_ct_RANLIB=$RANLIB
8646   # Extract the first word of "ranlib", so it can be a program name with args.
8647 set dummy ranlib; ac_word=$2
8648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8649 $as_echo_n "checking for $ac_word... " >&6; }
8650 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8651   $as_echo_n "(cached) " >&6
8652 else
8653   if test -n "$ac_ct_RANLIB"; then
8654   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8655 else
8656 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8657 for as_dir in $PATH
8658 do
8659   IFS=$as_save_IFS
8660   test -z "$as_dir" && as_dir=.
8661     for ac_exec_ext in '' $ac_executable_extensions; do
8662   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8663     ac_cv_prog_ac_ct_RANLIB="ranlib"
8664     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8665     break 2
8666   fi
8667 done
8668   done
8669 IFS=$as_save_IFS
8670
8671 fi
8672 fi
8673 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8674 if test -n "$ac_ct_RANLIB"; then
8675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8676 $as_echo "$ac_ct_RANLIB" >&6; }
8677 else
8678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8679 $as_echo "no" >&6; }
8680 fi
8681
8682   if test "x$ac_ct_RANLIB" = x; then
8683     RANLIB=":"
8684   else
8685     case $cross_compiling:$ac_tool_warned in
8686 yes:)
8687 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8688 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8689 ac_tool_warned=yes ;;
8690 esac
8691     RANLIB=$ac_ct_RANLIB
8692   fi
8693 else
8694   RANLIB="$ac_cv_prog_RANLIB"
8695 fi
8696
8697 test -z "$RANLIB" && RANLIB=:
8698
8699
8700
8701
8702
8703
8704 # Determine commands to create old-style static archives.
8705 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8706 old_postinstall_cmds='chmod 644 $oldlib'
8707 old_postuninstall_cmds=
8708
8709 if test -n "$RANLIB"; then
8710   case $host_os in
8711   bitrig* | openbsd*)
8712     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8713     ;;
8714   *)
8715     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8716     ;;
8717   esac
8718   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8719 fi
8720
8721 case $host_os in
8722   darwin*)
8723     lock_old_archive_extraction=yes ;;
8724   *)
8725     lock_old_archive_extraction=no ;;
8726 esac
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748 for ac_prog in gawk mawk nawk awk
8749 do
8750   # Extract the first word of "$ac_prog", so it can be a program name with args.
8751 set dummy $ac_prog; ac_word=$2
8752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8753 $as_echo_n "checking for $ac_word... " >&6; }
8754 if ${ac_cv_prog_AWK+:} false; then :
8755   $as_echo_n "(cached) " >&6
8756 else
8757   if test -n "$AWK"; then
8758   ac_cv_prog_AWK="$AWK" # Let the user override the test.
8759 else
8760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8761 for as_dir in $PATH
8762 do
8763   IFS=$as_save_IFS
8764   test -z "$as_dir" && as_dir=.
8765     for ac_exec_ext in '' $ac_executable_extensions; do
8766   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8767     ac_cv_prog_AWK="$ac_prog"
8768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8769     break 2
8770   fi
8771 done
8772   done
8773 IFS=$as_save_IFS
8774
8775 fi
8776 fi
8777 AWK=$ac_cv_prog_AWK
8778 if test -n "$AWK"; then
8779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8780 $as_echo "$AWK" >&6; }
8781 else
8782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8783 $as_echo "no" >&6; }
8784 fi
8785
8786
8787   test -n "$AWK" && break
8788 done
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808 # If no C compiler was specified, use CC.
8809 LTCC=${LTCC-"$CC"}
8810
8811 # If no C compiler flags were specified, use CFLAGS.
8812 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8813
8814 # Allow CC to be a program name with arguments.
8815 compiler=$CC
8816
8817
8818 # Check for command to grab the raw symbol name followed by C symbol from nm.
8819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8820 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8821 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8822   $as_echo_n "(cached) " >&6
8823 else
8824
8825 # These are sane defaults that work on at least a few old systems.
8826 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8827
8828 # Character class describing NM global symbol codes.
8829 symcode='[BCDEGRST]'
8830
8831 # Regexp to match symbols that can be accessed directly from C.
8832 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8833
8834 # Define system-specific variables.
8835 case $host_os in
8836 aix*)
8837   symcode='[BCDT]'
8838   ;;
8839 cygwin* | mingw* | pw32* | cegcc*)
8840   symcode='[ABCDGISTW]'
8841   ;;
8842 hpux*)
8843   if test ia64 = "$host_cpu"; then
8844     symcode='[ABCDEGRST]'
8845   fi
8846   ;;
8847 irix* | nonstopux*)
8848   symcode='[BCDEGRST]'
8849   ;;
8850 osf*)
8851   symcode='[BCDEGQRST]'
8852   ;;
8853 solaris*)
8854   symcode='[BDRT]'
8855   ;;
8856 sco3.2v5*)
8857   symcode='[DT]'
8858   ;;
8859 sysv4.2uw2*)
8860   symcode='[DT]'
8861   ;;
8862 sysv5* | sco5v6* | unixware* | OpenUNIX*)
8863   symcode='[ABDT]'
8864   ;;
8865 sysv4)
8866   symcode='[DFNSTU]'
8867   ;;
8868 esac
8869
8870 # If we're using GNU nm, then use its standard symbol codes.
8871 case `$NM -V 2>&1` in
8872 *GNU* | *'with BFD'*)
8873   symcode='[ABCDGIRSTW]' ;;
8874 esac
8875
8876 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8877   # Gets list of data symbols to import.
8878   lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8879   # Adjust the below global symbol transforms to fixup imported variables.
8880   lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8881   lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
8882   lt_c_name_lib_hook="\
8883   -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
8884   -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
8885 else
8886   # Disable hooks by default.
8887   lt_cv_sys_global_symbol_to_import=
8888   lt_cdecl_hook=
8889   lt_c_name_hook=
8890   lt_c_name_lib_hook=
8891 fi
8892
8893 # Transform an extracted symbol line into a proper C declaration.
8894 # Some systems (esp. on ia64) link data and code symbols differently,
8895 # so use this general approach.
8896 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8897 $lt_cdecl_hook\
8898 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8899 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8900
8901 # Transform an extracted symbol line into symbol name and symbol address
8902 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8903 $lt_c_name_hook\
8904 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8905 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8906
8907 # Transform an extracted symbol line into symbol name with lib prefix and
8908 # symbol address.
8909 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8910 $lt_c_name_lib_hook\
8911 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8912 " -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8913 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8914
8915 # Handle CRLF in mingw tool chain
8916 opt_cr=
8917 case $build_os in
8918 mingw*)
8919   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8920   ;;
8921 esac
8922
8923 # Try without a prefix underscore, then with it.
8924 for ac_symprfx in "" "_"; do
8925
8926   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8927   symxfrm="\\1 $ac_symprfx\\2 \\2"
8928
8929   # Write the raw and C identifiers.
8930   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8931     # Fake it for dumpbin and say T for any non-static function,
8932     # D for any global variable and I for any imported variable.
8933     # Also find C++ and __fastcall symbols from MSVC++,
8934     # which start with @ or ?.
8935     lt_cv_sys_global_symbol_pipe="$AWK '"\
8936 "     {last_section=section; section=\$ 3};"\
8937 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8938 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8939 "     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8940 "     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8941 "     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8942 "     \$ 0!~/External *\|/{next};"\
8943 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8944 "     {if(hide[section]) next};"\
8945 "     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8946 "     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8947 "     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8948 "     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8949 "     ' prfx=^$ac_symprfx"
8950   else
8951     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8952   fi
8953   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8954
8955   # Check to see that the pipe works correctly.
8956   pipe_works=no
8957
8958   rm -f conftest*
8959   cat > conftest.$ac_ext <<_LT_EOF
8960 #ifdef __cplusplus
8961 extern "C" {
8962 #endif
8963 char nm_test_var;
8964 void nm_test_func(void);
8965 void nm_test_func(void){}
8966 #ifdef __cplusplus
8967 }
8968 #endif
8969 int main(){nm_test_var='a';nm_test_func();return(0);}
8970 _LT_EOF
8971
8972   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8973   (eval $ac_compile) 2>&5
8974   ac_status=$?
8975   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8976   test $ac_status = 0; }; then
8977     # Now try to grab the symbols.
8978     nlist=conftest.nm
8979     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
8980   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
8981   ac_status=$?
8982   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8983   test $ac_status = 0; } && test -s "$nlist"; then
8984       # Try sorting and uniquifying the output.
8985       if sort "$nlist" | uniq > "$nlist"T; then
8986         mv -f "$nlist"T "$nlist"
8987       else
8988         rm -f "$nlist"T
8989       fi
8990
8991       # Make sure that we snagged all the symbols we need.
8992       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
8993         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
8994           cat <<_LT_EOF > conftest.$ac_ext
8995 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
8996 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
8997 /* DATA imports from DLLs on WIN32 can't be const, because runtime
8998    relocations are performed -- see ld's documentation on pseudo-relocs.  */
8999 # define LT_DLSYM_CONST
9000 #elif defined __osf__
9001 /* This system does not cope well with relocations in const data.  */
9002 # define LT_DLSYM_CONST
9003 #else
9004 # define LT_DLSYM_CONST const
9005 #endif
9006
9007 #ifdef __cplusplus
9008 extern "C" {
9009 #endif
9010
9011 _LT_EOF
9012           # Now generate the symbol file.
9013           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
9014
9015           cat <<_LT_EOF >> conftest.$ac_ext
9016
9017 /* The mapping between symbol names and symbols.  */
9018 LT_DLSYM_CONST struct {
9019   const char *name;
9020   void       *address;
9021 }
9022 lt__PROGRAM__LTX_preloaded_symbols[] =
9023 {
9024   { "@PROGRAM@", (void *) 0 },
9025 _LT_EOF
9026           $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
9027           cat <<\_LT_EOF >> conftest.$ac_ext
9028   {0, (void *) 0}
9029 };
9030
9031 /* This works around a problem in FreeBSD linker */
9032 #ifdef FREEBSD_WORKAROUND
9033 static const void *lt_preloaded_setup() {
9034   return lt__PROGRAM__LTX_preloaded_symbols;
9035 }
9036 #endif
9037
9038 #ifdef __cplusplus
9039 }
9040 #endif
9041 _LT_EOF
9042           # Now try linking the two files.
9043           mv conftest.$ac_objext conftstm.$ac_objext
9044           lt_globsym_save_LIBS=$LIBS
9045           lt_globsym_save_CFLAGS=$CFLAGS
9046           LIBS=conftstm.$ac_objext
9047           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
9048           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9049   (eval $ac_link) 2>&5
9050   ac_status=$?
9051   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9052   test $ac_status = 0; } && test -s conftest$ac_exeext; then
9053             pipe_works=yes
9054           fi
9055           LIBS=$lt_globsym_save_LIBS
9056           CFLAGS=$lt_globsym_save_CFLAGS
9057         else
9058           echo "cannot find nm_test_func in $nlist" >&5
9059         fi
9060       else
9061         echo "cannot find nm_test_var in $nlist" >&5
9062       fi
9063     else
9064       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
9065     fi
9066   else
9067     echo "$progname: failed program was:" >&5
9068     cat conftest.$ac_ext >&5
9069   fi
9070   rm -rf conftest* conftst*
9071
9072   # Do not use the global_symbol_pipe unless it works.
9073   if test yes = "$pipe_works"; then
9074     break
9075   else
9076     lt_cv_sys_global_symbol_pipe=
9077   fi
9078 done
9079
9080 fi
9081
9082 if test -z "$lt_cv_sys_global_symbol_pipe"; then
9083   lt_cv_sys_global_symbol_to_cdecl=
9084 fi
9085 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
9087 $as_echo "failed" >&6; }
9088 else
9089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9090 $as_echo "ok" >&6; }
9091 fi
9092
9093 # Response file support.
9094 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9095   nm_file_list_spec='@'
9096 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
9097   nm_file_list_spec='@'
9098 fi
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
9137 $as_echo_n "checking for sysroot... " >&6; }
9138
9139 # Check whether --with-sysroot was given.
9140 if test "${with_sysroot+set}" = set; then :
9141   withval=$with_sysroot;
9142 else
9143   with_sysroot=no
9144 fi
9145
9146
9147 lt_sysroot=
9148 case $with_sysroot in #(
9149  yes)
9150    if test yes = "$GCC"; then
9151      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
9152    fi
9153    ;; #(
9154  /*)
9155    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
9156    ;; #(
9157  no|'')
9158    ;; #(
9159  *)
9160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
9161 $as_echo "$with_sysroot" >&6; }
9162    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
9163    ;;
9164 esac
9165
9166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
9167 $as_echo "${lt_sysroot:-no}" >&6; }
9168
9169
9170
9171
9172
9173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
9174 $as_echo_n "checking for a working dd... " >&6; }
9175 if ${ac_cv_path_lt_DD+:} false; then :
9176   $as_echo_n "(cached) " >&6
9177 else
9178   printf 0123456789abcdef0123456789abcdef >conftest.i
9179 cat conftest.i conftest.i >conftest2.i
9180 : ${lt_DD:=$DD}
9181 if test -z "$lt_DD"; then
9182   ac_path_lt_DD_found=false
9183   # Loop through the user's path and test for each of PROGNAME-LIST
9184   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9185 for as_dir in $PATH
9186 do
9187   IFS=$as_save_IFS
9188   test -z "$as_dir" && as_dir=.
9189     for ac_prog in dd; do
9190     for ac_exec_ext in '' $ac_executable_extensions; do
9191       ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
9192       as_fn_executable_p "$ac_path_lt_DD" || continue
9193 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9194   cmp -s conftest.i conftest.out \
9195   && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
9196 fi
9197       $ac_path_lt_DD_found && break 3
9198     done
9199   done
9200   done
9201 IFS=$as_save_IFS
9202   if test -z "$ac_cv_path_lt_DD"; then
9203     :
9204   fi
9205 else
9206   ac_cv_path_lt_DD=$lt_DD
9207 fi
9208
9209 rm -f conftest.i conftest2.i conftest.out
9210 fi
9211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
9212 $as_echo "$ac_cv_path_lt_DD" >&6; }
9213
9214
9215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
9216 $as_echo_n "checking how to truncate binary pipes... " >&6; }
9217 if ${lt_cv_truncate_bin+:} false; then :
9218   $as_echo_n "(cached) " >&6
9219 else
9220   printf 0123456789abcdef0123456789abcdef >conftest.i
9221 cat conftest.i conftest.i >conftest2.i
9222 lt_cv_truncate_bin=
9223 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9224   cmp -s conftest.i conftest.out \
9225   && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
9226 fi
9227 rm -f conftest.i conftest2.i conftest.out
9228 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
9229 fi
9230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
9231 $as_echo "$lt_cv_truncate_bin" >&6; }
9232
9233
9234
9235
9236
9237
9238
9239 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
9240 func_cc_basename ()
9241 {
9242     for cc_temp in $*""; do
9243       case $cc_temp in
9244         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9245         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9246         \-*) ;;
9247         *) break;;
9248       esac
9249     done
9250     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9251 }
9252
9253 # Check whether --enable-libtool-lock was given.
9254 if test "${enable_libtool_lock+set}" = set; then :
9255   enableval=$enable_libtool_lock;
9256 fi
9257
9258 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
9259
9260 # Some flags need to be propagated to the compiler or linker for good
9261 # libtool support.
9262 case $host in
9263 ia64-*-hpux*)
9264   # Find out what ABI is being produced by ac_compile, and set mode
9265   # options accordingly.
9266   echo 'int i;' > conftest.$ac_ext
9267   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9268   (eval $ac_compile) 2>&5
9269   ac_status=$?
9270   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9271   test $ac_status = 0; }; then
9272     case `/usr/bin/file conftest.$ac_objext` in
9273       *ELF-32*)
9274         HPUX_IA64_MODE=32
9275         ;;
9276       *ELF-64*)
9277         HPUX_IA64_MODE=64
9278         ;;
9279     esac
9280   fi
9281   rm -rf conftest*
9282   ;;
9283 *-*-irix6*)
9284   # Find out what ABI is being produced by ac_compile, and set linker
9285   # options accordingly.
9286   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9287   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9288   (eval $ac_compile) 2>&5
9289   ac_status=$?
9290   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9291   test $ac_status = 0; }; then
9292     if test yes = "$lt_cv_prog_gnu_ld"; then
9293       case `/usr/bin/file conftest.$ac_objext` in
9294         *32-bit*)
9295           LD="${LD-ld} -melf32bsmip"
9296           ;;
9297         *N32*)
9298           LD="${LD-ld} -melf32bmipn32"
9299           ;;
9300         *64-bit*)
9301           LD="${LD-ld} -melf64bmip"
9302         ;;
9303       esac
9304     else
9305       case `/usr/bin/file conftest.$ac_objext` in
9306         *32-bit*)
9307           LD="${LD-ld} -32"
9308           ;;
9309         *N32*)
9310           LD="${LD-ld} -n32"
9311           ;;
9312         *64-bit*)
9313           LD="${LD-ld} -64"
9314           ;;
9315       esac
9316     fi
9317   fi
9318   rm -rf conftest*
9319   ;;
9320
9321 mips64*-*linux*)
9322   # Find out what ABI is being produced by ac_compile, and set linker
9323   # options accordingly.
9324   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9325   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9326   (eval $ac_compile) 2>&5
9327   ac_status=$?
9328   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9329   test $ac_status = 0; }; then
9330     emul=elf
9331     case `/usr/bin/file conftest.$ac_objext` in
9332       *32-bit*)
9333         emul="${emul}32"
9334         ;;
9335       *64-bit*)
9336         emul="${emul}64"
9337         ;;
9338     esac
9339     case `/usr/bin/file conftest.$ac_objext` in
9340       *MSB*)
9341         emul="${emul}btsmip"
9342         ;;
9343       *LSB*)
9344         emul="${emul}ltsmip"
9345         ;;
9346     esac
9347     case `/usr/bin/file conftest.$ac_objext` in
9348       *N32*)
9349         emul="${emul}n32"
9350         ;;
9351     esac
9352     LD="${LD-ld} -m $emul"
9353   fi
9354   rm -rf conftest*
9355   ;;
9356
9357 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9358 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9359   # Find out what ABI is being produced by ac_compile, and set linker
9360   # options accordingly.  Note that the listed cases only cover the
9361   # situations where additional linker options are needed (such as when
9362   # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9363   # vice versa); the common cases where no linker options are needed do
9364   # not appear in the list.
9365   echo 'int i;' > conftest.$ac_ext
9366   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9367   (eval $ac_compile) 2>&5
9368   ac_status=$?
9369   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9370   test $ac_status = 0; }; then
9371     case `/usr/bin/file conftest.o` in
9372       *32-bit*)
9373         case $host in
9374           x86_64-*kfreebsd*-gnu)
9375             LD="${LD-ld} -m elf_i386_fbsd"
9376             ;;
9377           x86_64-*linux*)
9378             case `/usr/bin/file conftest.o` in
9379               *x86-64*)
9380                 LD="${LD-ld} -m elf32_x86_64"
9381                 ;;
9382               *)
9383                 LD="${LD-ld} -m elf_i386"
9384                 ;;
9385             esac
9386             ;;
9387           powerpc64le-*linux*)
9388             LD="${LD-ld} -m elf32lppclinux"
9389             ;;
9390           powerpc64-*linux*)
9391             LD="${LD-ld} -m elf32ppclinux"
9392             ;;
9393           s390x-*linux*)
9394             LD="${LD-ld} -m elf_s390"
9395             ;;
9396           sparc64-*linux*)
9397             LD="${LD-ld} -m elf32_sparc"
9398             ;;
9399         esac
9400         ;;
9401       *64-bit*)
9402         case $host in
9403           x86_64-*kfreebsd*-gnu)
9404             LD="${LD-ld} -m elf_x86_64_fbsd"
9405             ;;
9406           x86_64-*linux*)
9407             LD="${LD-ld} -m elf_x86_64"
9408             ;;
9409           powerpcle-*linux*)
9410             LD="${LD-ld} -m elf64lppc"
9411             ;;
9412           powerpc-*linux*)
9413             LD="${LD-ld} -m elf64ppc"
9414             ;;
9415           s390*-*linux*|s390*-*tpf*)
9416             LD="${LD-ld} -m elf64_s390"
9417             ;;
9418           sparc*-*linux*)
9419             LD="${LD-ld} -m elf64_sparc"
9420             ;;
9421         esac
9422         ;;
9423     esac
9424   fi
9425   rm -rf conftest*
9426   ;;
9427
9428 *-*-sco3.2v5*)
9429   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9430   SAVE_CFLAGS=$CFLAGS
9431   CFLAGS="$CFLAGS -belf"
9432   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9433 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
9434 if ${lt_cv_cc_needs_belf+:} false; then :
9435   $as_echo_n "(cached) " >&6
9436 else
9437   ac_ext=c
9438 ac_cpp='$CPP $CPPFLAGS'
9439 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9440 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9441 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9442
9443      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9444 /* end confdefs.h.  */
9445
9446 int
9447 main ()
9448 {
9449
9450   ;
9451   return 0;
9452 }
9453 _ACEOF
9454 if ac_fn_c_try_link "$LINENO"; then :
9455   lt_cv_cc_needs_belf=yes
9456 else
9457   lt_cv_cc_needs_belf=no
9458 fi
9459 rm -f core conftest.err conftest.$ac_objext \
9460     conftest$ac_exeext conftest.$ac_ext
9461      ac_ext=c
9462 ac_cpp='$CPP $CPPFLAGS'
9463 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9464 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9465 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9466
9467 fi
9468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9469 $as_echo "$lt_cv_cc_needs_belf" >&6; }
9470   if test yes != "$lt_cv_cc_needs_belf"; then
9471     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9472     CFLAGS=$SAVE_CFLAGS
9473   fi
9474   ;;
9475 *-*solaris*)
9476   # Find out what ABI is being produced by ac_compile, and set linker
9477   # options accordingly.
9478   echo 'int i;' > conftest.$ac_ext
9479   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9480   (eval $ac_compile) 2>&5
9481   ac_status=$?
9482   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9483   test $ac_status = 0; }; then
9484     case `/usr/bin/file conftest.o` in
9485     *64-bit*)
9486       case $lt_cv_prog_gnu_ld in
9487       yes*)
9488         case $host in
9489         i?86-*-solaris*|x86_64-*-solaris*)
9490           LD="${LD-ld} -m elf_x86_64"
9491           ;;
9492         sparc*-*-solaris*)
9493           LD="${LD-ld} -m elf64_sparc"
9494           ;;
9495         esac
9496         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9497         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9498           LD=${LD-ld}_sol2
9499         fi
9500         ;;
9501       *)
9502         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9503           LD="${LD-ld} -64"
9504         fi
9505         ;;
9506       esac
9507       ;;
9508     esac
9509   fi
9510   rm -rf conftest*
9511   ;;
9512 esac
9513
9514 need_locks=$enable_libtool_lock
9515
9516 if test -n "$ac_tool_prefix"; then
9517   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9518 set dummy ${ac_tool_prefix}mt; ac_word=$2
9519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9520 $as_echo_n "checking for $ac_word... " >&6; }
9521 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9522   $as_echo_n "(cached) " >&6
9523 else
9524   if test -n "$MANIFEST_TOOL"; then
9525   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9526 else
9527 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9528 for as_dir in $PATH
9529 do
9530   IFS=$as_save_IFS
9531   test -z "$as_dir" && as_dir=.
9532     for ac_exec_ext in '' $ac_executable_extensions; do
9533   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9534     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9535     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9536     break 2
9537   fi
9538 done
9539   done
9540 IFS=$as_save_IFS
9541
9542 fi
9543 fi
9544 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9545 if test -n "$MANIFEST_TOOL"; then
9546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9547 $as_echo "$MANIFEST_TOOL" >&6; }
9548 else
9549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9550 $as_echo "no" >&6; }
9551 fi
9552
9553
9554 fi
9555 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9556   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9557   # Extract the first word of "mt", so it can be a program name with args.
9558 set dummy mt; ac_word=$2
9559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9560 $as_echo_n "checking for $ac_word... " >&6; }
9561 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9562   $as_echo_n "(cached) " >&6
9563 else
9564   if test -n "$ac_ct_MANIFEST_TOOL"; then
9565   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9566 else
9567 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9568 for as_dir in $PATH
9569 do
9570   IFS=$as_save_IFS
9571   test -z "$as_dir" && as_dir=.
9572     for ac_exec_ext in '' $ac_executable_extensions; do
9573   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9574     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9576     break 2
9577   fi
9578 done
9579   done
9580 IFS=$as_save_IFS
9581
9582 fi
9583 fi
9584 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9585 if test -n "$ac_ct_MANIFEST_TOOL"; then
9586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9587 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9588 else
9589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9590 $as_echo "no" >&6; }
9591 fi
9592
9593   if test "x$ac_ct_MANIFEST_TOOL" = x; then
9594     MANIFEST_TOOL=":"
9595   else
9596     case $cross_compiling:$ac_tool_warned in
9597 yes:)
9598 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9599 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9600 ac_tool_warned=yes ;;
9601 esac
9602     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9603   fi
9604 else
9605   MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9606 fi
9607
9608 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9610 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9611 if ${lt_cv_path_mainfest_tool+:} false; then :
9612   $as_echo_n "(cached) " >&6
9613 else
9614   lt_cv_path_mainfest_tool=no
9615   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9616   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9617   cat conftest.err >&5
9618   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9619     lt_cv_path_mainfest_tool=yes
9620   fi
9621   rm -f conftest*
9622 fi
9623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9624 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
9625 if test yes != "$lt_cv_path_mainfest_tool"; then
9626   MANIFEST_TOOL=:
9627 fi
9628
9629
9630
9631
9632
9633
9634   case $host_os in
9635     rhapsody* | darwin*)
9636     if test -n "$ac_tool_prefix"; then
9637   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9638 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9640 $as_echo_n "checking for $ac_word... " >&6; }
9641 if ${ac_cv_prog_DSYMUTIL+:} false; then :
9642   $as_echo_n "(cached) " >&6
9643 else
9644   if test -n "$DSYMUTIL"; then
9645   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9646 else
9647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9648 for as_dir in $PATH
9649 do
9650   IFS=$as_save_IFS
9651   test -z "$as_dir" && as_dir=.
9652     for ac_exec_ext in '' $ac_executable_extensions; do
9653   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9654     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9656     break 2
9657   fi
9658 done
9659   done
9660 IFS=$as_save_IFS
9661
9662 fi
9663 fi
9664 DSYMUTIL=$ac_cv_prog_DSYMUTIL
9665 if test -n "$DSYMUTIL"; then
9666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9667 $as_echo "$DSYMUTIL" >&6; }
9668 else
9669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9670 $as_echo "no" >&6; }
9671 fi
9672
9673
9674 fi
9675 if test -z "$ac_cv_prog_DSYMUTIL"; then
9676   ac_ct_DSYMUTIL=$DSYMUTIL
9677   # Extract the first word of "dsymutil", so it can be a program name with args.
9678 set dummy dsymutil; ac_word=$2
9679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9680 $as_echo_n "checking for $ac_word... " >&6; }
9681 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9682   $as_echo_n "(cached) " >&6
9683 else
9684   if test -n "$ac_ct_DSYMUTIL"; then
9685   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9686 else
9687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9688 for as_dir in $PATH
9689 do
9690   IFS=$as_save_IFS
9691   test -z "$as_dir" && as_dir=.
9692     for ac_exec_ext in '' $ac_executable_extensions; do
9693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9694     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9696     break 2
9697   fi
9698 done
9699   done
9700 IFS=$as_save_IFS
9701
9702 fi
9703 fi
9704 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9705 if test -n "$ac_ct_DSYMUTIL"; then
9706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9707 $as_echo "$ac_ct_DSYMUTIL" >&6; }
9708 else
9709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9710 $as_echo "no" >&6; }
9711 fi
9712
9713   if test "x$ac_ct_DSYMUTIL" = x; then
9714     DSYMUTIL=":"
9715   else
9716     case $cross_compiling:$ac_tool_warned in
9717 yes:)
9718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9719 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9720 ac_tool_warned=yes ;;
9721 esac
9722     DSYMUTIL=$ac_ct_DSYMUTIL
9723   fi
9724 else
9725   DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9726 fi
9727
9728     if test -n "$ac_tool_prefix"; then
9729   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9730 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9732 $as_echo_n "checking for $ac_word... " >&6; }
9733 if ${ac_cv_prog_NMEDIT+:} false; then :
9734   $as_echo_n "(cached) " >&6
9735 else
9736   if test -n "$NMEDIT"; then
9737   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9738 else
9739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9740 for as_dir in $PATH
9741 do
9742   IFS=$as_save_IFS
9743   test -z "$as_dir" && as_dir=.
9744     for ac_exec_ext in '' $ac_executable_extensions; do
9745   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9746     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9747     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9748     break 2
9749   fi
9750 done
9751   done
9752 IFS=$as_save_IFS
9753
9754 fi
9755 fi
9756 NMEDIT=$ac_cv_prog_NMEDIT
9757 if test -n "$NMEDIT"; then
9758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9759 $as_echo "$NMEDIT" >&6; }
9760 else
9761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9762 $as_echo "no" >&6; }
9763 fi
9764
9765
9766 fi
9767 if test -z "$ac_cv_prog_NMEDIT"; then
9768   ac_ct_NMEDIT=$NMEDIT
9769   # Extract the first word of "nmedit", so it can be a program name with args.
9770 set dummy nmedit; ac_word=$2
9771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9772 $as_echo_n "checking for $ac_word... " >&6; }
9773 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9774   $as_echo_n "(cached) " >&6
9775 else
9776   if test -n "$ac_ct_NMEDIT"; then
9777   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9778 else
9779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9780 for as_dir in $PATH
9781 do
9782   IFS=$as_save_IFS
9783   test -z "$as_dir" && as_dir=.
9784     for ac_exec_ext in '' $ac_executable_extensions; do
9785   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9786     ac_cv_prog_ac_ct_NMEDIT="nmedit"
9787     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9788     break 2
9789   fi
9790 done
9791   done
9792 IFS=$as_save_IFS
9793
9794 fi
9795 fi
9796 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9797 if test -n "$ac_ct_NMEDIT"; then
9798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9799 $as_echo "$ac_ct_NMEDIT" >&6; }
9800 else
9801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9802 $as_echo "no" >&6; }
9803 fi
9804
9805   if test "x$ac_ct_NMEDIT" = x; then
9806     NMEDIT=":"
9807   else
9808     case $cross_compiling:$ac_tool_warned in
9809 yes:)
9810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9811 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9812 ac_tool_warned=yes ;;
9813 esac
9814     NMEDIT=$ac_ct_NMEDIT
9815   fi
9816 else
9817   NMEDIT="$ac_cv_prog_NMEDIT"
9818 fi
9819
9820     if test -n "$ac_tool_prefix"; then
9821   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9822 set dummy ${ac_tool_prefix}lipo; ac_word=$2
9823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9824 $as_echo_n "checking for $ac_word... " >&6; }
9825 if ${ac_cv_prog_LIPO+:} false; then :
9826   $as_echo_n "(cached) " >&6
9827 else
9828   if test -n "$LIPO"; then
9829   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9830 else
9831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9832 for as_dir in $PATH
9833 do
9834   IFS=$as_save_IFS
9835   test -z "$as_dir" && as_dir=.
9836     for ac_exec_ext in '' $ac_executable_extensions; do
9837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9838     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9840     break 2
9841   fi
9842 done
9843   done
9844 IFS=$as_save_IFS
9845
9846 fi
9847 fi
9848 LIPO=$ac_cv_prog_LIPO
9849 if test -n "$LIPO"; then
9850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9851 $as_echo "$LIPO" >&6; }
9852 else
9853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9854 $as_echo "no" >&6; }
9855 fi
9856
9857
9858 fi
9859 if test -z "$ac_cv_prog_LIPO"; then
9860   ac_ct_LIPO=$LIPO
9861   # Extract the first word of "lipo", so it can be a program name with args.
9862 set dummy lipo; ac_word=$2
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9864 $as_echo_n "checking for $ac_word... " >&6; }
9865 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9866   $as_echo_n "(cached) " >&6
9867 else
9868   if test -n "$ac_ct_LIPO"; then
9869   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9870 else
9871 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9872 for as_dir in $PATH
9873 do
9874   IFS=$as_save_IFS
9875   test -z "$as_dir" && as_dir=.
9876     for ac_exec_ext in '' $ac_executable_extensions; do
9877   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9878     ac_cv_prog_ac_ct_LIPO="lipo"
9879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9880     break 2
9881   fi
9882 done
9883   done
9884 IFS=$as_save_IFS
9885
9886 fi
9887 fi
9888 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9889 if test -n "$ac_ct_LIPO"; then
9890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9891 $as_echo "$ac_ct_LIPO" >&6; }
9892 else
9893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9894 $as_echo "no" >&6; }
9895 fi
9896
9897   if test "x$ac_ct_LIPO" = x; then
9898     LIPO=":"
9899   else
9900     case $cross_compiling:$ac_tool_warned in
9901 yes:)
9902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9903 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9904 ac_tool_warned=yes ;;
9905 esac
9906     LIPO=$ac_ct_LIPO
9907   fi
9908 else
9909   LIPO="$ac_cv_prog_LIPO"
9910 fi
9911
9912     if test -n "$ac_tool_prefix"; then
9913   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9914 set dummy ${ac_tool_prefix}otool; ac_word=$2
9915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9916 $as_echo_n "checking for $ac_word... " >&6; }
9917 if ${ac_cv_prog_OTOOL+:} false; then :
9918   $as_echo_n "(cached) " >&6
9919 else
9920   if test -n "$OTOOL"; then
9921   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9922 else
9923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9924 for as_dir in $PATH
9925 do
9926   IFS=$as_save_IFS
9927   test -z "$as_dir" && as_dir=.
9928     for ac_exec_ext in '' $ac_executable_extensions; do
9929   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9930     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9932     break 2
9933   fi
9934 done
9935   done
9936 IFS=$as_save_IFS
9937
9938 fi
9939 fi
9940 OTOOL=$ac_cv_prog_OTOOL
9941 if test -n "$OTOOL"; then
9942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9943 $as_echo "$OTOOL" >&6; }
9944 else
9945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9946 $as_echo "no" >&6; }
9947 fi
9948
9949
9950 fi
9951 if test -z "$ac_cv_prog_OTOOL"; then
9952   ac_ct_OTOOL=$OTOOL
9953   # Extract the first word of "otool", so it can be a program name with args.
9954 set dummy otool; ac_word=$2
9955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9956 $as_echo_n "checking for $ac_word... " >&6; }
9957 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9958   $as_echo_n "(cached) " >&6
9959 else
9960   if test -n "$ac_ct_OTOOL"; then
9961   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
9962 else
9963 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9964 for as_dir in $PATH
9965 do
9966   IFS=$as_save_IFS
9967   test -z "$as_dir" && as_dir=.
9968     for ac_exec_ext in '' $ac_executable_extensions; do
9969   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9970     ac_cv_prog_ac_ct_OTOOL="otool"
9971     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9972     break 2
9973   fi
9974 done
9975   done
9976 IFS=$as_save_IFS
9977
9978 fi
9979 fi
9980 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
9981 if test -n "$ac_ct_OTOOL"; then
9982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
9983 $as_echo "$ac_ct_OTOOL" >&6; }
9984 else
9985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9986 $as_echo "no" >&6; }
9987 fi
9988
9989   if test "x$ac_ct_OTOOL" = x; then
9990     OTOOL=":"
9991   else
9992     case $cross_compiling:$ac_tool_warned in
9993 yes:)
9994 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9995 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9996 ac_tool_warned=yes ;;
9997 esac
9998     OTOOL=$ac_ct_OTOOL
9999   fi
10000 else
10001   OTOOL="$ac_cv_prog_OTOOL"
10002 fi
10003
10004     if test -n "$ac_tool_prefix"; then
10005   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
10006 set dummy ${ac_tool_prefix}otool64; ac_word=$2
10007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10008 $as_echo_n "checking for $ac_word... " >&6; }
10009 if ${ac_cv_prog_OTOOL64+:} false; then :
10010   $as_echo_n "(cached) " >&6
10011 else
10012   if test -n "$OTOOL64"; then
10013   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
10014 else
10015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10016 for as_dir in $PATH
10017 do
10018   IFS=$as_save_IFS
10019   test -z "$as_dir" && as_dir=.
10020     for ac_exec_ext in '' $ac_executable_extensions; do
10021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10022     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
10023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10024     break 2
10025   fi
10026 done
10027   done
10028 IFS=$as_save_IFS
10029
10030 fi
10031 fi
10032 OTOOL64=$ac_cv_prog_OTOOL64
10033 if test -n "$OTOOL64"; then
10034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
10035 $as_echo "$OTOOL64" >&6; }
10036 else
10037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10038 $as_echo "no" >&6; }
10039 fi
10040
10041
10042 fi
10043 if test -z "$ac_cv_prog_OTOOL64"; then
10044   ac_ct_OTOOL64=$OTOOL64
10045   # Extract the first word of "otool64", so it can be a program name with args.
10046 set dummy otool64; ac_word=$2
10047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10048 $as_echo_n "checking for $ac_word... " >&6; }
10049 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
10050   $as_echo_n "(cached) " >&6
10051 else
10052   if test -n "$ac_ct_OTOOL64"; then
10053   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
10054 else
10055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10056 for as_dir in $PATH
10057 do
10058   IFS=$as_save_IFS
10059   test -z "$as_dir" && as_dir=.
10060     for ac_exec_ext in '' $ac_executable_extensions; do
10061   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10062     ac_cv_prog_ac_ct_OTOOL64="otool64"
10063     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10064     break 2
10065   fi
10066 done
10067   done
10068 IFS=$as_save_IFS
10069
10070 fi
10071 fi
10072 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
10073 if test -n "$ac_ct_OTOOL64"; then
10074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
10075 $as_echo "$ac_ct_OTOOL64" >&6; }
10076 else
10077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10078 $as_echo "no" >&6; }
10079 fi
10080
10081   if test "x$ac_ct_OTOOL64" = x; then
10082     OTOOL64=":"
10083   else
10084     case $cross_compiling:$ac_tool_warned in
10085 yes:)
10086 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10087 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10088 ac_tool_warned=yes ;;
10089 esac
10090     OTOOL64=$ac_ct_OTOOL64
10091   fi
10092 else
10093   OTOOL64="$ac_cv_prog_OTOOL64"
10094 fi
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
10123 $as_echo_n "checking for -single_module linker flag... " >&6; }
10124 if ${lt_cv_apple_cc_single_mod+:} false; then :
10125   $as_echo_n "(cached) " >&6
10126 else
10127   lt_cv_apple_cc_single_mod=no
10128       if test -z "$LT_MULTI_MODULE"; then
10129         # By default we will add the -single_module flag. You can override
10130         # by either setting the environment variable LT_MULTI_MODULE
10131         # non-empty at configure time, or by adding -multi_module to the
10132         # link flags.
10133         rm -rf libconftest.dylib*
10134         echo "int foo(void){return 1;}" > conftest.c
10135         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10136 -dynamiclib -Wl,-single_module conftest.c" >&5
10137         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10138           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10139         _lt_result=$?
10140         # If there is a non-empty error log, and "single_module"
10141         # appears in it, assume the flag caused a linker warning
10142         if test -s conftest.err && $GREP single_module conftest.err; then
10143           cat conftest.err >&5
10144         # Otherwise, if the output was created with a 0 exit code from
10145         # the compiler, it worked.
10146         elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10147           lt_cv_apple_cc_single_mod=yes
10148         else
10149           cat conftest.err >&5
10150         fi
10151         rm -rf libconftest.dylib*
10152         rm -f conftest.*
10153       fi
10154 fi
10155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
10156 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
10157
10158     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
10159 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
10160 if ${lt_cv_ld_exported_symbols_list+:} false; then :
10161   $as_echo_n "(cached) " >&6
10162 else
10163   lt_cv_ld_exported_symbols_list=no
10164       save_LDFLAGS=$LDFLAGS
10165       echo "_main" > conftest.sym
10166       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10167       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10168 /* end confdefs.h.  */
10169
10170 int
10171 main ()
10172 {
10173
10174   ;
10175   return 0;
10176 }
10177 _ACEOF
10178 if ac_fn_c_try_link "$LINENO"; then :
10179   lt_cv_ld_exported_symbols_list=yes
10180 else
10181   lt_cv_ld_exported_symbols_list=no
10182 fi
10183 rm -f core conftest.err conftest.$ac_objext \
10184     conftest$ac_exeext conftest.$ac_ext
10185         LDFLAGS=$save_LDFLAGS
10186
10187 fi
10188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
10189 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
10190
10191     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
10192 $as_echo_n "checking for -force_load linker flag... " >&6; }
10193 if ${lt_cv_ld_force_load+:} false; then :
10194   $as_echo_n "(cached) " >&6
10195 else
10196   lt_cv_ld_force_load=no
10197       cat > conftest.c << _LT_EOF
10198 int forced_loaded() { return 2;}
10199 _LT_EOF
10200       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
10201       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
10202       echo "$AR cru libconftest.a conftest.o" >&5
10203       $AR cru libconftest.a conftest.o 2>&5
10204       echo "$RANLIB libconftest.a" >&5
10205       $RANLIB libconftest.a 2>&5
10206       cat > conftest.c << _LT_EOF
10207 int main() { return 0;}
10208 _LT_EOF
10209       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
10210       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10211       _lt_result=$?
10212       if test -s conftest.err && $GREP force_load conftest.err; then
10213         cat conftest.err >&5
10214       elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10215         lt_cv_ld_force_load=yes
10216       else
10217         cat conftest.err >&5
10218       fi
10219         rm -f conftest.err libconftest.a conftest conftest.c
10220         rm -rf conftest.dSYM
10221
10222 fi
10223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
10224 $as_echo "$lt_cv_ld_force_load" >&6; }
10225     case $host_os in
10226     rhapsody* | darwin1.[012])
10227       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10228     darwin1.*)
10229       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10230     darwin*) # darwin 5.x on
10231       # if running on 10.5 or later, the deployment target defaults
10232       # to the OS version, if on x86, and 10.4, the deployment
10233       # target defaults to 10.4. Don't you love it?
10234       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10235         10.0,*86*-darwin8*|10.0,*-darwin[91]*)
10236           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10237         10.[012][,.]*)
10238           _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10239         10.*)
10240           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10241       esac
10242     ;;
10243   esac
10244     if test yes = "$lt_cv_apple_cc_single_mod"; then
10245       _lt_dar_single_mod='$single_module'
10246     fi
10247     if test yes = "$lt_cv_ld_exported_symbols_list"; then
10248       _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10249     else
10250       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10251     fi
10252     if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10253       _lt_dsymutil='~$DSYMUTIL $lib || :'
10254     else
10255       _lt_dsymutil=
10256     fi
10257     ;;
10258   esac
10259
10260 # func_munge_path_list VARIABLE PATH
10261 # -----------------------------------
10262 # VARIABLE is name of variable containing _space_ separated list of
10263 # directories to be munged by the contents of PATH, which is string
10264 # having a format:
10265 # "DIR[:DIR]:"
10266 #       string "DIR[ DIR]" will be prepended to VARIABLE
10267 # ":DIR[:DIR]"
10268 #       string "DIR[ DIR]" will be appended to VARIABLE
10269 # "DIRP[:DIRP]::[DIRA:]DIRA"
10270 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
10271 #       "DIRA[ DIRA]" will be appended to VARIABLE
10272 # "DIR[:DIR]"
10273 #       VARIABLE will be replaced by "DIR[ DIR]"
10274 func_munge_path_list ()
10275 {
10276     case x$2 in
10277     x)
10278         ;;
10279     *:)
10280         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10281         ;;
10282     x:*)
10283         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10284         ;;
10285     *::*)
10286         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10287         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10288         ;;
10289     *)
10290         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10291         ;;
10292     esac
10293 }
10294
10295 for ac_header in dlfcn.h
10296 do :
10297   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10298 "
10299 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
10300   cat >>confdefs.h <<_ACEOF
10301 #define HAVE_DLFCN_H 1
10302 _ACEOF
10303
10304 fi
10305
10306 done
10307
10308
10309
10310
10311
10312
10313
10314 # Set options
10315
10316
10317
10318         enable_dlopen=no
10319
10320
10321   enable_win32_dll=no
10322
10323
10324             # Check whether --enable-shared was given.
10325 if test "${enable_shared+set}" = set; then :
10326   enableval=$enable_shared; p=${PACKAGE-default}
10327     case $enableval in
10328     yes) enable_shared=yes ;;
10329     no) enable_shared=no ;;
10330     *)
10331       enable_shared=no
10332       # Look at the argument we got.  We use all the common list separators.
10333       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10334       for pkg in $enableval; do
10335         IFS=$lt_save_ifs
10336         if test "X$pkg" = "X$p"; then
10337           enable_shared=yes
10338         fi
10339       done
10340       IFS=$lt_save_ifs
10341       ;;
10342     esac
10343 else
10344   enable_shared=yes
10345 fi
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355   # Check whether --enable-static was given.
10356 if test "${enable_static+set}" = set; then :
10357   enableval=$enable_static; p=${PACKAGE-default}
10358     case $enableval in
10359     yes) enable_static=yes ;;
10360     no) enable_static=no ;;
10361     *)
10362      enable_static=no
10363       # Look at the argument we got.  We use all the common list separators.
10364       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10365       for pkg in $enableval; do
10366         IFS=$lt_save_ifs
10367         if test "X$pkg" = "X$p"; then
10368           enable_static=yes
10369         fi
10370       done
10371       IFS=$lt_save_ifs
10372       ;;
10373     esac
10374 else
10375   enable_static=yes
10376 fi
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387 # Check whether --with-pic was given.
10388 if test "${with_pic+set}" = set; then :
10389   withval=$with_pic; lt_p=${PACKAGE-default}
10390     case $withval in
10391     yes|no) pic_mode=$withval ;;
10392     *)
10393       pic_mode=default
10394       # Look at the argument we got.  We use all the common list separators.
10395       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10396       for lt_pkg in $withval; do
10397         IFS=$lt_save_ifs
10398         if test "X$lt_pkg" = "X$lt_p"; then
10399           pic_mode=yes
10400         fi
10401       done
10402       IFS=$lt_save_ifs
10403       ;;
10404     esac
10405 else
10406   pic_mode=default
10407 fi
10408
10409
10410
10411
10412
10413
10414
10415
10416   # Check whether --enable-fast-install was given.
10417 if test "${enable_fast_install+set}" = set; then :
10418   enableval=$enable_fast_install; p=${PACKAGE-default}
10419     case $enableval in
10420     yes) enable_fast_install=yes ;;
10421     no) enable_fast_install=no ;;
10422     *)
10423       enable_fast_install=no
10424       # Look at the argument we got.  We use all the common list separators.
10425       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10426       for pkg in $enableval; do
10427         IFS=$lt_save_ifs
10428         if test "X$pkg" = "X$p"; then
10429           enable_fast_install=yes
10430         fi
10431       done
10432       IFS=$lt_save_ifs
10433       ;;
10434     esac
10435 else
10436   enable_fast_install=yes
10437 fi
10438
10439
10440
10441
10442
10443
10444
10445
10446   shared_archive_member_spec=
10447 case $host,$enable_shared in
10448 power*-*-aix[5-9]*,yes)
10449   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10450 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
10451
10452 # Check whether --with-aix-soname was given.
10453 if test "${with_aix_soname+set}" = set; then :
10454   withval=$with_aix_soname; case $withval in
10455     aix|svr4|both)
10456       ;;
10457     *)
10458       as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10459       ;;
10460     esac
10461     lt_cv_with_aix_soname=$with_aix_soname
10462 else
10463   if ${lt_cv_with_aix_soname+:} false; then :
10464   $as_echo_n "(cached) " >&6
10465 else
10466   lt_cv_with_aix_soname=aix
10467 fi
10468
10469     with_aix_soname=$lt_cv_with_aix_soname
10470 fi
10471
10472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10473 $as_echo "$with_aix_soname" >&6; }
10474   if test aix != "$with_aix_soname"; then
10475     # For the AIX way of multilib, we name the shared archive member
10476     # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10477     # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10478     # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10479     # the AIX toolchain works better with OBJECT_MODE set (default 32).
10480     if test 64 = "${OBJECT_MODE-32}"; then
10481       shared_archive_member_spec=shr_64
10482     else
10483       shared_archive_member_spec=shr
10484     fi
10485   fi
10486   ;;
10487 *)
10488   with_aix_soname=aix
10489   ;;
10490 esac
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501 # This can be used to rebuild libtool when needed
10502 LIBTOOL_DEPS=$ltmain
10503
10504 # Always use our own libtool.
10505 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536 test -z "$LN_S" && LN_S="ln -s"
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551 if test -n "${ZSH_VERSION+set}"; then
10552    setopt NO_GLOB_SUBST
10553 fi
10554
10555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10556 $as_echo_n "checking for objdir... " >&6; }
10557 if ${lt_cv_objdir+:} false; then :
10558   $as_echo_n "(cached) " >&6
10559 else
10560   rm -f .libs 2>/dev/null
10561 mkdir .libs 2>/dev/null
10562 if test -d .libs; then
10563   lt_cv_objdir=.libs
10564 else
10565   # MS-DOS does not allow filenames that begin with a dot.
10566   lt_cv_objdir=_libs
10567 fi
10568 rmdir .libs 2>/dev/null
10569 fi
10570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10571 $as_echo "$lt_cv_objdir" >&6; }
10572 objdir=$lt_cv_objdir
10573
10574
10575
10576
10577
10578 cat >>confdefs.h <<_ACEOF
10579 #define LT_OBJDIR "$lt_cv_objdir/"
10580 _ACEOF
10581
10582
10583
10584
10585 case $host_os in
10586 aix3*)
10587   # AIX sometimes has problems with the GCC collect2 program.  For some
10588   # reason, if we set the COLLECT_NAMES environment variable, the problems
10589   # vanish in a puff of smoke.
10590   if test set != "${COLLECT_NAMES+set}"; then
10591     COLLECT_NAMES=
10592     export COLLECT_NAMES
10593   fi
10594   ;;
10595 esac
10596
10597 # Global variables:
10598 ofile=libtool
10599 can_build_shared=yes
10600
10601 # All known linkers require a '.a' archive for static linking (except MSVC,
10602 # which needs '.lib').
10603 libext=a
10604
10605 with_gnu_ld=$lt_cv_prog_gnu_ld
10606
10607 old_CC=$CC
10608 old_CFLAGS=$CFLAGS
10609
10610 # Set sane defaults for various variables
10611 test -z "$CC" && CC=cc
10612 test -z "$LTCC" && LTCC=$CC
10613 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10614 test -z "$LD" && LD=ld
10615 test -z "$ac_objext" && ac_objext=o
10616
10617 func_cc_basename $compiler
10618 cc_basename=$func_cc_basename_result
10619
10620
10621 # Only perform the check for file, if the check method requires it
10622 test -z "$MAGIC_CMD" && MAGIC_CMD=file
10623 case $deplibs_check_method in
10624 file_magic*)
10625   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10626     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10627 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10628 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10629   $as_echo_n "(cached) " >&6
10630 else
10631   case $MAGIC_CMD in
10632 [\\/*] |  ?:[\\/]*)
10633   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10634   ;;
10635 *)
10636   lt_save_MAGIC_CMD=$MAGIC_CMD
10637   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10638   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10639   for ac_dir in $ac_dummy; do
10640     IFS=$lt_save_ifs
10641     test -z "$ac_dir" && ac_dir=.
10642     if test -f "$ac_dir/${ac_tool_prefix}file"; then
10643       lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10644       if test -n "$file_magic_test_file"; then
10645         case $deplibs_check_method in
10646         "file_magic "*)
10647           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10648           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10649           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10650             $EGREP "$file_magic_regex" > /dev/null; then
10651             :
10652           else
10653             cat <<_LT_EOF 1>&2
10654
10655 *** Warning: the command libtool uses to detect shared libraries,
10656 *** $file_magic_cmd, produces output that libtool cannot recognize.
10657 *** The result is that libtool may fail to recognize shared libraries
10658 *** as such.  This will affect the creation of libtool libraries that
10659 *** depend on shared libraries, but programs linked with such libtool
10660 *** libraries will work regardless of this problem.  Nevertheless, you
10661 *** may want to report the problem to your system manager and/or to
10662 *** bug-libtool@gnu.org
10663
10664 _LT_EOF
10665           fi ;;
10666         esac
10667       fi
10668       break
10669     fi
10670   done
10671   IFS=$lt_save_ifs
10672   MAGIC_CMD=$lt_save_MAGIC_CMD
10673   ;;
10674 esac
10675 fi
10676
10677 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10678 if test -n "$MAGIC_CMD"; then
10679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10680 $as_echo "$MAGIC_CMD" >&6; }
10681 else
10682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10683 $as_echo "no" >&6; }
10684 fi
10685
10686
10687
10688
10689
10690 if test -z "$lt_cv_path_MAGIC_CMD"; then
10691   if test -n "$ac_tool_prefix"; then
10692     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10693 $as_echo_n "checking for file... " >&6; }
10694 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10695   $as_echo_n "(cached) " >&6
10696 else
10697   case $MAGIC_CMD in
10698 [\\/*] |  ?:[\\/]*)
10699   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10700   ;;
10701 *)
10702   lt_save_MAGIC_CMD=$MAGIC_CMD
10703   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10704   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10705   for ac_dir in $ac_dummy; do
10706     IFS=$lt_save_ifs
10707     test -z "$ac_dir" && ac_dir=.
10708     if test -f "$ac_dir/file"; then
10709       lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10710       if test -n "$file_magic_test_file"; then
10711         case $deplibs_check_method in
10712         "file_magic "*)
10713           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10714           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10715           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10716             $EGREP "$file_magic_regex" > /dev/null; then
10717             :
10718           else
10719             cat <<_LT_EOF 1>&2
10720
10721 *** Warning: the command libtool uses to detect shared libraries,
10722 *** $file_magic_cmd, produces output that libtool cannot recognize.
10723 *** The result is that libtool may fail to recognize shared libraries
10724 *** as such.  This will affect the creation of libtool libraries that
10725 *** depend on shared libraries, but programs linked with such libtool
10726 *** libraries will work regardless of this problem.  Nevertheless, you
10727 *** may want to report the problem to your system manager and/or to
10728 *** bug-libtool@gnu.org
10729
10730 _LT_EOF
10731           fi ;;
10732         esac
10733       fi
10734       break
10735     fi
10736   done
10737   IFS=$lt_save_ifs
10738   MAGIC_CMD=$lt_save_MAGIC_CMD
10739   ;;
10740 esac
10741 fi
10742
10743 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10744 if test -n "$MAGIC_CMD"; then
10745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10746 $as_echo "$MAGIC_CMD" >&6; }
10747 else
10748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10749 $as_echo "no" >&6; }
10750 fi
10751
10752
10753   else
10754     MAGIC_CMD=:
10755   fi
10756 fi
10757
10758   fi
10759   ;;
10760 esac
10761
10762 # Use C for the default configuration in the libtool script
10763
10764 lt_save_CC=$CC
10765 ac_ext=c
10766 ac_cpp='$CPP $CPPFLAGS'
10767 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10768 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10769 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10770
10771
10772 # Source file extension for C test sources.
10773 ac_ext=c
10774
10775 # Object file extension for compiled C test sources.
10776 objext=o
10777 objext=$objext
10778
10779 # Code to be used in simple compile tests
10780 lt_simple_compile_test_code="int some_variable = 0;"
10781
10782 # Code to be used in simple link tests
10783 lt_simple_link_test_code='int main(){return(0);}'
10784
10785
10786
10787
10788
10789
10790
10791 # If no C compiler was specified, use CC.
10792 LTCC=${LTCC-"$CC"}
10793
10794 # If no C compiler flags were specified, use CFLAGS.
10795 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10796
10797 # Allow CC to be a program name with arguments.
10798 compiler=$CC
10799
10800 # Save the default compiler, since it gets overwritten when the other
10801 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10802 compiler_DEFAULT=$CC
10803
10804 # save warnings/boilerplate of simple test code
10805 ac_outfile=conftest.$ac_objext
10806 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10807 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10808 _lt_compiler_boilerplate=`cat conftest.err`
10809 $RM conftest*
10810
10811 ac_outfile=conftest.$ac_objext
10812 echo "$lt_simple_link_test_code" >conftest.$ac_ext
10813 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10814 _lt_linker_boilerplate=`cat conftest.err`
10815 $RM -r conftest*
10816
10817
10818 if test -n "$compiler"; then
10819
10820 lt_prog_compiler_no_builtin_flag=
10821
10822 if test yes = "$GCC"; then
10823   case $cc_basename in
10824   nvcc*)
10825     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10826   *)
10827     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10828   esac
10829
10830   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10831 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10832 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10833   $as_echo_n "(cached) " >&6
10834 else
10835   lt_cv_prog_compiler_rtti_exceptions=no
10836    ac_outfile=conftest.$ac_objext
10837    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10838    lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
10839    # Insert the option either (1) after the last *FLAGS variable, or
10840    # (2) before a word containing "conftest.", or (3) at the end.
10841    # Note that $ac_compile itself does not contain backslashes and begins
10842    # with a dollar sign (not a hyphen), so the echo should work correctly.
10843    # The option is referenced via a variable to avoid confusing sed.
10844    lt_compile=`echo "$ac_compile" | $SED \
10845    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10846    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10847    -e 's:$: $lt_compiler_flag:'`
10848    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10849    (eval "$lt_compile" 2>conftest.err)
10850    ac_status=$?
10851    cat conftest.err >&5
10852    echo "$as_me:$LINENO: \$? = $ac_status" >&5
10853    if (exit $ac_status) && test -s "$ac_outfile"; then
10854      # The compiler can only warn and ignore the option if not recognized
10855      # So say no if there are warnings other than the usual output.
10856      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10857      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10858      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10859        lt_cv_prog_compiler_rtti_exceptions=yes
10860      fi
10861    fi
10862    $RM conftest*
10863
10864 fi
10865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10866 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10867
10868 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10869     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10870 else
10871     :
10872 fi
10873
10874 fi
10875
10876
10877
10878
10879
10880
10881   lt_prog_compiler_wl=
10882 lt_prog_compiler_pic=
10883 lt_prog_compiler_static=
10884
10885
10886   if test yes = "$GCC"; then
10887     lt_prog_compiler_wl='-Wl,'
10888     lt_prog_compiler_static='-static'
10889
10890     case $host_os in
10891       aix*)
10892       # All AIX code is PIC.
10893       if test ia64 = "$host_cpu"; then
10894         # AIX 5 now supports IA64 processor
10895         lt_prog_compiler_static='-Bstatic'
10896       fi
10897       lt_prog_compiler_pic='-fPIC'
10898       ;;
10899
10900     amigaos*)
10901       case $host_cpu in
10902       powerpc)
10903             # see comment about AmigaOS4 .so support
10904             lt_prog_compiler_pic='-fPIC'
10905         ;;
10906       m68k)
10907             # FIXME: we need at least 68020 code to build shared libraries, but
10908             # adding the '-m68020' flag to GCC prevents building anything better,
10909             # like '-m68040'.
10910             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10911         ;;
10912       esac
10913       ;;
10914
10915     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10916       # PIC is the default for these OSes.
10917       ;;
10918
10919     mingw* | cygwin* | pw32* | os2* | cegcc*)
10920       # This hack is so that the source file can tell whether it is being
10921       # built for inclusion in a dll (and should export symbols for example).
10922       # Although the cygwin gcc ignores -fPIC, still need this for old-style
10923       # (--disable-auto-import) libraries
10924       lt_prog_compiler_pic='-DDLL_EXPORT'
10925       case $host_os in
10926       os2*)
10927         lt_prog_compiler_static='$wl-static'
10928         ;;
10929       esac
10930       ;;
10931
10932     darwin* | rhapsody*)
10933       # PIC is the default on this platform
10934       # Common symbols not allowed in MH_DYLIB files
10935       lt_prog_compiler_pic='-fno-common'
10936       ;;
10937
10938     haiku*)
10939       # PIC is the default for Haiku.
10940       # The "-static" flag exists, but is broken.
10941       lt_prog_compiler_static=
10942       ;;
10943
10944     hpux*)
10945       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10946       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10947       # sets the default TLS model and affects inlining.
10948       case $host_cpu in
10949       hppa*64*)
10950         # +Z the default
10951         ;;
10952       *)
10953         lt_prog_compiler_pic='-fPIC'
10954         ;;
10955       esac
10956       ;;
10957
10958     interix[3-9]*)
10959       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10960       # Instead, we relocate shared libraries at runtime.
10961       ;;
10962
10963     msdosdjgpp*)
10964       # Just because we use GCC doesn't mean we suddenly get shared libraries
10965       # on systems that don't support them.
10966       lt_prog_compiler_can_build_shared=no
10967       enable_shared=no
10968       ;;
10969
10970     *nto* | *qnx*)
10971       # QNX uses GNU C++, but need to define -shared option too, otherwise
10972       # it will coredump.
10973       lt_prog_compiler_pic='-fPIC -shared'
10974       ;;
10975
10976     sysv4*MP*)
10977       if test -d /usr/nec; then
10978         lt_prog_compiler_pic=-Kconform_pic
10979       fi
10980       ;;
10981
10982     *)
10983       lt_prog_compiler_pic='-fPIC'
10984       ;;
10985     esac
10986
10987     case $cc_basename in
10988     nvcc*) # Cuda Compiler Driver 2.2
10989       lt_prog_compiler_wl='-Xlinker '
10990       if test -n "$lt_prog_compiler_pic"; then
10991         lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
10992       fi
10993       ;;
10994     esac
10995   else
10996     # PORTME Check for flag to pass linker flags through the system compiler.
10997     case $host_os in
10998     aix*)
10999       lt_prog_compiler_wl='-Wl,'
11000       if test ia64 = "$host_cpu"; then
11001         # AIX 5 now supports IA64 processor
11002         lt_prog_compiler_static='-Bstatic'
11003       else
11004         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
11005       fi
11006       ;;
11007
11008     darwin* | rhapsody*)
11009       # PIC is the default on this platform
11010       # Common symbols not allowed in MH_DYLIB files
11011       lt_prog_compiler_pic='-fno-common'
11012       case $cc_basename in
11013       nagfor*)
11014         # NAG Fortran compiler
11015         lt_prog_compiler_wl='-Wl,-Wl,,'
11016         lt_prog_compiler_pic='-PIC'
11017         lt_prog_compiler_static='-Bstatic'
11018         ;;
11019       esac
11020       ;;
11021
11022     mingw* | cygwin* | pw32* | os2* | cegcc*)
11023       # This hack is so that the source file can tell whether it is being
11024       # built for inclusion in a dll (and should export symbols for example).
11025       lt_prog_compiler_pic='-DDLL_EXPORT'
11026       case $host_os in
11027       os2*)
11028         lt_prog_compiler_static='$wl-static'
11029         ;;
11030       esac
11031       ;;
11032
11033     hpux9* | hpux10* | hpux11*)
11034       lt_prog_compiler_wl='-Wl,'
11035       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
11036       # not for PA HP-UX.
11037       case $host_cpu in
11038       hppa*64*|ia64*)
11039         # +Z the default
11040         ;;
11041       *)
11042         lt_prog_compiler_pic='+Z'
11043         ;;
11044       esac
11045       # Is there a better lt_prog_compiler_static that works with the bundled CC?
11046       lt_prog_compiler_static='$wl-a ${wl}archive'
11047       ;;
11048
11049     irix5* | irix6* | nonstopux*)
11050       lt_prog_compiler_wl='-Wl,'
11051       # PIC (with -KPIC) is the default.
11052       lt_prog_compiler_static='-non_shared'
11053       ;;
11054
11055     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11056       case $cc_basename in
11057       # old Intel for x86_64, which still supported -KPIC.
11058       ecc*)
11059         lt_prog_compiler_wl='-Wl,'
11060         lt_prog_compiler_pic='-KPIC'
11061         lt_prog_compiler_static='-static'
11062         ;;
11063       # icc used to be incompatible with GCC.
11064       # ICC 10 doesn't accept -KPIC any more.
11065       icc* | ifort*)
11066         lt_prog_compiler_wl='-Wl,'
11067         lt_prog_compiler_pic='-fPIC'
11068         lt_prog_compiler_static='-static'
11069         ;;
11070       # Lahey Fortran 8.1.
11071       lf95*)
11072         lt_prog_compiler_wl='-Wl,'
11073         lt_prog_compiler_pic='--shared'
11074         lt_prog_compiler_static='--static'
11075         ;;
11076       nagfor*)
11077         # NAG Fortran compiler
11078         lt_prog_compiler_wl='-Wl,-Wl,,'
11079         lt_prog_compiler_pic='-PIC'
11080         lt_prog_compiler_static='-Bstatic'
11081         ;;
11082       tcc*)
11083         # Fabrice Bellard et al's Tiny C Compiler
11084         lt_prog_compiler_wl='-Wl,'
11085         lt_prog_compiler_pic='-fPIC'
11086         lt_prog_compiler_static='-static'
11087         ;;
11088       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
11089         # Portland Group compilers (*not* the Pentium gcc compiler,
11090         # which looks to be a dead project)
11091         lt_prog_compiler_wl='-Wl,'
11092         lt_prog_compiler_pic='-fpic'
11093         lt_prog_compiler_static='-Bstatic'
11094         ;;
11095       ccc*)
11096         lt_prog_compiler_wl='-Wl,'
11097         # All Alpha code is PIC.
11098         lt_prog_compiler_static='-non_shared'
11099         ;;
11100       xl* | bgxl* | bgf* | mpixl*)
11101         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
11102         lt_prog_compiler_wl='-Wl,'
11103         lt_prog_compiler_pic='-qpic'
11104         lt_prog_compiler_static='-qstaticlink'
11105         ;;
11106       *)
11107         case `$CC -V 2>&1 | sed 5q` in
11108         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
11109           # Sun Fortran 8.3 passes all unrecognized flags to the linker
11110           lt_prog_compiler_pic='-KPIC'
11111           lt_prog_compiler_static='-Bstatic'
11112           lt_prog_compiler_wl=''
11113           ;;
11114         *Sun\ F* | *Sun*Fortran*)
11115           lt_prog_compiler_pic='-KPIC'
11116           lt_prog_compiler_static='-Bstatic'
11117           lt_prog_compiler_wl='-Qoption ld '
11118           ;;
11119         *Sun\ C*)
11120           # Sun C 5.9
11121           lt_prog_compiler_pic='-KPIC'
11122           lt_prog_compiler_static='-Bstatic'
11123           lt_prog_compiler_wl='-Wl,'
11124           ;;
11125         *Intel*\ [CF]*Compiler*)
11126           lt_prog_compiler_wl='-Wl,'
11127           lt_prog_compiler_pic='-fPIC'
11128           lt_prog_compiler_static='-static'
11129           ;;
11130         *Portland\ Group*)
11131           lt_prog_compiler_wl='-Wl,'
11132           lt_prog_compiler_pic='-fpic'
11133           lt_prog_compiler_static='-Bstatic'
11134           ;;
11135         esac
11136         ;;
11137       esac
11138       ;;
11139
11140     newsos6)
11141       lt_prog_compiler_pic='-KPIC'
11142       lt_prog_compiler_static='-Bstatic'
11143       ;;
11144
11145     *nto* | *qnx*)
11146       # QNX uses GNU C++, but need to define -shared option too, otherwise
11147       # it will coredump.
11148       lt_prog_compiler_pic='-fPIC -shared'
11149       ;;
11150
11151     osf3* | osf4* | osf5*)
11152       lt_prog_compiler_wl='-Wl,'
11153       # All OSF/1 code is PIC.
11154       lt_prog_compiler_static='-non_shared'
11155       ;;
11156
11157     rdos*)
11158       lt_prog_compiler_static='-non_shared'
11159       ;;
11160
11161     solaris*)
11162       lt_prog_compiler_pic='-KPIC'
11163       lt_prog_compiler_static='-Bstatic'
11164       case $cc_basename in
11165       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
11166         lt_prog_compiler_wl='-Qoption ld ';;
11167       *)
11168         lt_prog_compiler_wl='-Wl,';;
11169       esac
11170       ;;
11171
11172     sunos4*)
11173       lt_prog_compiler_wl='-Qoption ld '
11174       lt_prog_compiler_pic='-PIC'
11175       lt_prog_compiler_static='-Bstatic'
11176       ;;
11177
11178     sysv4 | sysv4.2uw2* | sysv4.3*)
11179       lt_prog_compiler_wl='-Wl,'
11180       lt_prog_compiler_pic='-KPIC'
11181       lt_prog_compiler_static='-Bstatic'
11182       ;;
11183
11184     sysv4*MP*)
11185       if test -d /usr/nec; then
11186         lt_prog_compiler_pic='-Kconform_pic'
11187         lt_prog_compiler_static='-Bstatic'
11188       fi
11189       ;;
11190
11191     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11192       lt_prog_compiler_wl='-Wl,'
11193       lt_prog_compiler_pic='-KPIC'
11194       lt_prog_compiler_static='-Bstatic'
11195       ;;
11196
11197     unicos*)
11198       lt_prog_compiler_wl='-Wl,'
11199       lt_prog_compiler_can_build_shared=no
11200       ;;
11201
11202     uts4*)
11203       lt_prog_compiler_pic='-pic'
11204       lt_prog_compiler_static='-Bstatic'
11205       ;;
11206
11207     *)
11208       lt_prog_compiler_can_build_shared=no
11209       ;;
11210     esac
11211   fi
11212
11213 case $host_os in
11214   # For platforms that do not support PIC, -DPIC is meaningless:
11215   *djgpp*)
11216     lt_prog_compiler_pic=
11217     ;;
11218   *)
11219     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11220     ;;
11221 esac
11222
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11224 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
11225 if ${lt_cv_prog_compiler_pic+:} false; then :
11226   $as_echo_n "(cached) " >&6
11227 else
11228   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11229 fi
11230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11231 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
11232 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11233
11234 #
11235 # Check to make sure the PIC flag actually works.
11236 #
11237 if test -n "$lt_prog_compiler_pic"; then
11238   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
11239 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
11240 if ${lt_cv_prog_compiler_pic_works+:} false; then :
11241   $as_echo_n "(cached) " >&6
11242 else
11243   lt_cv_prog_compiler_pic_works=no
11244    ac_outfile=conftest.$ac_objext
11245    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11246    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
11247    # Insert the option either (1) after the last *FLAGS variable, or
11248    # (2) before a word containing "conftest.", or (3) at the end.
11249    # Note that $ac_compile itself does not contain backslashes and begins
11250    # with a dollar sign (not a hyphen), so the echo should work correctly.
11251    # The option is referenced via a variable to avoid confusing sed.
11252    lt_compile=`echo "$ac_compile" | $SED \
11253    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11254    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11255    -e 's:$: $lt_compiler_flag:'`
11256    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11257    (eval "$lt_compile" 2>conftest.err)
11258    ac_status=$?
11259    cat conftest.err >&5
11260    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11261    if (exit $ac_status) && test -s "$ac_outfile"; then
11262      # The compiler can only warn and ignore the option if not recognized
11263      # So say no if there are warnings other than the usual output.
11264      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11265      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11266      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11267        lt_cv_prog_compiler_pic_works=yes
11268      fi
11269    fi
11270    $RM conftest*
11271
11272 fi
11273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
11274 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
11275
11276 if test yes = "$lt_cv_prog_compiler_pic_works"; then
11277     case $lt_prog_compiler_pic in
11278      "" | " "*) ;;
11279      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11280      esac
11281 else
11282     lt_prog_compiler_pic=
11283      lt_prog_compiler_can_build_shared=no
11284 fi
11285
11286 fi
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298 #
11299 # Check to make sure the static flag actually works.
11300 #
11301 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11303 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11304 if ${lt_cv_prog_compiler_static_works+:} false; then :
11305   $as_echo_n "(cached) " >&6
11306 else
11307   lt_cv_prog_compiler_static_works=no
11308    save_LDFLAGS=$LDFLAGS
11309    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11310    echo "$lt_simple_link_test_code" > conftest.$ac_ext
11311    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11312      # The linker can only warn and ignore the option if not recognized
11313      # So say no if there are warnings
11314      if test -s conftest.err; then
11315        # Append any errors to the config.log.
11316        cat conftest.err 1>&5
11317        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11318        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11319        if diff conftest.exp conftest.er2 >/dev/null; then
11320          lt_cv_prog_compiler_static_works=yes
11321        fi
11322      else
11323        lt_cv_prog_compiler_static_works=yes
11324      fi
11325    fi
11326    $RM -r conftest*
11327    LDFLAGS=$save_LDFLAGS
11328
11329 fi
11330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11331 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
11332
11333 if test yes = "$lt_cv_prog_compiler_static_works"; then
11334     :
11335 else
11336     lt_prog_compiler_static=
11337 fi
11338
11339
11340
11341
11342
11343
11344
11345   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11346 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11347 if ${lt_cv_prog_compiler_c_o+:} false; then :
11348   $as_echo_n "(cached) " >&6
11349 else
11350   lt_cv_prog_compiler_c_o=no
11351    $RM -r conftest 2>/dev/null
11352    mkdir conftest
11353    cd conftest
11354    mkdir out
11355    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11356
11357    lt_compiler_flag="-o out/conftest2.$ac_objext"
11358    # Insert the option either (1) after the last *FLAGS variable, or
11359    # (2) before a word containing "conftest.", or (3) at the end.
11360    # Note that $ac_compile itself does not contain backslashes and begins
11361    # with a dollar sign (not a hyphen), so the echo should work correctly.
11362    lt_compile=`echo "$ac_compile" | $SED \
11363    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11364    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11365    -e 's:$: $lt_compiler_flag:'`
11366    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11367    (eval "$lt_compile" 2>out/conftest.err)
11368    ac_status=$?
11369    cat out/conftest.err >&5
11370    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11371    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11372    then
11373      # The compiler can only warn and ignore the option if not recognized
11374      # So say no if there are warnings
11375      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11376      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11377      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11378        lt_cv_prog_compiler_c_o=yes
11379      fi
11380    fi
11381    chmod u+w . 2>&5
11382    $RM conftest*
11383    # SGI C++ compiler will create directory out/ii_files/ for
11384    # template instantiation
11385    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11386    $RM out/* && rmdir out
11387    cd ..
11388    $RM -r conftest
11389    $RM conftest*
11390
11391 fi
11392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11393 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11394
11395
11396
11397
11398
11399
11400   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11401 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11402 if ${lt_cv_prog_compiler_c_o+:} false; then :
11403   $as_echo_n "(cached) " >&6
11404 else
11405   lt_cv_prog_compiler_c_o=no
11406    $RM -r conftest 2>/dev/null
11407    mkdir conftest
11408    cd conftest
11409    mkdir out
11410    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11411
11412    lt_compiler_flag="-o out/conftest2.$ac_objext"
11413    # Insert the option either (1) after the last *FLAGS variable, or
11414    # (2) before a word containing "conftest.", or (3) at the end.
11415    # Note that $ac_compile itself does not contain backslashes and begins
11416    # with a dollar sign (not a hyphen), so the echo should work correctly.
11417    lt_compile=`echo "$ac_compile" | $SED \
11418    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11419    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11420    -e 's:$: $lt_compiler_flag:'`
11421    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11422    (eval "$lt_compile" 2>out/conftest.err)
11423    ac_status=$?
11424    cat out/conftest.err >&5
11425    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11426    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11427    then
11428      # The compiler can only warn and ignore the option if not recognized
11429      # So say no if there are warnings
11430      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11431      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11432      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11433        lt_cv_prog_compiler_c_o=yes
11434      fi
11435    fi
11436    chmod u+w . 2>&5
11437    $RM conftest*
11438    # SGI C++ compiler will create directory out/ii_files/ for
11439    # template instantiation
11440    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11441    $RM out/* && rmdir out
11442    cd ..
11443    $RM -r conftest
11444    $RM conftest*
11445
11446 fi
11447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11448 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11449
11450
11451
11452
11453 hard_links=nottested
11454 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11455   # do not overwrite the value of need_locks provided by the user
11456   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11457 $as_echo_n "checking if we can lock with hard links... " >&6; }
11458   hard_links=yes
11459   $RM conftest*
11460   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11461   touch conftest.a
11462   ln conftest.a conftest.b 2>&5 || hard_links=no
11463   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11465 $as_echo "$hard_links" >&6; }
11466   if test no = "$hard_links"; then
11467     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11468 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11469     need_locks=warn
11470   fi
11471 else
11472   need_locks=no
11473 fi
11474
11475
11476
11477
11478
11479
11480   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11481 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11482
11483   runpath_var=
11484   allow_undefined_flag=
11485   always_export_symbols=no
11486   archive_cmds=
11487   archive_expsym_cmds=
11488   compiler_needs_object=no
11489   enable_shared_with_static_runtimes=no
11490   export_dynamic_flag_spec=
11491   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11492   hardcode_automatic=no
11493   hardcode_direct=no
11494   hardcode_direct_absolute=no
11495   hardcode_libdir_flag_spec=
11496   hardcode_libdir_separator=
11497   hardcode_minus_L=no
11498   hardcode_shlibpath_var=unsupported
11499   inherit_rpath=no
11500   link_all_deplibs=unknown
11501   module_cmds=
11502   module_expsym_cmds=
11503   old_archive_from_new_cmds=
11504   old_archive_from_expsyms_cmds=
11505   thread_safe_flag_spec=
11506   whole_archive_flag_spec=
11507   # include_expsyms should be a list of space-separated symbols to be *always*
11508   # included in the symbol list
11509   include_expsyms=
11510   # exclude_expsyms can be an extended regexp of symbols to exclude
11511   # it will be wrapped by ' (' and ')$', so one must not match beginning or
11512   # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11513   # as well as any symbol that contains 'd'.
11514   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11515   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11516   # platforms (ab)use it in PIC code, but their linkers get confused if
11517   # the symbol is explicitly referenced.  Since portable code cannot
11518   # rely on this symbol name, it's probably fine to never include it in
11519   # preloaded symbol tables.
11520   # Exclude shared library initialization/finalization symbols.
11521   extract_expsyms_cmds=
11522
11523   case $host_os in
11524   cygwin* | mingw* | pw32* | cegcc*)
11525     # FIXME: the MSVC++ port hasn't been tested in a loooong time
11526     # When not using gcc, we currently assume that we are using
11527     # Microsoft Visual C++.
11528     if test yes != "$GCC"; then
11529       with_gnu_ld=no
11530     fi
11531     ;;
11532   interix*)
11533     # we just hope/assume this is gcc and not c89 (= MSVC++)
11534     with_gnu_ld=yes
11535     ;;
11536   openbsd* | bitrig*)
11537     with_gnu_ld=no
11538     ;;
11539   esac
11540
11541   ld_shlibs=yes
11542
11543   # On some targets, GNU ld is compatible enough with the native linker
11544   # that we're better off using the native interface for both.
11545   lt_use_gnu_ld_interface=no
11546   if test yes = "$with_gnu_ld"; then
11547     case $host_os in
11548       aix*)
11549         # The AIX port of GNU ld has always aspired to compatibility
11550         # with the native linker.  However, as the warning in the GNU ld
11551         # block says, versions before 2.19.5* couldn't really create working
11552         # shared libraries, regardless of the interface used.
11553         case `$LD -v 2>&1` in
11554           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11555           *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11556           *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11557           *)
11558             lt_use_gnu_ld_interface=yes
11559             ;;
11560         esac
11561         ;;
11562       *)
11563         lt_use_gnu_ld_interface=yes
11564         ;;
11565     esac
11566   fi
11567
11568   if test yes = "$lt_use_gnu_ld_interface"; then
11569     # If archive_cmds runs LD, not CC, wlarc should be empty
11570     wlarc='$wl'
11571
11572     # Set some defaults for GNU ld with shared library support. These
11573     # are reset later if shared libraries are not supported. Putting them
11574     # here allows them to be overridden if necessary.
11575     runpath_var=LD_RUN_PATH
11576     hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11577     export_dynamic_flag_spec='$wl--export-dynamic'
11578     # ancient GNU ld didn't support --whole-archive et. al.
11579     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11580       whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11581     else
11582       whole_archive_flag_spec=
11583     fi
11584     supports_anon_versioning=no
11585     case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11586       *GNU\ gold*) supports_anon_versioning=yes ;;
11587       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11588       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11589       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11590       *\ 2.11.*) ;; # other 2.11 versions
11591       *) supports_anon_versioning=yes ;;
11592     esac
11593
11594     # See if GNU ld supports shared libraries.
11595     case $host_os in
11596     aix[3-9]*)
11597       # On AIX/PPC, the GNU linker is very broken
11598       if test ia64 != "$host_cpu"; then
11599         ld_shlibs=no
11600         cat <<_LT_EOF 1>&2
11601
11602 *** Warning: the GNU linker, at least up to release 2.19, is reported
11603 *** to be unable to reliably create shared libraries on AIX.
11604 *** Therefore, libtool is disabling shared libraries support.  If you
11605 *** really care for shared libraries, you may want to install binutils
11606 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11607 *** You will then need to restart the configuration process.
11608
11609 _LT_EOF
11610       fi
11611       ;;
11612
11613     amigaos*)
11614       case $host_cpu in
11615       powerpc)
11616             # see comment about AmigaOS4 .so support
11617             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11618             archive_expsym_cmds=''
11619         ;;
11620       m68k)
11621             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)'
11622             hardcode_libdir_flag_spec='-L$libdir'
11623             hardcode_minus_L=yes
11624         ;;
11625       esac
11626       ;;
11627
11628     beos*)
11629       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11630         allow_undefined_flag=unsupported
11631         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11632         # support --undefined.  This deserves some investigation.  FIXME
11633         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11634       else
11635         ld_shlibs=no
11636       fi
11637       ;;
11638
11639     cygwin* | mingw* | pw32* | cegcc*)
11640       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11641       # as there is no search path for DLLs.
11642       hardcode_libdir_flag_spec='-L$libdir'
11643       export_dynamic_flag_spec='$wl--export-all-symbols'
11644       allow_undefined_flag=unsupported
11645       always_export_symbols=no
11646       enable_shared_with_static_runtimes=yes
11647       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'
11648       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11649
11650       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11651         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11652         # If the export-symbols file already is a .def file, use it as
11653         # is; otherwise, prepend EXPORTS...
11654         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11655           cp $export_symbols $output_objdir/$soname.def;
11656         else
11657           echo EXPORTS > $output_objdir/$soname.def;
11658           cat $export_symbols >> $output_objdir/$soname.def;
11659         fi~
11660         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11661       else
11662         ld_shlibs=no
11663       fi
11664       ;;
11665
11666     haiku*)
11667       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11668       link_all_deplibs=yes
11669       ;;
11670
11671     os2*)
11672       hardcode_libdir_flag_spec='-L$libdir'
11673       hardcode_minus_L=yes
11674       allow_undefined_flag=unsupported
11675       shrext_cmds=.dll
11676       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11677         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11678         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11679         $ECHO EXPORTS >> $output_objdir/$libname.def~
11680         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11681         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11682         emximp -o $lib $output_objdir/$libname.def'
11683       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11684         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11685         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11686         $ECHO EXPORTS >> $output_objdir/$libname.def~
11687         prefix_cmds="$SED"~
11688         if test EXPORTS = "`$SED 1q $export_symbols`"; then
11689           prefix_cmds="$prefix_cmds -e 1d";
11690         fi~
11691         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11692         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11693         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11694         emximp -o $lib $output_objdir/$libname.def'
11695       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11696       enable_shared_with_static_runtimes=yes
11697       ;;
11698
11699     interix[3-9]*)
11700       hardcode_direct=no
11701       hardcode_shlibpath_var=no
11702       hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11703       export_dynamic_flag_spec='$wl-E'
11704       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11705       # Instead, shared libraries are loaded at an image base (0x10000000 by
11706       # default) and relocated if they conflict, which is a slow very memory
11707       # consuming and fragmenting process.  To avoid this, we pick a random,
11708       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11709       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11710       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11711       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'
11712       ;;
11713
11714     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11715       tmp_diet=no
11716       if test linux-dietlibc = "$host_os"; then
11717         case $cc_basename in
11718           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
11719         esac
11720       fi
11721       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11722          && test no = "$tmp_diet"
11723       then
11724         tmp_addflag=' $pic_flag'
11725         tmp_sharedflag='-shared'
11726         case $cc_basename,$host_cpu in
11727         pgcc*)                          # Portland Group C compiler
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'
11730           ;;
11731         pgf77* | pgf90* | pgf95* | pgfortran*)
11732                                         # Portland Group f77 and f90 compilers
11733           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'
11734           tmp_addflag=' $pic_flag -Mnomain' ;;
11735         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
11736           tmp_addflag=' -i_dynamic' ;;
11737         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
11738           tmp_addflag=' -i_dynamic -nofor_main' ;;
11739         ifc* | ifort*)                  # Intel Fortran compiler
11740           tmp_addflag=' -nofor_main' ;;
11741         lf95*)                          # Lahey Fortran 8.1
11742           whole_archive_flag_spec=
11743           tmp_sharedflag='--shared' ;;
11744         nagfor*)                        # NAGFOR 5.3
11745           tmp_sharedflag='-Wl,-shared' ;;
11746         xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11747           tmp_sharedflag='-qmkshrobj'
11748           tmp_addflag= ;;
11749         nvcc*)  # Cuda Compiler Driver 2.2
11750           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'
11751           compiler_needs_object=yes
11752           ;;
11753         esac
11754         case `$CC -V 2>&1 | sed 5q` in
11755         *Sun\ C*)                       # Sun C 5.9
11756           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'
11757           compiler_needs_object=yes
11758           tmp_sharedflag='-G' ;;
11759         *Sun\ F*)                       # Sun Fortran 8.3
11760           tmp_sharedflag='-G' ;;
11761         esac
11762         archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11763
11764         if test yes = "$supports_anon_versioning"; then
11765           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11766             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11767             echo "local: *; };" >> $output_objdir/$libname.ver~
11768             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11769         fi
11770
11771         case $cc_basename in
11772         tcc*)
11773           export_dynamic_flag_spec='-rdynamic'
11774           ;;
11775         xlf* | bgf* | bgxlf* | mpixlf*)
11776           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11777           whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11778           hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11779           archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11780           if test yes = "$supports_anon_versioning"; then
11781             archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11782               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11783               echo "local: *; };" >> $output_objdir/$libname.ver~
11784               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11785           fi
11786           ;;
11787         esac
11788       else
11789         ld_shlibs=no
11790       fi
11791       ;;
11792
11793     netbsd*)
11794       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11795         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11796         wlarc=
11797       else
11798         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11799         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11800       fi
11801       ;;
11802
11803     solaris*)
11804       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11805         ld_shlibs=no
11806         cat <<_LT_EOF 1>&2
11807
11808 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
11809 *** create shared libraries on Solaris systems.  Therefore, libtool
11810 *** is disabling shared libraries support.  We urge you to upgrade GNU
11811 *** binutils to release 2.9.1 or newer.  Another option is to modify
11812 *** your PATH or compiler configuration so that the native linker is
11813 *** used, and then restart.
11814
11815 _LT_EOF
11816       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11817         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11818         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11819       else
11820         ld_shlibs=no
11821       fi
11822       ;;
11823
11824     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11825       case `$LD -v 2>&1` in
11826         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11827         ld_shlibs=no
11828         cat <<_LT_EOF 1>&2
11829
11830 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11831 *** reliably create shared libraries on SCO systems.  Therefore, libtool
11832 *** is disabling shared libraries support.  We urge you to upgrade GNU
11833 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11834 *** your PATH or compiler configuration so that the native linker is
11835 *** used, and then restart.
11836
11837 _LT_EOF
11838         ;;
11839         *)
11840           # For security reasons, it is highly recommended that you always
11841           # use absolute paths for naming shared libraries, and exclude the
11842           # DT_RUNPATH tag from executables and libraries.  But doing so
11843           # requires that you compile everything twice, which is a pain.
11844           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11845             hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11846             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11847             archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11848           else
11849             ld_shlibs=no
11850           fi
11851         ;;
11852       esac
11853       ;;
11854
11855     sunos4*)
11856       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11857       wlarc=
11858       hardcode_direct=yes
11859       hardcode_shlibpath_var=no
11860       ;;
11861
11862     *)
11863       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11864         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11865         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11866       else
11867         ld_shlibs=no
11868       fi
11869       ;;
11870     esac
11871
11872     if test no = "$ld_shlibs"; then
11873       runpath_var=
11874       hardcode_libdir_flag_spec=
11875       export_dynamic_flag_spec=
11876       whole_archive_flag_spec=
11877     fi
11878   else
11879     # PORTME fill in a description of your system's linker (not GNU ld)
11880     case $host_os in
11881     aix3*)
11882       allow_undefined_flag=unsupported
11883       always_export_symbols=yes
11884       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'
11885       # Note: this linker hardcodes the directories in LIBPATH if there
11886       # are no directories specified by -L.
11887       hardcode_minus_L=yes
11888       if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11889         # Neither direct hardcoding nor static linking is supported with a
11890         # broken collect2.
11891         hardcode_direct=unsupported
11892       fi
11893       ;;
11894
11895     aix[4-9]*)
11896       if test ia64 = "$host_cpu"; then
11897         # On IA64, the linker does run time linking by default, so we don't
11898         # have to do anything special.
11899         aix_use_runtimelinking=no
11900         exp_sym_flag='-Bexport'
11901         no_entry_flag=
11902       else
11903         # If we're using GNU nm, then we don't want the "-C" option.
11904         # -C means demangle to GNU nm, but means don't demangle to AIX nm.
11905         # Without the "-l" option, or with the "-B" option, AIX nm treats
11906         # weak defined symbols like other global defined symbols, whereas
11907         # GNU nm marks them as "W".
11908         # While the 'weak' keyword is ignored in the Export File, we need
11909         # it in the Import File for the 'aix-soname' feature, so we have
11910         # to replace the "-B" option with "-P" for AIX nm.
11911         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11912           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'
11913         else
11914           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'
11915         fi
11916         aix_use_runtimelinking=no
11917
11918         # Test if we are trying to use run time linking or normal
11919         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
11920         # have runtime linking enabled, and use it for executables.
11921         # For shared libraries, we enable/disable runtime linking
11922         # depending on the kind of the shared library created -
11923         # when "with_aix_soname,aix_use_runtimelinking" is:
11924         # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
11925         # "aix,yes"  lib.so          shared, rtl:yes, for executables
11926         #            lib.a           static archive
11927         # "both,no"  lib.so.V(shr.o) shared, rtl:yes
11928         #            lib.a(lib.so.V) shared, rtl:no,  for executables
11929         # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11930         #            lib.a(lib.so.V) shared, rtl:no
11931         # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
11932         #            lib.a           static archive
11933         case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11934           for ld_flag in $LDFLAGS; do
11935           if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11936             aix_use_runtimelinking=yes
11937             break
11938           fi
11939           done
11940           if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11941             # With aix-soname=svr4, we create the lib.so.V shared archives only,
11942             # so we don't have lib.a shared libs to link our executables.
11943             # We have to force runtime linking in this case.
11944             aix_use_runtimelinking=yes
11945             LDFLAGS="$LDFLAGS -Wl,-brtl"
11946           fi
11947           ;;
11948         esac
11949
11950         exp_sym_flag='-bexport'
11951         no_entry_flag='-bnoentry'
11952       fi
11953
11954       # When large executables or shared objects are built, AIX ld can
11955       # have problems creating the table of contents.  If linking a library
11956       # or program results in "error TOC overflow" add -mminimal-toc to
11957       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11958       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11959
11960       archive_cmds=''
11961       hardcode_direct=yes
11962       hardcode_direct_absolute=yes
11963       hardcode_libdir_separator=':'
11964       link_all_deplibs=yes
11965       file_list_spec='$wl-f,'
11966       case $with_aix_soname,$aix_use_runtimelinking in
11967       aix,*) ;; # traditional, no import file
11968       svr4,* | *,yes) # use import file
11969         # The Import File defines what to hardcode.
11970         hardcode_direct=no
11971         hardcode_direct_absolute=no
11972         ;;
11973       esac
11974
11975       if test yes = "$GCC"; then
11976         case $host_os in aix4.[012]|aix4.[012].*)
11977         # We only want to do this on AIX 4.2 and lower, the check
11978         # below for broken collect2 doesn't work under 4.3+
11979           collect2name=`$CC -print-prog-name=collect2`
11980           if test -f "$collect2name" &&
11981            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
11982           then
11983           # We have reworked collect2
11984           :
11985           else
11986           # We have old collect2
11987           hardcode_direct=unsupported
11988           # It fails to find uninstalled libraries when the uninstalled
11989           # path is not listed in the libpath.  Setting hardcode_minus_L
11990           # to unsupported forces relinking
11991           hardcode_minus_L=yes
11992           hardcode_libdir_flag_spec='-L$libdir'
11993           hardcode_libdir_separator=
11994           fi
11995           ;;
11996         esac
11997         shared_flag='-shared'
11998         if test yes = "$aix_use_runtimelinking"; then
11999           shared_flag="$shared_flag "'$wl-G'
12000         fi
12001         # Need to ensure runtime linking is disabled for the traditional
12002         # shared library, or the linker may eventually find shared libraries
12003         # /with/ Import File - we do not want to mix them.
12004         shared_flag_aix='-shared'
12005         shared_flag_svr4='-shared $wl-G'
12006       else
12007         # not using gcc
12008         if test ia64 = "$host_cpu"; then
12009         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
12010         # chokes on -Wl,-G. The following line is correct:
12011           shared_flag='-G'
12012         else
12013           if test yes = "$aix_use_runtimelinking"; then
12014             shared_flag='$wl-G'
12015           else
12016             shared_flag='$wl-bM:SRE'
12017           fi
12018           shared_flag_aix='$wl-bM:SRE'
12019           shared_flag_svr4='$wl-G'
12020         fi
12021       fi
12022
12023       export_dynamic_flag_spec='$wl-bexpall'
12024       # It seems that -bexpall does not export symbols beginning with
12025       # underscore (_), so it is better to generate a list of symbols to export.
12026       always_export_symbols=yes
12027       if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
12028         # Warning - without using the other runtime loading flags (-brtl),
12029         # -berok will link without error, but may produce a broken library.
12030         allow_undefined_flag='-berok'
12031         # Determine the default libpath from the value encoded in an
12032         # empty executable.
12033         if test set = "${lt_cv_aix_libpath+set}"; then
12034   aix_libpath=$lt_cv_aix_libpath
12035 else
12036   if ${lt_cv_aix_libpath_+:} false; then :
12037   $as_echo_n "(cached) " >&6
12038 else
12039   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12040 /* end confdefs.h.  */
12041
12042 int
12043 main ()
12044 {
12045
12046   ;
12047   return 0;
12048 }
12049 _ACEOF
12050 if ac_fn_c_try_link "$LINENO"; then :
12051
12052   lt_aix_libpath_sed='
12053       /Import File Strings/,/^$/ {
12054           /^0/ {
12055               s/^0  *\([^ ]*\) *$/\1/
12056               p
12057           }
12058       }'
12059   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12060   # Check for a 64-bit object if we didn't find anything.
12061   if test -z "$lt_cv_aix_libpath_"; then
12062     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12063   fi
12064 fi
12065 rm -f core conftest.err conftest.$ac_objext \
12066     conftest$ac_exeext conftest.$ac_ext
12067   if test -z "$lt_cv_aix_libpath_"; then
12068     lt_cv_aix_libpath_=/usr/lib:/lib
12069   fi
12070
12071 fi
12072
12073   aix_libpath=$lt_cv_aix_libpath_
12074 fi
12075
12076         hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12077         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
12078       else
12079         if test ia64 = "$host_cpu"; then
12080           hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
12081           allow_undefined_flag="-z nodefs"
12082           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"
12083         else
12084          # Determine the default libpath from the value encoded in an
12085          # empty executable.
12086          if test set = "${lt_cv_aix_libpath+set}"; then
12087   aix_libpath=$lt_cv_aix_libpath
12088 else
12089   if ${lt_cv_aix_libpath_+:} false; then :
12090   $as_echo_n "(cached) " >&6
12091 else
12092   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12093 /* end confdefs.h.  */
12094
12095 int
12096 main ()
12097 {
12098
12099   ;
12100   return 0;
12101 }
12102 _ACEOF
12103 if ac_fn_c_try_link "$LINENO"; then :
12104
12105   lt_aix_libpath_sed='
12106       /Import File Strings/,/^$/ {
12107           /^0/ {
12108               s/^0  *\([^ ]*\) *$/\1/
12109               p
12110           }
12111       }'
12112   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12113   # Check for a 64-bit object if we didn't find anything.
12114   if test -z "$lt_cv_aix_libpath_"; then
12115     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12116   fi
12117 fi
12118 rm -f core conftest.err conftest.$ac_objext \
12119     conftest$ac_exeext conftest.$ac_ext
12120   if test -z "$lt_cv_aix_libpath_"; then
12121     lt_cv_aix_libpath_=/usr/lib:/lib
12122   fi
12123
12124 fi
12125
12126   aix_libpath=$lt_cv_aix_libpath_
12127 fi
12128
12129          hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12130           # Warning - without using the other run time loading flags,
12131           # -berok will link without error, but may produce a broken library.
12132           no_undefined_flag=' $wl-bernotok'
12133           allow_undefined_flag=' $wl-berok'
12134           if test yes = "$with_gnu_ld"; then
12135             # We only use this code for GNU lds that support --whole-archive.
12136             whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
12137           else
12138             # Exported symbols can be pulled into shared objects from archives
12139             whole_archive_flag_spec='$convenience'
12140           fi
12141           archive_cmds_need_lc=yes
12142           archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
12143           # -brtl affects multiple linker settings, -berok does not and is overridden later
12144           compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
12145           if test svr4 != "$with_aix_soname"; then
12146             # This is similar to how AIX traditionally builds its shared libraries.
12147             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'
12148           fi
12149           if test aix != "$with_aix_soname"; then
12150             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'
12151           else
12152             # used by -dlpreopen to get the symbols
12153             archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
12154           fi
12155           archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
12156         fi
12157       fi
12158       ;;
12159
12160     amigaos*)
12161       case $host_cpu in
12162       powerpc)
12163             # see comment about AmigaOS4 .so support
12164             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12165             archive_expsym_cmds=''
12166         ;;
12167       m68k)
12168             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)'
12169             hardcode_libdir_flag_spec='-L$libdir'
12170             hardcode_minus_L=yes
12171         ;;
12172       esac
12173       ;;
12174
12175     bsdi[45]*)
12176       export_dynamic_flag_spec=-rdynamic
12177       ;;
12178
12179     cygwin* | mingw* | pw32* | cegcc*)
12180       # When not using gcc, we currently assume that we are using
12181       # Microsoft Visual C++.
12182       # hardcode_libdir_flag_spec is actually meaningless, as there is
12183       # no search path for DLLs.
12184       case $cc_basename in
12185       cl*)
12186         # Native MSVC
12187         hardcode_libdir_flag_spec=' '
12188         allow_undefined_flag=unsupported
12189         always_export_symbols=yes
12190         file_list_spec='@'
12191         # Tell ltmain to make .lib files, not .a files.
12192         libext=lib
12193         # Tell ltmain to make .dll files, not .so files.
12194         shrext_cmds=.dll
12195         # FIXME: Setting linknames here is a bad hack.
12196         archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
12197         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12198             cp "$export_symbols" "$output_objdir/$soname.def";
12199             echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
12200           else
12201             $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
12202           fi~
12203           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12204           linknames='
12205         # The linker will not automatically build a static lib if we build a DLL.
12206         # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12207         enable_shared_with_static_runtimes=yes
12208         exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
12209         export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12210         # Don't use ranlib
12211         old_postinstall_cmds='chmod 644 $oldlib'
12212         postlink_cmds='lt_outputfile="@OUTPUT@"~
12213           lt_tool_outputfile="@TOOL_OUTPUT@"~
12214           case $lt_outputfile in
12215             *.exe|*.EXE) ;;
12216             *)
12217               lt_outputfile=$lt_outputfile.exe
12218               lt_tool_outputfile=$lt_tool_outputfile.exe
12219               ;;
12220           esac~
12221           if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
12222             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12223             $RM "$lt_outputfile.manifest";
12224           fi'
12225         ;;
12226       *)
12227         # Assume MSVC wrapper
12228         hardcode_libdir_flag_spec=' '
12229         allow_undefined_flag=unsupported
12230         # Tell ltmain to make .lib files, not .a files.
12231         libext=lib
12232         # Tell ltmain to make .dll files, not .so files.
12233         shrext_cmds=.dll
12234         # FIXME: Setting linknames here is a bad hack.
12235         archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12236         # The linker will automatically build a .lib file if we build a DLL.
12237         old_archive_from_new_cmds='true'
12238         # FIXME: Should let the user specify the lib program.
12239         old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12240         enable_shared_with_static_runtimes=yes
12241         ;;
12242       esac
12243       ;;
12244
12245     darwin* | rhapsody*)
12246
12247
12248   archive_cmds_need_lc=no
12249   hardcode_direct=no
12250   hardcode_automatic=yes
12251   hardcode_shlibpath_var=unsupported
12252   if test yes = "$lt_cv_ld_force_load"; then
12253     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\"`'
12254
12255   else
12256     whole_archive_flag_spec=''
12257   fi
12258   link_all_deplibs=yes
12259   allow_undefined_flag=$_lt_dar_allow_undefined
12260   case $cc_basename in
12261      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
12262      *) _lt_dar_can_shared=$GCC ;;
12263   esac
12264   if test yes = "$_lt_dar_can_shared"; then
12265     output_verbose_link_cmd=func_echo_all
12266     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
12267     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
12268     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"
12269     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"
12270
12271   else
12272   ld_shlibs=no
12273   fi
12274
12275       ;;
12276
12277     dgux*)
12278       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12279       hardcode_libdir_flag_spec='-L$libdir'
12280       hardcode_shlibpath_var=no
12281       ;;
12282
12283     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12284     # support.  Future versions do this automatically, but an explicit c++rt0.o
12285     # does not break anything, and helps significantly (at the cost of a little
12286     # extra space).
12287     freebsd2.2*)
12288       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12289       hardcode_libdir_flag_spec='-R$libdir'
12290       hardcode_direct=yes
12291       hardcode_shlibpath_var=no
12292       ;;
12293
12294     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12295     freebsd2.*)
12296       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12297       hardcode_direct=yes
12298       hardcode_minus_L=yes
12299       hardcode_shlibpath_var=no
12300       ;;
12301
12302     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12303     freebsd* | dragonfly*)
12304       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12305       hardcode_libdir_flag_spec='-R$libdir'
12306       hardcode_direct=yes
12307       hardcode_shlibpath_var=no
12308       ;;
12309
12310     hpux9*)
12311       if test yes = "$GCC"; then
12312         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'
12313       else
12314         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'
12315       fi
12316       hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12317       hardcode_libdir_separator=:
12318       hardcode_direct=yes
12319
12320       # hardcode_minus_L: Not really in the search PATH,
12321       # but as the default location of the library.
12322       hardcode_minus_L=yes
12323       export_dynamic_flag_spec='$wl-E'
12324       ;;
12325
12326     hpux10*)
12327       if test yes,no = "$GCC,$with_gnu_ld"; then
12328         archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12329       else
12330         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12331       fi
12332       if test no = "$with_gnu_ld"; then
12333         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12334         hardcode_libdir_separator=:
12335         hardcode_direct=yes
12336         hardcode_direct_absolute=yes
12337         export_dynamic_flag_spec='$wl-E'
12338         # hardcode_minus_L: Not really in the search PATH,
12339         # but as the default location of the library.
12340         hardcode_minus_L=yes
12341       fi
12342       ;;
12343
12344     hpux11*)
12345       if test yes,no = "$GCC,$with_gnu_ld"; then
12346         case $host_cpu in
12347         hppa*64*)
12348           archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12349           ;;
12350         ia64*)
12351           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12352           ;;
12353         *)
12354           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12355           ;;
12356         esac
12357       else
12358         case $host_cpu in
12359         hppa*64*)
12360           archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12361           ;;
12362         ia64*)
12363           archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12364           ;;
12365         *)
12366
12367           # Older versions of the 11.00 compiler do not understand -b yet
12368           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12369           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12370 $as_echo_n "checking if $CC understands -b... " >&6; }
12371 if ${lt_cv_prog_compiler__b+:} false; then :
12372   $as_echo_n "(cached) " >&6
12373 else
12374   lt_cv_prog_compiler__b=no
12375    save_LDFLAGS=$LDFLAGS
12376    LDFLAGS="$LDFLAGS -b"
12377    echo "$lt_simple_link_test_code" > conftest.$ac_ext
12378    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12379      # The linker can only warn and ignore the option if not recognized
12380      # So say no if there are warnings
12381      if test -s conftest.err; then
12382        # Append any errors to the config.log.
12383        cat conftest.err 1>&5
12384        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12385        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12386        if diff conftest.exp conftest.er2 >/dev/null; then
12387          lt_cv_prog_compiler__b=yes
12388        fi
12389      else
12390        lt_cv_prog_compiler__b=yes
12391      fi
12392    fi
12393    $RM -r conftest*
12394    LDFLAGS=$save_LDFLAGS
12395
12396 fi
12397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12398 $as_echo "$lt_cv_prog_compiler__b" >&6; }
12399
12400 if test yes = "$lt_cv_prog_compiler__b"; then
12401     archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12402 else
12403     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12404 fi
12405
12406           ;;
12407         esac
12408       fi
12409       if test no = "$with_gnu_ld"; then
12410         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12411         hardcode_libdir_separator=:
12412
12413         case $host_cpu in
12414         hppa*64*|ia64*)
12415           hardcode_direct=no
12416           hardcode_shlibpath_var=no
12417           ;;
12418         *)
12419           hardcode_direct=yes
12420           hardcode_direct_absolute=yes
12421           export_dynamic_flag_spec='$wl-E'
12422
12423           # hardcode_minus_L: Not really in the search PATH,
12424           # but as the default location of the library.
12425           hardcode_minus_L=yes
12426           ;;
12427         esac
12428       fi
12429       ;;
12430
12431     irix5* | irix6* | nonstopux*)
12432       if test yes = "$GCC"; then
12433         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'
12434         # Try to use the -exported_symbol ld option, if it does not
12435         # work, assume that -exports_file does not work either and
12436         # implicitly export all symbols.
12437         # This should be the same for all languages, so no per-tag cache variable.
12438         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12439 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12440 if ${lt_cv_irix_exported_symbol+:} false; then :
12441   $as_echo_n "(cached) " >&6
12442 else
12443   save_LDFLAGS=$LDFLAGS
12444            LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12445            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12446 /* end confdefs.h.  */
12447 int foo (void) { return 0; }
12448 _ACEOF
12449 if ac_fn_c_try_link "$LINENO"; then :
12450   lt_cv_irix_exported_symbol=yes
12451 else
12452   lt_cv_irix_exported_symbol=no
12453 fi
12454 rm -f core conftest.err conftest.$ac_objext \
12455     conftest$ac_exeext conftest.$ac_ext
12456            LDFLAGS=$save_LDFLAGS
12457 fi
12458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12459 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
12460         if test yes = "$lt_cv_irix_exported_symbol"; then
12461           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'
12462         fi
12463       else
12464         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'
12465         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'
12466       fi
12467       archive_cmds_need_lc='no'
12468       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12469       hardcode_libdir_separator=:
12470       inherit_rpath=yes
12471       link_all_deplibs=yes
12472       ;;
12473
12474     linux*)
12475       case $cc_basename in
12476       tcc*)
12477         # Fabrice Bellard et al's Tiny C Compiler
12478         ld_shlibs=yes
12479         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12480         ;;
12481       esac
12482       ;;
12483
12484     netbsd*)
12485       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12486         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12487       else
12488         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12489       fi
12490       hardcode_libdir_flag_spec='-R$libdir'
12491       hardcode_direct=yes
12492       hardcode_shlibpath_var=no
12493       ;;
12494
12495     newsos6)
12496       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12497       hardcode_direct=yes
12498       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12499       hardcode_libdir_separator=:
12500       hardcode_shlibpath_var=no
12501       ;;
12502
12503     *nto* | *qnx*)
12504       ;;
12505
12506     openbsd* | bitrig*)
12507       if test -f /usr/libexec/ld.so; then
12508         hardcode_direct=yes
12509         hardcode_shlibpath_var=no
12510         hardcode_direct_absolute=yes
12511         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12512           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12513           archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12514           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12515           export_dynamic_flag_spec='$wl-E'
12516         else
12517           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12518           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12519         fi
12520       else
12521         ld_shlibs=no
12522       fi
12523       ;;
12524
12525     os2*)
12526       hardcode_libdir_flag_spec='-L$libdir'
12527       hardcode_minus_L=yes
12528       allow_undefined_flag=unsupported
12529       shrext_cmds=.dll
12530       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12531         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12532         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12533         $ECHO EXPORTS >> $output_objdir/$libname.def~
12534         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12535         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12536         emximp -o $lib $output_objdir/$libname.def'
12537       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12538         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12539         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12540         $ECHO EXPORTS >> $output_objdir/$libname.def~
12541         prefix_cmds="$SED"~
12542         if test EXPORTS = "`$SED 1q $export_symbols`"; then
12543           prefix_cmds="$prefix_cmds -e 1d";
12544         fi~
12545         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12546         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12547         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12548         emximp -o $lib $output_objdir/$libname.def'
12549       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12550       enable_shared_with_static_runtimes=yes
12551       ;;
12552
12553     osf3*)
12554       if test yes = "$GCC"; then
12555         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12556         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'
12557       else
12558         allow_undefined_flag=' -expect_unresolved \*'
12559         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'
12560       fi
12561       archive_cmds_need_lc='no'
12562       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12563       hardcode_libdir_separator=:
12564       ;;
12565
12566     osf4* | osf5*)      # as osf3* with the addition of -msym flag
12567       if test yes = "$GCC"; then
12568         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12569         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'
12570         hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12571       else
12572         allow_undefined_flag=' -expect_unresolved \*'
12573         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'
12574         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~
12575           $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'
12576
12577         # Both c and cxx compiler support -rpath directly
12578         hardcode_libdir_flag_spec='-rpath $libdir'
12579       fi
12580       archive_cmds_need_lc='no'
12581       hardcode_libdir_separator=:
12582       ;;
12583
12584     solaris*)
12585       no_undefined_flag=' -z defs'
12586       if test yes = "$GCC"; then
12587         wlarc='$wl'
12588         archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12589         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12590           $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'
12591       else
12592         case `$CC -V 2>&1` in
12593         *"Compilers 5.0"*)
12594           wlarc=''
12595           archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12596           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12597             $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12598           ;;
12599         *)
12600           wlarc='$wl'
12601           archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12602           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12603             $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12604           ;;
12605         esac
12606       fi
12607       hardcode_libdir_flag_spec='-R$libdir'
12608       hardcode_shlibpath_var=no
12609       case $host_os in
12610       solaris2.[0-5] | solaris2.[0-5].*) ;;
12611       *)
12612         # The compiler driver will combine and reorder linker options,
12613         # but understands '-z linker_flag'.  GCC discards it without '$wl',
12614         # but is careful enough not to reorder.
12615         # Supported since Solaris 2.6 (maybe 2.5.1?)
12616         if test yes = "$GCC"; then
12617           whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12618         else
12619           whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12620         fi
12621         ;;
12622       esac
12623       link_all_deplibs=yes
12624       ;;
12625
12626     sunos4*)
12627       if test sequent = "$host_vendor"; then
12628         # Use $CC to link under sequent, because it throws in some extra .o
12629         # files that make .init and .fini sections work.
12630         archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12631       else
12632         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12633       fi
12634       hardcode_libdir_flag_spec='-L$libdir'
12635       hardcode_direct=yes
12636       hardcode_minus_L=yes
12637       hardcode_shlibpath_var=no
12638       ;;
12639
12640     sysv4)
12641       case $host_vendor in
12642         sni)
12643           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12644           hardcode_direct=yes # is this really true???
12645         ;;
12646         siemens)
12647           ## LD is ld it makes a PLAMLIB
12648           ## CC just makes a GrossModule.
12649           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12650           reload_cmds='$CC -r -o $output$reload_objs'
12651           hardcode_direct=no
12652         ;;
12653         motorola)
12654           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12655           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12656         ;;
12657       esac
12658       runpath_var='LD_RUN_PATH'
12659       hardcode_shlibpath_var=no
12660       ;;
12661
12662     sysv4.3*)
12663       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12664       hardcode_shlibpath_var=no
12665       export_dynamic_flag_spec='-Bexport'
12666       ;;
12667
12668     sysv4*MP*)
12669       if test -d /usr/nec; then
12670         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12671         hardcode_shlibpath_var=no
12672         runpath_var=LD_RUN_PATH
12673         hardcode_runpath_var=yes
12674         ld_shlibs=yes
12675       fi
12676       ;;
12677
12678     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12679       no_undefined_flag='$wl-z,text'
12680       archive_cmds_need_lc=no
12681       hardcode_shlibpath_var=no
12682       runpath_var='LD_RUN_PATH'
12683
12684       if test yes = "$GCC"; then
12685         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12686         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12687       else
12688         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12689         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12690       fi
12691       ;;
12692
12693     sysv5* | sco3.2v5* | sco5v6*)
12694       # Note: We CANNOT use -z defs as we might desire, because we do not
12695       # link with -lc, and that would cause any symbols used from libc to
12696       # always be unresolved, which means just about no library would
12697       # ever link correctly.  If we're not using GNU ld we use -z text
12698       # though, which does catch some bad symbols but isn't as heavy-handed
12699       # as -z defs.
12700       no_undefined_flag='$wl-z,text'
12701       allow_undefined_flag='$wl-z,nodefs'
12702       archive_cmds_need_lc=no
12703       hardcode_shlibpath_var=no
12704       hardcode_libdir_flag_spec='$wl-R,$libdir'
12705       hardcode_libdir_separator=':'
12706       link_all_deplibs=yes
12707       export_dynamic_flag_spec='$wl-Bexport'
12708       runpath_var='LD_RUN_PATH'
12709
12710       if test yes = "$GCC"; then
12711         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12712         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12713       else
12714         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12715         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12716       fi
12717       ;;
12718
12719     uts4*)
12720       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12721       hardcode_libdir_flag_spec='-L$libdir'
12722       hardcode_shlibpath_var=no
12723       ;;
12724
12725     *)
12726       ld_shlibs=no
12727       ;;
12728     esac
12729
12730     if test sni = "$host_vendor"; then
12731       case $host in
12732       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12733         export_dynamic_flag_spec='$wl-Blargedynsym'
12734         ;;
12735       esac
12736     fi
12737   fi
12738
12739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12740 $as_echo "$ld_shlibs" >&6; }
12741 test no = "$ld_shlibs" && can_build_shared=no
12742
12743 with_gnu_ld=$with_gnu_ld
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759 #
12760 # Do we need to explicitly link libc?
12761 #
12762 case "x$archive_cmds_need_lc" in
12763 x|xyes)
12764   # Assume -lc should be added
12765   archive_cmds_need_lc=yes
12766
12767   if test yes,yes = "$GCC,$enable_shared"; then
12768     case $archive_cmds in
12769     *'~'*)
12770       # FIXME: we may have to deal with multi-command sequences.
12771       ;;
12772     '$CC '*)
12773       # Test whether the compiler implicitly links with -lc since on some
12774       # systems, -lgcc has to come before -lc. If gcc already passes -lc
12775       # to ld, don't add -lc before -lgcc.
12776       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12777 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12778 if ${lt_cv_archive_cmds_need_lc+:} false; then :
12779   $as_echo_n "(cached) " >&6
12780 else
12781   $RM conftest*
12782         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12783
12784         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12785   (eval $ac_compile) 2>&5
12786   ac_status=$?
12787   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12788   test $ac_status = 0; } 2>conftest.err; then
12789           soname=conftest
12790           lib=conftest
12791           libobjs=conftest.$ac_objext
12792           deplibs=
12793           wl=$lt_prog_compiler_wl
12794           pic_flag=$lt_prog_compiler_pic
12795           compiler_flags=-v
12796           linker_flags=-v
12797           verstring=
12798           output_objdir=.
12799           libname=conftest
12800           lt_save_allow_undefined_flag=$allow_undefined_flag
12801           allow_undefined_flag=
12802           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12803   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12804   ac_status=$?
12805   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12806   test $ac_status = 0; }
12807           then
12808             lt_cv_archive_cmds_need_lc=no
12809           else
12810             lt_cv_archive_cmds_need_lc=yes
12811           fi
12812           allow_undefined_flag=$lt_save_allow_undefined_flag
12813         else
12814           cat conftest.err 1>&5
12815         fi
12816         $RM conftest*
12817
12818 fi
12819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12820 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12821       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12822       ;;
12823     esac
12824   fi
12825   ;;
12826 esac
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12980 $as_echo_n "checking dynamic linker characteristics... " >&6; }
12981
12982 if test yes = "$GCC"; then
12983   case $host_os in
12984     darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
12985     *) lt_awk_arg='/^libraries:/' ;;
12986   esac
12987   case $host_os in
12988     mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
12989     *) lt_sed_strip_eq='s|=/|/|g' ;;
12990   esac
12991   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
12992   case $lt_search_path_spec in
12993   *\;*)
12994     # if the path contains ";" then we assume it to be the separator
12995     # otherwise default to the standard path separator (i.e. ":") - it is
12996     # assumed that no part of a normal pathname contains ";" but that should
12997     # okay in the real world where ";" in dirpaths is itself problematic.
12998     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
12999     ;;
13000   *)
13001     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
13002     ;;
13003   esac
13004   # Ok, now we have the path, separated by spaces, we can step through it
13005   # and add multilib dir if necessary...
13006   lt_tmp_lt_search_path_spec=
13007   lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
13008   # ...but if some path component already ends with the multilib dir we assume
13009   # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
13010   case "$lt_multi_os_dir; $lt_search_path_spec " in
13011   "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
13012     lt_multi_os_dir=
13013     ;;
13014   esac
13015   for lt_sys_path in $lt_search_path_spec; do
13016     if test -d "$lt_sys_path$lt_multi_os_dir"; then
13017       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
13018     elif test -n "$lt_multi_os_dir"; then
13019       test -d "$lt_sys_path" && \
13020         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
13021     fi
13022   done
13023   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
13024 BEGIN {RS = " "; FS = "/|\n";} {
13025   lt_foo = "";
13026   lt_count = 0;
13027   for (lt_i = NF; lt_i > 0; lt_i--) {
13028     if ($lt_i != "" && $lt_i != ".") {
13029       if ($lt_i == "..") {
13030         lt_count++;
13031       } else {
13032         if (lt_count == 0) {
13033           lt_foo = "/" $lt_i lt_foo;
13034         } else {
13035           lt_count--;
13036         }
13037       }
13038     }
13039   }
13040   if (lt_foo != "") { lt_freq[lt_foo]++; }
13041   if (lt_freq[lt_foo] == 1) { print lt_foo; }
13042 }'`
13043   # AWK program above erroneously prepends '/' to C:/dos/paths
13044   # for these hosts.
13045   case $host_os in
13046     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
13047       $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
13048   esac
13049   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
13050 else
13051   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13052 fi
13053 library_names_spec=
13054 libname_spec='lib$name'
13055 soname_spec=
13056 shrext_cmds=.so
13057 postinstall_cmds=
13058 postuninstall_cmds=
13059 finish_cmds=
13060 finish_eval=
13061 shlibpath_var=
13062 shlibpath_overrides_runpath=unknown
13063 version_type=none
13064 dynamic_linker="$host_os ld.so"
13065 sys_lib_dlsearch_path_spec="/lib /usr/lib"
13066 need_lib_prefix=unknown
13067 hardcode_into_libs=no
13068
13069 # when you set need_version to no, make sure it does not cause -set_version
13070 # flags to be left without arguments
13071 need_version=unknown
13072
13073
13074
13075 case $host_os in
13076 aix3*)
13077   version_type=linux # correct to gnu/linux during the next big refactor
13078   library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
13079   shlibpath_var=LIBPATH
13080
13081   # AIX 3 has no versioning support, so we append a major version to the name.
13082   soname_spec='$libname$release$shared_ext$major'
13083   ;;
13084
13085 aix[4-9]*)
13086   version_type=linux # correct to gnu/linux during the next big refactor
13087   need_lib_prefix=no
13088   need_version=no
13089   hardcode_into_libs=yes
13090   if test ia64 = "$host_cpu"; then
13091     # AIX 5 supports IA64
13092     library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
13093     shlibpath_var=LD_LIBRARY_PATH
13094   else
13095     # With GCC up to 2.95.x, collect2 would create an import file
13096     # for dependence libraries.  The import file would start with
13097     # the line '#! .'.  This would cause the generated library to
13098     # depend on '.', always an invalid library.  This was fixed in
13099     # development snapshots of GCC prior to 3.0.
13100     case $host_os in
13101       aix4 | aix4.[01] | aix4.[01].*)
13102       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
13103            echo ' yes '
13104            echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
13105         :
13106       else
13107         can_build_shared=no
13108       fi
13109       ;;
13110     esac
13111     # Using Import Files as archive members, it is possible to support
13112     # filename-based versioning of shared library archives on AIX. While
13113     # this would work for both with and without runtime linking, it will
13114     # prevent static linking of such archives. So we do filename-based
13115     # shared library versioning with .so extension only, which is used
13116     # when both runtime linking and shared linking is enabled.
13117     # Unfortunately, runtime linking may impact performance, so we do
13118     # not want this to be the default eventually. Also, we use the
13119     # versioned .so libs for executables only if there is the -brtl
13120     # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
13121     # To allow for filename-based versioning support, we need to create
13122     # libNAME.so.V as an archive file, containing:
13123     # *) an Import File, referring to the versioned filename of the
13124     #    archive as well as the shared archive member, telling the
13125     #    bitwidth (32 or 64) of that shared object, and providing the
13126     #    list of exported symbols of that shared object, eventually
13127     #    decorated with the 'weak' keyword
13128     # *) the shared object with the F_LOADONLY flag set, to really avoid
13129     #    it being seen by the linker.
13130     # At run time we better use the real file rather than another symlink,
13131     # but for link time we create the symlink libNAME.so -> libNAME.so.V
13132
13133     case $with_aix_soname,$aix_use_runtimelinking in
13134     # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
13135     # soname into executable. Probably we can add versioning support to
13136     # collect2, so additional links can be useful in future.
13137     aix,yes) # traditional libtool
13138       dynamic_linker='AIX unversionable lib.so'
13139       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
13140       # instead of lib<name>.a to let people know that these are not
13141       # typical AIX shared libraries.
13142       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13143       ;;
13144     aix,no) # traditional AIX only
13145       dynamic_linker='AIX lib.a(lib.so.V)'
13146       # We preserve .a as extension for shared libraries through AIX4.2
13147       # and later when we are not doing run time linking.
13148       library_names_spec='$libname$release.a $libname.a'
13149       soname_spec='$libname$release$shared_ext$major'
13150       ;;
13151     svr4,*) # full svr4 only
13152       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
13153       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13154       # We do not specify a path in Import Files, so LIBPATH fires.
13155       shlibpath_overrides_runpath=yes
13156       ;;
13157     *,yes) # both, prefer svr4
13158       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
13159       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13160       # unpreferred sharedlib libNAME.a needs extra handling
13161       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"'
13162       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"'
13163       # We do not specify a path in Import Files, so LIBPATH fires.
13164       shlibpath_overrides_runpath=yes
13165       ;;
13166     *,no) # both, prefer aix
13167       dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
13168       library_names_spec='$libname$release.a $libname.a'
13169       soname_spec='$libname$release$shared_ext$major'
13170       # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
13171       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)'
13172       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"'
13173       ;;
13174     esac
13175     shlibpath_var=LIBPATH
13176   fi
13177   ;;
13178
13179 amigaos*)
13180   case $host_cpu in
13181   powerpc)
13182     # Since July 2007 AmigaOS4 officially supports .so libraries.
13183     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
13184     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13185     ;;
13186   m68k)
13187     library_names_spec='$libname.ixlibrary $libname.a'
13188     # Create ${libname}_ixlibrary.a entries in /sys/libs.
13189     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'
13190     ;;
13191   esac
13192   ;;
13193
13194 beos*)
13195   library_names_spec='$libname$shared_ext'
13196   dynamic_linker="$host_os ld.so"
13197   shlibpath_var=LIBRARY_PATH
13198   ;;
13199
13200 bsdi[45]*)
13201   version_type=linux # correct to gnu/linux during the next big refactor
13202   need_version=no
13203   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13204   soname_spec='$libname$release$shared_ext$major'
13205   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13206   shlibpath_var=LD_LIBRARY_PATH
13207   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13208   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13209   # the default ld.so.conf also contains /usr/contrib/lib and
13210   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13211   # libtool to hard-code these into programs
13212   ;;
13213
13214 cygwin* | mingw* | pw32* | cegcc*)
13215   version_type=windows
13216   shrext_cmds=.dll
13217   need_version=no
13218   need_lib_prefix=no
13219
13220   case $GCC,$cc_basename in
13221   yes,*)
13222     # gcc
13223     library_names_spec='$libname.dll.a'
13224     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13225     postinstall_cmds='base_file=`basename \$file`~
13226       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13227       dldir=$destdir/`dirname \$dlpath`~
13228       test -d \$dldir || mkdir -p \$dldir~
13229       $install_prog $dir/$dlname \$dldir/$dlname~
13230       chmod a+x \$dldir/$dlname~
13231       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13232         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13233       fi'
13234     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13235       dlpath=$dir/\$dldll~
13236        $RM \$dlpath'
13237     shlibpath_overrides_runpath=yes
13238
13239     case $host_os in
13240     cygwin*)
13241       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13242       soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13243
13244       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
13245       ;;
13246     mingw* | cegcc*)
13247       # MinGW DLLs use traditional 'lib' prefix
13248       soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13249       ;;
13250     pw32*)
13251       # pw32 DLLs use 'pw' prefix rather than 'lib'
13252       library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13253       ;;
13254     esac
13255     dynamic_linker='Win32 ld.exe'
13256     ;;
13257
13258   *,cl*)
13259     # Native MSVC
13260     libname_spec='$name'
13261     soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13262     library_names_spec='$libname.dll.lib'
13263
13264     case $build_os in
13265     mingw*)
13266       sys_lib_search_path_spec=
13267       lt_save_ifs=$IFS
13268       IFS=';'
13269       for lt_path in $LIB
13270       do
13271         IFS=$lt_save_ifs
13272         # Let DOS variable expansion print the short 8.3 style file name.
13273         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
13274         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13275       done
13276       IFS=$lt_save_ifs
13277       # Convert to MSYS style.
13278       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13279       ;;
13280     cygwin*)
13281       # Convert to unix form, then to dos form, then back to unix form
13282       # but this time dos style (no spaces!) so that the unix form looks
13283       # like /cygdrive/c/PROGRA~1:/cygdr...
13284       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13285       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13286       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13287       ;;
13288     *)
13289       sys_lib_search_path_spec=$LIB
13290       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13291         # It is most probably a Windows format PATH.
13292         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13293       else
13294         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13295       fi
13296       # FIXME: find the short name or the path components, as spaces are
13297       # common. (e.g. "Program Files" -> "PROGRA~1")
13298       ;;
13299     esac
13300
13301     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13302     postinstall_cmds='base_file=`basename \$file`~
13303       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13304       dldir=$destdir/`dirname \$dlpath`~
13305       test -d \$dldir || mkdir -p \$dldir~
13306       $install_prog $dir/$dlname \$dldir/$dlname'
13307     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13308       dlpath=$dir/\$dldll~
13309        $RM \$dlpath'
13310     shlibpath_overrides_runpath=yes
13311     dynamic_linker='Win32 link.exe'
13312     ;;
13313
13314   *)
13315     # Assume MSVC wrapper
13316     library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13317     dynamic_linker='Win32 ld.exe'
13318     ;;
13319   esac
13320   # FIXME: first we should search . and the directory the executable is in
13321   shlibpath_var=PATH
13322   ;;
13323
13324 darwin* | rhapsody*)
13325   dynamic_linker="$host_os dyld"
13326   version_type=darwin
13327   need_lib_prefix=no
13328   need_version=no
13329   library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13330   soname_spec='$libname$release$major$shared_ext'
13331   shlibpath_overrides_runpath=yes
13332   shlibpath_var=DYLD_LIBRARY_PATH
13333   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13334
13335   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13336   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13337   ;;
13338
13339 dgux*)
13340   version_type=linux # correct to gnu/linux during the next big refactor
13341   need_lib_prefix=no
13342   need_version=no
13343   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13344   soname_spec='$libname$release$shared_ext$major'
13345   shlibpath_var=LD_LIBRARY_PATH
13346   ;;
13347
13348 freebsd* | dragonfly*)
13349   # DragonFly does not have aout.  When/if they implement a new
13350   # versioning mechanism, adjust this.
13351   if test -x /usr/bin/objformat; then
13352     objformat=`/usr/bin/objformat`
13353   else
13354     case $host_os in
13355     freebsd[23].*) objformat=aout ;;
13356     *) objformat=elf ;;
13357     esac
13358   fi
13359   version_type=freebsd-$objformat
13360   case $version_type in
13361     freebsd-elf*)
13362       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13363       soname_spec='$libname$release$shared_ext$major'
13364       need_version=no
13365       need_lib_prefix=no
13366       ;;
13367     freebsd-*)
13368       library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13369       need_version=yes
13370       ;;
13371   esac
13372   shlibpath_var=LD_LIBRARY_PATH
13373   case $host_os in
13374   freebsd2.*)
13375     shlibpath_overrides_runpath=yes
13376     ;;
13377   freebsd3.[01]* | freebsdelf3.[01]*)
13378     shlibpath_overrides_runpath=yes
13379     hardcode_into_libs=yes
13380     ;;
13381   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13382   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13383     shlibpath_overrides_runpath=no
13384     hardcode_into_libs=yes
13385     ;;
13386   *) # from 4.6 on, and DragonFly
13387     shlibpath_overrides_runpath=yes
13388     hardcode_into_libs=yes
13389     ;;
13390   esac
13391   ;;
13392
13393 haiku*)
13394   version_type=linux # correct to gnu/linux during the next big refactor
13395   need_lib_prefix=no
13396   need_version=no
13397   dynamic_linker="$host_os runtime_loader"
13398   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13399   soname_spec='$libname$release$shared_ext$major'
13400   shlibpath_var=LIBRARY_PATH
13401   shlibpath_overrides_runpath=no
13402   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13403   hardcode_into_libs=yes
13404   ;;
13405
13406 hpux9* | hpux10* | hpux11*)
13407   # Give a soname corresponding to the major version so that dld.sl refuses to
13408   # link against other versions.
13409   version_type=sunos
13410   need_lib_prefix=no
13411   need_version=no
13412   case $host_cpu in
13413   ia64*)
13414     shrext_cmds='.so'
13415     hardcode_into_libs=yes
13416     dynamic_linker="$host_os dld.so"
13417     shlibpath_var=LD_LIBRARY_PATH
13418     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13419     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13420     soname_spec='$libname$release$shared_ext$major'
13421     if test 32 = "$HPUX_IA64_MODE"; then
13422       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13423       sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13424     else
13425       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13426       sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13427     fi
13428     ;;
13429   hppa*64*)
13430     shrext_cmds='.sl'
13431     hardcode_into_libs=yes
13432     dynamic_linker="$host_os dld.sl"
13433     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13434     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13435     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13436     soname_spec='$libname$release$shared_ext$major'
13437     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13438     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13439     ;;
13440   *)
13441     shrext_cmds='.sl'
13442     dynamic_linker="$host_os dld.sl"
13443     shlibpath_var=SHLIB_PATH
13444     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13445     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13446     soname_spec='$libname$release$shared_ext$major'
13447     ;;
13448   esac
13449   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13450   postinstall_cmds='chmod 555 $lib'
13451   # or fails outright, so override atomically:
13452   install_override_mode=555
13453   ;;
13454
13455 interix[3-9]*)
13456   version_type=linux # correct to gnu/linux during the next big refactor
13457   need_lib_prefix=no
13458   need_version=no
13459   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13460   soname_spec='$libname$release$shared_ext$major'
13461   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13462   shlibpath_var=LD_LIBRARY_PATH
13463   shlibpath_overrides_runpath=no
13464   hardcode_into_libs=yes
13465   ;;
13466
13467 irix5* | irix6* | nonstopux*)
13468   case $host_os in
13469     nonstopux*) version_type=nonstopux ;;
13470     *)
13471         if test yes = "$lt_cv_prog_gnu_ld"; then
13472                 version_type=linux # correct to gnu/linux during the next big refactor
13473         else
13474                 version_type=irix
13475         fi ;;
13476   esac
13477   need_lib_prefix=no
13478   need_version=no
13479   soname_spec='$libname$release$shared_ext$major'
13480   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13481   case $host_os in
13482   irix5* | nonstopux*)
13483     libsuff= shlibsuff=
13484     ;;
13485   *)
13486     case $LD in # libtool.m4 will add one of these switches to LD
13487     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13488       libsuff= shlibsuff= libmagic=32-bit;;
13489     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13490       libsuff=32 shlibsuff=N32 libmagic=N32;;
13491     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13492       libsuff=64 shlibsuff=64 libmagic=64-bit;;
13493     *) libsuff= shlibsuff= libmagic=never-match;;
13494     esac
13495     ;;
13496   esac
13497   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13498   shlibpath_overrides_runpath=no
13499   sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13500   sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13501   hardcode_into_libs=yes
13502   ;;
13503
13504 # No shared lib support for Linux oldld, aout, or coff.
13505 linux*oldld* | linux*aout* | linux*coff*)
13506   dynamic_linker=no
13507   ;;
13508
13509 linux*android*)
13510   version_type=none # Android doesn't support versioned libraries.
13511   need_lib_prefix=no
13512   need_version=no
13513   library_names_spec='$libname$release$shared_ext'
13514   soname_spec='$libname$release$shared_ext'
13515   finish_cmds=
13516   shlibpath_var=LD_LIBRARY_PATH
13517   shlibpath_overrides_runpath=yes
13518
13519   # This implies no fast_install, which is unacceptable.
13520   # Some rework will be needed to allow for fast_install
13521   # before this can be enabled.
13522   hardcode_into_libs=yes
13523
13524   dynamic_linker='Android linker'
13525   # Don't embed -rpath directories since the linker doesn't support them.
13526   hardcode_libdir_flag_spec='-L$libdir'
13527   ;;
13528
13529 # This must be glibc/ELF.
13530 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13531   version_type=linux # correct to gnu/linux during the next big refactor
13532   need_lib_prefix=no
13533   need_version=no
13534   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13535   soname_spec='$libname$release$shared_ext$major'
13536   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13537   shlibpath_var=LD_LIBRARY_PATH
13538   shlibpath_overrides_runpath=no
13539
13540   # Some binutils ld are patched to set DT_RUNPATH
13541   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
13542   $as_echo_n "(cached) " >&6
13543 else
13544   lt_cv_shlibpath_overrides_runpath=no
13545     save_LDFLAGS=$LDFLAGS
13546     save_libdir=$libdir
13547     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13548          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13549     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13550 /* end confdefs.h.  */
13551
13552 int
13553 main ()
13554 {
13555
13556   ;
13557   return 0;
13558 }
13559 _ACEOF
13560 if ac_fn_c_try_link "$LINENO"; then :
13561   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
13562   lt_cv_shlibpath_overrides_runpath=yes
13563 fi
13564 fi
13565 rm -f core conftest.err conftest.$ac_objext \
13566     conftest$ac_exeext conftest.$ac_ext
13567     LDFLAGS=$save_LDFLAGS
13568     libdir=$save_libdir
13569
13570 fi
13571
13572   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13573
13574   # This implies no fast_install, which is unacceptable.
13575   # Some rework will be needed to allow for fast_install
13576   # before this can be enabled.
13577   hardcode_into_libs=yes
13578
13579   # Add ABI-specific directories to the system library path.
13580   sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
13581
13582   # Ideally, we could use ldconfig to report *all* directores which are
13583   # searched for libraries, however this is still not possible.  Aside from not
13584   # being certain /sbin/ldconfig is available, command
13585   # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13586   # even though it is searched at run-time.  Try to do the best guess by
13587   # appending ld.so.conf contents (and includes) to the search path.
13588   if test -f /etc/ld.so.conf; then
13589     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' ' '`
13590     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
13591   fi
13592
13593   # We used to test for /lib/ld.so.1 and disable shared libraries on
13594   # powerpc, because MkLinux only supported shared libraries with the
13595   # GNU dynamic linker.  Since this was broken with cross compilers,
13596   # most powerpc-linux boxes support dynamic linking these days and
13597   # people can always --disable-shared, the test was removed, and we
13598   # assume the GNU/Linux dynamic linker is in use.
13599   dynamic_linker='GNU/Linux ld.so'
13600   ;;
13601
13602 netbsd*)
13603   version_type=sunos
13604   need_lib_prefix=no
13605   need_version=no
13606   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13607     library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13608     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13609     dynamic_linker='NetBSD (a.out) ld.so'
13610   else
13611     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13612     soname_spec='$libname$release$shared_ext$major'
13613     dynamic_linker='NetBSD ld.elf_so'
13614   fi
13615   shlibpath_var=LD_LIBRARY_PATH
13616   shlibpath_overrides_runpath=yes
13617   hardcode_into_libs=yes
13618   ;;
13619
13620 newsos6)
13621   version_type=linux # correct to gnu/linux during the next big refactor
13622   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13623   shlibpath_var=LD_LIBRARY_PATH
13624   shlibpath_overrides_runpath=yes
13625   ;;
13626
13627 *nto* | *qnx*)
13628   version_type=qnx
13629   need_lib_prefix=no
13630   need_version=no
13631   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13632   soname_spec='$libname$release$shared_ext$major'
13633   shlibpath_var=LD_LIBRARY_PATH
13634   shlibpath_overrides_runpath=no
13635   hardcode_into_libs=yes
13636   dynamic_linker='ldqnx.so'
13637   ;;
13638
13639 openbsd* | bitrig*)
13640   version_type=sunos
13641   sys_lib_dlsearch_path_spec=/usr/lib
13642   need_lib_prefix=no
13643   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13644     need_version=no
13645   else
13646     need_version=yes
13647   fi
13648   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13649   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13650   shlibpath_var=LD_LIBRARY_PATH
13651   shlibpath_overrides_runpath=yes
13652   ;;
13653
13654 os2*)
13655   libname_spec='$name'
13656   version_type=windows
13657   shrext_cmds=.dll
13658   need_version=no
13659   need_lib_prefix=no
13660   # OS/2 can only load a DLL with a base name of 8 characters or less.
13661   soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13662     v=$($ECHO $release$versuffix | tr -d .-);
13663     n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13664     $ECHO $n$v`$shared_ext'
13665   library_names_spec='${libname}_dll.$libext'
13666   dynamic_linker='OS/2 ld.exe'
13667   shlibpath_var=BEGINLIBPATH
13668   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13669   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13670   postinstall_cmds='base_file=`basename \$file`~
13671     dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13672     dldir=$destdir/`dirname \$dlpath`~
13673     test -d \$dldir || mkdir -p \$dldir~
13674     $install_prog $dir/$dlname \$dldir/$dlname~
13675     chmod a+x \$dldir/$dlname~
13676     if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13677       eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13678     fi'
13679   postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13680     dlpath=$dir/\$dldll~
13681     $RM \$dlpath'
13682   ;;
13683
13684 osf3* | osf4* | osf5*)
13685   version_type=osf
13686   need_lib_prefix=no
13687   need_version=no
13688   soname_spec='$libname$release$shared_ext$major'
13689   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13690   shlibpath_var=LD_LIBRARY_PATH
13691   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13692   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13693   ;;
13694
13695 rdos*)
13696   dynamic_linker=no
13697   ;;
13698
13699 solaris*)
13700   version_type=linux # correct to gnu/linux during the next big refactor
13701   need_lib_prefix=no
13702   need_version=no
13703   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13704   soname_spec='$libname$release$shared_ext$major'
13705   shlibpath_var=LD_LIBRARY_PATH
13706   shlibpath_overrides_runpath=yes
13707   hardcode_into_libs=yes
13708   # ldd complains unless libraries are executable
13709   postinstall_cmds='chmod +x $lib'
13710   ;;
13711
13712 sunos4*)
13713   version_type=sunos
13714   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13715   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13716   shlibpath_var=LD_LIBRARY_PATH
13717   shlibpath_overrides_runpath=yes
13718   if test yes = "$with_gnu_ld"; then
13719     need_lib_prefix=no
13720   fi
13721   need_version=yes
13722   ;;
13723
13724 sysv4 | sysv4.3*)
13725   version_type=linux # correct to gnu/linux during the next big refactor
13726   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13727   soname_spec='$libname$release$shared_ext$major'
13728   shlibpath_var=LD_LIBRARY_PATH
13729   case $host_vendor in
13730     sni)
13731       shlibpath_overrides_runpath=no
13732       need_lib_prefix=no
13733       runpath_var=LD_RUN_PATH
13734       ;;
13735     siemens)
13736       need_lib_prefix=no
13737       ;;
13738     motorola)
13739       need_lib_prefix=no
13740       need_version=no
13741       shlibpath_overrides_runpath=no
13742       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13743       ;;
13744   esac
13745   ;;
13746
13747 sysv4*MP*)
13748   if test -d /usr/nec; then
13749     version_type=linux # correct to gnu/linux during the next big refactor
13750     library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13751     soname_spec='$libname$shared_ext.$major'
13752     shlibpath_var=LD_LIBRARY_PATH
13753   fi
13754   ;;
13755
13756 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13757   version_type=sco
13758   need_lib_prefix=no
13759   need_version=no
13760   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13761   soname_spec='$libname$release$shared_ext$major'
13762   shlibpath_var=LD_LIBRARY_PATH
13763   shlibpath_overrides_runpath=yes
13764   hardcode_into_libs=yes
13765   if test yes = "$with_gnu_ld"; then
13766     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13767   else
13768     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13769     case $host_os in
13770       sco3.2v5*)
13771         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13772         ;;
13773     esac
13774   fi
13775   sys_lib_dlsearch_path_spec='/usr/lib'
13776   ;;
13777
13778 tpf*)
13779   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13780   version_type=linux # correct to gnu/linux during the next big refactor
13781   need_lib_prefix=no
13782   need_version=no
13783   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13784   shlibpath_var=LD_LIBRARY_PATH
13785   shlibpath_overrides_runpath=no
13786   hardcode_into_libs=yes
13787   ;;
13788
13789 uts4*)
13790   version_type=linux # correct to gnu/linux during the next big refactor
13791   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13792   soname_spec='$libname$release$shared_ext$major'
13793   shlibpath_var=LD_LIBRARY_PATH
13794   ;;
13795
13796 *)
13797   dynamic_linker=no
13798   ;;
13799 esac
13800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13801 $as_echo "$dynamic_linker" >&6; }
13802 test no = "$dynamic_linker" && can_build_shared=no
13803
13804 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13805 if test yes = "$GCC"; then
13806   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13807 fi
13808
13809 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13810   sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13811 fi
13812
13813 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13814   sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13815 fi
13816
13817 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13818 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13819
13820 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13821 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13822
13823 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13824 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13923 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13924 hardcode_action=
13925 if test -n "$hardcode_libdir_flag_spec" ||
13926    test -n "$runpath_var" ||
13927    test yes = "$hardcode_automatic"; then
13928
13929   # We can hardcode non-existent directories.
13930   if test no != "$hardcode_direct" &&
13931      # If the only mechanism to avoid hardcoding is shlibpath_var, we
13932      # have to relink, otherwise we might link with an installed library
13933      # when we should be linking with a yet-to-be-installed one
13934      ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13935      test no != "$hardcode_minus_L"; then
13936     # Linking always hardcodes the temporary library directory.
13937     hardcode_action=relink
13938   else
13939     # We can link without hardcoding, and we can hardcode nonexisting dirs.
13940     hardcode_action=immediate
13941   fi
13942 else
13943   # We cannot hardcode anything, or else we can only hardcode existing
13944   # directories.
13945   hardcode_action=unsupported
13946 fi
13947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13948 $as_echo "$hardcode_action" >&6; }
13949
13950 if test relink = "$hardcode_action" ||
13951    test yes = "$inherit_rpath"; then
13952   # Fast installation is not supported
13953   enable_fast_install=no
13954 elif test yes = "$shlibpath_overrides_runpath" ||
13955      test no = "$enable_shared"; then
13956   # Fast installation is not necessary
13957   enable_fast_install=needless
13958 fi
13959
13960
13961
13962
13963
13964
13965   if test yes != "$enable_dlopen"; then
13966   enable_dlopen=unknown
13967   enable_dlopen_self=unknown
13968   enable_dlopen_self_static=unknown
13969 else
13970   lt_cv_dlopen=no
13971   lt_cv_dlopen_libs=
13972
13973   case $host_os in
13974   beos*)
13975     lt_cv_dlopen=load_add_on
13976     lt_cv_dlopen_libs=
13977     lt_cv_dlopen_self=yes
13978     ;;
13979
13980   mingw* | pw32* | cegcc*)
13981     lt_cv_dlopen=LoadLibrary
13982     lt_cv_dlopen_libs=
13983     ;;
13984
13985   cygwin*)
13986     lt_cv_dlopen=dlopen
13987     lt_cv_dlopen_libs=
13988     ;;
13989
13990   darwin*)
13991     # if libdl is installed we need to link against it
13992     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13993 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13994 if ${ac_cv_lib_dl_dlopen+:} false; then :
13995   $as_echo_n "(cached) " >&6
13996 else
13997   ac_check_lib_save_LIBS=$LIBS
13998 LIBS="-ldl  $LIBS"
13999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14000 /* end confdefs.h.  */
14001
14002 /* Override any GCC internal prototype to avoid an error.
14003    Use char because int might match the return type of a GCC
14004    builtin and then its argument prototype would still apply.  */
14005 #ifdef __cplusplus
14006 extern "C"
14007 #endif
14008 char dlopen ();
14009 int
14010 main ()
14011 {
14012 return dlopen ();
14013   ;
14014   return 0;
14015 }
14016 _ACEOF
14017 if ac_fn_c_try_link "$LINENO"; then :
14018   ac_cv_lib_dl_dlopen=yes
14019 else
14020   ac_cv_lib_dl_dlopen=no
14021 fi
14022 rm -f core conftest.err conftest.$ac_objext \
14023     conftest$ac_exeext conftest.$ac_ext
14024 LIBS=$ac_check_lib_save_LIBS
14025 fi
14026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14027 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14028 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14029   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14030 else
14031
14032     lt_cv_dlopen=dyld
14033     lt_cv_dlopen_libs=
14034     lt_cv_dlopen_self=yes
14035
14036 fi
14037
14038     ;;
14039
14040   tpf*)
14041     # Don't try to run any link tests for TPF.  We know it's impossible
14042     # because TPF is a cross-compiler, and we know how we open DSOs.
14043     lt_cv_dlopen=dlopen
14044     lt_cv_dlopen_libs=
14045     lt_cv_dlopen_self=no
14046     ;;
14047
14048   *)
14049     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
14050 if test "x$ac_cv_func_shl_load" = xyes; then :
14051   lt_cv_dlopen=shl_load
14052 else
14053   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
14054 $as_echo_n "checking for shl_load in -ldld... " >&6; }
14055 if ${ac_cv_lib_dld_shl_load+:} false; then :
14056   $as_echo_n "(cached) " >&6
14057 else
14058   ac_check_lib_save_LIBS=$LIBS
14059 LIBS="-ldld  $LIBS"
14060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14061 /* end confdefs.h.  */
14062
14063 /* Override any GCC internal prototype to avoid an error.
14064    Use char because int might match the return type of a GCC
14065    builtin and then its argument prototype would still apply.  */
14066 #ifdef __cplusplus
14067 extern "C"
14068 #endif
14069 char shl_load ();
14070 int
14071 main ()
14072 {
14073 return shl_load ();
14074   ;
14075   return 0;
14076 }
14077 _ACEOF
14078 if ac_fn_c_try_link "$LINENO"; then :
14079   ac_cv_lib_dld_shl_load=yes
14080 else
14081   ac_cv_lib_dld_shl_load=no
14082 fi
14083 rm -f core conftest.err conftest.$ac_objext \
14084     conftest$ac_exeext conftest.$ac_ext
14085 LIBS=$ac_check_lib_save_LIBS
14086 fi
14087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
14088 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
14089 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
14090   lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
14091 else
14092   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
14093 if test "x$ac_cv_func_dlopen" = xyes; then :
14094   lt_cv_dlopen=dlopen
14095 else
14096   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14097 $as_echo_n "checking for dlopen in -ldl... " >&6; }
14098 if ${ac_cv_lib_dl_dlopen+:} false; then :
14099   $as_echo_n "(cached) " >&6
14100 else
14101   ac_check_lib_save_LIBS=$LIBS
14102 LIBS="-ldl  $LIBS"
14103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14104 /* end confdefs.h.  */
14105
14106 /* Override any GCC internal prototype to avoid an error.
14107    Use char because int might match the return type of a GCC
14108    builtin and then its argument prototype would still apply.  */
14109 #ifdef __cplusplus
14110 extern "C"
14111 #endif
14112 char dlopen ();
14113 int
14114 main ()
14115 {
14116 return dlopen ();
14117   ;
14118   return 0;
14119 }
14120 _ACEOF
14121 if ac_fn_c_try_link "$LINENO"; then :
14122   ac_cv_lib_dl_dlopen=yes
14123 else
14124   ac_cv_lib_dl_dlopen=no
14125 fi
14126 rm -f core conftest.err conftest.$ac_objext \
14127     conftest$ac_exeext conftest.$ac_ext
14128 LIBS=$ac_check_lib_save_LIBS
14129 fi
14130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14131 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14132 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14133   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14134 else
14135   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
14136 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
14137 if ${ac_cv_lib_svld_dlopen+:} false; then :
14138   $as_echo_n "(cached) " >&6
14139 else
14140   ac_check_lib_save_LIBS=$LIBS
14141 LIBS="-lsvld  $LIBS"
14142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14143 /* end confdefs.h.  */
14144
14145 /* Override any GCC internal prototype to avoid an error.
14146    Use char because int might match the return type of a GCC
14147    builtin and then its argument prototype would still apply.  */
14148 #ifdef __cplusplus
14149 extern "C"
14150 #endif
14151 char dlopen ();
14152 int
14153 main ()
14154 {
14155 return dlopen ();
14156   ;
14157   return 0;
14158 }
14159 _ACEOF
14160 if ac_fn_c_try_link "$LINENO"; then :
14161   ac_cv_lib_svld_dlopen=yes
14162 else
14163   ac_cv_lib_svld_dlopen=no
14164 fi
14165 rm -f core conftest.err conftest.$ac_objext \
14166     conftest$ac_exeext conftest.$ac_ext
14167 LIBS=$ac_check_lib_save_LIBS
14168 fi
14169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
14170 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
14171 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
14172   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
14173 else
14174   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
14175 $as_echo_n "checking for dld_link in -ldld... " >&6; }
14176 if ${ac_cv_lib_dld_dld_link+:} false; then :
14177   $as_echo_n "(cached) " >&6
14178 else
14179   ac_check_lib_save_LIBS=$LIBS
14180 LIBS="-ldld  $LIBS"
14181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14182 /* end confdefs.h.  */
14183
14184 /* Override any GCC internal prototype to avoid an error.
14185    Use char because int might match the return type of a GCC
14186    builtin and then its argument prototype would still apply.  */
14187 #ifdef __cplusplus
14188 extern "C"
14189 #endif
14190 char dld_link ();
14191 int
14192 main ()
14193 {
14194 return dld_link ();
14195   ;
14196   return 0;
14197 }
14198 _ACEOF
14199 if ac_fn_c_try_link "$LINENO"; then :
14200   ac_cv_lib_dld_dld_link=yes
14201 else
14202   ac_cv_lib_dld_dld_link=no
14203 fi
14204 rm -f core conftest.err conftest.$ac_objext \
14205     conftest$ac_exeext conftest.$ac_ext
14206 LIBS=$ac_check_lib_save_LIBS
14207 fi
14208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
14209 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
14210 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
14211   lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
14212 fi
14213
14214
14215 fi
14216
14217
14218 fi
14219
14220
14221 fi
14222
14223
14224 fi
14225
14226
14227 fi
14228
14229     ;;
14230   esac
14231
14232   if test no = "$lt_cv_dlopen"; then
14233     enable_dlopen=no
14234   else
14235     enable_dlopen=yes
14236   fi
14237
14238   case $lt_cv_dlopen in
14239   dlopen)
14240     save_CPPFLAGS=$CPPFLAGS
14241     test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14242
14243     save_LDFLAGS=$LDFLAGS
14244     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14245
14246     save_LIBS=$LIBS
14247     LIBS="$lt_cv_dlopen_libs $LIBS"
14248
14249     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
14250 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
14251 if ${lt_cv_dlopen_self+:} false; then :
14252   $as_echo_n "(cached) " >&6
14253 else
14254           if test yes = "$cross_compiling"; then :
14255   lt_cv_dlopen_self=cross
14256 else
14257   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14258   lt_status=$lt_dlunknown
14259   cat > conftest.$ac_ext <<_LT_EOF
14260 #line $LINENO "configure"
14261 #include "confdefs.h"
14262
14263 #if HAVE_DLFCN_H
14264 #include <dlfcn.h>
14265 #endif
14266
14267 #include <stdio.h>
14268
14269 #ifdef RTLD_GLOBAL
14270 #  define LT_DLGLOBAL           RTLD_GLOBAL
14271 #else
14272 #  ifdef DL_GLOBAL
14273 #    define LT_DLGLOBAL         DL_GLOBAL
14274 #  else
14275 #    define LT_DLGLOBAL         0
14276 #  endif
14277 #endif
14278
14279 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14280    find out it does not work in some platform. */
14281 #ifndef LT_DLLAZY_OR_NOW
14282 #  ifdef RTLD_LAZY
14283 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14284 #  else
14285 #    ifdef DL_LAZY
14286 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14287 #    else
14288 #      ifdef RTLD_NOW
14289 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14290 #      else
14291 #        ifdef DL_NOW
14292 #          define LT_DLLAZY_OR_NOW      DL_NOW
14293 #        else
14294 #          define LT_DLLAZY_OR_NOW      0
14295 #        endif
14296 #      endif
14297 #    endif
14298 #  endif
14299 #endif
14300
14301 /* When -fvisibility=hidden is used, assume the code has been annotated
14302    correspondingly for the symbols needed.  */
14303 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14304 int fnord () __attribute__((visibility("default")));
14305 #endif
14306
14307 int fnord () { return 42; }
14308 int main ()
14309 {
14310   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14311   int status = $lt_dlunknown;
14312
14313   if (self)
14314     {
14315       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14316       else
14317         {
14318           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14319           else puts (dlerror ());
14320         }
14321       /* dlclose (self); */
14322     }
14323   else
14324     puts (dlerror ());
14325
14326   return status;
14327 }
14328 _LT_EOF
14329   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14330   (eval $ac_link) 2>&5
14331   ac_status=$?
14332   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14333   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14334     (./conftest; exit; ) >&5 2>/dev/null
14335     lt_status=$?
14336     case x$lt_status in
14337       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14338       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14339       x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14340     esac
14341   else :
14342     # compilation failed
14343     lt_cv_dlopen_self=no
14344   fi
14345 fi
14346 rm -fr conftest*
14347
14348
14349 fi
14350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14351 $as_echo "$lt_cv_dlopen_self" >&6; }
14352
14353     if test yes = "$lt_cv_dlopen_self"; then
14354       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14355       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14356 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
14357 if ${lt_cv_dlopen_self_static+:} false; then :
14358   $as_echo_n "(cached) " >&6
14359 else
14360           if test yes = "$cross_compiling"; then :
14361   lt_cv_dlopen_self_static=cross
14362 else
14363   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14364   lt_status=$lt_dlunknown
14365   cat > conftest.$ac_ext <<_LT_EOF
14366 #line $LINENO "configure"
14367 #include "confdefs.h"
14368
14369 #if HAVE_DLFCN_H
14370 #include <dlfcn.h>
14371 #endif
14372
14373 #include <stdio.h>
14374
14375 #ifdef RTLD_GLOBAL
14376 #  define LT_DLGLOBAL           RTLD_GLOBAL
14377 #else
14378 #  ifdef DL_GLOBAL
14379 #    define LT_DLGLOBAL         DL_GLOBAL
14380 #  else
14381 #    define LT_DLGLOBAL         0
14382 #  endif
14383 #endif
14384
14385 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14386    find out it does not work in some platform. */
14387 #ifndef LT_DLLAZY_OR_NOW
14388 #  ifdef RTLD_LAZY
14389 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14390 #  else
14391 #    ifdef DL_LAZY
14392 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14393 #    else
14394 #      ifdef RTLD_NOW
14395 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14396 #      else
14397 #        ifdef DL_NOW
14398 #          define LT_DLLAZY_OR_NOW      DL_NOW
14399 #        else
14400 #          define LT_DLLAZY_OR_NOW      0
14401 #        endif
14402 #      endif
14403 #    endif
14404 #  endif
14405 #endif
14406
14407 /* When -fvisibility=hidden is used, assume the code has been annotated
14408    correspondingly for the symbols needed.  */
14409 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14410 int fnord () __attribute__((visibility("default")));
14411 #endif
14412
14413 int fnord () { return 42; }
14414 int main ()
14415 {
14416   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14417   int status = $lt_dlunknown;
14418
14419   if (self)
14420     {
14421       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14422       else
14423         {
14424           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14425           else puts (dlerror ());
14426         }
14427       /* dlclose (self); */
14428     }
14429   else
14430     puts (dlerror ());
14431
14432   return status;
14433 }
14434 _LT_EOF
14435   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14436   (eval $ac_link) 2>&5
14437   ac_status=$?
14438   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14439   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14440     (./conftest; exit; ) >&5 2>/dev/null
14441     lt_status=$?
14442     case x$lt_status in
14443       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14444       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14445       x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14446     esac
14447   else :
14448     # compilation failed
14449     lt_cv_dlopen_self_static=no
14450   fi
14451 fi
14452 rm -fr conftest*
14453
14454
14455 fi
14456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14457 $as_echo "$lt_cv_dlopen_self_static" >&6; }
14458     fi
14459
14460     CPPFLAGS=$save_CPPFLAGS
14461     LDFLAGS=$save_LDFLAGS
14462     LIBS=$save_LIBS
14463     ;;
14464   esac
14465
14466   case $lt_cv_dlopen_self in
14467   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14468   *) enable_dlopen_self=unknown ;;
14469   esac
14470
14471   case $lt_cv_dlopen_self_static in
14472   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14473   *) enable_dlopen_self_static=unknown ;;
14474   esac
14475 fi
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493 striplib=
14494 old_striplib=
14495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14496 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
14497 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14498   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14499   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14501 $as_echo "yes" >&6; }
14502 else
14503 # FIXME - insert some real tests, host_os isn't really good enough
14504   case $host_os in
14505   darwin*)
14506     if test -n "$STRIP"; then
14507       striplib="$STRIP -x"
14508       old_striplib="$STRIP -S"
14509       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14510 $as_echo "yes" >&6; }
14511     else
14512       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14513 $as_echo "no" >&6; }
14514     fi
14515     ;;
14516   *)
14517     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14518 $as_echo "no" >&6; }
14519     ;;
14520   esac
14521 fi
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534   # Report what library types will actually be built
14535   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14536 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
14537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14538 $as_echo "$can_build_shared" >&6; }
14539
14540   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14541 $as_echo_n "checking whether to build shared libraries... " >&6; }
14542   test no = "$can_build_shared" && enable_shared=no
14543
14544   # On AIX, shared libraries and static libraries use the same namespace, and
14545   # are all built from PIC.
14546   case $host_os in
14547   aix3*)
14548     test yes = "$enable_shared" && enable_static=no
14549     if test -n "$RANLIB"; then
14550       archive_cmds="$archive_cmds~\$RANLIB \$lib"
14551       postinstall_cmds='$RANLIB $lib'
14552     fi
14553     ;;
14554
14555   aix[4-9]*)
14556     if test ia64 != "$host_cpu"; then
14557       case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14558       yes,aix,yes) ;;                   # shared object as lib.so file only
14559       yes,svr4,*) ;;                    # shared object as lib.so archive member only
14560       yes,*) enable_static=no ;;        # shared object in lib.a archive as well
14561       esac
14562     fi
14563     ;;
14564   esac
14565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14566 $as_echo "$enable_shared" >&6; }
14567
14568   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14569 $as_echo_n "checking whether to build static libraries... " >&6; }
14570   # Make sure either enable_shared or enable_static is yes.
14571   test yes = "$enable_shared" || enable_static=yes
14572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14573 $as_echo "$enable_static" >&6; }
14574
14575
14576
14577
14578 fi
14579 ac_ext=c
14580 ac_cpp='$CPP $CPPFLAGS'
14581 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14582 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14583 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14584
14585 CC=$lt_save_CC
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601         ac_config_commands="$ac_config_commands libtool"
14602
14603
14604
14605
14606 # Only expand once:
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
14619         if test -n "$ac_tool_prefix"; then
14620   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
14621 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
14622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14623 $as_echo_n "checking for $ac_word... " >&6; }
14624 if ${ac_cv_path_PKG_CONFIG+:} false; then :
14625   $as_echo_n "(cached) " >&6
14626 else
14627   case $PKG_CONFIG in
14628   [\\/]* | ?:[\\/]*)
14629   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
14630   ;;
14631   *)
14632   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14633 for as_dir in $PATH
14634 do
14635   IFS=$as_save_IFS
14636   test -z "$as_dir" && as_dir=.
14637     for ac_exec_ext in '' $ac_executable_extensions; do
14638   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14639     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14640     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14641     break 2
14642   fi
14643 done
14644   done
14645 IFS=$as_save_IFS
14646
14647   ;;
14648 esac
14649 fi
14650 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
14651 if test -n "$PKG_CONFIG"; then
14652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
14653 $as_echo "$PKG_CONFIG" >&6; }
14654 else
14655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14656 $as_echo "no" >&6; }
14657 fi
14658
14659
14660 fi
14661 if test -z "$ac_cv_path_PKG_CONFIG"; then
14662   ac_pt_PKG_CONFIG=$PKG_CONFIG
14663   # Extract the first word of "pkg-config", so it can be a program name with args.
14664 set dummy pkg-config; ac_word=$2
14665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14666 $as_echo_n "checking for $ac_word... " >&6; }
14667 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
14668   $as_echo_n "(cached) " >&6
14669 else
14670   case $ac_pt_PKG_CONFIG in
14671   [\\/]* | ?:[\\/]*)
14672   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
14673   ;;
14674   *)
14675   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14676 for as_dir in $PATH
14677 do
14678   IFS=$as_save_IFS
14679   test -z "$as_dir" && as_dir=.
14680     for ac_exec_ext in '' $ac_executable_extensions; do
14681   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14682     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14683     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14684     break 2
14685   fi
14686 done
14687   done
14688 IFS=$as_save_IFS
14689
14690   ;;
14691 esac
14692 fi
14693 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
14694 if test -n "$ac_pt_PKG_CONFIG"; then
14695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
14696 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
14697 else
14698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14699 $as_echo "no" >&6; }
14700 fi
14701
14702   if test "x$ac_pt_PKG_CONFIG" = x; then
14703     PKG_CONFIG=""
14704   else
14705     case $cross_compiling:$ac_tool_warned in
14706 yes:)
14707 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14708 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14709 ac_tool_warned=yes ;;
14710 esac
14711     PKG_CONFIG=$ac_pt_PKG_CONFIG
14712   fi
14713 else
14714   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
14715 fi
14716
14717 fi
14718 if test -n "$PKG_CONFIG"; then
14719         _pkg_min_version=0.9.0
14720         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
14721 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
14722         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
14723                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14724 $as_echo "yes" >&6; }
14725         else
14726                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14727 $as_echo "no" >&6; }
14728                 PKG_CONFIG=""
14729         fi
14730 fi
14731
14732 # Checks for header files.
14733 for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/select.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h ifaddrs.h
14734 do :
14735   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14736 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
14737 "
14738 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14739   cat >>confdefs.h <<_ACEOF
14740 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14741 _ACEOF
14742
14743 fi
14744
14745 done
14746
14747 # net/if.h portability for Darwin see:
14748 # https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html
14749 for ac_header in net/if.h
14750 do :
14751   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
14752 #include <stdio.h>
14753 #ifdef STDC_HEADERS
14754 # include <stdlib.h>
14755 # include <stddef.h>
14756 #else
14757 # ifdef HAVE_STDLIB_H
14758 #  include <stdlib.h>
14759 # endif
14760 #endif
14761 #ifdef HAVE_SYS_SOCKET_H
14762 # include <sys/socket.h>
14763 #endif
14764
14765 "
14766 if test "x$ac_cv_header_net_if_h" = xyes; then :
14767   cat >>confdefs.h <<_ACEOF
14768 #define HAVE_NET_IF_H 1
14769 _ACEOF
14770
14771 fi
14772
14773 done
14774
14775
14776 # Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH
14777 for ac_header in TargetConditionals.h
14778 do :
14779   ac_fn_c_check_header_mongrel "$LINENO" "TargetConditionals.h" "ac_cv_header_TargetConditionals_h" "$ac_includes_default"
14780 if test "x$ac_cv_header_TargetConditionals_h" = xyes; then :
14781   cat >>confdefs.h <<_ACEOF
14782 #define HAVE_TARGETCONDITIONALS_H 1
14783 _ACEOF
14784
14785 fi
14786
14787 done
14788
14789
14790 # check for types.
14791 # Using own tests for int64* because autoconf builtin only give 32bit.
14792 ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
14793 if test "x$ac_cv_type_int8_t" = xyes; then :
14794
14795 else
14796
14797 cat >>confdefs.h <<_ACEOF
14798 #define int8_t signed char
14799 _ACEOF
14800
14801 fi
14802
14803 ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
14804 if test "x$ac_cv_type_int16_t" = xyes; then :
14805
14806 else
14807
14808 cat >>confdefs.h <<_ACEOF
14809 #define int16_t short
14810 _ACEOF
14811
14812 fi
14813
14814 ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
14815 if test "x$ac_cv_type_int32_t" = xyes; then :
14816
14817 else
14818
14819 cat >>confdefs.h <<_ACEOF
14820 #define int32_t int
14821 _ACEOF
14822
14823 fi
14824
14825 ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
14826 if test "x$ac_cv_type_int64_t" = xyes; then :
14827
14828 else
14829
14830 cat >>confdefs.h <<_ACEOF
14831 #define int64_t long long
14832 _ACEOF
14833
14834 fi
14835
14836 ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
14837 if test "x$ac_cv_type_uint8_t" = xyes; then :
14838
14839 else
14840
14841 cat >>confdefs.h <<_ACEOF
14842 #define uint8_t unsigned char
14843 _ACEOF
14844
14845 fi
14846
14847 ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
14848 if test "x$ac_cv_type_uint16_t" = xyes; then :
14849
14850 else
14851
14852 cat >>confdefs.h <<_ACEOF
14853 #define uint16_t unsigned short
14854 _ACEOF
14855
14856 fi
14857
14858 ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
14859 if test "x$ac_cv_type_uint32_t" = xyes; then :
14860
14861 else
14862
14863 cat >>confdefs.h <<_ACEOF
14864 #define uint32_t unsigned int
14865 _ACEOF
14866
14867 fi
14868
14869 ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
14870 if test "x$ac_cv_type_uint64_t" = xyes; then :
14871
14872 else
14873
14874 cat >>confdefs.h <<_ACEOF
14875 #define uint64_t unsigned long long
14876 _ACEOF
14877
14878 fi
14879
14880 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14881 if test "x$ac_cv_type_size_t" = xyes; then :
14882
14883 else
14884
14885 cat >>confdefs.h <<_ACEOF
14886 #define size_t unsigned int
14887 _ACEOF
14888
14889 fi
14890
14891 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
14892 if test "x$ac_cv_type_ssize_t" = xyes; then :
14893
14894 else
14895
14896 cat >>confdefs.h <<_ACEOF
14897 #define ssize_t int
14898 _ACEOF
14899
14900 fi
14901
14902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
14903 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
14904 if ${ac_cv_type_uid_t+:} false; then :
14905   $as_echo_n "(cached) " >&6
14906 else
14907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14908 /* end confdefs.h.  */
14909 #include <sys/types.h>
14910
14911 _ACEOF
14912 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14913   $EGREP "uid_t" >/dev/null 2>&1; then :
14914   ac_cv_type_uid_t=yes
14915 else
14916   ac_cv_type_uid_t=no
14917 fi
14918 rm -f conftest*
14919
14920 fi
14921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
14922 $as_echo "$ac_cv_type_uid_t" >&6; }
14923 if test $ac_cv_type_uid_t = no; then
14924
14925 $as_echo "#define uid_t int" >>confdefs.h
14926
14927
14928 $as_echo "#define gid_t int" >>confdefs.h
14929
14930 fi
14931
14932 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14933 if test "x$ac_cv_type_pid_t" = xyes; then :
14934
14935 else
14936
14937 cat >>confdefs.h <<_ACEOF
14938 #define pid_t int
14939 _ACEOF
14940
14941 fi
14942
14943 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
14944 if test "x$ac_cv_type_off_t" = xyes; then :
14945
14946 else
14947
14948 cat >>confdefs.h <<_ACEOF
14949 #define off_t long int
14950 _ACEOF
14951
14952 fi
14953
14954 ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
14955 $ac_includes_default
14956 #ifdef HAVE_WINSOCK2_H
14957 #  include <winsock2.h>
14958 #endif
14959
14960 "
14961 if test "x$ac_cv_type_u_char" = xyes; then :
14962
14963 else
14964
14965 $as_echo "#define u_char unsigned char" >>confdefs.h
14966
14967 fi
14968
14969 ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
14970 $ac_includes_default
14971 #ifdef HAVE_SYS_RESOURCE_H
14972 #  include <sys/resource.h>
14973 #endif
14974
14975 "
14976 if test "x$ac_cv_type_rlim_t" = xyes; then :
14977
14978 else
14979
14980 $as_echo "#define rlim_t unsigned long" >>confdefs.h
14981
14982 fi
14983
14984
14985 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
14986 $ac_includes_default
14987 #ifdef HAVE_SYS_SOCKET_H
14988 #  include <sys/socket.h>
14989 #endif
14990 #ifdef HAVE_WS2TCPIP_H
14991 #  include <ws2tcpip.h>
14992 #endif
14993
14994 "
14995 if test "x$ac_cv_type_socklen_t" = xyes; then :
14996
14997 else
14998
14999 $as_echo "#define socklen_t int" >>confdefs.h
15000
15001 fi
15002
15003  ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
15004 $ac_includes_default
15005 #ifdef HAVE_SYS_TYPES_H
15006 # include <sys/types.h>
15007 #endif
15008 #ifdef HAVE_NETINET_IN_H
15009 # include <netinet/in.h>
15010 #endif
15011
15012 "
15013 if test "x$ac_cv_type_in_addr_t" = xyes; then :
15014
15015 else
15016
15017 $as_echo "#define in_addr_t uint32_t" >>confdefs.h
15018
15019 fi
15020
15021  ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
15022 $ac_includes_default
15023 #ifdef HAVE_SYS_TYPES_H
15024 # include <sys/types.h>
15025 #endif
15026 #ifdef HAVE_NETINET_IN_H
15027 # include <netinet/in.h>
15028 #endif
15029
15030 "
15031 if test "x$ac_cv_type_in_port_t" = xyes; then :
15032
15033 else
15034
15035 $as_echo "#define in_port_t uint16_t" >>confdefs.h
15036
15037 fi
15038
15039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
15040 $as_echo_n "checking if memcmp compares unsigned... " >&6; }
15041 if test "$cross_compiling" = yes; then :
15042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
15043 $as_echo "cross-compile no" >&6; }
15044
15045 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
15046
15047   case " $LIBOBJS " in
15048   *" memcmp.$ac_objext "* ) ;;
15049   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
15050  ;;
15051 esac
15052
15053
15054 else
15055   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15056 /* end confdefs.h.  */
15057
15058 #include <stdio.h>
15059 #include <stdlib.h>
15060 #include <string.h>
15061 int main(void)
15062 {
15063         char a = 255, b = 0;
15064         if(memcmp(&a, &b, 1) < 0)
15065                 return 1;
15066         return 0;
15067 }
15068
15069 _ACEOF
15070 if ac_fn_c_try_run "$LINENO"; then :
15071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15072 $as_echo "yes" >&6; }
15073 else
15074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15075 $as_echo "no" >&6; }
15076
15077 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
15078
15079   case " $LIBOBJS " in
15080   *" memcmp.$ac_objext "* ) ;;
15081   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
15082  ;;
15083 esac
15084
15085
15086 fi
15087 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15088   conftest.$ac_objext conftest.beam conftest.$ac_ext
15089 fi
15090
15091
15092 # The cast to long int works around a bug in the HP C Compiler
15093 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15094 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15095 # This bug is HP SR number 8606223364.
15096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
15097 $as_echo_n "checking size of time_t... " >&6; }
15098 if ${ac_cv_sizeof_time_t+:} false; then :
15099   $as_echo_n "(cached) " >&6
15100 else
15101   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
15102 $ac_includes_default
15103 #ifdef TIME_WITH_SYS_TIME
15104 # include <sys/time.h>
15105 # include <time.h>
15106 #else
15107 # ifdef HAVE_SYS_TIME_H
15108 #  include <sys/time.h>
15109 # else
15110 #  include <time.h>
15111 # endif
15112 #endif
15113
15114 "; then :
15115
15116 else
15117   if test "$ac_cv_type_time_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 (time_t)
15121 See \`config.log' for more details" "$LINENO" 5; }
15122    else
15123      ac_cv_sizeof_time_t=0
15124    fi
15125 fi
15126
15127 fi
15128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
15129 $as_echo "$ac_cv_sizeof_time_t" >&6; }
15130
15131
15132
15133 cat >>confdefs.h <<_ACEOF
15134 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
15135 _ACEOF
15136
15137
15138 # The cast to long int works around a bug in the HP C Compiler
15139 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15140 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15141 # This bug is HP SR number 8606223364.
15142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
15143 $as_echo_n "checking size of size_t... " >&6; }
15144 if ${ac_cv_sizeof_size_t+:} false; then :
15145   $as_echo_n "(cached) " >&6
15146 else
15147   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
15148
15149 else
15150   if test "$ac_cv_type_size_t" = yes; then
15151      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15152 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15153 as_fn_error 77 "cannot compute sizeof (size_t)
15154 See \`config.log' for more details" "$LINENO" 5; }
15155    else
15156      ac_cv_sizeof_size_t=0
15157    fi
15158 fi
15159
15160 fi
15161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
15162 $as_echo "$ac_cv_sizeof_size_t" >&6; }
15163
15164
15165
15166 cat >>confdefs.h <<_ACEOF
15167 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
15168 _ACEOF
15169
15170
15171
15172 # add option to disable the evil rpath
15173
15174 # Check whether --enable-rpath was given.
15175 if test "${enable_rpath+set}" = set; then :
15176   enableval=$enable_rpath; enable_rpath=$enableval
15177 else
15178   enable_rpath=yes
15179 fi
15180
15181 if test "x$enable_rpath" = xno; then
15182                 ac_config_commands="$ac_config_commands disable-rpath"
15183
15184 fi
15185
15186
15187
15188 # check to see if libraries are needed for these functions.
15189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
15190 $as_echo_n "checking for library containing inet_pton... " >&6; }
15191 if ${ac_cv_search_inet_pton+:} false; then :
15192   $as_echo_n "(cached) " >&6
15193 else
15194   ac_func_search_save_LIBS=$LIBS
15195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15196 /* end confdefs.h.  */
15197
15198 /* Override any GCC internal prototype to avoid an error.
15199    Use char because int might match the return type of a GCC
15200    builtin and then its argument prototype would still apply.  */
15201 #ifdef __cplusplus
15202 extern "C"
15203 #endif
15204 char inet_pton ();
15205 int
15206 main ()
15207 {
15208 return inet_pton ();
15209   ;
15210   return 0;
15211 }
15212 _ACEOF
15213 for ac_lib in '' nsl; do
15214   if test -z "$ac_lib"; then
15215     ac_res="none required"
15216   else
15217     ac_res=-l$ac_lib
15218     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15219   fi
15220   if ac_fn_c_try_link "$LINENO"; then :
15221   ac_cv_search_inet_pton=$ac_res
15222 fi
15223 rm -f core conftest.err conftest.$ac_objext \
15224     conftest$ac_exeext
15225   if ${ac_cv_search_inet_pton+:} false; then :
15226   break
15227 fi
15228 done
15229 if ${ac_cv_search_inet_pton+:} false; then :
15230
15231 else
15232   ac_cv_search_inet_pton=no
15233 fi
15234 rm conftest.$ac_ext
15235 LIBS=$ac_func_search_save_LIBS
15236 fi
15237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
15238 $as_echo "$ac_cv_search_inet_pton" >&6; }
15239 ac_res=$ac_cv_search_inet_pton
15240 if test "$ac_res" != no; then :
15241   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15242
15243 fi
15244
15245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
15246 $as_echo_n "checking for library containing socket... " >&6; }
15247 if ${ac_cv_search_socket+:} false; then :
15248   $as_echo_n "(cached) " >&6
15249 else
15250   ac_func_search_save_LIBS=$LIBS
15251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15252 /* end confdefs.h.  */
15253
15254 /* Override any GCC internal prototype to avoid an error.
15255    Use char because int might match the return type of a GCC
15256    builtin and then its argument prototype would still apply.  */
15257 #ifdef __cplusplus
15258 extern "C"
15259 #endif
15260 char socket ();
15261 int
15262 main ()
15263 {
15264 return socket ();
15265   ;
15266   return 0;
15267 }
15268 _ACEOF
15269 for ac_lib in '' socket; do
15270   if test -z "$ac_lib"; then
15271     ac_res="none required"
15272   else
15273     ac_res=-l$ac_lib
15274     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15275   fi
15276   if ac_fn_c_try_link "$LINENO"; then :
15277   ac_cv_search_socket=$ac_res
15278 fi
15279 rm -f core conftest.err conftest.$ac_objext \
15280     conftest$ac_exeext
15281   if ${ac_cv_search_socket+:} false; then :
15282   break
15283 fi
15284 done
15285 if ${ac_cv_search_socket+:} false; then :
15286
15287 else
15288   ac_cv_search_socket=no
15289 fi
15290 rm conftest.$ac_ext
15291 LIBS=$ac_func_search_save_LIBS
15292 fi
15293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
15294 $as_echo "$ac_cv_search_socket" >&6; }
15295 ac_res=$ac_cv_search_socket
15296 if test "$ac_res" != no; then :
15297   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15298
15299 fi
15300
15301
15302 # check wether strptime also works
15303
15304 # check some functions of the OS before linking libs (while still runnable).
15305 for ac_header in unistd.h
15306 do :
15307   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
15308 if test "x$ac_cv_header_unistd_h" = xyes; then :
15309   cat >>confdefs.h <<_ACEOF
15310 #define HAVE_UNISTD_H 1
15311 _ACEOF
15312
15313 fi
15314
15315 done
15316
15317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
15318 $as_echo_n "checking for working chown... " >&6; }
15319 if ${ac_cv_func_chown_works+:} false; then :
15320   $as_echo_n "(cached) " >&6
15321 else
15322   if test "$cross_compiling" = yes; then :
15323   ac_cv_func_chown_works=no
15324 else
15325   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15326 /* end confdefs.h.  */
15327 $ac_includes_default
15328 #include <fcntl.h>
15329
15330 int
15331 main ()
15332 {
15333   char *f = "conftest.chown";
15334   struct stat before, after;
15335
15336   if (creat (f, 0600) < 0)
15337     return 1;
15338   if (stat (f, &before) < 0)
15339     return 1;
15340   if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
15341     return 1;
15342   if (stat (f, &after) < 0)
15343     return 1;
15344   return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
15345
15346   ;
15347   return 0;
15348 }
15349 _ACEOF
15350 if ac_fn_c_try_run "$LINENO"; then :
15351   ac_cv_func_chown_works=yes
15352 else
15353   ac_cv_func_chown_works=no
15354 fi
15355 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15356   conftest.$ac_objext conftest.beam conftest.$ac_ext
15357 fi
15358
15359 rm -f conftest.chown
15360
15361 fi
15362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
15363 $as_echo "$ac_cv_func_chown_works" >&6; }
15364 if test $ac_cv_func_chown_works = yes; then
15365
15366 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
15367
15368 fi
15369
15370 for ac_header in vfork.h
15371 do :
15372   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15373 if test "x$ac_cv_header_vfork_h" = xyes; then :
15374   cat >>confdefs.h <<_ACEOF
15375 #define HAVE_VFORK_H 1
15376 _ACEOF
15377
15378 fi
15379
15380 done
15381
15382 for ac_func in fork vfork
15383 do :
15384   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15385 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15386 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15387   cat >>confdefs.h <<_ACEOF
15388 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15389 _ACEOF
15390
15391 fi
15392 done
15393
15394 if test "x$ac_cv_func_fork" = xyes; then
15395   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15396 $as_echo_n "checking for working fork... " >&6; }
15397 if ${ac_cv_func_fork_works+:} false; then :
15398   $as_echo_n "(cached) " >&6
15399 else
15400   if test "$cross_compiling" = yes; then :
15401   ac_cv_func_fork_works=cross
15402 else
15403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15404 /* end confdefs.h.  */
15405 $ac_includes_default
15406 int
15407 main ()
15408 {
15409
15410           /* By Ruediger Kuhlmann. */
15411           return fork () < 0;
15412
15413   ;
15414   return 0;
15415 }
15416 _ACEOF
15417 if ac_fn_c_try_run "$LINENO"; then :
15418   ac_cv_func_fork_works=yes
15419 else
15420   ac_cv_func_fork_works=no
15421 fi
15422 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15423   conftest.$ac_objext conftest.beam conftest.$ac_ext
15424 fi
15425
15426 fi
15427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15428 $as_echo "$ac_cv_func_fork_works" >&6; }
15429
15430 else
15431   ac_cv_func_fork_works=$ac_cv_func_fork
15432 fi
15433 if test "x$ac_cv_func_fork_works" = xcross; then
15434   case $host in
15435     *-*-amigaos* | *-*-msdosdjgpp*)
15436       # Override, as these systems have only a dummy fork() stub
15437       ac_cv_func_fork_works=no
15438       ;;
15439     *)
15440       ac_cv_func_fork_works=yes
15441       ;;
15442   esac
15443   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15444 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15445 fi
15446 ac_cv_func_vfork_works=$ac_cv_func_vfork
15447 if test "x$ac_cv_func_vfork" = xyes; then
15448   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15449 $as_echo_n "checking for working vfork... " >&6; }
15450 if ${ac_cv_func_vfork_works+:} false; then :
15451   $as_echo_n "(cached) " >&6
15452 else
15453   if test "$cross_compiling" = yes; then :
15454   ac_cv_func_vfork_works=cross
15455 else
15456   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15457 /* end confdefs.h.  */
15458 /* Thanks to Paul Eggert for this test.  */
15459 $ac_includes_default
15460 #include <sys/wait.h>
15461 #ifdef HAVE_VFORK_H
15462 # include <vfork.h>
15463 #endif
15464 /* On some sparc systems, changes by the child to local and incoming
15465    argument registers are propagated back to the parent.  The compiler
15466    is told about this with #include <vfork.h>, but some compilers
15467    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15468    static variable whose address is put into a register that is
15469    clobbered by the vfork.  */
15470 static void
15471 #ifdef __cplusplus
15472 sparc_address_test (int arg)
15473 # else
15474 sparc_address_test (arg) int arg;
15475 #endif
15476 {
15477   static pid_t child;
15478   if (!child) {
15479     child = vfork ();
15480     if (child < 0) {
15481       perror ("vfork");
15482       _exit(2);
15483     }
15484     if (!child) {
15485       arg = getpid();
15486       write(-1, "", 0);
15487       _exit (arg);
15488     }
15489   }
15490 }
15491
15492 int
15493 main ()
15494 {
15495   pid_t parent = getpid ();
15496   pid_t child;
15497
15498   sparc_address_test (0);
15499
15500   child = vfork ();
15501
15502   if (child == 0) {
15503     /* Here is another test for sparc vfork register problems.  This
15504        test uses lots of local variables, at least as many local
15505        variables as main has allocated so far including compiler
15506        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15507        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15508        reuse the register of parent for one of the local variables,
15509        since it will think that parent can't possibly be used any more
15510        in this routine.  Assigning to the local variable will thus
15511        munge parent in the parent process.  */
15512     pid_t
15513       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15514       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15515     /* Convince the compiler that p..p7 are live; otherwise, it might
15516        use the same hardware register for all 8 local variables.  */
15517     if (p != p1 || p != p2 || p != p3 || p != p4
15518         || p != p5 || p != p6 || p != p7)
15519       _exit(1);
15520
15521     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15522        from child file descriptors.  If the child closes a descriptor
15523        before it execs or exits, this munges the parent's descriptor
15524        as well.  Test for this by closing stdout in the child.  */
15525     _exit(close(fileno(stdout)) != 0);
15526   } else {
15527     int status;
15528     struct stat st;
15529
15530     while (wait(&status) != child)
15531       ;
15532     return (
15533          /* Was there some problem with vforking?  */
15534          child < 0
15535
15536          /* Did the child fail?  (This shouldn't happen.)  */
15537          || status
15538
15539          /* Did the vfork/compiler bug occur?  */
15540          || parent != getpid()
15541
15542          /* Did the file descriptor bug occur?  */
15543          || fstat(fileno(stdout), &st) != 0
15544          );
15545   }
15546 }
15547 _ACEOF
15548 if ac_fn_c_try_run "$LINENO"; then :
15549   ac_cv_func_vfork_works=yes
15550 else
15551   ac_cv_func_vfork_works=no
15552 fi
15553 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15554   conftest.$ac_objext conftest.beam conftest.$ac_ext
15555 fi
15556
15557 fi
15558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15559 $as_echo "$ac_cv_func_vfork_works" >&6; }
15560
15561 fi;
15562 if test "x$ac_cv_func_fork_works" = xcross; then
15563   ac_cv_func_vfork_works=$ac_cv_func_vfork
15564   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15565 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15566 fi
15567
15568 if test "x$ac_cv_func_vfork_works" = xyes; then
15569
15570 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15571
15572 else
15573
15574 $as_echo "#define vfork fork" >>confdefs.h
15575
15576 fi
15577 if test "x$ac_cv_func_fork_works" = xyes; then
15578
15579 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15580
15581 fi
15582
15583
15584 $as_echo "#define RETSIGTYPE void" >>confdefs.h
15585
15586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15587 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15588 if ${ac_cv_sys_largefile_source+:} false; then :
15589   $as_echo_n "(cached) " >&6
15590 else
15591   while :; do
15592   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15593 /* end confdefs.h.  */
15594 #include <sys/types.h> /* for off_t */
15595      #include <stdio.h>
15596 int
15597 main ()
15598 {
15599 int (*fp) (FILE *, off_t, int) = fseeko;
15600      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15601   ;
15602   return 0;
15603 }
15604 _ACEOF
15605 if ac_fn_c_try_link "$LINENO"; then :
15606   ac_cv_sys_largefile_source=no; break
15607 fi
15608 rm -f core conftest.err conftest.$ac_objext \
15609     conftest$ac_exeext conftest.$ac_ext
15610   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15611 /* end confdefs.h.  */
15612 #define _LARGEFILE_SOURCE 1
15613 #include <sys/types.h> /* for off_t */
15614      #include <stdio.h>
15615 int
15616 main ()
15617 {
15618 int (*fp) (FILE *, off_t, int) = fseeko;
15619      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15620   ;
15621   return 0;
15622 }
15623 _ACEOF
15624 if ac_fn_c_try_link "$LINENO"; then :
15625   ac_cv_sys_largefile_source=1; break
15626 fi
15627 rm -f core conftest.err conftest.$ac_objext \
15628     conftest$ac_exeext conftest.$ac_ext
15629   ac_cv_sys_largefile_source=unknown
15630   break
15631 done
15632 fi
15633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15634 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15635 case $ac_cv_sys_largefile_source in #(
15636   no | unknown) ;;
15637   *)
15638 cat >>confdefs.h <<_ACEOF
15639 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15640 _ACEOF
15641 ;;
15642 esac
15643 rm -rf conftest*
15644
15645 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15646 # in glibc 2.1.3, but that breaks too many other things.
15647 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15648 if test $ac_cv_sys_largefile_source != unknown; then
15649
15650 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15651
15652 fi
15653
15654
15655 # Check whether --enable-largefile was given.
15656 if test "${enable_largefile+set}" = set; then :
15657   enableval=$enable_largefile;
15658 fi
15659
15660 if test "$enable_largefile" != no; then
15661
15662   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15663 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15664 if ${ac_cv_sys_largefile_CC+:} false; then :
15665   $as_echo_n "(cached) " >&6
15666 else
15667   ac_cv_sys_largefile_CC=no
15668      if test "$GCC" != yes; then
15669        ac_save_CC=$CC
15670        while :; do
15671          # IRIX 6.2 and later do not support large files by default,
15672          # so use the C compiler's -n32 option if that helps.
15673          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15674 /* end confdefs.h.  */
15675 #include <sys/types.h>
15676  /* Check that off_t can represent 2**63 - 1 correctly.
15677     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15678     since some C++ compilers masquerading as C compilers
15679     incorrectly reject 9223372036854775807.  */
15680 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15681   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15682                        && LARGE_OFF_T % 2147483647 == 1)
15683                       ? 1 : -1];
15684 int
15685 main ()
15686 {
15687
15688   ;
15689   return 0;
15690 }
15691 _ACEOF
15692          if ac_fn_c_try_compile "$LINENO"; then :
15693   break
15694 fi
15695 rm -f core conftest.err conftest.$ac_objext
15696          CC="$CC -n32"
15697          if ac_fn_c_try_compile "$LINENO"; then :
15698   ac_cv_sys_largefile_CC=' -n32'; break
15699 fi
15700 rm -f core conftest.err conftest.$ac_objext
15701          break
15702        done
15703        CC=$ac_save_CC
15704        rm -f conftest.$ac_ext
15705     fi
15706 fi
15707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15708 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15709   if test "$ac_cv_sys_largefile_CC" != no; then
15710     CC=$CC$ac_cv_sys_largefile_CC
15711   fi
15712
15713   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15714 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15715 if ${ac_cv_sys_file_offset_bits+:} false; then :
15716   $as_echo_n "(cached) " >&6
15717 else
15718   while :; do
15719   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15720 /* end confdefs.h.  */
15721 #include <sys/types.h>
15722  /* Check that off_t can represent 2**63 - 1 correctly.
15723     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15724     since some C++ compilers masquerading as C compilers
15725     incorrectly reject 9223372036854775807.  */
15726 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15727   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15728                        && LARGE_OFF_T % 2147483647 == 1)
15729                       ? 1 : -1];
15730 int
15731 main ()
15732 {
15733
15734   ;
15735   return 0;
15736 }
15737 _ACEOF
15738 if ac_fn_c_try_compile "$LINENO"; then :
15739   ac_cv_sys_file_offset_bits=no; break
15740 fi
15741 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15742   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15743 /* end confdefs.h.  */
15744 #define _FILE_OFFSET_BITS 64
15745 #include <sys/types.h>
15746  /* Check that off_t can represent 2**63 - 1 correctly.
15747     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15748     since some C++ compilers masquerading as C compilers
15749     incorrectly reject 9223372036854775807.  */
15750 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15751   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15752                        && LARGE_OFF_T % 2147483647 == 1)
15753                       ? 1 : -1];
15754 int
15755 main ()
15756 {
15757
15758   ;
15759   return 0;
15760 }
15761 _ACEOF
15762 if ac_fn_c_try_compile "$LINENO"; then :
15763   ac_cv_sys_file_offset_bits=64; break
15764 fi
15765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15766   ac_cv_sys_file_offset_bits=unknown
15767   break
15768 done
15769 fi
15770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15771 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15772 case $ac_cv_sys_file_offset_bits in #(
15773   no | unknown) ;;
15774   *)
15775 cat >>confdefs.h <<_ACEOF
15776 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15777 _ACEOF
15778 ;;
15779 esac
15780 rm -rf conftest*
15781   if test $ac_cv_sys_file_offset_bits = unknown; then
15782     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15783 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15784 if ${ac_cv_sys_large_files+:} false; then :
15785   $as_echo_n "(cached) " >&6
15786 else
15787   while :; do
15788   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15789 /* end confdefs.h.  */
15790 #include <sys/types.h>
15791  /* Check that off_t can represent 2**63 - 1 correctly.
15792     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15793     since some C++ compilers masquerading as C compilers
15794     incorrectly reject 9223372036854775807.  */
15795 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15796   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15797                        && LARGE_OFF_T % 2147483647 == 1)
15798                       ? 1 : -1];
15799 int
15800 main ()
15801 {
15802
15803   ;
15804   return 0;
15805 }
15806 _ACEOF
15807 if ac_fn_c_try_compile "$LINENO"; then :
15808   ac_cv_sys_large_files=no; break
15809 fi
15810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15811   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15812 /* end confdefs.h.  */
15813 #define _LARGE_FILES 1
15814 #include <sys/types.h>
15815  /* Check that off_t can represent 2**63 - 1 correctly.
15816     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15817     since some C++ compilers masquerading as C compilers
15818     incorrectly reject 9223372036854775807.  */
15819 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15820   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15821                        && LARGE_OFF_T % 2147483647 == 1)
15822                       ? 1 : -1];
15823 int
15824 main ()
15825 {
15826
15827   ;
15828   return 0;
15829 }
15830 _ACEOF
15831 if ac_fn_c_try_compile "$LINENO"; then :
15832   ac_cv_sys_large_files=1; break
15833 fi
15834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15835   ac_cv_sys_large_files=unknown
15836   break
15837 done
15838 fi
15839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15840 $as_echo "$ac_cv_sys_large_files" >&6; }
15841 case $ac_cv_sys_large_files in #(
15842   no | unknown) ;;
15843   *)
15844 cat >>confdefs.h <<_ACEOF
15845 #define _LARGE_FILES $ac_cv_sys_large_files
15846 _ACEOF
15847 ;;
15848 esac
15849 rm -rf conftest*
15850   fi
15851
15852
15853 fi
15854
15855
15856
15857
15858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
15859 $as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
15860 cache=_D_LARGEFILE_SOURCE_1
15861 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
15862   $as_echo_n "(cached) " >&6
15863 else
15864
15865 echo '
15866 #include <stdio.h>
15867 int test() {
15868         int a = fseeko(stdin, 0, 0);
15869         return a;
15870 }
15871 ' > conftest.c
15872 echo 'void f(){}' >>conftest.c
15873 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
15874 eval "cv_prog_cc_flag_needed_$cache=no"
15875 else
15876
15877 if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
15878 eval "cv_prog_cc_flag_needed_$cache=yes"
15879 else
15880 eval "cv_prog_cc_flag_needed_$cache=fail"
15881 #echo 'Test with flag fails too!'
15882 #cat conftest.c
15883 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15884 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15885 #exit 1
15886 fi
15887
15888 fi
15889 rm -f conftest conftest.c conftest.o
15890
15891 fi
15892
15893 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
15894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15895 $as_echo "yes" >&6; }
15896 :
15897 CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
15898 else
15899 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
15900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15901 $as_echo "no" >&6; }
15902 #echo 'Test with flag is no!'
15903 #cat conftest.c
15904 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15905 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15906 #exit 1
15907 :
15908
15909 else
15910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15911 $as_echo "failed" >&6; }
15912 :
15913
15914 fi
15915 fi
15916
15917
15918
15919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
15920 $as_echo_n "checking if nonblocking sockets work... " >&6; }
15921 if echo $target | grep mingw32 >/dev/null; then
15922         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
15923 $as_echo "no (windows)" >&6; }
15924
15925 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15926
15927 else
15928 if test "$cross_compiling" = yes; then :
15929
15930         { $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
15931 $as_echo "crosscompile(yes)" >&6; }
15932
15933 else
15934   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15935 /* end confdefs.h.  */
15936
15937
15938 #include <stdio.h>
15939 #include <string.h>
15940 #include <stdlib.h>
15941 #include <fcntl.h>
15942 #include <errno.h>
15943 #ifdef HAVE_SYS_TYPES_H
15944 #include <sys/types.h>
15945 #endif
15946 #ifdef HAVE_SYS_SOCKET_H
15947 #include <sys/socket.h>
15948 #endif
15949 #ifdef HAVE_NETINET_IN_H
15950 #include <netinet/in.h>
15951 #endif
15952 #ifdef HAVE_ARPA_INET_H
15953 #include <arpa/inet.h>
15954 #endif
15955 #ifdef HAVE_UNISTD_H
15956 #include <unistd.h>
15957 #endif
15958 #ifdef HAVE_TIME_H
15959 #include <time.h>
15960 #endif
15961
15962 int main(void)
15963 {
15964         int port;
15965         int sfd, cfd;
15966         int num = 10;
15967         int i, p;
15968         struct sockaddr_in a;
15969         /* test if select and nonblocking reads work well together */
15970         /* open port.
15971            fork child to send 10 messages.
15972            select to read.
15973            then try to nonblocking read the 10 messages
15974            then, nonblocking read must give EAGAIN
15975         */
15976
15977         port = 12345 + (time(0)%32);
15978         sfd = socket(PF_INET, SOCK_DGRAM, 0);
15979         if(sfd == -1) {
15980                 perror("socket");
15981                 return 1;
15982         }
15983         memset(&a, 0, sizeof(a));
15984         a.sin_family = AF_INET;
15985         a.sin_port = htons(port);
15986         a.sin_addr.s_addr = inet_addr("127.0.0.1");
15987         if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15988                 perror("bind");
15989                 return 1;
15990         }
15991         if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
15992                 perror("fcntl");
15993                 return 1;
15994         }
15995
15996         cfd = socket(PF_INET, SOCK_DGRAM, 0);
15997         if(cfd == -1) {
15998                 perror("client socket");
15999                 return 1;
16000         }
16001         a.sin_port = 0;
16002         if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
16003                 perror("client bind");
16004                 return 1;
16005         }
16006         a.sin_port = htons(port);
16007
16008         /* no handler, causes exit in 10 seconds */
16009         alarm(10);
16010
16011         /* send and receive on the socket */
16012         if((p=fork()) == 0) {
16013                 for(i=0; i<num; i++) {
16014                         if(sendto(cfd, &i, sizeof(i), 0,
16015                                 (struct sockaddr*)&a, sizeof(a)) < 0) {
16016                                 perror("sendto");
16017                                 return 1;
16018                         }
16019                 }
16020         } else {
16021                 /* parent */
16022                 fd_set rset;
16023                 int x;
16024                 if(p == -1) {
16025                         perror("fork");
16026                         return 1;
16027                 }
16028                 FD_ZERO(&rset);
16029                 FD_SET(sfd, &rset);
16030                 if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
16031                         perror("select");
16032                         return 1;
16033                 }
16034                 i = 0;
16035                 while(i < num) {
16036                         if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
16037                                 if(errno == EAGAIN)
16038                                         continue;
16039                                 perror("recv");
16040                                 return 1;
16041                         }
16042                         i++;
16043                 }
16044                 /* now we want to get EAGAIN: nonblocking goodness */
16045                 errno = 0;
16046                 recv(sfd, &x, sizeof(x), 0);
16047                 if(errno != EAGAIN) {
16048                         perror("trying to recv again");
16049                         return 1;
16050                 }
16051                 /* EAGAIN encountered */
16052         }
16053
16054         close(sfd);
16055         close(cfd);
16056         return 0;
16057 }
16058
16059 _ACEOF
16060 if ac_fn_c_try_run "$LINENO"; then :
16061
16062         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16063 $as_echo "yes" >&6; }
16064
16065 else
16066
16067         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16068 $as_echo "no" >&6; }
16069
16070 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
16071
16072
16073 fi
16074 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16075   conftest.$ac_objext conftest.beam conftest.$ac_ext
16076 fi
16077
16078 fi
16079
16080
16081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
16082 $as_echo_n "checking whether mkdir has one arg... " >&6; }
16083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16084 /* end confdefs.h.  */
16085
16086 #include <stdio.h>
16087 #include <unistd.h>
16088 #ifdef HAVE_WINSOCK2_H
16089 #include <winsock2.h>
16090 #endif
16091 #ifdef HAVE_SYS_STAT_H
16092 #include <sys/stat.h>
16093 #endif
16094
16095 int
16096 main ()
16097 {
16098
16099         (void)mkdir("directory");
16100
16101   ;
16102   return 0;
16103 }
16104 _ACEOF
16105 if ac_fn_c_try_compile "$LINENO"; then :
16106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16107 $as_echo "yes" >&6; }
16108
16109 $as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
16110
16111
16112 else
16113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16114 $as_echo "no" >&6; }
16115
16116 fi
16117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16118
16119 for ac_func in strptime
16120 do :
16121   ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
16122 if test "x$ac_cv_func_strptime" = xyes; then :
16123   cat >>confdefs.h <<_ACEOF
16124 #define HAVE_STRPTIME 1
16125 _ACEOF
16126
16127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
16128 $as_echo_n "checking whether strptime works... " >&6; }
16129 if test c${cross_compiling} = cno; then
16130 if test "$cross_compiling" = yes; then :
16131   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16132 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16133 as_fn_error $? "cannot run test program while cross compiling
16134 See \`config.log' for more details" "$LINENO" 5; }
16135 else
16136   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16137 /* end confdefs.h.  */
16138
16139 #define _XOPEN_SOURCE 600
16140 #include <time.h>
16141 int main(void) { struct tm tm; char *res;
16142 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);
16143 if (!res) return 2;
16144 res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
16145 if (!res) return 1; return 0; }
16146
16147 _ACEOF
16148 if ac_fn_c_try_run "$LINENO"; then :
16149   eval "ac_cv_c_strptime_works=yes"
16150 else
16151   eval "ac_cv_c_strptime_works=no"
16152 fi
16153 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16154   conftest.$ac_objext conftest.beam conftest.$ac_ext
16155 fi
16156
16157 else
16158 eval "ac_cv_c_strptime_works=maybe"
16159 fi
16160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
16161 $as_echo "$ac_cv_c_strptime_works" >&6; }
16162 if test $ac_cv_c_strptime_works = no; then
16163 case " $LIBOBJS " in
16164   *" strptime.$ac_objext "* ) ;;
16165   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
16166  ;;
16167 esac
16168
16169 else
16170
16171 cat >>confdefs.h <<_ACEOF
16172 #define STRPTIME_WORKS 1
16173 _ACEOF
16174
16175 fi
16176
16177 else
16178   case " $LIBOBJS " in
16179   *" strptime.$ac_objext "* ) ;;
16180   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
16181  ;;
16182 esac
16183
16184 fi
16185 done
16186
16187
16188 # check if we can use SO_REUSEPORT
16189 if echo "$host" | $GREP -i -e linux -e dragonfly >/dev/null; then
16190
16191 $as_echo "#define REUSEPORT_DEFAULT 1" >>confdefs.h
16192
16193 else
16194
16195 $as_echo "#define REUSEPORT_DEFAULT 0" >>confdefs.h
16196
16197 fi
16198
16199 # Include systemd.m4 - begin
16200 #   macros for configuring systemd
16201 #   Copyright 2015, Sami Kerola, CloudFlare.
16202 #   BSD licensed.
16203 # Check whether --enable-systemd was given.
16204 if test "${enable_systemd+set}" = set; then :
16205   enableval=$enable_systemd;
16206 else
16207   enable_systemd=no
16208 fi
16209
16210 have_systemd=no
16211 if test "x$enable_systemd" != xno; then :
16212
16213
16214
16215 pkg_failed=no
16216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
16217 $as_echo_n "checking for SYSTEMD... " >&6; }
16218
16219 if test -n "$SYSTEMD_CFLAGS"; then
16220     pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
16221  elif test -n "$PKG_CONFIG"; then
16222     if test -n "$PKG_CONFIG" && \
16223     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
16224   ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
16225   ac_status=$?
16226   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16227   test $ac_status = 0; }; then
16228   pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
16229                       test "x$?" != "x0" && pkg_failed=yes
16230 else
16231   pkg_failed=yes
16232 fi
16233  else
16234     pkg_failed=untried
16235 fi
16236 if test -n "$SYSTEMD_LIBS"; then
16237     pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
16238  elif test -n "$PKG_CONFIG"; then
16239     if test -n "$PKG_CONFIG" && \
16240     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
16241   ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
16242   ac_status=$?
16243   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16244   test $ac_status = 0; }; then
16245   pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
16246                       test "x$?" != "x0" && pkg_failed=yes
16247 else
16248   pkg_failed=yes
16249 fi
16250  else
16251     pkg_failed=untried
16252 fi
16253
16254
16255
16256 if test $pkg_failed = yes; then
16257         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16258 $as_echo "no" >&6; }
16259
16260 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
16261         _pkg_short_errors_supported=yes
16262 else
16263         _pkg_short_errors_supported=no
16264 fi
16265         if test $_pkg_short_errors_supported = yes; then
16266                 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
16267         else
16268                 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
16269         fi
16270         # Put the nasty error message in config.log where it belongs
16271         echo "$SYSTEMD_PKG_ERRORS" >&5
16272
16273         have_systemd=no
16274 elif test $pkg_failed = untried; then
16275         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16276 $as_echo "no" >&6; }
16277         have_systemd=no
16278 else
16279         SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
16280         SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
16281         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16282 $as_echo "yes" >&6; }
16283         have_systemd=yes
16284 fi
16285                 if test "x$have_systemd" != "xyes"; then :
16286
16287
16288 pkg_failed=no
16289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
16290 $as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
16291
16292 if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
16293     pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
16294  elif test -n "$PKG_CONFIG"; then
16295     if test -n "$PKG_CONFIG" && \
16296     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
16297   ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
16298   ac_status=$?
16299   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16300   test $ac_status = 0; }; then
16301   pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
16302                       test "x$?" != "x0" && pkg_failed=yes
16303 else
16304   pkg_failed=yes
16305 fi
16306  else
16307     pkg_failed=untried
16308 fi
16309 if test -n "$SYSTEMD_DAEMON_LIBS"; then
16310     pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
16311  elif test -n "$PKG_CONFIG"; then
16312     if test -n "$PKG_CONFIG" && \
16313     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
16314   ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
16315   ac_status=$?
16316   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16317   test $ac_status = 0; }; then
16318   pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
16319                       test "x$?" != "x0" && pkg_failed=yes
16320 else
16321   pkg_failed=yes
16322 fi
16323  else
16324     pkg_failed=untried
16325 fi
16326
16327
16328
16329 if test $pkg_failed = yes; then
16330         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16331 $as_echo "no" >&6; }
16332
16333 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
16334         _pkg_short_errors_supported=yes
16335 else
16336         _pkg_short_errors_supported=no
16337 fi
16338         if test $_pkg_short_errors_supported = yes; then
16339                 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
16340         else
16341                 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
16342         fi
16343         # Put the nasty error message in config.log where it belongs
16344         echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
16345
16346         have_systemd_daemon=no
16347 elif test $pkg_failed = untried; then
16348         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16349 $as_echo "no" >&6; }
16350         have_systemd_daemon=no
16351 else
16352         SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
16353         SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
16354         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16355 $as_echo "yes" >&6; }
16356         have_systemd_daemon=yes
16357 fi
16358                 if test "x$have_systemd_daemon" = "xyes"; then :
16359   have_systemd=yes
16360 fi
16361
16362 fi
16363         case $enable_systemd:$have_systemd in #(
16364   yes:no) :
16365     as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
16366   *:yes) :
16367
16368 $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
16369
16370                 LIBS="$LIBS $SYSTEMD_LIBS"
16371
16372          ;; #(
16373   *) :
16374      ;;
16375 esac
16376
16377
16378 fi
16379  if test "x$have_systemd" = xyes; then
16380   USE_SYSTEMD_TRUE=
16381   USE_SYSTEMD_FALSE='#'
16382 else
16383   USE_SYSTEMD_TRUE='#'
16384   USE_SYSTEMD_FALSE=
16385 fi
16386
16387
16388 # Include systemd.m4 - end
16389
16390 # set memory allocation checking if requested
16391 # Check whether --enable-alloc-checks was given.
16392 if test "${enable_alloc_checks+set}" = set; then :
16393   enableval=$enable_alloc_checks;
16394 fi
16395
16396 # Check whether --enable-alloc-lite was given.
16397 if test "${enable_alloc_lite+set}" = set; then :
16398   enableval=$enable_alloc_lite;
16399 fi
16400
16401 # Check whether --enable-alloc-nonregional was given.
16402 if test "${enable_alloc_nonregional+set}" = set; then :
16403   enableval=$enable_alloc_nonregional;
16404 fi
16405
16406 if test x_$enable_alloc_nonregional = x_yes; then
16407
16408 $as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
16409
16410 fi
16411 if test x_$enable_alloc_checks = x_yes; then
16412
16413 $as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
16414
16415         SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo"
16416
16417         ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ="alloc.lo"
16418
16419 else
16420         if test x_$enable_alloc_lite = x_yes; then
16421
16422 $as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
16423
16424         else
16425
16426         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
16427 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
16428         if test "$cross_compiling" = yes; then :
16429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
16430 $as_echo "no (crosscompile)" >&6; }
16431         case " $LIBOBJS " in
16432   *" malloc.$ac_objext "* ) ;;
16433   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
16434  ;;
16435 esac
16436
16437
16438 cat >>confdefs.h <<_ACEOF
16439 #define malloc rpl_malloc_unbound
16440 _ACEOF
16441
16442 else
16443   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16444 /* end confdefs.h.  */
16445 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
16446 #include <stdlib.h>
16447 #else
16448 char *malloc ();
16449 #endif
16450
16451 int
16452 main ()
16453 {
16454  if(malloc(0) != 0) return 1;
16455   ;
16456   return 0;
16457 }
16458
16459 _ACEOF
16460 if ac_fn_c_try_run "$LINENO"; then :
16461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16462 $as_echo "no" >&6; }
16463         case " $LIBOBJS " in
16464   *" malloc.$ac_objext "* ) ;;
16465   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
16466  ;;
16467 esac
16468
16469
16470 cat >>confdefs.h <<_ACEOF
16471 #define malloc rpl_malloc_unbound
16472 _ACEOF
16473
16474 else
16475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16476 $as_echo "yes" >&6; }
16477
16478 $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
16479
16480 fi
16481 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16482   conftest.$ac_objext conftest.beam conftest.$ac_ext
16483 fi
16484
16485
16486         fi
16487 fi
16488
16489 # check windows threads (we use them, not pthreads, on windows).
16490 if test "$on_mingw" = "yes"; then
16491 # check windows threads
16492         for ac_header in windows.h
16493 do :
16494   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
16495 "
16496 if test "x$ac_cv_header_windows_h" = xyes; then :
16497   cat >>confdefs.h <<_ACEOF
16498 #define HAVE_WINDOWS_H 1
16499 _ACEOF
16500
16501 fi
16502
16503 done
16504
16505         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
16506 $as_echo_n "checking for CreateThread... " >&6; }
16507         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16508 /* end confdefs.h.  */
16509
16510 #ifdef HAVE_WINDOWS_H
16511 #include <windows.h>
16512 #endif
16513
16514 int
16515 main ()
16516 {
16517
16518         HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
16519
16520   ;
16521   return 0;
16522 }
16523 _ACEOF
16524 if ac_fn_c_try_compile "$LINENO"; then :
16525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16526 $as_echo "yes" >&6; }
16527
16528 $as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
16529
16530
16531 else
16532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16533 $as_echo "no" >&6; }
16534
16535 fi
16536 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16537
16538 else
16539 # not on mingw, check thread libraries.
16540
16541 # check for thread library.
16542 # check this first, so that the pthread lib does not get linked in via
16543 # libssl or libpython, and thus distorts the tests, and we end up using
16544 # the non-threadsafe C libraries.
16545
16546 # Check whether --with-pthreads was given.
16547 if test "${with_pthreads+set}" = set; then :
16548   withval=$with_pthreads;
16549 else
16550    withval="yes"
16551 fi
16552
16553 ub_have_pthreads=no
16554 if test x_$withval != x_no; then
16555
16556
16557 ac_ext=c
16558 ac_cpp='$CPP $CPPFLAGS'
16559 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16560 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16561 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16562
16563 ax_pthread_ok=no
16564
16565 # We used to check for pthread.h first, but this fails if pthread.h
16566 # requires special compiler flags (e.g. on True64 or Sequent).
16567 # It gets checked for in the link test anyway.
16568
16569 # First of all, check if the user has set any of the PTHREAD_LIBS,
16570 # etcetera environment variables, and if threads linking works using
16571 # them:
16572 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16573         save_CFLAGS="$CFLAGS"
16574         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16575         save_LIBS="$LIBS"
16576         LIBS="$PTHREAD_LIBS $LIBS"
16577         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16578 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
16579         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16580 /* end confdefs.h.  */
16581
16582 /* Override any GCC internal prototype to avoid an error.
16583    Use char because int might match the return type of a GCC
16584    builtin and then its argument prototype would still apply.  */
16585 #ifdef __cplusplus
16586 extern "C"
16587 #endif
16588 char pthread_join ();
16589 int
16590 main ()
16591 {
16592 return pthread_join ();
16593   ;
16594   return 0;
16595 }
16596 _ACEOF
16597 if ac_fn_c_try_link "$LINENO"; then :
16598   ax_pthread_ok=yes
16599 fi
16600 rm -f core conftest.err conftest.$ac_objext \
16601     conftest$ac_exeext conftest.$ac_ext
16602         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16603 $as_echo "$ax_pthread_ok" >&6; }
16604         if test x"$ax_pthread_ok" = xno; then
16605                 PTHREAD_LIBS=""
16606                 PTHREAD_CFLAGS=""
16607         fi
16608         LIBS="$save_LIBS"
16609         CFLAGS="$save_CFLAGS"
16610 fi
16611
16612 # We must check for the threads library under a number of different
16613 # names; the ordering is very important because some systems
16614 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16615 # libraries is broken (non-POSIX).
16616
16617 # Create a list of thread flags to try.  Items starting with a "-" are
16618 # C compiler flags, and other items are library names, except for "none"
16619 # which indicates that we try without any flags at all, and "pthread-config"
16620 # which is a program returning the flags for the Pth emulation library.
16621
16622 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
16623
16624 # The ordering *is* (sometimes) important.  Some notes on the
16625 # individual items follow:
16626
16627 # pthreads: AIX (must check this before -lpthread)
16628 # none: in case threads are in libc; should be tried before -Kthread and
16629 #       other compiler flags to prevent continual compiler warnings
16630 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16631 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16632 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16633 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16634 # -pthreads: Solaris/gcc
16635 # -mthreads: Mingw32/gcc, Lynx/gcc
16636 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16637 #      doesn't hurt to check since this sometimes defines pthreads too;
16638 #      also defines -D_REENTRANT)
16639 #      ... -mt is also the pthreads flag for HP/aCC
16640 # pthread: Linux, etcetera
16641 # --thread-safe: KAI C++
16642 # pthread-config: use pthread-config program (for GNU Pth library)
16643
16644 case ${host_os} in
16645         solaris*)
16646
16647         # On Solaris (at least, for some versions), libc contains stubbed
16648         # (non-functional) versions of the pthreads routines, so link-based
16649         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
16650         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16651         # a function called by this macro, so we could check for that, but
16652         # who knows whether they'll stub that too in a future libc.)  So,
16653         # we'll just look for -pthreads and -lpthread first:
16654
16655         ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
16656         ;;
16657
16658         darwin*)
16659         ax_pthread_flags="-pthread $ax_pthread_flags"
16660         ;;
16661 esac
16662
16663 # Clang doesn't consider unrecognized options an error unless we specify
16664 # -Werror. We throw in some extra Clang-specific options to ensure that
16665 # this doesn't happen for GCC, which also accepts -Werror.
16666
16667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
16668 $as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
16669 save_CFLAGS="$CFLAGS"
16670 ax_pthread_extra_flags="-Werror"
16671 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
16672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16673 /* end confdefs.h.  */
16674 int foo(void);
16675 int
16676 main ()
16677 {
16678 foo()
16679   ;
16680   return 0;
16681 }
16682 _ACEOF
16683 if ac_fn_c_try_compile "$LINENO"; then :
16684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16685 $as_echo "yes" >&6; }
16686 else
16687   ax_pthread_extra_flags=
16688                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16689 $as_echo "no" >&6; }
16690 fi
16691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16692 CFLAGS="$save_CFLAGS"
16693
16694 if test x"$ax_pthread_ok" = xno; then
16695 for flag in $ax_pthread_flags; do
16696
16697         case $flag in
16698                 none)
16699                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
16700 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
16701                 ;;
16702
16703                 -*)
16704                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
16705 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
16706                 PTHREAD_CFLAGS="$flag"
16707                 ;;
16708
16709                 pthread-config)
16710                 # Extract the first word of "pthread-config", so it can be a program name with args.
16711 set dummy pthread-config; ac_word=$2
16712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16713 $as_echo_n "checking for $ac_word... " >&6; }
16714 if ${ac_cv_prog_ax_pthread_config+:} false; then :
16715   $as_echo_n "(cached) " >&6
16716 else
16717   if test -n "$ax_pthread_config"; then
16718   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
16719 else
16720 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16721 for as_dir in $PATH
16722 do
16723   IFS=$as_save_IFS
16724   test -z "$as_dir" && as_dir=.
16725     for ac_exec_ext in '' $ac_executable_extensions; do
16726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16727     ac_cv_prog_ax_pthread_config="yes"
16728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16729     break 2
16730   fi
16731 done
16732   done
16733 IFS=$as_save_IFS
16734
16735   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
16736 fi
16737 fi
16738 ax_pthread_config=$ac_cv_prog_ax_pthread_config
16739 if test -n "$ax_pthread_config"; then
16740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
16741 $as_echo "$ax_pthread_config" >&6; }
16742 else
16743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16744 $as_echo "no" >&6; }
16745 fi
16746
16747
16748                 if test x"$ax_pthread_config" = xno; then continue; fi
16749                 PTHREAD_CFLAGS="`pthread-config --cflags`"
16750                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16751                 ;;
16752
16753                 *)
16754                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
16755 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
16756                 PTHREAD_LIBS="-l$flag"
16757                 ;;
16758         esac
16759
16760         save_LIBS="$LIBS"
16761         save_CFLAGS="$CFLAGS"
16762         LIBS="$PTHREAD_LIBS $LIBS"
16763         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
16764
16765         # Check for various functions.  We must include pthread.h,
16766         # since some functions may be macros.  (On the Sequent, we
16767         # need a special flag -Kthread to make this header compile.)
16768         # We check for pthread_join because it is in -lpthread on IRIX
16769         # while pthread_create is in libc.  We check for pthread_attr_init
16770         # due to DEC craziness with -lpthreads.  We check for
16771         # pthread_cleanup_push because it is one of the few pthread
16772         # functions on Solaris that doesn't have a non-functional libc stub.
16773         # We try pthread_create on general principles.
16774         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16775 /* end confdefs.h.  */
16776 #include <pthread.h>
16777                         static void routine(void *a) { *((int*)a) = 0; }
16778                         static void *start_routine(void *a) { return a; }
16779 int
16780 main ()
16781 {
16782 pthread_t th; pthread_attr_t attr;
16783                         pthread_create(&th, 0, start_routine, 0);
16784                         pthread_join(th, 0);
16785                         pthread_attr_init(&attr);
16786                         pthread_cleanup_push(routine, 0);
16787                         pthread_cleanup_pop(0) /* ; */
16788   ;
16789   return 0;
16790 }
16791 _ACEOF
16792 if ac_fn_c_try_link "$LINENO"; then :
16793   ax_pthread_ok=yes
16794 fi
16795 rm -f core conftest.err conftest.$ac_objext \
16796     conftest$ac_exeext conftest.$ac_ext
16797
16798         LIBS="$save_LIBS"
16799         CFLAGS="$save_CFLAGS"
16800
16801         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16802 $as_echo "$ax_pthread_ok" >&6; }
16803         if test "x$ax_pthread_ok" = xyes; then
16804                 break;
16805         fi
16806
16807         PTHREAD_LIBS=""
16808         PTHREAD_CFLAGS=""
16809 done
16810 fi
16811
16812 # Various other checks:
16813 if test "x$ax_pthread_ok" = xyes; then
16814         save_LIBS="$LIBS"
16815         LIBS="$PTHREAD_LIBS $LIBS"
16816         save_CFLAGS="$CFLAGS"
16817         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16818
16819         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
16820         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
16821 $as_echo_n "checking for joinable pthread attribute... " >&6; }
16822         attr_name=unknown
16823         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
16824             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16825 /* end confdefs.h.  */
16826 #include <pthread.h>
16827 int
16828 main ()
16829 {
16830 int attr = $attr; return attr /* ; */
16831   ;
16832   return 0;
16833 }
16834 _ACEOF
16835 if ac_fn_c_try_link "$LINENO"; then :
16836   attr_name=$attr; break
16837 fi
16838 rm -f core conftest.err conftest.$ac_objext \
16839     conftest$ac_exeext conftest.$ac_ext
16840         done
16841         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
16842 $as_echo "$attr_name" >&6; }
16843         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
16844
16845 cat >>confdefs.h <<_ACEOF
16846 #define PTHREAD_CREATE_JOINABLE $attr_name
16847 _ACEOF
16848
16849         fi
16850
16851         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
16852 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
16853         flag=no
16854         case ${host_os} in
16855             aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
16856             osf* | hpux*) flag="-D_REENTRANT";;
16857             solaris*)
16858             if test "$GCC" = "yes"; then
16859                 flag="-D_REENTRANT"
16860             else
16861                 # TODO: What about Clang on Solaris?
16862                 flag="-mt -D_REENTRANT"
16863             fi
16864             ;;
16865         esac
16866         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
16867 $as_echo "$flag" >&6; }
16868         if test "x$flag" != xno; then
16869             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16870         fi
16871
16872         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
16873 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
16874 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
16875   $as_echo_n "(cached) " >&6
16876 else
16877
16878                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16879 /* end confdefs.h.  */
16880 #include <pthread.h>
16881 int
16882 main ()
16883 {
16884 int i = PTHREAD_PRIO_INHERIT;
16885   ;
16886   return 0;
16887 }
16888 _ACEOF
16889 if ac_fn_c_try_link "$LINENO"; then :
16890   ax_cv_PTHREAD_PRIO_INHERIT=yes
16891 else
16892   ax_cv_PTHREAD_PRIO_INHERIT=no
16893 fi
16894 rm -f core conftest.err conftest.$ac_objext \
16895     conftest$ac_exeext conftest.$ac_ext
16896
16897 fi
16898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
16899 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
16900         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
16901
16902 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
16903
16904 fi
16905
16906         LIBS="$save_LIBS"
16907         CFLAGS="$save_CFLAGS"
16908
16909         # More AIX lossage: compile with *_r variant
16910         if test "x$GCC" != xyes; then
16911             case $host_os in
16912                 aix*)
16913                 case "x/$CC" in #(
16914   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
16915     #handle absolute path differently from PATH based program lookup
16916                    case "x$CC" in #(
16917   x/*) :
16918     if as_fn_executable_p ${CC}_r; then :
16919   PTHREAD_CC="${CC}_r"
16920 fi ;; #(
16921   *) :
16922     for ac_prog in ${CC}_r
16923 do
16924   # Extract the first word of "$ac_prog", so it can be a program name with args.
16925 set dummy $ac_prog; ac_word=$2
16926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16927 $as_echo_n "checking for $ac_word... " >&6; }
16928 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
16929   $as_echo_n "(cached) " >&6
16930 else
16931   if test -n "$PTHREAD_CC"; then
16932   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16933 else
16934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16935 for as_dir in $PATH
16936 do
16937   IFS=$as_save_IFS
16938   test -z "$as_dir" && as_dir=.
16939     for ac_exec_ext in '' $ac_executable_extensions; do
16940   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16941     ac_cv_prog_PTHREAD_CC="$ac_prog"
16942     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16943     break 2
16944   fi
16945 done
16946   done
16947 IFS=$as_save_IFS
16948
16949 fi
16950 fi
16951 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16952 if test -n "$PTHREAD_CC"; then
16953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
16954 $as_echo "$PTHREAD_CC" >&6; }
16955 else
16956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16957 $as_echo "no" >&6; }
16958 fi
16959
16960
16961   test -n "$PTHREAD_CC" && break
16962 done
16963 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16964  ;;
16965 esac ;; #(
16966   *) :
16967      ;;
16968 esac
16969                 ;;
16970             esac
16971         fi
16972 fi
16973
16974 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16975
16976
16977
16978
16979
16980 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16981 if test x"$ax_pthread_ok" = xyes; then
16982
16983
16984 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
16985
16986                 if test -n "$PTHREAD_LIBS"; then
16987                   LIBS="$PTHREAD_LIBS $LIBS"
16988                 fi
16989                 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16990                 CC="$PTHREAD_CC"
16991                 ub_have_pthreads=yes
16992                 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
16993 "
16994 if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
16995
16996 cat >>confdefs.h <<_ACEOF
16997 #define HAVE_PTHREAD_SPINLOCK_T 1
16998 _ACEOF
16999
17000
17001 fi
17002 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
17003 "
17004 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
17005
17006 cat >>confdefs.h <<_ACEOF
17007 #define HAVE_PTHREAD_RWLOCK_T 1
17008 _ACEOF
17009
17010
17011 fi
17012
17013
17014                 if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
17015                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
17016 $as_echo_n "checking if -pthread unused during linking... " >&6; }
17017                 # catch clang warning 'argument unused during compilation'
17018                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17019 /* end confdefs.h.  */
17020 $ac_includes_default
17021
17022 int main(void) {return 0;}
17023
17024 _ACEOF
17025                 pthread_unused="yes"
17026                 # first compile
17027                 echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
17028                 $CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
17029                 if test $? = 0; then
17030                         # then link
17031                         echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
17032                         $CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
17033                         if test $? -ne 0; then
17034                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17035 $as_echo "yes" >&6; }
17036                                 CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
17037                                 PTHREAD_CFLAGS_ONLY="-pthread"
17038
17039                         else
17040                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17041 $as_echo "no" >&6; }
17042                         fi
17043                 else
17044                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17045 $as_echo "no" >&6; }
17046                 fi # endif cc successful
17047                 rm -f conftest conftest.c conftest.o
17048                 fi # endif -pthread in CFLAGS
17049
17050
17051         :
17052 else
17053         ax_pthread_ok=no
17054
17055 fi
17056 ac_ext=c
17057 ac_cpp='$CPP $CPPFLAGS'
17058 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17059 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17060 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17061
17062
17063 fi
17064
17065 # check solaris thread library
17066
17067 # Check whether --with-solaris-threads was given.
17068 if test "${with_solaris_threads+set}" = set; then :
17069   withval=$with_solaris_threads;
17070 else
17071    withval="no"
17072 fi
17073
17074 ub_have_sol_threads=no
17075 if test x_$withval != x_no; then
17076         if test x_$ub_have_pthreads != x_no; then
17077             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
17078 $as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
17079         else
17080         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
17081 $as_echo_n "checking for library containing thr_create... " >&6; }
17082 if ${ac_cv_search_thr_create+:} false; then :
17083   $as_echo_n "(cached) " >&6
17084 else
17085   ac_func_search_save_LIBS=$LIBS
17086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17087 /* end confdefs.h.  */
17088
17089 /* Override any GCC internal prototype to avoid an error.
17090    Use char because int might match the return type of a GCC
17091    builtin and then its argument prototype would still apply.  */
17092 #ifdef __cplusplus
17093 extern "C"
17094 #endif
17095 char thr_create ();
17096 int
17097 main ()
17098 {
17099 return thr_create ();
17100   ;
17101   return 0;
17102 }
17103 _ACEOF
17104 for ac_lib in '' thread; do
17105   if test -z "$ac_lib"; then
17106     ac_res="none required"
17107   else
17108     ac_res=-l$ac_lib
17109     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17110   fi
17111   if ac_fn_c_try_link "$LINENO"; then :
17112   ac_cv_search_thr_create=$ac_res
17113 fi
17114 rm -f core conftest.err conftest.$ac_objext \
17115     conftest$ac_exeext
17116   if ${ac_cv_search_thr_create+:} false; then :
17117   break
17118 fi
17119 done
17120 if ${ac_cv_search_thr_create+:} false; then :
17121
17122 else
17123   ac_cv_search_thr_create=no
17124 fi
17125 rm conftest.$ac_ext
17126 LIBS=$ac_func_search_save_LIBS
17127 fi
17128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
17129 $as_echo "$ac_cv_search_thr_create" >&6; }
17130 ac_res=$ac_cv_search_thr_create
17131 if test "$ac_res" != no; then :
17132   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17133
17134
17135 $as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
17136
17137
17138
17139
17140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
17141 $as_echo_n "checking whether $CC supports -mt... " >&6; }
17142 cache=`echo mt | sed 'y%.=/+-%___p_%'`
17143 if eval \${cv_prog_cc_flag_$cache+:} false; then :
17144   $as_echo_n "(cached) " >&6
17145 else
17146
17147 echo 'void f(void){}' >conftest.c
17148 if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
17149 eval "cv_prog_cc_flag_$cache=yes"
17150 else
17151 eval "cv_prog_cc_flag_$cache=no"
17152 fi
17153 rm -f conftest conftest.o conftest.c
17154
17155 fi
17156
17157 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
17158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17159 $as_echo "yes" >&6; }
17160 :
17161 CFLAGS="$CFLAGS -mt"
17162 else
17163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17164 $as_echo "no" >&6; }
17165 :
17166 CFLAGS="$CFLAGS -D_REENTRANT"
17167 fi
17168
17169                 ub_have_sol_threads=yes
17170
17171 else
17172
17173                 as_fn_error $? "no solaris threads found." "$LINENO" 5
17174
17175 fi
17176
17177         fi
17178 fi
17179
17180 fi # end of non-mingw check of thread libraries
17181
17182 # Check for SYSLOG_FACILITY
17183
17184 # Check whether --with-syslog-facility was given.
17185 if test "${with_syslog_facility+set}" = set; then :
17186   withval=$with_syslog_facility;  UNBOUND_SYSLOG_FACILITY="$withval"
17187 fi
17188
17189 case "${UNBOUND_SYSLOG_FACILITY}" in
17190
17191   LOCAL[0-7]) UNBOUND_SYSLOG_FACILITY="LOG_${UNBOUND_SYSLOG_FACILITY}" ;;
17192
17193            *) UNBOUND_SYSLOG_FACILITY="LOG_DAEMON" ;;
17194
17195 esac
17196
17197 cat >>confdefs.h <<_ACEOF
17198 #define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY}
17199 _ACEOF
17200
17201
17202 # Check for dynamic library module
17203
17204 # Check whether --with-dynlibmodule was given.
17205 if test "${with_dynlibmodule+set}" = set; then :
17206   withval=$with_dynlibmodule;
17207 else
17208    withval="no"
17209 fi
17210
17211
17212 if test x_$withval != x_no; then
17213
17214 $as_echo "#define WITH_DYNLIBMODULE 1" >>confdefs.h
17215
17216   WITH_DYNLIBMODULE=yes
17217
17218   DYNLIBMOD_OBJ="dynlibmod.lo"
17219
17220   DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
17221
17222   if test $on_mingw = "no"; then
17223     # link with -ldl if not already there, for all executables because
17224     # dlopen call is in the dynlib module.  For unbound executable, also
17225     # export symbols.
17226     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17227 $as_echo_n "checking for library containing dlopen... " >&6; }
17228 if ${ac_cv_search_dlopen+:} false; then :
17229   $as_echo_n "(cached) " >&6
17230 else
17231   ac_func_search_save_LIBS=$LIBS
17232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17233 /* end confdefs.h.  */
17234
17235 /* Override any GCC internal prototype to avoid an error.
17236    Use char because int might match the return type of a GCC
17237    builtin and then its argument prototype would still apply.  */
17238 #ifdef __cplusplus
17239 extern "C"
17240 #endif
17241 char dlopen ();
17242 int
17243 main ()
17244 {
17245 return dlopen ();
17246   ;
17247   return 0;
17248 }
17249 _ACEOF
17250 for ac_lib in '' dl; do
17251   if test -z "$ac_lib"; then
17252     ac_res="none required"
17253   else
17254     ac_res=-l$ac_lib
17255     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17256   fi
17257   if ac_fn_c_try_link "$LINENO"; then :
17258   ac_cv_search_dlopen=$ac_res
17259 fi
17260 rm -f core conftest.err conftest.$ac_objext \
17261     conftest$ac_exeext
17262   if ${ac_cv_search_dlopen+:} false; then :
17263   break
17264 fi
17265 done
17266 if ${ac_cv_search_dlopen+:} false; then :
17267
17268 else
17269   ac_cv_search_dlopen=no
17270 fi
17271 rm conftest.$ac_ext
17272 LIBS=$ac_func_search_save_LIBS
17273 fi
17274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17275 $as_echo "$ac_cv_search_dlopen" >&6; }
17276 ac_res=$ac_cv_search_dlopen
17277 if test "$ac_res" != no; then :
17278   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17279
17280 fi
17281
17282     DYNLIBMOD_EXTRALIBS="-export-dynamic"
17283   else
17284     DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.dll.a"
17285   fi
17286
17287 fi
17288
17289 # Check for PyUnbound
17290
17291 # Check whether --with-pyunbound was given.
17292 if test "${with_pyunbound+set}" = set; then :
17293   withval=$with_pyunbound;
17294 else
17295    withval="no"
17296 fi
17297
17298
17299 ub_test_python=no
17300 ub_with_pyunbound=no
17301 if test x_$withval != x_no; then
17302    ub_with_pyunbound=yes
17303    ub_test_python=yes
17304 fi
17305
17306 # Check for Python module
17307
17308 # Check whether --with-pythonmodule was given.
17309 if test "${with_pythonmodule+set}" = set; then :
17310   withval=$with_pythonmodule;
17311 else
17312    withval="no"
17313 fi
17314
17315
17316 ub_with_pythonmod=no
17317 if test x_$withval != x_no; then
17318    ub_with_pythonmod=yes
17319    ub_test_python=yes
17320 fi
17321
17322 # Check for Python & SWIG only on PyUnbound or PyModule
17323 if test x_$ub_test_python != x_no; then
17324
17325    # Check for Python
17326    ub_have_python=no
17327    ac_save_LIBS="$LIBS"
17328         #
17329         # Allow the use of a (user set) custom python version
17330         #
17331
17332
17333         # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
17334 set dummy python$PYTHON_VERSION; ac_word=$2
17335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17336 $as_echo_n "checking for $ac_word... " >&6; }
17337 if ${ac_cv_path_PYTHON+:} false; then :
17338   $as_echo_n "(cached) " >&6
17339 else
17340   case $PYTHON in
17341   [\\/]* | ?:[\\/]*)
17342   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
17343   ;;
17344   *)
17345   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17346 for as_dir in $PATH
17347 do
17348   IFS=$as_save_IFS
17349   test -z "$as_dir" && as_dir=.
17350     for ac_exec_ext in '' $ac_executable_extensions; do
17351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17352     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
17353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17354     break 2
17355   fi
17356 done
17357   done
17358 IFS=$as_save_IFS
17359
17360   ;;
17361 esac
17362 fi
17363 PYTHON=$ac_cv_path_PYTHON
17364 if test -n "$PYTHON"; then
17365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
17366 $as_echo "$PYTHON" >&6; }
17367 else
17368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17369 $as_echo "no" >&6; }
17370 fi
17371
17372
17373         if test -z "$PYTHON"; then
17374            as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
17375            PYTHON_VERSION=""
17376         fi
17377
17378         if test -z "$PYTHON_VERSION"; then
17379                 PYTHON_VERSION=`$PYTHON -c "import sys; \
17380                         print(sys.version.split()[0])"`
17381         fi
17382
17383         #
17384         # Check if you have distutils, else fail
17385         #
17386         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
17387 $as_echo_n "checking for the distutils Python package... " >&6; }
17388         if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then
17389                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17390 $as_echo "yes" >&6; }
17391         else
17392                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17393 $as_echo "no" >&6; }
17394                 as_fn_error $? "cannot import Python module \"distutils\".
17395 Please check your Python installation. The error was:
17396 $ac_distutils_result" "$LINENO" 5
17397                 PYTHON_VERSION=""
17398         fi
17399
17400         #
17401         # Check for Python include path
17402         #
17403         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
17404 $as_echo_n "checking for Python include path... " >&6; }
17405         if test -z "$PYTHON_CPPFLAGS"; then
17406                 python_path=`$PYTHON -c "import distutils.sysconfig; \
17407                         print(distutils.sysconfig.get_python_inc());"`
17408                 if test -n "${python_path}"; then
17409                         python_path="-I$python_path"
17410                 fi
17411                 PYTHON_CPPFLAGS=$python_path
17412         fi
17413         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
17414 $as_echo "$PYTHON_CPPFLAGS" >&6; }
17415
17416
17417         #
17418         # Check for Python library path
17419         #
17420         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
17421 $as_echo_n "checking for Python library path... " >&6; }
17422         if test -z "$PYTHON_LDFLAGS"; then
17423                 PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
17424                         print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
17425         fi
17426         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
17427 $as_echo "$PYTHON_LDFLAGS" >&6; }
17428
17429
17430         if test -z "$PYTHON_LIBDIR"; then
17431                 PYTHON_LIBDIR=`$PYTHON -c "from distutils.sysconfig import *; \
17432                         print(get_config_var('LIBDIR'));"`
17433         fi
17434
17435         #
17436         # Check for site packages
17437         #
17438         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
17439 $as_echo_n "checking for Python site-packages path... " >&6; }
17440         if test -z "$PYTHON_SITE_PKG"; then
17441                 PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
17442                         print(distutils.sysconfig.get_python_lib(1,0));"`
17443         fi
17444         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
17445 $as_echo "$PYTHON_SITE_PKG" >&6; }
17446
17447
17448         #
17449         # final check to see if everything compiles alright
17450         #
17451         { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
17452 $as_echo_n "checking consistency of all components of python development environment... " >&6; }
17453         ac_ext=c
17454 ac_cpp='$CPP $CPPFLAGS'
17455 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17456 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17457 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17458
17459         # save current global flags
17460         ac_save_LIBS="$LIBS"
17461         ac_save_CPPFLAGS="$CPPFLAGS"
17462
17463         LIBS="$LIBS $PYTHON_LDFLAGS"
17464         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
17465         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17466 /* end confdefs.h.  */
17467
17468                 #include <Python.h>
17469
17470 int
17471 main ()
17472 {
17473
17474                 Py_Initialize();
17475
17476   ;
17477   return 0;
17478 }
17479 _ACEOF
17480 if ac_fn_c_try_link "$LINENO"; then :
17481   pythonexists=yes
17482 else
17483   pythonexists=no
17484 fi
17485 rm -f core conftest.err conftest.$ac_objext \
17486     conftest$ac_exeext conftest.$ac_ext
17487
17488         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
17489 $as_echo "$pythonexists" >&6; }
17490
17491         if test ! "$pythonexists" = "yes"; then
17492            as_fn_error $? "
17493   Could not link test program to Python. Maybe the main Python library has been
17494   installed in some non-standard library path. If so, pass it to configure,
17495   via the LDFLAGS environment variable.
17496   Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
17497   ============================================================================
17498    ERROR!
17499    You probably have to install the development version of the Python package
17500    for your distribution.  The exact name of this package varies among them.
17501   ============================================================================
17502            " "$LINENO" 5
17503           PYTHON_VERSION=""
17504         fi
17505         ac_ext=c
17506 ac_cpp='$CPP $CPPFLAGS'
17507 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17508 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17509 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17510
17511         # turn back to default flags
17512         CPPFLAGS="$ac_save_CPPFLAGS"
17513         LIBS="$ac_save_LIBS"
17514
17515         #
17516         # all done!
17517         #
17518
17519    if test ! -z "$PYTHON_VERSION"; then
17520         if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
17521                 as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
17522         fi
17523
17524       PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
17525
17526       # Have Python
17527
17528 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
17529
17530       if test -n "$LIBS"; then
17531         LIBS="$PYTHON_LDFLAGS $LIBS"
17532       else
17533         LIBS="$PYTHON_LDFLAGS"
17534       fi
17535       if test -n "$CPPFLAGS"; then
17536         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
17537       else
17538         CPPFLAGS="$PYTHON_CPPFLAGS"
17539       fi
17540       if test "$PYTHON_LIBDIR" != "/usr/lib" -a "$PYTHON_LIBDIR" != "" -a "$PYTHON_LIBDIR" != "/usr/lib64"; then
17541
17542         if test "x$enable_rpath" = xyes; then
17543                 if echo "$PYTHON_LIBDIR" | grep "^/" >/dev/null; then
17544                         RUNTIME_PATH="$RUNTIME_PATH -R$PYTHON_LIBDIR"
17545                 fi
17546         fi
17547
17548       fi
17549       ub_have_python=yes
17550       if test -n "$PKG_CONFIG" && \
17551     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
17552   ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
17553   ac_status=$?
17554   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17555   test $ac_status = 0; }; then
17556   PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
17557 else
17558   PC_PY_DEPENDENCY="python"
17559 fi
17560
17561
17562       # Check for SWIG
17563       ub_have_swig=no
17564       # Check whether --enable-swig-version-check was given.
17565 if test "${enable_swig_version_check+set}" = set; then :
17566   enableval=$enable_swig_version_check;
17567 fi
17568
17569       if test "$enable_swig_version_check" = "yes"; then
17570
17571         # Extract the first word of "swig", so it can be a program name with args.
17572 set dummy swig; ac_word=$2
17573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17574 $as_echo_n "checking for $ac_word... " >&6; }
17575 if ${ac_cv_path_SWIG+:} false; then :
17576   $as_echo_n "(cached) " >&6
17577 else
17578   case $SWIG in
17579   [\\/]* | ?:[\\/]*)
17580   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17581   ;;
17582   *)
17583   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17584 for as_dir in $PATH
17585 do
17586   IFS=$as_save_IFS
17587   test -z "$as_dir" && as_dir=.
17588     for ac_exec_ext in '' $ac_executable_extensions; do
17589   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17590     ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17591     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17592     break 2
17593   fi
17594 done
17595   done
17596 IFS=$as_save_IFS
17597
17598   ;;
17599 esac
17600 fi
17601 SWIG=$ac_cv_path_SWIG
17602 if test -n "$SWIG"; then
17603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17604 $as_echo "$SWIG" >&6; }
17605 else
17606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17607 $as_echo "no" >&6; }
17608 fi
17609
17610
17611         if test -z "$SWIG" ; then
17612                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17613 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17614                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17615         elif test -n "2.0.1" ; then
17616                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17617 $as_echo_n "checking for SWIG version... " >&6; }
17618                 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'`
17619                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17620 $as_echo "$swig_version" >&6; }
17621                 if test -n "$swig_version" ; then
17622                         # Calculate the required version number components
17623                         required=2.0.1
17624                         required_major=`echo $required | sed 's/[^0-9].*//'`
17625                         if test -z "$required_major" ; then
17626                                 required_major=0
17627                         fi
17628                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17629                         required_minor=`echo $required | sed 's/[^0-9].*//'`
17630                         if test -z "$required_minor" ; then
17631                                 required_minor=0
17632                         fi
17633                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17634                         required_patch=`echo $required | sed 's/[^0-9].*//'`
17635                         if test -z "$required_patch" ; then
17636                                 required_patch=0
17637                         fi
17638                         # Calculate the available version number components
17639                         available=$swig_version
17640                         available_major=`echo $available | sed 's/[^0-9].*//'`
17641                         if test -z "$available_major" ; then
17642                                 available_major=0
17643                         fi
17644                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17645                         available_minor=`echo $available | sed 's/[^0-9].*//'`
17646                         if test -z "$available_minor" ; then
17647                                 available_minor=0
17648                         fi
17649                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17650                         available_patch=`echo $available | sed 's/[^0-9].*//'`
17651                         if test -z "$available_patch" ; then
17652                                 available_patch=0
17653                         fi
17654                         badversion=0
17655                         if test $available_major -lt $required_major ; then
17656                                 badversion=1
17657                         fi
17658                         if test $available_major -eq $required_major \
17659                                 -a $available_minor -lt $required_minor ; then
17660                                 badversion=1
17661                         fi
17662                         if test $available_major -eq $required_major \
17663                                 -a $available_minor -eq $required_minor \
17664                                 -a $available_patch -lt $required_patch ; then
17665                                 badversion=1
17666                         fi
17667                         if test $badversion -eq 1 ; then
17668                                 { $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
17669 $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;}
17670                                 SWIG='echo "Error: SWIG version >= 2.0.1 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17671                         else
17672                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17673 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17674                                 SWIG_LIB=`$SWIG -swiglib`
17675                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17676 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17677                         fi
17678                 else
17679                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17680 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17681                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17682                 fi
17683         fi
17684
17685
17686       else
17687
17688         # Extract the first word of "swig", so it can be a program name with args.
17689 set dummy swig; ac_word=$2
17690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17691 $as_echo_n "checking for $ac_word... " >&6; }
17692 if ${ac_cv_path_SWIG+:} false; then :
17693   $as_echo_n "(cached) " >&6
17694 else
17695   case $SWIG in
17696   [\\/]* | ?:[\\/]*)
17697   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17698   ;;
17699   *)
17700   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17701 for as_dir in $PATH
17702 do
17703   IFS=$as_save_IFS
17704   test -z "$as_dir" && as_dir=.
17705     for ac_exec_ext in '' $ac_executable_extensions; do
17706   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17707     ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17709     break 2
17710   fi
17711 done
17712   done
17713 IFS=$as_save_IFS
17714
17715   ;;
17716 esac
17717 fi
17718 SWIG=$ac_cv_path_SWIG
17719 if test -n "$SWIG"; then
17720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17721 $as_echo "$SWIG" >&6; }
17722 else
17723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17724 $as_echo "no" >&6; }
17725 fi
17726
17727
17728         if test -z "$SWIG" ; then
17729                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17730 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17731                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17732         elif test -n "" ; then
17733                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17734 $as_echo_n "checking for SWIG version... " >&6; }
17735                 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'`
17736                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17737 $as_echo "$swig_version" >&6; }
17738                 if test -n "$swig_version" ; then
17739                         # Calculate the required version number components
17740                         required=
17741                         required_major=`echo $required | sed 's/[^0-9].*//'`
17742                         if test -z "$required_major" ; then
17743                                 required_major=0
17744                         fi
17745                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17746                         required_minor=`echo $required | sed 's/[^0-9].*//'`
17747                         if test -z "$required_minor" ; then
17748                                 required_minor=0
17749                         fi
17750                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17751                         required_patch=`echo $required | sed 's/[^0-9].*//'`
17752                         if test -z "$required_patch" ; then
17753                                 required_patch=0
17754                         fi
17755                         # Calculate the available version number components
17756                         available=$swig_version
17757                         available_major=`echo $available | sed 's/[^0-9].*//'`
17758                         if test -z "$available_major" ; then
17759                                 available_major=0
17760                         fi
17761                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17762                         available_minor=`echo $available | sed 's/[^0-9].*//'`
17763                         if test -z "$available_minor" ; then
17764                                 available_minor=0
17765                         fi
17766                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17767                         available_patch=`echo $available | sed 's/[^0-9].*//'`
17768                         if test -z "$available_patch" ; then
17769                                 available_patch=0
17770                         fi
17771                         badversion=0
17772                         if test $available_major -lt $required_major ; then
17773                                 badversion=1
17774                         fi
17775                         if test $available_major -eq $required_major \
17776                                 -a $available_minor -lt $required_minor ; then
17777                                 badversion=1
17778                         fi
17779                         if test $available_major -eq $required_major \
17780                                 -a $available_minor -eq $required_minor \
17781                                 -a $available_patch -lt $required_patch ; then
17782                                 badversion=1
17783                         fi
17784                         if test $badversion -eq 1 ; then
17785                                 { $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
17786 $as_echo "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
17787                                 SWIG='echo "Error: SWIG version >=  is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17788                         else
17789                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17790 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17791                                 SWIG_LIB=`$SWIG -swiglib`
17792                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17793 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17794                         fi
17795                 else
17796                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17797 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17798                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17799                 fi
17800         fi
17801
17802
17803       fi
17804       { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
17805 $as_echo_n "checking SWIG... " >&6; }
17806       if test ! -x "$SWIG"; then
17807          as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
17808       else
17809
17810 $as_echo "#define HAVE_SWIG 1" >>confdefs.h
17811
17812          swig="$SWIG"
17813
17814          { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
17815 $as_echo "present" >&6; }
17816
17817          # If have Python & SWIG
17818          # Declare PythonMod
17819          if test x_$ub_with_pythonmod != x_no; then
17820
17821 $as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
17822
17823             WITH_PYTHONMODULE=yes
17824
17825             PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
17826
17827             PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
17828
17829             PYTHONMOD_INSTALL=pythonmod-install
17830
17831             PYTHONMOD_UNINSTALL=pythonmod-uninstall
17832
17833          fi
17834
17835          # Declare PyUnbound
17836          if test x_$ub_with_pyunbound != x_no; then
17837
17838 $as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
17839
17840             WITH_PYUNBOUND=yes
17841
17842             PYUNBOUND_OBJ="libunbound_wrap.lo"
17843
17844             PYUNBOUND_TARGET="_unbound.la"
17845
17846             PYUNBOUND_INSTALL=pyunbound-install
17847
17848             PYUNBOUND_UNINSTALL=pyunbound-uninstall
17849
17850          fi
17851       fi
17852    else
17853       { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
17854 $as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
17855       ub_with_pyunbound=no
17856       ub_with_pythonmod=no
17857    fi
17858 fi
17859
17860 if test "`uname`" = "NetBSD"; then
17861         NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
17862
17863 fi
17864 CONFIG_DATE=`date +%Y%m%d`
17865
17866
17867 # Checks for libraries.
17868
17869 # libnss
17870 USE_NSS="no"
17871
17872 # Check whether --with-nss was given.
17873 if test "${with_nss+set}" = set; then :
17874   withval=$with_nss;
17875         USE_NSS="yes"
17876
17877 $as_echo "#define HAVE_NSS 1" >>confdefs.h
17878
17879         if test "$withval" != "" -a "$withval" != "yes"; then
17880                 CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
17881                 LDFLAGS="$LDFLAGS -L$withval/lib"
17882
17883         if test "x$enable_rpath" = xyes; then
17884                 if echo "$withval/lib" | grep "^/" >/dev/null; then
17885                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17886                 fi
17887         fi
17888
17889                 CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
17890         else
17891                 CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
17892                 CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
17893         fi
17894         LIBS="$LIBS -lnss3 -lnspr4"
17895         SSLLIB=""
17896         PC_CRYPTO_DEPENDENCY="nss nspr"
17897
17898
17899
17900 fi
17901
17902
17903 # libnettle
17904 USE_NETTLE="no"
17905
17906 # Check whether --with-nettle was given.
17907 if test "${with_nettle+set}" = set; then :
17908   withval=$with_nettle;
17909         USE_NETTLE="yes"
17910
17911 $as_echo "#define HAVE_NETTLE 1" >>confdefs.h
17912
17913         for ac_header in nettle/dsa-compat.h
17914 do :
17915   ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
17916 "
17917 if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then :
17918   cat >>confdefs.h <<_ACEOF
17919 #define HAVE_NETTLE_DSA_COMPAT_H 1
17920 _ACEOF
17921
17922 fi
17923
17924 done
17925
17926         if test "$withval" != "" -a "$withval" != "yes"; then
17927                 CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
17928                 LDFLAGS="$LDFLAGS -L$withval/lib"
17929
17930         if test "x$enable_rpath" = xyes; then
17931                 if echo "$withval/lib" | grep "^/" >/dev/null; then
17932                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17933                 fi
17934         fi
17935
17936         else
17937                 CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
17938         fi
17939         LIBS="$LIBS -lhogweed -lnettle -lgmp"
17940         SSLLIB=""
17941         PC_CRYPTO_DEPENDENCY="hogweed nettle"
17942
17943
17944
17945 fi
17946
17947
17948 # openssl
17949 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17950
17951
17952 # Check whether --with-ssl was given.
17953 if test "${with_ssl+set}" = set; then :
17954   withval=$with_ssl;
17955
17956 else
17957
17958             withval="yes"
17959
17960 fi
17961
17962     if test x_$withval = x_no; then
17963         as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
17964     fi
17965
17966     withval=$withval
17967     if test x_$withval != x_no; then
17968         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
17969 $as_echo_n "checking for SSL... " >&6; }
17970         if test x_$withval = x_ -o x_$withval = x_yes; then
17971             withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
17972         fi
17973         for dir in $withval; do
17974             ssldir="$dir"
17975             if test -f "$dir/include/openssl/ssl.h"; then
17976                 found_ssl="yes"
17977
17978 cat >>confdefs.h <<_ACEOF
17979 #define HAVE_SSL /**/
17980 _ACEOF
17981
17982                                 if test "$ssldir" != "/usr"; then
17983                         CPPFLAGS="$CPPFLAGS -I$ssldir/include"
17984                         LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
17985                 fi
17986                 break;
17987             fi
17988         done
17989         if test x_$found_ssl != x_yes; then
17990             as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
17991         else
17992             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
17993 $as_echo "found in $ssldir" >&6; }
17994             HAVE_SSL=yes
17995                         if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
17996                 LDFLAGS="$LDFLAGS -L$ssldir/lib"
17997                 LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
17998
17999         if test "x$enable_rpath" = xyes; then
18000                 if echo "$ssldir/lib" | grep "^/" >/dev/null; then
18001                         RUNTIME_PATH="$RUNTIME_PATH -R$ssldir/lib"
18002                 fi
18003         fi
18004
18005             fi
18006
18007             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5
18008 $as_echo_n "checking for EVP_sha256 in -lcrypto... " >&6; }
18009             LIBS="$LIBS -lcrypto"
18010             LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
18011             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18012 /* end confdefs.h.  */
18013
18014 int
18015 main ()
18016 {
18017
18018                 int EVP_sha256(void);
18019                 (void)EVP_sha256();
18020
18021   ;
18022   return 0;
18023 }
18024 _ACEOF
18025 if ac_fn_c_try_link "$LINENO"; then :
18026
18027                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18028 $as_echo "yes" >&6; }
18029
18030 $as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18031
18032
18033 else
18034
18035                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18036 $as_echo "no" >&6; }
18037                 # check if -lwsock32 or -lgdi32 are needed.
18038                 BAKLIBS="$LIBS"
18039                 BAKSSLLIBS="$LIBSSL_LIBS"
18040                 LIBS="$LIBS -lgdi32 -lws2_32"
18041                 LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
18042                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
18043 $as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
18044                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18045 /* end confdefs.h.  */
18046
18047 int
18048 main ()
18049 {
18050
18051                     int EVP_sha256(void);
18052                     (void)EVP_sha256();
18053
18054   ;
18055   return 0;
18056 }
18057 _ACEOF
18058 if ac_fn_c_try_link "$LINENO"; then :
18059
18060
18061 $as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18062
18063                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18064 $as_echo "yes" >&6; }
18065
18066 else
18067
18068                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18069 $as_echo "no" >&6; }
18070                     LIBS="$BAKLIBS"
18071                     LIBSSL_LIBS="$BAKSSLLIBS"
18072                     LIBS="$LIBS -ldl"
18073                     LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
18074                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
18075 $as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
18076                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18077 /* end confdefs.h.  */
18078
18079 int
18080 main ()
18081 {
18082
18083                         int EVP_sha256(void);
18084                         (void)EVP_sha256();
18085
18086   ;
18087   return 0;
18088 }
18089 _ACEOF
18090 if ac_fn_c_try_link "$LINENO"; then :
18091
18092
18093 $as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18094
18095                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18096 $as_echo "yes" >&6; }
18097
18098 else
18099
18100                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18101 $as_echo "no" >&6; }
18102                         LIBS="$BAKLIBS"
18103                         LIBSSL_LIBS="$BAKSSLLIBS"
18104                         LIBS="$LIBS -ldl -pthread"
18105                         LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
18106                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
18107 $as_echo_n "checking if -lcrypto needs -ldl -pthread... " >&6; }
18108                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18109 /* end confdefs.h.  */
18110
18111 int
18112 main ()
18113 {
18114
18115                             int EVP_sha256(void);
18116                             (void)EVP_sha256();
18117
18118   ;
18119   return 0;
18120 }
18121 _ACEOF
18122 if ac_fn_c_try_link "$LINENO"; then :
18123
18124
18125 $as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
18126
18127                             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18128 $as_echo "yes" >&6; }
18129
18130 else
18131
18132                             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18133 $as_echo "no" >&6; }
18134                             as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
18135
18136 fi
18137 rm -f core conftest.err conftest.$ac_objext \
18138     conftest$ac_exeext conftest.$ac_ext
18139
18140 fi
18141 rm -f core conftest.err conftest.$ac_objext \
18142     conftest$ac_exeext conftest.$ac_ext
18143
18144 fi
18145 rm -f core conftest.err conftest.$ac_objext \
18146     conftest$ac_exeext conftest.$ac_ext
18147
18148 fi
18149 rm -f core conftest.err conftest.$ac_objext \
18150     conftest$ac_exeext conftest.$ac_ext
18151         fi
18152
18153
18154     fi
18155 for ac_header in openssl/ssl.h
18156 do :
18157   ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
18158 "
18159 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
18160   cat >>confdefs.h <<_ACEOF
18161 #define HAVE_OPENSSL_SSL_H 1
18162 _ACEOF
18163
18164 fi
18165
18166 done
18167
18168 for ac_header in openssl/err.h
18169 do :
18170   ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
18171 "
18172 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
18173   cat >>confdefs.h <<_ACEOF
18174 #define HAVE_OPENSSL_ERR_H 1
18175 _ACEOF
18176
18177 fi
18178
18179 done
18180
18181 for ac_header in openssl/rand.h
18182 do :
18183   ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
18184 "
18185 if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
18186   cat >>confdefs.h <<_ACEOF
18187 #define HAVE_OPENSSL_RAND_H 1
18188 _ACEOF
18189
18190 fi
18191
18192 done
18193
18194
18195
18196
18197 # check if libssl needs libdl
18198 BAKLIBS="$LIBS"
18199 LIBS="-lssl $LIBS"
18200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
18201 $as_echo_n "checking if libssl needs libdl... " >&6; }
18202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18203 /* end confdefs.h.  */
18204
18205 /* Override any GCC internal prototype to avoid an error.
18206    Use char because int might match the return type of a GCC
18207    builtin and then its argument prototype would still apply.  */
18208 #ifdef __cplusplus
18209 extern "C"
18210 #endif
18211 char SSL_CTX_new ();
18212 int
18213 main ()
18214 {
18215 return SSL_CTX_new ();
18216   ;
18217   return 0;
18218 }
18219 _ACEOF
18220 if ac_fn_c_try_link "$LINENO"; then :
18221
18222         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18223 $as_echo "no" >&6; }
18224         LIBS="$BAKLIBS"
18225
18226 else
18227
18228         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18229 $as_echo "yes" >&6; }
18230         LIBS="$BAKLIBS"
18231         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
18232 $as_echo_n "checking for library containing dlopen... " >&6; }
18233 if ${ac_cv_search_dlopen+:} false; then :
18234   $as_echo_n "(cached) " >&6
18235 else
18236   ac_func_search_save_LIBS=$LIBS
18237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18238 /* end confdefs.h.  */
18239
18240 /* Override any GCC internal prototype to avoid an error.
18241    Use char because int might match the return type of a GCC
18242    builtin and then its argument prototype would still apply.  */
18243 #ifdef __cplusplus
18244 extern "C"
18245 #endif
18246 char dlopen ();
18247 int
18248 main ()
18249 {
18250 return dlopen ();
18251   ;
18252   return 0;
18253 }
18254 _ACEOF
18255 for ac_lib in '' dl; do
18256   if test -z "$ac_lib"; then
18257     ac_res="none required"
18258   else
18259     ac_res=-l$ac_lib
18260     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18261   fi
18262   if ac_fn_c_try_link "$LINENO"; then :
18263   ac_cv_search_dlopen=$ac_res
18264 fi
18265 rm -f core conftest.err conftest.$ac_objext \
18266     conftest$ac_exeext
18267   if ${ac_cv_search_dlopen+:} false; then :
18268   break
18269 fi
18270 done
18271 if ${ac_cv_search_dlopen+:} false; then :
18272
18273 else
18274   ac_cv_search_dlopen=no
18275 fi
18276 rm conftest.$ac_ext
18277 LIBS=$ac_func_search_save_LIBS
18278 fi
18279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
18280 $as_echo "$ac_cv_search_dlopen" >&6; }
18281 ac_res=$ac_cv_search_dlopen
18282 if test "$ac_res" != no; then :
18283   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18284
18285 fi
18286
18287
18288 fi
18289 rm -f core conftest.err conftest.$ac_objext \
18290     conftest$ac_exeext conftest.$ac_ext
18291 SSLLIB="-lssl"
18292
18293 PC_CRYPTO_DEPENDENCY="libcrypto libssl"
18294
18295
18296 # check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
18297 BAKLIBS="$LIBS"
18298 LIBS="-lssl $LIBS"
18299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
18300 $as_echo_n "checking if libssl needs -lcrypt32... " >&6; }
18301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18302 /* end confdefs.h.  */
18303
18304 int
18305 main ()
18306 {
18307
18308         int EVP_sha256(void);
18309         (void)EVP_sha256();
18310
18311   ;
18312   return 0;
18313 }
18314 _ACEOF
18315 if ac_fn_c_try_link "$LINENO"; then :
18316
18317         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18318 $as_echo "no" >&6; }
18319         LIBS="$BAKLIBS"
18320
18321 else
18322
18323         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18324 $as_echo "yes" >&6; }
18325         LIBS="$BAKLIBS"
18326         LIBS="$LIBS -lcrypt32"
18327
18328 fi
18329 rm -f core conftest.err conftest.$ac_objext \
18330     conftest$ac_exeext conftest.$ac_ext
18331
18332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
18333 $as_echo_n "checking for LibreSSL... " >&6; }
18334 if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
18335         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18336 $as_echo "yes" >&6; }
18337
18338 $as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
18339
18340         # libressl provides these compat functions, but they may also be
18341         # declared by the OS in libc.  See if they have been declared.
18342         ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
18343 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
18344   ac_have_decl=1
18345 else
18346   ac_have_decl=0
18347 fi
18348
18349 cat >>confdefs.h <<_ACEOF
18350 #define HAVE_DECL_STRLCPY $ac_have_decl
18351 _ACEOF
18352 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
18353 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
18354   ac_have_decl=1
18355 else
18356   ac_have_decl=0
18357 fi
18358
18359 cat >>confdefs.h <<_ACEOF
18360 #define HAVE_DECL_STRLCAT $ac_have_decl
18361 _ACEOF
18362 ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
18363 if test "x$ac_cv_have_decl_arc4random" = xyes; then :
18364   ac_have_decl=1
18365 else
18366   ac_have_decl=0
18367 fi
18368
18369 cat >>confdefs.h <<_ACEOF
18370 #define HAVE_DECL_ARC4RANDOM $ac_have_decl
18371 _ACEOF
18372 ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
18373 if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
18374   ac_have_decl=1
18375 else
18376   ac_have_decl=0
18377 fi
18378
18379 cat >>confdefs.h <<_ACEOF
18380 #define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
18381 _ACEOF
18382
18383 else
18384         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18385 $as_echo "no" >&6; }
18386 fi
18387 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
18388 do :
18389   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18390 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
18391 "
18392 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18393   cat >>confdefs.h <<_ACEOF
18394 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18395 _ACEOF
18396
18397 fi
18398
18399 done
18400
18401 for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ENGINE_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1 EVP_DigestVerify EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex CRYPTO_THREADID_set_callback EVP_MAC_CTX_set_params
18402 do :
18403   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18404 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18405 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18406   cat >>confdefs.h <<_ACEOF
18407 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18408 _ACEOF
18409
18410 fi
18411 done
18412
18413
18414 # these check_funcs need -lssl
18415 BAKLIBS="$LIBS"
18416 LIBS="-lssl $LIBS"
18417 for ac_func in OPENSSL_init_ssl SSL_CTX_set_security_level SSL_set1_host SSL_get0_peername X509_VERIFY_PARAM_set1_host SSL_CTX_set_ciphersuites SSL_CTX_set_tlsext_ticket_key_evp_cb SSL_CTX_set_alpn_select_cb
18418 do :
18419   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18420 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18421 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18422   cat >>confdefs.h <<_ACEOF
18423 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18424 _ACEOF
18425
18426 fi
18427 done
18428
18429 LIBS="$BAKLIBS"
18430
18431 ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
18432 $ac_includes_default
18433 #ifdef HAVE_OPENSSL_ERR_H
18434 #include <openssl/err.h>
18435 #endif
18436
18437 #ifdef HAVE_OPENSSL_RAND_H
18438 #include <openssl/rand.h>
18439 #endif
18440
18441 #ifdef HAVE_OPENSSL_CONF_H
18442 #include <openssl/conf.h>
18443 #endif
18444
18445 #ifdef HAVE_OPENSSL_ENGINE_H
18446 #include <openssl/engine.h>
18447 #endif
18448 #include <openssl/ssl.h>
18449 #include <openssl/evp.h>
18450
18451 "
18452 if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
18453   ac_have_decl=1
18454 else
18455   ac_have_decl=0
18456 fi
18457
18458 cat >>confdefs.h <<_ACEOF
18459 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
18460 _ACEOF
18461 ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
18462 $ac_includes_default
18463 #ifdef HAVE_OPENSSL_ERR_H
18464 #include <openssl/err.h>
18465 #endif
18466
18467 #ifdef HAVE_OPENSSL_RAND_H
18468 #include <openssl/rand.h>
18469 #endif
18470
18471 #ifdef HAVE_OPENSSL_CONF_H
18472 #include <openssl/conf.h>
18473 #endif
18474
18475 #ifdef HAVE_OPENSSL_ENGINE_H
18476 #include <openssl/engine.h>
18477 #endif
18478 #include <openssl/ssl.h>
18479 #include <openssl/evp.h>
18480
18481 "
18482 if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
18483   ac_have_decl=1
18484 else
18485   ac_have_decl=0
18486 fi
18487
18488 cat >>confdefs.h <<_ACEOF
18489 #define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
18490 _ACEOF
18491 ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
18492 $ac_includes_default
18493 #ifdef HAVE_OPENSSL_ERR_H
18494 #include <openssl/err.h>
18495 #endif
18496
18497 #ifdef HAVE_OPENSSL_RAND_H
18498 #include <openssl/rand.h>
18499 #endif
18500
18501 #ifdef HAVE_OPENSSL_CONF_H
18502 #include <openssl/conf.h>
18503 #endif
18504
18505 #ifdef HAVE_OPENSSL_ENGINE_H
18506 #include <openssl/engine.h>
18507 #endif
18508 #include <openssl/ssl.h>
18509 #include <openssl/evp.h>
18510
18511 "
18512 if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
18513   ac_have_decl=1
18514 else
18515   ac_have_decl=0
18516 fi
18517
18518 cat >>confdefs.h <<_ACEOF
18519 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
18520 _ACEOF
18521
18522
18523 if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then
18524 # check function return type.
18525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5
18526 $as_echo_n "checking the return type of HMAC_Init_ex... " >&6; }
18527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18528 /* end confdefs.h.  */
18529
18530 #ifdef HAVE_OPENSSL_ERR_H
18531 #include <openssl/err.h>
18532 #endif
18533
18534 #ifdef HAVE_OPENSSL_RAND_H
18535 #include <openssl/rand.h>
18536 #endif
18537
18538 #ifdef HAVE_OPENSSL_CONF_H
18539 #include <openssl/conf.h>
18540 #endif
18541
18542 #ifdef HAVE_OPENSSL_ENGINE_H
18543 #include <openssl/engine.h>
18544 #endif
18545 #include <openssl/ssl.h>
18546 #include <openssl/evp.h>
18547
18548 int
18549 main ()
18550 {
18551
18552         HMAC_CTX* hmac_ctx = NULL;
18553         void* hmac_key = NULL;
18554         const EVP_MD* digest = NULL;
18555         int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);
18556         (void)x;
18557
18558   ;
18559   return 0;
18560 }
18561 _ACEOF
18562 if ac_fn_c_try_compile "$LINENO"; then :
18563
18564         { $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5
18565 $as_echo "int" >&6; }
18566
18567 else
18568
18569         { $as_echo "$as_me:${as_lineno-$LINENO}: result: void" >&5
18570 $as_echo "void" >&6; }
18571
18572 $as_echo "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h
18573
18574
18575 fi
18576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18577 fi
18578
18579 fi
18580
18581
18582 # libbsd
18583
18584 # Check whether --with-libbsd was given.
18585 if test "${with_libbsd+set}" = set; then :
18586   withval=$with_libbsd;
18587         for ac_header in bsd/string.h bsd/stdlib.h
18588 do :
18589   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18590 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
18591 "
18592 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18593   cat >>confdefs.h <<_ACEOF
18594 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18595 _ACEOF
18596
18597 fi
18598
18599 done
18600
18601         if test "x$ac_cv_header_bsd_string_h" = xyes -a "x$ac_cv_header_bsd_stdlib_h" = xyes; then
18602                 for func in strlcpy strlcat arc4random arc4random_uniform reallocarray; do
18603                         as_ac_Search=`$as_echo "ac_cv_search_$func" | $as_tr_sh`
18604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $func" >&5
18605 $as_echo_n "checking for library containing $func... " >&6; }
18606 if eval \${$as_ac_Search+:} false; then :
18607   $as_echo_n "(cached) " >&6
18608 else
18609   ac_func_search_save_LIBS=$LIBS
18610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18611 /* end confdefs.h.  */
18612
18613 /* Override any GCC internal prototype to avoid an error.
18614    Use char because int might match the return type of a GCC
18615    builtin and then its argument prototype would still apply.  */
18616 #ifdef __cplusplus
18617 extern "C"
18618 #endif
18619 char $func ();
18620 int
18621 main ()
18622 {
18623 return $func ();
18624   ;
18625   return 0;
18626 }
18627 _ACEOF
18628 for ac_lib in '' bsd; do
18629   if test -z "$ac_lib"; then
18630     ac_res="none required"
18631   else
18632     ac_res=-l$ac_lib
18633     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18634   fi
18635   if ac_fn_c_try_link "$LINENO"; then :
18636   eval "$as_ac_Search=\$ac_res"
18637 fi
18638 rm -f core conftest.err conftest.$ac_objext \
18639     conftest$ac_exeext
18640   if eval \${$as_ac_Search+:} false; then :
18641   break
18642 fi
18643 done
18644 if eval \${$as_ac_Search+:} false; then :
18645
18646 else
18647   eval "$as_ac_Search=no"
18648 fi
18649 rm conftest.$ac_ext
18650 LIBS=$ac_func_search_save_LIBS
18651 fi
18652 eval ac_res=\$$as_ac_Search
18653                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18654 $as_echo "$ac_res" >&6; }
18655 eval ac_res=\$$as_ac_Search
18656 if test "$ac_res" != no; then :
18657   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18658
18659
18660 $as_echo "#define HAVE_LIBBSD 1" >>confdefs.h
18661
18662                                 PC_LIBBSD_DEPENDENCY=libbsd
18663
18664
18665 fi
18666
18667                 done
18668         fi
18669
18670 fi
18671
18672
18673 # Check whether --enable-sha1 was given.
18674 if test "${enable_sha1+set}" = set; then :
18675   enableval=$enable_sha1;
18676 fi
18677
18678 case "$enable_sha1" in
18679         no)
18680         ;;
18681         yes|*)
18682
18683 $as_echo "#define USE_SHA1 1" >>confdefs.h
18684
18685         ;;
18686 esac
18687
18688
18689 # Check whether --enable-sha2 was given.
18690 if test "${enable_sha2+set}" = set; then :
18691   enableval=$enable_sha2;
18692 fi
18693
18694 case "$enable_sha2" in
18695         no)
18696         ;;
18697         yes|*)
18698
18699 $as_echo "#define USE_SHA2 1" >>confdefs.h
18700
18701         ;;
18702 esac
18703
18704 # Check whether --enable-subnet was given.
18705 if test "${enable_subnet+set}" = set; then :
18706   enableval=$enable_subnet;
18707 fi
18708
18709 case "$enable_subnet" in
18710         yes)
18711
18712 $as_echo "#define CLIENT_SUBNET 1" >>confdefs.h
18713
18714         SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
18715
18716         SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
18717
18718         ;;
18719         no|*)
18720         ;;
18721 esac
18722
18723 # check wether gost also works
18724
18725 # Check whether --enable-gost was given.
18726 if test "${enable_gost+set}" = set; then :
18727   enableval=$enable_gost;
18728 fi
18729
18730 use_gost="no"
18731 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18732 case "$enable_gost" in
18733         no)
18734         ;;
18735         *)
18736         ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
18737 if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
18738   :
18739 else
18740   as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
18741 fi
18742
18743         ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
18744 if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
18745
18746 else
18747   as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
18748 fi
18749
18750
18751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
18752 $as_echo_n "checking if GOST works... " >&6; }
18753 if test c${cross_compiling} = cno; then
18754 BAKCFLAGS="$CFLAGS"
18755 if test -n "$ssldir"; then
18756         CFLAGS="$CFLAGS -Wl,-rpath,$ssldir/lib"
18757 fi
18758 if test "$cross_compiling" = yes; then :
18759   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18760 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18761 as_fn_error $? "cannot run test program while cross compiling
18762 See \`config.log' for more details" "$LINENO" 5; }
18763 else
18764   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18765 /* end confdefs.h.  */
18766
18767 #include <string.h>
18768 #include <openssl/ssl.h>
18769 #include <openssl/evp.h>
18770 #include <openssl/engine.h>
18771 #include <openssl/conf.h>
18772 /* routine to load gost (from sldns) */
18773 int load_gost_id(void)
18774 {
18775         static int gost_id = 0;
18776         const EVP_PKEY_ASN1_METHOD* meth;
18777         ENGINE* e;
18778
18779         if(gost_id) return gost_id;
18780
18781         /* see if configuration loaded gost implementation from other engine*/
18782         meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
18783         if(meth) {
18784                 EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18785                 return gost_id;
18786         }
18787
18788         /* see if engine can be loaded already */
18789         e = ENGINE_by_id("gost");
18790         if(!e) {
18791                 /* load it ourself, in case statically linked */
18792                 ENGINE_load_builtin_engines();
18793                 ENGINE_load_dynamic();
18794                 e = ENGINE_by_id("gost");
18795         }
18796         if(!e) {
18797                 /* no gost engine in openssl */
18798                 return 0;
18799         }
18800         if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
18801                 ENGINE_finish(e);
18802                 ENGINE_free(e);
18803                 return 0;
18804         }
18805
18806         meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
18807         if(!meth) {
18808                 /* algo not found */
18809                 ENGINE_finish(e);
18810                 ENGINE_free(e);
18811                 return 0;
18812         }
18813         EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18814         return gost_id;
18815 }
18816 int main(void) {
18817         EVP_MD_CTX* ctx;
18818         const EVP_MD* md;
18819         unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
18820         const char* str = "Hello world";
18821         const unsigned char check[] = {
18822                 0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
18823                 0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
18824                 0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
18825                 0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
18826         };
18827         OPENSSL_config(NULL);
18828         (void)load_gost_id();
18829         md = EVP_get_digestbyname("md_gost94");
18830         if(!md) return 1;
18831         memset(digest, 0, sizeof(digest));
18832         ctx = EVP_MD_CTX_create();
18833         if(!ctx) return 2;
18834         if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
18835         if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
18836         if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
18837         /* uncomment to see the hash calculated.
18838                 {int i;
18839                 for(i=0; i<32; i++)
18840                         printf(" %2.2x", (int)digest[i]);
18841                 printf("\n");}
18842         */
18843         if(memcmp(digest, check, sizeof(check)) != 0)
18844                 return 6;
18845         return 0;
18846 }
18847
18848 _ACEOF
18849 if ac_fn_c_try_run "$LINENO"; then :
18850   eval "ac_cv_c_gost_works=yes"
18851 else
18852   eval "ac_cv_c_gost_works=no"
18853 fi
18854 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18855   conftest.$ac_objext conftest.beam conftest.$ac_ext
18856 fi
18857
18858 CFLAGS="$BAKCFLAGS"
18859 else
18860 eval "ac_cv_c_gost_works=maybe"
18861 fi
18862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
18863 $as_echo "$ac_cv_c_gost_works" >&6; }
18864
18865         if test "$ac_cv_c_gost_works" != no; then
18866                 use_gost="yes"
18867
18868 $as_echo "#define USE_GOST 1" >>confdefs.h
18869
18870         fi
18871         ;;
18872 esac
18873 fi
18874 # Check whether --enable-ecdsa was given.
18875 if test "${enable_ecdsa+set}" = set; then :
18876   enableval=$enable_ecdsa;
18877 fi
18878
18879 use_ecdsa="no"
18880 case "$enable_ecdsa" in
18881     no)
18882       ;;
18883     *)
18884       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18885               ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
18886 if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
18887
18888 else
18889   as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18890 fi
18891
18892               ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
18893 if test "x$ac_cv_func_SHA384_Init" = xyes; then :
18894
18895 else
18896   as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18897 fi
18898
18899               ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
18900 #include <openssl/evp.h>
18901
18902 "
18903 if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
18904   ac_have_decl=1
18905 else
18906   ac_have_decl=0
18907 fi
18908
18909 cat >>confdefs.h <<_ACEOF
18910 #define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
18911 _ACEOF
18912 if test $ac_have_decl = 1; then :
18913
18914 else
18915   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18916 fi
18917 ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
18918 #include <openssl/evp.h>
18919
18920 "
18921 if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
18922   ac_have_decl=1
18923 else
18924   ac_have_decl=0
18925 fi
18926
18927 cat >>confdefs.h <<_ACEOF
18928 #define HAVE_DECL_NID_SECP384R1 $ac_have_decl
18929 _ACEOF
18930 if test $ac_have_decl = 1; then :
18931
18932 else
18933   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18934 fi
18935
18936               # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
18937               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
18938 $as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
18939               if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
18940                 if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
18941                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18942 $as_echo "no" >&6; }
18943
18944 cat >>confdefs.h <<_ACEOF
18945 #define USE_ECDSA_EVP_WORKAROUND 1
18946 _ACEOF
18947
18948                 else
18949                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18950 $as_echo "yes" >&6; }
18951                 fi
18952               else
18953                 # not OpenSSL, thus likely LibreSSL, which supports it
18954                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18955 $as_echo "yes" >&6; }
18956               fi
18957       fi
18958       # we now know we have ECDSA and the required curves.
18959
18960 cat >>confdefs.h <<_ACEOF
18961 #define USE_ECDSA 1
18962 _ACEOF
18963
18964       use_ecdsa="yes"
18965       ;;
18966 esac
18967
18968 # Check whether --enable-dsa was given.
18969 if test "${enable_dsa+set}" = set; then :
18970   enableval=$enable_dsa;
18971 fi
18972
18973 use_dsa="no"
18974 case "$enable_dsa" in
18975     yes)
18976       # detect if DSA is supported, and turn it off if not.
18977       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18978       ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
18979 if test "x$ac_cv_func_DSA_SIG_new" = xyes; then :
18980
18981       as_ac_Type=`$as_echo "ac_cv_type_DSA_SIG*" | $as_tr_sh`
18982 ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
18983 $ac_includes_default
18984 #ifdef HAVE_OPENSSL_ERR_H
18985 #include <openssl/err.h>
18986 #endif
18987
18988 #ifdef HAVE_OPENSSL_RAND_H
18989 #include <openssl/rand.h>
18990 #endif
18991
18992 #ifdef HAVE_OPENSSL_CONF_H
18993 #include <openssl/conf.h>
18994 #endif
18995
18996 #ifdef HAVE_OPENSSL_ENGINE_H
18997 #include <openssl/engine.h>
18998 #endif
18999
19000 "
19001 if eval test \"x\$"$as_ac_Type"\" = x"yes"; then :
19002
19003
19004 cat >>confdefs.h <<_ACEOF
19005 #define USE_DSA 1
19006 _ACEOF
19007
19008
19009 else
19010   if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
19011                fi
19012 fi
19013
19014
19015 else
19016   if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
19017                fi
19018 fi
19019
19020       else
19021
19022 cat >>confdefs.h <<_ACEOF
19023 #define USE_DSA 1
19024 _ACEOF
19025
19026       fi
19027       ;;
19028     *)
19029       # disable dsa by default, RFC 8624 section 3.1, validators MUST NOT
19030       # support DSA for DNSSEC Validation.
19031       ;;
19032 esac
19033
19034 # Check whether --enable-ed25519 was given.
19035 if test "${enable_ed25519+set}" = set; then :
19036   enableval=$enable_ed25519;
19037 fi
19038
19039 use_ed25519="no"
19040 case "$enable_ed25519" in
19041     no)
19042       ;;
19043     *)
19044       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19045               ac_fn_c_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
19046 #include <openssl/evp.h>
19047
19048 "
19049 if test "x$ac_cv_have_decl_NID_ED25519" = xyes; then :
19050   ac_have_decl=1
19051 else
19052   ac_have_decl=0
19053 fi
19054
19055 cat >>confdefs.h <<_ACEOF
19056 #define HAVE_DECL_NID_ED25519 $ac_have_decl
19057 _ACEOF
19058 if test $ac_have_decl = 1; then :
19059
19060                 use_ed25519="yes"
19061
19062 else
19063    if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
19064                 fi
19065 fi
19066
19067       fi
19068       if test $USE_NETTLE = "yes"; then
19069                 for ac_header in nettle/eddsa.h
19070 do :
19071   ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
19072 "
19073 if test "x$ac_cv_header_nettle_eddsa_h" = xyes; then :
19074   cat >>confdefs.h <<_ACEOF
19075 #define HAVE_NETTLE_EDDSA_H 1
19076 _ACEOF
19077  use_ed25519="yes"
19078 fi
19079
19080 done
19081
19082       fi
19083       if test $use_ed25519 = "yes"; then
19084
19085 cat >>confdefs.h <<_ACEOF
19086 #define USE_ED25519 1
19087 _ACEOF
19088
19089       fi
19090       ;;
19091 esac
19092
19093 # Check whether --enable-ed448 was given.
19094 if test "${enable_ed448+set}" = set; then :
19095   enableval=$enable_ed448;
19096 fi
19097
19098 use_ed448="no"
19099 case "$enable_ed448" in
19100     no)
19101       ;;
19102     *)
19103       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19104               ac_fn_c_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
19105 #include <openssl/evp.h>
19106
19107 "
19108 if test "x$ac_cv_have_decl_NID_ED448" = xyes; then :
19109   ac_have_decl=1
19110 else
19111   ac_have_decl=0
19112 fi
19113
19114 cat >>confdefs.h <<_ACEOF
19115 #define HAVE_DECL_NID_ED448 $ac_have_decl
19116 _ACEOF
19117 if test $ac_have_decl = 1; then :
19118
19119                 use_ed448="yes"
19120
19121 else
19122    if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
19123                 fi
19124 fi
19125
19126       fi
19127       if test $use_ed448 = "yes"; then
19128
19129 cat >>confdefs.h <<_ACEOF
19130 #define USE_ED448 1
19131 _ACEOF
19132
19133       fi
19134       ;;
19135 esac
19136
19137 # Check whether --enable-event-api was given.
19138 if test "${enable_event_api+set}" = set; then :
19139   enableval=$enable_event_api;
19140 fi
19141
19142 case "$enable_event_api" in
19143     yes)
19144       UNBOUND_EVENT_INSTALL=unbound-event-install
19145
19146       UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
19147
19148       ;;
19149     *)
19150       ;;
19151 esac
19152
19153 # Check whether --enable-tfo-client was given.
19154 if test "${enable_tfo_client+set}" = set; then :
19155   enableval=$enable_tfo_client;
19156 fi
19157
19158 case "$enable_tfo_client" in
19159         yes)
19160                 case `uname` in
19161                         Linux) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
19162 #include <netinet/tcp.h>
19163
19164 "
19165 if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then :
19166   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
19167 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
19168 else
19169   as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
19170 fi
19171
19172
19173 cat >>confdefs.h <<_ACEOF
19174 #define USE_MSG_FASTOPEN 1
19175 _ACEOF
19176
19177                           ;;
19178                         Darwin) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
19179 #include <sys/socket.h>
19180
19181 "
19182 if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then :
19183   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
19184 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
19185 else
19186   as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
19187 fi
19188
19189
19190 cat >>confdefs.h <<_ACEOF
19191 #define USE_OSX_MSG_FASTOPEN 1
19192 _ACEOF
19193
19194                           ;;
19195                 esac
19196         ;;
19197         no|*)
19198                 ;;
19199 esac
19200
19201 # Check whether --enable-tfo-server was given.
19202 if test "${enable_tfo_server+set}" = set; then :
19203   enableval=$enable_tfo_server;
19204 fi
19205
19206 case "$enable_tfo_server" in
19207         yes)
19208               ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
19209 #include <netinet/tcp.h>
19210
19211 "
19212 if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then :
19213   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
19214 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
19215 else
19216   as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
19217 fi
19218
19219
19220 cat >>confdefs.h <<_ACEOF
19221 #define USE_TCP_FASTOPEN 1
19222 _ACEOF
19223
19224                 ;;
19225         no|*)
19226                 ;;
19227 esac
19228
19229 # check for libevent
19230
19231 # Check whether --with-libevent was given.
19232 if test "${with_libevent+set}" = set; then :
19233   withval=$with_libevent;
19234 else
19235    with_libevent="no"
19236 fi
19237
19238 if test "x_$with_libevent" != x_no; then
19239
19240 $as_echo "#define USE_LIBEVENT 1" >>confdefs.h
19241
19242         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
19243 $as_echo_n "checking for libevent... " >&6; }
19244         if test "x_$with_libevent" = x_ -o "x_$with_libevent" = x_yes; then
19245             with_libevent="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19246         fi
19247         for dir in $with_libevent; do
19248             thedir="$dir"
19249             if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
19250                 found_libevent="yes"
19251                                                                 if test "$thedir" != "/usr"; then
19252                                     CPPFLAGS="$CPPFLAGS -I$thedir/include"
19253                                 fi
19254                                 break;
19255                     fi
19256         done
19257         if test x_$found_libevent != x_yes; then
19258                 if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
19259                         # libevent source directory
19260                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
19261 $as_echo "found in $thedir" >&6; }
19262                         CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
19263                         BAK_LDFLAGS_SET="1"
19264                         BAK_LDFLAGS="$LDFLAGS"
19265                         # remove evdns from linking
19266                         mkdir build >/dev/null 2>&1
19267                         mkdir build/libevent >/dev/null 2>&1
19268                         mkdir build/libevent/.libs >/dev/null 2>&1
19269                         ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
19270                         ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
19271                         ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
19272                         cp $ev_files_o build/libevent
19273                         cp $ev_files_lo build/libevent
19274                         cp $ev_files_libso build/libevent/.libs
19275                         LATE_LDFLAGS="build/libevent/*.lo -lm"
19276                         LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
19277                 else
19278             as_fn_error $? "Cannot find the libevent library in $with_libevent
19279 You can restart ./configure --with-libevent=no to use a builtin alternative.
19280 Please note that this alternative is not as capable as libevent when using
19281 large outgoing port ranges.  " "$LINENO" 5
19282                 fi
19283         else
19284             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
19285 $as_echo "found in $thedir" >&6; }
19286                     if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
19287                     LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
19288
19289         if test "x$enable_rpath" = xyes; then
19290                 if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
19291                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
19292                 fi
19293         fi
19294
19295             else
19296                                     if test "$thedir" != "/usr" -a "$thedir" != ""; then
19297                         LDFLAGS="$LDFLAGS -L$thedir/lib"
19298
19299         if test "x$enable_rpath" = xyes; then
19300                 if echo "$thedir/lib" | grep "^/" >/dev/null; then
19301                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
19302                 fi
19303         fi
19304
19305                     fi
19306             fi
19307         fi
19308         # check for library used by libevent after 1.3c
19309         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19310 $as_echo_n "checking for library containing clock_gettime... " >&6; }
19311 if ${ac_cv_search_clock_gettime+:} false; then :
19312   $as_echo_n "(cached) " >&6
19313 else
19314   ac_func_search_save_LIBS=$LIBS
19315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19316 /* end confdefs.h.  */
19317
19318 /* Override any GCC internal prototype to avoid an error.
19319    Use char because int might match the return type of a GCC
19320    builtin and then its argument prototype would still apply.  */
19321 #ifdef __cplusplus
19322 extern "C"
19323 #endif
19324 char clock_gettime ();
19325 int
19326 main ()
19327 {
19328 return clock_gettime ();
19329   ;
19330   return 0;
19331 }
19332 _ACEOF
19333 for ac_lib in '' rt; do
19334   if test -z "$ac_lib"; then
19335     ac_res="none required"
19336   else
19337     ac_res=-l$ac_lib
19338     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19339   fi
19340   if ac_fn_c_try_link "$LINENO"; then :
19341   ac_cv_search_clock_gettime=$ac_res
19342 fi
19343 rm -f core conftest.err conftest.$ac_objext \
19344     conftest$ac_exeext
19345   if ${ac_cv_search_clock_gettime+:} false; then :
19346   break
19347 fi
19348 done
19349 if ${ac_cv_search_clock_gettime+:} false; then :
19350
19351 else
19352   ac_cv_search_clock_gettime=no
19353 fi
19354 rm conftest.$ac_ext
19355 LIBS=$ac_func_search_save_LIBS
19356 fi
19357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19358 $as_echo "$ac_cv_search_clock_gettime" >&6; }
19359 ac_res=$ac_cv_search_clock_gettime
19360 if test "$ac_res" != no; then :
19361   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19362
19363 fi
19364
19365
19366         # is the event.h header libev or libevent?
19367         for ac_header in event.h
19368 do :
19369   ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
19370 "
19371 if test "x$ac_cv_header_event_h" = xyes; then :
19372   cat >>confdefs.h <<_ACEOF
19373 #define HAVE_EVENT_H 1
19374 _ACEOF
19375
19376 fi
19377
19378 done
19379
19380         ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
19381 #include <event.h>
19382
19383 "
19384 if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
19385
19386                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
19387 $as_echo_n "checking for library containing event_set... " >&6; }
19388 if ${ac_cv_search_event_set+:} false; then :
19389   $as_echo_n "(cached) " >&6
19390 else
19391   ac_func_search_save_LIBS=$LIBS
19392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19393 /* end confdefs.h.  */
19394
19395 /* Override any GCC internal prototype to avoid an error.
19396    Use char because int might match the return type of a GCC
19397    builtin and then its argument prototype would still apply.  */
19398 #ifdef __cplusplus
19399 extern "C"
19400 #endif
19401 char event_set ();
19402 int
19403 main ()
19404 {
19405 return event_set ();
19406   ;
19407   return 0;
19408 }
19409 _ACEOF
19410 for ac_lib in '' ev; do
19411   if test -z "$ac_lib"; then
19412     ac_res="none required"
19413   else
19414     ac_res=-l$ac_lib
19415     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19416   fi
19417   if ac_fn_c_try_link "$LINENO"; then :
19418   ac_cv_search_event_set=$ac_res
19419 fi
19420 rm -f core conftest.err conftest.$ac_objext \
19421     conftest$ac_exeext
19422   if ${ac_cv_search_event_set+:} false; then :
19423   break
19424 fi
19425 done
19426 if ${ac_cv_search_event_set+:} false; then :
19427
19428 else
19429   ac_cv_search_event_set=no
19430 fi
19431 rm conftest.$ac_ext
19432 LIBS=$ac_func_search_save_LIBS
19433 fi
19434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
19435 $as_echo "$ac_cv_search_event_set" >&6; }
19436 ac_res=$ac_cv_search_event_set
19437 if test "$ac_res" != no; then :
19438   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19439
19440 fi
19441
19442
19443 else
19444
19445                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
19446 $as_echo_n "checking for library containing event_set... " >&6; }
19447 if ${ac_cv_search_event_set+:} false; then :
19448   $as_echo_n "(cached) " >&6
19449 else
19450   ac_func_search_save_LIBS=$LIBS
19451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19452 /* end confdefs.h.  */
19453
19454 /* Override any GCC internal prototype to avoid an error.
19455    Use char because int might match the return type of a GCC
19456    builtin and then its argument prototype would still apply.  */
19457 #ifdef __cplusplus
19458 extern "C"
19459 #endif
19460 char event_set ();
19461 int
19462 main ()
19463 {
19464 return event_set ();
19465   ;
19466   return 0;
19467 }
19468 _ACEOF
19469 for ac_lib in '' event; do
19470   if test -z "$ac_lib"; then
19471     ac_res="none required"
19472   else
19473     ac_res=-l$ac_lib
19474     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19475   fi
19476   if ac_fn_c_try_link "$LINENO"; then :
19477   ac_cv_search_event_set=$ac_res
19478 fi
19479 rm -f core conftest.err conftest.$ac_objext \
19480     conftest$ac_exeext
19481   if ${ac_cv_search_event_set+:} false; then :
19482   break
19483 fi
19484 done
19485 if ${ac_cv_search_event_set+:} false; then :
19486
19487 else
19488   ac_cv_search_event_set=no
19489 fi
19490 rm conftest.$ac_ext
19491 LIBS=$ac_func_search_save_LIBS
19492 fi
19493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
19494 $as_echo "$ac_cv_search_event_set" >&6; }
19495 ac_res=$ac_cv_search_event_set
19496 if test "$ac_res" != no; then :
19497   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19498
19499 fi
19500
19501
19502 fi
19503
19504         for ac_func in event_base_free
19505 do :
19506   ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
19507 if test "x$ac_cv_func_event_base_free" = xyes; then :
19508   cat >>confdefs.h <<_ACEOF
19509 #define HAVE_EVENT_BASE_FREE 1
19510 _ACEOF
19511
19512 fi
19513 done
19514  # only in libevent 1.2 and later
19515         for ac_func in event_base_once
19516 do :
19517   ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
19518 if test "x$ac_cv_func_event_base_once" = xyes; then :
19519   cat >>confdefs.h <<_ACEOF
19520 #define HAVE_EVENT_BASE_ONCE 1
19521 _ACEOF
19522
19523 fi
19524 done
19525  # only in libevent 1.4.1 and later
19526         for ac_func in event_base_new
19527 do :
19528   ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
19529 if test "x$ac_cv_func_event_base_new" = xyes; then :
19530   cat >>confdefs.h <<_ACEOF
19531 #define HAVE_EVENT_BASE_NEW 1
19532 _ACEOF
19533
19534 fi
19535 done
19536  # only in libevent 1.4.1 and later
19537         for ac_func in event_base_get_method
19538 do :
19539   ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
19540 if test "x$ac_cv_func_event_base_get_method" = xyes; then :
19541   cat >>confdefs.h <<_ACEOF
19542 #define HAVE_EVENT_BASE_GET_METHOD 1
19543 _ACEOF
19544
19545 fi
19546 done
19547  # only in libevent 1.4.3 and later
19548         for ac_func in ev_loop
19549 do :
19550   ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
19551 if test "x$ac_cv_func_ev_loop" = xyes; then :
19552   cat >>confdefs.h <<_ACEOF
19553 #define HAVE_EV_LOOP 1
19554 _ACEOF
19555
19556 fi
19557 done
19558  # only in libev. (tested on 3.51)
19559         for ac_func in ev_default_loop
19560 do :
19561   ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
19562 if test "x$ac_cv_func_ev_default_loop" = xyes; then :
19563   cat >>confdefs.h <<_ACEOF
19564 #define HAVE_EV_DEFAULT_LOOP 1
19565 _ACEOF
19566
19567 fi
19568 done
19569  # only in libev. (tested on 4.00)
19570         for ac_func in event_assign
19571 do :
19572   ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign"
19573 if test "x$ac_cv_func_event_assign" = xyes; then :
19574   cat >>confdefs.h <<_ACEOF
19575 #define HAVE_EVENT_ASSIGN 1
19576 _ACEOF
19577
19578 fi
19579 done
19580  # in libevent, for thread-safety
19581         ac_fn_c_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default
19582 #ifdef HAVE_EVENT_H
19583 #  include <event.h>
19584 #else
19585 #  include \"event2/event.h\"
19586 #endif
19587
19588 "
19589 if test "x$ac_cv_have_decl_evsignal_assign" = xyes; then :
19590   ac_have_decl=1
19591 else
19592   ac_have_decl=0
19593 fi
19594
19595 cat >>confdefs.h <<_ACEOF
19596 #define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl
19597 _ACEOF
19598
19599         PC_LIBEVENT_DEPENDENCY="libevent"
19600
19601         if test -n "$BAK_LDFLAGS_SET"; then
19602                 LDFLAGS="$BAK_LDFLAGS"
19603         fi
19604 else
19605
19606 $as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
19607
19608 fi
19609
19610 # check for libexpat
19611
19612 # Check whether --with-libexpat was given.
19613 if test "${with_libexpat+set}" = set; then :
19614   withval=$with_libexpat;
19615 else
19616    withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19617 fi
19618
19619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
19620 $as_echo_n "checking for libexpat... " >&6; }
19621 found_libexpat="no"
19622 for dir in $withval ; do
19623             if test -f "$dir/include/expat.h"; then
19624                 found_libexpat="yes"
19625                                 if test "$dir" != "/usr"; then
19626                     CPPFLAGS="$CPPFLAGS -I$dir/include"
19627                     LDFLAGS="$LDFLAGS -L$dir/lib"
19628                 fi
19629                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19630 $as_echo "found in $dir" >&6; }
19631                 break;
19632             fi
19633 done
19634 if test x_$found_libexpat != x_yes; then
19635         as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
19636 fi
19637 for ac_header in expat.h
19638 do :
19639   ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
19640 "
19641 if test "x$ac_cv_header_expat_h" = xyes; then :
19642   cat >>confdefs.h <<_ACEOF
19643 #define HAVE_EXPAT_H 1
19644 _ACEOF
19645
19646 fi
19647
19648 done
19649
19650 ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
19651 #include <expat.h>
19652
19653 "
19654 if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then :
19655   ac_have_decl=1
19656 else
19657   ac_have_decl=0
19658 fi
19659
19660 cat >>confdefs.h <<_ACEOF
19661 #define HAVE_DECL_XML_STOPPARSER $ac_have_decl
19662 _ACEOF
19663
19664
19665 # hiredis (redis C client for cachedb)
19666
19667 # Check whether --with-libhiredis was given.
19668 if test "${with_libhiredis+set}" = set; then :
19669   withval=$with_libhiredis;
19670 else
19671    withval="no"
19672 fi
19673
19674 found_libhiredis="no"
19675 if test x_$withval = x_yes -o x_$withval != x_no; then
19676    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
19677 $as_echo_n "checking for libhiredis... " >&6; }
19678    if test x_$withval = x_ -o x_$withval = x_yes; then
19679             withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19680    fi
19681    for dir in $withval ; do
19682             if test -f "$dir/include/hiredis/hiredis.h"; then
19683                 found_libhiredis="yes"
19684                                 if test "$dir" != "/usr"; then
19685                     CPPFLAGS="$CPPFLAGS -I$dir/include"
19686                     LDFLAGS="$LDFLAGS -L$dir/lib"
19687                 fi
19688                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19689 $as_echo "found in $dir" >&6; }
19690
19691 $as_echo "#define USE_REDIS 1" >>confdefs.h
19692
19693                 LIBS="$LIBS -lhiredis"
19694                 break;
19695             fi
19696     done
19697     if test x_$found_libhiredis != x_yes; then
19698         as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
19699     fi
19700     for ac_header in hiredis/hiredis.h
19701 do :
19702   ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
19703 "
19704 if test "x$ac_cv_header_hiredis_hiredis_h" = xyes; then :
19705   cat >>confdefs.h <<_ACEOF
19706 #define HAVE_HIREDIS_HIREDIS_H 1
19707 _ACEOF
19708
19709 fi
19710
19711 done
19712
19713     ac_fn_c_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
19714     #include <hiredis/hiredis.h>
19715
19716 "
19717 if test "x$ac_cv_have_decl_redisConnect" = xyes; then :
19718   ac_have_decl=1
19719 else
19720   ac_have_decl=0
19721 fi
19722
19723 cat >>confdefs.h <<_ACEOF
19724 #define HAVE_DECL_REDISCONNECT $ac_have_decl
19725 _ACEOF
19726
19727 fi
19728
19729 # nghttp2
19730
19731 # Check whether --with-libnghttp2 was given.
19732 if test "${with_libnghttp2+set}" = set; then :
19733   withval=$with_libnghttp2;
19734 else
19735    withval="no"
19736 fi
19737
19738 found_libnghttp2="no"
19739 if test x_$withval = x_yes -o x_$withval != x_no; then
19740    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5
19741 $as_echo_n "checking for libnghttp2... " >&6; }
19742    if test x_$withval = x_ -o x_$withval = x_yes; then
19743             withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19744    fi
19745    for dir in $withval ; do
19746             if test -f "$dir/include/nghttp2/nghttp2.h"; then
19747                 found_libnghttp2="yes"
19748                                 if test "$dir" != "/usr"; then
19749                     CPPFLAGS="$CPPFLAGS -I$dir/include"
19750                     LDFLAGS="$LDFLAGS -L$dir/lib"
19751                 fi
19752                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19753 $as_echo "found in $dir" >&6; }
19754
19755 $as_echo "#define HAVE_NGHTTP2 1" >>confdefs.h
19756
19757                 LIBS="$LIBS -lnghttp2"
19758                 break;
19759             fi
19760     done
19761     if test x_$found_libnghttp2 != x_yes; then
19762         as_fn_error $? "Could not find libnghttp2, nghttp2.h" "$LINENO" 5
19763     fi
19764     for ac_header in nghttp2/nghttp2.h
19765 do :
19766   ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default
19767 "
19768 if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes; then :
19769   cat >>confdefs.h <<_ACEOF
19770 #define HAVE_NGHTTP2_NGHTTP2_H 1
19771 _ACEOF
19772
19773 fi
19774
19775 done
19776
19777     ac_fn_c_check_decl "$LINENO" "nghttp2_session_server_new" "ac_cv_have_decl_nghttp2_session_server_new" "$ac_includes_default
19778     #include <nghttp2/nghttp2.h>
19779
19780 "
19781 if test "x$ac_cv_have_decl_nghttp2_session_server_new" = xyes; then :
19782   ac_have_decl=1
19783 else
19784   ac_have_decl=0
19785 fi
19786
19787 cat >>confdefs.h <<_ACEOF
19788 #define HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW $ac_have_decl
19789 _ACEOF
19790
19791 fi
19792
19793 # set static linking for uninstalled libraries if requested
19794
19795 staticexe=""
19796 # Check whether --enable-static-exe was given.
19797 if test "${enable_static_exe+set}" = set; then :
19798   enableval=$enable_static_exe;
19799 fi
19800
19801 if test x_$enable_static_exe = x_yes; then
19802         staticexe="-static"
19803         if test "$on_mingw" = yes; then
19804                 staticexe="-all-static"
19805                 # for static compile, include gdi32 and zlib here.
19806                 if echo $LIBS | grep 'lgdi32' >/dev/null; then
19807                         :
19808                 else
19809                         LIBS="$LIBS -lgdi32"
19810                 fi
19811                 LIBS="$LIBS -lz"
19812                 LIBS="$LIBS -l:libssp.a"
19813         fi
19814 fi
19815
19816 # set full static linking if requested
19817 # Check whether --enable-fully-static was given.
19818 if test "${enable_fully_static+set}" = set; then :
19819   enableval=$enable_fully_static;
19820 fi
19821
19822 if test x_$enable_fully_static = x_yes; then
19823         staticexe="-all-static"
19824         if test "$on_mingw" = yes; then
19825                 # for static compile, include gdi32 and zlib here.
19826                 if echo $LIBS | grep 'lgdi32' >/dev/null; then
19827                         :
19828                 else
19829                         LIBS="$LIBS -lgdi32"
19830                 fi
19831                 LIBS="$LIBS -lz"
19832                 LIBS="$LIBS -l:libssp.a"
19833         fi
19834 fi
19835
19836 # set lock checking if requested
19837 # Check whether --enable-lock_checks was given.
19838 if test "${enable_lock_checks+set}" = set; then :
19839   enableval=$enable_lock_checks;
19840 fi
19841
19842 if test x_$enable_lock_checks = x_yes; then
19843
19844 $as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
19845
19846         CHECKLOCK_OBJ="checklocks.lo"
19847
19848 fi
19849
19850
19851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
19852 $as_echo_n "checking for getaddrinfo... " >&6; }
19853 ac_cv_func_getaddrinfo=no
19854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19855 /* end confdefs.h.  */
19856
19857 #ifdef __cplusplus
19858 extern "C"
19859 {
19860 #endif
19861 char* getaddrinfo();
19862 char* (*f) () = getaddrinfo;
19863 #ifdef __cplusplus
19864 }
19865 #endif
19866 int main() {
19867         ;
19868         return 0;
19869 }
19870
19871 _ACEOF
19872 if ac_fn_c_try_link "$LINENO"; then :
19873   ac_cv_func_getaddrinfo="yes"
19874 if test "$ac_cv_header_windows_h" = "yes"; then
19875
19876 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
19877
19878         USE_WINSOCK="1"
19879         if echo $LIBS | grep 'lws2_32' >/dev/null; then
19880                 :
19881         else
19882                 LIBS="$LIBS -lws2_32"
19883         fi
19884 fi
19885
19886 else
19887   ORIGLIBS="$LIBS"
19888 LIBS="$LIBS -lws2_32"
19889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19890 /* end confdefs.h.  */
19891
19892 #ifdef HAVE_WS2TCPIP_H
19893 #include <ws2tcpip.h>
19894 #endif
19895
19896 int
19897 main ()
19898 {
19899
19900         (void)getaddrinfo(NULL, NULL, NULL, NULL);
19901
19902
19903   ;
19904   return 0;
19905 }
19906 _ACEOF
19907 if ac_fn_c_try_link "$LINENO"; then :
19908
19909 ac_cv_func_getaddrinfo="yes"
19910
19911 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
19912
19913 USE_WINSOCK="1"
19914
19915 else
19916
19917 ac_cv_func_getaddrinfo="no"
19918 LIBS="$ORIGLIBS"
19919
19920 fi
19921 rm -f core conftest.err conftest.$ac_objext \
19922     conftest$ac_exeext conftest.$ac_ext
19923
19924 fi
19925 rm -f core conftest.err conftest.$ac_objext \
19926     conftest$ac_exeext conftest.$ac_ext
19927
19928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
19929 $as_echo "$ac_cv_func_getaddrinfo" >&6; }
19930 if test $ac_cv_func_getaddrinfo = yes; then
19931
19932 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
19933
19934 fi
19935
19936 if test "$USE_WINSOCK" = 1; then
19937
19938 $as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
19939
19940         for ac_header in iphlpapi.h
19941 do :
19942   ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
19943 #include <windows.h>
19944
19945 "
19946 if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
19947   cat >>confdefs.h <<_ACEOF
19948 #define HAVE_IPHLPAPI_H 1
19949 _ACEOF
19950
19951 fi
19952
19953 done
19954
19955         if test -n "$ac_tool_prefix"; then
19956   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
19957 set dummy ${ac_tool_prefix}windres; ac_word=$2
19958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19959 $as_echo_n "checking for $ac_word... " >&6; }
19960 if ${ac_cv_prog_WINDRES+:} false; then :
19961   $as_echo_n "(cached) " >&6
19962 else
19963   if test -n "$WINDRES"; then
19964   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
19965 else
19966 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19967 for as_dir in $PATH
19968 do
19969   IFS=$as_save_IFS
19970   test -z "$as_dir" && as_dir=.
19971     for ac_exec_ext in '' $ac_executable_extensions; do
19972   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19973     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
19974     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19975     break 2
19976   fi
19977 done
19978   done
19979 IFS=$as_save_IFS
19980
19981 fi
19982 fi
19983 WINDRES=$ac_cv_prog_WINDRES
19984 if test -n "$WINDRES"; then
19985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
19986 $as_echo "$WINDRES" >&6; }
19987 else
19988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19989 $as_echo "no" >&6; }
19990 fi
19991
19992
19993 fi
19994 if test -z "$ac_cv_prog_WINDRES"; then
19995   ac_ct_WINDRES=$WINDRES
19996   # Extract the first word of "windres", so it can be a program name with args.
19997 set dummy windres; ac_word=$2
19998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19999 $as_echo_n "checking for $ac_word... " >&6; }
20000 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
20001   $as_echo_n "(cached) " >&6
20002 else
20003   if test -n "$ac_ct_WINDRES"; then
20004   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
20005 else
20006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20007 for as_dir in $PATH
20008 do
20009   IFS=$as_save_IFS
20010   test -z "$as_dir" && as_dir=.
20011     for ac_exec_ext in '' $ac_executable_extensions; do
20012   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20013     ac_cv_prog_ac_ct_WINDRES="windres"
20014     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20015     break 2
20016   fi
20017 done
20018   done
20019 IFS=$as_save_IFS
20020
20021 fi
20022 fi
20023 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
20024 if test -n "$ac_ct_WINDRES"; then
20025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
20026 $as_echo "$ac_ct_WINDRES" >&6; }
20027 else
20028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20029 $as_echo "no" >&6; }
20030 fi
20031
20032   if test "x$ac_ct_WINDRES" = x; then
20033     WINDRES=""
20034   else
20035     case $cross_compiling:$ac_tool_warned in
20036 yes:)
20037 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20038 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20039 ac_tool_warned=yes ;;
20040 esac
20041     WINDRES=$ac_ct_WINDRES
20042   fi
20043 else
20044   WINDRES="$ac_cv_prog_WINDRES"
20045 fi
20046
20047         LIBS="$LIBS -liphlpapi -lcrypt32"
20048         WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
20049
20050         WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
20051
20052         WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
20053
20054         WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
20055
20056         WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
20057
20058         WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
20059
20060         WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
20061
20062         WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
20063
20064 fi
20065 if test $ac_cv_func_getaddrinfo = no; then
20066         case " $LIBOBJS " in
20067   *" fake-rfc2553.$ac_objext "* ) ;;
20068   *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
20069  ;;
20070 esac
20071
20072 fi
20073 # check after getaddrinfo for its libraries
20074
20075 # check ioctlsocket
20076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
20077 $as_echo_n "checking for ioctlsocket... " >&6; }
20078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20079 /* end confdefs.h.  */
20080
20081 #ifdef HAVE_WINSOCK2_H
20082 #include <winsock2.h>
20083 #endif
20084
20085 int
20086 main ()
20087 {
20088
20089         (void)ioctlsocket(0, 0, NULL);
20090
20091   ;
20092   return 0;
20093 }
20094 _ACEOF
20095 if ac_fn_c_try_link "$LINENO"; then :
20096
20097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20098 $as_echo "yes" >&6; }
20099
20100 $as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
20101
20102
20103 else
20104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20105 $as_echo "no" >&6; }
20106 fi
20107 rm -f core conftest.err conftest.$ac_objext \
20108     conftest$ac_exeext conftest.$ac_ext
20109
20110
20111 # see if daemon(3) exists, and if it is deprecated.
20112 for ac_func in daemon
20113 do :
20114   ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
20115 if test "x$ac_cv_func_daemon" = xyes; then :
20116   cat >>confdefs.h <<_ACEOF
20117 #define HAVE_DAEMON 1
20118 _ACEOF
20119
20120 fi
20121 done
20122
20123 if test $ac_cv_func_daemon = yes; then
20124
20125
20126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
20127 $as_echo_n "checking if daemon is deprecated... " >&6; }
20128 cache=`echo daemon | sed 'y%.=/+-%___p_%'`
20129 if eval \${cv_cc_deprecated_$cache+:} false; then :
20130   $as_echo_n "(cached) " >&6
20131 else
20132
20133 echo '
20134 #include <stdlib.h>
20135 ' >conftest.c
20136 echo 'void f(){ (void)daemon(0, 0); }' >>conftest.c
20137 if test -z "`$CC -c conftest.c 2>&1 | grep deprecated`"; then
20138 eval "cv_cc_deprecated_$cache=no"
20139 else
20140 eval "cv_cc_deprecated_$cache=yes"
20141 fi
20142 rm -f conftest conftest.o conftest.c
20143
20144 fi
20145
20146 if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
20147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20148 $as_echo "yes" >&6; }
20149
20150 cat >>confdefs.h <<_ACEOF
20151 #define DEPRECATED_DAEMON 1
20152 _ACEOF
20153
20154 :
20155
20156 else
20157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20158 $as_echo "no" >&6; }
20159 :
20160
20161 fi
20162
20163 fi
20164
20165 ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
20166 $ac_includes_default
20167 #ifdef HAVE_SYS_UN_H
20168 #include <sys/un.h>
20169 #endif
20170
20171 "
20172 if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
20173
20174 cat >>confdefs.h <<_ACEOF
20175 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
20176 _ACEOF
20177
20178
20179 fi
20180
20181 ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
20182 $ac_includes_default
20183 #if HAVE_SYS_PARAM_H
20184 #include <sys/param.h>
20185 #endif
20186
20187 #ifdef HAVE_SYS_SOCKET_H
20188 #include <sys/socket.h>
20189 #endif
20190
20191 #ifdef HAVE_SYS_UIO_H
20192 #include <sys/uio.h>
20193 #endif
20194
20195 #ifdef HAVE_NETINET_IN_H
20196 #include <netinet/in.h>
20197 #endif
20198
20199 #ifdef HAVE_NETINET_TCP_H
20200 #include <netinet/tcp.h>
20201 #endif
20202
20203 #ifdef HAVE_ARPA_INET_H
20204 #include <arpa/inet.h>
20205 #endif
20206
20207 #ifdef HAVE_WINSOCK2_H
20208 #include <winsock2.h>
20209 #endif
20210
20211 #ifdef HAVE_WS2TCPIP_H
20212 #include <ws2tcpip.h>
20213 #endif
20214
20215 "
20216 if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
20217
20218 cat >>confdefs.h <<_ACEOF
20219 #define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
20220 _ACEOF
20221
20222
20223 fi
20224
20225
20226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htobe64" >&5
20227 $as_echo_n "checking for htobe64... " >&6; }
20228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20229 /* end confdefs.h.  */
20230
20231 #include <stdio.h>
20232 #ifdef HAVE_ENDIAN_H
20233 #  include <endian.h>
20234 #endif
20235 #ifdef HAVE_SYS_ENDIAN_H
20236 #  include <sys/endian.h>
20237 #endif
20238
20239 int
20240 main ()
20241 {
20242 unsigned long long x = htobe64(0); printf("%u", (unsigned)x);
20243   ;
20244   return 0;
20245 }
20246 _ACEOF
20247 if ac_fn_c_try_link "$LINENO"; then :
20248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20249 $as_echo "yes" >&6; }
20250
20251 $as_echo "#define HAVE_HTOBE64 1" >>confdefs.h
20252
20253 else
20254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20255 $as_echo "no" >&6; }
20256 fi
20257 rm -f core conftest.err conftest.$ac_objext \
20258     conftest$ac_exeext conftest.$ac_ext
20259
20260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for be64toh" >&5
20261 $as_echo_n "checking for be64toh... " >&6; }
20262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20263 /* end confdefs.h.  */
20264
20265 #include <stdio.h>
20266 #ifdef HAVE_ENDIAN_H
20267 #  include <endian.h>
20268 #endif
20269 #ifdef HAVE_SYS_ENDIAN_H
20270 #  include <sys/endian.h>
20271 #endif
20272
20273 int
20274 main ()
20275 {
20276 unsigned long long x = be64toh(0); printf("%u", (unsigned)x);
20277   ;
20278   return 0;
20279 }
20280 _ACEOF
20281 if ac_fn_c_try_link "$LINENO"; then :
20282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20283 $as_echo "yes" >&6; }
20284
20285 $as_echo "#define HAVE_BE64TOH 1" >>confdefs.h
20286
20287 else
20288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20289 $as_echo "no" >&6; }
20290 fi
20291 rm -f core conftest.err conftest.$ac_objext \
20292     conftest$ac_exeext conftest.$ac_ext
20293
20294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
20295 $as_echo_n "checking for library containing setusercontext... " >&6; }
20296 if ${ac_cv_search_setusercontext+:} false; then :
20297   $as_echo_n "(cached) " >&6
20298 else
20299   ac_func_search_save_LIBS=$LIBS
20300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20301 /* end confdefs.h.  */
20302
20303 /* Override any GCC internal prototype to avoid an error.
20304    Use char because int might match the return type of a GCC
20305    builtin and then its argument prototype would still apply.  */
20306 #ifdef __cplusplus
20307 extern "C"
20308 #endif
20309 char setusercontext ();
20310 int
20311 main ()
20312 {
20313 return setusercontext ();
20314   ;
20315   return 0;
20316 }
20317 _ACEOF
20318 for ac_lib in '' util; do
20319   if test -z "$ac_lib"; then
20320     ac_res="none required"
20321   else
20322     ac_res=-l$ac_lib
20323     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20324   fi
20325   if ac_fn_c_try_link "$LINENO"; then :
20326   ac_cv_search_setusercontext=$ac_res
20327 fi
20328 rm -f core conftest.err conftest.$ac_objext \
20329     conftest$ac_exeext
20330   if ${ac_cv_search_setusercontext+:} false; then :
20331   break
20332 fi
20333 done
20334 if ${ac_cv_search_setusercontext+:} false; then :
20335
20336 else
20337   ac_cv_search_setusercontext=no
20338 fi
20339 rm conftest.$ac_ext
20340 LIBS=$ac_func_search_save_LIBS
20341 fi
20342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
20343 $as_echo "$ac_cv_search_setusercontext" >&6; }
20344 ac_res=$ac_cv_search_setusercontext
20345 if test "$ac_res" != no; then :
20346   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20347
20348 fi
20349
20350 for ac_func in tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync shmget accept4 getifaddrs
20351 do :
20352   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20353 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20354 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20355   cat >>confdefs.h <<_ACEOF
20356 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20357 _ACEOF
20358
20359 fi
20360 done
20361
20362 for ac_func in setresuid
20363 do :
20364   ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
20365 if test "x$ac_cv_func_setresuid" = xyes; then :
20366   cat >>confdefs.h <<_ACEOF
20367 #define HAVE_SETRESUID 1
20368 _ACEOF
20369
20370 else
20371   for ac_func in setreuid
20372 do :
20373   ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
20374 if test "x$ac_cv_func_setreuid" = xyes; then :
20375   cat >>confdefs.h <<_ACEOF
20376 #define HAVE_SETREUID 1
20377 _ACEOF
20378
20379 fi
20380 done
20381
20382 fi
20383 done
20384
20385 for ac_func in setresgid
20386 do :
20387   ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
20388 if test "x$ac_cv_func_setresgid" = xyes; then :
20389   cat >>confdefs.h <<_ACEOF
20390 #define HAVE_SETRESGID 1
20391 _ACEOF
20392
20393 else
20394   for ac_func in setregid
20395 do :
20396   ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
20397 if test "x$ac_cv_func_setregid" = xyes; then :
20398   cat >>confdefs.h <<_ACEOF
20399 #define HAVE_SETREGID 1
20400 _ACEOF
20401
20402 fi
20403 done
20404
20405 fi
20406 done
20407
20408
20409 # check if setreuid en setregid fail, on MacOSX10.4(darwin8).
20410 if echo $target_os | grep darwin8 > /dev/null; then
20411
20412 $as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
20413
20414 fi
20415 ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
20416 $ac_includes_default
20417 #ifdef HAVE_NETINET_IN_H
20418 #include <netinet/in.h>
20419 #endif
20420
20421 #ifdef HAVE_NETINET_TCP_H
20422 #include <netinet/tcp.h>
20423 #endif
20424
20425 #ifdef HAVE_ARPA_INET_H
20426 #include <arpa/inet.h>
20427 #endif
20428
20429 #ifdef HAVE_WINSOCK2_H
20430 #include <winsock2.h>
20431 #endif
20432
20433 #ifdef HAVE_WS2TCPIP_H
20434 #include <ws2tcpip.h>
20435 #endif
20436
20437 "
20438 if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
20439   ac_have_decl=1
20440 else
20441   ac_have_decl=0
20442 fi
20443
20444 cat >>confdefs.h <<_ACEOF
20445 #define HAVE_DECL_INET_PTON $ac_have_decl
20446 _ACEOF
20447 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
20448 $ac_includes_default
20449 #ifdef HAVE_NETINET_IN_H
20450 #include <netinet/in.h>
20451 #endif
20452
20453 #ifdef HAVE_NETINET_TCP_H
20454 #include <netinet/tcp.h>
20455 #endif
20456
20457 #ifdef HAVE_ARPA_INET_H
20458 #include <arpa/inet.h>
20459 #endif
20460
20461 #ifdef HAVE_WINSOCK2_H
20462 #include <winsock2.h>
20463 #endif
20464
20465 #ifdef HAVE_WS2TCPIP_H
20466 #include <ws2tcpip.h>
20467 #endif
20468
20469 "
20470 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20471   ac_have_decl=1
20472 else
20473   ac_have_decl=0
20474 fi
20475
20476 cat >>confdefs.h <<_ACEOF
20477 #define HAVE_DECL_INET_NTOP $ac_have_decl
20478 _ACEOF
20479
20480 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
20481 if test "x$ac_cv_func_inet_aton" = xyes; then :
20482   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
20483
20484 else
20485   case " $LIBOBJS " in
20486   *" inet_aton.$ac_objext "* ) ;;
20487   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
20488  ;;
20489 esac
20490
20491 fi
20492
20493
20494 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
20495 if test "x$ac_cv_func_inet_pton" = xyes; then :
20496   $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
20497
20498 else
20499   case " $LIBOBJS " in
20500   *" inet_pton.$ac_objext "* ) ;;
20501   *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
20502  ;;
20503 esac
20504
20505 fi
20506
20507
20508 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
20509 if test "x$ac_cv_func_inet_ntop" = xyes; then :
20510   $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
20511
20512 else
20513   case " $LIBOBJS " in
20514   *" inet_ntop.$ac_objext "* ) ;;
20515   *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
20516  ;;
20517 esac
20518
20519 fi
20520
20521
20522 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
20523 if test "x$ac_cv_func_snprintf" = xyes; then :
20524   $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
20525
20526 else
20527   case " $LIBOBJS " in
20528   *" snprintf.$ac_objext "* ) ;;
20529   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
20530  ;;
20531 esac
20532
20533 fi
20534
20535
20536 # test if snprintf return the proper length
20537 if test "x$ac_cv_func_snprintf" = xyes; then
20538     if test c${cross_compiling} = cno; then
20539         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
20540 $as_echo_n "checking for correct snprintf return value... " >&6; }
20541         if test "$cross_compiling" = yes; then :
20542   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20543 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20544 as_fn_error $? "cannot run test program while cross compiling
20545 See \`config.log' for more details" "$LINENO" 5; }
20546 else
20547   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20548 /* end confdefs.h.  */
20549 $ac_includes_default
20550
20551 int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
20552
20553 _ACEOF
20554 if ac_fn_c_try_run "$LINENO"; then :
20555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20556 $as_echo "yes" >&6; }
20557 else
20558
20559                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20560 $as_echo "no" >&6; }
20561
20562 $as_echo "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
20563
20564                 case " $LIBOBJS " in
20565   *" snprintf.$ac_objext "* ) ;;
20566   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
20567  ;;
20568 esac
20569
20570
20571 fi
20572 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20573   conftest.$ac_objext conftest.beam conftest.$ac_ext
20574 fi
20575
20576     fi
20577 fi
20578 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
20579 if test "x$ac_cv_func_strlcat" = xyes; then :
20580   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
20581
20582 else
20583   case " $LIBOBJS " in
20584   *" strlcat.$ac_objext "* ) ;;
20585   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
20586  ;;
20587 esac
20588
20589 fi
20590
20591
20592 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
20593 if test "x$ac_cv_func_strlcpy" = xyes; then :
20594   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
20595
20596 else
20597   case " $LIBOBJS " in
20598   *" strlcpy.$ac_objext "* ) ;;
20599   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
20600  ;;
20601 esac
20602
20603 fi
20604
20605
20606 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
20607 if test "x$ac_cv_func_memmove" = xyes; then :
20608   $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
20609
20610 else
20611   case " $LIBOBJS " in
20612   *" memmove.$ac_objext "* ) ;;
20613   *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
20614  ;;
20615 esac
20616
20617 fi
20618
20619
20620 ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
20621 if test "x$ac_cv_func_gmtime_r" = xyes; then :
20622   $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
20623
20624 else
20625   case " $LIBOBJS " in
20626   *" gmtime_r.$ac_objext "* ) ;;
20627   *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
20628  ;;
20629 esac
20630
20631 fi
20632
20633
20634 ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
20635 if test "x$ac_cv_func_isblank" = xyes; then :
20636   $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
20637
20638 else
20639   case " $LIBOBJS " in
20640   *" isblank.$ac_objext "* ) ;;
20641   *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
20642  ;;
20643 esac
20644
20645 fi
20646
20647
20648 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
20649 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
20650   $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
20651
20652 else
20653   case " $LIBOBJS " in
20654   *" explicit_bzero.$ac_objext "* ) ;;
20655   *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
20656  ;;
20657 esac
20658
20659 fi
20660
20661
20662 LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
20663
20664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
20665 $as_echo_n "checking for reallocarray... " >&6; }
20666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20667 /* end confdefs.h.  */
20668 $ac_includes_default
20669
20670 #ifndef _OPENBSD_SOURCE
20671 #define _OPENBSD_SOURCE 1
20672 #endif
20673 #include <stdlib.h>
20674 int main(void) {
20675         void* p = reallocarray(NULL, 10, 100);
20676         free(p);
20677         return 0;
20678 }
20679
20680 _ACEOF
20681 if ac_fn_c_try_link "$LINENO"; then :
20682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20683 $as_echo "yes" >&6; }
20684
20685 $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
20686
20687
20688 else
20689
20690         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20691 $as_echo "no" >&6; }
20692         case " $LIBOBJS " in
20693   *" reallocarray.$ac_objext "* ) ;;
20694   *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
20695  ;;
20696 esac
20697
20698
20699 fi
20700 rm -f core conftest.err conftest.$ac_objext \
20701     conftest$ac_exeext conftest.$ac_ext
20702 ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
20703 if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
20704   ac_have_decl=1
20705 else
20706   ac_have_decl=0
20707 fi
20708
20709 cat >>confdefs.h <<_ACEOF
20710 #define HAVE_DECL_REALLOCARRAY $ac_have_decl
20711 _ACEOF
20712
20713 if test "$USE_NSS" = "no"; then
20714         ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
20715 if test "x$ac_cv_func_arc4random" = xyes; then :
20716   $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
20717
20718 else
20719   case " $LIBOBJS " in
20720   *" arc4random.$ac_objext "* ) ;;
20721   *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
20722  ;;
20723 esac
20724
20725 fi
20726
20727
20728         ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
20729 if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
20730   $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
20731
20732 else
20733   case " $LIBOBJS " in
20734   *" arc4random_uniform.$ac_objext "* ) ;;
20735   *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
20736  ;;
20737 esac
20738
20739 fi
20740
20741
20742         if test "$ac_cv_func_arc4random" = "no"; then
20743                 case " $LIBOBJS " in
20744   *" arc4_lock.$ac_objext "* ) ;;
20745   *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
20746  ;;
20747 esac
20748
20749                 for ac_func in getentropy
20750 do :
20751   ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
20752 if test "x$ac_cv_func_getentropy" = xyes; then :
20753   cat >>confdefs.h <<_ACEOF
20754 #define HAVE_GETENTROPY 1
20755 _ACEOF
20756
20757 else
20758
20759                     if test "$USE_WINSOCK" = 1; then
20760                         case " $LIBOBJS " in
20761   *" getentropy_win.$ac_objext "* ) ;;
20762   *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
20763  ;;
20764 esac
20765
20766                     else
20767                         case "$host" in
20768                         Darwin|*darwin*)
20769                                 case " $LIBOBJS " in
20770   *" getentropy_osx.$ac_objext "* ) ;;
20771   *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
20772  ;;
20773 esac
20774
20775                         ;;
20776                         *solaris*|*sunos*|SunOS)
20777                                 case " $LIBOBJS " in
20778   *" getentropy_solaris.$ac_objext "* ) ;;
20779   *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
20780  ;;
20781 esac
20782
20783                                 for ac_header in sys/sha2.h
20784 do :
20785   ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
20786 "
20787 if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
20788   cat >>confdefs.h <<_ACEOF
20789 #define HAVE_SYS_SHA2_H 1
20790 _ACEOF
20791
20792 else
20793
20794                                         for ac_func in SHA512_Update
20795 do :
20796   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20797 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20798   cat >>confdefs.h <<_ACEOF
20799 #define HAVE_SHA512_UPDATE 1
20800 _ACEOF
20801
20802 else
20803
20804                                                 case " $LIBOBJS " in
20805   *" sha512.$ac_objext "* ) ;;
20806   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20807  ;;
20808 esac
20809
20810
20811 fi
20812 done
20813
20814
20815 fi
20816
20817 done
20818
20819                                 if test "$ac_cv_header_sys_sha2_h" = "yes"; then
20820                                         # this lib needed for sha2 on solaris
20821                                         LIBS="$LIBS -lmd"
20822                                 fi
20823                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20824 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20825 if ${ac_cv_search_clock_gettime+:} false; then :
20826   $as_echo_n "(cached) " >&6
20827 else
20828   ac_func_search_save_LIBS=$LIBS
20829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20830 /* end confdefs.h.  */
20831
20832 /* Override any GCC internal prototype to avoid an error.
20833    Use char because int might match the return type of a GCC
20834    builtin and then its argument prototype would still apply.  */
20835 #ifdef __cplusplus
20836 extern "C"
20837 #endif
20838 char clock_gettime ();
20839 int
20840 main ()
20841 {
20842 return clock_gettime ();
20843   ;
20844   return 0;
20845 }
20846 _ACEOF
20847 for ac_lib in '' rt; do
20848   if test -z "$ac_lib"; then
20849     ac_res="none required"
20850   else
20851     ac_res=-l$ac_lib
20852     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20853   fi
20854   if ac_fn_c_try_link "$LINENO"; then :
20855   ac_cv_search_clock_gettime=$ac_res
20856 fi
20857 rm -f core conftest.err conftest.$ac_objext \
20858     conftest$ac_exeext
20859   if ${ac_cv_search_clock_gettime+:} false; then :
20860   break
20861 fi
20862 done
20863 if ${ac_cv_search_clock_gettime+:} false; then :
20864
20865 else
20866   ac_cv_search_clock_gettime=no
20867 fi
20868 rm conftest.$ac_ext
20869 LIBS=$ac_func_search_save_LIBS
20870 fi
20871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20872 $as_echo "$ac_cv_search_clock_gettime" >&6; }
20873 ac_res=$ac_cv_search_clock_gettime
20874 if test "$ac_res" != no; then :
20875   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20876
20877 fi
20878
20879                         ;;
20880                         *freebsd*|*FreeBSD)
20881                                 case " $LIBOBJS " in
20882   *" getentropy_freebsd.$ac_objext "* ) ;;
20883   *) LIBOBJS="$LIBOBJS getentropy_freebsd.$ac_objext"
20884  ;;
20885 esac
20886
20887                         ;;
20888                         *linux*|Linux|*)
20889                                 case " $LIBOBJS " in
20890   *" getentropy_linux.$ac_objext "* ) ;;
20891   *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
20892  ;;
20893 esac
20894
20895                                 for ac_func in SHA512_Update
20896 do :
20897   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20898 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20899   cat >>confdefs.h <<_ACEOF
20900 #define HAVE_SHA512_UPDATE 1
20901 _ACEOF
20902
20903 else
20904
20905
20906 $as_echo "#define COMPAT_SHA512 1" >>confdefs.h
20907
20908                                         case " $LIBOBJS " in
20909   *" sha512.$ac_objext "* ) ;;
20910   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20911  ;;
20912 esac
20913
20914
20915 fi
20916 done
20917
20918                                 for ac_header in sys/sysctl.h
20919 do :
20920   ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
20921 "
20922 if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
20923   cat >>confdefs.h <<_ACEOF
20924 #define HAVE_SYS_SYSCTL_H 1
20925 _ACEOF
20926
20927 fi
20928
20929 done
20930
20931                                 for ac_func in getauxval
20932 do :
20933   ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
20934 if test "x$ac_cv_func_getauxval" = xyes; then :
20935   cat >>confdefs.h <<_ACEOF
20936 #define HAVE_GETAUXVAL 1
20937 _ACEOF
20938
20939 fi
20940 done
20941
20942                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20943 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20944 if ${ac_cv_search_clock_gettime+:} false; then :
20945   $as_echo_n "(cached) " >&6
20946 else
20947   ac_func_search_save_LIBS=$LIBS
20948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20949 /* end confdefs.h.  */
20950
20951 /* Override any GCC internal prototype to avoid an error.
20952    Use char because int might match the return type of a GCC
20953    builtin and then its argument prototype would still apply.  */
20954 #ifdef __cplusplus
20955 extern "C"
20956 #endif
20957 char clock_gettime ();
20958 int
20959 main ()
20960 {
20961 return clock_gettime ();
20962   ;
20963   return 0;
20964 }
20965 _ACEOF
20966 for ac_lib in '' rt; do
20967   if test -z "$ac_lib"; then
20968     ac_res="none required"
20969   else
20970     ac_res=-l$ac_lib
20971     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20972   fi
20973   if ac_fn_c_try_link "$LINENO"; then :
20974   ac_cv_search_clock_gettime=$ac_res
20975 fi
20976 rm -f core conftest.err conftest.$ac_objext \
20977     conftest$ac_exeext
20978   if ${ac_cv_search_clock_gettime+:} false; then :
20979   break
20980 fi
20981 done
20982 if ${ac_cv_search_clock_gettime+:} false; then :
20983
20984 else
20985   ac_cv_search_clock_gettime=no
20986 fi
20987 rm conftest.$ac_ext
20988 LIBS=$ac_func_search_save_LIBS
20989 fi
20990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20991 $as_echo "$ac_cv_search_clock_gettime" >&6; }
20992 ac_res=$ac_cv_search_clock_gettime
20993 if test "$ac_res" != no; then :
20994   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20995
20996 fi
20997
20998                         ;;
20999                         esac
21000                     fi
21001
21002 fi
21003 done
21004
21005         fi
21006 fi
21007 LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
21008
21009 ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
21010 if test "x$ac_cv_func_ctime_r" = xyes; then :
21011   $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
21012
21013 else
21014   case " $LIBOBJS " in
21015   *" ctime_r.$ac_objext "* ) ;;
21016   *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
21017  ;;
21018 esac
21019
21020 fi
21021
21022
21023 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
21024 if test "x$ac_cv_func_strsep" = xyes; then :
21025   $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
21026
21027 else
21028   case " $LIBOBJS " in
21029   *" strsep.$ac_objext "* ) ;;
21030   *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
21031  ;;
21032 esac
21033
21034 fi
21035
21036
21037
21038 # Check whether --enable-allsymbols was given.
21039 if test "${enable_allsymbols+set}" = set; then :
21040   enableval=$enable_allsymbols;
21041 fi
21042
21043 case "$enable_allsymbols" in
21044         yes)
21045         COMMON_OBJ_ALL_SYMBOLS=""
21046         UBSYMS=""
21047         EXTRALINK="-L. -L.libs -lunbound"
21048
21049 $as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
21050
21051         ;;
21052         no|*)
21053         COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
21054         UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
21055         EXTRALINK=""
21056         ;;
21057 esac
21058
21059
21060
21061 if test x_$enable_lock_checks = x_yes; then
21062         UBSYMS="-export-symbols clubsyms.def"
21063         cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
21064         echo lock_protect >> clubsyms.def
21065         echo lock_unprotect >> clubsyms.def
21066         echo lock_get_mem >> clubsyms.def
21067         echo checklock_start >> clubsyms.def
21068         echo checklock_stop >> clubsyms.def
21069         echo checklock_lock >> clubsyms.def
21070         echo checklock_unlock >> clubsyms.def
21071         echo checklock_init >> clubsyms.def
21072         echo checklock_thrcreate >> clubsyms.def
21073         echo checklock_thrjoin >> clubsyms.def
21074 fi
21075
21076 # check for dnstap if requested
21077
21078   # Check whether --enable-dnstap was given.
21079 if test "${enable_dnstap+set}" = set; then :
21080   enableval=$enable_dnstap; opt_dnstap=$enableval
21081 else
21082   opt_dnstap=no
21083 fi
21084
21085
21086
21087 # Check whether --with-dnstap-socket-path was given.
21088 if test "${with_dnstap_socket_path+set}" = set; then :
21089   withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
21090 else
21091   opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
21092 fi
21093
21094
21095   if test "x$opt_dnstap" != "xno"; then
21096     # Extract the first word of "protoc-c", so it can be a program name with args.
21097 set dummy protoc-c; ac_word=$2
21098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21099 $as_echo_n "checking for $ac_word... " >&6; }
21100 if ${ac_cv_path_PROTOC_C+:} false; then :
21101   $as_echo_n "(cached) " >&6
21102 else
21103   case $PROTOC_C in
21104   [\\/]* | ?:[\\/]*)
21105   ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
21106   ;;
21107   *)
21108   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21109 for as_dir in $PATH
21110 do
21111   IFS=$as_save_IFS
21112   test -z "$as_dir" && as_dir=.
21113     for ac_exec_ext in '' $ac_executable_extensions; do
21114   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21115     ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
21116     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21117     break 2
21118   fi
21119 done
21120   done
21121 IFS=$as_save_IFS
21122
21123   ;;
21124 esac
21125 fi
21126 PROTOC_C=$ac_cv_path_PROTOC_C
21127 if test -n "$PROTOC_C"; then
21128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
21129 $as_echo "$PROTOC_C" >&6; }
21130 else
21131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21132 $as_echo "no" >&6; }
21133 fi
21134
21135
21136     if test -z "$PROTOC_C"; then
21137       as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
21138     fi
21139
21140 # Check whether --with-protobuf-c was given.
21141 if test "${with_protobuf_c+set}" = set; then :
21142   withval=$with_protobuf_c;
21143           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
21144           if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
21145             CFLAGS="$CFLAGS -I$withval/include/google"
21146           else
21147             CFLAGS="$CFLAGS -I$withval/include"
21148           fi
21149           LDFLAGS="$LDFLAGS -L$withval/lib"
21150
21151 else
21152
21153           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
21154           if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
21155             CFLAGS="$CFLAGS -I/usr/include/google"
21156           else
21157             if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
21158               CFLAGS="$CFLAGS -I/usr/local/include/google"
21159               LDFLAGS="$LDFLAGS -L/usr/local/lib"
21160             fi
21161           fi
21162
21163 fi
21164
21165     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
21166 $as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
21167 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21168   $as_echo_n "(cached) " >&6
21169 else
21170   ac_func_search_save_LIBS=$LIBS
21171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21172 /* end confdefs.h.  */
21173
21174 /* Override any GCC internal prototype to avoid an error.
21175    Use char because int might match the return type of a GCC
21176    builtin and then its argument prototype would still apply.  */
21177 #ifdef __cplusplus
21178 extern "C"
21179 #endif
21180 char protobuf_c_message_pack ();
21181 int
21182 main ()
21183 {
21184 return protobuf_c_message_pack ();
21185   ;
21186   return 0;
21187 }
21188 _ACEOF
21189 for ac_lib in '' protobuf-c; do
21190   if test -z "$ac_lib"; then
21191     ac_res="none required"
21192   else
21193     ac_res=-l$ac_lib
21194     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21195   fi
21196   if ac_fn_c_try_link "$LINENO"; then :
21197   ac_cv_search_protobuf_c_message_pack=$ac_res
21198 fi
21199 rm -f core conftest.err conftest.$ac_objext \
21200     conftest$ac_exeext
21201   if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21202   break
21203 fi
21204 done
21205 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
21206
21207 else
21208   ac_cv_search_protobuf_c_message_pack=no
21209 fi
21210 rm conftest.$ac_ext
21211 LIBS=$ac_func_search_save_LIBS
21212 fi
21213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
21214 $as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
21215 ac_res=$ac_cv_search_protobuf_c_message_pack
21216 if test "$ac_res" != no; then :
21217   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21218
21219 else
21220   as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
21221 fi
21222
21223
21224
21225 $as_echo "#define USE_DNSTAP 1" >>confdefs.h
21226
21227         ENABLE_DNSTAP=1
21228
21229
21230
21231         hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
21232
21233
21234 cat >>confdefs.h <<_ACEOF
21235 #define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
21236 _ACEOF
21237
21238         DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path"
21239
21240         DNSTAP_SOCKET_TESTBIN='unbound-dnstap-socket$(EXEEXT)'
21241
21242         DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"
21243
21244         DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"
21245
21246
21247   else
21248
21249         ENABLE_DNSTAP=0
21250
21251
21252
21253   fi
21254
21255
21256 # check for dnscrypt if requested
21257
21258   # Check whether --enable-dnscrypt was given.
21259 if test "${enable_dnscrypt+set}" = set; then :
21260   enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
21261 else
21262   opt_dnscrypt=no
21263 fi
21264
21265
21266   if test "x$opt_dnscrypt" != "xno"; then
21267
21268 # Check whether --with-libsodium was given.
21269 if test "${with_libsodium+set}" = set; then :
21270   withval=$with_libsodium;
21271         CFLAGS="$CFLAGS -I$withval/include"
21272         LDFLAGS="$LDFLAGS -L$withval/lib"
21273
21274 fi
21275
21276     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
21277 $as_echo_n "checking for library containing sodium_init... " >&6; }
21278 if ${ac_cv_search_sodium_init+:} 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_init ();
21292 int
21293 main ()
21294 {
21295 return sodium_init ();
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_init=$ac_res
21309 fi
21310 rm -f core conftest.err conftest.$ac_objext \
21311     conftest$ac_exeext
21312   if ${ac_cv_search_sodium_init+:} false; then :
21313   break
21314 fi
21315 done
21316 if ${ac_cv_search_sodium_init+:} false; then :
21317
21318 else
21319   ac_cv_search_sodium_init=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_init" >&5
21325 $as_echo "$ac_cv_search_sodium_init" >&6; }
21326 ac_res=$ac_cv_search_sodium_init
21327 if test "$ac_res" != no; then :
21328   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21329
21330 else
21331   as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
21332 fi
21333
21334     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
21335 $as_echo_n "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
21336 if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21337   $as_echo_n "(cached) " >&6
21338 else
21339   ac_func_search_save_LIBS=$LIBS
21340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21341 /* end confdefs.h.  */
21342
21343 /* Override any GCC internal prototype to avoid an error.
21344    Use char because int might match the return type of a GCC
21345    builtin and then its argument prototype would still apply.  */
21346 #ifdef __cplusplus
21347 extern "C"
21348 #endif
21349 char crypto_box_curve25519xchacha20poly1305_beforenm ();
21350 int
21351 main ()
21352 {
21353 return crypto_box_curve25519xchacha20poly1305_beforenm ();
21354   ;
21355   return 0;
21356 }
21357 _ACEOF
21358 for ac_lib in '' sodium; do
21359   if test -z "$ac_lib"; then
21360     ac_res="none required"
21361   else
21362     ac_res=-l$ac_lib
21363     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21364   fi
21365   if ac_fn_c_try_link "$LINENO"; then :
21366   ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
21367 fi
21368 rm -f core conftest.err conftest.$ac_objext \
21369     conftest$ac_exeext
21370   if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21371   break
21372 fi
21373 done
21374 if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
21375
21376 else
21377   ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
21378 fi
21379 rm conftest.$ac_ext
21380 LIBS=$ac_func_search_save_LIBS
21381 fi
21382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
21383 $as_echo "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
21384 ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
21385 if test "$ac_res" != no; then :
21386   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21387
21388             ENABLE_DNSCRYPT_XCHACHA20=1
21389
21390
21391 $as_echo "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
21392
21393
21394 else
21395
21396             ENABLE_DNSCRYPT_XCHACHA20=0
21397
21398
21399 fi
21400
21401     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
21402 $as_echo_n "checking for library containing sodium_set_misuse_handler... " >&6; }
21403 if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21404   $as_echo_n "(cached) " >&6
21405 else
21406   ac_func_search_save_LIBS=$LIBS
21407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21408 /* end confdefs.h.  */
21409
21410 /* Override any GCC internal prototype to avoid an error.
21411    Use char because int might match the return type of a GCC
21412    builtin and then its argument prototype would still apply.  */
21413 #ifdef __cplusplus
21414 extern "C"
21415 #endif
21416 char sodium_set_misuse_handler ();
21417 int
21418 main ()
21419 {
21420 return sodium_set_misuse_handler ();
21421   ;
21422   return 0;
21423 }
21424 _ACEOF
21425 for ac_lib in '' sodium; do
21426   if test -z "$ac_lib"; then
21427     ac_res="none required"
21428   else
21429     ac_res=-l$ac_lib
21430     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21431   fi
21432   if ac_fn_c_try_link "$LINENO"; then :
21433   ac_cv_search_sodium_set_misuse_handler=$ac_res
21434 fi
21435 rm -f core conftest.err conftest.$ac_objext \
21436     conftest$ac_exeext
21437   if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21438   break
21439 fi
21440 done
21441 if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
21442
21443 else
21444   ac_cv_search_sodium_set_misuse_handler=no
21445 fi
21446 rm conftest.$ac_ext
21447 LIBS=$ac_func_search_save_LIBS
21448 fi
21449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
21450 $as_echo "$ac_cv_search_sodium_set_misuse_handler" >&6; }
21451 ac_res=$ac_cv_search_sodium_set_misuse_handler
21452 if test "$ac_res" != no; then :
21453   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21454
21455
21456 $as_echo "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
21457
21458
21459 fi
21460
21461
21462
21463 $as_echo "#define USE_DNSCRYPT 1" >>confdefs.h
21464
21465         ENABLE_DNSCRYPT=1
21466
21467
21468         DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
21469
21470         DNSCRYPT_OBJ="dnscrypt.lo"
21471
21472
21473   else
21474     ENABLE_DNSCRYPT_XCHACHA20=0
21475
21476
21477         ENABLE_DNSCRYPT=0
21478
21479
21480
21481   fi
21482
21483
21484 # check for cachedb if requested
21485 # Check whether --enable-cachedb was given.
21486 if test "${enable_cachedb+set}" = set; then :
21487   enableval=$enable_cachedb;
21488 fi
21489
21490 # turn on cachedb when hiredis support is enabled.
21491 if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
21492 case "$enable_cachedb" in
21493     yes)
21494
21495 $as_echo "#define USE_CACHEDB 1" >>confdefs.h
21496
21497         ;;
21498     no|*)
21499         # nothing
21500         ;;
21501 esac
21502
21503 # check for ipsecmod if requested
21504 # Check whether --enable-ipsecmod was given.
21505 if test "${enable_ipsecmod+set}" = set; then :
21506   enableval=$enable_ipsecmod;
21507 fi
21508
21509 case "$enable_ipsecmod" in
21510         yes)
21511
21512 $as_echo "#define USE_IPSECMOD 1" >>confdefs.h
21513
21514                 IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
21515
21516                 IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
21517
21518                 ;;
21519         no|*)
21520                 # nothing
21521                 ;;
21522 esac
21523
21524 # check for ipset if requested
21525 # Check whether --enable-ipset was given.
21526 if test "${enable_ipset+set}" = set; then :
21527   enableval=$enable_ipset;
21528 fi
21529
21530 case "$enable_ipset" in
21531     yes)
21532
21533 $as_echo "#define USE_IPSET 1" >>confdefs.h
21534
21535                 IPSET_SRC="ipset/ipset.c"
21536
21537                 IPSET_OBJ="ipset.lo"
21538
21539
21540                 # mnl
21541
21542 # Check whether --with-libmnl was given.
21543 if test "${with_libmnl+set}" = set; then :
21544   withval=$with_libmnl;
21545 else
21546    withval="yes"
21547 fi
21548
21549                 found_libmnl="no"
21550                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
21551 $as_echo_n "checking for libmnl... " >&6; }
21552                 if test x_$withval = x_ -o x_$withval = x_yes; then
21553                         withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
21554                 fi
21555                 for dir in $withval ; do
21556                         if test -f "$dir/include/libmnl/libmnl.h"; then
21557                                 found_libmnl="yes"
21558                                                                 if test "$dir" != "/usr"; then
21559                                         CPPFLAGS="$CPPFLAGS -I$dir/include"
21560                                         LDFLAGS="$LDFLAGS -L$dir/lib"
21561                                 fi
21562                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
21563 $as_echo "found in $dir" >&6; }
21564                                 LIBS="$LIBS -lmnl"
21565                                 break;
21566                         fi
21567                 done
21568                 if test x_$found_libmnl != x_yes; then
21569                         as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5
21570                 fi
21571                 ;;
21572     no|*)
21573         # nothing
21574                 ;;
21575 esac
21576 # Check whether --enable-explicit-port-randomisation was given.
21577 if test "${enable_explicit_port_randomisation+set}" = set; then :
21578   enableval=$enable_explicit_port_randomisation;
21579 fi
21580
21581 case "$enable_explicit_port_randomisation" in
21582         no)
21583
21584 $as_echo "#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1" >>confdefs.h
21585
21586                 ;;
21587         yes|*)
21588                 ;;
21589 esac
21590
21591
21592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
21593 $as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
21594 # on openBSD, the implicit rule make $< work.
21595 # on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
21596 # gmake works.
21597 cat >conftest.make <<EOF
21598 all:    conftest.lo
21599
21600 conftest.lo foo.lo bla.lo:
21601         if test -f "\$<"; then touch \$@; fi
21602
21603 .SUFFIXES: .lo
21604 .c.lo:
21605         if test -f "\$<"; then touch \$@; fi
21606
21607 conftest.lo:        conftest.dir/conftest.c
21608 EOF
21609 mkdir conftest.dir
21610 touch conftest.dir/conftest.c
21611 rm -f conftest.lo conftest.c
21612 ${MAKE:-make} -f conftest.make >/dev/null
21613 rm -f conftest.make conftest.c conftest.dir/conftest.c
21614 rm -rf conftest.dir
21615 if test ! -f conftest.lo; then
21616         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21617 $as_echo "no" >&6; }
21618         SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
21619         SOURCEFILE='`cat .source`'
21620 else
21621         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21622 $as_echo "yes" >&6; }
21623         SOURCEDETERMINE=':'
21624         SOURCEFILE='$<'
21625 fi
21626 rm -f conftest.lo
21627
21628
21629
21630 # see if we want to build the library or everything
21631 ALLTARGET="alltargets"
21632 INSTALLTARGET="install-all"
21633
21634 # Check whether --with-libunbound-only was given.
21635 if test "${with_libunbound_only+set}" = set; then :
21636   withval=$with_libunbound_only;
21637         if test "$withval" = "yes"; then
21638                 ALLTARGET="lib"
21639                 INSTALLTARGET="install-lib"
21640         fi
21641
21642 fi
21643
21644 if test $ALLTARGET = "alltargets"; then
21645         if test $USE_NSS = "yes"; then
21646                 as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
21647         fi
21648         if test $USE_NETTLE = "yes"; then
21649                 as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
21650         fi
21651 fi
21652
21653
21654
21655
21656
21657   { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
21658 $as_echo "$as_me: Stripping extension flags..." >&6;}
21659
21660   if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
21661     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
21662
21663 $as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
21664
21665   fi
21666
21667
21668   if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
21669     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
21670
21671 $as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
21672
21673   fi
21674
21675
21676   if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
21677     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
21678
21679 $as_echo "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
21680
21681   fi
21682
21683
21684   if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
21685     CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
21686
21687 $as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
21688
21689   fi
21690
21691
21692   if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
21693     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
21694
21695 $as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
21696
21697   fi
21698
21699
21700   if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
21701     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
21702
21703 $as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
21704
21705   fi
21706
21707
21708   if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
21709     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
21710
21711 $as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
21712
21713   fi
21714
21715
21716   if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
21717     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
21718
21719 $as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
21720
21721   fi
21722
21723
21724   if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
21725     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
21726
21727 $as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
21728
21729   fi
21730
21731
21732 if test -n "$LATE_LDFLAGS"; then
21733   LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
21734 fi
21735 # remove start spaces
21736 LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
21737 LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
21738
21739
21740 cat >>confdefs.h <<_ACEOF
21741 #define MAXSYSLOGMSGLEN 10240
21742 _ACEOF
21743
21744
21745
21746
21747 version=1.13.1
21748
21749 date=`date +'%b %e, %Y'`
21750
21751
21752 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"
21753
21754 ac_config_headers="$ac_config_headers config.h"
21755
21756 cat >confcache <<\_ACEOF
21757 # This file is a shell script that caches the results of configure
21758 # tests run on this system so they can be shared between configure
21759 # scripts and configure runs, see configure's option --config-cache.
21760 # It is not useful on other systems.  If it contains results you don't
21761 # want to keep, you may remove or edit it.
21762 #
21763 # config.status only pays attention to the cache file if you give it
21764 # the --recheck option to rerun configure.
21765 #
21766 # `ac_cv_env_foo' variables (set or unset) will be overridden when
21767 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21768 # following values.
21769
21770 _ACEOF
21771
21772 # The following way of writing the cache mishandles newlines in values,
21773 # but we know of no workaround that is simple, portable, and efficient.
21774 # So, we kill variables containing newlines.
21775 # Ultrix sh set writes to stderr and can't be redirected directly,
21776 # and sets the high bit in the cache file unless we assign to the vars.
21777 (
21778   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21779     eval ac_val=\$$ac_var
21780     case $ac_val in #(
21781     *${as_nl}*)
21782       case $ac_var in #(
21783       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
21784 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
21785       esac
21786       case $ac_var in #(
21787       _ | IFS | as_nl) ;; #(
21788       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
21789       *) { eval $ac_var=; unset $ac_var;} ;;
21790       esac ;;
21791     esac
21792   done
21793
21794   (set) 2>&1 |
21795     case $as_nl`(ac_space=' '; set) 2>&1` in #(
21796     *${as_nl}ac_space=\ *)
21797       # `set' does not quote correctly, so add quotes: double-quote
21798       # substitution turns \\\\ into \\, and sed turns \\ into \.
21799       sed -n \
21800         "s/'/'\\\\''/g;
21801           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21802       ;; #(
21803     *)
21804       # `set' quotes correctly as required by POSIX, so do not add quotes.
21805       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
21806       ;;
21807     esac |
21808     sort
21809 ) |
21810   sed '
21811      /^ac_cv_env_/b end
21812      t clear
21813      :clear
21814      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21815      t end
21816      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21817      :end' >>confcache
21818 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21819   if test -w "$cache_file"; then
21820     if test "x$cache_file" != "x/dev/null"; then
21821       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
21822 $as_echo "$as_me: updating cache $cache_file" >&6;}
21823       if test ! -f "$cache_file" || test -h "$cache_file"; then
21824         cat confcache >"$cache_file"
21825       else
21826         case $cache_file in #(
21827         */* | ?:*)
21828           mv -f confcache "$cache_file"$$ &&
21829           mv -f "$cache_file"$$ "$cache_file" ;; #(
21830         *)
21831           mv -f confcache "$cache_file" ;;
21832         esac
21833       fi
21834     fi
21835   else
21836     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
21837 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21838   fi
21839 fi
21840 rm -f confcache
21841
21842 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21843 # Let make expand exec_prefix.
21844 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21845
21846 DEFS=-DHAVE_CONFIG_H
21847
21848 ac_libobjs=
21849 ac_ltlibobjs=
21850 U=
21851 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21852   # 1. Remove the extension, and $U if already installed.
21853   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21854   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21855   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
21856   #    will be set to the directory where LIBOBJS objects are built.
21857   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21858   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
21859 done
21860 LIBOBJS=$ac_libobjs
21861
21862 LTLIBOBJS=$ac_ltlibobjs
21863
21864
21865 if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
21866   as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
21867 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21868 fi
21869
21870 : "${CONFIG_STATUS=./config.status}"
21871 ac_write_fail=0
21872 ac_clean_files_save=$ac_clean_files
21873 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21874 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
21875 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
21876 as_write_fail=0
21877 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
21878 #! $SHELL
21879 # Generated by $as_me.
21880 # Run this file to recreate the current configuration.
21881 # Compiler output produced by configure, useful for debugging
21882 # configure, is in config.log if it exists.
21883
21884 debug=false
21885 ac_cs_recheck=false
21886 ac_cs_silent=false
21887
21888 SHELL=\${CONFIG_SHELL-$SHELL}
21889 export SHELL
21890 _ASEOF
21891 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
21892 ## -------------------- ##
21893 ## M4sh Initialization. ##
21894 ## -------------------- ##
21895
21896 # Be more Bourne compatible
21897 DUALCASE=1; export DUALCASE # for MKS sh
21898 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
21899   emulate sh
21900   NULLCMD=:
21901   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21902   # is contrary to our usage.  Disable this feature.
21903   alias -g '${1+"$@"}'='"$@"'
21904   setopt NO_GLOB_SUBST
21905 else
21906   case `(set -o) 2>/dev/null` in #(
21907   *posix*) :
21908     set -o posix ;; #(
21909   *) :
21910      ;;
21911 esac
21912 fi
21913
21914
21915 as_nl='
21916 '
21917 export as_nl
21918 # Printing a long string crashes Solaris 7 /usr/bin/printf.
21919 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
21920 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
21921 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
21922 # Prefer a ksh shell builtin over an external printf program on Solaris,
21923 # but without wasting forks for bash or zsh.
21924 if test -z "$BASH_VERSION$ZSH_VERSION" \
21925     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
21926   as_echo='print -r --'
21927   as_echo_n='print -rn --'
21928 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
21929   as_echo='printf %s\n'
21930   as_echo_n='printf %s'
21931 else
21932   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
21933     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
21934     as_echo_n='/usr/ucb/echo -n'
21935   else
21936     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
21937     as_echo_n_body='eval
21938       arg=$1;
21939       case $arg in #(
21940       *"$as_nl"*)
21941         expr "X$arg" : "X\\(.*\\)$as_nl";
21942         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
21943       esac;
21944       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
21945     '
21946     export as_echo_n_body
21947     as_echo_n='sh -c $as_echo_n_body as_echo'
21948   fi
21949   export as_echo_body
21950   as_echo='sh -c $as_echo_body as_echo'
21951 fi
21952
21953 # The user is always right.
21954 if test "${PATH_SEPARATOR+set}" != set; then
21955   PATH_SEPARATOR=:
21956   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
21957     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
21958       PATH_SEPARATOR=';'
21959   }
21960 fi
21961
21962
21963 # IFS
21964 # We need space, tab and new line, in precisely that order.  Quoting is
21965 # there to prevent editors from complaining about space-tab.
21966 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
21967 # splitting by setting IFS to empty value.)
21968 IFS=" ""        $as_nl"
21969
21970 # Find who we are.  Look in the path if we contain no directory separator.
21971 as_myself=
21972 case $0 in #((
21973   *[\\/]* ) as_myself=$0 ;;
21974   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21975 for as_dir in $PATH
21976 do
21977   IFS=$as_save_IFS
21978   test -z "$as_dir" && as_dir=.
21979     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21980   done
21981 IFS=$as_save_IFS
21982
21983      ;;
21984 esac
21985 # We did not find ourselves, most probably we were run as `sh COMMAND'
21986 # in which case we are not to be found in the path.
21987 if test "x$as_myself" = x; then
21988   as_myself=$0
21989 fi
21990 if test ! -f "$as_myself"; then
21991   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
21992   exit 1
21993 fi
21994
21995 # Unset variables that we do not need and which cause bugs (e.g. in
21996 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
21997 # suppresses any "Segmentation fault" message there.  '((' could
21998 # trigger a bug in pdksh 5.2.14.
21999 for as_var in BASH_ENV ENV MAIL MAILPATH
22000 do eval test x\${$as_var+set} = xset \
22001   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
22002 done
22003 PS1='$ '
22004 PS2='> '
22005 PS4='+ '
22006
22007 # NLS nuisances.
22008 LC_ALL=C
22009 export LC_ALL
22010 LANGUAGE=C
22011 export LANGUAGE
22012
22013 # CDPATH.
22014 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
22015
22016
22017 # as_fn_error STATUS ERROR [LINENO LOG_FD]
22018 # ----------------------------------------
22019 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
22020 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
22021 # script with STATUS, using 1 if that was 0.
22022 as_fn_error ()
22023 {
22024   as_status=$1; test $as_status -eq 0 && as_status=1
22025   if test "$4"; then
22026     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
22027     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
22028   fi
22029   $as_echo "$as_me: error: $2" >&2
22030   as_fn_exit $as_status
22031 } # as_fn_error
22032
22033
22034 # as_fn_set_status STATUS
22035 # -----------------------
22036 # Set $? to STATUS, without forking.
22037 as_fn_set_status ()
22038 {
22039   return $1
22040 } # as_fn_set_status
22041
22042 # as_fn_exit STATUS
22043 # -----------------
22044 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
22045 as_fn_exit ()
22046 {
22047   set +e
22048   as_fn_set_status $1
22049   exit $1
22050 } # as_fn_exit
22051
22052 # as_fn_unset VAR
22053 # ---------------
22054 # Portably unset VAR.
22055 as_fn_unset ()
22056 {
22057   { eval $1=; unset $1;}
22058 }
22059 as_unset=as_fn_unset
22060 # as_fn_append VAR VALUE
22061 # ----------------------
22062 # Append the text in VALUE to the end of the definition contained in VAR. Take
22063 # advantage of any shell optimizations that allow amortized linear growth over
22064 # repeated appends, instead of the typical quadratic growth present in naive
22065 # implementations.
22066 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
22067   eval 'as_fn_append ()
22068   {
22069     eval $1+=\$2
22070   }'
22071 else
22072   as_fn_append ()
22073   {
22074     eval $1=\$$1\$2
22075   }
22076 fi # as_fn_append
22077
22078 # as_fn_arith ARG...
22079 # ------------------
22080 # Perform arithmetic evaluation on the ARGs, and store the result in the
22081 # global $as_val. Take advantage of shells that can avoid forks. The arguments
22082 # must be portable across $(()) and expr.
22083 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
22084   eval 'as_fn_arith ()
22085   {
22086     as_val=$(( $* ))
22087   }'
22088 else
22089   as_fn_arith ()
22090   {
22091     as_val=`expr "$@" || test $? -eq 1`
22092   }
22093 fi # as_fn_arith
22094
22095
22096 if expr a : '\(a\)' >/dev/null 2>&1 &&
22097    test "X`expr 00001 : '.*\(...\)'`" = X001; then
22098   as_expr=expr
22099 else
22100   as_expr=false
22101 fi
22102
22103 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
22104   as_basename=basename
22105 else
22106   as_basename=false
22107 fi
22108
22109 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
22110   as_dirname=dirname
22111 else
22112   as_dirname=false
22113 fi
22114
22115 as_me=`$as_basename -- "$0" ||
22116 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22117          X"$0" : 'X\(//\)$' \| \
22118          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
22119 $as_echo X/"$0" |
22120     sed '/^.*\/\([^/][^/]*\)\/*$/{
22121             s//\1/
22122             q
22123           }
22124           /^X\/\(\/\/\)$/{
22125             s//\1/
22126             q
22127           }
22128           /^X\/\(\/\).*/{
22129             s//\1/
22130             q
22131           }
22132           s/.*/./; q'`
22133
22134 # Avoid depending upon Character Ranges.
22135 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22136 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22137 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22138 as_cr_digits='0123456789'
22139 as_cr_alnum=$as_cr_Letters$as_cr_digits
22140
22141 ECHO_C= ECHO_N= ECHO_T=
22142 case `echo -n x` in #(((((
22143 -n*)
22144   case `echo 'xy\c'` in
22145   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
22146   xy)  ECHO_C='\c';;
22147   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
22148        ECHO_T=' ';;
22149   esac;;
22150 *)
22151   ECHO_N='-n';;
22152 esac
22153
22154 rm -f conf$$ conf$$.exe conf$$.file
22155 if test -d conf$$.dir; then
22156   rm -f conf$$.dir/conf$$.file
22157 else
22158   rm -f conf$$.dir
22159   mkdir conf$$.dir 2>/dev/null
22160 fi
22161 if (echo >conf$$.file) 2>/dev/null; then
22162   if ln -s conf$$.file conf$$ 2>/dev/null; then
22163     as_ln_s='ln -s'
22164     # ... but there are two gotchas:
22165     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
22166     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
22167     # In both cases, we have to default to `cp -pR'.
22168     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
22169       as_ln_s='cp -pR'
22170   elif ln conf$$.file conf$$ 2>/dev/null; then
22171     as_ln_s=ln
22172   else
22173     as_ln_s='cp -pR'
22174   fi
22175 else
22176   as_ln_s='cp -pR'
22177 fi
22178 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
22179 rmdir conf$$.dir 2>/dev/null
22180
22181
22182 # as_fn_mkdir_p
22183 # -------------
22184 # Create "$as_dir" as a directory, including parents if necessary.
22185 as_fn_mkdir_p ()
22186 {
22187
22188   case $as_dir in #(
22189   -*) as_dir=./$as_dir;;
22190   esac
22191   test -d "$as_dir" || eval $as_mkdir_p || {
22192     as_dirs=
22193     while :; do
22194       case $as_dir in #(
22195       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
22196       *) as_qdir=$as_dir;;
22197       esac
22198       as_dirs="'$as_qdir' $as_dirs"
22199       as_dir=`$as_dirname -- "$as_dir" ||
22200 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22201          X"$as_dir" : 'X\(//\)[^/]' \| \
22202          X"$as_dir" : 'X\(//\)$' \| \
22203          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
22204 $as_echo X"$as_dir" |
22205     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22206             s//\1/
22207             q
22208           }
22209           /^X\(\/\/\)[^/].*/{
22210             s//\1/
22211             q
22212           }
22213           /^X\(\/\/\)$/{
22214             s//\1/
22215             q
22216           }
22217           /^X\(\/\).*/{
22218             s//\1/
22219             q
22220           }
22221           s/.*/./; q'`
22222       test -d "$as_dir" && break
22223     done
22224     test -z "$as_dirs" || eval "mkdir $as_dirs"
22225   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
22226
22227
22228 } # as_fn_mkdir_p
22229 if mkdir -p . 2>/dev/null; then
22230   as_mkdir_p='mkdir -p "$as_dir"'
22231 else
22232   test -d ./-p && rmdir ./-p
22233   as_mkdir_p=false
22234 fi
22235
22236
22237 # as_fn_executable_p FILE
22238 # -----------------------
22239 # Test if FILE is an executable regular file.
22240 as_fn_executable_p ()
22241 {
22242   test -f "$1" && test -x "$1"
22243 } # as_fn_executable_p
22244 as_test_x='test -x'
22245 as_executable_p=as_fn_executable_p
22246
22247 # Sed expression to map a string onto a valid CPP name.
22248 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22249
22250 # Sed expression to map a string onto a valid variable name.
22251 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22252
22253
22254 exec 6>&1
22255 ## ----------------------------------- ##
22256 ## Main body of $CONFIG_STATUS script. ##
22257 ## ----------------------------------- ##
22258 _ASEOF
22259 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
22260
22261 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22262 # Save the log message, to keep $0 and so on meaningful, and to
22263 # report actual input values of CONFIG_FILES etc. instead of their
22264 # values after options handling.
22265 ac_log="
22266 This file was extended by unbound $as_me 1.13.1, which was
22267 generated by GNU Autoconf 2.69.  Invocation command line was
22268
22269   CONFIG_FILES    = $CONFIG_FILES
22270   CONFIG_HEADERS  = $CONFIG_HEADERS
22271   CONFIG_LINKS    = $CONFIG_LINKS
22272   CONFIG_COMMANDS = $CONFIG_COMMANDS
22273   $ $0 $@
22274
22275 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22276 "
22277
22278 _ACEOF
22279
22280 case $ac_config_files in *"
22281 "*) set x $ac_config_files; shift; ac_config_files=$*;;
22282 esac
22283
22284 case $ac_config_headers in *"
22285 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
22286 esac
22287
22288
22289 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22290 # Files that config.status was made for.
22291 config_files="$ac_config_files"
22292 config_headers="$ac_config_headers"
22293 config_commands="$ac_config_commands"
22294
22295 _ACEOF
22296
22297 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22298 ac_cs_usage="\
22299 \`$as_me' instantiates files and other configuration actions
22300 from templates according to the current configuration.  Unless the files
22301 and actions are specified as TAGs, all are instantiated by default.
22302
22303 Usage: $0 [OPTION]... [TAG]...
22304
22305   -h, --help       print this help, then exit
22306   -V, --version    print version number and configuration settings, then exit
22307       --config     print configuration, then exit
22308   -q, --quiet, --silent
22309                    do not print progress messages
22310   -d, --debug      don't remove temporary files
22311       --recheck    update $as_me by reconfiguring in the same conditions
22312       --file=FILE[:TEMPLATE]
22313                    instantiate the configuration file FILE
22314       --header=FILE[:TEMPLATE]
22315                    instantiate the configuration header FILE
22316
22317 Configuration files:
22318 $config_files
22319
22320 Configuration headers:
22321 $config_headers
22322
22323 Configuration commands:
22324 $config_commands
22325
22326 Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>."
22327
22328 _ACEOF
22329 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22330 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
22331 ac_cs_version="\\
22332 unbound config.status 1.13.1
22333 configured by $0, generated by GNU Autoconf 2.69,
22334   with options \\"\$ac_cs_config\\"
22335
22336 Copyright (C) 2012 Free Software Foundation, Inc.
22337 This config.status script is free software; the Free Software Foundation
22338 gives unlimited permission to copy, distribute and modify it."
22339
22340 ac_pwd='$ac_pwd'
22341 srcdir='$srcdir'
22342 AWK='$AWK'
22343 test -n "\$AWK" || AWK=awk
22344 _ACEOF
22345
22346 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22347 # The default lists apply if the user does not specify any file.
22348 ac_need_defaults=:
22349 while test $# != 0
22350 do
22351   case $1 in
22352   --*=?*)
22353     ac_option=`expr "X$1" : 'X\([^=]*\)='`
22354     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
22355     ac_shift=:
22356     ;;
22357   --*=)
22358     ac_option=`expr "X$1" : 'X\([^=]*\)='`
22359     ac_optarg=
22360     ac_shift=:
22361     ;;
22362   *)
22363     ac_option=$1
22364     ac_optarg=$2
22365     ac_shift=shift
22366     ;;
22367   esac
22368
22369   case $ac_option in
22370   # Handling of the options.
22371   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22372     ac_cs_recheck=: ;;
22373   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
22374     $as_echo "$ac_cs_version"; exit ;;
22375   --config | --confi | --conf | --con | --co | --c )
22376     $as_echo "$ac_cs_config"; exit ;;
22377   --debug | --debu | --deb | --de | --d | -d )
22378     debug=: ;;
22379   --file | --fil | --fi | --f )
22380     $ac_shift
22381     case $ac_optarg in
22382     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22383     '') as_fn_error $? "missing file argument" ;;
22384     esac
22385     as_fn_append CONFIG_FILES " '$ac_optarg'"
22386     ac_need_defaults=false;;
22387   --header | --heade | --head | --hea )
22388     $ac_shift
22389     case $ac_optarg in
22390     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22391     esac
22392     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
22393     ac_need_defaults=false;;
22394   --he | --h)
22395     # Conflict between --help and --header
22396     as_fn_error $? "ambiguous option: \`$1'
22397 Try \`$0 --help' for more information.";;
22398   --help | --hel | -h )
22399     $as_echo "$ac_cs_usage"; exit ;;
22400   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22401   | -silent | --silent | --silen | --sile | --sil | --si | --s)
22402     ac_cs_silent=: ;;
22403
22404   # This is an error.
22405   -*) as_fn_error $? "unrecognized option: \`$1'
22406 Try \`$0 --help' for more information." ;;
22407
22408   *) as_fn_append ac_config_targets " $1"
22409      ac_need_defaults=false ;;
22410
22411   esac
22412   shift
22413 done
22414
22415 ac_configure_extra_args=
22416
22417 if $ac_cs_silent; then
22418   exec 6>/dev/null
22419   ac_configure_extra_args="$ac_configure_extra_args --silent"
22420 fi
22421
22422 _ACEOF
22423 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22424 if \$ac_cs_recheck; then
22425   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22426   shift
22427   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
22428   CONFIG_SHELL='$SHELL'
22429   export CONFIG_SHELL
22430   exec "\$@"
22431 fi
22432
22433 _ACEOF
22434 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22435 exec 5>>config.log
22436 {
22437   echo
22438   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22439 ## Running $as_me. ##
22440 _ASBOX
22441   $as_echo "$ac_log"
22442 } >&5
22443
22444 _ACEOF
22445 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22446 #
22447 # INIT-COMMANDS
22448 #
22449
22450
22451 # The HP-UX ksh and POSIX shell print the target directory to stdout
22452 # if CDPATH is set.
22453 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
22454
22455 sed_quote_subst='$sed_quote_subst'
22456 double_quote_subst='$double_quote_subst'
22457 delay_variable_subst='$delay_variable_subst'
22458 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
22459 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
22460 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
22461 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
22462 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
22463 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
22464 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
22465 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
22466 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
22467 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
22468 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
22469 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
22470 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
22471 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
22472 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
22473 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
22474 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
22475 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
22476 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
22477 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
22478 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
22479 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
22480 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
22481 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
22482 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
22483 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
22484 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
22485 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
22486 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
22487 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
22488 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
22489 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
22490 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
22491 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
22492 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
22493 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
22494 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
22495 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
22496 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
22497 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
22498 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
22499 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
22500 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
22501 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
22502 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
22503 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
22504 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
22505 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
22506 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
22507 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
22508 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
22509 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
22510 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
22511 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
22512 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
22513 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
22514 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
22515 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
22516 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"`'
22517 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
22518 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
22519 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
22520 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
22521 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
22522 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
22523 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
22524 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
22525 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
22526 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
22527 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
22528 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
22529 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
22530 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
22531 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
22532 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
22533 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
22534 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
22535 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
22536 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
22537 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
22538 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
22539 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
22540 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
22541 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
22542 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
22543 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
22544 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
22545 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
22546 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
22547 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
22548 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
22549 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
22550 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
22551 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
22552 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
22553 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
22554 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
22555 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
22556 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
22557 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
22558 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
22559 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
22560 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
22561 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
22562 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
22563 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
22564 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
22565 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
22566 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
22567 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
22568 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
22569 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
22570 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
22571 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
22572 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
22573 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
22574 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
22575 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
22576 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
22577 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
22578 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
22579 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
22580 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
22581 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
22582 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
22583 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
22584 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
22585 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
22586 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
22587 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
22588 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
22589 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
22590 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
22591 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
22592 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
22593
22594 LTCC='$LTCC'
22595 LTCFLAGS='$LTCFLAGS'
22596 compiler='$compiler_DEFAULT'
22597
22598 # A function that is used when there is no print builtin or printf.
22599 func_fallback_echo ()
22600 {
22601   eval 'cat <<_LTECHO_EOF
22602 \$1
22603 _LTECHO_EOF'
22604 }
22605
22606 # Quote evaled strings.
22607 for var in SHELL \
22608 ECHO \
22609 PATH_SEPARATOR \
22610 SED \
22611 GREP \
22612 EGREP \
22613 FGREP \
22614 LD \
22615 NM \
22616 LN_S \
22617 lt_SP2NL \
22618 lt_NL2SP \
22619 reload_flag \
22620 OBJDUMP \
22621 deplibs_check_method \
22622 file_magic_cmd \
22623 file_magic_glob \
22624 want_nocaseglob \
22625 DLLTOOL \
22626 sharedlib_from_linklib_cmd \
22627 AR \
22628 AR_FLAGS \
22629 archiver_list_spec \
22630 STRIP \
22631 RANLIB \
22632 CC \
22633 CFLAGS \
22634 compiler \
22635 lt_cv_sys_global_symbol_pipe \
22636 lt_cv_sys_global_symbol_to_cdecl \
22637 lt_cv_sys_global_symbol_to_import \
22638 lt_cv_sys_global_symbol_to_c_name_address \
22639 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
22640 lt_cv_nm_interface \
22641 nm_file_list_spec \
22642 lt_cv_truncate_bin \
22643 lt_prog_compiler_no_builtin_flag \
22644 lt_prog_compiler_pic \
22645 lt_prog_compiler_wl \
22646 lt_prog_compiler_static \
22647 lt_cv_prog_compiler_c_o \
22648 need_locks \
22649 MANIFEST_TOOL \
22650 DSYMUTIL \
22651 NMEDIT \
22652 LIPO \
22653 OTOOL \
22654 OTOOL64 \
22655 shrext_cmds \
22656 export_dynamic_flag_spec \
22657 whole_archive_flag_spec \
22658 compiler_needs_object \
22659 with_gnu_ld \
22660 allow_undefined_flag \
22661 no_undefined_flag \
22662 hardcode_libdir_flag_spec \
22663 hardcode_libdir_separator \
22664 exclude_expsyms \
22665 include_expsyms \
22666 file_list_spec \
22667 variables_saved_for_relink \
22668 libname_spec \
22669 library_names_spec \
22670 soname_spec \
22671 install_override_mode \
22672 finish_eval \
22673 old_striplib \
22674 striplib; do
22675     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22676     *[\\\\\\\`\\"\\\$]*)
22677       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22678       ;;
22679     *)
22680       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22681       ;;
22682     esac
22683 done
22684
22685 # Double-quote double-evaled strings.
22686 for var in reload_cmds \
22687 old_postinstall_cmds \
22688 old_postuninstall_cmds \
22689 old_archive_cmds \
22690 extract_expsyms_cmds \
22691 old_archive_from_new_cmds \
22692 old_archive_from_expsyms_cmds \
22693 archive_cmds \
22694 archive_expsym_cmds \
22695 module_cmds \
22696 module_expsym_cmds \
22697 export_symbols_cmds \
22698 prelink_cmds \
22699 postlink_cmds \
22700 postinstall_cmds \
22701 postuninstall_cmds \
22702 finish_cmds \
22703 sys_lib_search_path_spec \
22704 configure_time_dlsearch_path \
22705 configure_time_lt_sys_library_path; do
22706     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22707     *[\\\\\\\`\\"\\\$]*)
22708       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22709       ;;
22710     *)
22711       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22712       ;;
22713     esac
22714 done
22715
22716 ac_aux_dir='$ac_aux_dir'
22717
22718 # See if we are running on zsh, and set the options that allow our
22719 # commands through without removal of \ escapes INIT.
22720 if test -n "\${ZSH_VERSION+set}"; then
22721    setopt NO_GLOB_SUBST
22722 fi
22723
22724
22725     PACKAGE='$PACKAGE'
22726     VERSION='$VERSION'
22727     RM='$RM'
22728     ofile='$ofile'
22729
22730
22731
22732
22733 _ACEOF
22734
22735 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22736
22737 # Handling of arguments.
22738 for ac_config_target in $ac_config_targets
22739 do
22740   case $ac_config_target in
22741     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
22742     "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
22743     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22744     "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
22745     "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
22746     "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
22747     "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
22748     "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
22749     "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
22750     "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
22751     "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
22752     "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
22753     "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
22754     "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
22755     "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
22756     "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
22757     "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
22758     "contrib/unbound_portable.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound_portable.service" ;;
22759     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
22760
22761   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
22762   esac
22763 done
22764
22765
22766 # If the user did not use the arguments to specify the items to instantiate,
22767 # then the envvar interface is used.  Set only those that are not.
22768 # We use the long form for the default assignment because of an extremely
22769 # bizarre bug on SunOS 4.1.3.
22770 if $ac_need_defaults; then
22771   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22772   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22773   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22774 fi
22775
22776 # Have a temporary directory for convenience.  Make it in the build tree
22777 # simply because there is no reason against having it here, and in addition,
22778 # creating and moving files from /tmp can sometimes cause problems.
22779 # Hook for its removal unless debugging.
22780 # Note that there is a small window in which the directory will not be cleaned:
22781 # after its creation but before its name has been assigned to `$tmp'.
22782 $debug ||
22783 {
22784   tmp= ac_tmp=
22785   trap 'exit_status=$?
22786   : "${ac_tmp:=$tmp}"
22787   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
22788 ' 0
22789   trap 'as_fn_exit 1' 1 2 13 15
22790 }
22791 # Create a (secure) tmp directory for tmp files.
22792
22793 {
22794   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
22795   test -d "$tmp"
22796 }  ||
22797 {
22798   tmp=./conf$$-$RANDOM
22799   (umask 077 && mkdir "$tmp")
22800 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
22801 ac_tmp=$tmp
22802
22803 # Set up the scripts for CONFIG_FILES section.
22804 # No need to generate them if there are no CONFIG_FILES.
22805 # This happens for instance with `./config.status config.h'.
22806 if test -n "$CONFIG_FILES"; then
22807
22808
22809 ac_cr=`echo X | tr X '\015'`
22810 # On cygwin, bash can eat \r inside `` if the user requested igncr.
22811 # But we know of no other shell where ac_cr would be empty at this
22812 # point, so we can use a bashism as a fallback.
22813 if test "x$ac_cr" = x; then
22814   eval ac_cr=\$\'\\r\'
22815 fi
22816 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
22817 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
22818   ac_cs_awk_cr='\\r'
22819 else
22820   ac_cs_awk_cr=$ac_cr
22821 fi
22822
22823 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
22824 _ACEOF
22825
22826
22827 {
22828   echo "cat >conf$$subs.awk <<_ACEOF" &&
22829   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
22830   echo "_ACEOF"
22831 } >conf$$subs.sh ||
22832   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22833 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
22834 ac_delim='%!_!# '
22835 for ac_last_try in false false false false false :; do
22836   . ./conf$$subs.sh ||
22837     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22838
22839   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
22840   if test $ac_delim_n = $ac_delim_num; then
22841     break
22842   elif $ac_last_try; then
22843     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22844   else
22845     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22846   fi
22847 done
22848 rm -f conf$$subs.sh
22849
22850 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22851 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
22852 _ACEOF
22853 sed -n '
22854 h
22855 s/^/S["/; s/!.*/"]=/
22856 p
22857 g
22858 s/^[^!]*!//
22859 :repl
22860 t repl
22861 s/'"$ac_delim"'$//
22862 t delim
22863 :nl
22864 h
22865 s/\(.\{148\}\)..*/\1/
22866 t more1
22867 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
22868 p
22869 n
22870 b repl
22871 :more1
22872 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22873 p
22874 g
22875 s/.\{148\}//
22876 t nl
22877 :delim
22878 h
22879 s/\(.\{148\}\)..*/\1/
22880 t more2
22881 s/["\\]/\\&/g; s/^/"/; s/$/"/
22882 p
22883 b
22884 :more2
22885 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22886 p
22887 g
22888 s/.\{148\}//
22889 t delim
22890 ' <conf$$subs.awk | sed '
22891 /^[^""]/{
22892   N
22893   s/\n//
22894 }
22895 ' >>$CONFIG_STATUS || ac_write_fail=1
22896 rm -f conf$$subs.awk
22897 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22898 _ACAWK
22899 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
22900   for (key in S) S_is_set[key] = 1
22901   FS = "\a"
22902
22903 }
22904 {
22905   line = $ 0
22906   nfields = split(line, field, "@")
22907   substed = 0
22908   len = length(field[1])
22909   for (i = 2; i < nfields; i++) {
22910     key = field[i]
22911     keylen = length(key)
22912     if (S_is_set[key]) {
22913       value = S[key]
22914       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
22915       len += length(value) + length(field[++i])
22916       substed = 1
22917     } else
22918       len += 1 + keylen
22919   }
22920
22921   print line
22922 }
22923
22924 _ACAWK
22925 _ACEOF
22926 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22927 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22928   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
22929 else
22930   cat
22931 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
22932   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
22933 _ACEOF
22934
22935 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
22936 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
22937 # trailing colons and then remove the whole line if VPATH becomes empty
22938 # (actually we leave an empty line to preserve line numbers).
22939 if test "x$srcdir" = x.; then
22940   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
22941 h
22942 s///
22943 s/^/:/
22944 s/[      ]*$/:/
22945 s/:\$(srcdir):/:/g
22946 s/:\${srcdir}:/:/g
22947 s/:@srcdir@:/:/g
22948 s/^:*//
22949 s/:*$//
22950 x
22951 s/\(=[   ]*\).*/\1/
22952 G
22953 s/\n//
22954 s/^[^=]*=[       ]*$//
22955 }'
22956 fi
22957
22958 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22959 fi # test -n "$CONFIG_FILES"
22960
22961 # Set up the scripts for CONFIG_HEADERS section.
22962 # No need to generate them if there are no CONFIG_HEADERS.
22963 # This happens for instance with `./config.status Makefile'.
22964 if test -n "$CONFIG_HEADERS"; then
22965 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
22966 BEGIN {
22967 _ACEOF
22968
22969 # Transform confdefs.h into an awk script `defines.awk', embedded as
22970 # here-document in config.status, that substitutes the proper values into
22971 # config.h.in to produce config.h.
22972
22973 # Create a delimiter string that does not exist in confdefs.h, to ease
22974 # handling of long lines.
22975 ac_delim='%!_!# '
22976 for ac_last_try in false false :; do
22977   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
22978   if test -z "$ac_tt"; then
22979     break
22980   elif $ac_last_try; then
22981     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
22982   else
22983     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22984   fi
22985 done
22986
22987 # For the awk script, D is an array of macro values keyed by name,
22988 # likewise P contains macro parameters if any.  Preserve backslash
22989 # newline sequences.
22990
22991 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
22992 sed -n '
22993 s/.\{148\}/&'"$ac_delim"'/g
22994 t rset
22995 :rset
22996 s/^[     ]*#[    ]*define[       ][      ]*/ /
22997 t def
22998 d
22999 :def
23000 s/\\$//
23001 t bsnl
23002 s/["\\]/\\&/g
23003 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
23004 D["\1"]=" \3"/p
23005 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
23006 d
23007 :bsnl
23008 s/["\\]/\\&/g
23009 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
23010 D["\1"]=" \3\\\\\\n"\\/p
23011 t cont
23012 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
23013 t cont
23014 d
23015 :cont
23016 n
23017 s/.\{148\}/&'"$ac_delim"'/g
23018 t clear
23019 :clear
23020 s/\\$//
23021 t bsnlc
23022 s/["\\]/\\&/g; s/^/"/; s/$/"/p
23023 d
23024 :bsnlc
23025 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
23026 b cont
23027 ' <confdefs.h | sed '
23028 s/'"$ac_delim"'/"\\\
23029 "/g' >>$CONFIG_STATUS || ac_write_fail=1
23030
23031 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23032   for (key in D) D_is_set[key] = 1
23033   FS = "\a"
23034 }
23035 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
23036   line = \$ 0
23037   split(line, arg, " ")
23038   if (arg[1] == "#") {
23039     defundef = arg[2]
23040     mac1 = arg[3]
23041   } else {
23042     defundef = substr(arg[1], 2)
23043     mac1 = arg[2]
23044   }
23045   split(mac1, mac2, "(") #)
23046   macro = mac2[1]
23047   prefix = substr(line, 1, index(line, defundef) - 1)
23048   if (D_is_set[macro]) {
23049     # Preserve the white space surrounding the "#".
23050     print prefix "define", macro P[macro] D[macro]
23051     next
23052   } else {
23053     # Replace #undef with comments.  This is necessary, for example,
23054     # in the case of _POSIX_SOURCE, which is predefined and required
23055     # on some systems where configure will not decide to define it.
23056     if (defundef == "undef") {
23057       print "/*", prefix defundef, macro, "*/"
23058       next
23059     }
23060   }
23061 }
23062 { print }
23063 _ACAWK
23064 _ACEOF
23065 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23066   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
23067 fi # test -n "$CONFIG_HEADERS"
23068
23069
23070 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
23071 shift
23072 for ac_tag
23073 do
23074   case $ac_tag in
23075   :[FHLC]) ac_mode=$ac_tag; continue;;
23076   esac
23077   case $ac_mode$ac_tag in
23078   :[FHL]*:*);;
23079   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
23080   :[FH]-) ac_tag=-:-;;
23081   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
23082   esac
23083   ac_save_IFS=$IFS
23084   IFS=:
23085   set x $ac_tag
23086   IFS=$ac_save_IFS
23087   shift
23088   ac_file=$1
23089   shift
23090
23091   case $ac_mode in
23092   :L) ac_source=$1;;
23093   :[FH])
23094     ac_file_inputs=
23095     for ac_f
23096     do
23097       case $ac_f in
23098       -) ac_f="$ac_tmp/stdin";;
23099       *) # Look for the file first in the build tree, then in the source tree
23100          # (if the path is not absolute).  The absolute path cannot be DOS-style,
23101          # because $ac_f cannot contain `:'.
23102          test -f "$ac_f" ||
23103            case $ac_f in
23104            [\\/$]*) false;;
23105            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
23106            esac ||
23107            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
23108       esac
23109       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
23110       as_fn_append ac_file_inputs " '$ac_f'"
23111     done
23112
23113     # Let's still pretend it is `configure' which instantiates (i.e., don't
23114     # use $as_me), people would be surprised to read:
23115     #    /* config.h.  Generated by config.status.  */
23116     configure_input='Generated from '`
23117           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
23118         `' by configure.'
23119     if test x"$ac_file" != x-; then
23120       configure_input="$ac_file.  $configure_input"
23121       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
23122 $as_echo "$as_me: creating $ac_file" >&6;}
23123     fi
23124     # Neutralize special characters interpreted by sed in replacement strings.
23125     case $configure_input in #(
23126     *\&* | *\|* | *\\* )
23127        ac_sed_conf_input=`$as_echo "$configure_input" |
23128        sed 's/[\\\\&|]/\\\\&/g'`;; #(
23129     *) ac_sed_conf_input=$configure_input;;
23130     esac
23131
23132     case $ac_tag in
23133     *:-:* | *:-) cat >"$ac_tmp/stdin" \
23134       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
23135     esac
23136     ;;
23137   esac
23138
23139   ac_dir=`$as_dirname -- "$ac_file" ||
23140 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23141          X"$ac_file" : 'X\(//\)[^/]' \| \
23142          X"$ac_file" : 'X\(//\)$' \| \
23143          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
23144 $as_echo X"$ac_file" |
23145     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23146             s//\1/
23147             q
23148           }
23149           /^X\(\/\/\)[^/].*/{
23150             s//\1/
23151             q
23152           }
23153           /^X\(\/\/\)$/{
23154             s//\1/
23155             q
23156           }
23157           /^X\(\/\).*/{
23158             s//\1/
23159             q
23160           }
23161           s/.*/./; q'`
23162   as_dir="$ac_dir"; as_fn_mkdir_p
23163   ac_builddir=.
23164
23165 case "$ac_dir" in
23166 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
23167 *)
23168   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
23169   # A ".." for each directory in $ac_dir_suffix.
23170   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
23171   case $ac_top_builddir_sub in
23172   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
23173   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
23174   esac ;;
23175 esac
23176 ac_abs_top_builddir=$ac_pwd
23177 ac_abs_builddir=$ac_pwd$ac_dir_suffix
23178 # for backward compatibility:
23179 ac_top_builddir=$ac_top_build_prefix
23180
23181 case $srcdir in
23182   .)  # We are building in place.
23183     ac_srcdir=.
23184     ac_top_srcdir=$ac_top_builddir_sub
23185     ac_abs_top_srcdir=$ac_pwd ;;
23186   [\\/]* | ?:[\\/]* )  # Absolute name.
23187     ac_srcdir=$srcdir$ac_dir_suffix;
23188     ac_top_srcdir=$srcdir
23189     ac_abs_top_srcdir=$srcdir ;;
23190   *) # Relative name.
23191     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
23192     ac_top_srcdir=$ac_top_build_prefix$srcdir
23193     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
23194 esac
23195 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
23196
23197
23198   case $ac_mode in
23199   :F)
23200   #
23201   # CONFIG_FILE
23202   #
23203
23204 _ACEOF
23205
23206 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23207 # If the template does not know about datarootdir, expand it.
23208 # FIXME: This hack should be removed a few years after 2.60.
23209 ac_datarootdir_hack=; ac_datarootdir_seen=
23210 ac_sed_dataroot='
23211 /datarootdir/ {
23212   p
23213   q
23214 }
23215 /@datadir@/p
23216 /@docdir@/p
23217 /@infodir@/p
23218 /@localedir@/p
23219 /@mandir@/p'
23220 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
23221 *datarootdir*) ac_datarootdir_seen=yes;;
23222 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
23223   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
23224 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
23225 _ACEOF
23226 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23227   ac_datarootdir_hack='
23228   s&@datadir@&$datadir&g
23229   s&@docdir@&$docdir&g
23230   s&@infodir@&$infodir&g
23231   s&@localedir@&$localedir&g
23232   s&@mandir@&$mandir&g
23233   s&\\\${datarootdir}&$datarootdir&g' ;;
23234 esac
23235 _ACEOF
23236
23237 # Neutralize VPATH when `$srcdir' = `.'.
23238 # Shell code in configure.ac might set extrasub.
23239 # FIXME: do we really want to maintain this feature?
23240 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23241 ac_sed_extra="$ac_vpsub
23242 $extrasub
23243 _ACEOF
23244 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23245 :t
23246 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23247 s|@configure_input@|$ac_sed_conf_input|;t t
23248 s&@top_builddir@&$ac_top_builddir_sub&;t t
23249 s&@top_build_prefix@&$ac_top_build_prefix&;t t
23250 s&@srcdir@&$ac_srcdir&;t t
23251 s&@abs_srcdir@&$ac_abs_srcdir&;t t
23252 s&@top_srcdir@&$ac_top_srcdir&;t t
23253 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
23254 s&@builddir@&$ac_builddir&;t t
23255 s&@abs_builddir@&$ac_abs_builddir&;t t
23256 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
23257 $ac_datarootdir_hack
23258 "
23259 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
23260   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23261
23262 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
23263   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
23264   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
23265       "$ac_tmp/out"`; test -z "$ac_out"; } &&
23266   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23267 which seems to be undefined.  Please make sure it is defined" >&5
23268 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23269 which seems to be undefined.  Please make sure it is defined" >&2;}
23270
23271   rm -f "$ac_tmp/stdin"
23272   case $ac_file in
23273   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
23274   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
23275   esac \
23276   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23277  ;;
23278   :H)
23279   #
23280   # CONFIG_HEADER
23281   #
23282   if test x"$ac_file" != x-; then
23283     {
23284       $as_echo "/* $configure_input  */" \
23285       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
23286     } >"$ac_tmp/config.h" \
23287       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23288     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
23289       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
23290 $as_echo "$as_me: $ac_file is unchanged" >&6;}
23291     else
23292       rm -f "$ac_file"
23293       mv "$ac_tmp/config.h" "$ac_file" \
23294         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23295     fi
23296   else
23297     $as_echo "/* $configure_input  */" \
23298       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
23299       || as_fn_error $? "could not create -" "$LINENO" 5
23300   fi
23301  ;;
23302
23303   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
23304 $as_echo "$as_me: executing $ac_file commands" >&6;}
23305  ;;
23306   esac
23307
23308
23309   case $ac_file$ac_mode in
23310     "libtool":C)
23311
23312     # See if we are running on zsh, and set the options that allow our
23313     # commands through without removal of \ escapes.
23314     if test -n "${ZSH_VERSION+set}"; then
23315       setopt NO_GLOB_SUBST
23316     fi
23317
23318     cfgfile=${ofile}T
23319     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
23320     $RM "$cfgfile"
23321
23322     cat <<_LT_EOF >> "$cfgfile"
23323 #! $SHELL
23324 # Generated automatically by $as_me ($PACKAGE) $VERSION
23325 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23326 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
23327
23328 # Provide generalized library-building support services.
23329 # Written by Gordon Matzigkeit, 1996
23330
23331 # Copyright (C) 2014 Free Software Foundation, Inc.
23332 # This is free software; see the source for copying conditions.  There is NO
23333 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23334
23335 # GNU Libtool is free software; you can redistribute it and/or modify
23336 # it under the terms of the GNU General Public License as published by
23337 # the Free Software Foundation; either version 2 of of the License, or
23338 # (at your option) any later version.
23339 #
23340 # As a special exception to the GNU General Public License, if you
23341 # distribute this file as part of a program or library that is built
23342 # using GNU Libtool, you may include this file under the  same
23343 # distribution terms that you use for the rest of that program.
23344 #
23345 # GNU Libtool is distributed in the hope that it will be useful, but
23346 # WITHOUT ANY WARRANTY; without even the implied warranty of
23347 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23348 # GNU General Public License for more details.
23349 #
23350 # You should have received a copy of the GNU General Public License
23351 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
23352
23353
23354 # The names of the tagged configurations supported by this script.
23355 available_tags=''
23356
23357 # Configured defaults for sys_lib_dlsearch_path munging.
23358 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
23359
23360 # ### BEGIN LIBTOOL CONFIG
23361
23362 # Which release of libtool.m4 was used?
23363 macro_version=$macro_version
23364 macro_revision=$macro_revision
23365
23366 # Whether or not to build shared libraries.
23367 build_libtool_libs=$enable_shared
23368
23369 # Whether or not to build static libraries.
23370 build_old_libs=$enable_static
23371
23372 # What type of objects to build.
23373 pic_mode=$pic_mode
23374
23375 # Whether or not to optimize for fast installation.
23376 fast_install=$enable_fast_install
23377
23378 # Shared archive member basename,for filename based shared library versioning on AIX.
23379 shared_archive_member_spec=$shared_archive_member_spec
23380
23381 # Shell to use when invoking shell scripts.
23382 SHELL=$lt_SHELL
23383
23384 # An echo program that protects backslashes.
23385 ECHO=$lt_ECHO
23386
23387 # The PATH separator for the build system.
23388 PATH_SEPARATOR=$lt_PATH_SEPARATOR
23389
23390 # The host system.
23391 host_alias=$host_alias
23392 host=$host
23393 host_os=$host_os
23394
23395 # The build system.
23396 build_alias=$build_alias
23397 build=$build
23398 build_os=$build_os
23399
23400 # A sed program that does not truncate output.
23401 SED=$lt_SED
23402
23403 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
23404 Xsed="\$SED -e 1s/^X//"
23405
23406 # A grep program that handles long lines.
23407 GREP=$lt_GREP
23408
23409 # An ERE matcher.
23410 EGREP=$lt_EGREP
23411
23412 # A literal string matcher.
23413 FGREP=$lt_FGREP
23414
23415 # A BSD- or MS-compatible name lister.
23416 NM=$lt_NM
23417
23418 # Whether we need soft or hard links.
23419 LN_S=$lt_LN_S
23420
23421 # What is the maximum length of a command?
23422 max_cmd_len=$max_cmd_len
23423
23424 # Object file suffix (normally "o").
23425 objext=$ac_objext
23426
23427 # Executable file suffix (normally "").
23428 exeext=$exeext
23429
23430 # whether the shell understands "unset".
23431 lt_unset=$lt_unset
23432
23433 # turn spaces into newlines.
23434 SP2NL=$lt_lt_SP2NL
23435
23436 # turn newlines into spaces.
23437 NL2SP=$lt_lt_NL2SP
23438
23439 # convert \$build file names to \$host format.
23440 to_host_file_cmd=$lt_cv_to_host_file_cmd
23441
23442 # convert \$build files to toolchain format.
23443 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
23444
23445 # An object symbol dumper.
23446 OBJDUMP=$lt_OBJDUMP
23447
23448 # Method to check whether dependent libraries are shared objects.
23449 deplibs_check_method=$lt_deplibs_check_method
23450
23451 # Command to use when deplibs_check_method = "file_magic".
23452 file_magic_cmd=$lt_file_magic_cmd
23453
23454 # How to find potential files when deplibs_check_method = "file_magic".
23455 file_magic_glob=$lt_file_magic_glob
23456
23457 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
23458 want_nocaseglob=$lt_want_nocaseglob
23459
23460 # DLL creation program.
23461 DLLTOOL=$lt_DLLTOOL
23462
23463 # Command to associate shared and link libraries.
23464 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
23465
23466 # The archiver.
23467 AR=$lt_AR
23468
23469 # Flags to create an archive.
23470 AR_FLAGS=$lt_AR_FLAGS
23471
23472 # How to feed a file listing to the archiver.
23473 archiver_list_spec=$lt_archiver_list_spec
23474
23475 # A symbol stripping program.
23476 STRIP=$lt_STRIP
23477
23478 # Commands used to install an old-style archive.
23479 RANLIB=$lt_RANLIB
23480 old_postinstall_cmds=$lt_old_postinstall_cmds
23481 old_postuninstall_cmds=$lt_old_postuninstall_cmds
23482
23483 # Whether to use a lock for old archive extraction.
23484 lock_old_archive_extraction=$lock_old_archive_extraction
23485
23486 # A C compiler.
23487 LTCC=$lt_CC
23488
23489 # LTCC compiler flags.
23490 LTCFLAGS=$lt_CFLAGS
23491
23492 # Take the output of nm and produce a listing of raw symbols and C names.
23493 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
23494
23495 # Transform the output of nm in a proper C declaration.
23496 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
23497
23498 # Transform the output of nm into a list of symbols to manually relocate.
23499 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
23500
23501 # Transform the output of nm in a C name address pair.
23502 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
23503
23504 # Transform the output of nm in a C name address pair when lib prefix is needed.
23505 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
23506
23507 # The name lister interface.
23508 nm_interface=$lt_lt_cv_nm_interface
23509
23510 # Specify filename containing input files for \$NM.
23511 nm_file_list_spec=$lt_nm_file_list_spec
23512
23513 # The root where to search for dependent libraries,and where our libraries should be installed.
23514 lt_sysroot=$lt_sysroot
23515
23516 # Command to truncate a binary pipe.
23517 lt_truncate_bin=$lt_lt_cv_truncate_bin
23518
23519 # The name of the directory that contains temporary libtool files.
23520 objdir=$objdir
23521
23522 # Used to examine libraries when file_magic_cmd begins with "file".
23523 MAGIC_CMD=$MAGIC_CMD
23524
23525 # Must we lock files when doing compilation?
23526 need_locks=$lt_need_locks
23527
23528 # Manifest tool.
23529 MANIFEST_TOOL=$lt_MANIFEST_TOOL
23530
23531 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
23532 DSYMUTIL=$lt_DSYMUTIL
23533
23534 # Tool to change global to local symbols on Mac OS X.
23535 NMEDIT=$lt_NMEDIT
23536
23537 # Tool to manipulate fat objects and archives on Mac OS X.
23538 LIPO=$lt_LIPO
23539
23540 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
23541 OTOOL=$lt_OTOOL
23542
23543 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
23544 OTOOL64=$lt_OTOOL64
23545
23546 # Old archive suffix (normally "a").
23547 libext=$libext
23548
23549 # Shared library suffix (normally ".so").
23550 shrext_cmds=$lt_shrext_cmds
23551
23552 # The commands to extract the exported symbol list from a shared archive.
23553 extract_expsyms_cmds=$lt_extract_expsyms_cmds
23554
23555 # Variables whose values should be saved in libtool wrapper scripts and
23556 # restored at link time.
23557 variables_saved_for_relink=$lt_variables_saved_for_relink
23558
23559 # Do we need the "lib" prefix for modules?
23560 need_lib_prefix=$need_lib_prefix
23561
23562 # Do we need a version for libraries?
23563 need_version=$need_version
23564
23565 # Library versioning type.
23566 version_type=$version_type
23567
23568 # Shared library runtime path variable.
23569 runpath_var=$runpath_var
23570
23571 # Shared library path variable.
23572 shlibpath_var=$shlibpath_var
23573
23574 # Is shlibpath searched before the hard-coded library search path?
23575 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
23576
23577 # Format of library name prefix.
23578 libname_spec=$lt_libname_spec
23579
23580 # List of archive names.  First name is the real one, the rest are links.
23581 # The last name is the one that the linker finds with -lNAME
23582 library_names_spec=$lt_library_names_spec
23583
23584 # The coded name of the library, if different from the real name.
23585 soname_spec=$lt_soname_spec
23586
23587 # Permission mode override for installation of shared libraries.
23588 install_override_mode=$lt_install_override_mode
23589
23590 # Command to use after installation of a shared archive.
23591 postinstall_cmds=$lt_postinstall_cmds
23592
23593 # Command to use after uninstallation of a shared archive.
23594 postuninstall_cmds=$lt_postuninstall_cmds
23595
23596 # Commands used to finish a libtool library installation in a directory.
23597 finish_cmds=$lt_finish_cmds
23598
23599 # As "finish_cmds", except a single script fragment to be evaled but
23600 # not shown.
23601 finish_eval=$lt_finish_eval
23602
23603 # Whether we should hardcode library paths into libraries.
23604 hardcode_into_libs=$hardcode_into_libs
23605
23606 # Compile-time system search path for libraries.
23607 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
23608
23609 # Detected run-time system search path for libraries.
23610 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
23611
23612 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
23613 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
23614
23615 # Whether dlopen is supported.
23616 dlopen_support=$enable_dlopen
23617
23618 # Whether dlopen of programs is supported.
23619 dlopen_self=$enable_dlopen_self
23620
23621 # Whether dlopen of statically linked programs is supported.
23622 dlopen_self_static=$enable_dlopen_self_static
23623
23624 # Commands to strip libraries.
23625 old_striplib=$lt_old_striplib
23626 striplib=$lt_striplib
23627
23628
23629 # The linker used to build libraries.
23630 LD=$lt_LD
23631
23632 # How to create reloadable object files.
23633 reload_flag=$lt_reload_flag
23634 reload_cmds=$lt_reload_cmds
23635
23636 # Commands used to build an old-style archive.
23637 old_archive_cmds=$lt_old_archive_cmds
23638
23639 # A language specific compiler.
23640 CC=$lt_compiler
23641
23642 # Is the compiler the GNU compiler?
23643 with_gcc=$GCC
23644
23645 # Compiler flag to turn off builtin functions.
23646 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
23647
23648 # Additional compiler flags for building library objects.
23649 pic_flag=$lt_lt_prog_compiler_pic
23650
23651 # How to pass a linker flag through the compiler.
23652 wl=$lt_lt_prog_compiler_wl
23653
23654 # Compiler flag to prevent dynamic linking.
23655 link_static_flag=$lt_lt_prog_compiler_static
23656
23657 # Does compiler simultaneously support -c and -o options?
23658 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
23659
23660 # Whether or not to add -lc for building shared libraries.
23661 build_libtool_need_lc=$archive_cmds_need_lc
23662
23663 # Whether or not to disallow shared libs when runtime libs are static.
23664 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
23665
23666 # Compiler flag to allow reflexive dlopens.
23667 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
23668
23669 # Compiler flag to generate shared objects directly from archives.
23670 whole_archive_flag_spec=$lt_whole_archive_flag_spec
23671
23672 # Whether the compiler copes with passing no objects directly.
23673 compiler_needs_object=$lt_compiler_needs_object
23674
23675 # Create an old-style archive from a shared archive.
23676 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
23677
23678 # Create a temporary old-style archive to link instead of a shared archive.
23679 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
23680
23681 # Commands used to build a shared archive.
23682 archive_cmds=$lt_archive_cmds
23683 archive_expsym_cmds=$lt_archive_expsym_cmds
23684
23685 # Commands used to build a loadable module if different from building
23686 # a shared archive.
23687 module_cmds=$lt_module_cmds
23688 module_expsym_cmds=$lt_module_expsym_cmds
23689
23690 # Whether we are building with GNU ld or not.
23691 with_gnu_ld=$lt_with_gnu_ld
23692
23693 # Flag that allows shared libraries with undefined symbols to be built.
23694 allow_undefined_flag=$lt_allow_undefined_flag
23695
23696 # Flag that enforces no undefined symbols.
23697 no_undefined_flag=$lt_no_undefined_flag
23698
23699 # Flag to hardcode \$libdir into a binary during linking.
23700 # This must work even if \$libdir does not exist
23701 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
23702
23703 # Whether we need a single "-rpath" flag with a separated argument.
23704 hardcode_libdir_separator=$lt_hardcode_libdir_separator
23705
23706 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23707 # DIR into the resulting binary.
23708 hardcode_direct=$hardcode_direct
23709
23710 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23711 # DIR into the resulting binary and the resulting library dependency is
23712 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
23713 # library is relocated.
23714 hardcode_direct_absolute=$hardcode_direct_absolute
23715
23716 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
23717 # into the resulting binary.
23718 hardcode_minus_L=$hardcode_minus_L
23719
23720 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
23721 # into the resulting binary.
23722 hardcode_shlibpath_var=$hardcode_shlibpath_var
23723
23724 # Set to "yes" if building a shared library automatically hardcodes DIR
23725 # into the library and all subsequent libraries and executables linked
23726 # against it.
23727 hardcode_automatic=$hardcode_automatic
23728
23729 # Set to yes if linker adds runtime paths of dependent libraries
23730 # to runtime path list.
23731 inherit_rpath=$inherit_rpath
23732
23733 # Whether libtool must link a program against all its dependency libraries.
23734 link_all_deplibs=$link_all_deplibs
23735
23736 # Set to "yes" if exported symbols are required.
23737 always_export_symbols=$always_export_symbols
23738
23739 # The commands to list exported symbols.
23740 export_symbols_cmds=$lt_export_symbols_cmds
23741
23742 # Symbols that should not be listed in the preloaded symbols.
23743 exclude_expsyms=$lt_exclude_expsyms
23744
23745 # Symbols that must always be exported.
23746 include_expsyms=$lt_include_expsyms
23747
23748 # Commands necessary for linking programs (against libraries) with templates.
23749 prelink_cmds=$lt_prelink_cmds
23750
23751 # Commands necessary for finishing linking programs.
23752 postlink_cmds=$lt_postlink_cmds
23753
23754 # Specify filename containing input files.
23755 file_list_spec=$lt_file_list_spec
23756
23757 # How to hardcode a shared library path into an executable.
23758 hardcode_action=$hardcode_action
23759
23760 # ### END LIBTOOL CONFIG
23761
23762 _LT_EOF
23763
23764     cat <<'_LT_EOF' >> "$cfgfile"
23765
23766 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
23767
23768 # func_munge_path_list VARIABLE PATH
23769 # -----------------------------------
23770 # VARIABLE is name of variable containing _space_ separated list of
23771 # directories to be munged by the contents of PATH, which is string
23772 # having a format:
23773 # "DIR[:DIR]:"
23774 #       string "DIR[ DIR]" will be prepended to VARIABLE
23775 # ":DIR[:DIR]"
23776 #       string "DIR[ DIR]" will be appended to VARIABLE
23777 # "DIRP[:DIRP]::[DIRA:]DIRA"
23778 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
23779 #       "DIRA[ DIRA]" will be appended to VARIABLE
23780 # "DIR[:DIR]"
23781 #       VARIABLE will be replaced by "DIR[ DIR]"
23782 func_munge_path_list ()
23783 {
23784     case x$2 in
23785     x)
23786         ;;
23787     *:)
23788         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
23789         ;;
23790     x:*)
23791         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
23792         ;;
23793     *::*)
23794         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
23795         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
23796         ;;
23797     *)
23798         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
23799         ;;
23800     esac
23801 }
23802
23803
23804 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
23805 func_cc_basename ()
23806 {
23807     for cc_temp in $*""; do
23808       case $cc_temp in
23809         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
23810         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
23811         \-*) ;;
23812         *) break;;
23813       esac
23814     done
23815     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
23816 }
23817
23818
23819 # ### END FUNCTIONS SHARED WITH CONFIGURE
23820
23821 _LT_EOF
23822
23823   case $host_os in
23824   aix3*)
23825     cat <<\_LT_EOF >> "$cfgfile"
23826 # AIX sometimes has problems with the GCC collect2 program.  For some
23827 # reason, if we set the COLLECT_NAMES environment variable, the problems
23828 # vanish in a puff of smoke.
23829 if test set != "${COLLECT_NAMES+set}"; then
23830   COLLECT_NAMES=
23831   export COLLECT_NAMES
23832 fi
23833 _LT_EOF
23834     ;;
23835   esac
23836
23837
23838 ltmain=$ac_aux_dir/ltmain.sh
23839
23840
23841   # We use sed instead of cat because bash on DJGPP gets confused if
23842   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
23843   # text mode, it properly converts lines to CR/LF.  This bash problem
23844   # is reportedly fixed, but why not run on old versions too?
23845   sed '$q' "$ltmain" >> "$cfgfile" \
23846      || (rm -f "$cfgfile"; exit 1)
23847
23848    mv -f "$cfgfile" "$ofile" ||
23849     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
23850   chmod +x "$ofile"
23851
23852  ;;
23853     "disable-rpath":C)
23854         sed < libtool > libtool-2 \
23855         's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
23856         mv libtool-2 libtool
23857         chmod 755 libtool
23858         libtool="./libtool"
23859          ;;
23860
23861   esac
23862 done # for ac_tag
23863
23864
23865 as_fn_exit 0
23866 _ACEOF
23867 ac_clean_files=$ac_clean_files_save
23868
23869 test $ac_write_fail = 0 ||
23870   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
23871
23872
23873 # configure is writing to config.log, and then calls config.status.
23874 # config.status does its own redirection, appending to config.log.
23875 # Unfortunately, on DOS this fails, as config.log is still kept open
23876 # by configure, so config.status won't be able to write to it; its
23877 # output is simply discarded.  So we exec the FD to /dev/null,
23878 # effectively closing config.log, so it can be properly (re)opened and
23879 # appended to by config.status.  When coming back to configure, we
23880 # need to make the FD available again.
23881 if test "$no_create" != yes; then
23882   ac_cs_success=:
23883   ac_config_status_args=
23884   test "$silent" = yes &&
23885     ac_config_status_args="$ac_config_status_args --quiet"
23886   exec 5>/dev/null
23887   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23888   exec 5>>config.log
23889   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23890   # would make configure fail if this is the last instruction.
23891   $ac_cs_success || as_fn_exit 1
23892 fi
23893 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
23894   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
23895 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
23896 fi
23897