]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/unbound/configure
Upgrade Unbound to 1.7.0. More to follow.
[FreeBSD/FreeBSD.git] / contrib / unbound / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for unbound 1.7.0.
4 #
5 # Report bugs to <unbound-bugs@nlnetlabs.nl>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
16
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20   emulate sh
21   NULLCMD=:
22   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23   # is contrary to our usage.  Disable this feature.
24   alias -g '${1+"$@"}'='"$@"'
25   setopt NO_GLOB_SUBST
26 else
27   case `(set -o) 2>/dev/null` in #(
28   *posix*) :
29     set -o posix ;; #(
30   *) :
31      ;;
32 esac
33 fi
34
35
36 as_nl='
37 '
38 export as_nl
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47   as_echo='print -r --'
48   as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50   as_echo='printf %s\n'
51   as_echo_n='printf %s'
52 else
53   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55     as_echo_n='/usr/ucb/echo -n'
56   else
57     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58     as_echo_n_body='eval
59       arg=$1;
60       case $arg in #(
61       *"$as_nl"*)
62         expr "X$arg" : "X\\(.*\\)$as_nl";
63         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64       esac;
65       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66     '
67     export as_echo_n_body
68     as_echo_n='sh -c $as_echo_n_body as_echo'
69   fi
70   export as_echo_body
71   as_echo='sh -c $as_echo_body as_echo'
72 fi
73
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
76   PATH_SEPARATOR=:
77   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79       PATH_SEPARATOR=';'
80   }
81 fi
82
83
84 # IFS
85 # We need space, tab and new line, in precisely that order.  Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
89 IFS=" ""        $as_nl"
90
91 # Find who we are.  Look in the path if we contain no directory separator.
92 as_myself=
93 case $0 in #((
94   *[\\/]* ) as_myself=$0 ;;
95   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96 for as_dir in $PATH
97 do
98   IFS=$as_save_IFS
99   test -z "$as_dir" && as_dir=.
100     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101   done
102 IFS=$as_save_IFS
103
104      ;;
105 esac
106 # We did not find ourselves, most probably we were run as `sh COMMAND'
107 # in which case we are not to be found in the path.
108 if test "x$as_myself" = x; then
109   as_myself=$0
110 fi
111 if test ! -f "$as_myself"; then
112   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113   exit 1
114 fi
115
116 # Unset variables that we do not need and which cause bugs (e.g. in
117 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118 # suppresses any "Segmentation fault" message there.  '((' could
119 # trigger a bug in pdksh 5.2.14.
120 for as_var in BASH_ENV ENV MAIL MAILPATH
121 do eval test x\${$as_var+set} = xset \
122   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123 done
124 PS1='$ '
125 PS2='> '
126 PS4='+ '
127
128 # NLS nuisances.
129 LC_ALL=C
130 export LC_ALL
131 LANGUAGE=C
132 export LANGUAGE
133
134 # CDPATH.
135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137 # Use a proper internal environment variable to ensure we don't fall
138   # into an infinite loop, continuously re-executing ourselves.
139   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140     _as_can_reexec=no; export _as_can_reexec;
141     # We cannot yet assume a decent shell, so we have to provide a
142 # neutralization value for shells without unset; and this also
143 # works around shells that cannot unset nonexistent variables.
144 # Preserve -v and -x to the replacement shell.
145 BASH_ENV=/dev/null
146 ENV=/dev/null
147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148 case $- in # ((((
149   *v*x* | *x*v* ) as_opts=-vx ;;
150   *v* ) as_opts=-v ;;
151   *x* ) as_opts=-x ;;
152   * ) as_opts= ;;
153 esac
154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155 # Admittedly, this is quite paranoid, since all the known shells bail
156 # out after a failed `exec'.
157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158 as_fn_exit 255
159   fi
160   # We don't want this to propagate to other subprocesses.
161           { _as_can_reexec=; unset _as_can_reexec;}
162 if test "x$CONFIG_SHELL" = x; then
163   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164   emulate sh
165   NULLCMD=:
166   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167   # is contrary to our usage.  Disable this feature.
168   alias -g '\${1+\"\$@\"}'='\"\$@\"'
169   setopt NO_GLOB_SUBST
170 else
171   case \`(set -o) 2>/dev/null\` in #(
172   *posix*) :
173     set -o posix ;; #(
174   *) :
175      ;;
176 esac
177 fi
178 "
179   as_required="as_fn_return () { (exit \$1); }
180 as_fn_success () { as_fn_return 0; }
181 as_fn_failure () { as_fn_return 1; }
182 as_fn_ret_success () { return 0; }
183 as_fn_ret_failure () { return 1; }
184
185 exitcode=0
186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192 else
193   exitcode=1; echo positional parameters were not saved.
194 fi
195 test x\$exitcode = x0 || exit 1
196 test -x / || exit 1"
197   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201 test \$(( 1 + 1 )) = 2 || exit 1
202
203   test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
204     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
205     ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
206     ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
207     PATH=/empty FPATH=/empty; export PATH FPATH
208     test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
209       || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
210   if (eval "$as_required") 2>/dev/null; then :
211   as_have_required=yes
212 else
213   as_have_required=no
214 fi
215   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
216
217 else
218   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
219 as_found=false
220 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
221 do
222   IFS=$as_save_IFS
223   test -z "$as_dir" && as_dir=.
224   as_found=:
225   case $as_dir in #(
226          /*)
227            for as_base in sh bash ksh sh5; do
228              # Try only shells that exist, to save several forks.
229              as_shell=$as_dir/$as_base
230              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
231                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
232   CONFIG_SHELL=$as_shell as_have_required=yes
233                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
234   break 2
235 fi
236 fi
237            done;;
238        esac
239   as_found=false
240 done
241 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
242               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
243   CONFIG_SHELL=$SHELL as_have_required=yes
244 fi; }
245 IFS=$as_save_IFS
246
247
248       if test "x$CONFIG_SHELL" != x; then :
249   export CONFIG_SHELL
250              # We cannot yet assume a decent shell, so we have to provide a
251 # neutralization value for shells without unset; and this also
252 # works around shells that cannot unset nonexistent variables.
253 # Preserve -v and -x to the replacement shell.
254 BASH_ENV=/dev/null
255 ENV=/dev/null
256 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
257 case $- in # ((((
258   *v*x* | *x*v* ) as_opts=-vx ;;
259   *v* ) as_opts=-v ;;
260   *x* ) as_opts=-x ;;
261   * ) as_opts= ;;
262 esac
263 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
264 # Admittedly, this is quite paranoid, since all the known shells bail
265 # out after a failed `exec'.
266 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
267 exit 255
268 fi
269
270     if test x$as_have_required = xno; then :
271   $as_echo "$0: This script requires a shell more modern than all"
272   $as_echo "$0: the shells that I found on your system."
273   if test x${ZSH_VERSION+set} = xset ; then
274     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
275     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
276   else
277     $as_echo "$0: Please tell bug-autoconf@gnu.org and
278 $0: unbound-bugs@nlnetlabs.nl about your system, including
279 $0: any error possibly output before this message. Then
280 $0: install a modern shell, or manually run the script
281 $0: under such a shell if you do have one."
282   fi
283   exit 1
284 fi
285 fi
286 fi
287 SHELL=${CONFIG_SHELL-/bin/sh}
288 export SHELL
289 # Unset more variables known to interfere with behavior of common tools.
290 CLICOLOR_FORCE= GREP_OPTIONS=
291 unset CLICOLOR_FORCE GREP_OPTIONS
292
293 ## --------------------- ##
294 ## M4sh Shell Functions. ##
295 ## --------------------- ##
296 # as_fn_unset VAR
297 # ---------------
298 # Portably unset VAR.
299 as_fn_unset ()
300 {
301   { eval $1=; unset $1;}
302 }
303 as_unset=as_fn_unset
304
305 # as_fn_set_status STATUS
306 # -----------------------
307 # Set $? to STATUS, without forking.
308 as_fn_set_status ()
309 {
310   return $1
311 } # as_fn_set_status
312
313 # as_fn_exit STATUS
314 # -----------------
315 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
316 as_fn_exit ()
317 {
318   set +e
319   as_fn_set_status $1
320   exit $1
321 } # as_fn_exit
322
323 # as_fn_mkdir_p
324 # -------------
325 # Create "$as_dir" as a directory, including parents if necessary.
326 as_fn_mkdir_p ()
327 {
328
329   case $as_dir in #(
330   -*) as_dir=./$as_dir;;
331   esac
332   test -d "$as_dir" || eval $as_mkdir_p || {
333     as_dirs=
334     while :; do
335       case $as_dir in #(
336       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
337       *) as_qdir=$as_dir;;
338       esac
339       as_dirs="'$as_qdir' $as_dirs"
340       as_dir=`$as_dirname -- "$as_dir" ||
341 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
342          X"$as_dir" : 'X\(//\)[^/]' \| \
343          X"$as_dir" : 'X\(//\)$' \| \
344          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
345 $as_echo X"$as_dir" |
346     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
347             s//\1/
348             q
349           }
350           /^X\(\/\/\)[^/].*/{
351             s//\1/
352             q
353           }
354           /^X\(\/\/\)$/{
355             s//\1/
356             q
357           }
358           /^X\(\/\).*/{
359             s//\1/
360             q
361           }
362           s/.*/./; q'`
363       test -d "$as_dir" && break
364     done
365     test -z "$as_dirs" || eval "mkdir $as_dirs"
366   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
367
368
369 } # as_fn_mkdir_p
370
371 # as_fn_executable_p FILE
372 # -----------------------
373 # Test if FILE is an executable regular file.
374 as_fn_executable_p ()
375 {
376   test -f "$1" && test -x "$1"
377 } # as_fn_executable_p
378 # as_fn_append VAR VALUE
379 # ----------------------
380 # Append the text in VALUE to the end of the definition contained in VAR. Take
381 # advantage of any shell optimizations that allow amortized linear growth over
382 # repeated appends, instead of the typical quadratic growth present in naive
383 # implementations.
384 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
385   eval 'as_fn_append ()
386   {
387     eval $1+=\$2
388   }'
389 else
390   as_fn_append ()
391   {
392     eval $1=\$$1\$2
393   }
394 fi # as_fn_append
395
396 # as_fn_arith ARG...
397 # ------------------
398 # Perform arithmetic evaluation on the ARGs, and store the result in the
399 # global $as_val. Take advantage of shells that can avoid forks. The arguments
400 # must be portable across $(()) and expr.
401 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
402   eval 'as_fn_arith ()
403   {
404     as_val=$(( $* ))
405   }'
406 else
407   as_fn_arith ()
408   {
409     as_val=`expr "$@" || test $? -eq 1`
410   }
411 fi # as_fn_arith
412
413
414 # as_fn_error STATUS ERROR [LINENO LOG_FD]
415 # ----------------------------------------
416 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
417 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
418 # script with STATUS, using 1 if that was 0.
419 as_fn_error ()
420 {
421   as_status=$1; test $as_status -eq 0 && as_status=1
422   if test "$4"; then
423     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
424     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
425   fi
426   $as_echo "$as_me: error: $2" >&2
427   as_fn_exit $as_status
428 } # as_fn_error
429
430 if expr a : '\(a\)' >/dev/null 2>&1 &&
431    test "X`expr 00001 : '.*\(...\)'`" = X001; then
432   as_expr=expr
433 else
434   as_expr=false
435 fi
436
437 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
438   as_basename=basename
439 else
440   as_basename=false
441 fi
442
443 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
444   as_dirname=dirname
445 else
446   as_dirname=false
447 fi
448
449 as_me=`$as_basename -- "$0" ||
450 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
451          X"$0" : 'X\(//\)$' \| \
452          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
453 $as_echo X/"$0" |
454     sed '/^.*\/\([^/][^/]*\)\/*$/{
455             s//\1/
456             q
457           }
458           /^X\/\(\/\/\)$/{
459             s//\1/
460             q
461           }
462           /^X\/\(\/\).*/{
463             s//\1/
464             q
465           }
466           s/.*/./; q'`
467
468 # Avoid depending upon Character Ranges.
469 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
470 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
471 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
472 as_cr_digits='0123456789'
473 as_cr_alnum=$as_cr_Letters$as_cr_digits
474
475
476   as_lineno_1=$LINENO as_lineno_1a=$LINENO
477   as_lineno_2=$LINENO as_lineno_2a=$LINENO
478   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
479   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
480   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
481   sed -n '
482     p
483     /[$]LINENO/=
484   ' <$as_myself |
485     sed '
486       s/[$]LINENO.*/&-/
487       t lineno
488       b
489       :lineno
490       N
491       :loop
492       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
493       t loop
494       s/-\n.*//
495     ' >$as_me.lineno &&
496   chmod +x "$as_me.lineno" ||
497     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
498
499   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
500   # already done that, so ensure we don't try to do so again and fall
501   # in an infinite loop.  This has already happened in practice.
502   _as_can_reexec=no; export _as_can_reexec
503   # Don't try to exec as it changes $[0], causing all sort of problems
504   # (the dirname of $[0] is not the place where we might find the
505   # original and so on.  Autoconf is especially sensitive to this).
506   . "./$as_me.lineno"
507   # Exit status is that of the last command.
508   exit
509 }
510
511 ECHO_C= ECHO_N= ECHO_T=
512 case `echo -n x` in #(((((
513 -n*)
514   case `echo 'xy\c'` in
515   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
516   xy)  ECHO_C='\c';;
517   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
518        ECHO_T=' ';;
519   esac;;
520 *)
521   ECHO_N='-n';;
522 esac
523
524 rm -f conf$$ conf$$.exe conf$$.file
525 if test -d conf$$.dir; then
526   rm -f conf$$.dir/conf$$.file
527 else
528   rm -f conf$$.dir
529   mkdir conf$$.dir 2>/dev/null
530 fi
531 if (echo >conf$$.file) 2>/dev/null; then
532   if ln -s conf$$.file conf$$ 2>/dev/null; then
533     as_ln_s='ln -s'
534     # ... but there are two gotchas:
535     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
536     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
537     # In both cases, we have to default to `cp -pR'.
538     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
539       as_ln_s='cp -pR'
540   elif ln conf$$.file conf$$ 2>/dev/null; then
541     as_ln_s=ln
542   else
543     as_ln_s='cp -pR'
544   fi
545 else
546   as_ln_s='cp -pR'
547 fi
548 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
549 rmdir conf$$.dir 2>/dev/null
550
551 if mkdir -p . 2>/dev/null; then
552   as_mkdir_p='mkdir -p "$as_dir"'
553 else
554   test -d ./-p && rmdir ./-p
555   as_mkdir_p=false
556 fi
557
558 as_test_x='test -x'
559 as_executable_p=as_fn_executable_p
560
561 # Sed expression to map a string onto a valid CPP name.
562 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
563
564 # Sed expression to map a string onto a valid variable name.
565 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
566
567 SHELL=${CONFIG_SHELL-/bin/sh}
568
569
570 test -n "$DJDIR" || exec 7<&0 </dev/null
571 exec 6>&1
572
573 # Name of the host.
574 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
575 # so uname gets run too.
576 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
577
578 #
579 # Initializations.
580 #
581 ac_default_prefix=/usr/local
582 ac_clean_files=
583 ac_config_libobj_dir=.
584 LIBOBJS=
585 cross_compiling=no
586 subdirs=
587 MFLAGS=
588 MAKEFLAGS=
589
590 # Identity of this package.
591 PACKAGE_NAME='unbound'
592 PACKAGE_TARNAME='unbound'
593 PACKAGE_VERSION='1.7.0'
594 PACKAGE_STRING='unbound 1.7.0'
595 PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl'
596 PACKAGE_URL=''
597
598 # Factoring default headers for most tests.
599 ac_includes_default="\
600 #include <stdio.h>
601 #ifdef HAVE_SYS_TYPES_H
602 # include <sys/types.h>
603 #endif
604 #ifdef HAVE_SYS_STAT_H
605 # include <sys/stat.h>
606 #endif
607 #ifdef STDC_HEADERS
608 # include <stdlib.h>
609 # include <stddef.h>
610 #else
611 # ifdef HAVE_STDLIB_H
612 #  include <stdlib.h>
613 # endif
614 #endif
615 #ifdef HAVE_STRING_H
616 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
617 #  include <memory.h>
618 # endif
619 # include <string.h>
620 #endif
621 #ifdef HAVE_STRINGS_H
622 # include <strings.h>
623 #endif
624 #ifdef HAVE_INTTYPES_H
625 # include <inttypes.h>
626 #endif
627 #ifdef HAVE_STDINT_H
628 # include <stdint.h>
629 #endif
630 #ifdef HAVE_UNISTD_H
631 # include <unistd.h>
632 #endif"
633
634 ac_subst_vars='LTLIBOBJS
635 date
636 version
637 INSTALLTARGET
638 ALLTARGET
639 SOURCEFILE
640 SOURCEDETERMINE
641 IPSECMOD_HEADER
642 IPSECMOD_OBJ
643 DNSCRYPT_OBJ
644 DNSCRYPT_SRC
645 ENABLE_DNSCRYPT
646 ENABLE_DNSCRYPT_XCHACHA20
647 DNSTAP_OBJ
648 DNSTAP_SRC
649 opt_dnstap_socket_path
650 ENABLE_DNSTAP
651 PROTOC_C
652 UBSYMS
653 EXTRALINK
654 COMMON_OBJ_ALL_SYMBOLS
655 LIBOBJ_WITHOUT_CTIME
656 LIBOBJ_WITHOUT_CTIMEARC4
657 WIN_CHECKCONF_OBJ_LINK
658 WIN_CONTROL_OBJ_LINK
659 WIN_UBANCHOR_OBJ_LINK
660 WIN_HOST_OBJ_LINK
661 WIN_DAEMON_OBJ_LINK
662 WIN_DAEMON_OBJ
663 WIN_DAEMON_SRC
664 WINAPPS
665 WINDRES
666 CHECKLOCK_OBJ
667 USE_SYSTEMD_FALSE
668 USE_SYSTEMD_TRUE
669 SYSTEMD_DAEMON_LIBS
670 SYSTEMD_DAEMON_CFLAGS
671 SYSTEMD_LIBS
672 SYSTEMD_CFLAGS
673 PKG_CONFIG_LIBDIR
674 PKG_CONFIG_PATH
675 PKG_CONFIG
676 staticexe
677 PC_LIBEVENT_DEPENDENCY
678 UNBOUND_EVENT_UNINSTALL
679 UNBOUND_EVENT_INSTALL
680 SUBNET_HEADER
681 SUBNET_OBJ
682 SSLLIB
683 HAVE_SSL
684 CONFIG_DATE
685 NETBSD_LINTFLAGS
686 PYUNBOUND_UNINSTALL
687 PYUNBOUND_INSTALL
688 PYUNBOUND_TARGET
689 PYUNBOUND_OBJ
690 WITH_PYUNBOUND
691 PYTHONMOD_UNINSTALL
692 PYTHONMOD_INSTALL
693 PYTHONMOD_HEADER
694 PYTHONMOD_OBJ
695 WITH_PYTHONMODULE
696 swig
697 SWIG_LIB
698 SWIG
699 PC_PY_DEPENDENCY
700 PY_MAJOR_VERSION
701 PYTHON_SITE_PKG
702 PYTHON_LDFLAGS
703 PYTHON_CPPFLAGS
704 PYTHON
705 PYTHON_VERSION
706 PTHREAD_CFLAGS_ONLY
707 PTHREAD_CFLAGS
708 PTHREAD_LIBS
709 PTHREAD_CC
710 ax_pthread_config
711 RUNTIME_PATH
712 LIBOBJS
713 LT_SYS_LIBRARY_PATH
714 OTOOL64
715 OTOOL
716 LIPO
717 NMEDIT
718 DSYMUTIL
719 MANIFEST_TOOL
720 AWK
721 RANLIB
722 ac_ct_AR
723 DLLTOOL
724 OBJDUMP
725 LN_S
726 NM
727 ac_ct_DUMPBIN
728 DUMPBIN
729 LD
730 FGREP
731 SED
732 LIBTOOL
733 AR
734 host_os
735 host_vendor
736 host_cpu
737 host
738 build_os
739 build_vendor
740 build_cpu
741 build
742 libtool
743 STRIP
744 doxygen
745 YFLAGS
746 YACC
747 LEXLIB
748 LEX_OUTPUT_ROOT
749 LEX
750 debug_enabled
751 DEPFLAG
752 UNBOUND_USERNAME
753 UNBOUND_ROOTCERT_FILE
754 UNBOUND_ROOTKEY_FILE
755 UNBOUND_PIDFILE
756 UNBOUND_SHARE_DIR
757 UNBOUND_CHROOT_DIR
758 UNBOUND_RUN_DIR
759 ub_conf_dir
760 ub_conf_file
761 UNBOUND_LOCALSTATE_DIR
762 UNBOUND_SYSCONF_DIR
763 UNBOUND_SBIN_DIR
764 EGREP
765 GREP
766 CPP
767 OBJEXT
768 EXEEXT
769 ac_ct_CC
770 CPPFLAGS
771 LDFLAGS
772 CFLAGS
773 CC
774 LIBUNBOUND_AGE
775 LIBUNBOUND_REVISION
776 LIBUNBOUND_CURRENT
777 UNBOUND_VERSION_MICRO
778 UNBOUND_VERSION_MINOR
779 UNBOUND_VERSION_MAJOR
780 target_alias
781 host_alias
782 build_alias
783 LIBS
784 ECHO_T
785 ECHO_N
786 ECHO_C
787 DEFS
788 mandir
789 localedir
790 libdir
791 psdir
792 pdfdir
793 dvidir
794 htmldir
795 infodir
796 docdir
797 oldincludedir
798 includedir
799 localstatedir
800 sharedstatedir
801 sysconfdir
802 datadir
803 datarootdir
804 libexecdir
805 sbindir
806 bindir
807 program_transform_name
808 prefix
809 exec_prefix
810 PACKAGE_URL
811 PACKAGE_BUGREPORT
812 PACKAGE_STRING
813 PACKAGE_VERSION
814 PACKAGE_TARNAME
815 PACKAGE_NAME
816 PATH_SEPARATOR
817 SHELL'
818 ac_subst_files=''
819 ac_user_opts='
820 enable_option_checking
821 with_conf_file
822 with_run_dir
823 with_chroot_dir
824 with_share_dir
825 with_pidfile
826 with_rootkey_file
827 with_rootcert_file
828 with_username
829 enable_checking
830 enable_debug
831 enable_flto
832 enable_pie
833 enable_relro_now
834 enable_shared
835 enable_static
836 with_pic
837 enable_fast_install
838 with_aix_soname
839 with_gnu_ld
840 with_sysroot
841 enable_libtool_lock
842 enable_rpath
843 enable_largefile
844 enable_alloc_checks
845 enable_alloc_lite
846 enable_alloc_nonregional
847 with_pthreads
848 with_solaris_threads
849 with_pyunbound
850 with_pythonmodule
851 enable_swig_version_check
852 with_nss
853 with_nettle
854 with_ssl
855 enable_sha1
856 enable_sha2
857 enable_subnet
858 enable_gost
859 enable_ecdsa
860 enable_dsa
861 enable_ed25519
862 enable_event_api
863 enable_tfo_client
864 enable_tfo_server
865 with_libevent
866 with_libexpat
867 enable_static_exe
868 enable_systemd
869 enable_lock_checks
870 enable_allsymbols
871 enable_dnstap
872 with_dnstap_socket_path
873 with_protobuf_c
874 with_libfstrm
875 enable_dnscrypt
876 with_libsodium
877 enable_cachedb
878 enable_ipsecmod
879 with_libunbound_only
880 '
881       ac_precious_vars='build_alias
882 host_alias
883 target_alias
884 CC
885 CFLAGS
886 LDFLAGS
887 LIBS
888 CPPFLAGS
889 CPP
890 YACC
891 YFLAGS
892 LT_SYS_LIBRARY_PATH
893 PYTHON_VERSION
894 PKG_CONFIG
895 PKG_CONFIG_PATH
896 PKG_CONFIG_LIBDIR
897 SYSTEMD_CFLAGS
898 SYSTEMD_LIBS
899 SYSTEMD_DAEMON_CFLAGS
900 SYSTEMD_DAEMON_LIBS'
901
902
903 # Initialize some variables set by options.
904 ac_init_help=
905 ac_init_version=false
906 ac_unrecognized_opts=
907 ac_unrecognized_sep=
908 # The variables have the same names as the options, with
909 # dashes changed to underlines.
910 cache_file=/dev/null
911 exec_prefix=NONE
912 no_create=
913 no_recursion=
914 prefix=NONE
915 program_prefix=NONE
916 program_suffix=NONE
917 program_transform_name=s,x,x,
918 silent=
919 site=
920 srcdir=
921 verbose=
922 x_includes=NONE
923 x_libraries=NONE
924
925 # Installation directory options.
926 # These are left unexpanded so users can "make install exec_prefix=/foo"
927 # and all the variables that are supposed to be based on exec_prefix
928 # by default will actually change.
929 # Use braces instead of parens because sh, perl, etc. also accept them.
930 # (The list follows the same order as the GNU Coding Standards.)
931 bindir='${exec_prefix}/bin'
932 sbindir='${exec_prefix}/sbin'
933 libexecdir='${exec_prefix}/libexec'
934 datarootdir='${prefix}/share'
935 datadir='${datarootdir}'
936 sysconfdir='${prefix}/etc'
937 sharedstatedir='${prefix}/com'
938 localstatedir='${prefix}/var'
939 includedir='${prefix}/include'
940 oldincludedir='/usr/include'
941 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
942 infodir='${datarootdir}/info'
943 htmldir='${docdir}'
944 dvidir='${docdir}'
945 pdfdir='${docdir}'
946 psdir='${docdir}'
947 libdir='${exec_prefix}/lib'
948 localedir='${datarootdir}/locale'
949 mandir='${datarootdir}/man'
950
951 ac_prev=
952 ac_dashdash=
953 for ac_option
954 do
955   # If the previous option needs an argument, assign it.
956   if test -n "$ac_prev"; then
957     eval $ac_prev=\$ac_option
958     ac_prev=
959     continue
960   fi
961
962   case $ac_option in
963   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
964   *=)   ac_optarg= ;;
965   *)    ac_optarg=yes ;;
966   esac
967
968   # Accept the important Cygnus configure options, so we can diagnose typos.
969
970   case $ac_dashdash$ac_option in
971   --)
972     ac_dashdash=yes ;;
973
974   -bindir | --bindir | --bindi | --bind | --bin | --bi)
975     ac_prev=bindir ;;
976   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
977     bindir=$ac_optarg ;;
978
979   -build | --build | --buil | --bui | --bu)
980     ac_prev=build_alias ;;
981   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
982     build_alias=$ac_optarg ;;
983
984   -cache-file | --cache-file | --cache-fil | --cache-fi \
985   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
986     ac_prev=cache_file ;;
987   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
988   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
989     cache_file=$ac_optarg ;;
990
991   --config-cache | -C)
992     cache_file=config.cache ;;
993
994   -datadir | --datadir | --datadi | --datad)
995     ac_prev=datadir ;;
996   -datadir=* | --datadir=* | --datadi=* | --datad=*)
997     datadir=$ac_optarg ;;
998
999   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1000   | --dataroo | --dataro | --datar)
1001     ac_prev=datarootdir ;;
1002   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1003   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1004     datarootdir=$ac_optarg ;;
1005
1006   -disable-* | --disable-*)
1007     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1008     # Reject names that are not valid shell variable names.
1009     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1010       as_fn_error $? "invalid feature name: $ac_useropt"
1011     ac_useropt_orig=$ac_useropt
1012     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1013     case $ac_user_opts in
1014       *"
1015 "enable_$ac_useropt"
1016 "*) ;;
1017       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1018          ac_unrecognized_sep=', ';;
1019     esac
1020     eval enable_$ac_useropt=no ;;
1021
1022   -docdir | --docdir | --docdi | --doc | --do)
1023     ac_prev=docdir ;;
1024   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1025     docdir=$ac_optarg ;;
1026
1027   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1028     ac_prev=dvidir ;;
1029   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1030     dvidir=$ac_optarg ;;
1031
1032   -enable-* | --enable-*)
1033     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1034     # Reject names that are not valid shell variable names.
1035     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1036       as_fn_error $? "invalid feature name: $ac_useropt"
1037     ac_useropt_orig=$ac_useropt
1038     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1039     case $ac_user_opts in
1040       *"
1041 "enable_$ac_useropt"
1042 "*) ;;
1043       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1044          ac_unrecognized_sep=', ';;
1045     esac
1046     eval enable_$ac_useropt=\$ac_optarg ;;
1047
1048   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1049   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1050   | --exec | --exe | --ex)
1051     ac_prev=exec_prefix ;;
1052   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1053   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1054   | --exec=* | --exe=* | --ex=*)
1055     exec_prefix=$ac_optarg ;;
1056
1057   -gas | --gas | --ga | --g)
1058     # Obsolete; use --with-gas.
1059     with_gas=yes ;;
1060
1061   -help | --help | --hel | --he | -h)
1062     ac_init_help=long ;;
1063   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1064     ac_init_help=recursive ;;
1065   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1066     ac_init_help=short ;;
1067
1068   -host | --host | --hos | --ho)
1069     ac_prev=host_alias ;;
1070   -host=* | --host=* | --hos=* | --ho=*)
1071     host_alias=$ac_optarg ;;
1072
1073   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1074     ac_prev=htmldir ;;
1075   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1076   | --ht=*)
1077     htmldir=$ac_optarg ;;
1078
1079   -includedir | --includedir | --includedi | --included | --include \
1080   | --includ | --inclu | --incl | --inc)
1081     ac_prev=includedir ;;
1082   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1083   | --includ=* | --inclu=* | --incl=* | --inc=*)
1084     includedir=$ac_optarg ;;
1085
1086   -infodir | --infodir | --infodi | --infod | --info | --inf)
1087     ac_prev=infodir ;;
1088   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1089     infodir=$ac_optarg ;;
1090
1091   -libdir | --libdir | --libdi | --libd)
1092     ac_prev=libdir ;;
1093   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1094     libdir=$ac_optarg ;;
1095
1096   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1097   | --libexe | --libex | --libe)
1098     ac_prev=libexecdir ;;
1099   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1100   | --libexe=* | --libex=* | --libe=*)
1101     libexecdir=$ac_optarg ;;
1102
1103   -localedir | --localedir | --localedi | --localed | --locale)
1104     ac_prev=localedir ;;
1105   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1106     localedir=$ac_optarg ;;
1107
1108   -localstatedir | --localstatedir | --localstatedi | --localstated \
1109   | --localstate | --localstat | --localsta | --localst | --locals)
1110     ac_prev=localstatedir ;;
1111   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1112   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1113     localstatedir=$ac_optarg ;;
1114
1115   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1116     ac_prev=mandir ;;
1117   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1118     mandir=$ac_optarg ;;
1119
1120   -nfp | --nfp | --nf)
1121     # Obsolete; use --without-fp.
1122     with_fp=no ;;
1123
1124   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1125   | --no-cr | --no-c | -n)
1126     no_create=yes ;;
1127
1128   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1129   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1130     no_recursion=yes ;;
1131
1132   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1133   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1134   | --oldin | --oldi | --old | --ol | --o)
1135     ac_prev=oldincludedir ;;
1136   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1137   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1138   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1139     oldincludedir=$ac_optarg ;;
1140
1141   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1142     ac_prev=prefix ;;
1143   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1144     prefix=$ac_optarg ;;
1145
1146   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1147   | --program-pre | --program-pr | --program-p)
1148     ac_prev=program_prefix ;;
1149   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1150   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1151     program_prefix=$ac_optarg ;;
1152
1153   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1154   | --program-suf | --program-su | --program-s)
1155     ac_prev=program_suffix ;;
1156   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1157   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1158     program_suffix=$ac_optarg ;;
1159
1160   -program-transform-name | --program-transform-name \
1161   | --program-transform-nam | --program-transform-na \
1162   | --program-transform-n | --program-transform- \
1163   | --program-transform | --program-transfor \
1164   | --program-transfo | --program-transf \
1165   | --program-trans | --program-tran \
1166   | --progr-tra | --program-tr | --program-t)
1167     ac_prev=program_transform_name ;;
1168   -program-transform-name=* | --program-transform-name=* \
1169   | --program-transform-nam=* | --program-transform-na=* \
1170   | --program-transform-n=* | --program-transform-=* \
1171   | --program-transform=* | --program-transfor=* \
1172   | --program-transfo=* | --program-transf=* \
1173   | --program-trans=* | --program-tran=* \
1174   | --progr-tra=* | --program-tr=* | --program-t=*)
1175     program_transform_name=$ac_optarg ;;
1176
1177   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1178     ac_prev=pdfdir ;;
1179   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1180     pdfdir=$ac_optarg ;;
1181
1182   -psdir | --psdir | --psdi | --psd | --ps)
1183     ac_prev=psdir ;;
1184   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1185     psdir=$ac_optarg ;;
1186
1187   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1188   | -silent | --silent | --silen | --sile | --sil)
1189     silent=yes ;;
1190
1191   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1192     ac_prev=sbindir ;;
1193   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1194   | --sbi=* | --sb=*)
1195     sbindir=$ac_optarg ;;
1196
1197   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1198   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1199   | --sharedst | --shareds | --shared | --share | --shar \
1200   | --sha | --sh)
1201     ac_prev=sharedstatedir ;;
1202   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1203   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1204   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1205   | --sha=* | --sh=*)
1206     sharedstatedir=$ac_optarg ;;
1207
1208   -site | --site | --sit)
1209     ac_prev=site ;;
1210   -site=* | --site=* | --sit=*)
1211     site=$ac_optarg ;;
1212
1213   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1214     ac_prev=srcdir ;;
1215   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1216     srcdir=$ac_optarg ;;
1217
1218   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1219   | --syscon | --sysco | --sysc | --sys | --sy)
1220     ac_prev=sysconfdir ;;
1221   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1222   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1223     sysconfdir=$ac_optarg ;;
1224
1225   -target | --target | --targe | --targ | --tar | --ta | --t)
1226     ac_prev=target_alias ;;
1227   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1228     target_alias=$ac_optarg ;;
1229
1230   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1231     verbose=yes ;;
1232
1233   -version | --version | --versio | --versi | --vers | -V)
1234     ac_init_version=: ;;
1235
1236   -with-* | --with-*)
1237     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1238     # Reject names that are not valid shell variable names.
1239     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1240       as_fn_error $? "invalid package name: $ac_useropt"
1241     ac_useropt_orig=$ac_useropt
1242     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1243     case $ac_user_opts in
1244       *"
1245 "with_$ac_useropt"
1246 "*) ;;
1247       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1248          ac_unrecognized_sep=', ';;
1249     esac
1250     eval with_$ac_useropt=\$ac_optarg ;;
1251
1252   -without-* | --without-*)
1253     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1254     # Reject names that are not valid shell variable names.
1255     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1256       as_fn_error $? "invalid package name: $ac_useropt"
1257     ac_useropt_orig=$ac_useropt
1258     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1259     case $ac_user_opts in
1260       *"
1261 "with_$ac_useropt"
1262 "*) ;;
1263       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1264          ac_unrecognized_sep=', ';;
1265     esac
1266     eval with_$ac_useropt=no ;;
1267
1268   --x)
1269     # Obsolete; use --with-x.
1270     with_x=yes ;;
1271
1272   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1273   | --x-incl | --x-inc | --x-in | --x-i)
1274     ac_prev=x_includes ;;
1275   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1276   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1277     x_includes=$ac_optarg ;;
1278
1279   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1280   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1281     ac_prev=x_libraries ;;
1282   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1283   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1284     x_libraries=$ac_optarg ;;
1285
1286   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1287 Try \`$0 --help' for more information"
1288     ;;
1289
1290   *=*)
1291     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1292     # Reject names that are not valid shell variable names.
1293     case $ac_envvar in #(
1294       '' | [0-9]* | *[!_$as_cr_alnum]* )
1295       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1296     esac
1297     eval $ac_envvar=\$ac_optarg
1298     export $ac_envvar ;;
1299
1300   *)
1301     # FIXME: should be removed in autoconf 3.0.
1302     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1303     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1304       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1305     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1306     ;;
1307
1308   esac
1309 done
1310
1311 if test -n "$ac_prev"; then
1312   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1313   as_fn_error $? "missing argument to $ac_option"
1314 fi
1315
1316 if test -n "$ac_unrecognized_opts"; then
1317   case $enable_option_checking in
1318     no) ;;
1319     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1320     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1321   esac
1322 fi
1323
1324 # Check all directory arguments for consistency.
1325 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1326                 datadir sysconfdir sharedstatedir localstatedir includedir \
1327                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1328                 libdir localedir mandir
1329 do
1330   eval ac_val=\$$ac_var
1331   # Remove trailing slashes.
1332   case $ac_val in
1333     */ )
1334       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1335       eval $ac_var=\$ac_val;;
1336   esac
1337   # Be sure to have absolute directory names.
1338   case $ac_val in
1339     [\\/$]* | ?:[\\/]* )  continue;;
1340     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1341   esac
1342   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1343 done
1344
1345 # There might be people who depend on the old broken behavior: `$host'
1346 # used to hold the argument of --host etc.
1347 # FIXME: To remove some day.
1348 build=$build_alias
1349 host=$host_alias
1350 target=$target_alias
1351
1352 # FIXME: To remove some day.
1353 if test "x$host_alias" != x; then
1354   if test "x$build_alias" = x; then
1355     cross_compiling=maybe
1356   elif test "x$build_alias" != "x$host_alias"; then
1357     cross_compiling=yes
1358   fi
1359 fi
1360
1361 ac_tool_prefix=
1362 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1363
1364 test "$silent" = yes && exec 6>/dev/null
1365
1366
1367 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1368 ac_ls_di=`ls -di .` &&
1369 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1370   as_fn_error $? "working directory cannot be determined"
1371 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1372   as_fn_error $? "pwd does not report name of working directory"
1373
1374
1375 # Find the source files, if location was not specified.
1376 if test -z "$srcdir"; then
1377   ac_srcdir_defaulted=yes
1378   # Try the directory containing this script, then the parent directory.
1379   ac_confdir=`$as_dirname -- "$as_myself" ||
1380 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1381          X"$as_myself" : 'X\(//\)[^/]' \| \
1382          X"$as_myself" : 'X\(//\)$' \| \
1383          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1384 $as_echo X"$as_myself" |
1385     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1386             s//\1/
1387             q
1388           }
1389           /^X\(\/\/\)[^/].*/{
1390             s//\1/
1391             q
1392           }
1393           /^X\(\/\/\)$/{
1394             s//\1/
1395             q
1396           }
1397           /^X\(\/\).*/{
1398             s//\1/
1399             q
1400           }
1401           s/.*/./; q'`
1402   srcdir=$ac_confdir
1403   if test ! -r "$srcdir/$ac_unique_file"; then
1404     srcdir=..
1405   fi
1406 else
1407   ac_srcdir_defaulted=no
1408 fi
1409 if test ! -r "$srcdir/$ac_unique_file"; then
1410   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1411   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1412 fi
1413 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1414 ac_abs_confdir=`(
1415         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1416         pwd)`
1417 # When building in place, set srcdir=.
1418 if test "$ac_abs_confdir" = "$ac_pwd"; then
1419   srcdir=.
1420 fi
1421 # Remove unnecessary trailing slashes from srcdir.
1422 # Double slashes in file names in object file debugging info
1423 # mess up M-x gdb in Emacs.
1424 case $srcdir in
1425 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1426 esac
1427 for ac_var in $ac_precious_vars; do
1428   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1429   eval ac_env_${ac_var}_value=\$${ac_var}
1430   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1431   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1432 done
1433
1434 #
1435 # Report the --help message.
1436 #
1437 if test "$ac_init_help" = "long"; then
1438   # Omit some internal or obsolete options to make the list less imposing.
1439   # This message is too long to be a string in the A/UX 3.1 sh.
1440   cat <<_ACEOF
1441 \`configure' configures unbound 1.7.0 to adapt to many kinds of systems.
1442
1443 Usage: $0 [OPTION]... [VAR=VALUE]...
1444
1445 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1446 VAR=VALUE.  See below for descriptions of some of the useful variables.
1447
1448 Defaults for the options are specified in brackets.
1449
1450 Configuration:
1451   -h, --help              display this help and exit
1452       --help=short        display options specific to this package
1453       --help=recursive    display the short help of all the included packages
1454   -V, --version           display version information and exit
1455   -q, --quiet, --silent   do not print \`checking ...' messages
1456       --cache-file=FILE   cache test results in FILE [disabled]
1457   -C, --config-cache      alias for \`--cache-file=config.cache'
1458   -n, --no-create         do not create output files
1459       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1460
1461 Installation directories:
1462   --prefix=PREFIX         install architecture-independent files in PREFIX
1463                           [$ac_default_prefix]
1464   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1465                           [PREFIX]
1466
1467 By default, \`make install' will install all the files in
1468 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1469 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1470 for instance \`--prefix=\$HOME'.
1471
1472 For better control, use the options below.
1473
1474 Fine tuning of the installation directories:
1475   --bindir=DIR            user executables [EPREFIX/bin]
1476   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1477   --libexecdir=DIR        program executables [EPREFIX/libexec]
1478   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1479   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1480   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1481   --libdir=DIR            object code libraries [EPREFIX/lib]
1482   --includedir=DIR        C header files [PREFIX/include]
1483   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1484   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1485   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1486   --infodir=DIR           info documentation [DATAROOTDIR/info]
1487   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1488   --mandir=DIR            man documentation [DATAROOTDIR/man]
1489   --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1490   --htmldir=DIR           html documentation [DOCDIR]
1491   --dvidir=DIR            dvi documentation [DOCDIR]
1492   --pdfdir=DIR            pdf documentation [DOCDIR]
1493   --psdir=DIR             ps documentation [DOCDIR]
1494 _ACEOF
1495
1496   cat <<\_ACEOF
1497
1498 System types:
1499   --build=BUILD     configure for building on BUILD [guessed]
1500   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1501 _ACEOF
1502 fi
1503
1504 if test -n "$ac_init_help"; then
1505   case $ac_init_help in
1506      short | recursive ) echo "Configuration of unbound 1.7.0:";;
1507    esac
1508   cat <<\_ACEOF
1509
1510 Optional Features:
1511   --disable-option-checking  ignore unrecognized --enable/--with options
1512   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1513   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1514   --enable-checking       Enable warnings, asserts, makefile-dependencies
1515   --enable-debug          same as enable-checking
1516   --disable-flto          Disable link-time optimization (gcc specific option)
1517   --enable-pie            Enable Position-Independent Executable (eg. to fully
1518                           benefit from ASLR, small performance penalty)
1519   --enable-relro-now      Enable full relocation binding at load-time (RELRO
1520                           NOW, to protect GOT and .dtor areas)
1521   --enable-shared[=PKGS]  build shared libraries [default=yes]
1522   --enable-static[=PKGS]  build static libraries [default=yes]
1523   --enable-fast-install[=PKGS]
1524                           optimize for fast installation [default=yes]
1525   --disable-libtool-lock  avoid locking (might break parallel builds)
1526   --disable-rpath         disable hardcoded rpath (default=enabled)
1527   --disable-largefile     omit support for large files
1528   --enable-alloc-checks   enable to memory allocation statistics, for debug
1529                           purposes
1530   --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1531                           purposes
1532   --enable-alloc-nonregional
1533                           enable nonregional allocs, slow but exposes regional
1534                           allocations to other memory purifiers, for debug
1535                           purposes
1536   --disable-swig-version-check
1537                           Disable swig version check to build python modules
1538                           with older swig even though that is unreliable
1539   --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1540                           support
1541   --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1542   --enable-subnet         Enable client subnet
1543   --disable-gost          Disable GOST support
1544   --disable-ecdsa         Disable ECDSA support
1545   --disable-dsa           Disable DSA support
1546   --disable-ed25519       Disable ED25519 support
1547   --enable-event-api      Enable (experimental) pluggable event base
1548                           libunbound API installed to unbound-event.h
1549   --enable-tfo-client     Enable TCP Fast Open for client mode
1550   --enable-tfo-server     Enable TCP Fast Open for server mode
1551   --enable-static-exe     enable to compile executables statically against
1552                           (event) libs, for debug purposes
1553   --enable-systemd        compile with systemd support
1554   --enable-lock-checks    enable to check lock and unlock calls, for debug
1555                           purposes
1556   --enable-allsymbols     export all symbols from libunbound and link binaries
1557                           to it, smaller install size but libunbound export
1558                           table is polluted by internal symbols
1559   --enable-dnstap         Enable dnstap support (requires fstrm, protobuf-c)
1560   --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1561   --enable-cachedb        enable cachedb module that can use external cache
1562                           storage
1563   --enable-ipsecmod       Enable ipsecmod module that facilitates
1564                           opportunistic IPsec
1565
1566 Optional Packages:
1567   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1568   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1569   --with-conf-file=path   Pathname to the Unbound configuration file
1570   --with-run-dir=path     set default directory to chdir to (by default dir
1571                           part of cfg file)
1572   --with-chroot-dir=path  set default directory to chroot to (by default same
1573                           as run-dir)
1574   --with-share-dir=path   set default directory with shared data (by default
1575                           same as share/unbound)
1576   --with-pidfile=filename set default pathname to unbound pidfile (default
1577                           run-dir/unbound.pid)
1578   --with-rootkey-file=filename
1579                           set default pathname to root key file (default
1580                           run-dir/root.key). This file is read and written.
1581   --with-rootcert-file=filename
1582                           set default pathname to root update certificate file
1583                           (default run-dir/icannbundle.pem). This file need
1584                           not exist if you are content with the builtin.
1585   --with-username=user    set default user that unbound changes to (default
1586                           user is unbound)
1587   --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1588                           both]
1589   --with-aix-soname=aix|svr4|both
1590                           shared library versioning (aka "SONAME") variant to
1591                           provide on AIX, [default=aix].
1592   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1593   --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1594                           compiler's sysroot if not specified).
1595   --with-pthreads         use pthreads library, or --without-pthreads to
1596                           disable threading support.
1597   --with-solaris-threads  use solaris native thread library.
1598   --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1599                           (default=no)
1600   --with-pythonmodule     build Python module, or --without-pythonmodule to
1601                           disable script engine. (default=no)
1602   --with-nss=path         use libnss instead of openssl, installed at path.
1603   --with-nettle=path      use libnettle as crypto library, installed at path.
1604   --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1605                           /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1606                           /usr)
1607   --with-libevent=pathname
1608                           use libevent (will check /usr/local /opt/local
1609                           /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1610                           an explicit path). Slower, but allows use of large
1611                           outgoing port ranges.
1612   --with-libexpat=path    specify explicit path for libexpat.
1613   --with-dnstap-socket-path=pathname
1614                           set default dnstap socket path
1615   --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1616   --with-libfstrm=path    Path where libfstrm is installed, for dnstap
1617   --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1618   --with-libunbound-only  do not build daemon and tool programs
1619
1620 Some influential environment variables:
1621   CC          C compiler command
1622   CFLAGS      C compiler flags
1623   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1624               nonstandard directory <lib dir>
1625   LIBS        libraries to pass to the linker, e.g. -l<library>
1626   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1627               you have headers in a nonstandard directory <include dir>
1628   CPP         C preprocessor
1629   YACC        The `Yet Another Compiler Compiler' implementation to use.
1630               Defaults to the first program found out of: `bison -y', `byacc',
1631               `yacc'.
1632   YFLAGS      The list of arguments that will be passed by default to $YACC.
1633               This script will default YFLAGS to the empty string to avoid a
1634               default value of `-d' given by some make applications.
1635   LT_SYS_LIBRARY_PATH
1636               User-defined run-time library search path.
1637   PYTHON_VERSION
1638               The installed Python version to use, for example '2.3'. This
1639               string will be appended to the Python interpreter canonical
1640               name.
1641   PKG_CONFIG  path to pkg-config utility
1642   PKG_CONFIG_PATH
1643               directories to add to pkg-config's search path
1644   PKG_CONFIG_LIBDIR
1645               path overriding pkg-config's built-in search path
1646   SYSTEMD_CFLAGS
1647               C compiler flags for SYSTEMD, overriding pkg-config
1648   SYSTEMD_LIBS
1649               linker flags for SYSTEMD, overriding pkg-config
1650   SYSTEMD_DAEMON_CFLAGS
1651               C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1652   SYSTEMD_DAEMON_LIBS
1653               linker flags for SYSTEMD_DAEMON, overriding pkg-config
1654
1655 Use these variables to override the choices made by `configure' or to help
1656 it to find libraries and programs with nonstandard names/locations.
1657
1658 Report bugs to <unbound-bugs@nlnetlabs.nl>.
1659 _ACEOF
1660 ac_status=$?
1661 fi
1662
1663 if test "$ac_init_help" = "recursive"; then
1664   # If there are subdirs, report their specific --help.
1665   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1666     test -d "$ac_dir" ||
1667       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1668       continue
1669     ac_builddir=.
1670
1671 case "$ac_dir" in
1672 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1673 *)
1674   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1675   # A ".." for each directory in $ac_dir_suffix.
1676   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1677   case $ac_top_builddir_sub in
1678   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1679   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1680   esac ;;
1681 esac
1682 ac_abs_top_builddir=$ac_pwd
1683 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1684 # for backward compatibility:
1685 ac_top_builddir=$ac_top_build_prefix
1686
1687 case $srcdir in
1688   .)  # We are building in place.
1689     ac_srcdir=.
1690     ac_top_srcdir=$ac_top_builddir_sub
1691     ac_abs_top_srcdir=$ac_pwd ;;
1692   [\\/]* | ?:[\\/]* )  # Absolute name.
1693     ac_srcdir=$srcdir$ac_dir_suffix;
1694     ac_top_srcdir=$srcdir
1695     ac_abs_top_srcdir=$srcdir ;;
1696   *) # Relative name.
1697     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1698     ac_top_srcdir=$ac_top_build_prefix$srcdir
1699     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1700 esac
1701 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1702
1703     cd "$ac_dir" || { ac_status=$?; continue; }
1704     # Check for guested configure.
1705     if test -f "$ac_srcdir/configure.gnu"; then
1706       echo &&
1707       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1708     elif test -f "$ac_srcdir/configure"; then
1709       echo &&
1710       $SHELL "$ac_srcdir/configure" --help=recursive
1711     else
1712       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1713     fi || ac_status=$?
1714     cd "$ac_pwd" || { ac_status=$?; break; }
1715   done
1716 fi
1717
1718 test -n "$ac_init_help" && exit $ac_status
1719 if $ac_init_version; then
1720   cat <<\_ACEOF
1721 unbound configure 1.7.0
1722 generated by GNU Autoconf 2.69
1723
1724 Copyright (C) 2012 Free Software Foundation, Inc.
1725 This configure script is free software; the Free Software Foundation
1726 gives unlimited permission to copy, distribute and modify it.
1727 _ACEOF
1728   exit
1729 fi
1730
1731 ## ------------------------ ##
1732 ## Autoconf initialization. ##
1733 ## ------------------------ ##
1734
1735 # ac_fn_c_try_compile LINENO
1736 # --------------------------
1737 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1738 ac_fn_c_try_compile ()
1739 {
1740   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1741   rm -f conftest.$ac_objext
1742   if { { ac_try="$ac_compile"
1743 case "(($ac_try" in
1744   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1745   *) ac_try_echo=$ac_try;;
1746 esac
1747 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1748 $as_echo "$ac_try_echo"; } >&5
1749   (eval "$ac_compile") 2>conftest.err
1750   ac_status=$?
1751   if test -s conftest.err; then
1752     grep -v '^ *+' conftest.err >conftest.er1
1753     cat conftest.er1 >&5
1754     mv -f conftest.er1 conftest.err
1755   fi
1756   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1757   test $ac_status = 0; } && {
1758          test -z "$ac_c_werror_flag" ||
1759          test ! -s conftest.err
1760        } && test -s conftest.$ac_objext; then :
1761   ac_retval=0
1762 else
1763   $as_echo "$as_me: failed program was:" >&5
1764 sed 's/^/| /' conftest.$ac_ext >&5
1765
1766         ac_retval=1
1767 fi
1768   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1769   as_fn_set_status $ac_retval
1770
1771 } # ac_fn_c_try_compile
1772
1773 # ac_fn_c_try_cpp LINENO
1774 # ----------------------
1775 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1776 ac_fn_c_try_cpp ()
1777 {
1778   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1779   if { { ac_try="$ac_cpp conftest.$ac_ext"
1780 case "(($ac_try" in
1781   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1782   *) ac_try_echo=$ac_try;;
1783 esac
1784 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1785 $as_echo "$ac_try_echo"; } >&5
1786   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1787   ac_status=$?
1788   if test -s conftest.err; then
1789     grep -v '^ *+' conftest.err >conftest.er1
1790     cat conftest.er1 >&5
1791     mv -f conftest.er1 conftest.err
1792   fi
1793   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1794   test $ac_status = 0; } > conftest.i && {
1795          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1796          test ! -s conftest.err
1797        }; then :
1798   ac_retval=0
1799 else
1800   $as_echo "$as_me: failed program was:" >&5
1801 sed 's/^/| /' conftest.$ac_ext >&5
1802
1803     ac_retval=1
1804 fi
1805   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1806   as_fn_set_status $ac_retval
1807
1808 } # ac_fn_c_try_cpp
1809
1810 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1811 # -------------------------------------------------------
1812 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1813 # the include files in INCLUDES and setting the cache variable VAR
1814 # accordingly.
1815 ac_fn_c_check_header_mongrel ()
1816 {
1817   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1818   if eval \${$3+:} false; then :
1819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1820 $as_echo_n "checking for $2... " >&6; }
1821 if eval \${$3+:} false; then :
1822   $as_echo_n "(cached) " >&6
1823 fi
1824 eval ac_res=\$$3
1825                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1826 $as_echo "$ac_res" >&6; }
1827 else
1828   # Is the header compilable?
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1830 $as_echo_n "checking $2 usability... " >&6; }
1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832 /* end confdefs.h.  */
1833 $4
1834 #include <$2>
1835 _ACEOF
1836 if ac_fn_c_try_compile "$LINENO"; then :
1837   ac_header_compiler=yes
1838 else
1839   ac_header_compiler=no
1840 fi
1841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1843 $as_echo "$ac_header_compiler" >&6; }
1844
1845 # Is the header present?
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1847 $as_echo_n "checking $2 presence... " >&6; }
1848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1849 /* end confdefs.h.  */
1850 #include <$2>
1851 _ACEOF
1852 if ac_fn_c_try_cpp "$LINENO"; then :
1853   ac_header_preproc=yes
1854 else
1855   ac_header_preproc=no
1856 fi
1857 rm -f conftest.err conftest.i conftest.$ac_ext
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1859 $as_echo "$ac_header_preproc" >&6; }
1860
1861 # So?  What about this header?
1862 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1863   yes:no: )
1864     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1865 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1866     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1867 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1868     ;;
1869   no:yes:* )
1870     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1871 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1872     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1873 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1874     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1875 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1876     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1877 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1878     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1879 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1880 ( $as_echo "## ---------------------------------------- ##
1881 ## Report this to unbound-bugs@nlnetlabs.nl ##
1882 ## ---------------------------------------- ##"
1883      ) | sed "s/^/$as_me: WARNING:     /" >&2
1884     ;;
1885 esac
1886   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1887 $as_echo_n "checking for $2... " >&6; }
1888 if eval \${$3+:} false; then :
1889   $as_echo_n "(cached) " >&6
1890 else
1891   eval "$3=\$ac_header_compiler"
1892 fi
1893 eval ac_res=\$$3
1894                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1895 $as_echo "$ac_res" >&6; }
1896 fi
1897   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1898
1899 } # ac_fn_c_check_header_mongrel
1900
1901 # ac_fn_c_try_run LINENO
1902 # ----------------------
1903 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1904 # that executables *can* be run.
1905 ac_fn_c_try_run ()
1906 {
1907   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908   if { { ac_try="$ac_link"
1909 case "(($ac_try" in
1910   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1911   *) ac_try_echo=$ac_try;;
1912 esac
1913 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1914 $as_echo "$ac_try_echo"; } >&5
1915   (eval "$ac_link") 2>&5
1916   ac_status=$?
1917   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1918   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1919   { { case "(($ac_try" in
1920   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1921   *) ac_try_echo=$ac_try;;
1922 esac
1923 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1924 $as_echo "$ac_try_echo"; } >&5
1925   (eval "$ac_try") 2>&5
1926   ac_status=$?
1927   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1928   test $ac_status = 0; }; }; then :
1929   ac_retval=0
1930 else
1931   $as_echo "$as_me: program exited with status $ac_status" >&5
1932        $as_echo "$as_me: failed program was:" >&5
1933 sed 's/^/| /' conftest.$ac_ext >&5
1934
1935        ac_retval=$ac_status
1936 fi
1937   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1938   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1939   as_fn_set_status $ac_retval
1940
1941 } # ac_fn_c_try_run
1942
1943 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1944 # -------------------------------------------------------
1945 # Tests whether HEADER exists and can be compiled using the include files in
1946 # INCLUDES, setting the cache variable VAR accordingly.
1947 ac_fn_c_check_header_compile ()
1948 {
1949   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1950   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1951 $as_echo_n "checking for $2... " >&6; }
1952 if eval \${$3+:} false; then :
1953   $as_echo_n "(cached) " >&6
1954 else
1955   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1956 /* end confdefs.h.  */
1957 $4
1958 #include <$2>
1959 _ACEOF
1960 if ac_fn_c_try_compile "$LINENO"; then :
1961   eval "$3=yes"
1962 else
1963   eval "$3=no"
1964 fi
1965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1966 fi
1967 eval ac_res=\$$3
1968                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1969 $as_echo "$ac_res" >&6; }
1970   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1971
1972 } # ac_fn_c_check_header_compile
1973
1974 # ac_fn_c_try_link LINENO
1975 # -----------------------
1976 # Try to link conftest.$ac_ext, and return whether this succeeded.
1977 ac_fn_c_try_link ()
1978 {
1979   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1980   rm -f conftest.$ac_objext conftest$ac_exeext
1981   if { { ac_try="$ac_link"
1982 case "(($ac_try" in
1983   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1984   *) ac_try_echo=$ac_try;;
1985 esac
1986 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1987 $as_echo "$ac_try_echo"; } >&5
1988   (eval "$ac_link") 2>conftest.err
1989   ac_status=$?
1990   if test -s conftest.err; then
1991     grep -v '^ *+' conftest.err >conftest.er1
1992     cat conftest.er1 >&5
1993     mv -f conftest.er1 conftest.err
1994   fi
1995   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1996   test $ac_status = 0; } && {
1997          test -z "$ac_c_werror_flag" ||
1998          test ! -s conftest.err
1999        } && test -s conftest$ac_exeext && {
2000          test "$cross_compiling" = yes ||
2001          test -x conftest$ac_exeext
2002        }; then :
2003   ac_retval=0
2004 else
2005   $as_echo "$as_me: failed program was:" >&5
2006 sed 's/^/| /' conftest.$ac_ext >&5
2007
2008         ac_retval=1
2009 fi
2010   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2011   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2012   # interfere with the next link command; also delete a directory that is
2013   # left behind by Apple's compiler.  We do this before executing the actions.
2014   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2015   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2016   as_fn_set_status $ac_retval
2017
2018 } # ac_fn_c_try_link
2019
2020 # ac_fn_c_check_func LINENO FUNC VAR
2021 # ----------------------------------
2022 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2023 ac_fn_c_check_func ()
2024 {
2025   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2026   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2027 $as_echo_n "checking for $2... " >&6; }
2028 if eval \${$3+:} false; then :
2029   $as_echo_n "(cached) " >&6
2030 else
2031   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2032 /* end confdefs.h.  */
2033 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2034    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2035 #define $2 innocuous_$2
2036
2037 /* System header to define __stub macros and hopefully few prototypes,
2038     which can conflict with char $2 (); below.
2039     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2040     <limits.h> exists even on freestanding compilers.  */
2041
2042 #ifdef __STDC__
2043 # include <limits.h>
2044 #else
2045 # include <assert.h>
2046 #endif
2047
2048 #undef $2
2049
2050 /* Override any GCC internal prototype to avoid an error.
2051    Use char because int might match the return type of a GCC
2052    builtin and then its argument prototype would still apply.  */
2053 #ifdef __cplusplus
2054 extern "C"
2055 #endif
2056 char $2 ();
2057 /* The GNU C library defines this for functions which it implements
2058     to always fail with ENOSYS.  Some functions are actually named
2059     something starting with __ and the normal name is an alias.  */
2060 #if defined __stub_$2 || defined __stub___$2
2061 choke me
2062 #endif
2063
2064 int
2065 main ()
2066 {
2067 return $2 ();
2068   ;
2069   return 0;
2070 }
2071 _ACEOF
2072 if ac_fn_c_try_link "$LINENO"; then :
2073   eval "$3=yes"
2074 else
2075   eval "$3=no"
2076 fi
2077 rm -f core conftest.err conftest.$ac_objext \
2078     conftest$ac_exeext conftest.$ac_ext
2079 fi
2080 eval ac_res=\$$3
2081                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2082 $as_echo "$ac_res" >&6; }
2083   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2084
2085 } # ac_fn_c_check_func
2086
2087 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2088 # -------------------------------------------
2089 # Tests whether TYPE exists after having included INCLUDES, setting cache
2090 # variable VAR accordingly.
2091 ac_fn_c_check_type ()
2092 {
2093   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2094   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2095 $as_echo_n "checking for $2... " >&6; }
2096 if eval \${$3+:} false; then :
2097   $as_echo_n "(cached) " >&6
2098 else
2099   eval "$3=no"
2100   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2101 /* end confdefs.h.  */
2102 $4
2103 int
2104 main ()
2105 {
2106 if (sizeof ($2))
2107          return 0;
2108   ;
2109   return 0;
2110 }
2111 _ACEOF
2112 if ac_fn_c_try_compile "$LINENO"; then :
2113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2114 /* end confdefs.h.  */
2115 $4
2116 int
2117 main ()
2118 {
2119 if (sizeof (($2)))
2120             return 0;
2121   ;
2122   return 0;
2123 }
2124 _ACEOF
2125 if ac_fn_c_try_compile "$LINENO"; then :
2126
2127 else
2128   eval "$3=yes"
2129 fi
2130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2131 fi
2132 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2133 fi
2134 eval ac_res=\$$3
2135                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2136 $as_echo "$ac_res" >&6; }
2137   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2138
2139 } # ac_fn_c_check_type
2140
2141 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2142 # --------------------------------------------
2143 # Tries to find the compile-time value of EXPR in a program that includes
2144 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2145 # computed
2146 ac_fn_c_compute_int ()
2147 {
2148   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2149   if test "$cross_compiling" = yes; then
2150     # Depending upon the size, compute the lo and hi bounds.
2151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2152 /* end confdefs.h.  */
2153 $4
2154 int
2155 main ()
2156 {
2157 static int test_array [1 - 2 * !(($2) >= 0)];
2158 test_array [0] = 0;
2159 return test_array [0];
2160
2161   ;
2162   return 0;
2163 }
2164 _ACEOF
2165 if ac_fn_c_try_compile "$LINENO"; then :
2166   ac_lo=0 ac_mid=0
2167   while :; do
2168     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2169 /* end confdefs.h.  */
2170 $4
2171 int
2172 main ()
2173 {
2174 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2175 test_array [0] = 0;
2176 return test_array [0];
2177
2178   ;
2179   return 0;
2180 }
2181 _ACEOF
2182 if ac_fn_c_try_compile "$LINENO"; then :
2183   ac_hi=$ac_mid; break
2184 else
2185   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2186                         if test $ac_lo -le $ac_mid; then
2187                           ac_lo= ac_hi=
2188                           break
2189                         fi
2190                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2191 fi
2192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2193   done
2194 else
2195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2196 /* end confdefs.h.  */
2197 $4
2198 int
2199 main ()
2200 {
2201 static int test_array [1 - 2 * !(($2) < 0)];
2202 test_array [0] = 0;
2203 return test_array [0];
2204
2205   ;
2206   return 0;
2207 }
2208 _ACEOF
2209 if ac_fn_c_try_compile "$LINENO"; then :
2210   ac_hi=-1 ac_mid=-1
2211   while :; do
2212     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2213 /* end confdefs.h.  */
2214 $4
2215 int
2216 main ()
2217 {
2218 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2219 test_array [0] = 0;
2220 return test_array [0];
2221
2222   ;
2223   return 0;
2224 }
2225 _ACEOF
2226 if ac_fn_c_try_compile "$LINENO"; then :
2227   ac_lo=$ac_mid; break
2228 else
2229   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2230                         if test $ac_mid -le $ac_hi; then
2231                           ac_lo= ac_hi=
2232                           break
2233                         fi
2234                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2235 fi
2236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2237   done
2238 else
2239   ac_lo= ac_hi=
2240 fi
2241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2242 fi
2243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2244 # Binary search between lo and hi bounds.
2245 while test "x$ac_lo" != "x$ac_hi"; do
2246   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
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_hi=$ac_mid
2263 else
2264   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2265 fi
2266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2267 done
2268 case $ac_lo in #((
2269 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2270 '') ac_retval=1 ;;
2271 esac
2272   else
2273     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2274 /* end confdefs.h.  */
2275 $4
2276 static long int longval () { return $2; }
2277 static unsigned long int ulongval () { return $2; }
2278 #include <stdio.h>
2279 #include <stdlib.h>
2280 int
2281 main ()
2282 {
2283
2284   FILE *f = fopen ("conftest.val", "w");
2285   if (! f)
2286     return 1;
2287   if (($2) < 0)
2288     {
2289       long int i = longval ();
2290       if (i != ($2))
2291         return 1;
2292       fprintf (f, "%ld", i);
2293     }
2294   else
2295     {
2296       unsigned long int i = ulongval ();
2297       if (i != ($2))
2298         return 1;
2299       fprintf (f, "%lu", i);
2300     }
2301   /* Do not output a trailing newline, as this causes \r\n confusion
2302      on some platforms.  */
2303   return ferror (f) || fclose (f) != 0;
2304
2305   ;
2306   return 0;
2307 }
2308 _ACEOF
2309 if ac_fn_c_try_run "$LINENO"; then :
2310   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2311 else
2312   ac_retval=1
2313 fi
2314 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2315   conftest.$ac_objext conftest.beam conftest.$ac_ext
2316 rm -f conftest.val
2317
2318   fi
2319   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2320   as_fn_set_status $ac_retval
2321
2322 } # ac_fn_c_compute_int
2323
2324 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2325 # ---------------------------------------------
2326 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2327 # accordingly.
2328 ac_fn_c_check_decl ()
2329 {
2330   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2331   as_decl_name=`echo $2|sed 's/ *(.*//'`
2332   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2333   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2334 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2335 if eval \${$3+:} false; then :
2336   $as_echo_n "(cached) " >&6
2337 else
2338   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2339 /* end confdefs.h.  */
2340 $4
2341 int
2342 main ()
2343 {
2344 #ifndef $as_decl_name
2345 #ifdef __cplusplus
2346   (void) $as_decl_use;
2347 #else
2348   (void) $as_decl_name;
2349 #endif
2350 #endif
2351
2352   ;
2353   return 0;
2354 }
2355 _ACEOF
2356 if ac_fn_c_try_compile "$LINENO"; then :
2357   eval "$3=yes"
2358 else
2359   eval "$3=no"
2360 fi
2361 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2362 fi
2363 eval ac_res=\$$3
2364                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2365 $as_echo "$ac_res" >&6; }
2366   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2367
2368 } # ac_fn_c_check_decl
2369
2370 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2371 # ----------------------------------------------------
2372 # Tries to find if the field MEMBER exists in type AGGR, after including
2373 # INCLUDES, setting cache variable VAR accordingly.
2374 ac_fn_c_check_member ()
2375 {
2376   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2377   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2378 $as_echo_n "checking for $2.$3... " >&6; }
2379 if eval \${$4+:} false; then :
2380   $as_echo_n "(cached) " >&6
2381 else
2382   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2383 /* end confdefs.h.  */
2384 $5
2385 int
2386 main ()
2387 {
2388 static $2 ac_aggr;
2389 if (ac_aggr.$3)
2390 return 0;
2391   ;
2392   return 0;
2393 }
2394 _ACEOF
2395 if ac_fn_c_try_compile "$LINENO"; then :
2396   eval "$4=yes"
2397 else
2398   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2399 /* end confdefs.h.  */
2400 $5
2401 int
2402 main ()
2403 {
2404 static $2 ac_aggr;
2405 if (sizeof ac_aggr.$3)
2406 return 0;
2407   ;
2408   return 0;
2409 }
2410 _ACEOF
2411 if ac_fn_c_try_compile "$LINENO"; then :
2412   eval "$4=yes"
2413 else
2414   eval "$4=no"
2415 fi
2416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2417 fi
2418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2419 fi
2420 eval ac_res=\$$4
2421                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2422 $as_echo "$ac_res" >&6; }
2423   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2424
2425 } # ac_fn_c_check_member
2426 cat >config.log <<_ACEOF
2427 This file contains any messages produced by compilers while
2428 running configure, to aid debugging if configure makes a mistake.
2429
2430 It was created by unbound $as_me 1.7.0, which was
2431 generated by GNU Autoconf 2.69.  Invocation command line was
2432
2433   $ $0 $@
2434
2435 _ACEOF
2436 exec 5>>config.log
2437 {
2438 cat <<_ASUNAME
2439 ## --------- ##
2440 ## Platform. ##
2441 ## --------- ##
2442
2443 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2444 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2445 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2446 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2447 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2448
2449 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2450 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2451
2452 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2453 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2454 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2455 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2456 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2457 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2458 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2459
2460 _ASUNAME
2461
2462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2463 for as_dir in $PATH
2464 do
2465   IFS=$as_save_IFS
2466   test -z "$as_dir" && as_dir=.
2467     $as_echo "PATH: $as_dir"
2468   done
2469 IFS=$as_save_IFS
2470
2471 } >&5
2472
2473 cat >&5 <<_ACEOF
2474
2475
2476 ## ----------- ##
2477 ## Core tests. ##
2478 ## ----------- ##
2479
2480 _ACEOF
2481
2482
2483 # Keep a trace of the command line.
2484 # Strip out --no-create and --no-recursion so they do not pile up.
2485 # Strip out --silent because we don't want to record it for future runs.
2486 # Also quote any args containing shell meta-characters.
2487 # Make two passes to allow for proper duplicate-argument suppression.
2488 ac_configure_args=
2489 ac_configure_args0=
2490 ac_configure_args1=
2491 ac_must_keep_next=false
2492 for ac_pass in 1 2
2493 do
2494   for ac_arg
2495   do
2496     case $ac_arg in
2497     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2498     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2499     | -silent | --silent | --silen | --sile | --sil)
2500       continue ;;
2501     *\'*)
2502       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2503     esac
2504     case $ac_pass in
2505     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2506     2)
2507       as_fn_append ac_configure_args1 " '$ac_arg'"
2508       if test $ac_must_keep_next = true; then
2509         ac_must_keep_next=false # Got value, back to normal.
2510       else
2511         case $ac_arg in
2512           *=* | --config-cache | -C | -disable-* | --disable-* \
2513           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2514           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2515           | -with-* | --with-* | -without-* | --without-* | --x)
2516             case "$ac_configure_args0 " in
2517               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2518             esac
2519             ;;
2520           -* ) ac_must_keep_next=true ;;
2521         esac
2522       fi
2523       as_fn_append ac_configure_args " '$ac_arg'"
2524       ;;
2525     esac
2526   done
2527 done
2528 { ac_configure_args0=; unset ac_configure_args0;}
2529 { ac_configure_args1=; unset ac_configure_args1;}
2530
2531 # When interrupted or exit'd, cleanup temporary files, and complete
2532 # config.log.  We remove comments because anyway the quotes in there
2533 # would cause problems or look ugly.
2534 # WARNING: Use '\'' to represent an apostrophe within the trap.
2535 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2536 trap 'exit_status=$?
2537   # Save into config.log some information that might help in debugging.
2538   {
2539     echo
2540
2541     $as_echo "## ---------------- ##
2542 ## Cache variables. ##
2543 ## ---------------- ##"
2544     echo
2545     # The following way of writing the cache mishandles newlines in values,
2546 (
2547   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2548     eval ac_val=\$$ac_var
2549     case $ac_val in #(
2550     *${as_nl}*)
2551       case $ac_var in #(
2552       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2553 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2554       esac
2555       case $ac_var in #(
2556       _ | IFS | as_nl) ;; #(
2557       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2558       *) { eval $ac_var=; unset $ac_var;} ;;
2559       esac ;;
2560     esac
2561   done
2562   (set) 2>&1 |
2563     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2564     *${as_nl}ac_space=\ *)
2565       sed -n \
2566         "s/'\''/'\''\\\\'\'''\''/g;
2567           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2568       ;; #(
2569     *)
2570       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2571       ;;
2572     esac |
2573     sort
2574 )
2575     echo
2576
2577     $as_echo "## ----------------- ##
2578 ## Output variables. ##
2579 ## ----------------- ##"
2580     echo
2581     for ac_var in $ac_subst_vars
2582     do
2583       eval ac_val=\$$ac_var
2584       case $ac_val in
2585       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2586       esac
2587       $as_echo "$ac_var='\''$ac_val'\''"
2588     done | sort
2589     echo
2590
2591     if test -n "$ac_subst_files"; then
2592       $as_echo "## ------------------- ##
2593 ## File substitutions. ##
2594 ## ------------------- ##"
2595       echo
2596       for ac_var in $ac_subst_files
2597       do
2598         eval ac_val=\$$ac_var
2599         case $ac_val in
2600         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2601         esac
2602         $as_echo "$ac_var='\''$ac_val'\''"
2603       done | sort
2604       echo
2605     fi
2606
2607     if test -s confdefs.h; then
2608       $as_echo "## ----------- ##
2609 ## confdefs.h. ##
2610 ## ----------- ##"
2611       echo
2612       cat confdefs.h
2613       echo
2614     fi
2615     test "$ac_signal" != 0 &&
2616       $as_echo "$as_me: caught signal $ac_signal"
2617     $as_echo "$as_me: exit $exit_status"
2618   } >&5
2619   rm -f core *.core core.conftest.* &&
2620     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2621     exit $exit_status
2622 ' 0
2623 for ac_signal in 1 2 13 15; do
2624   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2625 done
2626 ac_signal=0
2627
2628 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2629 rm -f -r conftest* confdefs.h
2630
2631 $as_echo "/* confdefs.h */" > confdefs.h
2632
2633 # Predefined preprocessor variables.
2634
2635 cat >>confdefs.h <<_ACEOF
2636 #define PACKAGE_NAME "$PACKAGE_NAME"
2637 _ACEOF
2638
2639 cat >>confdefs.h <<_ACEOF
2640 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2641 _ACEOF
2642
2643 cat >>confdefs.h <<_ACEOF
2644 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2645 _ACEOF
2646
2647 cat >>confdefs.h <<_ACEOF
2648 #define PACKAGE_STRING "$PACKAGE_STRING"
2649 _ACEOF
2650
2651 cat >>confdefs.h <<_ACEOF
2652 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2653 _ACEOF
2654
2655 cat >>confdefs.h <<_ACEOF
2656 #define PACKAGE_URL "$PACKAGE_URL"
2657 _ACEOF
2658
2659
2660 # Let the site file select an alternate cache file if it wants to.
2661 # Prefer an explicitly selected file to automatically selected ones.
2662 ac_site_file1=NONE
2663 ac_site_file2=NONE
2664 if test -n "$CONFIG_SITE"; then
2665   # We do not want a PATH search for config.site.
2666   case $CONFIG_SITE in #((
2667     -*)  ac_site_file1=./$CONFIG_SITE;;
2668     */*) ac_site_file1=$CONFIG_SITE;;
2669     *)   ac_site_file1=./$CONFIG_SITE;;
2670   esac
2671 elif test "x$prefix" != xNONE; then
2672   ac_site_file1=$prefix/share/config.site
2673   ac_site_file2=$prefix/etc/config.site
2674 else
2675   ac_site_file1=$ac_default_prefix/share/config.site
2676   ac_site_file2=$ac_default_prefix/etc/config.site
2677 fi
2678 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2679 do
2680   test "x$ac_site_file" = xNONE && continue
2681   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2682     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2683 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2684     sed 's/^/| /' "$ac_site_file" >&5
2685     . "$ac_site_file" \
2686       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2687 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2688 as_fn_error $? "failed to load site script $ac_site_file
2689 See \`config.log' for more details" "$LINENO" 5; }
2690   fi
2691 done
2692
2693 if test -r "$cache_file"; then
2694   # Some versions of bash will fail to source /dev/null (special files
2695   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2696   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2697     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2698 $as_echo "$as_me: loading cache $cache_file" >&6;}
2699     case $cache_file in
2700       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2701       *)                      . "./$cache_file";;
2702     esac
2703   fi
2704 else
2705   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2706 $as_echo "$as_me: creating cache $cache_file" >&6;}
2707   >$cache_file
2708 fi
2709
2710 # Check that the precious variables saved in the cache have kept the same
2711 # value.
2712 ac_cache_corrupted=false
2713 for ac_var in $ac_precious_vars; do
2714   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2715   eval ac_new_set=\$ac_env_${ac_var}_set
2716   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2717   eval ac_new_val=\$ac_env_${ac_var}_value
2718   case $ac_old_set,$ac_new_set in
2719     set,)
2720       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2721 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2722       ac_cache_corrupted=: ;;
2723     ,set)
2724       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2725 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2726       ac_cache_corrupted=: ;;
2727     ,);;
2728     *)
2729       if test "x$ac_old_val" != "x$ac_new_val"; then
2730         # differences in whitespace do not lead to failure.
2731         ac_old_val_w=`echo x $ac_old_val`
2732         ac_new_val_w=`echo x $ac_new_val`
2733         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2734           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2735 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2736           ac_cache_corrupted=:
2737         else
2738           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2739 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2740           eval $ac_var=\$ac_old_val
2741         fi
2742         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2743 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2744         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2745 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2746       fi;;
2747   esac
2748   # Pass precious variables to config.status.
2749   if test "$ac_new_set" = set; then
2750     case $ac_new_val in
2751     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2752     *) ac_arg=$ac_var=$ac_new_val ;;
2753     esac
2754     case " $ac_configure_args " in
2755       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2756       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2757     esac
2758   fi
2759 done
2760 if $ac_cache_corrupted; then
2761   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2762 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2763   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2764 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2765   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2766 fi
2767 ## -------------------- ##
2768 ## Main body of script. ##
2769 ## -------------------- ##
2770
2771 ac_ext=c
2772 ac_cpp='$CPP $CPPFLAGS'
2773 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2774 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2775 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2776
2777
2778 UNBOUND_VERSION_MAJOR=1
2779
2780 UNBOUND_VERSION_MINOR=7
2781
2782 UNBOUND_VERSION_MICRO=0
2783
2784
2785 LIBUNBOUND_CURRENT=7
2786 LIBUNBOUND_REVISION=8
2787 LIBUNBOUND_AGE=5
2788 # 1.0.0 had 0:12:0
2789 # 1.0.1 had 0:13:0
2790 # 1.0.2 had 0:14:0
2791 # 1.1.0 had 0:15:0
2792 # 1.1.1 had 0:16:0
2793 # 1.2.0 had 0:17:0
2794 # 1.2.1 had 0:18:0
2795 # 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
2796 # 1.3.1 had 1:1:0
2797 # 1.3.2 had 1:2:0
2798 # 1.3.3 had 1:3:0
2799 # 1.3.4 had 1:4:0
2800 # 1.4.0-snapshots had 1:5:0
2801 # 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
2802 # 1.4.1 had 2:1:0
2803 # 1.4.2 had 2:2:0
2804 # 1.4.3 had 2:3:0
2805 # 1.4.4 had 2:4:0
2806 # 1.4.5 had 2:5:0
2807 # 1.4.6 had 2:6:0
2808 # 1.4.7 had 2:7:0
2809 # 1.4.8 had 2:8:0
2810 # 1.4.9 had 2:9:0
2811 # 1.4.10 had 2:10:0
2812 # 1.4.11 had 2:11:0
2813 # 1.4.12 had 2:12:0
2814 # 1.4.13 had 2:13:0
2815 # and 1.4.13p1 and 1.4.13.p2
2816 # 1.4.14 had 2:14:0
2817 # 1.4.15 had 3:0:1 # adds ub_version()
2818 # 1.4.16 had 3:1:1
2819 # 1.4.17 had 3:2:1
2820 # 1.4.18 had 3:3:1
2821 # 1.4.19 had 3:4:1
2822 # 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
2823 # 1.4.21 had 4:1:2
2824 # 1.4.22 had 4:1:2
2825 # 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2826 # 1.5.1 had 5:3:3
2827 # 1.5.2 had 5:5:3
2828 # 1.5.3 had 5:6:3
2829 # 1.5.4 had 5:7:3
2830 # 1.5.5 had 5:8:3
2831 # 1.5.6 had 5:9:3
2832 # 1.5.7 had 5:10:3
2833 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
2834 # 1.5.9 had 6:1:4
2835 # 1.5.10 had 6:2:4
2836 # 1.6.0 had 6:3:4
2837 # 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
2838 # 1.6.2 had 7:1:5
2839 # 1.6.3 had 7:2:5
2840 # 1.6.4 had 7:3:5
2841 # 1.6.5 had 7:4:5
2842 # 1.6.6 had 7:5:5
2843 # 1.6.7 had 7:6:5
2844 # 1.6.8 had 7:7:5
2845 # 1.7.0 had 7:8:5
2846
2847 #   Current  -- the number of the binary API that we're implementing
2848 #   Revision -- which iteration of the implementation of the binary
2849 #               API are we supplying?
2850 #   Age      -- How many previous binary API versions do we also
2851 #               support?
2852 #
2853 # If we release a new version that does not change the binary API,
2854 # increment Revision.
2855 #
2856 # If we release a new version that changes the binary API, but does
2857 # not break programs compiled against the old binary API, increment
2858 # Current and Age.  Set Revision to 0, since this is the first
2859 # implementation of the new API.
2860 #
2861 # Otherwise, we're changing the binary API and breaking backward
2862 # compatibility with old binaries.  Increment Current.  Set Age to 0,
2863 # since we're backward compatible with no previous APIs.  Set Revision
2864 # to 0 too.
2865
2866
2867
2868
2869 CFLAGS="$CFLAGS"
2870 ac_ext=c
2871 ac_cpp='$CPP $CPPFLAGS'
2872 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2873 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2874 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2875 if test -n "$ac_tool_prefix"; then
2876   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2877 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2879 $as_echo_n "checking for $ac_word... " >&6; }
2880 if ${ac_cv_prog_CC+:} false; then :
2881   $as_echo_n "(cached) " >&6
2882 else
2883   if test -n "$CC"; then
2884   ac_cv_prog_CC="$CC" # Let the user override the test.
2885 else
2886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2887 for as_dir in $PATH
2888 do
2889   IFS=$as_save_IFS
2890   test -z "$as_dir" && as_dir=.
2891     for ac_exec_ext in '' $ac_executable_extensions; do
2892   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2893     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2894     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2895     break 2
2896   fi
2897 done
2898   done
2899 IFS=$as_save_IFS
2900
2901 fi
2902 fi
2903 CC=$ac_cv_prog_CC
2904 if test -n "$CC"; then
2905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2906 $as_echo "$CC" >&6; }
2907 else
2908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2909 $as_echo "no" >&6; }
2910 fi
2911
2912
2913 fi
2914 if test -z "$ac_cv_prog_CC"; then
2915   ac_ct_CC=$CC
2916   # Extract the first word of "gcc", so it can be a program name with args.
2917 set dummy gcc; ac_word=$2
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2919 $as_echo_n "checking for $ac_word... " >&6; }
2920 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2921   $as_echo_n "(cached) " >&6
2922 else
2923   if test -n "$ac_ct_CC"; then
2924   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2925 else
2926 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2927 for as_dir in $PATH
2928 do
2929   IFS=$as_save_IFS
2930   test -z "$as_dir" && as_dir=.
2931     for ac_exec_ext in '' $ac_executable_extensions; do
2932   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2933     ac_cv_prog_ac_ct_CC="gcc"
2934     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2935     break 2
2936   fi
2937 done
2938   done
2939 IFS=$as_save_IFS
2940
2941 fi
2942 fi
2943 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2944 if test -n "$ac_ct_CC"; then
2945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2946 $as_echo "$ac_ct_CC" >&6; }
2947 else
2948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2949 $as_echo "no" >&6; }
2950 fi
2951
2952   if test "x$ac_ct_CC" = x; then
2953     CC=""
2954   else
2955     case $cross_compiling:$ac_tool_warned in
2956 yes:)
2957 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2958 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2959 ac_tool_warned=yes ;;
2960 esac
2961     CC=$ac_ct_CC
2962   fi
2963 else
2964   CC="$ac_cv_prog_CC"
2965 fi
2966
2967 if test -z "$CC"; then
2968           if test -n "$ac_tool_prefix"; then
2969     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2970 set dummy ${ac_tool_prefix}cc; ac_word=$2
2971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2972 $as_echo_n "checking for $ac_word... " >&6; }
2973 if ${ac_cv_prog_CC+:} false; then :
2974   $as_echo_n "(cached) " >&6
2975 else
2976   if test -n "$CC"; then
2977   ac_cv_prog_CC="$CC" # Let the user override the test.
2978 else
2979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2980 for as_dir in $PATH
2981 do
2982   IFS=$as_save_IFS
2983   test -z "$as_dir" && as_dir=.
2984     for ac_exec_ext in '' $ac_executable_extensions; do
2985   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2986     ac_cv_prog_CC="${ac_tool_prefix}cc"
2987     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2988     break 2
2989   fi
2990 done
2991   done
2992 IFS=$as_save_IFS
2993
2994 fi
2995 fi
2996 CC=$ac_cv_prog_CC
2997 if test -n "$CC"; then
2998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2999 $as_echo "$CC" >&6; }
3000 else
3001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3002 $as_echo "no" >&6; }
3003 fi
3004
3005
3006   fi
3007 fi
3008 if test -z "$CC"; then
3009   # Extract the first word of "cc", so it can be a program name with args.
3010 set dummy cc; ac_word=$2
3011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3012 $as_echo_n "checking for $ac_word... " >&6; }
3013 if ${ac_cv_prog_CC+:} false; then :
3014   $as_echo_n "(cached) " >&6
3015 else
3016   if test -n "$CC"; then
3017   ac_cv_prog_CC="$CC" # Let the user override the test.
3018 else
3019   ac_prog_rejected=no
3020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3021 for as_dir in $PATH
3022 do
3023   IFS=$as_save_IFS
3024   test -z "$as_dir" && as_dir=.
3025     for ac_exec_ext in '' $ac_executable_extensions; do
3026   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3027     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3028        ac_prog_rejected=yes
3029        continue
3030      fi
3031     ac_cv_prog_CC="cc"
3032     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3033     break 2
3034   fi
3035 done
3036   done
3037 IFS=$as_save_IFS
3038
3039 if test $ac_prog_rejected = yes; then
3040   # We found a bogon in the path, so make sure we never use it.
3041   set dummy $ac_cv_prog_CC
3042   shift
3043   if test $# != 0; then
3044     # We chose a different compiler from the bogus one.
3045     # However, it has the same basename, so the bogon will be chosen
3046     # first if we set CC to just the basename; use the full file name.
3047     shift
3048     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3049   fi
3050 fi
3051 fi
3052 fi
3053 CC=$ac_cv_prog_CC
3054 if test -n "$CC"; then
3055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3056 $as_echo "$CC" >&6; }
3057 else
3058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3059 $as_echo "no" >&6; }
3060 fi
3061
3062
3063 fi
3064 if test -z "$CC"; then
3065   if test -n "$ac_tool_prefix"; then
3066   for ac_prog in cl.exe
3067   do
3068     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3069 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3071 $as_echo_n "checking for $ac_word... " >&6; }
3072 if ${ac_cv_prog_CC+:} false; then :
3073   $as_echo_n "(cached) " >&6
3074 else
3075   if test -n "$CC"; then
3076   ac_cv_prog_CC="$CC" # Let the user override the test.
3077 else
3078 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3079 for as_dir in $PATH
3080 do
3081   IFS=$as_save_IFS
3082   test -z "$as_dir" && as_dir=.
3083     for ac_exec_ext in '' $ac_executable_extensions; do
3084   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3085     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3086     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3087     break 2
3088   fi
3089 done
3090   done
3091 IFS=$as_save_IFS
3092
3093 fi
3094 fi
3095 CC=$ac_cv_prog_CC
3096 if test -n "$CC"; then
3097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3098 $as_echo "$CC" >&6; }
3099 else
3100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3101 $as_echo "no" >&6; }
3102 fi
3103
3104
3105     test -n "$CC" && break
3106   done
3107 fi
3108 if test -z "$CC"; then
3109   ac_ct_CC=$CC
3110   for ac_prog in cl.exe
3111 do
3112   # Extract the first word of "$ac_prog", so it can be a program name with args.
3113 set dummy $ac_prog; ac_word=$2
3114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3115 $as_echo_n "checking for $ac_word... " >&6; }
3116 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3117   $as_echo_n "(cached) " >&6
3118 else
3119   if test -n "$ac_ct_CC"; then
3120   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3121 else
3122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3123 for as_dir in $PATH
3124 do
3125   IFS=$as_save_IFS
3126   test -z "$as_dir" && as_dir=.
3127     for ac_exec_ext in '' $ac_executable_extensions; do
3128   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3129     ac_cv_prog_ac_ct_CC="$ac_prog"
3130     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3131     break 2
3132   fi
3133 done
3134   done
3135 IFS=$as_save_IFS
3136
3137 fi
3138 fi
3139 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3140 if test -n "$ac_ct_CC"; then
3141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3142 $as_echo "$ac_ct_CC" >&6; }
3143 else
3144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3145 $as_echo "no" >&6; }
3146 fi
3147
3148
3149   test -n "$ac_ct_CC" && break
3150 done
3151
3152   if test "x$ac_ct_CC" = x; then
3153     CC=""
3154   else
3155     case $cross_compiling:$ac_tool_warned in
3156 yes:)
3157 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3158 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3159 ac_tool_warned=yes ;;
3160 esac
3161     CC=$ac_ct_CC
3162   fi
3163 fi
3164
3165 fi
3166
3167
3168 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3169 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3170 as_fn_error $? "no acceptable C compiler found in \$PATH
3171 See \`config.log' for more details" "$LINENO" 5; }
3172
3173 # Provide some information about the compiler.
3174 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3175 set X $ac_compile
3176 ac_compiler=$2
3177 for ac_option in --version -v -V -qversion; do
3178   { { ac_try="$ac_compiler $ac_option >&5"
3179 case "(($ac_try" in
3180   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3181   *) ac_try_echo=$ac_try;;
3182 esac
3183 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3184 $as_echo "$ac_try_echo"; } >&5
3185   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3186   ac_status=$?
3187   if test -s conftest.err; then
3188     sed '10a\
3189 ... rest of stderr output deleted ...
3190          10q' conftest.err >conftest.er1
3191     cat conftest.er1 >&5
3192   fi
3193   rm -f conftest.er1 conftest.err
3194   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3195   test $ac_status = 0; }
3196 done
3197
3198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3199 /* end confdefs.h.  */
3200
3201 int
3202 main ()
3203 {
3204
3205   ;
3206   return 0;
3207 }
3208 _ACEOF
3209 ac_clean_files_save=$ac_clean_files
3210 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3211 # Try to create an executable without -o first, disregard a.out.
3212 # It will help us diagnose broken compilers, and finding out an intuition
3213 # of exeext.
3214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3215 $as_echo_n "checking whether the C compiler works... " >&6; }
3216 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3217
3218 # The possible output files:
3219 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3220
3221 ac_rmfiles=
3222 for ac_file in $ac_files
3223 do
3224   case $ac_file in
3225     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3226     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3227   esac
3228 done
3229 rm -f $ac_rmfiles
3230
3231 if { { ac_try="$ac_link_default"
3232 case "(($ac_try" in
3233   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3234   *) ac_try_echo=$ac_try;;
3235 esac
3236 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3237 $as_echo "$ac_try_echo"; } >&5
3238   (eval "$ac_link_default") 2>&5
3239   ac_status=$?
3240   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3241   test $ac_status = 0; }; then :
3242   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3243 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3244 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3245 # so that the user can short-circuit this test for compilers unknown to
3246 # Autoconf.
3247 for ac_file in $ac_files ''
3248 do
3249   test -f "$ac_file" || continue
3250   case $ac_file in
3251     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3252         ;;
3253     [ab].out )
3254         # We found the default executable, but exeext='' is most
3255         # certainly right.
3256         break;;
3257     *.* )
3258         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3259         then :; else
3260            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3261         fi
3262         # We set ac_cv_exeext here because the later test for it is not
3263         # safe: cross compilers may not add the suffix if given an `-o'
3264         # argument, so we may need to know it at that point already.
3265         # Even if this section looks crufty: it has the advantage of
3266         # actually working.
3267         break;;
3268     * )
3269         break;;
3270   esac
3271 done
3272 test "$ac_cv_exeext" = no && ac_cv_exeext=
3273
3274 else
3275   ac_file=''
3276 fi
3277 if test -z "$ac_file"; then :
3278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3279 $as_echo "no" >&6; }
3280 $as_echo "$as_me: failed program was:" >&5
3281 sed 's/^/| /' conftest.$ac_ext >&5
3282
3283 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3284 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3285 as_fn_error 77 "C compiler cannot create executables
3286 See \`config.log' for more details" "$LINENO" 5; }
3287 else
3288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3289 $as_echo "yes" >&6; }
3290 fi
3291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3292 $as_echo_n "checking for C compiler default output file name... " >&6; }
3293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3294 $as_echo "$ac_file" >&6; }
3295 ac_exeext=$ac_cv_exeext
3296
3297 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3298 ac_clean_files=$ac_clean_files_save
3299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3300 $as_echo_n "checking for suffix of executables... " >&6; }
3301 if { { ac_try="$ac_link"
3302 case "(($ac_try" in
3303   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3304   *) ac_try_echo=$ac_try;;
3305 esac
3306 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3307 $as_echo "$ac_try_echo"; } >&5
3308   (eval "$ac_link") 2>&5
3309   ac_status=$?
3310   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3311   test $ac_status = 0; }; then :
3312   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3313 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3314 # work properly (i.e., refer to `conftest.exe'), while it won't with
3315 # `rm'.
3316 for ac_file in conftest.exe conftest conftest.*; do
3317   test -f "$ac_file" || continue
3318   case $ac_file in
3319     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3320     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3321           break;;
3322     * ) break;;
3323   esac
3324 done
3325 else
3326   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3327 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3328 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3329 See \`config.log' for more details" "$LINENO" 5; }
3330 fi
3331 rm -f conftest conftest$ac_cv_exeext
3332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3333 $as_echo "$ac_cv_exeext" >&6; }
3334
3335 rm -f conftest.$ac_ext
3336 EXEEXT=$ac_cv_exeext
3337 ac_exeext=$EXEEXT
3338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3339 /* end confdefs.h.  */
3340 #include <stdio.h>
3341 int
3342 main ()
3343 {
3344 FILE *f = fopen ("conftest.out", "w");
3345  return ferror (f) || fclose (f) != 0;
3346
3347   ;
3348   return 0;
3349 }
3350 _ACEOF
3351 ac_clean_files="$ac_clean_files conftest.out"
3352 # Check that the compiler produces executables we can run.  If not, either
3353 # the compiler is broken, or we cross compile.
3354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3355 $as_echo_n "checking whether we are cross compiling... " >&6; }
3356 if test "$cross_compiling" != yes; then
3357   { { ac_try="$ac_link"
3358 case "(($ac_try" in
3359   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3360   *) ac_try_echo=$ac_try;;
3361 esac
3362 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3363 $as_echo "$ac_try_echo"; } >&5
3364   (eval "$ac_link") 2>&5
3365   ac_status=$?
3366   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3367   test $ac_status = 0; }
3368   if { ac_try='./conftest$ac_cv_exeext'
3369   { { case "(($ac_try" in
3370   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3371   *) ac_try_echo=$ac_try;;
3372 esac
3373 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3374 $as_echo "$ac_try_echo"; } >&5
3375   (eval "$ac_try") 2>&5
3376   ac_status=$?
3377   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3378   test $ac_status = 0; }; }; then
3379     cross_compiling=no
3380   else
3381     if test "$cross_compiling" = maybe; then
3382         cross_compiling=yes
3383     else
3384         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3385 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3386 as_fn_error $? "cannot run C compiled programs.
3387 If you meant to cross compile, use \`--host'.
3388 See \`config.log' for more details" "$LINENO" 5; }
3389     fi
3390   fi
3391 fi
3392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3393 $as_echo "$cross_compiling" >&6; }
3394
3395 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3396 ac_clean_files=$ac_clean_files_save
3397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3398 $as_echo_n "checking for suffix of object files... " >&6; }
3399 if ${ac_cv_objext+:} false; then :
3400   $as_echo_n "(cached) " >&6
3401 else
3402   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3403 /* end confdefs.h.  */
3404
3405 int
3406 main ()
3407 {
3408
3409   ;
3410   return 0;
3411 }
3412 _ACEOF
3413 rm -f conftest.o conftest.obj
3414 if { { ac_try="$ac_compile"
3415 case "(($ac_try" in
3416   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3417   *) ac_try_echo=$ac_try;;
3418 esac
3419 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3420 $as_echo "$ac_try_echo"; } >&5
3421   (eval "$ac_compile") 2>&5
3422   ac_status=$?
3423   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3424   test $ac_status = 0; }; then :
3425   for ac_file in conftest.o conftest.obj conftest.*; do
3426   test -f "$ac_file" || continue;
3427   case $ac_file in
3428     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3429     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3430        break;;
3431   esac
3432 done
3433 else
3434   $as_echo "$as_me: failed program was:" >&5
3435 sed 's/^/| /' conftest.$ac_ext >&5
3436
3437 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3438 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3439 as_fn_error $? "cannot compute suffix of object files: cannot compile
3440 See \`config.log' for more details" "$LINENO" 5; }
3441 fi
3442 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3443 fi
3444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3445 $as_echo "$ac_cv_objext" >&6; }
3446 OBJEXT=$ac_cv_objext
3447 ac_objext=$OBJEXT
3448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3449 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3450 if ${ac_cv_c_compiler_gnu+:} false; then :
3451   $as_echo_n "(cached) " >&6
3452 else
3453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3454 /* end confdefs.h.  */
3455
3456 int
3457 main ()
3458 {
3459 #ifndef __GNUC__
3460        choke me
3461 #endif
3462
3463   ;
3464   return 0;
3465 }
3466 _ACEOF
3467 if ac_fn_c_try_compile "$LINENO"; then :
3468   ac_compiler_gnu=yes
3469 else
3470   ac_compiler_gnu=no
3471 fi
3472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3473 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3474
3475 fi
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3477 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3478 if test $ac_compiler_gnu = yes; then
3479   GCC=yes
3480 else
3481   GCC=
3482 fi
3483 ac_test_CFLAGS=${CFLAGS+set}
3484 ac_save_CFLAGS=$CFLAGS
3485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3486 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3487 if ${ac_cv_prog_cc_g+:} false; then :
3488   $as_echo_n "(cached) " >&6
3489 else
3490   ac_save_c_werror_flag=$ac_c_werror_flag
3491    ac_c_werror_flag=yes
3492    ac_cv_prog_cc_g=no
3493    CFLAGS="-g"
3494    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3495 /* end confdefs.h.  */
3496
3497 int
3498 main ()
3499 {
3500
3501   ;
3502   return 0;
3503 }
3504 _ACEOF
3505 if ac_fn_c_try_compile "$LINENO"; then :
3506   ac_cv_prog_cc_g=yes
3507 else
3508   CFLAGS=""
3509       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3510 /* end confdefs.h.  */
3511
3512 int
3513 main ()
3514 {
3515
3516   ;
3517   return 0;
3518 }
3519 _ACEOF
3520 if ac_fn_c_try_compile "$LINENO"; then :
3521
3522 else
3523   ac_c_werror_flag=$ac_save_c_werror_flag
3524          CFLAGS="-g"
3525          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3526 /* end confdefs.h.  */
3527
3528 int
3529 main ()
3530 {
3531
3532   ;
3533   return 0;
3534 }
3535 _ACEOF
3536 if ac_fn_c_try_compile "$LINENO"; then :
3537   ac_cv_prog_cc_g=yes
3538 fi
3539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3540 fi
3541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3542 fi
3543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3544    ac_c_werror_flag=$ac_save_c_werror_flag
3545 fi
3546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3547 $as_echo "$ac_cv_prog_cc_g" >&6; }
3548 if test "$ac_test_CFLAGS" = set; then
3549   CFLAGS=$ac_save_CFLAGS
3550 elif test $ac_cv_prog_cc_g = yes; then
3551   if test "$GCC" = yes; then
3552     CFLAGS="-g -O2"
3553   else
3554     CFLAGS="-g"
3555   fi
3556 else
3557   if test "$GCC" = yes; then
3558     CFLAGS="-O2"
3559   else
3560     CFLAGS=
3561   fi
3562 fi
3563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3564 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3565 if ${ac_cv_prog_cc_c89+:} false; then :
3566   $as_echo_n "(cached) " >&6
3567 else
3568   ac_cv_prog_cc_c89=no
3569 ac_save_CC=$CC
3570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3571 /* end confdefs.h.  */
3572 #include <stdarg.h>
3573 #include <stdio.h>
3574 struct stat;
3575 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3576 struct buf { int x; };
3577 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3578 static char *e (p, i)
3579      char **p;
3580      int i;
3581 {
3582   return p[i];
3583 }
3584 static char *f (char * (*g) (char **, int), char **p, ...)
3585 {
3586   char *s;
3587   va_list v;
3588   va_start (v,p);
3589   s = g (p, va_arg (v,int));
3590   va_end (v);
3591   return s;
3592 }
3593
3594 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3595    function prototypes and stuff, but not '\xHH' hex character constants.
3596    These don't provoke an error unfortunately, instead are silently treated
3597    as 'x'.  The following induces an error, until -std is added to get
3598    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3599    array size at least.  It's necessary to write '\x00'==0 to get something
3600    that's true only with -std.  */
3601 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3602
3603 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3604    inside strings and character constants.  */
3605 #define FOO(x) 'x'
3606 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3607
3608 int test (int i, double x);
3609 struct s1 {int (*f) (int a);};
3610 struct s2 {int (*f) (double a);};
3611 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3612 int argc;
3613 char **argv;
3614 int
3615 main ()
3616 {
3617 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3618   ;
3619   return 0;
3620 }
3621 _ACEOF
3622 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3623         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3624 do
3625   CC="$ac_save_CC $ac_arg"
3626   if ac_fn_c_try_compile "$LINENO"; then :
3627   ac_cv_prog_cc_c89=$ac_arg
3628 fi
3629 rm -f core conftest.err conftest.$ac_objext
3630   test "x$ac_cv_prog_cc_c89" != "xno" && break
3631 done
3632 rm -f conftest.$ac_ext
3633 CC=$ac_save_CC
3634
3635 fi
3636 # AC_CACHE_VAL
3637 case "x$ac_cv_prog_cc_c89" in
3638   x)
3639     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3640 $as_echo "none needed" >&6; } ;;
3641   xno)
3642     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3643 $as_echo "unsupported" >&6; } ;;
3644   *)
3645     CC="$CC $ac_cv_prog_cc_c89"
3646     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3647 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3648 esac
3649 if test "x$ac_cv_prog_cc_c89" != xno; then :
3650
3651 fi
3652
3653 ac_ext=c
3654 ac_cpp='$CPP $CPPFLAGS'
3655 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3656 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3657 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3658
3659
3660 ac_ext=c
3661 ac_cpp='$CPP $CPPFLAGS'
3662 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3663 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3664 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3666 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3667 # On Suns, sometimes $CPP names a directory.
3668 if test -n "$CPP" && test -d "$CPP"; then
3669   CPP=
3670 fi
3671 if test -z "$CPP"; then
3672   if ${ac_cv_prog_CPP+:} false; then :
3673   $as_echo_n "(cached) " >&6
3674 else
3675       # Double quotes because CPP needs to be expanded
3676     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3677     do
3678       ac_preproc_ok=false
3679 for ac_c_preproc_warn_flag in '' yes
3680 do
3681   # Use a header file that comes with gcc, so configuring glibc
3682   # with a fresh cross-compiler works.
3683   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3684   # <limits.h> exists even on freestanding compilers.
3685   # On the NeXT, cc -E runs the code through the compiler's parser,
3686   # not just through cpp. "Syntax error" is here to catch this case.
3687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3688 /* end confdefs.h.  */
3689 #ifdef __STDC__
3690 # include <limits.h>
3691 #else
3692 # include <assert.h>
3693 #endif
3694                      Syntax error
3695 _ACEOF
3696 if ac_fn_c_try_cpp "$LINENO"; then :
3697
3698 else
3699   # Broken: fails on valid input.
3700 continue
3701 fi
3702 rm -f conftest.err conftest.i conftest.$ac_ext
3703
3704   # OK, works on sane cases.  Now check whether nonexistent headers
3705   # can be detected and how.
3706   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3707 /* end confdefs.h.  */
3708 #include <ac_nonexistent.h>
3709 _ACEOF
3710 if ac_fn_c_try_cpp "$LINENO"; then :
3711   # Broken: success on invalid input.
3712 continue
3713 else
3714   # Passes both tests.
3715 ac_preproc_ok=:
3716 break
3717 fi
3718 rm -f conftest.err conftest.i conftest.$ac_ext
3719
3720 done
3721 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3722 rm -f conftest.i conftest.err conftest.$ac_ext
3723 if $ac_preproc_ok; then :
3724   break
3725 fi
3726
3727     done
3728     ac_cv_prog_CPP=$CPP
3729
3730 fi
3731   CPP=$ac_cv_prog_CPP
3732 else
3733   ac_cv_prog_CPP=$CPP
3734 fi
3735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3736 $as_echo "$CPP" >&6; }
3737 ac_preproc_ok=false
3738 for ac_c_preproc_warn_flag in '' yes
3739 do
3740   # Use a header file that comes with gcc, so configuring glibc
3741   # with a fresh cross-compiler works.
3742   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3743   # <limits.h> exists even on freestanding compilers.
3744   # On the NeXT, cc -E runs the code through the compiler's parser,
3745   # not just through cpp. "Syntax error" is here to catch this case.
3746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3747 /* end confdefs.h.  */
3748 #ifdef __STDC__
3749 # include <limits.h>
3750 #else
3751 # include <assert.h>
3752 #endif
3753                      Syntax error
3754 _ACEOF
3755 if ac_fn_c_try_cpp "$LINENO"; then :
3756
3757 else
3758   # Broken: fails on valid input.
3759 continue
3760 fi
3761 rm -f conftest.err conftest.i conftest.$ac_ext
3762
3763   # OK, works on sane cases.  Now check whether nonexistent headers
3764   # can be detected and how.
3765   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3766 /* end confdefs.h.  */
3767 #include <ac_nonexistent.h>
3768 _ACEOF
3769 if ac_fn_c_try_cpp "$LINENO"; then :
3770   # Broken: success on invalid input.
3771 continue
3772 else
3773   # Passes both tests.
3774 ac_preproc_ok=:
3775 break
3776 fi
3777 rm -f conftest.err conftest.i conftest.$ac_ext
3778
3779 done
3780 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3781 rm -f conftest.i conftest.err conftest.$ac_ext
3782 if $ac_preproc_ok; then :
3783
3784 else
3785   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3786 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3787 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3788 See \`config.log' for more details" "$LINENO" 5; }
3789 fi
3790
3791 ac_ext=c
3792 ac_cpp='$CPP $CPPFLAGS'
3793 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3794 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3795 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3796
3797
3798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3799 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3800 if ${ac_cv_path_GREP+:} false; then :
3801   $as_echo_n "(cached) " >&6
3802 else
3803   if test -z "$GREP"; then
3804   ac_path_GREP_found=false
3805   # Loop through the user's path and test for each of PROGNAME-LIST
3806   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3807 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3808 do
3809   IFS=$as_save_IFS
3810   test -z "$as_dir" && as_dir=.
3811     for ac_prog in grep ggrep; do
3812     for ac_exec_ext in '' $ac_executable_extensions; do
3813       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3814       as_fn_executable_p "$ac_path_GREP" || continue
3815 # Check for GNU ac_path_GREP and select it if it is found.
3816   # Check for GNU $ac_path_GREP
3817 case `"$ac_path_GREP" --version 2>&1` in
3818 *GNU*)
3819   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3820 *)
3821   ac_count=0
3822   $as_echo_n 0123456789 >"conftest.in"
3823   while :
3824   do
3825     cat "conftest.in" "conftest.in" >"conftest.tmp"
3826     mv "conftest.tmp" "conftest.in"
3827     cp "conftest.in" "conftest.nl"
3828     $as_echo 'GREP' >> "conftest.nl"
3829     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3830     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3831     as_fn_arith $ac_count + 1 && ac_count=$as_val
3832     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3833       # Best one so far, save it but keep looking for a better one
3834       ac_cv_path_GREP="$ac_path_GREP"
3835       ac_path_GREP_max=$ac_count
3836     fi
3837     # 10*(2^10) chars as input seems more than enough
3838     test $ac_count -gt 10 && break
3839   done
3840   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3841 esac
3842
3843       $ac_path_GREP_found && break 3
3844     done
3845   done
3846   done
3847 IFS=$as_save_IFS
3848   if test -z "$ac_cv_path_GREP"; then
3849     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3850   fi
3851 else
3852   ac_cv_path_GREP=$GREP
3853 fi
3854
3855 fi
3856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3857 $as_echo "$ac_cv_path_GREP" >&6; }
3858  GREP="$ac_cv_path_GREP"
3859
3860
3861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3862 $as_echo_n "checking for egrep... " >&6; }
3863 if ${ac_cv_path_EGREP+:} false; then :
3864   $as_echo_n "(cached) " >&6
3865 else
3866   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3867    then ac_cv_path_EGREP="$GREP -E"
3868    else
3869      if test -z "$EGREP"; then
3870   ac_path_EGREP_found=false
3871   # Loop through the user's path and test for each of PROGNAME-LIST
3872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3873 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3874 do
3875   IFS=$as_save_IFS
3876   test -z "$as_dir" && as_dir=.
3877     for ac_prog in egrep; do
3878     for ac_exec_ext in '' $ac_executable_extensions; do
3879       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3880       as_fn_executable_p "$ac_path_EGREP" || continue
3881 # Check for GNU ac_path_EGREP and select it if it is found.
3882   # Check for GNU $ac_path_EGREP
3883 case `"$ac_path_EGREP" --version 2>&1` in
3884 *GNU*)
3885   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3886 *)
3887   ac_count=0
3888   $as_echo_n 0123456789 >"conftest.in"
3889   while :
3890   do
3891     cat "conftest.in" "conftest.in" >"conftest.tmp"
3892     mv "conftest.tmp" "conftest.in"
3893     cp "conftest.in" "conftest.nl"
3894     $as_echo 'EGREP' >> "conftest.nl"
3895     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3896     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3897     as_fn_arith $ac_count + 1 && ac_count=$as_val
3898     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3899       # Best one so far, save it but keep looking for a better one
3900       ac_cv_path_EGREP="$ac_path_EGREP"
3901       ac_path_EGREP_max=$ac_count
3902     fi
3903     # 10*(2^10) chars as input seems more than enough
3904     test $ac_count -gt 10 && break
3905   done
3906   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3907 esac
3908
3909       $ac_path_EGREP_found && break 3
3910     done
3911   done
3912   done
3913 IFS=$as_save_IFS
3914   if test -z "$ac_cv_path_EGREP"; then
3915     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3916   fi
3917 else
3918   ac_cv_path_EGREP=$EGREP
3919 fi
3920
3921    fi
3922 fi
3923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3924 $as_echo "$ac_cv_path_EGREP" >&6; }
3925  EGREP="$ac_cv_path_EGREP"
3926
3927
3928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3929 $as_echo_n "checking for ANSI C header files... " >&6; }
3930 if ${ac_cv_header_stdc+:} false; then :
3931   $as_echo_n "(cached) " >&6
3932 else
3933   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3934 /* end confdefs.h.  */
3935 #include <stdlib.h>
3936 #include <stdarg.h>
3937 #include <string.h>
3938 #include <float.h>
3939
3940 int
3941 main ()
3942 {
3943
3944   ;
3945   return 0;
3946 }
3947 _ACEOF
3948 if ac_fn_c_try_compile "$LINENO"; then :
3949   ac_cv_header_stdc=yes
3950 else
3951   ac_cv_header_stdc=no
3952 fi
3953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3954
3955 if test $ac_cv_header_stdc = yes; then
3956   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3957   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3958 /* end confdefs.h.  */
3959 #include <string.h>
3960
3961 _ACEOF
3962 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3963   $EGREP "memchr" >/dev/null 2>&1; then :
3964
3965 else
3966   ac_cv_header_stdc=no
3967 fi
3968 rm -f conftest*
3969
3970 fi
3971
3972 if test $ac_cv_header_stdc = yes; then
3973   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3975 /* end confdefs.h.  */
3976 #include <stdlib.h>
3977
3978 _ACEOF
3979 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3980   $EGREP "free" >/dev/null 2>&1; then :
3981
3982 else
3983   ac_cv_header_stdc=no
3984 fi
3985 rm -f conftest*
3986
3987 fi
3988
3989 if test $ac_cv_header_stdc = yes; then
3990   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3991   if test "$cross_compiling" = yes; then :
3992   :
3993 else
3994   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3995 /* end confdefs.h.  */
3996 #include <ctype.h>
3997 #include <stdlib.h>
3998 #if ((' ' & 0x0FF) == 0x020)
3999 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4000 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4001 #else
4002 # define ISLOWER(c) \
4003                    (('a' <= (c) && (c) <= 'i') \
4004                      || ('j' <= (c) && (c) <= 'r') \
4005                      || ('s' <= (c) && (c) <= 'z'))
4006 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4007 #endif
4008
4009 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4010 int
4011 main ()
4012 {
4013   int i;
4014   for (i = 0; i < 256; i++)
4015     if (XOR (islower (i), ISLOWER (i))
4016         || toupper (i) != TOUPPER (i))
4017       return 2;
4018   return 0;
4019 }
4020 _ACEOF
4021 if ac_fn_c_try_run "$LINENO"; then :
4022
4023 else
4024   ac_cv_header_stdc=no
4025 fi
4026 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4027   conftest.$ac_objext conftest.beam conftest.$ac_ext
4028 fi
4029
4030 fi
4031 fi
4032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4033 $as_echo "$ac_cv_header_stdc" >&6; }
4034 if test $ac_cv_header_stdc = yes; then
4035
4036 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4037
4038 fi
4039
4040 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4041 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4042                   inttypes.h stdint.h unistd.h
4043 do :
4044   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4045 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4046 "
4047 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4048   cat >>confdefs.h <<_ACEOF
4049 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4050 _ACEOF
4051
4052 fi
4053
4054 done
4055
4056
4057
4058   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4059 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4060   MINIX=yes
4061 else
4062   MINIX=
4063 fi
4064
4065
4066   if test "$MINIX" = yes; then
4067
4068 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4069
4070
4071 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4072
4073
4074 $as_echo "#define _MINIX 1" >>confdefs.h
4075
4076   fi
4077
4078
4079   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4080 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4081 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4082   $as_echo_n "(cached) " >&6
4083 else
4084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4085 /* end confdefs.h.  */
4086
4087 #         define __EXTENSIONS__ 1
4088           $ac_includes_default
4089 int
4090 main ()
4091 {
4092
4093   ;
4094   return 0;
4095 }
4096 _ACEOF
4097 if ac_fn_c_try_compile "$LINENO"; then :
4098   ac_cv_safe_to_define___extensions__=yes
4099 else
4100   ac_cv_safe_to_define___extensions__=no
4101 fi
4102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4103 fi
4104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4105 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4106   test $ac_cv_safe_to_define___extensions__ = yes &&
4107     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4108
4109   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4110
4111   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4112
4113   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4114
4115   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4116
4117
4118
4119 if test "$ac_cv_header_minix_config_h" = "yes"; then
4120
4121 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4122
4123 fi
4124
4125 case "$prefix" in
4126         NONE)
4127                 prefix="/usr/local"
4128         ;;
4129 esac
4130 case "$exec_prefix" in
4131         NONE)
4132                 exec_prefix="$prefix"
4133         ;;
4134 esac
4135
4136 # are we on MinGW?
4137 if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
4138 else
4139         if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes"
4140         else on_mingw="no"; fi
4141 fi
4142
4143 #
4144 # Determine configuration file
4145 # the eval is to evaluate shell expansion twice
4146 UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4147
4148 UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4149
4150 UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4151
4152 if test $on_mingw = "no"; then
4153   ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4154 else
4155   ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4156 fi
4157
4158 # Check whether --with-conf_file was given.
4159 if test "${with_conf_file+set}" = set; then :
4160   withval=$with_conf_file; ub_conf_file="$withval"
4161 fi
4162
4163
4164 hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4165
4166
4167 cat >>confdefs.h <<_ACEOF
4168 #define CONFIGFILE "$hdr_config"
4169 _ACEOF
4170
4171 ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4172 $as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4173          X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4174          X"$ub_conf_file" : 'X\(//\)$' \| \
4175          X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4176 $as_echo X"$ub_conf_file" |
4177     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4178             s//\1/
4179             q
4180           }
4181           /^X\(\/\/\)[^/].*/{
4182             s//\1/
4183             q
4184           }
4185           /^X\(\/\/\)$/{
4186             s//\1/
4187             q
4188           }
4189           /^X\(\/\).*/{
4190             s//\1/
4191             q
4192           }
4193           s/.*/./; q'`
4194
4195
4196 # Determine run, chroot directory and pidfile locations
4197
4198 # Check whether --with-run-dir was given.
4199 if test "${with_run_dir+set}" = set; then :
4200   withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4201 else
4202   if test $on_mingw = no; then
4203     UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4204 else
4205     UNBOUND_RUN_DIR=""
4206 fi
4207
4208 fi
4209
4210
4211 hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4212
4213
4214 cat >>confdefs.h <<_ACEOF
4215 #define RUN_DIR "$hdr_run"
4216 _ACEOF
4217
4218
4219
4220 # Check whether --with-chroot-dir was given.
4221 if test "${with_chroot_dir+set}" = set; then :
4222   withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4223 else
4224   if test $on_mingw = no; then
4225     UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4226 else
4227     UNBOUND_CHROOT_DIR=""
4228 fi
4229
4230 fi
4231
4232
4233 hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4234
4235
4236 cat >>confdefs.h <<_ACEOF
4237 #define CHROOT_DIR "$hdr_chroot"
4238 _ACEOF
4239
4240
4241
4242 # Check whether --with-share-dir was given.
4243 if test "${with_share_dir+set}" = set; then :
4244   withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4245 else
4246   UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4247 fi
4248
4249
4250
4251 cat >>confdefs.h <<_ACEOF
4252 #define SHARE_DIR "$UNBOUND_SHARE_DIR"
4253 _ACEOF
4254
4255
4256
4257 # Check whether --with-pidfile was given.
4258 if test "${with_pidfile+set}" = set; then :
4259   withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4260 else
4261   if test $on_mingw = no; then
4262     UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4263 else
4264     UNBOUND_PIDFILE=""
4265 fi
4266
4267 fi
4268
4269
4270 hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4271
4272
4273 cat >>confdefs.h <<_ACEOF
4274 #define PIDFILE "$hdr_pid"
4275 _ACEOF
4276
4277
4278
4279 # Check whether --with-rootkey-file was given.
4280 if test "${with_rootkey_file+set}" = set; then :
4281   withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4282 else
4283   if test $on_mingw = no; then
4284     UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4285 else
4286     UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4287 fi
4288
4289 fi
4290
4291
4292 hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4293
4294
4295 cat >>confdefs.h <<_ACEOF
4296 #define ROOT_ANCHOR_FILE "$hdr_rkey"
4297 _ACEOF
4298
4299
4300
4301 # Check whether --with-rootcert-file was given.
4302 if test "${with_rootcert_file+set}" = set; then :
4303   withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4304 else
4305   if test $on_mingw = no; then
4306     UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4307 else
4308     UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4309 fi
4310
4311 fi
4312
4313
4314 hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4315
4316
4317 cat >>confdefs.h <<_ACEOF
4318 #define ROOT_CERT_FILE "$hdr_rpem"
4319 _ACEOF
4320
4321
4322
4323 # Check whether --with-username was given.
4324 if test "${with_username+set}" = set; then :
4325   withval=$with_username; UNBOUND_USERNAME="$withval"
4326 else
4327   UNBOUND_USERNAME="unbound"
4328 fi
4329
4330
4331
4332 cat >>confdefs.h <<_ACEOF
4333 #define UB_USERNAME "$UNBOUND_USERNAME"
4334 _ACEOF
4335
4336
4337
4338 $as_echo "#define WINVER 0x0502" >>confdefs.h
4339
4340 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/' `
4341
4342
4343 cat >>confdefs.h <<_ACEOF
4344 #define RSRC_PACKAGE_VERSION $wnvs
4345 _ACEOF
4346
4347
4348 # Checks for typedefs, structures, and compiler characteristics.
4349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4350 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4351 if ${ac_cv_c_const+:} false; then :
4352   $as_echo_n "(cached) " >&6
4353 else
4354   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4355 /* end confdefs.h.  */
4356
4357 int
4358 main ()
4359 {
4360
4361 #ifndef __cplusplus
4362   /* Ultrix mips cc rejects this sort of thing.  */
4363   typedef int charset[2];
4364   const charset cs = { 0, 0 };
4365   /* SunOS 4.1.1 cc rejects this.  */
4366   char const *const *pcpcc;
4367   char **ppc;
4368   /* NEC SVR4.0.2 mips cc rejects this.  */
4369   struct point {int x, y;};
4370   static struct point const zero = {0,0};
4371   /* AIX XL C 1.02.0.0 rejects this.
4372      It does not let you subtract one const X* pointer from another in
4373      an arm of an if-expression whose if-part is not a constant
4374      expression */
4375   const char *g = "string";
4376   pcpcc = &g + (g ? g-g : 0);
4377   /* HPUX 7.0 cc rejects these. */
4378   ++pcpcc;
4379   ppc = (char**) pcpcc;
4380   pcpcc = (char const *const *) ppc;
4381   { /* SCO 3.2v4 cc rejects this sort of thing.  */
4382     char tx;
4383     char *t = &tx;
4384     char const *s = 0 ? (char *) 0 : (char const *) 0;
4385
4386     *t++ = 0;
4387     if (s) return 0;
4388   }
4389   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4390     int x[] = {25, 17};
4391     const int *foo = &x[0];
4392     ++foo;
4393   }
4394   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4395     typedef const int *iptr;
4396     iptr p = 0;
4397     ++p;
4398   }
4399   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4400        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4401     struct s { int j; const int *ap[3]; } bx;
4402     struct s *b = &bx; b->j = 5;
4403   }
4404   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4405     const int foo = 10;
4406     if (!foo) return 0;
4407   }
4408   return !cs[0] && !zero.x;
4409 #endif
4410
4411   ;
4412   return 0;
4413 }
4414 _ACEOF
4415 if ac_fn_c_try_compile "$LINENO"; then :
4416   ac_cv_c_const=yes
4417 else
4418   ac_cv_c_const=no
4419 fi
4420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4421 fi
4422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4423 $as_echo "$ac_cv_c_const" >&6; }
4424 if test $ac_cv_c_const = no; then
4425
4426 $as_echo "#define const /**/" >>confdefs.h
4427
4428 fi
4429
4430 ac_ext=c
4431 ac_cpp='$CPP $CPPFLAGS'
4432 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4433 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4434 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4435
4436 # allow user to override the -g -O2 flags.
4437 default_cflags=no
4438 if test "x$CFLAGS" = "x" ; then
4439
4440
4441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4442 $as_echo_n "checking whether $CC supports -g... " >&6; }
4443 cache=`echo g | sed 'y%.=/+-%___p_%'`
4444 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4445   $as_echo_n "(cached) " >&6
4446 else
4447
4448 echo 'void f(void){}' >conftest.c
4449 if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4450 eval "cv_prog_cc_flag_$cache=yes"
4451 else
4452 eval "cv_prog_cc_flag_$cache=no"
4453 fi
4454 rm -f conftest conftest.o conftest.c
4455
4456 fi
4457
4458 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4460 $as_echo "yes" >&6; }
4461 :
4462 CFLAGS="$CFLAGS -g"
4463 else
4464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4465 $as_echo "no" >&6; }
4466 :
4467
4468 fi
4469
4470
4471
4472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4473 $as_echo_n "checking whether $CC supports -O2... " >&6; }
4474 cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4475 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4476   $as_echo_n "(cached) " >&6
4477 else
4478
4479 echo 'void f(void){}' >conftest.c
4480 if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4481 eval "cv_prog_cc_flag_$cache=yes"
4482 else
4483 eval "cv_prog_cc_flag_$cache=no"
4484 fi
4485 rm -f conftest conftest.o conftest.c
4486
4487 fi
4488
4489 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4491 $as_echo "yes" >&6; }
4492 :
4493 CFLAGS="$CFLAGS -O2"
4494 else
4495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4496 $as_echo "no" >&6; }
4497 :
4498
4499 fi
4500
4501 default_cflags=yes
4502 fi
4503 ac_ext=c
4504 ac_cpp='$CPP $CPPFLAGS'
4505 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4506 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4507 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4508 if test -n "$ac_tool_prefix"; then
4509   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4510 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4512 $as_echo_n "checking for $ac_word... " >&6; }
4513 if ${ac_cv_prog_CC+:} false; then :
4514   $as_echo_n "(cached) " >&6
4515 else
4516   if test -n "$CC"; then
4517   ac_cv_prog_CC="$CC" # Let the user override the test.
4518 else
4519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4520 for as_dir in $PATH
4521 do
4522   IFS=$as_save_IFS
4523   test -z "$as_dir" && as_dir=.
4524     for ac_exec_ext in '' $ac_executable_extensions; do
4525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4526     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4528     break 2
4529   fi
4530 done
4531   done
4532 IFS=$as_save_IFS
4533
4534 fi
4535 fi
4536 CC=$ac_cv_prog_CC
4537 if test -n "$CC"; then
4538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4539 $as_echo "$CC" >&6; }
4540 else
4541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4542 $as_echo "no" >&6; }
4543 fi
4544
4545
4546 fi
4547 if test -z "$ac_cv_prog_CC"; then
4548   ac_ct_CC=$CC
4549   # Extract the first word of "gcc", so it can be a program name with args.
4550 set dummy gcc; ac_word=$2
4551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4552 $as_echo_n "checking for $ac_word... " >&6; }
4553 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4554   $as_echo_n "(cached) " >&6
4555 else
4556   if test -n "$ac_ct_CC"; then
4557   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4558 else
4559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4560 for as_dir in $PATH
4561 do
4562   IFS=$as_save_IFS
4563   test -z "$as_dir" && as_dir=.
4564     for ac_exec_ext in '' $ac_executable_extensions; do
4565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4566     ac_cv_prog_ac_ct_CC="gcc"
4567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4568     break 2
4569   fi
4570 done
4571   done
4572 IFS=$as_save_IFS
4573
4574 fi
4575 fi
4576 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4577 if test -n "$ac_ct_CC"; then
4578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4579 $as_echo "$ac_ct_CC" >&6; }
4580 else
4581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4582 $as_echo "no" >&6; }
4583 fi
4584
4585   if test "x$ac_ct_CC" = x; then
4586     CC=""
4587   else
4588     case $cross_compiling:$ac_tool_warned in
4589 yes:)
4590 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4591 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4592 ac_tool_warned=yes ;;
4593 esac
4594     CC=$ac_ct_CC
4595   fi
4596 else
4597   CC="$ac_cv_prog_CC"
4598 fi
4599
4600 if test -z "$CC"; then
4601           if test -n "$ac_tool_prefix"; then
4602     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4603 set dummy ${ac_tool_prefix}cc; ac_word=$2
4604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4605 $as_echo_n "checking for $ac_word... " >&6; }
4606 if ${ac_cv_prog_CC+:} false; then :
4607   $as_echo_n "(cached) " >&6
4608 else
4609   if test -n "$CC"; then
4610   ac_cv_prog_CC="$CC" # Let the user override the test.
4611 else
4612 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4613 for as_dir in $PATH
4614 do
4615   IFS=$as_save_IFS
4616   test -z "$as_dir" && as_dir=.
4617     for ac_exec_ext in '' $ac_executable_extensions; do
4618   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4619     ac_cv_prog_CC="${ac_tool_prefix}cc"
4620     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4621     break 2
4622   fi
4623 done
4624   done
4625 IFS=$as_save_IFS
4626
4627 fi
4628 fi
4629 CC=$ac_cv_prog_CC
4630 if test -n "$CC"; then
4631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4632 $as_echo "$CC" >&6; }
4633 else
4634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4635 $as_echo "no" >&6; }
4636 fi
4637
4638
4639   fi
4640 fi
4641 if test -z "$CC"; then
4642   # Extract the first word of "cc", so it can be a program name with args.
4643 set dummy cc; ac_word=$2
4644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4645 $as_echo_n "checking for $ac_word... " >&6; }
4646 if ${ac_cv_prog_CC+:} false; then :
4647   $as_echo_n "(cached) " >&6
4648 else
4649   if test -n "$CC"; then
4650   ac_cv_prog_CC="$CC" # Let the user override the test.
4651 else
4652   ac_prog_rejected=no
4653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4654 for as_dir in $PATH
4655 do
4656   IFS=$as_save_IFS
4657   test -z "$as_dir" && as_dir=.
4658     for ac_exec_ext in '' $ac_executable_extensions; do
4659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4660     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4661        ac_prog_rejected=yes
4662        continue
4663      fi
4664     ac_cv_prog_CC="cc"
4665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666     break 2
4667   fi
4668 done
4669   done
4670 IFS=$as_save_IFS
4671
4672 if test $ac_prog_rejected = yes; then
4673   # We found a bogon in the path, so make sure we never use it.
4674   set dummy $ac_cv_prog_CC
4675   shift
4676   if test $# != 0; then
4677     # We chose a different compiler from the bogus one.
4678     # However, it has the same basename, so the bogon will be chosen
4679     # first if we set CC to just the basename; use the full file name.
4680     shift
4681     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4682   fi
4683 fi
4684 fi
4685 fi
4686 CC=$ac_cv_prog_CC
4687 if test -n "$CC"; then
4688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4689 $as_echo "$CC" >&6; }
4690 else
4691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4692 $as_echo "no" >&6; }
4693 fi
4694
4695
4696 fi
4697 if test -z "$CC"; then
4698   if test -n "$ac_tool_prefix"; then
4699   for ac_prog in cl.exe
4700   do
4701     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4702 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4704 $as_echo_n "checking for $ac_word... " >&6; }
4705 if ${ac_cv_prog_CC+:} false; then :
4706   $as_echo_n "(cached) " >&6
4707 else
4708   if test -n "$CC"; then
4709   ac_cv_prog_CC="$CC" # Let the user override the test.
4710 else
4711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4712 for as_dir in $PATH
4713 do
4714   IFS=$as_save_IFS
4715   test -z "$as_dir" && as_dir=.
4716     for ac_exec_ext in '' $ac_executable_extensions; do
4717   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4718     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4719     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4720     break 2
4721   fi
4722 done
4723   done
4724 IFS=$as_save_IFS
4725
4726 fi
4727 fi
4728 CC=$ac_cv_prog_CC
4729 if test -n "$CC"; then
4730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4731 $as_echo "$CC" >&6; }
4732 else
4733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4734 $as_echo "no" >&6; }
4735 fi
4736
4737
4738     test -n "$CC" && break
4739   done
4740 fi
4741 if test -z "$CC"; then
4742   ac_ct_CC=$CC
4743   for ac_prog in cl.exe
4744 do
4745   # Extract the first word of "$ac_prog", so it can be a program name with args.
4746 set dummy $ac_prog; ac_word=$2
4747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4748 $as_echo_n "checking for $ac_word... " >&6; }
4749 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4750   $as_echo_n "(cached) " >&6
4751 else
4752   if test -n "$ac_ct_CC"; then
4753   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4754 else
4755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4756 for as_dir in $PATH
4757 do
4758   IFS=$as_save_IFS
4759   test -z "$as_dir" && as_dir=.
4760     for ac_exec_ext in '' $ac_executable_extensions; do
4761   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4762     ac_cv_prog_ac_ct_CC="$ac_prog"
4763     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4764     break 2
4765   fi
4766 done
4767   done
4768 IFS=$as_save_IFS
4769
4770 fi
4771 fi
4772 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4773 if test -n "$ac_ct_CC"; then
4774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4775 $as_echo "$ac_ct_CC" >&6; }
4776 else
4777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4778 $as_echo "no" >&6; }
4779 fi
4780
4781
4782   test -n "$ac_ct_CC" && break
4783 done
4784
4785   if test "x$ac_ct_CC" = x; then
4786     CC=""
4787   else
4788     case $cross_compiling:$ac_tool_warned in
4789 yes:)
4790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4791 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4792 ac_tool_warned=yes ;;
4793 esac
4794     CC=$ac_ct_CC
4795   fi
4796 fi
4797
4798 fi
4799
4800
4801 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4802 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4803 as_fn_error $? "no acceptable C compiler found in \$PATH
4804 See \`config.log' for more details" "$LINENO" 5; }
4805
4806 # Provide some information about the compiler.
4807 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4808 set X $ac_compile
4809 ac_compiler=$2
4810 for ac_option in --version -v -V -qversion; do
4811   { { ac_try="$ac_compiler $ac_option >&5"
4812 case "(($ac_try" in
4813   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4814   *) ac_try_echo=$ac_try;;
4815 esac
4816 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4817 $as_echo "$ac_try_echo"; } >&5
4818   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4819   ac_status=$?
4820   if test -s conftest.err; then
4821     sed '10a\
4822 ... rest of stderr output deleted ...
4823          10q' conftest.err >conftest.er1
4824     cat conftest.er1 >&5
4825   fi
4826   rm -f conftest.er1 conftest.err
4827   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4828   test $ac_status = 0; }
4829 done
4830
4831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4832 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4833 if ${ac_cv_c_compiler_gnu+:} false; then :
4834   $as_echo_n "(cached) " >&6
4835 else
4836   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4837 /* end confdefs.h.  */
4838
4839 int
4840 main ()
4841 {
4842 #ifndef __GNUC__
4843        choke me
4844 #endif
4845
4846   ;
4847   return 0;
4848 }
4849 _ACEOF
4850 if ac_fn_c_try_compile "$LINENO"; then :
4851   ac_compiler_gnu=yes
4852 else
4853   ac_compiler_gnu=no
4854 fi
4855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4856 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4857
4858 fi
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4860 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4861 if test $ac_compiler_gnu = yes; then
4862   GCC=yes
4863 else
4864   GCC=
4865 fi
4866 ac_test_CFLAGS=${CFLAGS+set}
4867 ac_save_CFLAGS=$CFLAGS
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4869 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4870 if ${ac_cv_prog_cc_g+:} false; then :
4871   $as_echo_n "(cached) " >&6
4872 else
4873   ac_save_c_werror_flag=$ac_c_werror_flag
4874    ac_c_werror_flag=yes
4875    ac_cv_prog_cc_g=no
4876    CFLAGS="-g"
4877    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4878 /* end confdefs.h.  */
4879
4880 int
4881 main ()
4882 {
4883
4884   ;
4885   return 0;
4886 }
4887 _ACEOF
4888 if ac_fn_c_try_compile "$LINENO"; then :
4889   ac_cv_prog_cc_g=yes
4890 else
4891   CFLAGS=""
4892       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4893 /* end confdefs.h.  */
4894
4895 int
4896 main ()
4897 {
4898
4899   ;
4900   return 0;
4901 }
4902 _ACEOF
4903 if ac_fn_c_try_compile "$LINENO"; then :
4904
4905 else
4906   ac_c_werror_flag=$ac_save_c_werror_flag
4907          CFLAGS="-g"
4908          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4909 /* end confdefs.h.  */
4910
4911 int
4912 main ()
4913 {
4914
4915   ;
4916   return 0;
4917 }
4918 _ACEOF
4919 if ac_fn_c_try_compile "$LINENO"; then :
4920   ac_cv_prog_cc_g=yes
4921 fi
4922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4923 fi
4924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4925 fi
4926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4927    ac_c_werror_flag=$ac_save_c_werror_flag
4928 fi
4929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4930 $as_echo "$ac_cv_prog_cc_g" >&6; }
4931 if test "$ac_test_CFLAGS" = set; then
4932   CFLAGS=$ac_save_CFLAGS
4933 elif test $ac_cv_prog_cc_g = yes; then
4934   if test "$GCC" = yes; then
4935     CFLAGS="-g -O2"
4936   else
4937     CFLAGS="-g"
4938   fi
4939 else
4940   if test "$GCC" = yes; then
4941     CFLAGS="-O2"
4942   else
4943     CFLAGS=
4944   fi
4945 fi
4946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4947 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4948 if ${ac_cv_prog_cc_c89+:} false; then :
4949   $as_echo_n "(cached) " >&6
4950 else
4951   ac_cv_prog_cc_c89=no
4952 ac_save_CC=$CC
4953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4954 /* end confdefs.h.  */
4955 #include <stdarg.h>
4956 #include <stdio.h>
4957 struct stat;
4958 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4959 struct buf { int x; };
4960 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4961 static char *e (p, i)
4962      char **p;
4963      int i;
4964 {
4965   return p[i];
4966 }
4967 static char *f (char * (*g) (char **, int), char **p, ...)
4968 {
4969   char *s;
4970   va_list v;
4971   va_start (v,p);
4972   s = g (p, va_arg (v,int));
4973   va_end (v);
4974   return s;
4975 }
4976
4977 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4978    function prototypes and stuff, but not '\xHH' hex character constants.
4979    These don't provoke an error unfortunately, instead are silently treated
4980    as 'x'.  The following induces an error, until -std is added to get
4981    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4982    array size at least.  It's necessary to write '\x00'==0 to get something
4983    that's true only with -std.  */
4984 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4985
4986 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4987    inside strings and character constants.  */
4988 #define FOO(x) 'x'
4989 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4990
4991 int test (int i, double x);
4992 struct s1 {int (*f) (int a);};
4993 struct s2 {int (*f) (double a);};
4994 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4995 int argc;
4996 char **argv;
4997 int
4998 main ()
4999 {
5000 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5001   ;
5002   return 0;
5003 }
5004 _ACEOF
5005 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5006         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5007 do
5008   CC="$ac_save_CC $ac_arg"
5009   if ac_fn_c_try_compile "$LINENO"; then :
5010   ac_cv_prog_cc_c89=$ac_arg
5011 fi
5012 rm -f core conftest.err conftest.$ac_objext
5013   test "x$ac_cv_prog_cc_c89" != "xno" && break
5014 done
5015 rm -f conftest.$ac_ext
5016 CC=$ac_save_CC
5017
5018 fi
5019 # AC_CACHE_VAL
5020 case "x$ac_cv_prog_cc_c89" in
5021   x)
5022     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5023 $as_echo "none needed" >&6; } ;;
5024   xno)
5025     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5026 $as_echo "unsupported" >&6; } ;;
5027   *)
5028     CC="$CC $ac_cv_prog_cc_c89"
5029     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5030 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5031 esac
5032 if test "x$ac_cv_prog_cc_c89" != xno; then :
5033
5034 fi
5035
5036 ac_ext=c
5037 ac_cpp='$CPP $CPPFLAGS'
5038 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5039 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5040 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5041
5042
5043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5044 $as_echo_n "checking $CC dependency flag... " >&6; }
5045 echo 'void f(){}' >conftest.c
5046 if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5047         DEPFLAG="-MM"
5048 else
5049   if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5050         DEPFLAG="-xM1"
5051   else
5052         DEPFLAG="-MM"  # dunno do something
5053   fi
5054 fi
5055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5056 $as_echo "$DEPFLAG" >&6; }
5057 rm -f conftest.c
5058
5059
5060
5061
5062
5063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5064 $as_echo_n "checking whether $CC supports -Werror... " >&6; }
5065 cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5066 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5067   $as_echo_n "(cached) " >&6
5068 else
5069
5070 echo 'void f(void){}' >conftest.c
5071 if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5072 eval "cv_prog_cc_flag_$cache=yes"
5073 else
5074 eval "cv_prog_cc_flag_$cache=no"
5075 fi
5076 rm -f conftest conftest.o conftest.c
5077
5078 fi
5079
5080 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5082 $as_echo "yes" >&6; }
5083 :
5084 ERRFLAG="-Werror"
5085 else
5086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5087 $as_echo "no" >&6; }
5088 :
5089 ERRFLAG="-errwarn"
5090 fi
5091
5092
5093
5094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5095 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5096 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5097 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5098   $as_echo_n "(cached) " >&6
5099 else
5100
5101 echo 'void f(void){}' >conftest.c
5102 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5103 eval "cv_prog_cc_flag_$cache=yes"
5104 else
5105 eval "cv_prog_cc_flag_$cache=no"
5106 fi
5107 rm -f conftest conftest.o conftest.c
5108
5109 fi
5110
5111 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5113 $as_echo "yes" >&6; }
5114 :
5115 ERRFLAG="$ERRFLAG -Wall"
5116 else
5117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118 $as_echo "no" >&6; }
5119 :
5120 ERRFLAG="$ERRFLAG -errfmt"
5121 fi
5122
5123
5124
5125
5126
5127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5128 $as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5129 cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5130 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5131   $as_echo_n "(cached) " >&6
5132 else
5133
5134 echo 'void f(void){}' >conftest.c
5135 if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5136 eval "cv_prog_cc_flag_$cache=yes"
5137 else
5138 eval "cv_prog_cc_flag_$cache=no"
5139 fi
5140 rm -f conftest conftest.o conftest.c
5141
5142 fi
5143
5144 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5146 $as_echo "yes" >&6; }
5147 :
5148 C99FLAG="-std=c99"
5149 else
5150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5151 $as_echo "no" >&6; }
5152 :
5153
5154 fi
5155
5156
5157
5158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5159 $as_echo_n "checking whether $CC supports -xc99... " >&6; }
5160 cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5161 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5162   $as_echo_n "(cached) " >&6
5163 else
5164
5165 echo 'void f(void){}' >conftest.c
5166 if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5167 eval "cv_prog_cc_flag_$cache=yes"
5168 else
5169 eval "cv_prog_cc_flag_$cache=no"
5170 fi
5171 rm -f conftest conftest.o conftest.c
5172
5173 fi
5174
5175 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5177 $as_echo "yes" >&6; }
5178 :
5179 C99FLAG="-xc99"
5180 else
5181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5182 $as_echo "no" >&6; }
5183 :
5184
5185 fi
5186
5187
5188 for ac_header in getopt.h time.h
5189 do :
5190   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5191 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5192 "
5193 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5194   cat >>confdefs.h <<_ACEOF
5195 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5196 _ACEOF
5197
5198 fi
5199
5200 done
5201
5202
5203
5204
5205
5206 { $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
5207 $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; }
5208 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`
5209 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5210   $as_echo_n "(cached) " >&6
5211 else
5212
5213 echo '
5214 #include "confdefs.h"
5215 #include <stdlib.h>
5216 #include <ctype.h>
5217 #include <sys/time.h>
5218 #ifdef HAVE_TIME_H
5219 #include <time.h>
5220 #endif
5221 #include <unistd.h>
5222 #include <netdb.h>
5223 #ifdef HAVE_GETOPT_H
5224 #include <getopt.h>
5225 #endif
5226
5227 int test() {
5228         int a;
5229         char **opts = NULL;
5230         struct timeval tv;
5231         char *t;
5232         time_t time = 0;
5233         char *buf = NULL;
5234         const char* str = NULL;
5235         struct msghdr msg;
5236         msg.msg_control = 0;
5237         t = ctime_r(&time, buf);
5238         tv.tv_usec = 10;
5239         srandom(32);
5240         a = getopt(2, opts, "a");
5241         a = isascii(32);
5242         str = gai_strerror(0);
5243         if(str && t && tv.tv_usec && msg.msg_control)
5244                 a = 0;
5245         return a;
5246 }
5247 ' > conftest.c
5248 echo 'void f(){}' >>conftest.c
5249 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5250 eval "cv_prog_cc_flag_needed_$cache=no"
5251 else
5252
5253 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
5254 eval "cv_prog_cc_flag_needed_$cache=yes"
5255 else
5256 eval "cv_prog_cc_flag_needed_$cache=fail"
5257 #echo 'Test with flag fails too!'
5258 #cat conftest.c
5259 #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"
5260 #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`
5261 #exit 1
5262 fi
5263
5264 fi
5265 rm -f conftest conftest.c conftest.o
5266
5267 fi
5268
5269 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5271 $as_echo "yes" >&6; }
5272 :
5273 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"
5274 else
5275 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5277 $as_echo "no" >&6; }
5278 #echo 'Test with flag is no!'
5279 #cat conftest.c
5280 #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"
5281 #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`
5282 #exit 1
5283 :
5284
5285 else
5286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5287 $as_echo "failed" >&6; }
5288 :
5289
5290 fi
5291 fi
5292
5293
5294
5295
5296
5297 { $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
5298 $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; }
5299 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`
5300 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5301   $as_echo_n "(cached) " >&6
5302 else
5303
5304 echo '
5305 #include "confdefs.h"
5306 #include <stdlib.h>
5307 #include <ctype.h>
5308 #include <sys/time.h>
5309 #ifdef HAVE_TIME_H
5310 #include <time.h>
5311 #endif
5312 #include <unistd.h>
5313 #include <netdb.h>
5314 #ifdef HAVE_GETOPT_H
5315 #include <getopt.h>
5316 #endif
5317
5318 int test() {
5319         int a;
5320         char **opts = NULL;
5321         struct timeval tv;
5322         char *t;
5323         time_t time = 0;
5324         char *buf = NULL;
5325         const char* str = NULL;
5326         struct msghdr msg;
5327         msg.msg_control = 0;
5328         t = ctime_r(&time, buf);
5329         tv.tv_usec = 10;
5330         srandom(32);
5331         a = getopt(2, opts, "a");
5332         a = isascii(32);
5333         str = gai_strerror(0);
5334         if(str && t && tv.tv_usec && msg.msg_control)
5335                 a = 0;
5336         return a;
5337 }
5338 ' > conftest.c
5339 echo 'void f(){}' >>conftest.c
5340 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5341 eval "cv_prog_cc_flag_needed_$cache=no"
5342 else
5343
5344 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
5345 eval "cv_prog_cc_flag_needed_$cache=yes"
5346 else
5347 eval "cv_prog_cc_flag_needed_$cache=fail"
5348 #echo 'Test with flag fails too!'
5349 #cat conftest.c
5350 #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"
5351 #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`
5352 #exit 1
5353 fi
5354
5355 fi
5356 rm -f conftest conftest.c conftest.o
5357
5358 fi
5359
5360 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5362 $as_echo "yes" >&6; }
5363 :
5364 CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5365 else
5366 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5368 $as_echo "no" >&6; }
5369 #echo 'Test with flag is no!'
5370 #cat conftest.c
5371 #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"
5372 #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`
5373 #exit 1
5374 :
5375
5376 else
5377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5378 $as_echo "failed" >&6; }
5379 :
5380
5381 fi
5382 fi
5383
5384
5385
5386
5387
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5389 $as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5390 cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5391 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5392   $as_echo_n "(cached) " >&6
5393 else
5394
5395 echo '
5396 #include <stdbool.h>
5397 #include <ctype.h>
5398 int test() {
5399         int a = 0;
5400         return a;
5401 }
5402 ' > conftest.c
5403 echo 'void f(){}' >>conftest.c
5404 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5405 eval "cv_prog_cc_flag_needed_$cache=no"
5406 else
5407
5408 if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5409 eval "cv_prog_cc_flag_needed_$cache=yes"
5410 else
5411 eval "cv_prog_cc_flag_needed_$cache=fail"
5412 #echo 'Test with flag fails too!'
5413 #cat conftest.c
5414 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5415 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5416 #exit 1
5417 fi
5418
5419 fi
5420 rm -f conftest conftest.c conftest.o
5421
5422 fi
5423
5424 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5426 $as_echo "yes" >&6; }
5427 :
5428 CFLAGS="$CFLAGS $C99FLAG"
5429 else
5430 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5432 $as_echo "no" >&6; }
5433 #echo 'Test with flag is no!'
5434 #cat conftest.c
5435 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5436 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5437 #exit 1
5438 :
5439
5440 else
5441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5442 $as_echo "failed" >&6; }
5443 :
5444
5445 fi
5446 fi
5447
5448
5449
5450
5451
5452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
5453 $as_echo_n "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
5454 cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
5455 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5456   $as_echo_n "(cached) " >&6
5457 else
5458
5459 echo '
5460 #include <ctype.h>
5461
5462 int test() {
5463         int a;
5464         a = isascii(32);
5465         return a;
5466 }
5467 ' > conftest.c
5468 echo 'void f(){}' >>conftest.c
5469 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5470 eval "cv_prog_cc_flag_needed_$cache=no"
5471 else
5472
5473 if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5474 eval "cv_prog_cc_flag_needed_$cache=yes"
5475 else
5476 eval "cv_prog_cc_flag_needed_$cache=fail"
5477 #echo 'Test with flag fails too!'
5478 #cat conftest.c
5479 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5480 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5481 #exit 1
5482 fi
5483
5484 fi
5485 rm -f conftest conftest.c conftest.o
5486
5487 fi
5488
5489 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5491 $as_echo "yes" >&6; }
5492 :
5493 CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
5494 else
5495 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5497 $as_echo "no" >&6; }
5498 #echo 'Test with flag is no!'
5499 #cat conftest.c
5500 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5501 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5502 #exit 1
5503 :
5504
5505 else
5506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5507 $as_echo "failed" >&6; }
5508 :
5509
5510 fi
5511 fi
5512
5513
5514
5515
5516
5517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5518 $as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5519 cache=_D_GNU_SOURCE
5520 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5521   $as_echo_n "(cached) " >&6
5522 else
5523
5524 echo '
5525 #include <netinet/in.h>
5526
5527 int test() {
5528         struct in6_pktinfo inf;
5529         int a = (int)sizeof(inf);
5530         return a;
5531 }
5532 ' > conftest.c
5533 echo 'void f(){}' >>conftest.c
5534 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5535 eval "cv_prog_cc_flag_needed_$cache=no"
5536 else
5537
5538 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5539 eval "cv_prog_cc_flag_needed_$cache=yes"
5540 else
5541 eval "cv_prog_cc_flag_needed_$cache=fail"
5542 #echo 'Test with flag fails too!'
5543 #cat conftest.c
5544 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5545 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5546 #exit 1
5547 fi
5548
5549 fi
5550 rm -f conftest conftest.c conftest.o
5551
5552 fi
5553
5554 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5556 $as_echo "yes" >&6; }
5557 :
5558 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5559 else
5560 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5562 $as_echo "no" >&6; }
5563 #echo 'Test with flag is no!'
5564 #cat conftest.c
5565 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5566 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5567 #exit 1
5568 :
5569
5570 else
5571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5572 $as_echo "failed" >&6; }
5573 :
5574
5575 fi
5576 fi
5577
5578
5579 # check again for GNU_SOURCE for setresgid. May fail if setresgid
5580 # is not available at all. -D_FRSRESGID is to make this check unique.
5581 # otherwise we would get the previous cached result.
5582
5583
5584
5585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5586 $as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5587 cache=_D_GNU_SOURCE__D_FRSRESGID
5588 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5589   $as_echo_n "(cached) " >&6
5590 else
5591
5592 echo '
5593 #include <unistd.h>
5594
5595 int test() {
5596         int a = setresgid(0,0,0);
5597         a = setresuid(0,0,0);
5598         return a;
5599 }
5600 ' > conftest.c
5601 echo 'void f(){}' >>conftest.c
5602 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5603 eval "cv_prog_cc_flag_needed_$cache=no"
5604 else
5605
5606 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5607 eval "cv_prog_cc_flag_needed_$cache=yes"
5608 else
5609 eval "cv_prog_cc_flag_needed_$cache=fail"
5610 #echo 'Test with flag fails too!'
5611 #cat conftest.c
5612 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5613 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5614 #exit 1
5615 fi
5616
5617 fi
5618 rm -f conftest conftest.c conftest.o
5619
5620 fi
5621
5622 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5624 $as_echo "yes" >&6; }
5625 :
5626 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5627 else
5628 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5630 $as_echo "no" >&6; }
5631 #echo 'Test with flag is no!'
5632 #cat conftest.c
5633 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5634 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5635 #exit 1
5636 :
5637
5638 else
5639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5640 $as_echo "failed" >&6; }
5641 :
5642
5643 fi
5644 fi
5645
5646
5647
5648
5649
5650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5651 $as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5652 cache=_D_POSIX_C_SOURCE_200112
5653 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5654   $as_echo_n "(cached) " >&6
5655 else
5656
5657 echo '
5658 #include "confdefs.h"
5659 #ifdef HAVE_TIME_H
5660 #include <time.h>
5661 #endif
5662 #include <netdb.h>
5663
5664 int test() {
5665         int a = 0;
5666         char *t;
5667         time_t time = 0;
5668         char *buf = NULL;
5669         const char* str = NULL;
5670         t = ctime_r(&time, buf);
5671         str = gai_strerror(0);
5672         if(t && str)
5673                 a = 0;
5674         return a;
5675 }
5676 ' > conftest.c
5677 echo 'void f(){}' >>conftest.c
5678 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5679 eval "cv_prog_cc_flag_needed_$cache=no"
5680 else
5681
5682 if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5683 eval "cv_prog_cc_flag_needed_$cache=yes"
5684 else
5685 eval "cv_prog_cc_flag_needed_$cache=fail"
5686 #echo 'Test with flag fails too!'
5687 #cat conftest.c
5688 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5689 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5690 #exit 1
5691 fi
5692
5693 fi
5694 rm -f conftest conftest.c conftest.o
5695
5696 fi
5697
5698 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5700 $as_echo "yes" >&6; }
5701 :
5702 CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5703 else
5704 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5706 $as_echo "no" >&6; }
5707 #echo 'Test with flag is no!'
5708 #cat conftest.c
5709 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5710 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5711 #exit 1
5712 :
5713
5714 else
5715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5716 $as_echo "failed" >&6; }
5717 :
5718
5719 fi
5720 fi
5721
5722
5723
5724
5725
5726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5727 $as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5728 cache=_D__EXTENSIONS__
5729 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5730   $as_echo_n "(cached) " >&6
5731 else
5732
5733 echo '
5734 #include "confdefs.h"
5735 #include <stdlib.h>
5736 #include <ctype.h>
5737 #include <sys/time.h>
5738 #ifdef HAVE_TIME_H
5739 #include <time.h>
5740 #endif
5741 #include <unistd.h>
5742 #ifdef HAVE_GETOPT_H
5743 #include <getopt.h>
5744 #endif
5745
5746 int test() {
5747         int a;
5748         char **opts = NULL;
5749         struct timeval tv;
5750         tv.tv_usec = 10;
5751         srandom(32);
5752         a = getopt(2, opts, "a");
5753         a = isascii(32);
5754         if(tv.tv_usec)
5755                 a = 0;
5756         return a;
5757 }
5758 ' > conftest.c
5759 echo 'void f(){}' >>conftest.c
5760 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5761 eval "cv_prog_cc_flag_needed_$cache=no"
5762 else
5763
5764 if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5765 eval "cv_prog_cc_flag_needed_$cache=yes"
5766 else
5767 eval "cv_prog_cc_flag_needed_$cache=fail"
5768 #echo 'Test with flag fails too!'
5769 #cat conftest.c
5770 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5771 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5772 #exit 1
5773 fi
5774
5775 fi
5776 rm -f conftest conftest.c conftest.o
5777
5778 fi
5779
5780 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5782 $as_echo "yes" >&6; }
5783 :
5784 CFLAGS="$CFLAGS -D__EXTENSIONS__"
5785 else
5786 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5788 $as_echo "no" >&6; }
5789 #echo 'Test with flag is no!'
5790 #cat conftest.c
5791 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5792 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5793 #exit 1
5794 :
5795
5796 else
5797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5798 $as_echo "failed" >&6; }
5799 :
5800
5801 fi
5802 fi
5803
5804
5805
5806
5807 # debug mode flags warnings
5808 # Check whether --enable-checking was given.
5809 if test "${enable_checking+set}" = set; then :
5810   enableval=$enable_checking;
5811 fi
5812
5813 # Check whether --enable-debug was given.
5814 if test "${enable_debug+set}" = set; then :
5815   enableval=$enable_debug;
5816 fi
5817
5818 if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5819 else debug_enabled="$enable_checking"; fi
5820
5821 case "$debug_enabled" in
5822         yes)
5823
5824
5825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5826 $as_echo_n "checking whether $CC supports -W... " >&6; }
5827 cache=`echo W | sed 'y%.=/+-%___p_%'`
5828 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5829   $as_echo_n "(cached) " >&6
5830 else
5831
5832 echo 'void f(void){}' >conftest.c
5833 if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5834 eval "cv_prog_cc_flag_$cache=yes"
5835 else
5836 eval "cv_prog_cc_flag_$cache=no"
5837 fi
5838 rm -f conftest conftest.o conftest.c
5839
5840 fi
5841
5842 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5844 $as_echo "yes" >&6; }
5845 :
5846 CFLAGS="$CFLAGS -W"
5847 else
5848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5849 $as_echo "no" >&6; }
5850 :
5851
5852 fi
5853
5854
5855
5856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5857 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5858 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5859 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5860   $as_echo_n "(cached) " >&6
5861 else
5862
5863 echo 'void f(void){}' >conftest.c
5864 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5865 eval "cv_prog_cc_flag_$cache=yes"
5866 else
5867 eval "cv_prog_cc_flag_$cache=no"
5868 fi
5869 rm -f conftest conftest.o conftest.c
5870
5871 fi
5872
5873 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5875 $as_echo "yes" >&6; }
5876 :
5877 CFLAGS="$CFLAGS -Wall"
5878 else
5879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5880 $as_echo "no" >&6; }
5881 :
5882
5883 fi
5884
5885
5886
5887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5888 $as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5889 cache=`echo Wextra | 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 -Wextra -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 -Wextra"
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 -Wdeclaration-after-statement" >&5
5919 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
5920 cache=`echo Wdeclaration-after-statement | 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 -Wdeclaration-after-statement -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 -Wdeclaration-after-statement"
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 $as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
5949
5950                 ;;
5951         no|*)
5952                 # nothing to do.
5953                 ;;
5954 esac
5955 if test "$default_cflags" = "yes"; then
5956         # only when CFLAGS was "" at the start, if the users wants to
5957         # override we shouldn't add default cflags, because they wouldn't
5958         # be able to turn off these options and set the CFLAGS wanted.
5959
5960     # Check whether --enable-flto was given.
5961 if test "${enable_flto+set}" = set; then :
5962   enableval=$enable_flto;
5963 fi
5964
5965     if test "x$enable_flto" != "xno"; then :
5966
5967         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
5968 $as_echo_n "checking if $CC supports -flto... " >&6; }
5969         BAKCFLAGS="$CFLAGS"
5970         CFLAGS="$CFLAGS -flto"
5971         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5972 /* end confdefs.h.  */
5973
5974 int
5975 main ()
5976 {
5977
5978   ;
5979   return 0;
5980 }
5981 _ACEOF
5982 if ac_fn_c_try_link "$LINENO"; then :
5983
5984             if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
5985                 CFLAGS="$BAKCFLAGS"
5986                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5987 $as_echo "no" >&6; }
5988             else
5989                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5990 $as_echo "yes" >&6; }
5991             fi
5992             rm -f conftest conftest.c conftest.o
5993
5994 else
5995   CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5996 $as_echo "no" >&6; }
5997 fi
5998 rm -f core conftest.err conftest.$ac_objext \
5999     conftest$ac_exeext conftest.$ac_ext
6000
6001 fi
6002
6003
6004     # Check whether --enable-pie was given.
6005 if test "${enable_pie+set}" = set; then :
6006   enableval=$enable_pie;
6007 fi
6008
6009     if test "x$enable_pie" = "xyes"; then :
6010
6011         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6012 $as_echo_n "checking if $CC supports PIE... " >&6; }
6013         BAKLDFLAGS="$LDFLAGS"
6014         BAKCFLAGS="$CFLAGS"
6015         LDFLAGS="$LDFLAGS -pie"
6016         CFLAGS="$CFLAGS -fPIE"
6017         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6018 /* end confdefs.h.  */
6019
6020 int
6021 main ()
6022 {
6023
6024   ;
6025   return 0;
6026 }
6027 _ACEOF
6028 if ac_fn_c_try_link "$LINENO"; then :
6029
6030             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6031                 LDFLAGS="$BAKLDFLAGS"
6032                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6033 $as_echo "no" >&6; }
6034             else
6035                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6036 $as_echo "yes" >&6; }
6037             fi
6038             rm -f conftest conftest.c conftest.o
6039
6040 else
6041   LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6042 $as_echo "no" >&6; }
6043 fi
6044 rm -f core conftest.err conftest.$ac_objext \
6045     conftest$ac_exeext conftest.$ac_ext
6046
6047 fi
6048
6049
6050     # Check whether --enable-relro_now was given.
6051 if test "${enable_relro_now+set}" = set; then :
6052   enableval=$enable_relro_now;
6053 fi
6054
6055     if test "x$enable_relro_now" = "xyes"; then :
6056
6057         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6058 $as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6059         BAKLDFLAGS="$LDFLAGS"
6060         LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6061         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6062 /* end confdefs.h.  */
6063
6064 int
6065 main ()
6066 {
6067
6068   ;
6069   return 0;
6070 }
6071 _ACEOF
6072 if ac_fn_c_try_link "$LINENO"; then :
6073
6074             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6075                 LDFLAGS="$BAKLDFLAGS"
6076                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6077 $as_echo "no" >&6; }
6078             else
6079                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6080 $as_echo "yes" >&6; }
6081             fi
6082             rm -f conftest conftest.c conftest.o
6083
6084 else
6085   LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6086 $as_echo "no" >&6; }
6087 fi
6088 rm -f core conftest.err conftest.$ac_objext \
6089     conftest$ac_exeext conftest.$ac_ext
6090
6091 fi
6092
6093 fi
6094
6095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6096 $as_echo_n "checking for inline... " >&6; }
6097 if ${ac_cv_c_inline+:} false; then :
6098   $as_echo_n "(cached) " >&6
6099 else
6100   ac_cv_c_inline=no
6101 for ac_kw in inline __inline__ __inline; do
6102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6103 /* end confdefs.h.  */
6104 #ifndef __cplusplus
6105 typedef int foo_t;
6106 static $ac_kw foo_t static_foo () {return 0; }
6107 $ac_kw foo_t foo () {return 0; }
6108 #endif
6109
6110 _ACEOF
6111 if ac_fn_c_try_compile "$LINENO"; then :
6112   ac_cv_c_inline=$ac_kw
6113 fi
6114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6115   test "$ac_cv_c_inline" != no && break
6116 done
6117
6118 fi
6119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6120 $as_echo "$ac_cv_c_inline" >&6; }
6121
6122 case $ac_cv_c_inline in
6123   inline | yes) ;;
6124   *)
6125     case $ac_cv_c_inline in
6126       no) ac_val=;;
6127       *) ac_val=$ac_cv_c_inline;;
6128     esac
6129     cat >>confdefs.h <<_ACEOF
6130 #ifndef __cplusplus
6131 #define inline $ac_val
6132 #endif
6133 _ACEOF
6134     ;;
6135 esac
6136
6137
6138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6139 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6140 if ${ac_cv_c_format_attribute+:} false; then :
6141   $as_echo_n "(cached) " >&6
6142 else
6143   ac_cv_c_format_attribute=no
6144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6145 /* end confdefs.h.  */
6146 #include <stdio.h>
6147 void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6148 void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6149
6150 int
6151 main ()
6152 {
6153
6154    f ("%s", "str");
6155
6156   ;
6157   return 0;
6158 }
6159 _ACEOF
6160 if ac_fn_c_try_compile "$LINENO"; then :
6161   ac_cv_c_format_attribute="yes"
6162 else
6163   ac_cv_c_format_attribute="no"
6164 fi
6165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6166
6167 fi
6168
6169
6170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6171 $as_echo "$ac_cv_c_format_attribute" >&6; }
6172 if test $ac_cv_c_format_attribute = yes; then
6173
6174 $as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6175
6176 fi
6177
6178
6179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6180 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6181 if ${ac_cv_c_unused_attribute+:} false; then :
6182   $as_echo_n "(cached) " >&6
6183 else
6184   ac_cv_c_unused_attribute=no
6185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6186 /* end confdefs.h.  */
6187 #include <stdio.h>
6188 void f (char *u __attribute__((unused)));
6189
6190 int
6191 main ()
6192 {
6193
6194    f ("x");
6195
6196   ;
6197   return 0;
6198 }
6199 _ACEOF
6200 if ac_fn_c_try_compile "$LINENO"; then :
6201   ac_cv_c_unused_attribute="yes"
6202 else
6203   ac_cv_c_unused_attribute="no"
6204 fi
6205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6206
6207 fi
6208
6209
6210
6211
6212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6213 $as_echo "$ac_cv_c_unused_attribute" >&6; }
6214 if test $ac_cv_c_unused_attribute = yes; then
6215
6216 $as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6217
6218 fi
6219
6220
6221
6222
6223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6224 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6225 if ${ac_cv_c_weak_attribute+:} false; then :
6226   $as_echo_n "(cached) " >&6
6227 else
6228   ac_cv_c_weak_attribute=no
6229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6230 /* end confdefs.h.  */
6231  #include <stdio.h>
6232 __attribute__((weak)) void f(int x) { printf("%d", x); }
6233
6234 int
6235 main ()
6236 {
6237
6238    f(1);
6239
6240   ;
6241   return 0;
6242 }
6243 _ACEOF
6244 if ac_fn_c_try_compile "$LINENO"; then :
6245   ac_cv_c_weak_attribute="yes"
6246 else
6247   ac_cv_c_weak_attribute="no"
6248 fi
6249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6250
6251 fi
6252
6253
6254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6255 $as_echo "$ac_cv_c_weak_attribute" >&6; }
6256 if test $ac_cv_c_weak_attribute = yes; then
6257
6258 $as_echo "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6259
6260 fi
6261
6262
6263 if test "$srcdir" != "."; then
6264         CPPFLAGS="$CPPFLAGS -I$srcdir"
6265 fi
6266
6267
6268
6269 for ac_prog in flex lex
6270 do
6271   # Extract the first word of "$ac_prog", so it can be a program name with args.
6272 set dummy $ac_prog; ac_word=$2
6273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6274 $as_echo_n "checking for $ac_word... " >&6; }
6275 if ${ac_cv_prog_LEX+:} false; then :
6276   $as_echo_n "(cached) " >&6
6277 else
6278   if test -n "$LEX"; then
6279   ac_cv_prog_LEX="$LEX" # Let the user override the test.
6280 else
6281 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6282 for as_dir in $PATH
6283 do
6284   IFS=$as_save_IFS
6285   test -z "$as_dir" && as_dir=.
6286     for ac_exec_ext in '' $ac_executable_extensions; do
6287   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6288     ac_cv_prog_LEX="$ac_prog"
6289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6290     break 2
6291   fi
6292 done
6293   done
6294 IFS=$as_save_IFS
6295
6296 fi
6297 fi
6298 LEX=$ac_cv_prog_LEX
6299 if test -n "$LEX"; then
6300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6301 $as_echo "$LEX" >&6; }
6302 else
6303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6304 $as_echo "no" >&6; }
6305 fi
6306
6307
6308   test -n "$LEX" && break
6309 done
6310 test -n "$LEX" || LEX=":"
6311
6312 if test "x$LEX" != "x:"; then
6313   cat >conftest.l <<_ACEOF
6314 %%
6315 a { ECHO; }
6316 b { REJECT; }
6317 c { yymore (); }
6318 d { yyless (1); }
6319 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6320     yyless ((input () != 0)); }
6321 f { unput (yytext[0]); }
6322 . { BEGIN INITIAL; }
6323 %%
6324 #ifdef YYTEXT_POINTER
6325 extern char *yytext;
6326 #endif
6327 int
6328 main (void)
6329 {
6330   return ! yylex () + ! yywrap ();
6331 }
6332 _ACEOF
6333 { { ac_try="$LEX conftest.l"
6334 case "(($ac_try" in
6335   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6336   *) ac_try_echo=$ac_try;;
6337 esac
6338 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6339 $as_echo "$ac_try_echo"; } >&5
6340   (eval "$LEX conftest.l") 2>&5
6341   ac_status=$?
6342   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6343   test $ac_status = 0; }
6344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6345 $as_echo_n "checking lex output file root... " >&6; }
6346 if ${ac_cv_prog_lex_root+:} false; then :
6347   $as_echo_n "(cached) " >&6
6348 else
6349
6350 if test -f lex.yy.c; then
6351   ac_cv_prog_lex_root=lex.yy
6352 elif test -f lexyy.c; then
6353   ac_cv_prog_lex_root=lexyy
6354 else
6355   as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6356 fi
6357 fi
6358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6359 $as_echo "$ac_cv_prog_lex_root" >&6; }
6360 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6361
6362 if test -z "${LEXLIB+set}"; then
6363   { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6364 $as_echo_n "checking lex library... " >&6; }
6365 if ${ac_cv_lib_lex+:} false; then :
6366   $as_echo_n "(cached) " >&6
6367 else
6368
6369     ac_save_LIBS=$LIBS
6370     ac_cv_lib_lex='none needed'
6371     for ac_lib in '' -lfl -ll; do
6372       LIBS="$ac_lib $ac_save_LIBS"
6373       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6374 /* end confdefs.h.  */
6375 `cat $LEX_OUTPUT_ROOT.c`
6376 _ACEOF
6377 if ac_fn_c_try_link "$LINENO"; then :
6378   ac_cv_lib_lex=$ac_lib
6379 fi
6380 rm -f core conftest.err conftest.$ac_objext \
6381     conftest$ac_exeext conftest.$ac_ext
6382       test "$ac_cv_lib_lex" != 'none needed' && break
6383     done
6384     LIBS=$ac_save_LIBS
6385
6386 fi
6387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6388 $as_echo "$ac_cv_lib_lex" >&6; }
6389   test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6390 fi
6391
6392
6393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6394 $as_echo_n "checking whether yytext is a pointer... " >&6; }
6395 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6396   $as_echo_n "(cached) " >&6
6397 else
6398   # POSIX says lex can declare yytext either as a pointer or an array; the
6399 # default is implementation-dependent.  Figure out which it is, since
6400 # not all implementations provide the %pointer and %array declarations.
6401 ac_cv_prog_lex_yytext_pointer=no
6402 ac_save_LIBS=$LIBS
6403 LIBS="$LEXLIB $ac_save_LIBS"
6404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6405 /* end confdefs.h.  */
6406
6407   #define YYTEXT_POINTER 1
6408 `cat $LEX_OUTPUT_ROOT.c`
6409 _ACEOF
6410 if ac_fn_c_try_link "$LINENO"; then :
6411   ac_cv_prog_lex_yytext_pointer=yes
6412 fi
6413 rm -f core conftest.err conftest.$ac_objext \
6414     conftest$ac_exeext conftest.$ac_ext
6415 LIBS=$ac_save_LIBS
6416
6417 fi
6418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6419 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6420 if test $ac_cv_prog_lex_yytext_pointer = yes; then
6421
6422 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6423
6424 fi
6425 rm -f conftest.l $LEX_OUTPUT_ROOT.c
6426
6427 fi
6428
6429         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6430 $as_echo_n "checking for yylex_destroy... " >&6; }
6431         if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6432
6433 $as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6434
6435                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6436 $as_echo "yes" >&6; }
6437         else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6438 $as_echo "no" >&6; }; fi
6439
6440 for ac_prog in 'bison -y' byacc
6441 do
6442   # Extract the first word of "$ac_prog", so it can be a program name with args.
6443 set dummy $ac_prog; ac_word=$2
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6445 $as_echo_n "checking for $ac_word... " >&6; }
6446 if ${ac_cv_prog_YACC+:} false; then :
6447   $as_echo_n "(cached) " >&6
6448 else
6449   if test -n "$YACC"; then
6450   ac_cv_prog_YACC="$YACC" # Let the user override the test.
6451 else
6452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6453 for as_dir in $PATH
6454 do
6455   IFS=$as_save_IFS
6456   test -z "$as_dir" && as_dir=.
6457     for ac_exec_ext in '' $ac_executable_extensions; do
6458   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6459     ac_cv_prog_YACC="$ac_prog"
6460     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6461     break 2
6462   fi
6463 done
6464   done
6465 IFS=$as_save_IFS
6466
6467 fi
6468 fi
6469 YACC=$ac_cv_prog_YACC
6470 if test -n "$YACC"; then
6471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6472 $as_echo "$YACC" >&6; }
6473 else
6474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6475 $as_echo "no" >&6; }
6476 fi
6477
6478
6479   test -n "$YACC" && break
6480 done
6481 test -n "$YACC" || YACC="yacc"
6482
6483 # Extract the first word of "doxygen", so it can be a program name with args.
6484 set dummy doxygen; ac_word=$2
6485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6486 $as_echo_n "checking for $ac_word... " >&6; }
6487 if ${ac_cv_prog_doxygen+:} false; then :
6488   $as_echo_n "(cached) " >&6
6489 else
6490   if test -n "$doxygen"; then
6491   ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6492 else
6493 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6494 for as_dir in $PATH
6495 do
6496   IFS=$as_save_IFS
6497   test -z "$as_dir" && as_dir=.
6498     for ac_exec_ext in '' $ac_executable_extensions; do
6499   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6500     ac_cv_prog_doxygen="doxygen"
6501     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6502     break 2
6503   fi
6504 done
6505   done
6506 IFS=$as_save_IFS
6507
6508 fi
6509 fi
6510 doxygen=$ac_cv_prog_doxygen
6511 if test -n "$doxygen"; then
6512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6513 $as_echo "$doxygen" >&6; }
6514 else
6515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6516 $as_echo "no" >&6; }
6517 fi
6518
6519
6520 if test -n "$ac_tool_prefix"; then
6521   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6522 set dummy ${ac_tool_prefix}strip; ac_word=$2
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6524 $as_echo_n "checking for $ac_word... " >&6; }
6525 if ${ac_cv_prog_STRIP+:} false; then :
6526   $as_echo_n "(cached) " >&6
6527 else
6528   if test -n "$STRIP"; then
6529   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6530 else
6531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6532 for as_dir in $PATH
6533 do
6534   IFS=$as_save_IFS
6535   test -z "$as_dir" && as_dir=.
6536     for ac_exec_ext in '' $ac_executable_extensions; do
6537   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6538     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6539     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6540     break 2
6541   fi
6542 done
6543   done
6544 IFS=$as_save_IFS
6545
6546 fi
6547 fi
6548 STRIP=$ac_cv_prog_STRIP
6549 if test -n "$STRIP"; then
6550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6551 $as_echo "$STRIP" >&6; }
6552 else
6553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6554 $as_echo "no" >&6; }
6555 fi
6556
6557
6558 fi
6559 if test -z "$ac_cv_prog_STRIP"; then
6560   ac_ct_STRIP=$STRIP
6561   # Extract the first word of "strip", so it can be a program name with args.
6562 set dummy strip; ac_word=$2
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6564 $as_echo_n "checking for $ac_word... " >&6; }
6565 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6566   $as_echo_n "(cached) " >&6
6567 else
6568   if test -n "$ac_ct_STRIP"; then
6569   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6570 else
6571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6572 for as_dir in $PATH
6573 do
6574   IFS=$as_save_IFS
6575   test -z "$as_dir" && as_dir=.
6576     for ac_exec_ext in '' $ac_executable_extensions; do
6577   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6578     ac_cv_prog_ac_ct_STRIP="strip"
6579     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6580     break 2
6581   fi
6582 done
6583   done
6584 IFS=$as_save_IFS
6585
6586 fi
6587 fi
6588 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6589 if test -n "$ac_ct_STRIP"; then
6590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6591 $as_echo "$ac_ct_STRIP" >&6; }
6592 else
6593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6594 $as_echo "no" >&6; }
6595 fi
6596
6597   if test "x$ac_ct_STRIP" = x; then
6598     STRIP=""
6599   else
6600     case $cross_compiling:$ac_tool_warned in
6601 yes:)
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6603 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6604 ac_tool_warned=yes ;;
6605 esac
6606     STRIP=$ac_ct_STRIP
6607   fi
6608 else
6609   STRIP="$ac_cv_prog_STRIP"
6610 fi
6611
6612 ac_aux_dir=
6613 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6614   if test -f "$ac_dir/install-sh"; then
6615     ac_aux_dir=$ac_dir
6616     ac_install_sh="$ac_aux_dir/install-sh -c"
6617     break
6618   elif test -f "$ac_dir/install.sh"; then
6619     ac_aux_dir=$ac_dir
6620     ac_install_sh="$ac_aux_dir/install.sh -c"
6621     break
6622   elif test -f "$ac_dir/shtool"; then
6623     ac_aux_dir=$ac_dir
6624     ac_install_sh="$ac_aux_dir/shtool install -c"
6625     break
6626   fi
6627 done
6628 if test -z "$ac_aux_dir"; then
6629   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6630 fi
6631
6632 # These three variables are undocumented and unsupported,
6633 # and are intended to be withdrawn in a future Autoconf release.
6634 # They can cause serious problems if a builder's source tree is in a directory
6635 # whose full name contains unusual characters.
6636 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6637 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6638 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6639
6640
6641 # Make sure we can run config.sub.
6642 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6643   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6644
6645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6646 $as_echo_n "checking build system type... " >&6; }
6647 if ${ac_cv_build+:} false; then :
6648   $as_echo_n "(cached) " >&6
6649 else
6650   ac_build_alias=$build_alias
6651 test "x$ac_build_alias" = x &&
6652   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6653 test "x$ac_build_alias" = x &&
6654   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6655 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6656   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6657
6658 fi
6659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6660 $as_echo "$ac_cv_build" >&6; }
6661 case $ac_cv_build in
6662 *-*-*) ;;
6663 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6664 esac
6665 build=$ac_cv_build
6666 ac_save_IFS=$IFS; IFS='-'
6667 set x $ac_cv_build
6668 shift
6669 build_cpu=$1
6670 build_vendor=$2
6671 shift; shift
6672 # Remember, the first character of IFS is used to create $*,
6673 # except with old shells:
6674 build_os=$*
6675 IFS=$ac_save_IFS
6676 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6677
6678
6679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6680 $as_echo_n "checking host system type... " >&6; }
6681 if ${ac_cv_host+:} false; then :
6682   $as_echo_n "(cached) " >&6
6683 else
6684   if test "x$host_alias" = x; then
6685   ac_cv_host=$ac_cv_build
6686 else
6687   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6688     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6689 fi
6690
6691 fi
6692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6693 $as_echo "$ac_cv_host" >&6; }
6694 case $ac_cv_host in
6695 *-*-*) ;;
6696 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6697 esac
6698 host=$ac_cv_host
6699 ac_save_IFS=$IFS; IFS='-'
6700 set x $ac_cv_host
6701 shift
6702 host_cpu=$1
6703 host_vendor=$2
6704 shift; shift
6705 # Remember, the first character of IFS is used to create $*,
6706 # except with old shells:
6707 host_os=$*
6708 IFS=$ac_save_IFS
6709 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6710
6711
6712
6713 # skip these tests, we do not need them.
6714
6715
6716
6717
6718
6719
6720
6721
6722 # always use ./libtool unless override from commandline (libtool=mylibtool)
6723 if test -z "$libtool"; then
6724         libtool="./libtool"
6725 fi
6726
6727 # avoid libtool max commandline length test on systems that fork slowly.
6728
6729 if echo "$host_os" | grep "sunos4" >/dev/null; then
6730         lt_cv_sys_max_cmd_len=32750;
6731 fi
6732 if test -n "$ac_tool_prefix"; then
6733   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6734 set dummy ${ac_tool_prefix}ar; ac_word=$2
6735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6736 $as_echo_n "checking for $ac_word... " >&6; }
6737 if ${ac_cv_path_AR+:} false; then :
6738   $as_echo_n "(cached) " >&6
6739 else
6740   case $AR in
6741   [\\/]* | ?:[\\/]*)
6742   ac_cv_path_AR="$AR" # Let the user override the test with a path.
6743   ;;
6744   *)
6745   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6746 for as_dir in $PATH
6747 do
6748   IFS=$as_save_IFS
6749   test -z "$as_dir" && as_dir=.
6750     for ac_exec_ext in '' $ac_executable_extensions; do
6751   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6752     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6753     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6754     break 2
6755   fi
6756 done
6757   done
6758 IFS=$as_save_IFS
6759
6760   ;;
6761 esac
6762 fi
6763 AR=$ac_cv_path_AR
6764 if test -n "$AR"; then
6765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6766 $as_echo "$AR" >&6; }
6767 else
6768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6769 $as_echo "no" >&6; }
6770 fi
6771
6772
6773 fi
6774 if test -z "$ac_cv_path_AR"; then
6775   ac_pt_AR=$AR
6776   # Extract the first word of "ar", so it can be a program name with args.
6777 set dummy ar; ac_word=$2
6778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6779 $as_echo_n "checking for $ac_word... " >&6; }
6780 if ${ac_cv_path_ac_pt_AR+:} false; then :
6781   $as_echo_n "(cached) " >&6
6782 else
6783   case $ac_pt_AR in
6784   [\\/]* | ?:[\\/]*)
6785   ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6786   ;;
6787   *)
6788   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6789 for as_dir in $PATH
6790 do
6791   IFS=$as_save_IFS
6792   test -z "$as_dir" && as_dir=.
6793     for ac_exec_ext in '' $ac_executable_extensions; do
6794   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6795     ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6796     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6797     break 2
6798   fi
6799 done
6800   done
6801 IFS=$as_save_IFS
6802
6803   ;;
6804 esac
6805 fi
6806 ac_pt_AR=$ac_cv_path_ac_pt_AR
6807 if test -n "$ac_pt_AR"; then
6808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6809 $as_echo "$ac_pt_AR" >&6; }
6810 else
6811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6812 $as_echo "no" >&6; }
6813 fi
6814
6815   if test "x$ac_pt_AR" = x; then
6816     AR="false"
6817   else
6818     case $cross_compiling:$ac_tool_warned in
6819 yes:)
6820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6821 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6822 ac_tool_warned=yes ;;
6823 esac
6824     AR=$ac_pt_AR
6825   fi
6826 else
6827   AR="$ac_cv_path_AR"
6828 fi
6829
6830 if test $AR = false; then
6831         as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
6832 fi
6833
6834 case `pwd` in
6835   *\ * | *\     *)
6836     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
6837 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
6838 esac
6839
6840
6841
6842 macro_version='2.4.6'
6843 macro_revision='2.4.6'
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857 ltmain=$ac_aux_dir/ltmain.sh
6858
6859 # Backslashify metacharacters that are still active within
6860 # double-quoted strings.
6861 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6862
6863 # Same as above, but do not quote variable references.
6864 double_quote_subst='s/\(["`\\]\)/\\\1/g'
6865
6866 # Sed substitution to delay expansion of an escaped shell variable in a
6867 # double_quote_subst'ed string.
6868 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6869
6870 # Sed substitution to delay expansion of an escaped single quote.
6871 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
6872
6873 # Sed substitution to avoid accidental globbing in evaled expressions
6874 no_glob_subst='s/\*/\\\*/g'
6875
6876 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6877 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
6878 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
6879
6880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
6881 $as_echo_n "checking how to print strings... " >&6; }
6882 # Test print first, because it will be a builtin if present.
6883 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6884    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6885   ECHO='print -r --'
6886 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6887   ECHO='printf %s\n'
6888 else
6889   # Use this function as a fallback that always works.
6890   func_fallback_echo ()
6891   {
6892     eval 'cat <<_LTECHO_EOF
6893 $1
6894 _LTECHO_EOF'
6895   }
6896   ECHO='func_fallback_echo'
6897 fi
6898
6899 # func_echo_all arg...
6900 # Invoke $ECHO with all args, space-separated.
6901 func_echo_all ()
6902 {
6903     $ECHO ""
6904 }
6905
6906 case $ECHO in
6907   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
6908 $as_echo "printf" >&6; } ;;
6909   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
6910 $as_echo "print -r" >&6; } ;;
6911   *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
6912 $as_echo "cat" >&6; } ;;
6913 esac
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6929 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6930 if ${ac_cv_path_SED+:} false; then :
6931   $as_echo_n "(cached) " >&6
6932 else
6933             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6934      for ac_i in 1 2 3 4 5 6 7; do
6935        ac_script="$ac_script$as_nl$ac_script"
6936      done
6937      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6938      { ac_script=; unset ac_script;}
6939      if test -z "$SED"; then
6940   ac_path_SED_found=false
6941   # Loop through the user's path and test for each of PROGNAME-LIST
6942   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6943 for as_dir in $PATH
6944 do
6945   IFS=$as_save_IFS
6946   test -z "$as_dir" && as_dir=.
6947     for ac_prog in sed gsed; do
6948     for ac_exec_ext in '' $ac_executable_extensions; do
6949       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6950       as_fn_executable_p "$ac_path_SED" || continue
6951 # Check for GNU ac_path_SED and select it if it is found.
6952   # Check for GNU $ac_path_SED
6953 case `"$ac_path_SED" --version 2>&1` in
6954 *GNU*)
6955   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6956 *)
6957   ac_count=0
6958   $as_echo_n 0123456789 >"conftest.in"
6959   while :
6960   do
6961     cat "conftest.in" "conftest.in" >"conftest.tmp"
6962     mv "conftest.tmp" "conftest.in"
6963     cp "conftest.in" "conftest.nl"
6964     $as_echo '' >> "conftest.nl"
6965     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6966     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6967     as_fn_arith $ac_count + 1 && ac_count=$as_val
6968     if test $ac_count -gt ${ac_path_SED_max-0}; then
6969       # Best one so far, save it but keep looking for a better one
6970       ac_cv_path_SED="$ac_path_SED"
6971       ac_path_SED_max=$ac_count
6972     fi
6973     # 10*(2^10) chars as input seems more than enough
6974     test $ac_count -gt 10 && break
6975   done
6976   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6977 esac
6978
6979       $ac_path_SED_found && break 3
6980     done
6981   done
6982   done
6983 IFS=$as_save_IFS
6984   if test -z "$ac_cv_path_SED"; then
6985     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6986   fi
6987 else
6988   ac_cv_path_SED=$SED
6989 fi
6990
6991 fi
6992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6993 $as_echo "$ac_cv_path_SED" >&6; }
6994  SED="$ac_cv_path_SED"
6995   rm -f conftest.sed
6996
6997 test -z "$SED" && SED=sed
6998 Xsed="$SED -e 1s/^X//"
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7011 $as_echo_n "checking for fgrep... " >&6; }
7012 if ${ac_cv_path_FGREP+:} false; then :
7013   $as_echo_n "(cached) " >&6
7014 else
7015   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7016    then ac_cv_path_FGREP="$GREP -F"
7017    else
7018      if test -z "$FGREP"; then
7019   ac_path_FGREP_found=false
7020   # Loop through the user's path and test for each of PROGNAME-LIST
7021   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7022 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7023 do
7024   IFS=$as_save_IFS
7025   test -z "$as_dir" && as_dir=.
7026     for ac_prog in fgrep; do
7027     for ac_exec_ext in '' $ac_executable_extensions; do
7028       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
7029       as_fn_executable_p "$ac_path_FGREP" || continue
7030 # Check for GNU ac_path_FGREP and select it if it is found.
7031   # Check for GNU $ac_path_FGREP
7032 case `"$ac_path_FGREP" --version 2>&1` in
7033 *GNU*)
7034   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7035 *)
7036   ac_count=0
7037   $as_echo_n 0123456789 >"conftest.in"
7038   while :
7039   do
7040     cat "conftest.in" "conftest.in" >"conftest.tmp"
7041     mv "conftest.tmp" "conftest.in"
7042     cp "conftest.in" "conftest.nl"
7043     $as_echo 'FGREP' >> "conftest.nl"
7044     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7045     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7046     as_fn_arith $ac_count + 1 && ac_count=$as_val
7047     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7048       # Best one so far, save it but keep looking for a better one
7049       ac_cv_path_FGREP="$ac_path_FGREP"
7050       ac_path_FGREP_max=$ac_count
7051     fi
7052     # 10*(2^10) chars as input seems more than enough
7053     test $ac_count -gt 10 && break
7054   done
7055   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7056 esac
7057
7058       $ac_path_FGREP_found && break 3
7059     done
7060   done
7061   done
7062 IFS=$as_save_IFS
7063   if test -z "$ac_cv_path_FGREP"; then
7064     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7065   fi
7066 else
7067   ac_cv_path_FGREP=$FGREP
7068 fi
7069
7070    fi
7071 fi
7072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7073 $as_echo "$ac_cv_path_FGREP" >&6; }
7074  FGREP="$ac_cv_path_FGREP"
7075
7076
7077 test -z "$GREP" && GREP=grep
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097 # Check whether --with-gnu-ld was given.
7098 if test "${with_gnu_ld+set}" = set; then :
7099   withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7100 else
7101   with_gnu_ld=no
7102 fi
7103
7104 ac_prog=ld
7105 if test yes = "$GCC"; then
7106   # Check if gcc -print-prog-name=ld gives a path.
7107   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7108 $as_echo_n "checking for ld used by $CC... " >&6; }
7109   case $host in
7110   *-*-mingw*)
7111     # gcc leaves a trailing carriage return, which upsets mingw
7112     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7113   *)
7114     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7115   esac
7116   case $ac_prog in
7117     # Accept absolute paths.
7118     [\\/]* | ?:[\\/]*)
7119       re_direlt='/[^/][^/]*/\.\./'
7120       # Canonicalize the pathname of ld
7121       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7122       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7123         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7124       done
7125       test -z "$LD" && LD=$ac_prog
7126       ;;
7127   "")
7128     # If it fails, then pretend we aren't using GCC.
7129     ac_prog=ld
7130     ;;
7131   *)
7132     # If it is relative, then search for the first ld in PATH.
7133     with_gnu_ld=unknown
7134     ;;
7135   esac
7136 elif test yes = "$with_gnu_ld"; then
7137   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7138 $as_echo_n "checking for GNU ld... " >&6; }
7139 else
7140   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7141 $as_echo_n "checking for non-GNU ld... " >&6; }
7142 fi
7143 if ${lt_cv_path_LD+:} false; then :
7144   $as_echo_n "(cached) " >&6
7145 else
7146   if test -z "$LD"; then
7147   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7148   for ac_dir in $PATH; do
7149     IFS=$lt_save_ifs
7150     test -z "$ac_dir" && ac_dir=.
7151     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7152       lt_cv_path_LD=$ac_dir/$ac_prog
7153       # Check to see if the program is GNU ld.  I'd rather use --version,
7154       # but apparently some variants of GNU ld only accept -v.
7155       # Break only if it was the GNU/non-GNU ld that we prefer.
7156       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7157       *GNU* | *'with BFD'*)
7158         test no != "$with_gnu_ld" && break
7159         ;;
7160       *)
7161         test yes != "$with_gnu_ld" && break
7162         ;;
7163       esac
7164     fi
7165   done
7166   IFS=$lt_save_ifs
7167 else
7168   lt_cv_path_LD=$LD # Let the user override the test with a path.
7169 fi
7170 fi
7171
7172 LD=$lt_cv_path_LD
7173 if test -n "$LD"; then
7174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7175 $as_echo "$LD" >&6; }
7176 else
7177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7178 $as_echo "no" >&6; }
7179 fi
7180 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7182 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7183 if ${lt_cv_prog_gnu_ld+:} false; then :
7184   $as_echo_n "(cached) " >&6
7185 else
7186   # I'd rather use --version here, but apparently some GNU lds only accept -v.
7187 case `$LD -v 2>&1 </dev/null` in
7188 *GNU* | *'with BFD'*)
7189   lt_cv_prog_gnu_ld=yes
7190   ;;
7191 *)
7192   lt_cv_prog_gnu_ld=no
7193   ;;
7194 esac
7195 fi
7196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7197 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
7198 with_gnu_ld=$lt_cv_prog_gnu_ld
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7209 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7210 if ${lt_cv_path_NM+:} false; then :
7211   $as_echo_n "(cached) " >&6
7212 else
7213   if test -n "$NM"; then
7214   # Let the user override the test.
7215   lt_cv_path_NM=$NM
7216 else
7217   lt_nm_to_check=${ac_tool_prefix}nm
7218   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7219     lt_nm_to_check="$lt_nm_to_check nm"
7220   fi
7221   for lt_tmp_nm in $lt_nm_to_check; do
7222     lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7223     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7224       IFS=$lt_save_ifs
7225       test -z "$ac_dir" && ac_dir=.
7226       tmp_nm=$ac_dir/$lt_tmp_nm
7227       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7228         # Check to see if the nm accepts a BSD-compat flag.
7229         # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7230         #   nm: unknown option "B" ignored
7231         # Tru64's nm complains that /dev/null is an invalid object file
7232         # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7233         case $build_os in
7234         mingw*) lt_bad_file=conftest.nm/nofile ;;
7235         *) lt_bad_file=/dev/null ;;
7236         esac
7237         case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7238         *$lt_bad_file* | *'Invalid file or object type'*)
7239           lt_cv_path_NM="$tmp_nm -B"
7240           break 2
7241           ;;
7242         *)
7243           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7244           */dev/null*)
7245             lt_cv_path_NM="$tmp_nm -p"
7246             break 2
7247             ;;
7248           *)
7249             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7250             continue # so that we can try to find one that supports BSD flags
7251             ;;
7252           esac
7253           ;;
7254         esac
7255       fi
7256     done
7257     IFS=$lt_save_ifs
7258   done
7259   : ${lt_cv_path_NM=no}
7260 fi
7261 fi
7262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7263 $as_echo "$lt_cv_path_NM" >&6; }
7264 if test no != "$lt_cv_path_NM"; then
7265   NM=$lt_cv_path_NM
7266 else
7267   # Didn't find any BSD compatible name lister, look for dumpbin.
7268   if test -n "$DUMPBIN"; then :
7269     # Let the user override the test.
7270   else
7271     if test -n "$ac_tool_prefix"; then
7272   for ac_prog in dumpbin "link -dump"
7273   do
7274     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7275 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7277 $as_echo_n "checking for $ac_word... " >&6; }
7278 if ${ac_cv_prog_DUMPBIN+:} false; then :
7279   $as_echo_n "(cached) " >&6
7280 else
7281   if test -n "$DUMPBIN"; then
7282   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7283 else
7284 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7285 for as_dir in $PATH
7286 do
7287   IFS=$as_save_IFS
7288   test -z "$as_dir" && as_dir=.
7289     for ac_exec_ext in '' $ac_executable_extensions; do
7290   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7291     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7292     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7293     break 2
7294   fi
7295 done
7296   done
7297 IFS=$as_save_IFS
7298
7299 fi
7300 fi
7301 DUMPBIN=$ac_cv_prog_DUMPBIN
7302 if test -n "$DUMPBIN"; then
7303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7304 $as_echo "$DUMPBIN" >&6; }
7305 else
7306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7307 $as_echo "no" >&6; }
7308 fi
7309
7310
7311     test -n "$DUMPBIN" && break
7312   done
7313 fi
7314 if test -z "$DUMPBIN"; then
7315   ac_ct_DUMPBIN=$DUMPBIN
7316   for ac_prog in dumpbin "link -dump"
7317 do
7318   # Extract the first word of "$ac_prog", so it can be a program name with args.
7319 set dummy $ac_prog; ac_word=$2
7320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7321 $as_echo_n "checking for $ac_word... " >&6; }
7322 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7323   $as_echo_n "(cached) " >&6
7324 else
7325   if test -n "$ac_ct_DUMPBIN"; then
7326   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7327 else
7328 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7329 for as_dir in $PATH
7330 do
7331   IFS=$as_save_IFS
7332   test -z "$as_dir" && as_dir=.
7333     for ac_exec_ext in '' $ac_executable_extensions; do
7334   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7335     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7336     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7337     break 2
7338   fi
7339 done
7340   done
7341 IFS=$as_save_IFS
7342
7343 fi
7344 fi
7345 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7346 if test -n "$ac_ct_DUMPBIN"; then
7347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7348 $as_echo "$ac_ct_DUMPBIN" >&6; }
7349 else
7350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7351 $as_echo "no" >&6; }
7352 fi
7353
7354
7355   test -n "$ac_ct_DUMPBIN" && break
7356 done
7357
7358   if test "x$ac_ct_DUMPBIN" = x; then
7359     DUMPBIN=":"
7360   else
7361     case $cross_compiling:$ac_tool_warned in
7362 yes:)
7363 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7364 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7365 ac_tool_warned=yes ;;
7366 esac
7367     DUMPBIN=$ac_ct_DUMPBIN
7368   fi
7369 fi
7370
7371     case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7372     *COFF*)
7373       DUMPBIN="$DUMPBIN -symbols -headers"
7374       ;;
7375     *)
7376       DUMPBIN=:
7377       ;;
7378     esac
7379   fi
7380
7381   if test : != "$DUMPBIN"; then
7382     NM=$DUMPBIN
7383   fi
7384 fi
7385 test -z "$NM" && NM=nm
7386
7387
7388
7389
7390
7391
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7393 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
7394 if ${lt_cv_nm_interface+:} false; then :
7395   $as_echo_n "(cached) " >&6
7396 else
7397   lt_cv_nm_interface="BSD nm"
7398   echo "int some_variable = 0;" > conftest.$ac_ext
7399   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7400   (eval "$ac_compile" 2>conftest.err)
7401   cat conftest.err >&5
7402   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7403   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7404   cat conftest.err >&5
7405   (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7406   cat conftest.out >&5
7407   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7408     lt_cv_nm_interface="MS dumpbin"
7409   fi
7410   rm -f conftest*
7411 fi
7412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7413 $as_echo "$lt_cv_nm_interface" >&6; }
7414
7415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7416 $as_echo_n "checking whether ln -s works... " >&6; }
7417 LN_S=$as_ln_s
7418 if test "$LN_S" = "ln -s"; then
7419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7420 $as_echo "yes" >&6; }
7421 else
7422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7423 $as_echo "no, using $LN_S" >&6; }
7424 fi
7425
7426 # find the maximum length of command line arguments
7427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7428 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7429 if ${lt_cv_sys_max_cmd_len+:} false; then :
7430   $as_echo_n "(cached) " >&6
7431 else
7432     i=0
7433   teststring=ABCD
7434
7435   case $build_os in
7436   msdosdjgpp*)
7437     # On DJGPP, this test can blow up pretty badly due to problems in libc
7438     # (any single argument exceeding 2000 bytes causes a buffer overrun
7439     # during glob expansion).  Even if it were fixed, the result of this
7440     # check would be larger than it should be.
7441     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7442     ;;
7443
7444   gnu*)
7445     # Under GNU Hurd, this test is not required because there is
7446     # no limit to the length of command line arguments.
7447     # Libtool will interpret -1 as no limit whatsoever
7448     lt_cv_sys_max_cmd_len=-1;
7449     ;;
7450
7451   cygwin* | mingw* | cegcc*)
7452     # On Win9x/ME, this test blows up -- it succeeds, but takes
7453     # about 5 minutes as the teststring grows exponentially.
7454     # Worse, since 9x/ME are not pre-emptively multitasking,
7455     # you end up with a "frozen" computer, even though with patience
7456     # the test eventually succeeds (with a max line length of 256k).
7457     # Instead, let's just punt: use the minimum linelength reported by
7458     # all of the supported platforms: 8192 (on NT/2K/XP).
7459     lt_cv_sys_max_cmd_len=8192;
7460     ;;
7461
7462   mint*)
7463     # On MiNT this can take a long time and run out of memory.
7464     lt_cv_sys_max_cmd_len=8192;
7465     ;;
7466
7467   amigaos*)
7468     # On AmigaOS with pdksh, this test takes hours, literally.
7469     # So we just punt and use a minimum line length of 8192.
7470     lt_cv_sys_max_cmd_len=8192;
7471     ;;
7472
7473   bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7474     # This has been around since 386BSD, at least.  Likely further.
7475     if test -x /sbin/sysctl; then
7476       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7477     elif test -x /usr/sbin/sysctl; then
7478       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7479     else
7480       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7481     fi
7482     # And add a safety zone
7483     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7484     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7485     ;;
7486
7487   interix*)
7488     # We know the value 262144 and hardcode it with a safety zone (like BSD)
7489     lt_cv_sys_max_cmd_len=196608
7490     ;;
7491
7492   os2*)
7493     # The test takes a long time on OS/2.
7494     lt_cv_sys_max_cmd_len=8192
7495     ;;
7496
7497   osf*)
7498     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7499     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7500     # nice to cause kernel panics so lets avoid the loop below.
7501     # First set a reasonable default.
7502     lt_cv_sys_max_cmd_len=16384
7503     #
7504     if test -x /sbin/sysconfig; then
7505       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7506         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7507       esac
7508     fi
7509     ;;
7510   sco3.2v5*)
7511     lt_cv_sys_max_cmd_len=102400
7512     ;;
7513   sysv5* | sco5v6* | sysv4.2uw2*)
7514     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7515     if test -n "$kargmax"; then
7516       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[  ]//'`
7517     else
7518       lt_cv_sys_max_cmd_len=32768
7519     fi
7520     ;;
7521   *)
7522     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7523     if test -n "$lt_cv_sys_max_cmd_len" && \
7524        test undefined != "$lt_cv_sys_max_cmd_len"; then
7525       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7526       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7527     else
7528       # Make teststring a little bigger before we do anything with it.
7529       # a 1K string should be a reasonable start.
7530       for i in 1 2 3 4 5 6 7 8; do
7531         teststring=$teststring$teststring
7532       done
7533       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7534       # If test is not a shell built-in, we'll probably end up computing a
7535       # maximum length that is only half of the actual maximum length, but
7536       # we can't tell.
7537       while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7538                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7539               test 17 != "$i" # 1/2 MB should be enough
7540       do
7541         i=`expr $i + 1`
7542         teststring=$teststring$teststring
7543       done
7544       # Only check the string length outside the loop.
7545       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7546       teststring=
7547       # Add a significant safety factor because C++ compilers can tack on
7548       # massive amounts of additional arguments before passing them to the
7549       # linker.  It appears as though 1/2 is a usable value.
7550       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7551     fi
7552     ;;
7553   esac
7554
7555 fi
7556
7557 if test -n "$lt_cv_sys_max_cmd_len"; then
7558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7559 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7560 else
7561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7562 $as_echo "none" >&6; }
7563 fi
7564 max_cmd_len=$lt_cv_sys_max_cmd_len
7565
7566
7567
7568
7569
7570
7571 : ${CP="cp -f"}
7572 : ${MV="mv -f"}
7573 : ${RM="rm -f"}
7574
7575 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7576   lt_unset=unset
7577 else
7578   lt_unset=false
7579 fi
7580
7581
7582
7583
7584
7585 # test EBCDIC or ASCII
7586 case `echo X|tr X '\101'` in
7587  A) # ASCII based system
7588     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7589   lt_SP2NL='tr \040 \012'
7590   lt_NL2SP='tr \015\012 \040\040'
7591   ;;
7592  *) # EBCDIC based system
7593   lt_SP2NL='tr \100 \n'
7594   lt_NL2SP='tr \r\n \100\100'
7595   ;;
7596 esac
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7607 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7608 if ${lt_cv_to_host_file_cmd+:} false; then :
7609   $as_echo_n "(cached) " >&6
7610 else
7611   case $host in
7612   *-*-mingw* )
7613     case $build in
7614       *-*-mingw* ) # actually msys
7615         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7616         ;;
7617       *-*-cygwin* )
7618         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7619         ;;
7620       * ) # otherwise, assume *nix
7621         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7622         ;;
7623     esac
7624     ;;
7625   *-*-cygwin* )
7626     case $build in
7627       *-*-mingw* ) # actually msys
7628         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7629         ;;
7630       *-*-cygwin* )
7631         lt_cv_to_host_file_cmd=func_convert_file_noop
7632         ;;
7633       * ) # otherwise, assume *nix
7634         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7635         ;;
7636     esac
7637     ;;
7638   * ) # unhandled hosts (and "normal" native builds)
7639     lt_cv_to_host_file_cmd=func_convert_file_noop
7640     ;;
7641 esac
7642
7643 fi
7644
7645 to_host_file_cmd=$lt_cv_to_host_file_cmd
7646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7647 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
7648
7649
7650
7651
7652
7653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7654 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7655 if ${lt_cv_to_tool_file_cmd+:} false; then :
7656   $as_echo_n "(cached) " >&6
7657 else
7658   #assume ordinary cross tools, or native build.
7659 lt_cv_to_tool_file_cmd=func_convert_file_noop
7660 case $host in
7661   *-*-mingw* )
7662     case $build in
7663       *-*-mingw* ) # actually msys
7664         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7665         ;;
7666     esac
7667     ;;
7668 esac
7669
7670 fi
7671
7672 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7674 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7675
7676
7677
7678
7679
7680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7681 $as_echo_n "checking for $LD option to reload object files... " >&6; }
7682 if ${lt_cv_ld_reload_flag+:} false; then :
7683   $as_echo_n "(cached) " >&6
7684 else
7685   lt_cv_ld_reload_flag='-r'
7686 fi
7687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7688 $as_echo "$lt_cv_ld_reload_flag" >&6; }
7689 reload_flag=$lt_cv_ld_reload_flag
7690 case $reload_flag in
7691 "" | " "*) ;;
7692 *) reload_flag=" $reload_flag" ;;
7693 esac
7694 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7695 case $host_os in
7696   cygwin* | mingw* | pw32* | cegcc*)
7697     if test yes != "$GCC"; then
7698       reload_cmds=false
7699     fi
7700     ;;
7701   darwin*)
7702     if test yes = "$GCC"; then
7703       reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7704     else
7705       reload_cmds='$LD$reload_flag -o $output$reload_objs'
7706     fi
7707     ;;
7708 esac
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718 if test -n "$ac_tool_prefix"; then
7719   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7720 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7722 $as_echo_n "checking for $ac_word... " >&6; }
7723 if ${ac_cv_prog_OBJDUMP+:} false; then :
7724   $as_echo_n "(cached) " >&6
7725 else
7726   if test -n "$OBJDUMP"; then
7727   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7728 else
7729 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7730 for as_dir in $PATH
7731 do
7732   IFS=$as_save_IFS
7733   test -z "$as_dir" && as_dir=.
7734     for ac_exec_ext in '' $ac_executable_extensions; do
7735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7736     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7738     break 2
7739   fi
7740 done
7741   done
7742 IFS=$as_save_IFS
7743
7744 fi
7745 fi
7746 OBJDUMP=$ac_cv_prog_OBJDUMP
7747 if test -n "$OBJDUMP"; then
7748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7749 $as_echo "$OBJDUMP" >&6; }
7750 else
7751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7752 $as_echo "no" >&6; }
7753 fi
7754
7755
7756 fi
7757 if test -z "$ac_cv_prog_OBJDUMP"; then
7758   ac_ct_OBJDUMP=$OBJDUMP
7759   # Extract the first word of "objdump", so it can be a program name with args.
7760 set dummy objdump; ac_word=$2
7761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7762 $as_echo_n "checking for $ac_word... " >&6; }
7763 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7764   $as_echo_n "(cached) " >&6
7765 else
7766   if test -n "$ac_ct_OBJDUMP"; then
7767   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7768 else
7769 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7770 for as_dir in $PATH
7771 do
7772   IFS=$as_save_IFS
7773   test -z "$as_dir" && as_dir=.
7774     for ac_exec_ext in '' $ac_executable_extensions; do
7775   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7776     ac_cv_prog_ac_ct_OBJDUMP="objdump"
7777     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7778     break 2
7779   fi
7780 done
7781   done
7782 IFS=$as_save_IFS
7783
7784 fi
7785 fi
7786 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7787 if test -n "$ac_ct_OBJDUMP"; then
7788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7789 $as_echo "$ac_ct_OBJDUMP" >&6; }
7790 else
7791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7792 $as_echo "no" >&6; }
7793 fi
7794
7795   if test "x$ac_ct_OBJDUMP" = x; then
7796     OBJDUMP="false"
7797   else
7798     case $cross_compiling:$ac_tool_warned in
7799 yes:)
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7801 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7802 ac_tool_warned=yes ;;
7803 esac
7804     OBJDUMP=$ac_ct_OBJDUMP
7805   fi
7806 else
7807   OBJDUMP="$ac_cv_prog_OBJDUMP"
7808 fi
7809
7810 test -z "$OBJDUMP" && OBJDUMP=objdump
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7821 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
7822 if ${lt_cv_deplibs_check_method+:} false; then :
7823   $as_echo_n "(cached) " >&6
7824 else
7825   lt_cv_file_magic_cmd='$MAGIC_CMD'
7826 lt_cv_file_magic_test_file=
7827 lt_cv_deplibs_check_method='unknown'
7828 # Need to set the preceding variable on all platforms that support
7829 # interlibrary dependencies.
7830 # 'none' -- dependencies not supported.
7831 # 'unknown' -- same as none, but documents that we really don't know.
7832 # 'pass_all' -- all dependencies passed with no checks.
7833 # 'test_compile' -- check by making test program.
7834 # 'file_magic [[regex]]' -- check by looking for files in library path
7835 # that responds to the $file_magic_cmd with a given extended regex.
7836 # If you have 'file' or equivalent on your system and you're not sure
7837 # whether 'pass_all' will *always* work, you probably want this one.
7838
7839 case $host_os in
7840 aix[4-9]*)
7841   lt_cv_deplibs_check_method=pass_all
7842   ;;
7843
7844 beos*)
7845   lt_cv_deplibs_check_method=pass_all
7846   ;;
7847
7848 bsdi[45]*)
7849   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
7850   lt_cv_file_magic_cmd='/usr/bin/file -L'
7851   lt_cv_file_magic_test_file=/shlib/libc.so
7852   ;;
7853
7854 cygwin*)
7855   # func_win32_libid is a shell function defined in ltmain.sh
7856   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7857   lt_cv_file_magic_cmd='func_win32_libid'
7858   ;;
7859
7860 mingw* | pw32*)
7861   # Base MSYS/MinGW do not provide the 'file' command needed by
7862   # func_win32_libid shell function, so use a weaker test based on 'objdump',
7863   # unless we find 'file', for example because we are cross-compiling.
7864   if ( file / ) >/dev/null 2>&1; then
7865     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7866     lt_cv_file_magic_cmd='func_win32_libid'
7867   else
7868     # Keep this pattern in sync with the one in func_win32_libid.
7869     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
7870     lt_cv_file_magic_cmd='$OBJDUMP -f'
7871   fi
7872   ;;
7873
7874 cegcc*)
7875   # use the weaker test based on 'objdump'. See mingw*.
7876   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
7877   lt_cv_file_magic_cmd='$OBJDUMP -f'
7878   ;;
7879
7880 darwin* | rhapsody*)
7881   lt_cv_deplibs_check_method=pass_all
7882   ;;
7883
7884 freebsd* | dragonfly*)
7885   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7886     case $host_cpu in
7887     i*86 )
7888       # Not sure whether the presence of OpenBSD here was a mistake.
7889       # Let's accept both of them until this is cleared up.
7890       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
7891       lt_cv_file_magic_cmd=/usr/bin/file
7892       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7893       ;;
7894     esac
7895   else
7896     lt_cv_deplibs_check_method=pass_all
7897   fi
7898   ;;
7899
7900 haiku*)
7901   lt_cv_deplibs_check_method=pass_all
7902   ;;
7903
7904 hpux10.20* | hpux11*)
7905   lt_cv_file_magic_cmd=/usr/bin/file
7906   case $host_cpu in
7907   ia64*)
7908     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
7909     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7910     ;;
7911   hppa*64*)
7912     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]'
7913     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7914     ;;
7915   *)
7916     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
7917     lt_cv_file_magic_test_file=/usr/lib/libc.sl
7918     ;;
7919   esac
7920   ;;
7921
7922 interix[3-9]*)
7923   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
7924   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
7925   ;;
7926
7927 irix5* | irix6* | nonstopux*)
7928   case $LD in
7929   *-32|*"-32 ") libmagic=32-bit;;
7930   *-n32|*"-n32 ") libmagic=N32;;
7931   *-64|*"-64 ") libmagic=64-bit;;
7932   *) libmagic=never-match;;
7933   esac
7934   lt_cv_deplibs_check_method=pass_all
7935   ;;
7936
7937 # This must be glibc/ELF.
7938 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7939   lt_cv_deplibs_check_method=pass_all
7940   ;;
7941
7942 netbsd*)
7943   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7944     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7945   else
7946     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
7947   fi
7948   ;;
7949
7950 newos6*)
7951   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
7952   lt_cv_file_magic_cmd=/usr/bin/file
7953   lt_cv_file_magic_test_file=/usr/lib/libnls.so
7954   ;;
7955
7956 *nto* | *qnx*)
7957   lt_cv_deplibs_check_method=pass_all
7958   ;;
7959
7960 openbsd* | bitrig*)
7961   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
7962     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
7963   else
7964     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7965   fi
7966   ;;
7967
7968 osf3* | osf4* | osf5*)
7969   lt_cv_deplibs_check_method=pass_all
7970   ;;
7971
7972 rdos*)
7973   lt_cv_deplibs_check_method=pass_all
7974   ;;
7975
7976 solaris*)
7977   lt_cv_deplibs_check_method=pass_all
7978   ;;
7979
7980 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
7981   lt_cv_deplibs_check_method=pass_all
7982   ;;
7983
7984 sysv4 | sysv4.3*)
7985   case $host_vendor in
7986   motorola)
7987     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]'
7988     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7989     ;;
7990   ncr)
7991     lt_cv_deplibs_check_method=pass_all
7992     ;;
7993   sequent)
7994     lt_cv_file_magic_cmd='/bin/file'
7995     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
7996     ;;
7997   sni)
7998     lt_cv_file_magic_cmd='/bin/file'
7999     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
8000     lt_cv_file_magic_test_file=/lib/libc.so
8001     ;;
8002   siemens)
8003     lt_cv_deplibs_check_method=pass_all
8004     ;;
8005   pc)
8006     lt_cv_deplibs_check_method=pass_all
8007     ;;
8008   esac
8009   ;;
8010
8011 tpf*)
8012   lt_cv_deplibs_check_method=pass_all
8013   ;;
8014 os2*)
8015   lt_cv_deplibs_check_method=pass_all
8016   ;;
8017 esac
8018
8019 fi
8020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
8021 $as_echo "$lt_cv_deplibs_check_method" >&6; }
8022
8023 file_magic_glob=
8024 want_nocaseglob=no
8025 if test "$build" = "$host"; then
8026   case $host_os in
8027   mingw* | pw32*)
8028     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
8029       want_nocaseglob=yes
8030     else
8031       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
8032     fi
8033     ;;
8034   esac
8035 fi
8036
8037 file_magic_cmd=$lt_cv_file_magic_cmd
8038 deplibs_check_method=$lt_cv_deplibs_check_method
8039 test -z "$deplibs_check_method" && deplibs_check_method=unknown
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062 if test -n "$ac_tool_prefix"; then
8063   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8064 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8066 $as_echo_n "checking for $ac_word... " >&6; }
8067 if ${ac_cv_prog_DLLTOOL+:} false; then :
8068   $as_echo_n "(cached) " >&6
8069 else
8070   if test -n "$DLLTOOL"; then
8071   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8072 else
8073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8074 for as_dir in $PATH
8075 do
8076   IFS=$as_save_IFS
8077   test -z "$as_dir" && as_dir=.
8078     for ac_exec_ext in '' $ac_executable_extensions; do
8079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8080     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8082     break 2
8083   fi
8084 done
8085   done
8086 IFS=$as_save_IFS
8087
8088 fi
8089 fi
8090 DLLTOOL=$ac_cv_prog_DLLTOOL
8091 if test -n "$DLLTOOL"; then
8092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8093 $as_echo "$DLLTOOL" >&6; }
8094 else
8095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8096 $as_echo "no" >&6; }
8097 fi
8098
8099
8100 fi
8101 if test -z "$ac_cv_prog_DLLTOOL"; then
8102   ac_ct_DLLTOOL=$DLLTOOL
8103   # Extract the first word of "dlltool", so it can be a program name with args.
8104 set dummy dlltool; ac_word=$2
8105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8106 $as_echo_n "checking for $ac_word... " >&6; }
8107 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8108   $as_echo_n "(cached) " >&6
8109 else
8110   if test -n "$ac_ct_DLLTOOL"; then
8111   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8112 else
8113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8114 for as_dir in $PATH
8115 do
8116   IFS=$as_save_IFS
8117   test -z "$as_dir" && as_dir=.
8118     for ac_exec_ext in '' $ac_executable_extensions; do
8119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8120     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8122     break 2
8123   fi
8124 done
8125   done
8126 IFS=$as_save_IFS
8127
8128 fi
8129 fi
8130 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8131 if test -n "$ac_ct_DLLTOOL"; then
8132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8133 $as_echo "$ac_ct_DLLTOOL" >&6; }
8134 else
8135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8136 $as_echo "no" >&6; }
8137 fi
8138
8139   if test "x$ac_ct_DLLTOOL" = x; then
8140     DLLTOOL="false"
8141   else
8142     case $cross_compiling:$ac_tool_warned in
8143 yes:)
8144 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8145 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8146 ac_tool_warned=yes ;;
8147 esac
8148     DLLTOOL=$ac_ct_DLLTOOL
8149   fi
8150 else
8151   DLLTOOL="$ac_cv_prog_DLLTOOL"
8152 fi
8153
8154 test -z "$DLLTOOL" && DLLTOOL=dlltool
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8166 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8167 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8168   $as_echo_n "(cached) " >&6
8169 else
8170   lt_cv_sharedlib_from_linklib_cmd='unknown'
8171
8172 case $host_os in
8173 cygwin* | mingw* | pw32* | cegcc*)
8174   # two different shell functions defined in ltmain.sh;
8175   # decide which one to use based on capabilities of $DLLTOOL
8176   case `$DLLTOOL --help 2>&1` in
8177   *--identify-strict*)
8178     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8179     ;;
8180   *)
8181     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8182     ;;
8183   esac
8184   ;;
8185 *)
8186   # fallback: assume linklib IS sharedlib
8187   lt_cv_sharedlib_from_linklib_cmd=$ECHO
8188   ;;
8189 esac
8190
8191 fi
8192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8193 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8194 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8195 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8196
8197
8198
8199
8200
8201
8202
8203 if test -n "$ac_tool_prefix"; then
8204   for ac_prog in ar
8205   do
8206     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8207 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8209 $as_echo_n "checking for $ac_word... " >&6; }
8210 if ${ac_cv_prog_AR+:} false; then :
8211   $as_echo_n "(cached) " >&6
8212 else
8213   if test -n "$AR"; then
8214   ac_cv_prog_AR="$AR" # Let the user override the test.
8215 else
8216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8217 for as_dir in $PATH
8218 do
8219   IFS=$as_save_IFS
8220   test -z "$as_dir" && as_dir=.
8221     for ac_exec_ext in '' $ac_executable_extensions; do
8222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8223     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8225     break 2
8226   fi
8227 done
8228   done
8229 IFS=$as_save_IFS
8230
8231 fi
8232 fi
8233 AR=$ac_cv_prog_AR
8234 if test -n "$AR"; then
8235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8236 $as_echo "$AR" >&6; }
8237 else
8238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8239 $as_echo "no" >&6; }
8240 fi
8241
8242
8243     test -n "$AR" && break
8244   done
8245 fi
8246 if test -z "$AR"; then
8247   ac_ct_AR=$AR
8248   for ac_prog in ar
8249 do
8250   # Extract the first word of "$ac_prog", so it can be a program name with args.
8251 set dummy $ac_prog; ac_word=$2
8252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8253 $as_echo_n "checking for $ac_word... " >&6; }
8254 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8255   $as_echo_n "(cached) " >&6
8256 else
8257   if test -n "$ac_ct_AR"; then
8258   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8259 else
8260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8261 for as_dir in $PATH
8262 do
8263   IFS=$as_save_IFS
8264   test -z "$as_dir" && as_dir=.
8265     for ac_exec_ext in '' $ac_executable_extensions; do
8266   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8267     ac_cv_prog_ac_ct_AR="$ac_prog"
8268     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8269     break 2
8270   fi
8271 done
8272   done
8273 IFS=$as_save_IFS
8274
8275 fi
8276 fi
8277 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8278 if test -n "$ac_ct_AR"; then
8279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8280 $as_echo "$ac_ct_AR" >&6; }
8281 else
8282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8283 $as_echo "no" >&6; }
8284 fi
8285
8286
8287   test -n "$ac_ct_AR" && break
8288 done
8289
8290   if test "x$ac_ct_AR" = x; then
8291     AR="false"
8292   else
8293     case $cross_compiling:$ac_tool_warned in
8294 yes:)
8295 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8296 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8297 ac_tool_warned=yes ;;
8298 esac
8299     AR=$ac_ct_AR
8300   fi
8301 fi
8302
8303 : ${AR=ar}
8304 : ${AR_FLAGS=cru}
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8317 $as_echo_n "checking for archiver @FILE support... " >&6; }
8318 if ${lt_cv_ar_at_file+:} false; then :
8319   $as_echo_n "(cached) " >&6
8320 else
8321   lt_cv_ar_at_file=no
8322    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8323 /* end confdefs.h.  */
8324
8325 int
8326 main ()
8327 {
8328
8329   ;
8330   return 0;
8331 }
8332 _ACEOF
8333 if ac_fn_c_try_compile "$LINENO"; then :
8334   echo conftest.$ac_objext > conftest.lst
8335       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8336       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8337   (eval $lt_ar_try) 2>&5
8338   ac_status=$?
8339   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8340   test $ac_status = 0; }
8341       if test 0 -eq "$ac_status"; then
8342         # Ensure the archiver fails upon bogus file names.
8343         rm -f conftest.$ac_objext libconftest.a
8344         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8345   (eval $lt_ar_try) 2>&5
8346   ac_status=$?
8347   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8348   test $ac_status = 0; }
8349         if test 0 -ne "$ac_status"; then
8350           lt_cv_ar_at_file=@
8351         fi
8352       fi
8353       rm -f conftest.* libconftest.a
8354
8355 fi
8356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8357
8358 fi
8359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8360 $as_echo "$lt_cv_ar_at_file" >&6; }
8361
8362 if test no = "$lt_cv_ar_at_file"; then
8363   archiver_list_spec=
8364 else
8365   archiver_list_spec=$lt_cv_ar_at_file
8366 fi
8367
8368
8369
8370
8371
8372
8373
8374 if test -n "$ac_tool_prefix"; then
8375   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8376 set dummy ${ac_tool_prefix}strip; ac_word=$2
8377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8378 $as_echo_n "checking for $ac_word... " >&6; }
8379 if ${ac_cv_prog_STRIP+:} false; then :
8380   $as_echo_n "(cached) " >&6
8381 else
8382   if test -n "$STRIP"; then
8383   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8384 else
8385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8386 for as_dir in $PATH
8387 do
8388   IFS=$as_save_IFS
8389   test -z "$as_dir" && as_dir=.
8390     for ac_exec_ext in '' $ac_executable_extensions; do
8391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8392     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8394     break 2
8395   fi
8396 done
8397   done
8398 IFS=$as_save_IFS
8399
8400 fi
8401 fi
8402 STRIP=$ac_cv_prog_STRIP
8403 if test -n "$STRIP"; then
8404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8405 $as_echo "$STRIP" >&6; }
8406 else
8407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8408 $as_echo "no" >&6; }
8409 fi
8410
8411
8412 fi
8413 if test -z "$ac_cv_prog_STRIP"; then
8414   ac_ct_STRIP=$STRIP
8415   # Extract the first word of "strip", so it can be a program name with args.
8416 set dummy strip; ac_word=$2
8417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8418 $as_echo_n "checking for $ac_word... " >&6; }
8419 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8420   $as_echo_n "(cached) " >&6
8421 else
8422   if test -n "$ac_ct_STRIP"; then
8423   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8424 else
8425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8426 for as_dir in $PATH
8427 do
8428   IFS=$as_save_IFS
8429   test -z "$as_dir" && as_dir=.
8430     for ac_exec_ext in '' $ac_executable_extensions; do
8431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8432     ac_cv_prog_ac_ct_STRIP="strip"
8433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8434     break 2
8435   fi
8436 done
8437   done
8438 IFS=$as_save_IFS
8439
8440 fi
8441 fi
8442 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8443 if test -n "$ac_ct_STRIP"; then
8444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8445 $as_echo "$ac_ct_STRIP" >&6; }
8446 else
8447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8448 $as_echo "no" >&6; }
8449 fi
8450
8451   if test "x$ac_ct_STRIP" = x; then
8452     STRIP=":"
8453   else
8454     case $cross_compiling:$ac_tool_warned in
8455 yes:)
8456 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8457 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8458 ac_tool_warned=yes ;;
8459 esac
8460     STRIP=$ac_ct_STRIP
8461   fi
8462 else
8463   STRIP="$ac_cv_prog_STRIP"
8464 fi
8465
8466 test -z "$STRIP" && STRIP=:
8467
8468
8469
8470
8471
8472
8473 if test -n "$ac_tool_prefix"; then
8474   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8475 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8477 $as_echo_n "checking for $ac_word... " >&6; }
8478 if ${ac_cv_prog_RANLIB+:} false; then :
8479   $as_echo_n "(cached) " >&6
8480 else
8481   if test -n "$RANLIB"; then
8482   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8483 else
8484 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8485 for as_dir in $PATH
8486 do
8487   IFS=$as_save_IFS
8488   test -z "$as_dir" && as_dir=.
8489     for ac_exec_ext in '' $ac_executable_extensions; do
8490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8491     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8493     break 2
8494   fi
8495 done
8496   done
8497 IFS=$as_save_IFS
8498
8499 fi
8500 fi
8501 RANLIB=$ac_cv_prog_RANLIB
8502 if test -n "$RANLIB"; then
8503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8504 $as_echo "$RANLIB" >&6; }
8505 else
8506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8507 $as_echo "no" >&6; }
8508 fi
8509
8510
8511 fi
8512 if test -z "$ac_cv_prog_RANLIB"; then
8513   ac_ct_RANLIB=$RANLIB
8514   # Extract the first word of "ranlib", so it can be a program name with args.
8515 set dummy ranlib; ac_word=$2
8516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8517 $as_echo_n "checking for $ac_word... " >&6; }
8518 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8519   $as_echo_n "(cached) " >&6
8520 else
8521   if test -n "$ac_ct_RANLIB"; then
8522   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8523 else
8524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8525 for as_dir in $PATH
8526 do
8527   IFS=$as_save_IFS
8528   test -z "$as_dir" && as_dir=.
8529     for ac_exec_ext in '' $ac_executable_extensions; do
8530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8531     ac_cv_prog_ac_ct_RANLIB="ranlib"
8532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8533     break 2
8534   fi
8535 done
8536   done
8537 IFS=$as_save_IFS
8538
8539 fi
8540 fi
8541 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8542 if test -n "$ac_ct_RANLIB"; then
8543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8544 $as_echo "$ac_ct_RANLIB" >&6; }
8545 else
8546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8547 $as_echo "no" >&6; }
8548 fi
8549
8550   if test "x$ac_ct_RANLIB" = x; then
8551     RANLIB=":"
8552   else
8553     case $cross_compiling:$ac_tool_warned in
8554 yes:)
8555 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8556 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8557 ac_tool_warned=yes ;;
8558 esac
8559     RANLIB=$ac_ct_RANLIB
8560   fi
8561 else
8562   RANLIB="$ac_cv_prog_RANLIB"
8563 fi
8564
8565 test -z "$RANLIB" && RANLIB=:
8566
8567
8568
8569
8570
8571
8572 # Determine commands to create old-style static archives.
8573 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8574 old_postinstall_cmds='chmod 644 $oldlib'
8575 old_postuninstall_cmds=
8576
8577 if test -n "$RANLIB"; then
8578   case $host_os in
8579   bitrig* | openbsd*)
8580     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8581     ;;
8582   *)
8583     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8584     ;;
8585   esac
8586   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8587 fi
8588
8589 case $host_os in
8590   darwin*)
8591     lock_old_archive_extraction=yes ;;
8592   *)
8593     lock_old_archive_extraction=no ;;
8594 esac
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616 for ac_prog in gawk mawk nawk awk
8617 do
8618   # Extract the first word of "$ac_prog", so it can be a program name with args.
8619 set dummy $ac_prog; ac_word=$2
8620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8621 $as_echo_n "checking for $ac_word... " >&6; }
8622 if ${ac_cv_prog_AWK+:} false; then :
8623   $as_echo_n "(cached) " >&6
8624 else
8625   if test -n "$AWK"; then
8626   ac_cv_prog_AWK="$AWK" # Let the user override the test.
8627 else
8628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8629 for as_dir in $PATH
8630 do
8631   IFS=$as_save_IFS
8632   test -z "$as_dir" && as_dir=.
8633     for ac_exec_ext in '' $ac_executable_extensions; do
8634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8635     ac_cv_prog_AWK="$ac_prog"
8636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8637     break 2
8638   fi
8639 done
8640   done
8641 IFS=$as_save_IFS
8642
8643 fi
8644 fi
8645 AWK=$ac_cv_prog_AWK
8646 if test -n "$AWK"; then
8647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8648 $as_echo "$AWK" >&6; }
8649 else
8650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8651 $as_echo "no" >&6; }
8652 fi
8653
8654
8655   test -n "$AWK" && break
8656 done
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676 # If no C compiler was specified, use CC.
8677 LTCC=${LTCC-"$CC"}
8678
8679 # If no C compiler flags were specified, use CFLAGS.
8680 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8681
8682 # Allow CC to be a program name with arguments.
8683 compiler=$CC
8684
8685
8686 # Check for command to grab the raw symbol name followed by C symbol from nm.
8687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8688 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8689 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8690   $as_echo_n "(cached) " >&6
8691 else
8692
8693 # These are sane defaults that work on at least a few old systems.
8694 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8695
8696 # Character class describing NM global symbol codes.
8697 symcode='[BCDEGRST]'
8698
8699 # Regexp to match symbols that can be accessed directly from C.
8700 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8701
8702 # Define system-specific variables.
8703 case $host_os in
8704 aix*)
8705   symcode='[BCDT]'
8706   ;;
8707 cygwin* | mingw* | pw32* | cegcc*)
8708   symcode='[ABCDGISTW]'
8709   ;;
8710 hpux*)
8711   if test ia64 = "$host_cpu"; then
8712     symcode='[ABCDEGRST]'
8713   fi
8714   ;;
8715 irix* | nonstopux*)
8716   symcode='[BCDEGRST]'
8717   ;;
8718 osf*)
8719   symcode='[BCDEGQRST]'
8720   ;;
8721 solaris*)
8722   symcode='[BDRT]'
8723   ;;
8724 sco3.2v5*)
8725   symcode='[DT]'
8726   ;;
8727 sysv4.2uw2*)
8728   symcode='[DT]'
8729   ;;
8730 sysv5* | sco5v6* | unixware* | OpenUNIX*)
8731   symcode='[ABDT]'
8732   ;;
8733 sysv4)
8734   symcode='[DFNSTU]'
8735   ;;
8736 esac
8737
8738 # If we're using GNU nm, then use its standard symbol codes.
8739 case `$NM -V 2>&1` in
8740 *GNU* | *'with BFD'*)
8741   symcode='[ABCDGIRSTW]' ;;
8742 esac
8743
8744 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8745   # Gets list of data symbols to import.
8746   lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8747   # Adjust the below global symbol transforms to fixup imported variables.
8748   lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8749   lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
8750   lt_c_name_lib_hook="\
8751   -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
8752   -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
8753 else
8754   # Disable hooks by default.
8755   lt_cv_sys_global_symbol_to_import=
8756   lt_cdecl_hook=
8757   lt_c_name_hook=
8758   lt_c_name_lib_hook=
8759 fi
8760
8761 # Transform an extracted symbol line into a proper C declaration.
8762 # Some systems (esp. on ia64) link data and code symbols differently,
8763 # so use this general approach.
8764 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8765 $lt_cdecl_hook\
8766 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8767 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8768
8769 # Transform an extracted symbol line into symbol name and symbol address
8770 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8771 $lt_c_name_hook\
8772 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8773 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8774
8775 # Transform an extracted symbol line into symbol name with lib prefix and
8776 # symbol address.
8777 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8778 $lt_c_name_lib_hook\
8779 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8780 " -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8781 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8782
8783 # Handle CRLF in mingw tool chain
8784 opt_cr=
8785 case $build_os in
8786 mingw*)
8787   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8788   ;;
8789 esac
8790
8791 # Try without a prefix underscore, then with it.
8792 for ac_symprfx in "" "_"; do
8793
8794   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8795   symxfrm="\\1 $ac_symprfx\\2 \\2"
8796
8797   # Write the raw and C identifiers.
8798   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8799     # Fake it for dumpbin and say T for any non-static function,
8800     # D for any global variable and I for any imported variable.
8801     # Also find C++ and __fastcall symbols from MSVC++,
8802     # which start with @ or ?.
8803     lt_cv_sys_global_symbol_pipe="$AWK '"\
8804 "     {last_section=section; section=\$ 3};"\
8805 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8806 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8807 "     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8808 "     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8809 "     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8810 "     \$ 0!~/External *\|/{next};"\
8811 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8812 "     {if(hide[section]) next};"\
8813 "     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8814 "     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8815 "     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8816 "     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8817 "     ' prfx=^$ac_symprfx"
8818   else
8819     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8820   fi
8821   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8822
8823   # Check to see that the pipe works correctly.
8824   pipe_works=no
8825
8826   rm -f conftest*
8827   cat > conftest.$ac_ext <<_LT_EOF
8828 #ifdef __cplusplus
8829 extern "C" {
8830 #endif
8831 char nm_test_var;
8832 void nm_test_func(void);
8833 void nm_test_func(void){}
8834 #ifdef __cplusplus
8835 }
8836 #endif
8837 int main(){nm_test_var='a';nm_test_func();return(0);}
8838 _LT_EOF
8839
8840   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8841   (eval $ac_compile) 2>&5
8842   ac_status=$?
8843   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8844   test $ac_status = 0; }; then
8845     # Now try to grab the symbols.
8846     nlist=conftest.nm
8847     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
8848   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
8849   ac_status=$?
8850   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8851   test $ac_status = 0; } && test -s "$nlist"; then
8852       # Try sorting and uniquifying the output.
8853       if sort "$nlist" | uniq > "$nlist"T; then
8854         mv -f "$nlist"T "$nlist"
8855       else
8856         rm -f "$nlist"T
8857       fi
8858
8859       # Make sure that we snagged all the symbols we need.
8860       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
8861         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
8862           cat <<_LT_EOF > conftest.$ac_ext
8863 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
8864 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
8865 /* DATA imports from DLLs on WIN32 can't be const, because runtime
8866    relocations are performed -- see ld's documentation on pseudo-relocs.  */
8867 # define LT_DLSYM_CONST
8868 #elif defined __osf__
8869 /* This system does not cope well with relocations in const data.  */
8870 # define LT_DLSYM_CONST
8871 #else
8872 # define LT_DLSYM_CONST const
8873 #endif
8874
8875 #ifdef __cplusplus
8876 extern "C" {
8877 #endif
8878
8879 _LT_EOF
8880           # Now generate the symbol file.
8881           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
8882
8883           cat <<_LT_EOF >> conftest.$ac_ext
8884
8885 /* The mapping between symbol names and symbols.  */
8886 LT_DLSYM_CONST struct {
8887   const char *name;
8888   void       *address;
8889 }
8890 lt__PROGRAM__LTX_preloaded_symbols[] =
8891 {
8892   { "@PROGRAM@", (void *) 0 },
8893 _LT_EOF
8894           $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
8895           cat <<\_LT_EOF >> conftest.$ac_ext
8896   {0, (void *) 0}
8897 };
8898
8899 /* This works around a problem in FreeBSD linker */
8900 #ifdef FREEBSD_WORKAROUND
8901 static const void *lt_preloaded_setup() {
8902   return lt__PROGRAM__LTX_preloaded_symbols;
8903 }
8904 #endif
8905
8906 #ifdef __cplusplus
8907 }
8908 #endif
8909 _LT_EOF
8910           # Now try linking the two files.
8911           mv conftest.$ac_objext conftstm.$ac_objext
8912           lt_globsym_save_LIBS=$LIBS
8913           lt_globsym_save_CFLAGS=$CFLAGS
8914           LIBS=conftstm.$ac_objext
8915           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
8916           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8917   (eval $ac_link) 2>&5
8918   ac_status=$?
8919   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8920   test $ac_status = 0; } && test -s conftest$ac_exeext; then
8921             pipe_works=yes
8922           fi
8923           LIBS=$lt_globsym_save_LIBS
8924           CFLAGS=$lt_globsym_save_CFLAGS
8925         else
8926           echo "cannot find nm_test_func in $nlist" >&5
8927         fi
8928       else
8929         echo "cannot find nm_test_var in $nlist" >&5
8930       fi
8931     else
8932       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
8933     fi
8934   else
8935     echo "$progname: failed program was:" >&5
8936     cat conftest.$ac_ext >&5
8937   fi
8938   rm -rf conftest* conftst*
8939
8940   # Do not use the global_symbol_pipe unless it works.
8941   if test yes = "$pipe_works"; then
8942     break
8943   else
8944     lt_cv_sys_global_symbol_pipe=
8945   fi
8946 done
8947
8948 fi
8949
8950 if test -z "$lt_cv_sys_global_symbol_pipe"; then
8951   lt_cv_sys_global_symbol_to_cdecl=
8952 fi
8953 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
8954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
8955 $as_echo "failed" >&6; }
8956 else
8957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
8958 $as_echo "ok" >&6; }
8959 fi
8960
8961 # Response file support.
8962 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8963   nm_file_list_spec='@'
8964 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
8965   nm_file_list_spec='@'
8966 fi
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
9005 $as_echo_n "checking for sysroot... " >&6; }
9006
9007 # Check whether --with-sysroot was given.
9008 if test "${with_sysroot+set}" = set; then :
9009   withval=$with_sysroot;
9010 else
9011   with_sysroot=no
9012 fi
9013
9014
9015 lt_sysroot=
9016 case $with_sysroot in #(
9017  yes)
9018    if test yes = "$GCC"; then
9019      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
9020    fi
9021    ;; #(
9022  /*)
9023    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
9024    ;; #(
9025  no|'')
9026    ;; #(
9027  *)
9028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
9029 $as_echo "$with_sysroot" >&6; }
9030    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
9031    ;;
9032 esac
9033
9034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
9035 $as_echo "${lt_sysroot:-no}" >&6; }
9036
9037
9038
9039
9040
9041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
9042 $as_echo_n "checking for a working dd... " >&6; }
9043 if ${ac_cv_path_lt_DD+:} false; then :
9044   $as_echo_n "(cached) " >&6
9045 else
9046   printf 0123456789abcdef0123456789abcdef >conftest.i
9047 cat conftest.i conftest.i >conftest2.i
9048 : ${lt_DD:=$DD}
9049 if test -z "$lt_DD"; then
9050   ac_path_lt_DD_found=false
9051   # Loop through the user's path and test for each of PROGNAME-LIST
9052   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9053 for as_dir in $PATH
9054 do
9055   IFS=$as_save_IFS
9056   test -z "$as_dir" && as_dir=.
9057     for ac_prog in dd; do
9058     for ac_exec_ext in '' $ac_executable_extensions; do
9059       ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
9060       as_fn_executable_p "$ac_path_lt_DD" || continue
9061 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9062   cmp -s conftest.i conftest.out \
9063   && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
9064 fi
9065       $ac_path_lt_DD_found && break 3
9066     done
9067   done
9068   done
9069 IFS=$as_save_IFS
9070   if test -z "$ac_cv_path_lt_DD"; then
9071     :
9072   fi
9073 else
9074   ac_cv_path_lt_DD=$lt_DD
9075 fi
9076
9077 rm -f conftest.i conftest2.i conftest.out
9078 fi
9079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
9080 $as_echo "$ac_cv_path_lt_DD" >&6; }
9081
9082
9083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
9084 $as_echo_n "checking how to truncate binary pipes... " >&6; }
9085 if ${lt_cv_truncate_bin+:} false; then :
9086   $as_echo_n "(cached) " >&6
9087 else
9088   printf 0123456789abcdef0123456789abcdef >conftest.i
9089 cat conftest.i conftest.i >conftest2.i
9090 lt_cv_truncate_bin=
9091 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9092   cmp -s conftest.i conftest.out \
9093   && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
9094 fi
9095 rm -f conftest.i conftest2.i conftest.out
9096 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
9097 fi
9098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
9099 $as_echo "$lt_cv_truncate_bin" >&6; }
9100
9101
9102
9103
9104
9105
9106
9107 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
9108 func_cc_basename ()
9109 {
9110     for cc_temp in $*""; do
9111       case $cc_temp in
9112         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9113         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9114         \-*) ;;
9115         *) break;;
9116       esac
9117     done
9118     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9119 }
9120
9121 # Check whether --enable-libtool-lock was given.
9122 if test "${enable_libtool_lock+set}" = set; then :
9123   enableval=$enable_libtool_lock;
9124 fi
9125
9126 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
9127
9128 # Some flags need to be propagated to the compiler or linker for good
9129 # libtool support.
9130 case $host in
9131 ia64-*-hpux*)
9132   # Find out what ABI is being produced by ac_compile, and set mode
9133   # options accordingly.
9134   echo 'int i;' > conftest.$ac_ext
9135   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9136   (eval $ac_compile) 2>&5
9137   ac_status=$?
9138   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9139   test $ac_status = 0; }; then
9140     case `/usr/bin/file conftest.$ac_objext` in
9141       *ELF-32*)
9142         HPUX_IA64_MODE=32
9143         ;;
9144       *ELF-64*)
9145         HPUX_IA64_MODE=64
9146         ;;
9147     esac
9148   fi
9149   rm -rf conftest*
9150   ;;
9151 *-*-irix6*)
9152   # Find out what ABI is being produced by ac_compile, and set linker
9153   # options accordingly.
9154   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9155   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9156   (eval $ac_compile) 2>&5
9157   ac_status=$?
9158   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9159   test $ac_status = 0; }; then
9160     if test yes = "$lt_cv_prog_gnu_ld"; then
9161       case `/usr/bin/file conftest.$ac_objext` in
9162         *32-bit*)
9163           LD="${LD-ld} -melf32bsmip"
9164           ;;
9165         *N32*)
9166           LD="${LD-ld} -melf32bmipn32"
9167           ;;
9168         *64-bit*)
9169           LD="${LD-ld} -melf64bmip"
9170         ;;
9171       esac
9172     else
9173       case `/usr/bin/file conftest.$ac_objext` in
9174         *32-bit*)
9175           LD="${LD-ld} -32"
9176           ;;
9177         *N32*)
9178           LD="${LD-ld} -n32"
9179           ;;
9180         *64-bit*)
9181           LD="${LD-ld} -64"
9182           ;;
9183       esac
9184     fi
9185   fi
9186   rm -rf conftest*
9187   ;;
9188
9189 mips64*-*linux*)
9190   # Find out what ABI is being produced by ac_compile, and set linker
9191   # options accordingly.
9192   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9193   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9194   (eval $ac_compile) 2>&5
9195   ac_status=$?
9196   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9197   test $ac_status = 0; }; then
9198     emul=elf
9199     case `/usr/bin/file conftest.$ac_objext` in
9200       *32-bit*)
9201         emul="${emul}32"
9202         ;;
9203       *64-bit*)
9204         emul="${emul}64"
9205         ;;
9206     esac
9207     case `/usr/bin/file conftest.$ac_objext` in
9208       *MSB*)
9209         emul="${emul}btsmip"
9210         ;;
9211       *LSB*)
9212         emul="${emul}ltsmip"
9213         ;;
9214     esac
9215     case `/usr/bin/file conftest.$ac_objext` in
9216       *N32*)
9217         emul="${emul}n32"
9218         ;;
9219     esac
9220     LD="${LD-ld} -m $emul"
9221   fi
9222   rm -rf conftest*
9223   ;;
9224
9225 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9226 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9227   # Find out what ABI is being produced by ac_compile, and set linker
9228   # options accordingly.  Note that the listed cases only cover the
9229   # situations where additional linker options are needed (such as when
9230   # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9231   # vice versa); the common cases where no linker options are needed do
9232   # not appear in the list.
9233   echo 'int i;' > conftest.$ac_ext
9234   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9235   (eval $ac_compile) 2>&5
9236   ac_status=$?
9237   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9238   test $ac_status = 0; }; then
9239     case `/usr/bin/file conftest.o` in
9240       *32-bit*)
9241         case $host in
9242           x86_64-*kfreebsd*-gnu)
9243             LD="${LD-ld} -m elf_i386_fbsd"
9244             ;;
9245           x86_64-*linux*)
9246             case `/usr/bin/file conftest.o` in
9247               *x86-64*)
9248                 LD="${LD-ld} -m elf32_x86_64"
9249                 ;;
9250               *)
9251                 LD="${LD-ld} -m elf_i386"
9252                 ;;
9253             esac
9254             ;;
9255           powerpc64le-*linux*)
9256             LD="${LD-ld} -m elf32lppclinux"
9257             ;;
9258           powerpc64-*linux*)
9259             LD="${LD-ld} -m elf32ppclinux"
9260             ;;
9261           s390x-*linux*)
9262             LD="${LD-ld} -m elf_s390"
9263             ;;
9264           sparc64-*linux*)
9265             LD="${LD-ld} -m elf32_sparc"
9266             ;;
9267         esac
9268         ;;
9269       *64-bit*)
9270         case $host in
9271           x86_64-*kfreebsd*-gnu)
9272             LD="${LD-ld} -m elf_x86_64_fbsd"
9273             ;;
9274           x86_64-*linux*)
9275             LD="${LD-ld} -m elf_x86_64"
9276             ;;
9277           powerpcle-*linux*)
9278             LD="${LD-ld} -m elf64lppc"
9279             ;;
9280           powerpc-*linux*)
9281             LD="${LD-ld} -m elf64ppc"
9282             ;;
9283           s390*-*linux*|s390*-*tpf*)
9284             LD="${LD-ld} -m elf64_s390"
9285             ;;
9286           sparc*-*linux*)
9287             LD="${LD-ld} -m elf64_sparc"
9288             ;;
9289         esac
9290         ;;
9291     esac
9292   fi
9293   rm -rf conftest*
9294   ;;
9295
9296 *-*-sco3.2v5*)
9297   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9298   SAVE_CFLAGS=$CFLAGS
9299   CFLAGS="$CFLAGS -belf"
9300   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9301 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
9302 if ${lt_cv_cc_needs_belf+:} false; then :
9303   $as_echo_n "(cached) " >&6
9304 else
9305   ac_ext=c
9306 ac_cpp='$CPP $CPPFLAGS'
9307 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9308 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9309 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9310
9311      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9312 /* end confdefs.h.  */
9313
9314 int
9315 main ()
9316 {
9317
9318   ;
9319   return 0;
9320 }
9321 _ACEOF
9322 if ac_fn_c_try_link "$LINENO"; then :
9323   lt_cv_cc_needs_belf=yes
9324 else
9325   lt_cv_cc_needs_belf=no
9326 fi
9327 rm -f core conftest.err conftest.$ac_objext \
9328     conftest$ac_exeext conftest.$ac_ext
9329      ac_ext=c
9330 ac_cpp='$CPP $CPPFLAGS'
9331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9334
9335 fi
9336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9337 $as_echo "$lt_cv_cc_needs_belf" >&6; }
9338   if test yes != "$lt_cv_cc_needs_belf"; then
9339     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9340     CFLAGS=$SAVE_CFLAGS
9341   fi
9342   ;;
9343 *-*solaris*)
9344   # Find out what ABI is being produced by ac_compile, and set linker
9345   # options accordingly.
9346   echo 'int i;' > conftest.$ac_ext
9347   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9348   (eval $ac_compile) 2>&5
9349   ac_status=$?
9350   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9351   test $ac_status = 0; }; then
9352     case `/usr/bin/file conftest.o` in
9353     *64-bit*)
9354       case $lt_cv_prog_gnu_ld in
9355       yes*)
9356         case $host in
9357         i?86-*-solaris*|x86_64-*-solaris*)
9358           LD="${LD-ld} -m elf_x86_64"
9359           ;;
9360         sparc*-*-solaris*)
9361           LD="${LD-ld} -m elf64_sparc"
9362           ;;
9363         esac
9364         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9365         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9366           LD=${LD-ld}_sol2
9367         fi
9368         ;;
9369       *)
9370         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9371           LD="${LD-ld} -64"
9372         fi
9373         ;;
9374       esac
9375       ;;
9376     esac
9377   fi
9378   rm -rf conftest*
9379   ;;
9380 esac
9381
9382 need_locks=$enable_libtool_lock
9383
9384 if test -n "$ac_tool_prefix"; then
9385   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9386 set dummy ${ac_tool_prefix}mt; ac_word=$2
9387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9388 $as_echo_n "checking for $ac_word... " >&6; }
9389 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9390   $as_echo_n "(cached) " >&6
9391 else
9392   if test -n "$MANIFEST_TOOL"; then
9393   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9394 else
9395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9396 for as_dir in $PATH
9397 do
9398   IFS=$as_save_IFS
9399   test -z "$as_dir" && as_dir=.
9400     for ac_exec_ext in '' $ac_executable_extensions; do
9401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9402     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9404     break 2
9405   fi
9406 done
9407   done
9408 IFS=$as_save_IFS
9409
9410 fi
9411 fi
9412 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9413 if test -n "$MANIFEST_TOOL"; then
9414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9415 $as_echo "$MANIFEST_TOOL" >&6; }
9416 else
9417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9418 $as_echo "no" >&6; }
9419 fi
9420
9421
9422 fi
9423 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9424   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9425   # Extract the first word of "mt", so it can be a program name with args.
9426 set dummy mt; ac_word=$2
9427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9428 $as_echo_n "checking for $ac_word... " >&6; }
9429 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9430   $as_echo_n "(cached) " >&6
9431 else
9432   if test -n "$ac_ct_MANIFEST_TOOL"; then
9433   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9434 else
9435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9436 for as_dir in $PATH
9437 do
9438   IFS=$as_save_IFS
9439   test -z "$as_dir" && as_dir=.
9440     for ac_exec_ext in '' $ac_executable_extensions; do
9441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9442     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9444     break 2
9445   fi
9446 done
9447   done
9448 IFS=$as_save_IFS
9449
9450 fi
9451 fi
9452 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9453 if test -n "$ac_ct_MANIFEST_TOOL"; then
9454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9455 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9456 else
9457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9458 $as_echo "no" >&6; }
9459 fi
9460
9461   if test "x$ac_ct_MANIFEST_TOOL" = x; then
9462     MANIFEST_TOOL=":"
9463   else
9464     case $cross_compiling:$ac_tool_warned in
9465 yes:)
9466 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9467 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9468 ac_tool_warned=yes ;;
9469 esac
9470     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9471   fi
9472 else
9473   MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9474 fi
9475
9476 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9478 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9479 if ${lt_cv_path_mainfest_tool+:} false; then :
9480   $as_echo_n "(cached) " >&6
9481 else
9482   lt_cv_path_mainfest_tool=no
9483   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9484   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9485   cat conftest.err >&5
9486   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9487     lt_cv_path_mainfest_tool=yes
9488   fi
9489   rm -f conftest*
9490 fi
9491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9492 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
9493 if test yes != "$lt_cv_path_mainfest_tool"; then
9494   MANIFEST_TOOL=:
9495 fi
9496
9497
9498
9499
9500
9501
9502   case $host_os in
9503     rhapsody* | darwin*)
9504     if test -n "$ac_tool_prefix"; then
9505   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9506 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9508 $as_echo_n "checking for $ac_word... " >&6; }
9509 if ${ac_cv_prog_DSYMUTIL+:} false; then :
9510   $as_echo_n "(cached) " >&6
9511 else
9512   if test -n "$DSYMUTIL"; then
9513   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9514 else
9515 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9516 for as_dir in $PATH
9517 do
9518   IFS=$as_save_IFS
9519   test -z "$as_dir" && as_dir=.
9520     for ac_exec_ext in '' $ac_executable_extensions; do
9521   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9522     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9523     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9524     break 2
9525   fi
9526 done
9527   done
9528 IFS=$as_save_IFS
9529
9530 fi
9531 fi
9532 DSYMUTIL=$ac_cv_prog_DSYMUTIL
9533 if test -n "$DSYMUTIL"; then
9534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9535 $as_echo "$DSYMUTIL" >&6; }
9536 else
9537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9538 $as_echo "no" >&6; }
9539 fi
9540
9541
9542 fi
9543 if test -z "$ac_cv_prog_DSYMUTIL"; then
9544   ac_ct_DSYMUTIL=$DSYMUTIL
9545   # Extract the first word of "dsymutil", so it can be a program name with args.
9546 set dummy dsymutil; ac_word=$2
9547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9548 $as_echo_n "checking for $ac_word... " >&6; }
9549 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9550   $as_echo_n "(cached) " >&6
9551 else
9552   if test -n "$ac_ct_DSYMUTIL"; then
9553   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9554 else
9555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9556 for as_dir in $PATH
9557 do
9558   IFS=$as_save_IFS
9559   test -z "$as_dir" && as_dir=.
9560     for ac_exec_ext in '' $ac_executable_extensions; do
9561   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9562     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9563     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9564     break 2
9565   fi
9566 done
9567   done
9568 IFS=$as_save_IFS
9569
9570 fi
9571 fi
9572 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9573 if test -n "$ac_ct_DSYMUTIL"; then
9574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9575 $as_echo "$ac_ct_DSYMUTIL" >&6; }
9576 else
9577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9578 $as_echo "no" >&6; }
9579 fi
9580
9581   if test "x$ac_ct_DSYMUTIL" = x; then
9582     DSYMUTIL=":"
9583   else
9584     case $cross_compiling:$ac_tool_warned in
9585 yes:)
9586 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9587 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9588 ac_tool_warned=yes ;;
9589 esac
9590     DSYMUTIL=$ac_ct_DSYMUTIL
9591   fi
9592 else
9593   DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9594 fi
9595
9596     if test -n "$ac_tool_prefix"; then
9597   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9598 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9600 $as_echo_n "checking for $ac_word... " >&6; }
9601 if ${ac_cv_prog_NMEDIT+:} false; then :
9602   $as_echo_n "(cached) " >&6
9603 else
9604   if test -n "$NMEDIT"; then
9605   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9606 else
9607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9608 for as_dir in $PATH
9609 do
9610   IFS=$as_save_IFS
9611   test -z "$as_dir" && as_dir=.
9612     for ac_exec_ext in '' $ac_executable_extensions; do
9613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9614     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9616     break 2
9617   fi
9618 done
9619   done
9620 IFS=$as_save_IFS
9621
9622 fi
9623 fi
9624 NMEDIT=$ac_cv_prog_NMEDIT
9625 if test -n "$NMEDIT"; then
9626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9627 $as_echo "$NMEDIT" >&6; }
9628 else
9629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9630 $as_echo "no" >&6; }
9631 fi
9632
9633
9634 fi
9635 if test -z "$ac_cv_prog_NMEDIT"; then
9636   ac_ct_NMEDIT=$NMEDIT
9637   # Extract the first word of "nmedit", so it can be a program name with args.
9638 set dummy nmedit; 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_ac_ct_NMEDIT+:} false; then :
9642   $as_echo_n "(cached) " >&6
9643 else
9644   if test -n "$ac_ct_NMEDIT"; then
9645   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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_ac_ct_NMEDIT="nmedit"
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 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9665 if test -n "$ac_ct_NMEDIT"; then
9666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9667 $as_echo "$ac_ct_NMEDIT" >&6; }
9668 else
9669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9670 $as_echo "no" >&6; }
9671 fi
9672
9673   if test "x$ac_ct_NMEDIT" = x; then
9674     NMEDIT=":"
9675   else
9676     case $cross_compiling:$ac_tool_warned in
9677 yes:)
9678 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9679 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9680 ac_tool_warned=yes ;;
9681 esac
9682     NMEDIT=$ac_ct_NMEDIT
9683   fi
9684 else
9685   NMEDIT="$ac_cv_prog_NMEDIT"
9686 fi
9687
9688     if test -n "$ac_tool_prefix"; then
9689   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9690 set dummy ${ac_tool_prefix}lipo; ac_word=$2
9691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9692 $as_echo_n "checking for $ac_word... " >&6; }
9693 if ${ac_cv_prog_LIPO+:} false; then :
9694   $as_echo_n "(cached) " >&6
9695 else
9696   if test -n "$LIPO"; then
9697   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9698 else
9699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9700 for as_dir in $PATH
9701 do
9702   IFS=$as_save_IFS
9703   test -z "$as_dir" && as_dir=.
9704     for ac_exec_ext in '' $ac_executable_extensions; do
9705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9706     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9708     break 2
9709   fi
9710 done
9711   done
9712 IFS=$as_save_IFS
9713
9714 fi
9715 fi
9716 LIPO=$ac_cv_prog_LIPO
9717 if test -n "$LIPO"; then
9718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9719 $as_echo "$LIPO" >&6; }
9720 else
9721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9722 $as_echo "no" >&6; }
9723 fi
9724
9725
9726 fi
9727 if test -z "$ac_cv_prog_LIPO"; then
9728   ac_ct_LIPO=$LIPO
9729   # Extract the first word of "lipo", so it can be a program name with args.
9730 set dummy lipo; 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_ac_ct_LIPO+:} false; then :
9734   $as_echo_n "(cached) " >&6
9735 else
9736   if test -n "$ac_ct_LIPO"; then
9737   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # 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_ac_ct_LIPO="lipo"
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 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9757 if test -n "$ac_ct_LIPO"; then
9758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9759 $as_echo "$ac_ct_LIPO" >&6; }
9760 else
9761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9762 $as_echo "no" >&6; }
9763 fi
9764
9765   if test "x$ac_ct_LIPO" = x; then
9766     LIPO=":"
9767   else
9768     case $cross_compiling:$ac_tool_warned in
9769 yes:)
9770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9771 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9772 ac_tool_warned=yes ;;
9773 esac
9774     LIPO=$ac_ct_LIPO
9775   fi
9776 else
9777   LIPO="$ac_cv_prog_LIPO"
9778 fi
9779
9780     if test -n "$ac_tool_prefix"; then
9781   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9782 set dummy ${ac_tool_prefix}otool; ac_word=$2
9783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9784 $as_echo_n "checking for $ac_word... " >&6; }
9785 if ${ac_cv_prog_OTOOL+:} false; then :
9786   $as_echo_n "(cached) " >&6
9787 else
9788   if test -n "$OTOOL"; then
9789   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9790 else
9791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9792 for as_dir in $PATH
9793 do
9794   IFS=$as_save_IFS
9795   test -z "$as_dir" && as_dir=.
9796     for ac_exec_ext in '' $ac_executable_extensions; do
9797   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9798     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9800     break 2
9801   fi
9802 done
9803   done
9804 IFS=$as_save_IFS
9805
9806 fi
9807 fi
9808 OTOOL=$ac_cv_prog_OTOOL
9809 if test -n "$OTOOL"; then
9810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9811 $as_echo "$OTOOL" >&6; }
9812 else
9813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814 $as_echo "no" >&6; }
9815 fi
9816
9817
9818 fi
9819 if test -z "$ac_cv_prog_OTOOL"; then
9820   ac_ct_OTOOL=$OTOOL
9821   # Extract the first word of "otool", so it can be a program name with args.
9822 set dummy otool; 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_ac_ct_OTOOL+:} false; then :
9826   $as_echo_n "(cached) " >&6
9827 else
9828   if test -n "$ac_ct_OTOOL"; then
9829   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # 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_ac_ct_OTOOL="otool"
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 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
9849 if test -n "$ac_ct_OTOOL"; then
9850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
9851 $as_echo "$ac_ct_OTOOL" >&6; }
9852 else
9853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9854 $as_echo "no" >&6; }
9855 fi
9856
9857   if test "x$ac_ct_OTOOL" = x; then
9858     OTOOL=":"
9859   else
9860     case $cross_compiling:$ac_tool_warned in
9861 yes:)
9862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9863 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9864 ac_tool_warned=yes ;;
9865 esac
9866     OTOOL=$ac_ct_OTOOL
9867   fi
9868 else
9869   OTOOL="$ac_cv_prog_OTOOL"
9870 fi
9871
9872     if test -n "$ac_tool_prefix"; then
9873   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
9874 set dummy ${ac_tool_prefix}otool64; ac_word=$2
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9876 $as_echo_n "checking for $ac_word... " >&6; }
9877 if ${ac_cv_prog_OTOOL64+:} false; then :
9878   $as_echo_n "(cached) " >&6
9879 else
9880   if test -n "$OTOOL64"; then
9881   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
9882 else
9883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9884 for as_dir in $PATH
9885 do
9886   IFS=$as_save_IFS
9887   test -z "$as_dir" && as_dir=.
9888     for ac_exec_ext in '' $ac_executable_extensions; do
9889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9890     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
9891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9892     break 2
9893   fi
9894 done
9895   done
9896 IFS=$as_save_IFS
9897
9898 fi
9899 fi
9900 OTOOL64=$ac_cv_prog_OTOOL64
9901 if test -n "$OTOOL64"; then
9902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
9903 $as_echo "$OTOOL64" >&6; }
9904 else
9905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9906 $as_echo "no" >&6; }
9907 fi
9908
9909
9910 fi
9911 if test -z "$ac_cv_prog_OTOOL64"; then
9912   ac_ct_OTOOL64=$OTOOL64
9913   # Extract the first word of "otool64", so it can be a program name with args.
9914 set dummy otool64; 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_ac_ct_OTOOL64+:} false; then :
9918   $as_echo_n "(cached) " >&6
9919 else
9920   if test -n "$ac_ct_OTOOL64"; then
9921   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # 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_ac_ct_OTOOL64="otool64"
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 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
9941 if test -n "$ac_ct_OTOOL64"; then
9942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
9943 $as_echo "$ac_ct_OTOOL64" >&6; }
9944 else
9945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9946 $as_echo "no" >&6; }
9947 fi
9948
9949   if test "x$ac_ct_OTOOL64" = x; then
9950     OTOOL64=":"
9951   else
9952     case $cross_compiling:$ac_tool_warned in
9953 yes:)
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9955 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9956 ac_tool_warned=yes ;;
9957 esac
9958     OTOOL64=$ac_ct_OTOOL64
9959   fi
9960 else
9961   OTOOL64="$ac_cv_prog_OTOOL64"
9962 fi
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
9991 $as_echo_n "checking for -single_module linker flag... " >&6; }
9992 if ${lt_cv_apple_cc_single_mod+:} false; then :
9993   $as_echo_n "(cached) " >&6
9994 else
9995   lt_cv_apple_cc_single_mod=no
9996       if test -z "$LT_MULTI_MODULE"; then
9997         # By default we will add the -single_module flag. You can override
9998         # by either setting the environment variable LT_MULTI_MODULE
9999         # non-empty at configure time, or by adding -multi_module to the
10000         # link flags.
10001         rm -rf libconftest.dylib*
10002         echo "int foo(void){return 1;}" > conftest.c
10003         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10004 -dynamiclib -Wl,-single_module conftest.c" >&5
10005         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10006           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10007         _lt_result=$?
10008         # If there is a non-empty error log, and "single_module"
10009         # appears in it, assume the flag caused a linker warning
10010         if test -s conftest.err && $GREP single_module conftest.err; then
10011           cat conftest.err >&5
10012         # Otherwise, if the output was created with a 0 exit code from
10013         # the compiler, it worked.
10014         elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10015           lt_cv_apple_cc_single_mod=yes
10016         else
10017           cat conftest.err >&5
10018         fi
10019         rm -rf libconftest.dylib*
10020         rm -f conftest.*
10021       fi
10022 fi
10023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
10024 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
10025
10026     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
10027 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
10028 if ${lt_cv_ld_exported_symbols_list+:} false; then :
10029   $as_echo_n "(cached) " >&6
10030 else
10031   lt_cv_ld_exported_symbols_list=no
10032       save_LDFLAGS=$LDFLAGS
10033       echo "_main" > conftest.sym
10034       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10035       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10036 /* end confdefs.h.  */
10037
10038 int
10039 main ()
10040 {
10041
10042   ;
10043   return 0;
10044 }
10045 _ACEOF
10046 if ac_fn_c_try_link "$LINENO"; then :
10047   lt_cv_ld_exported_symbols_list=yes
10048 else
10049   lt_cv_ld_exported_symbols_list=no
10050 fi
10051 rm -f core conftest.err conftest.$ac_objext \
10052     conftest$ac_exeext conftest.$ac_ext
10053         LDFLAGS=$save_LDFLAGS
10054
10055 fi
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
10057 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
10058
10059     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
10060 $as_echo_n "checking for -force_load linker flag... " >&6; }
10061 if ${lt_cv_ld_force_load+:} false; then :
10062   $as_echo_n "(cached) " >&6
10063 else
10064   lt_cv_ld_force_load=no
10065       cat > conftest.c << _LT_EOF
10066 int forced_loaded() { return 2;}
10067 _LT_EOF
10068       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
10069       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
10070       echo "$AR cru libconftest.a conftest.o" >&5
10071       $AR cru libconftest.a conftest.o 2>&5
10072       echo "$RANLIB libconftest.a" >&5
10073       $RANLIB libconftest.a 2>&5
10074       cat > conftest.c << _LT_EOF
10075 int main() { return 0;}
10076 _LT_EOF
10077       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
10078       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10079       _lt_result=$?
10080       if test -s conftest.err && $GREP force_load conftest.err; then
10081         cat conftest.err >&5
10082       elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10083         lt_cv_ld_force_load=yes
10084       else
10085         cat conftest.err >&5
10086       fi
10087         rm -f conftest.err libconftest.a conftest conftest.c
10088         rm -rf conftest.dSYM
10089
10090 fi
10091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
10092 $as_echo "$lt_cv_ld_force_load" >&6; }
10093     case $host_os in
10094     rhapsody* | darwin1.[012])
10095       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10096     darwin1.*)
10097       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10098     darwin*) # darwin 5.x on
10099       # if running on 10.5 or later, the deployment target defaults
10100       # to the OS version, if on x86, and 10.4, the deployment
10101       # target defaults to 10.4. Don't you love it?
10102       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10103         10.0,*86*-darwin8*|10.0,*-darwin[91]*)
10104           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10105         10.[012][,.]*)
10106           _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10107         10.*)
10108           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10109       esac
10110     ;;
10111   esac
10112     if test yes = "$lt_cv_apple_cc_single_mod"; then
10113       _lt_dar_single_mod='$single_module'
10114     fi
10115     if test yes = "$lt_cv_ld_exported_symbols_list"; then
10116       _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10117     else
10118       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10119     fi
10120     if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10121       _lt_dsymutil='~$DSYMUTIL $lib || :'
10122     else
10123       _lt_dsymutil=
10124     fi
10125     ;;
10126   esac
10127
10128 # func_munge_path_list VARIABLE PATH
10129 # -----------------------------------
10130 # VARIABLE is name of variable containing _space_ separated list of
10131 # directories to be munged by the contents of PATH, which is string
10132 # having a format:
10133 # "DIR[:DIR]:"
10134 #       string "DIR[ DIR]" will be prepended to VARIABLE
10135 # ":DIR[:DIR]"
10136 #       string "DIR[ DIR]" will be appended to VARIABLE
10137 # "DIRP[:DIRP]::[DIRA:]DIRA"
10138 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
10139 #       "DIRA[ DIRA]" will be appended to VARIABLE
10140 # "DIR[:DIR]"
10141 #       VARIABLE will be replaced by "DIR[ DIR]"
10142 func_munge_path_list ()
10143 {
10144     case x$2 in
10145     x)
10146         ;;
10147     *:)
10148         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10149         ;;
10150     x:*)
10151         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10152         ;;
10153     *::*)
10154         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10155         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10156         ;;
10157     *)
10158         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10159         ;;
10160     esac
10161 }
10162
10163 for ac_header in dlfcn.h
10164 do :
10165   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10166 "
10167 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
10168   cat >>confdefs.h <<_ACEOF
10169 #define HAVE_DLFCN_H 1
10170 _ACEOF
10171
10172 fi
10173
10174 done
10175
10176
10177
10178
10179
10180
10181
10182 # Set options
10183
10184
10185
10186         enable_dlopen=no
10187
10188
10189   enable_win32_dll=no
10190
10191
10192             # Check whether --enable-shared was given.
10193 if test "${enable_shared+set}" = set; then :
10194   enableval=$enable_shared; p=${PACKAGE-default}
10195     case $enableval in
10196     yes) enable_shared=yes ;;
10197     no) enable_shared=no ;;
10198     *)
10199       enable_shared=no
10200       # Look at the argument we got.  We use all the common list separators.
10201       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10202       for pkg in $enableval; do
10203         IFS=$lt_save_ifs
10204         if test "X$pkg" = "X$p"; then
10205           enable_shared=yes
10206         fi
10207       done
10208       IFS=$lt_save_ifs
10209       ;;
10210     esac
10211 else
10212   enable_shared=yes
10213 fi
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223   # Check whether --enable-static was given.
10224 if test "${enable_static+set}" = set; then :
10225   enableval=$enable_static; p=${PACKAGE-default}
10226     case $enableval in
10227     yes) enable_static=yes ;;
10228     no) enable_static=no ;;
10229     *)
10230      enable_static=no
10231       # Look at the argument we got.  We use all the common list separators.
10232       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10233       for pkg in $enableval; do
10234         IFS=$lt_save_ifs
10235         if test "X$pkg" = "X$p"; then
10236           enable_static=yes
10237         fi
10238       done
10239       IFS=$lt_save_ifs
10240       ;;
10241     esac
10242 else
10243   enable_static=yes
10244 fi
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255 # Check whether --with-pic was given.
10256 if test "${with_pic+set}" = set; then :
10257   withval=$with_pic; lt_p=${PACKAGE-default}
10258     case $withval in
10259     yes|no) pic_mode=$withval ;;
10260     *)
10261       pic_mode=default
10262       # Look at the argument we got.  We use all the common list separators.
10263       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10264       for lt_pkg in $withval; do
10265         IFS=$lt_save_ifs
10266         if test "X$lt_pkg" = "X$lt_p"; then
10267           pic_mode=yes
10268         fi
10269       done
10270       IFS=$lt_save_ifs
10271       ;;
10272     esac
10273 else
10274   pic_mode=default
10275 fi
10276
10277
10278
10279
10280
10281
10282
10283
10284   # Check whether --enable-fast-install was given.
10285 if test "${enable_fast_install+set}" = set; then :
10286   enableval=$enable_fast_install; p=${PACKAGE-default}
10287     case $enableval in
10288     yes) enable_fast_install=yes ;;
10289     no) enable_fast_install=no ;;
10290     *)
10291       enable_fast_install=no
10292       # Look at the argument we got.  We use all the common list separators.
10293       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10294       for pkg in $enableval; do
10295         IFS=$lt_save_ifs
10296         if test "X$pkg" = "X$p"; then
10297           enable_fast_install=yes
10298         fi
10299       done
10300       IFS=$lt_save_ifs
10301       ;;
10302     esac
10303 else
10304   enable_fast_install=yes
10305 fi
10306
10307
10308
10309
10310
10311
10312
10313
10314   shared_archive_member_spec=
10315 case $host,$enable_shared in
10316 power*-*-aix[5-9]*,yes)
10317   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10318 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
10319
10320 # Check whether --with-aix-soname was given.
10321 if test "${with_aix_soname+set}" = set; then :
10322   withval=$with_aix_soname; case $withval in
10323     aix|svr4|both)
10324       ;;
10325     *)
10326       as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10327       ;;
10328     esac
10329     lt_cv_with_aix_soname=$with_aix_soname
10330 else
10331   if ${lt_cv_with_aix_soname+:} false; then :
10332   $as_echo_n "(cached) " >&6
10333 else
10334   lt_cv_with_aix_soname=aix
10335 fi
10336
10337     with_aix_soname=$lt_cv_with_aix_soname
10338 fi
10339
10340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10341 $as_echo "$with_aix_soname" >&6; }
10342   if test aix != "$with_aix_soname"; then
10343     # For the AIX way of multilib, we name the shared archive member
10344     # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10345     # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10346     # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10347     # the AIX toolchain works better with OBJECT_MODE set (default 32).
10348     if test 64 = "${OBJECT_MODE-32}"; then
10349       shared_archive_member_spec=shr_64
10350     else
10351       shared_archive_member_spec=shr
10352     fi
10353   fi
10354   ;;
10355 *)
10356   with_aix_soname=aix
10357   ;;
10358 esac
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369 # This can be used to rebuild libtool when needed
10370 LIBTOOL_DEPS=$ltmain
10371
10372 # Always use our own libtool.
10373 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404 test -z "$LN_S" && LN_S="ln -s"
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419 if test -n "${ZSH_VERSION+set}"; then
10420    setopt NO_GLOB_SUBST
10421 fi
10422
10423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10424 $as_echo_n "checking for objdir... " >&6; }
10425 if ${lt_cv_objdir+:} false; then :
10426   $as_echo_n "(cached) " >&6
10427 else
10428   rm -f .libs 2>/dev/null
10429 mkdir .libs 2>/dev/null
10430 if test -d .libs; then
10431   lt_cv_objdir=.libs
10432 else
10433   # MS-DOS does not allow filenames that begin with a dot.
10434   lt_cv_objdir=_libs
10435 fi
10436 rmdir .libs 2>/dev/null
10437 fi
10438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10439 $as_echo "$lt_cv_objdir" >&6; }
10440 objdir=$lt_cv_objdir
10441
10442
10443
10444
10445
10446 cat >>confdefs.h <<_ACEOF
10447 #define LT_OBJDIR "$lt_cv_objdir/"
10448 _ACEOF
10449
10450
10451
10452
10453 case $host_os in
10454 aix3*)
10455   # AIX sometimes has problems with the GCC collect2 program.  For some
10456   # reason, if we set the COLLECT_NAMES environment variable, the problems
10457   # vanish in a puff of smoke.
10458   if test set != "${COLLECT_NAMES+set}"; then
10459     COLLECT_NAMES=
10460     export COLLECT_NAMES
10461   fi
10462   ;;
10463 esac
10464
10465 # Global variables:
10466 ofile=libtool
10467 can_build_shared=yes
10468
10469 # All known linkers require a '.a' archive for static linking (except MSVC,
10470 # which needs '.lib').
10471 libext=a
10472
10473 with_gnu_ld=$lt_cv_prog_gnu_ld
10474
10475 old_CC=$CC
10476 old_CFLAGS=$CFLAGS
10477
10478 # Set sane defaults for various variables
10479 test -z "$CC" && CC=cc
10480 test -z "$LTCC" && LTCC=$CC
10481 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10482 test -z "$LD" && LD=ld
10483 test -z "$ac_objext" && ac_objext=o
10484
10485 func_cc_basename $compiler
10486 cc_basename=$func_cc_basename_result
10487
10488
10489 # Only perform the check for file, if the check method requires it
10490 test -z "$MAGIC_CMD" && MAGIC_CMD=file
10491 case $deplibs_check_method in
10492 file_magic*)
10493   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10494     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10495 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10496 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10497   $as_echo_n "(cached) " >&6
10498 else
10499   case $MAGIC_CMD in
10500 [\\/*] |  ?:[\\/]*)
10501   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10502   ;;
10503 *)
10504   lt_save_MAGIC_CMD=$MAGIC_CMD
10505   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10506   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10507   for ac_dir in $ac_dummy; do
10508     IFS=$lt_save_ifs
10509     test -z "$ac_dir" && ac_dir=.
10510     if test -f "$ac_dir/${ac_tool_prefix}file"; then
10511       lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10512       if test -n "$file_magic_test_file"; then
10513         case $deplibs_check_method in
10514         "file_magic "*)
10515           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10516           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10517           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10518             $EGREP "$file_magic_regex" > /dev/null; then
10519             :
10520           else
10521             cat <<_LT_EOF 1>&2
10522
10523 *** Warning: the command libtool uses to detect shared libraries,
10524 *** $file_magic_cmd, produces output that libtool cannot recognize.
10525 *** The result is that libtool may fail to recognize shared libraries
10526 *** as such.  This will affect the creation of libtool libraries that
10527 *** depend on shared libraries, but programs linked with such libtool
10528 *** libraries will work regardless of this problem.  Nevertheless, you
10529 *** may want to report the problem to your system manager and/or to
10530 *** bug-libtool@gnu.org
10531
10532 _LT_EOF
10533           fi ;;
10534         esac
10535       fi
10536       break
10537     fi
10538   done
10539   IFS=$lt_save_ifs
10540   MAGIC_CMD=$lt_save_MAGIC_CMD
10541   ;;
10542 esac
10543 fi
10544
10545 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10546 if test -n "$MAGIC_CMD"; then
10547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10548 $as_echo "$MAGIC_CMD" >&6; }
10549 else
10550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10551 $as_echo "no" >&6; }
10552 fi
10553
10554
10555
10556
10557
10558 if test -z "$lt_cv_path_MAGIC_CMD"; then
10559   if test -n "$ac_tool_prefix"; then
10560     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10561 $as_echo_n "checking for file... " >&6; }
10562 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10563   $as_echo_n "(cached) " >&6
10564 else
10565   case $MAGIC_CMD in
10566 [\\/*] |  ?:[\\/]*)
10567   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10568   ;;
10569 *)
10570   lt_save_MAGIC_CMD=$MAGIC_CMD
10571   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10572   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10573   for ac_dir in $ac_dummy; do
10574     IFS=$lt_save_ifs
10575     test -z "$ac_dir" && ac_dir=.
10576     if test -f "$ac_dir/file"; then
10577       lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10578       if test -n "$file_magic_test_file"; then
10579         case $deplibs_check_method in
10580         "file_magic "*)
10581           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10582           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10583           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10584             $EGREP "$file_magic_regex" > /dev/null; then
10585             :
10586           else
10587             cat <<_LT_EOF 1>&2
10588
10589 *** Warning: the command libtool uses to detect shared libraries,
10590 *** $file_magic_cmd, produces output that libtool cannot recognize.
10591 *** The result is that libtool may fail to recognize shared libraries
10592 *** as such.  This will affect the creation of libtool libraries that
10593 *** depend on shared libraries, but programs linked with such libtool
10594 *** libraries will work regardless of this problem.  Nevertheless, you
10595 *** may want to report the problem to your system manager and/or to
10596 *** bug-libtool@gnu.org
10597
10598 _LT_EOF
10599           fi ;;
10600         esac
10601       fi
10602       break
10603     fi
10604   done
10605   IFS=$lt_save_ifs
10606   MAGIC_CMD=$lt_save_MAGIC_CMD
10607   ;;
10608 esac
10609 fi
10610
10611 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10612 if test -n "$MAGIC_CMD"; then
10613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10614 $as_echo "$MAGIC_CMD" >&6; }
10615 else
10616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10617 $as_echo "no" >&6; }
10618 fi
10619
10620
10621   else
10622     MAGIC_CMD=:
10623   fi
10624 fi
10625
10626   fi
10627   ;;
10628 esac
10629
10630 # Use C for the default configuration in the libtool script
10631
10632 lt_save_CC=$CC
10633 ac_ext=c
10634 ac_cpp='$CPP $CPPFLAGS'
10635 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10636 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10637 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10638
10639
10640 # Source file extension for C test sources.
10641 ac_ext=c
10642
10643 # Object file extension for compiled C test sources.
10644 objext=o
10645 objext=$objext
10646
10647 # Code to be used in simple compile tests
10648 lt_simple_compile_test_code="int some_variable = 0;"
10649
10650 # Code to be used in simple link tests
10651 lt_simple_link_test_code='int main(){return(0);}'
10652
10653
10654
10655
10656
10657
10658
10659 # If no C compiler was specified, use CC.
10660 LTCC=${LTCC-"$CC"}
10661
10662 # If no C compiler flags were specified, use CFLAGS.
10663 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10664
10665 # Allow CC to be a program name with arguments.
10666 compiler=$CC
10667
10668 # Save the default compiler, since it gets overwritten when the other
10669 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10670 compiler_DEFAULT=$CC
10671
10672 # save warnings/boilerplate of simple test code
10673 ac_outfile=conftest.$ac_objext
10674 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10675 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10676 _lt_compiler_boilerplate=`cat conftest.err`
10677 $RM conftest*
10678
10679 ac_outfile=conftest.$ac_objext
10680 echo "$lt_simple_link_test_code" >conftest.$ac_ext
10681 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10682 _lt_linker_boilerplate=`cat conftest.err`
10683 $RM -r conftest*
10684
10685
10686 if test -n "$compiler"; then
10687
10688 lt_prog_compiler_no_builtin_flag=
10689
10690 if test yes = "$GCC"; then
10691   case $cc_basename in
10692   nvcc*)
10693     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10694   *)
10695     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10696   esac
10697
10698   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10699 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10700 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10701   $as_echo_n "(cached) " >&6
10702 else
10703   lt_cv_prog_compiler_rtti_exceptions=no
10704    ac_outfile=conftest.$ac_objext
10705    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10706    lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
10707    # Insert the option either (1) after the last *FLAGS variable, or
10708    # (2) before a word containing "conftest.", or (3) at the end.
10709    # Note that $ac_compile itself does not contain backslashes and begins
10710    # with a dollar sign (not a hyphen), so the echo should work correctly.
10711    # The option is referenced via a variable to avoid confusing sed.
10712    lt_compile=`echo "$ac_compile" | $SED \
10713    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10714    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10715    -e 's:$: $lt_compiler_flag:'`
10716    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10717    (eval "$lt_compile" 2>conftest.err)
10718    ac_status=$?
10719    cat conftest.err >&5
10720    echo "$as_me:$LINENO: \$? = $ac_status" >&5
10721    if (exit $ac_status) && test -s "$ac_outfile"; then
10722      # The compiler can only warn and ignore the option if not recognized
10723      # So say no if there are warnings other than the usual output.
10724      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10725      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10726      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10727        lt_cv_prog_compiler_rtti_exceptions=yes
10728      fi
10729    fi
10730    $RM conftest*
10731
10732 fi
10733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10734 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10735
10736 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10737     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10738 else
10739     :
10740 fi
10741
10742 fi
10743
10744
10745
10746
10747
10748
10749   lt_prog_compiler_wl=
10750 lt_prog_compiler_pic=
10751 lt_prog_compiler_static=
10752
10753
10754   if test yes = "$GCC"; then
10755     lt_prog_compiler_wl='-Wl,'
10756     lt_prog_compiler_static='-static'
10757
10758     case $host_os in
10759       aix*)
10760       # All AIX code is PIC.
10761       if test ia64 = "$host_cpu"; then
10762         # AIX 5 now supports IA64 processor
10763         lt_prog_compiler_static='-Bstatic'
10764       fi
10765       lt_prog_compiler_pic='-fPIC'
10766       ;;
10767
10768     amigaos*)
10769       case $host_cpu in
10770       powerpc)
10771             # see comment about AmigaOS4 .so support
10772             lt_prog_compiler_pic='-fPIC'
10773         ;;
10774       m68k)
10775             # FIXME: we need at least 68020 code to build shared libraries, but
10776             # adding the '-m68020' flag to GCC prevents building anything better,
10777             # like '-m68040'.
10778             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10779         ;;
10780       esac
10781       ;;
10782
10783     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10784       # PIC is the default for these OSes.
10785       ;;
10786
10787     mingw* | cygwin* | pw32* | os2* | cegcc*)
10788       # This hack is so that the source file can tell whether it is being
10789       # built for inclusion in a dll (and should export symbols for example).
10790       # Although the cygwin gcc ignores -fPIC, still need this for old-style
10791       # (--disable-auto-import) libraries
10792       lt_prog_compiler_pic='-DDLL_EXPORT'
10793       case $host_os in
10794       os2*)
10795         lt_prog_compiler_static='$wl-static'
10796         ;;
10797       esac
10798       ;;
10799
10800     darwin* | rhapsody*)
10801       # PIC is the default on this platform
10802       # Common symbols not allowed in MH_DYLIB files
10803       lt_prog_compiler_pic='-fno-common'
10804       ;;
10805
10806     haiku*)
10807       # PIC is the default for Haiku.
10808       # The "-static" flag exists, but is broken.
10809       lt_prog_compiler_static=
10810       ;;
10811
10812     hpux*)
10813       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10814       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10815       # sets the default TLS model and affects inlining.
10816       case $host_cpu in
10817       hppa*64*)
10818         # +Z the default
10819         ;;
10820       *)
10821         lt_prog_compiler_pic='-fPIC'
10822         ;;
10823       esac
10824       ;;
10825
10826     interix[3-9]*)
10827       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10828       # Instead, we relocate shared libraries at runtime.
10829       ;;
10830
10831     msdosdjgpp*)
10832       # Just because we use GCC doesn't mean we suddenly get shared libraries
10833       # on systems that don't support them.
10834       lt_prog_compiler_can_build_shared=no
10835       enable_shared=no
10836       ;;
10837
10838     *nto* | *qnx*)
10839       # QNX uses GNU C++, but need to define -shared option too, otherwise
10840       # it will coredump.
10841       lt_prog_compiler_pic='-fPIC -shared'
10842       ;;
10843
10844     sysv4*MP*)
10845       if test -d /usr/nec; then
10846         lt_prog_compiler_pic=-Kconform_pic
10847       fi
10848       ;;
10849
10850     *)
10851       lt_prog_compiler_pic='-fPIC'
10852       ;;
10853     esac
10854
10855     case $cc_basename in
10856     nvcc*) # Cuda Compiler Driver 2.2
10857       lt_prog_compiler_wl='-Xlinker '
10858       if test -n "$lt_prog_compiler_pic"; then
10859         lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
10860       fi
10861       ;;
10862     esac
10863   else
10864     # PORTME Check for flag to pass linker flags through the system compiler.
10865     case $host_os in
10866     aix*)
10867       lt_prog_compiler_wl='-Wl,'
10868       if test ia64 = "$host_cpu"; then
10869         # AIX 5 now supports IA64 processor
10870         lt_prog_compiler_static='-Bstatic'
10871       else
10872         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
10873       fi
10874       ;;
10875
10876     darwin* | rhapsody*)
10877       # PIC is the default on this platform
10878       # Common symbols not allowed in MH_DYLIB files
10879       lt_prog_compiler_pic='-fno-common'
10880       case $cc_basename in
10881       nagfor*)
10882         # NAG Fortran compiler
10883         lt_prog_compiler_wl='-Wl,-Wl,,'
10884         lt_prog_compiler_pic='-PIC'
10885         lt_prog_compiler_static='-Bstatic'
10886         ;;
10887       esac
10888       ;;
10889
10890     mingw* | cygwin* | pw32* | os2* | cegcc*)
10891       # This hack is so that the source file can tell whether it is being
10892       # built for inclusion in a dll (and should export symbols for example).
10893       lt_prog_compiler_pic='-DDLL_EXPORT'
10894       case $host_os in
10895       os2*)
10896         lt_prog_compiler_static='$wl-static'
10897         ;;
10898       esac
10899       ;;
10900
10901     hpux9* | hpux10* | hpux11*)
10902       lt_prog_compiler_wl='-Wl,'
10903       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10904       # not for PA HP-UX.
10905       case $host_cpu in
10906       hppa*64*|ia64*)
10907         # +Z the default
10908         ;;
10909       *)
10910         lt_prog_compiler_pic='+Z'
10911         ;;
10912       esac
10913       # Is there a better lt_prog_compiler_static that works with the bundled CC?
10914       lt_prog_compiler_static='$wl-a ${wl}archive'
10915       ;;
10916
10917     irix5* | irix6* | nonstopux*)
10918       lt_prog_compiler_wl='-Wl,'
10919       # PIC (with -KPIC) is the default.
10920       lt_prog_compiler_static='-non_shared'
10921       ;;
10922
10923     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
10924       case $cc_basename in
10925       # old Intel for x86_64, which still supported -KPIC.
10926       ecc*)
10927         lt_prog_compiler_wl='-Wl,'
10928         lt_prog_compiler_pic='-KPIC'
10929         lt_prog_compiler_static='-static'
10930         ;;
10931       # icc used to be incompatible with GCC.
10932       # ICC 10 doesn't accept -KPIC any more.
10933       icc* | ifort*)
10934         lt_prog_compiler_wl='-Wl,'
10935         lt_prog_compiler_pic='-fPIC'
10936         lt_prog_compiler_static='-static'
10937         ;;
10938       # Lahey Fortran 8.1.
10939       lf95*)
10940         lt_prog_compiler_wl='-Wl,'
10941         lt_prog_compiler_pic='--shared'
10942         lt_prog_compiler_static='--static'
10943         ;;
10944       nagfor*)
10945         # NAG Fortran compiler
10946         lt_prog_compiler_wl='-Wl,-Wl,,'
10947         lt_prog_compiler_pic='-PIC'
10948         lt_prog_compiler_static='-Bstatic'
10949         ;;
10950       tcc*)
10951         # Fabrice Bellard et al's Tiny C Compiler
10952         lt_prog_compiler_wl='-Wl,'
10953         lt_prog_compiler_pic='-fPIC'
10954         lt_prog_compiler_static='-static'
10955         ;;
10956       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
10957         # Portland Group compilers (*not* the Pentium gcc compiler,
10958         # which looks to be a dead project)
10959         lt_prog_compiler_wl='-Wl,'
10960         lt_prog_compiler_pic='-fpic'
10961         lt_prog_compiler_static='-Bstatic'
10962         ;;
10963       ccc*)
10964         lt_prog_compiler_wl='-Wl,'
10965         # All Alpha code is PIC.
10966         lt_prog_compiler_static='-non_shared'
10967         ;;
10968       xl* | bgxl* | bgf* | mpixl*)
10969         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
10970         lt_prog_compiler_wl='-Wl,'
10971         lt_prog_compiler_pic='-qpic'
10972         lt_prog_compiler_static='-qstaticlink'
10973         ;;
10974       *)
10975         case `$CC -V 2>&1 | sed 5q` in
10976         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
10977           # Sun Fortran 8.3 passes all unrecognized flags to the linker
10978           lt_prog_compiler_pic='-KPIC'
10979           lt_prog_compiler_static='-Bstatic'
10980           lt_prog_compiler_wl=''
10981           ;;
10982         *Sun\ F* | *Sun*Fortran*)
10983           lt_prog_compiler_pic='-KPIC'
10984           lt_prog_compiler_static='-Bstatic'
10985           lt_prog_compiler_wl='-Qoption ld '
10986           ;;
10987         *Sun\ C*)
10988           # Sun C 5.9
10989           lt_prog_compiler_pic='-KPIC'
10990           lt_prog_compiler_static='-Bstatic'
10991           lt_prog_compiler_wl='-Wl,'
10992           ;;
10993         *Intel*\ [CF]*Compiler*)
10994           lt_prog_compiler_wl='-Wl,'
10995           lt_prog_compiler_pic='-fPIC'
10996           lt_prog_compiler_static='-static'
10997           ;;
10998         *Portland\ Group*)
10999           lt_prog_compiler_wl='-Wl,'
11000           lt_prog_compiler_pic='-fpic'
11001           lt_prog_compiler_static='-Bstatic'
11002           ;;
11003         esac
11004         ;;
11005       esac
11006       ;;
11007
11008     newsos6)
11009       lt_prog_compiler_pic='-KPIC'
11010       lt_prog_compiler_static='-Bstatic'
11011       ;;
11012
11013     *nto* | *qnx*)
11014       # QNX uses GNU C++, but need to define -shared option too, otherwise
11015       # it will coredump.
11016       lt_prog_compiler_pic='-fPIC -shared'
11017       ;;
11018
11019     osf3* | osf4* | osf5*)
11020       lt_prog_compiler_wl='-Wl,'
11021       # All OSF/1 code is PIC.
11022       lt_prog_compiler_static='-non_shared'
11023       ;;
11024
11025     rdos*)
11026       lt_prog_compiler_static='-non_shared'
11027       ;;
11028
11029     solaris*)
11030       lt_prog_compiler_pic='-KPIC'
11031       lt_prog_compiler_static='-Bstatic'
11032       case $cc_basename in
11033       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
11034         lt_prog_compiler_wl='-Qoption ld ';;
11035       *)
11036         lt_prog_compiler_wl='-Wl,';;
11037       esac
11038       ;;
11039
11040     sunos4*)
11041       lt_prog_compiler_wl='-Qoption ld '
11042       lt_prog_compiler_pic='-PIC'
11043       lt_prog_compiler_static='-Bstatic'
11044       ;;
11045
11046     sysv4 | sysv4.2uw2* | sysv4.3*)
11047       lt_prog_compiler_wl='-Wl,'
11048       lt_prog_compiler_pic='-KPIC'
11049       lt_prog_compiler_static='-Bstatic'
11050       ;;
11051
11052     sysv4*MP*)
11053       if test -d /usr/nec; then
11054         lt_prog_compiler_pic='-Kconform_pic'
11055         lt_prog_compiler_static='-Bstatic'
11056       fi
11057       ;;
11058
11059     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11060       lt_prog_compiler_wl='-Wl,'
11061       lt_prog_compiler_pic='-KPIC'
11062       lt_prog_compiler_static='-Bstatic'
11063       ;;
11064
11065     unicos*)
11066       lt_prog_compiler_wl='-Wl,'
11067       lt_prog_compiler_can_build_shared=no
11068       ;;
11069
11070     uts4*)
11071       lt_prog_compiler_pic='-pic'
11072       lt_prog_compiler_static='-Bstatic'
11073       ;;
11074
11075     *)
11076       lt_prog_compiler_can_build_shared=no
11077       ;;
11078     esac
11079   fi
11080
11081 case $host_os in
11082   # For platforms that do not support PIC, -DPIC is meaningless:
11083   *djgpp*)
11084     lt_prog_compiler_pic=
11085     ;;
11086   *)
11087     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11088     ;;
11089 esac
11090
11091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11092 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
11093 if ${lt_cv_prog_compiler_pic+:} false; then :
11094   $as_echo_n "(cached) " >&6
11095 else
11096   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11097 fi
11098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11099 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
11100 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11101
11102 #
11103 # Check to make sure the PIC flag actually works.
11104 #
11105 if test -n "$lt_prog_compiler_pic"; then
11106   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
11107 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
11108 if ${lt_cv_prog_compiler_pic_works+:} false; then :
11109   $as_echo_n "(cached) " >&6
11110 else
11111   lt_cv_prog_compiler_pic_works=no
11112    ac_outfile=conftest.$ac_objext
11113    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11114    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
11115    # Insert the option either (1) after the last *FLAGS variable, or
11116    # (2) before a word containing "conftest.", or (3) at the end.
11117    # Note that $ac_compile itself does not contain backslashes and begins
11118    # with a dollar sign (not a hyphen), so the echo should work correctly.
11119    # The option is referenced via a variable to avoid confusing sed.
11120    lt_compile=`echo "$ac_compile" | $SED \
11121    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11122    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11123    -e 's:$: $lt_compiler_flag:'`
11124    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11125    (eval "$lt_compile" 2>conftest.err)
11126    ac_status=$?
11127    cat conftest.err >&5
11128    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11129    if (exit $ac_status) && test -s "$ac_outfile"; then
11130      # The compiler can only warn and ignore the option if not recognized
11131      # So say no if there are warnings other than the usual output.
11132      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11133      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11134      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11135        lt_cv_prog_compiler_pic_works=yes
11136      fi
11137    fi
11138    $RM conftest*
11139
11140 fi
11141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
11142 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
11143
11144 if test yes = "$lt_cv_prog_compiler_pic_works"; then
11145     case $lt_prog_compiler_pic in
11146      "" | " "*) ;;
11147      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11148      esac
11149 else
11150     lt_prog_compiler_pic=
11151      lt_prog_compiler_can_build_shared=no
11152 fi
11153
11154 fi
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166 #
11167 # Check to make sure the static flag actually works.
11168 #
11169 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11171 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11172 if ${lt_cv_prog_compiler_static_works+:} false; then :
11173   $as_echo_n "(cached) " >&6
11174 else
11175   lt_cv_prog_compiler_static_works=no
11176    save_LDFLAGS=$LDFLAGS
11177    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11178    echo "$lt_simple_link_test_code" > conftest.$ac_ext
11179    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11180      # The linker can only warn and ignore the option if not recognized
11181      # So say no if there are warnings
11182      if test -s conftest.err; then
11183        # Append any errors to the config.log.
11184        cat conftest.err 1>&5
11185        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11186        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11187        if diff conftest.exp conftest.er2 >/dev/null; then
11188          lt_cv_prog_compiler_static_works=yes
11189        fi
11190      else
11191        lt_cv_prog_compiler_static_works=yes
11192      fi
11193    fi
11194    $RM -r conftest*
11195    LDFLAGS=$save_LDFLAGS
11196
11197 fi
11198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11199 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
11200
11201 if test yes = "$lt_cv_prog_compiler_static_works"; then
11202     :
11203 else
11204     lt_prog_compiler_static=
11205 fi
11206
11207
11208
11209
11210
11211
11212
11213   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11214 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11215 if ${lt_cv_prog_compiler_c_o+:} false; then :
11216   $as_echo_n "(cached) " >&6
11217 else
11218   lt_cv_prog_compiler_c_o=no
11219    $RM -r conftest 2>/dev/null
11220    mkdir conftest
11221    cd conftest
11222    mkdir out
11223    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11224
11225    lt_compiler_flag="-o out/conftest2.$ac_objext"
11226    # Insert the option either (1) after the last *FLAGS variable, or
11227    # (2) before a word containing "conftest.", or (3) at the end.
11228    # Note that $ac_compile itself does not contain backslashes and begins
11229    # with a dollar sign (not a hyphen), so the echo should work correctly.
11230    lt_compile=`echo "$ac_compile" | $SED \
11231    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11232    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11233    -e 's:$: $lt_compiler_flag:'`
11234    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11235    (eval "$lt_compile" 2>out/conftest.err)
11236    ac_status=$?
11237    cat out/conftest.err >&5
11238    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11239    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11240    then
11241      # The compiler can only warn and ignore the option if not recognized
11242      # So say no if there are warnings
11243      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11244      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11245      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11246        lt_cv_prog_compiler_c_o=yes
11247      fi
11248    fi
11249    chmod u+w . 2>&5
11250    $RM conftest*
11251    # SGI C++ compiler will create directory out/ii_files/ for
11252    # template instantiation
11253    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11254    $RM out/* && rmdir out
11255    cd ..
11256    $RM -r conftest
11257    $RM conftest*
11258
11259 fi
11260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11261 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11262
11263
11264
11265
11266
11267
11268   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11269 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11270 if ${lt_cv_prog_compiler_c_o+:} false; then :
11271   $as_echo_n "(cached) " >&6
11272 else
11273   lt_cv_prog_compiler_c_o=no
11274    $RM -r conftest 2>/dev/null
11275    mkdir conftest
11276    cd conftest
11277    mkdir out
11278    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11279
11280    lt_compiler_flag="-o out/conftest2.$ac_objext"
11281    # Insert the option either (1) after the last *FLAGS variable, or
11282    # (2) before a word containing "conftest.", or (3) at the end.
11283    # Note that $ac_compile itself does not contain backslashes and begins
11284    # with a dollar sign (not a hyphen), so the echo should work correctly.
11285    lt_compile=`echo "$ac_compile" | $SED \
11286    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11287    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11288    -e 's:$: $lt_compiler_flag:'`
11289    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11290    (eval "$lt_compile" 2>out/conftest.err)
11291    ac_status=$?
11292    cat out/conftest.err >&5
11293    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11294    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11295    then
11296      # The compiler can only warn and ignore the option if not recognized
11297      # So say no if there are warnings
11298      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11299      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11300      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11301        lt_cv_prog_compiler_c_o=yes
11302      fi
11303    fi
11304    chmod u+w . 2>&5
11305    $RM conftest*
11306    # SGI C++ compiler will create directory out/ii_files/ for
11307    # template instantiation
11308    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11309    $RM out/* && rmdir out
11310    cd ..
11311    $RM -r conftest
11312    $RM conftest*
11313
11314 fi
11315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11316 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11317
11318
11319
11320
11321 hard_links=nottested
11322 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11323   # do not overwrite the value of need_locks provided by the user
11324   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11325 $as_echo_n "checking if we can lock with hard links... " >&6; }
11326   hard_links=yes
11327   $RM conftest*
11328   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11329   touch conftest.a
11330   ln conftest.a conftest.b 2>&5 || hard_links=no
11331   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11333 $as_echo "$hard_links" >&6; }
11334   if test no = "$hard_links"; then
11335     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11336 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11337     need_locks=warn
11338   fi
11339 else
11340   need_locks=no
11341 fi
11342
11343
11344
11345
11346
11347
11348   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11349 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11350
11351   runpath_var=
11352   allow_undefined_flag=
11353   always_export_symbols=no
11354   archive_cmds=
11355   archive_expsym_cmds=
11356   compiler_needs_object=no
11357   enable_shared_with_static_runtimes=no
11358   export_dynamic_flag_spec=
11359   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11360   hardcode_automatic=no
11361   hardcode_direct=no
11362   hardcode_direct_absolute=no
11363   hardcode_libdir_flag_spec=
11364   hardcode_libdir_separator=
11365   hardcode_minus_L=no
11366   hardcode_shlibpath_var=unsupported
11367   inherit_rpath=no
11368   link_all_deplibs=unknown
11369   module_cmds=
11370   module_expsym_cmds=
11371   old_archive_from_new_cmds=
11372   old_archive_from_expsyms_cmds=
11373   thread_safe_flag_spec=
11374   whole_archive_flag_spec=
11375   # include_expsyms should be a list of space-separated symbols to be *always*
11376   # included in the symbol list
11377   include_expsyms=
11378   # exclude_expsyms can be an extended regexp of symbols to exclude
11379   # it will be wrapped by ' (' and ')$', so one must not match beginning or
11380   # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11381   # as well as any symbol that contains 'd'.
11382   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11383   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11384   # platforms (ab)use it in PIC code, but their linkers get confused if
11385   # the symbol is explicitly referenced.  Since portable code cannot
11386   # rely on this symbol name, it's probably fine to never include it in
11387   # preloaded symbol tables.
11388   # Exclude shared library initialization/finalization symbols.
11389   extract_expsyms_cmds=
11390
11391   case $host_os in
11392   cygwin* | mingw* | pw32* | cegcc*)
11393     # FIXME: the MSVC++ port hasn't been tested in a loooong time
11394     # When not using gcc, we currently assume that we are using
11395     # Microsoft Visual C++.
11396     if test yes != "$GCC"; then
11397       with_gnu_ld=no
11398     fi
11399     ;;
11400   interix*)
11401     # we just hope/assume this is gcc and not c89 (= MSVC++)
11402     with_gnu_ld=yes
11403     ;;
11404   openbsd* | bitrig*)
11405     with_gnu_ld=no
11406     ;;
11407   esac
11408
11409   ld_shlibs=yes
11410
11411   # On some targets, GNU ld is compatible enough with the native linker
11412   # that we're better off using the native interface for both.
11413   lt_use_gnu_ld_interface=no
11414   if test yes = "$with_gnu_ld"; then
11415     case $host_os in
11416       aix*)
11417         # The AIX port of GNU ld has always aspired to compatibility
11418         # with the native linker.  However, as the warning in the GNU ld
11419         # block says, versions before 2.19.5* couldn't really create working
11420         # shared libraries, regardless of the interface used.
11421         case `$LD -v 2>&1` in
11422           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11423           *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11424           *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11425           *)
11426             lt_use_gnu_ld_interface=yes
11427             ;;
11428         esac
11429         ;;
11430       *)
11431         lt_use_gnu_ld_interface=yes
11432         ;;
11433     esac
11434   fi
11435
11436   if test yes = "$lt_use_gnu_ld_interface"; then
11437     # If archive_cmds runs LD, not CC, wlarc should be empty
11438     wlarc='$wl'
11439
11440     # Set some defaults for GNU ld with shared library support. These
11441     # are reset later if shared libraries are not supported. Putting them
11442     # here allows them to be overridden if necessary.
11443     runpath_var=LD_RUN_PATH
11444     hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11445     export_dynamic_flag_spec='$wl--export-dynamic'
11446     # ancient GNU ld didn't support --whole-archive et. al.
11447     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11448       whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11449     else
11450       whole_archive_flag_spec=
11451     fi
11452     supports_anon_versioning=no
11453     case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11454       *GNU\ gold*) supports_anon_versioning=yes ;;
11455       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11456       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11457       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11458       *\ 2.11.*) ;; # other 2.11 versions
11459       *) supports_anon_versioning=yes ;;
11460     esac
11461
11462     # See if GNU ld supports shared libraries.
11463     case $host_os in
11464     aix[3-9]*)
11465       # On AIX/PPC, the GNU linker is very broken
11466       if test ia64 != "$host_cpu"; then
11467         ld_shlibs=no
11468         cat <<_LT_EOF 1>&2
11469
11470 *** Warning: the GNU linker, at least up to release 2.19, is reported
11471 *** to be unable to reliably create shared libraries on AIX.
11472 *** Therefore, libtool is disabling shared libraries support.  If you
11473 *** really care for shared libraries, you may want to install binutils
11474 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11475 *** You will then need to restart the configuration process.
11476
11477 _LT_EOF
11478       fi
11479       ;;
11480
11481     amigaos*)
11482       case $host_cpu in
11483       powerpc)
11484             # see comment about AmigaOS4 .so support
11485             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11486             archive_expsym_cmds=''
11487         ;;
11488       m68k)
11489             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)'
11490             hardcode_libdir_flag_spec='-L$libdir'
11491             hardcode_minus_L=yes
11492         ;;
11493       esac
11494       ;;
11495
11496     beos*)
11497       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11498         allow_undefined_flag=unsupported
11499         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11500         # support --undefined.  This deserves some investigation.  FIXME
11501         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11502       else
11503         ld_shlibs=no
11504       fi
11505       ;;
11506
11507     cygwin* | mingw* | pw32* | cegcc*)
11508       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11509       # as there is no search path for DLLs.
11510       hardcode_libdir_flag_spec='-L$libdir'
11511       export_dynamic_flag_spec='$wl--export-all-symbols'
11512       allow_undefined_flag=unsupported
11513       always_export_symbols=no
11514       enable_shared_with_static_runtimes=yes
11515       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'
11516       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11517
11518       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11519         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11520         # If the export-symbols file already is a .def file, use it as
11521         # is; otherwise, prepend EXPORTS...
11522         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11523           cp $export_symbols $output_objdir/$soname.def;
11524         else
11525           echo EXPORTS > $output_objdir/$soname.def;
11526           cat $export_symbols >> $output_objdir/$soname.def;
11527         fi~
11528         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11529       else
11530         ld_shlibs=no
11531       fi
11532       ;;
11533
11534     haiku*)
11535       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11536       link_all_deplibs=yes
11537       ;;
11538
11539     os2*)
11540       hardcode_libdir_flag_spec='-L$libdir'
11541       hardcode_minus_L=yes
11542       allow_undefined_flag=unsupported
11543       shrext_cmds=.dll
11544       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11545         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11546         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11547         $ECHO EXPORTS >> $output_objdir/$libname.def~
11548         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11549         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11550         emximp -o $lib $output_objdir/$libname.def'
11551       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11552         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11553         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11554         $ECHO EXPORTS >> $output_objdir/$libname.def~
11555         prefix_cmds="$SED"~
11556         if test EXPORTS = "`$SED 1q $export_symbols`"; then
11557           prefix_cmds="$prefix_cmds -e 1d";
11558         fi~
11559         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11560         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11561         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11562         emximp -o $lib $output_objdir/$libname.def'
11563       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11564       enable_shared_with_static_runtimes=yes
11565       ;;
11566
11567     interix[3-9]*)
11568       hardcode_direct=no
11569       hardcode_shlibpath_var=no
11570       hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11571       export_dynamic_flag_spec='$wl-E'
11572       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11573       # Instead, shared libraries are loaded at an image base (0x10000000 by
11574       # default) and relocated if they conflict, which is a slow very memory
11575       # consuming and fragmenting process.  To avoid this, we pick a random,
11576       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11577       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11578       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11579       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'
11580       ;;
11581
11582     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11583       tmp_diet=no
11584       if test linux-dietlibc = "$host_os"; then
11585         case $cc_basename in
11586           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
11587         esac
11588       fi
11589       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11590          && test no = "$tmp_diet"
11591       then
11592         tmp_addflag=' $pic_flag'
11593         tmp_sharedflag='-shared'
11594         case $cc_basename,$host_cpu in
11595         pgcc*)                          # Portland Group C compiler
11596           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'
11597           tmp_addflag=' $pic_flag'
11598           ;;
11599         pgf77* | pgf90* | pgf95* | pgfortran*)
11600                                         # Portland Group f77 and f90 compilers
11601           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'
11602           tmp_addflag=' $pic_flag -Mnomain' ;;
11603         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
11604           tmp_addflag=' -i_dynamic' ;;
11605         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
11606           tmp_addflag=' -i_dynamic -nofor_main' ;;
11607         ifc* | ifort*)                  # Intel Fortran compiler
11608           tmp_addflag=' -nofor_main' ;;
11609         lf95*)                          # Lahey Fortran 8.1
11610           whole_archive_flag_spec=
11611           tmp_sharedflag='--shared' ;;
11612         nagfor*)                        # NAGFOR 5.3
11613           tmp_sharedflag='-Wl,-shared' ;;
11614         xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11615           tmp_sharedflag='-qmkshrobj'
11616           tmp_addflag= ;;
11617         nvcc*)  # Cuda Compiler Driver 2.2
11618           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'
11619           compiler_needs_object=yes
11620           ;;
11621         esac
11622         case `$CC -V 2>&1 | sed 5q` in
11623         *Sun\ C*)                       # Sun C 5.9
11624           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'
11625           compiler_needs_object=yes
11626           tmp_sharedflag='-G' ;;
11627         *Sun\ F*)                       # Sun Fortran 8.3
11628           tmp_sharedflag='-G' ;;
11629         esac
11630         archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11631
11632         if test yes = "$supports_anon_versioning"; then
11633           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11634             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11635             echo "local: *; };" >> $output_objdir/$libname.ver~
11636             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11637         fi
11638
11639         case $cc_basename in
11640         tcc*)
11641           export_dynamic_flag_spec='-rdynamic'
11642           ;;
11643         xlf* | bgf* | bgxlf* | mpixlf*)
11644           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11645           whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11646           hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11647           archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11648           if test yes = "$supports_anon_versioning"; then
11649             archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11650               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11651               echo "local: *; };" >> $output_objdir/$libname.ver~
11652               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11653           fi
11654           ;;
11655         esac
11656       else
11657         ld_shlibs=no
11658       fi
11659       ;;
11660
11661     netbsd*)
11662       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11663         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11664         wlarc=
11665       else
11666         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11667         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11668       fi
11669       ;;
11670
11671     solaris*)
11672       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11673         ld_shlibs=no
11674         cat <<_LT_EOF 1>&2
11675
11676 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
11677 *** create shared libraries on Solaris systems.  Therefore, libtool
11678 *** is disabling shared libraries support.  We urge you to upgrade GNU
11679 *** binutils to release 2.9.1 or newer.  Another option is to modify
11680 *** your PATH or compiler configuration so that the native linker is
11681 *** used, and then restart.
11682
11683 _LT_EOF
11684       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11685         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11686         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11687       else
11688         ld_shlibs=no
11689       fi
11690       ;;
11691
11692     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11693       case `$LD -v 2>&1` in
11694         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11695         ld_shlibs=no
11696         cat <<_LT_EOF 1>&2
11697
11698 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11699 *** reliably create shared libraries on SCO systems.  Therefore, libtool
11700 *** is disabling shared libraries support.  We urge you to upgrade GNU
11701 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11702 *** your PATH or compiler configuration so that the native linker is
11703 *** used, and then restart.
11704
11705 _LT_EOF
11706         ;;
11707         *)
11708           # For security reasons, it is highly recommended that you always
11709           # use absolute paths for naming shared libraries, and exclude the
11710           # DT_RUNPATH tag from executables and libraries.  But doing so
11711           # requires that you compile everything twice, which is a pain.
11712           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11713             hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11714             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11715             archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11716           else
11717             ld_shlibs=no
11718           fi
11719         ;;
11720       esac
11721       ;;
11722
11723     sunos4*)
11724       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11725       wlarc=
11726       hardcode_direct=yes
11727       hardcode_shlibpath_var=no
11728       ;;
11729
11730     *)
11731       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11732         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11733         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11734       else
11735         ld_shlibs=no
11736       fi
11737       ;;
11738     esac
11739
11740     if test no = "$ld_shlibs"; then
11741       runpath_var=
11742       hardcode_libdir_flag_spec=
11743       export_dynamic_flag_spec=
11744       whole_archive_flag_spec=
11745     fi
11746   else
11747     # PORTME fill in a description of your system's linker (not GNU ld)
11748     case $host_os in
11749     aix3*)
11750       allow_undefined_flag=unsupported
11751       always_export_symbols=yes
11752       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'
11753       # Note: this linker hardcodes the directories in LIBPATH if there
11754       # are no directories specified by -L.
11755       hardcode_minus_L=yes
11756       if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11757         # Neither direct hardcoding nor static linking is supported with a
11758         # broken collect2.
11759         hardcode_direct=unsupported
11760       fi
11761       ;;
11762
11763     aix[4-9]*)
11764       if test ia64 = "$host_cpu"; then
11765         # On IA64, the linker does run time linking by default, so we don't
11766         # have to do anything special.
11767         aix_use_runtimelinking=no
11768         exp_sym_flag='-Bexport'
11769         no_entry_flag=
11770       else
11771         # If we're using GNU nm, then we don't want the "-C" option.
11772         # -C means demangle to GNU nm, but means don't demangle to AIX nm.
11773         # Without the "-l" option, or with the "-B" option, AIX nm treats
11774         # weak defined symbols like other global defined symbols, whereas
11775         # GNU nm marks them as "W".
11776         # While the 'weak' keyword is ignored in the Export File, we need
11777         # it in the Import File for the 'aix-soname' feature, so we have
11778         # to replace the "-B" option with "-P" for AIX nm.
11779         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11780           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'
11781         else
11782           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'
11783         fi
11784         aix_use_runtimelinking=no
11785
11786         # Test if we are trying to use run time linking or normal
11787         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
11788         # have runtime linking enabled, and use it for executables.
11789         # For shared libraries, we enable/disable runtime linking
11790         # depending on the kind of the shared library created -
11791         # when "with_aix_soname,aix_use_runtimelinking" is:
11792         # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
11793         # "aix,yes"  lib.so          shared, rtl:yes, for executables
11794         #            lib.a           static archive
11795         # "both,no"  lib.so.V(shr.o) shared, rtl:yes
11796         #            lib.a(lib.so.V) shared, rtl:no,  for executables
11797         # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11798         #            lib.a(lib.so.V) shared, rtl:no
11799         # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
11800         #            lib.a           static archive
11801         case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11802           for ld_flag in $LDFLAGS; do
11803           if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11804             aix_use_runtimelinking=yes
11805             break
11806           fi
11807           done
11808           if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11809             # With aix-soname=svr4, we create the lib.so.V shared archives only,
11810             # so we don't have lib.a shared libs to link our executables.
11811             # We have to force runtime linking in this case.
11812             aix_use_runtimelinking=yes
11813             LDFLAGS="$LDFLAGS -Wl,-brtl"
11814           fi
11815           ;;
11816         esac
11817
11818         exp_sym_flag='-bexport'
11819         no_entry_flag='-bnoentry'
11820       fi
11821
11822       # When large executables or shared objects are built, AIX ld can
11823       # have problems creating the table of contents.  If linking a library
11824       # or program results in "error TOC overflow" add -mminimal-toc to
11825       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11826       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11827
11828       archive_cmds=''
11829       hardcode_direct=yes
11830       hardcode_direct_absolute=yes
11831       hardcode_libdir_separator=':'
11832       link_all_deplibs=yes
11833       file_list_spec='$wl-f,'
11834       case $with_aix_soname,$aix_use_runtimelinking in
11835       aix,*) ;; # traditional, no import file
11836       svr4,* | *,yes) # use import file
11837         # The Import File defines what to hardcode.
11838         hardcode_direct=no
11839         hardcode_direct_absolute=no
11840         ;;
11841       esac
11842
11843       if test yes = "$GCC"; then
11844         case $host_os in aix4.[012]|aix4.[012].*)
11845         # We only want to do this on AIX 4.2 and lower, the check
11846         # below for broken collect2 doesn't work under 4.3+
11847           collect2name=`$CC -print-prog-name=collect2`
11848           if test -f "$collect2name" &&
11849            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
11850           then
11851           # We have reworked collect2
11852           :
11853           else
11854           # We have old collect2
11855           hardcode_direct=unsupported
11856           # It fails to find uninstalled libraries when the uninstalled
11857           # path is not listed in the libpath.  Setting hardcode_minus_L
11858           # to unsupported forces relinking
11859           hardcode_minus_L=yes
11860           hardcode_libdir_flag_spec='-L$libdir'
11861           hardcode_libdir_separator=
11862           fi
11863           ;;
11864         esac
11865         shared_flag='-shared'
11866         if test yes = "$aix_use_runtimelinking"; then
11867           shared_flag="$shared_flag "'$wl-G'
11868         fi
11869         # Need to ensure runtime linking is disabled for the traditional
11870         # shared library, or the linker may eventually find shared libraries
11871         # /with/ Import File - we do not want to mix them.
11872         shared_flag_aix='-shared'
11873         shared_flag_svr4='-shared $wl-G'
11874       else
11875         # not using gcc
11876         if test ia64 = "$host_cpu"; then
11877         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11878         # chokes on -Wl,-G. The following line is correct:
11879           shared_flag='-G'
11880         else
11881           if test yes = "$aix_use_runtimelinking"; then
11882             shared_flag='$wl-G'
11883           else
11884             shared_flag='$wl-bM:SRE'
11885           fi
11886           shared_flag_aix='$wl-bM:SRE'
11887           shared_flag_svr4='$wl-G'
11888         fi
11889       fi
11890
11891       export_dynamic_flag_spec='$wl-bexpall'
11892       # It seems that -bexpall does not export symbols beginning with
11893       # underscore (_), so it is better to generate a list of symbols to export.
11894       always_export_symbols=yes
11895       if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
11896         # Warning - without using the other runtime loading flags (-brtl),
11897         # -berok will link without error, but may produce a broken library.
11898         allow_undefined_flag='-berok'
11899         # Determine the default libpath from the value encoded in an
11900         # empty executable.
11901         if test set = "${lt_cv_aix_libpath+set}"; then
11902   aix_libpath=$lt_cv_aix_libpath
11903 else
11904   if ${lt_cv_aix_libpath_+:} false; then :
11905   $as_echo_n "(cached) " >&6
11906 else
11907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11908 /* end confdefs.h.  */
11909
11910 int
11911 main ()
11912 {
11913
11914   ;
11915   return 0;
11916 }
11917 _ACEOF
11918 if ac_fn_c_try_link "$LINENO"; then :
11919
11920   lt_aix_libpath_sed='
11921       /Import File Strings/,/^$/ {
11922           /^0/ {
11923               s/^0  *\([^ ]*\) *$/\1/
11924               p
11925           }
11926       }'
11927   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11928   # Check for a 64-bit object if we didn't find anything.
11929   if test -z "$lt_cv_aix_libpath_"; then
11930     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11931   fi
11932 fi
11933 rm -f core conftest.err conftest.$ac_objext \
11934     conftest$ac_exeext conftest.$ac_ext
11935   if test -z "$lt_cv_aix_libpath_"; then
11936     lt_cv_aix_libpath_=/usr/lib:/lib
11937   fi
11938
11939 fi
11940
11941   aix_libpath=$lt_cv_aix_libpath_
11942 fi
11943
11944         hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
11945         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
11946       else
11947         if test ia64 = "$host_cpu"; then
11948           hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
11949           allow_undefined_flag="-z nodefs"
11950           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"
11951         else
11952          # Determine the default libpath from the value encoded in an
11953          # empty executable.
11954          if test set = "${lt_cv_aix_libpath+set}"; then
11955   aix_libpath=$lt_cv_aix_libpath
11956 else
11957   if ${lt_cv_aix_libpath_+:} false; then :
11958   $as_echo_n "(cached) " >&6
11959 else
11960   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11961 /* end confdefs.h.  */
11962
11963 int
11964 main ()
11965 {
11966
11967   ;
11968   return 0;
11969 }
11970 _ACEOF
11971 if ac_fn_c_try_link "$LINENO"; then :
11972
11973   lt_aix_libpath_sed='
11974       /Import File Strings/,/^$/ {
11975           /^0/ {
11976               s/^0  *\([^ ]*\) *$/\1/
11977               p
11978           }
11979       }'
11980   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11981   # Check for a 64-bit object if we didn't find anything.
11982   if test -z "$lt_cv_aix_libpath_"; then
11983     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11984   fi
11985 fi
11986 rm -f core conftest.err conftest.$ac_objext \
11987     conftest$ac_exeext conftest.$ac_ext
11988   if test -z "$lt_cv_aix_libpath_"; then
11989     lt_cv_aix_libpath_=/usr/lib:/lib
11990   fi
11991
11992 fi
11993
11994   aix_libpath=$lt_cv_aix_libpath_
11995 fi
11996
11997          hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
11998           # Warning - without using the other run time loading flags,
11999           # -berok will link without error, but may produce a broken library.
12000           no_undefined_flag=' $wl-bernotok'
12001           allow_undefined_flag=' $wl-berok'
12002           if test yes = "$with_gnu_ld"; then
12003             # We only use this code for GNU lds that support --whole-archive.
12004             whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
12005           else
12006             # Exported symbols can be pulled into shared objects from archives
12007             whole_archive_flag_spec='$convenience'
12008           fi
12009           archive_cmds_need_lc=yes
12010           archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
12011           # -brtl affects multiple linker settings, -berok does not and is overridden later
12012           compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
12013           if test svr4 != "$with_aix_soname"; then
12014             # This is similar to how AIX traditionally builds its shared libraries.
12015             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'
12016           fi
12017           if test aix != "$with_aix_soname"; then
12018             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'
12019           else
12020             # used by -dlpreopen to get the symbols
12021             archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
12022           fi
12023           archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
12024         fi
12025       fi
12026       ;;
12027
12028     amigaos*)
12029       case $host_cpu in
12030       powerpc)
12031             # see comment about AmigaOS4 .so support
12032             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12033             archive_expsym_cmds=''
12034         ;;
12035       m68k)
12036             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)'
12037             hardcode_libdir_flag_spec='-L$libdir'
12038             hardcode_minus_L=yes
12039         ;;
12040       esac
12041       ;;
12042
12043     bsdi[45]*)
12044       export_dynamic_flag_spec=-rdynamic
12045       ;;
12046
12047     cygwin* | mingw* | pw32* | cegcc*)
12048       # When not using gcc, we currently assume that we are using
12049       # Microsoft Visual C++.
12050       # hardcode_libdir_flag_spec is actually meaningless, as there is
12051       # no search path for DLLs.
12052       case $cc_basename in
12053       cl*)
12054         # Native MSVC
12055         hardcode_libdir_flag_spec=' '
12056         allow_undefined_flag=unsupported
12057         always_export_symbols=yes
12058         file_list_spec='@'
12059         # Tell ltmain to make .lib files, not .a files.
12060         libext=lib
12061         # Tell ltmain to make .dll files, not .so files.
12062         shrext_cmds=.dll
12063         # FIXME: Setting linknames here is a bad hack.
12064         archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
12065         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12066             cp "$export_symbols" "$output_objdir/$soname.def";
12067             echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
12068           else
12069             $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
12070           fi~
12071           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12072           linknames='
12073         # The linker will not automatically build a static lib if we build a DLL.
12074         # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12075         enable_shared_with_static_runtimes=yes
12076         exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
12077         export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12078         # Don't use ranlib
12079         old_postinstall_cmds='chmod 644 $oldlib'
12080         postlink_cmds='lt_outputfile="@OUTPUT@"~
12081           lt_tool_outputfile="@TOOL_OUTPUT@"~
12082           case $lt_outputfile in
12083             *.exe|*.EXE) ;;
12084             *)
12085               lt_outputfile=$lt_outputfile.exe
12086               lt_tool_outputfile=$lt_tool_outputfile.exe
12087               ;;
12088           esac~
12089           if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
12090             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12091             $RM "$lt_outputfile.manifest";
12092           fi'
12093         ;;
12094       *)
12095         # Assume MSVC wrapper
12096         hardcode_libdir_flag_spec=' '
12097         allow_undefined_flag=unsupported
12098         # Tell ltmain to make .lib files, not .a files.
12099         libext=lib
12100         # Tell ltmain to make .dll files, not .so files.
12101         shrext_cmds=.dll
12102         # FIXME: Setting linknames here is a bad hack.
12103         archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12104         # The linker will automatically build a .lib file if we build a DLL.
12105         old_archive_from_new_cmds='true'
12106         # FIXME: Should let the user specify the lib program.
12107         old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12108         enable_shared_with_static_runtimes=yes
12109         ;;
12110       esac
12111       ;;
12112
12113     darwin* | rhapsody*)
12114
12115
12116   archive_cmds_need_lc=no
12117   hardcode_direct=no
12118   hardcode_automatic=yes
12119   hardcode_shlibpath_var=unsupported
12120   if test yes = "$lt_cv_ld_force_load"; then
12121     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\"`'
12122
12123   else
12124     whole_archive_flag_spec=''
12125   fi
12126   link_all_deplibs=yes
12127   allow_undefined_flag=$_lt_dar_allow_undefined
12128   case $cc_basename in
12129      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
12130      *) _lt_dar_can_shared=$GCC ;;
12131   esac
12132   if test yes = "$_lt_dar_can_shared"; then
12133     output_verbose_link_cmd=func_echo_all
12134     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
12135     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
12136     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"
12137     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"
12138
12139   else
12140   ld_shlibs=no
12141   fi
12142
12143       ;;
12144
12145     dgux*)
12146       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12147       hardcode_libdir_flag_spec='-L$libdir'
12148       hardcode_shlibpath_var=no
12149       ;;
12150
12151     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12152     # support.  Future versions do this automatically, but an explicit c++rt0.o
12153     # does not break anything, and helps significantly (at the cost of a little
12154     # extra space).
12155     freebsd2.2*)
12156       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12157       hardcode_libdir_flag_spec='-R$libdir'
12158       hardcode_direct=yes
12159       hardcode_shlibpath_var=no
12160       ;;
12161
12162     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12163     freebsd2.*)
12164       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12165       hardcode_direct=yes
12166       hardcode_minus_L=yes
12167       hardcode_shlibpath_var=no
12168       ;;
12169
12170     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12171     freebsd* | dragonfly*)
12172       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12173       hardcode_libdir_flag_spec='-R$libdir'
12174       hardcode_direct=yes
12175       hardcode_shlibpath_var=no
12176       ;;
12177
12178     hpux9*)
12179       if test yes = "$GCC"; then
12180         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'
12181       else
12182         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'
12183       fi
12184       hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12185       hardcode_libdir_separator=:
12186       hardcode_direct=yes
12187
12188       # hardcode_minus_L: Not really in the search PATH,
12189       # but as the default location of the library.
12190       hardcode_minus_L=yes
12191       export_dynamic_flag_spec='$wl-E'
12192       ;;
12193
12194     hpux10*)
12195       if test yes,no = "$GCC,$with_gnu_ld"; then
12196         archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12197       else
12198         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12199       fi
12200       if test no = "$with_gnu_ld"; then
12201         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12202         hardcode_libdir_separator=:
12203         hardcode_direct=yes
12204         hardcode_direct_absolute=yes
12205         export_dynamic_flag_spec='$wl-E'
12206         # hardcode_minus_L: Not really in the search PATH,
12207         # but as the default location of the library.
12208         hardcode_minus_L=yes
12209       fi
12210       ;;
12211
12212     hpux11*)
12213       if test yes,no = "$GCC,$with_gnu_ld"; then
12214         case $host_cpu in
12215         hppa*64*)
12216           archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12217           ;;
12218         ia64*)
12219           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12220           ;;
12221         *)
12222           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12223           ;;
12224         esac
12225       else
12226         case $host_cpu in
12227         hppa*64*)
12228           archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12229           ;;
12230         ia64*)
12231           archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12232           ;;
12233         *)
12234
12235           # Older versions of the 11.00 compiler do not understand -b yet
12236           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12237           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12238 $as_echo_n "checking if $CC understands -b... " >&6; }
12239 if ${lt_cv_prog_compiler__b+:} false; then :
12240   $as_echo_n "(cached) " >&6
12241 else
12242   lt_cv_prog_compiler__b=no
12243    save_LDFLAGS=$LDFLAGS
12244    LDFLAGS="$LDFLAGS -b"
12245    echo "$lt_simple_link_test_code" > conftest.$ac_ext
12246    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12247      # The linker can only warn and ignore the option if not recognized
12248      # So say no if there are warnings
12249      if test -s conftest.err; then
12250        # Append any errors to the config.log.
12251        cat conftest.err 1>&5
12252        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12253        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12254        if diff conftest.exp conftest.er2 >/dev/null; then
12255          lt_cv_prog_compiler__b=yes
12256        fi
12257      else
12258        lt_cv_prog_compiler__b=yes
12259      fi
12260    fi
12261    $RM -r conftest*
12262    LDFLAGS=$save_LDFLAGS
12263
12264 fi
12265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12266 $as_echo "$lt_cv_prog_compiler__b" >&6; }
12267
12268 if test yes = "$lt_cv_prog_compiler__b"; then
12269     archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12270 else
12271     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12272 fi
12273
12274           ;;
12275         esac
12276       fi
12277       if test no = "$with_gnu_ld"; then
12278         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12279         hardcode_libdir_separator=:
12280
12281         case $host_cpu in
12282         hppa*64*|ia64*)
12283           hardcode_direct=no
12284           hardcode_shlibpath_var=no
12285           ;;
12286         *)
12287           hardcode_direct=yes
12288           hardcode_direct_absolute=yes
12289           export_dynamic_flag_spec='$wl-E'
12290
12291           # hardcode_minus_L: Not really in the search PATH,
12292           # but as the default location of the library.
12293           hardcode_minus_L=yes
12294           ;;
12295         esac
12296       fi
12297       ;;
12298
12299     irix5* | irix6* | nonstopux*)
12300       if test yes = "$GCC"; then
12301         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'
12302         # Try to use the -exported_symbol ld option, if it does not
12303         # work, assume that -exports_file does not work either and
12304         # implicitly export all symbols.
12305         # This should be the same for all languages, so no per-tag cache variable.
12306         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12307 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12308 if ${lt_cv_irix_exported_symbol+:} false; then :
12309   $as_echo_n "(cached) " >&6
12310 else
12311   save_LDFLAGS=$LDFLAGS
12312            LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12313            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12314 /* end confdefs.h.  */
12315 int foo (void) { return 0; }
12316 _ACEOF
12317 if ac_fn_c_try_link "$LINENO"; then :
12318   lt_cv_irix_exported_symbol=yes
12319 else
12320   lt_cv_irix_exported_symbol=no
12321 fi
12322 rm -f core conftest.err conftest.$ac_objext \
12323     conftest$ac_exeext conftest.$ac_ext
12324            LDFLAGS=$save_LDFLAGS
12325 fi
12326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12327 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
12328         if test yes = "$lt_cv_irix_exported_symbol"; then
12329           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'
12330         fi
12331       else
12332         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'
12333         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'
12334       fi
12335       archive_cmds_need_lc='no'
12336       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12337       hardcode_libdir_separator=:
12338       inherit_rpath=yes
12339       link_all_deplibs=yes
12340       ;;
12341
12342     linux*)
12343       case $cc_basename in
12344       tcc*)
12345         # Fabrice Bellard et al's Tiny C Compiler
12346         ld_shlibs=yes
12347         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12348         ;;
12349       esac
12350       ;;
12351
12352     netbsd*)
12353       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12354         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12355       else
12356         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12357       fi
12358       hardcode_libdir_flag_spec='-R$libdir'
12359       hardcode_direct=yes
12360       hardcode_shlibpath_var=no
12361       ;;
12362
12363     newsos6)
12364       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12365       hardcode_direct=yes
12366       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12367       hardcode_libdir_separator=:
12368       hardcode_shlibpath_var=no
12369       ;;
12370
12371     *nto* | *qnx*)
12372       ;;
12373
12374     openbsd* | bitrig*)
12375       if test -f /usr/libexec/ld.so; then
12376         hardcode_direct=yes
12377         hardcode_shlibpath_var=no
12378         hardcode_direct_absolute=yes
12379         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12380           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12381           archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12382           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12383           export_dynamic_flag_spec='$wl-E'
12384         else
12385           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12386           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12387         fi
12388       else
12389         ld_shlibs=no
12390       fi
12391       ;;
12392
12393     os2*)
12394       hardcode_libdir_flag_spec='-L$libdir'
12395       hardcode_minus_L=yes
12396       allow_undefined_flag=unsupported
12397       shrext_cmds=.dll
12398       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12399         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12400         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12401         $ECHO EXPORTS >> $output_objdir/$libname.def~
12402         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12403         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12404         emximp -o $lib $output_objdir/$libname.def'
12405       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12406         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12407         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12408         $ECHO EXPORTS >> $output_objdir/$libname.def~
12409         prefix_cmds="$SED"~
12410         if test EXPORTS = "`$SED 1q $export_symbols`"; then
12411           prefix_cmds="$prefix_cmds -e 1d";
12412         fi~
12413         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12414         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12415         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12416         emximp -o $lib $output_objdir/$libname.def'
12417       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12418       enable_shared_with_static_runtimes=yes
12419       ;;
12420
12421     osf3*)
12422       if test yes = "$GCC"; then
12423         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12424         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'
12425       else
12426         allow_undefined_flag=' -expect_unresolved \*'
12427         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'
12428       fi
12429       archive_cmds_need_lc='no'
12430       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12431       hardcode_libdir_separator=:
12432       ;;
12433
12434     osf4* | osf5*)      # as osf3* with the addition of -msym flag
12435       if test yes = "$GCC"; then
12436         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12437         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'
12438         hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12439       else
12440         allow_undefined_flag=' -expect_unresolved \*'
12441         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'
12442         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~
12443           $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'
12444
12445         # Both c and cxx compiler support -rpath directly
12446         hardcode_libdir_flag_spec='-rpath $libdir'
12447       fi
12448       archive_cmds_need_lc='no'
12449       hardcode_libdir_separator=:
12450       ;;
12451
12452     solaris*)
12453       no_undefined_flag=' -z defs'
12454       if test yes = "$GCC"; then
12455         wlarc='$wl'
12456         archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12457         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12458           $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'
12459       else
12460         case `$CC -V 2>&1` in
12461         *"Compilers 5.0"*)
12462           wlarc=''
12463           archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12464           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12465             $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12466           ;;
12467         *)
12468           wlarc='$wl'
12469           archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12470           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12471             $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12472           ;;
12473         esac
12474       fi
12475       hardcode_libdir_flag_spec='-R$libdir'
12476       hardcode_shlibpath_var=no
12477       case $host_os in
12478       solaris2.[0-5] | solaris2.[0-5].*) ;;
12479       *)
12480         # The compiler driver will combine and reorder linker options,
12481         # but understands '-z linker_flag'.  GCC discards it without '$wl',
12482         # but is careful enough not to reorder.
12483         # Supported since Solaris 2.6 (maybe 2.5.1?)
12484         if test yes = "$GCC"; then
12485           whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12486         else
12487           whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12488         fi
12489         ;;
12490       esac
12491       link_all_deplibs=yes
12492       ;;
12493
12494     sunos4*)
12495       if test sequent = "$host_vendor"; then
12496         # Use $CC to link under sequent, because it throws in some extra .o
12497         # files that make .init and .fini sections work.
12498         archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12499       else
12500         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12501       fi
12502       hardcode_libdir_flag_spec='-L$libdir'
12503       hardcode_direct=yes
12504       hardcode_minus_L=yes
12505       hardcode_shlibpath_var=no
12506       ;;
12507
12508     sysv4)
12509       case $host_vendor in
12510         sni)
12511           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12512           hardcode_direct=yes # is this really true???
12513         ;;
12514         siemens)
12515           ## LD is ld it makes a PLAMLIB
12516           ## CC just makes a GrossModule.
12517           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12518           reload_cmds='$CC -r -o $output$reload_objs'
12519           hardcode_direct=no
12520         ;;
12521         motorola)
12522           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12523           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12524         ;;
12525       esac
12526       runpath_var='LD_RUN_PATH'
12527       hardcode_shlibpath_var=no
12528       ;;
12529
12530     sysv4.3*)
12531       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12532       hardcode_shlibpath_var=no
12533       export_dynamic_flag_spec='-Bexport'
12534       ;;
12535
12536     sysv4*MP*)
12537       if test -d /usr/nec; then
12538         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12539         hardcode_shlibpath_var=no
12540         runpath_var=LD_RUN_PATH
12541         hardcode_runpath_var=yes
12542         ld_shlibs=yes
12543       fi
12544       ;;
12545
12546     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12547       no_undefined_flag='$wl-z,text'
12548       archive_cmds_need_lc=no
12549       hardcode_shlibpath_var=no
12550       runpath_var='LD_RUN_PATH'
12551
12552       if test yes = "$GCC"; then
12553         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12554         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12555       else
12556         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12557         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12558       fi
12559       ;;
12560
12561     sysv5* | sco3.2v5* | sco5v6*)
12562       # Note: We CANNOT use -z defs as we might desire, because we do not
12563       # link with -lc, and that would cause any symbols used from libc to
12564       # always be unresolved, which means just about no library would
12565       # ever link correctly.  If we're not using GNU ld we use -z text
12566       # though, which does catch some bad symbols but isn't as heavy-handed
12567       # as -z defs.
12568       no_undefined_flag='$wl-z,text'
12569       allow_undefined_flag='$wl-z,nodefs'
12570       archive_cmds_need_lc=no
12571       hardcode_shlibpath_var=no
12572       hardcode_libdir_flag_spec='$wl-R,$libdir'
12573       hardcode_libdir_separator=':'
12574       link_all_deplibs=yes
12575       export_dynamic_flag_spec='$wl-Bexport'
12576       runpath_var='LD_RUN_PATH'
12577
12578       if test yes = "$GCC"; then
12579         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12580         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12581       else
12582         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12583         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12584       fi
12585       ;;
12586
12587     uts4*)
12588       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12589       hardcode_libdir_flag_spec='-L$libdir'
12590       hardcode_shlibpath_var=no
12591       ;;
12592
12593     *)
12594       ld_shlibs=no
12595       ;;
12596     esac
12597
12598     if test sni = "$host_vendor"; then
12599       case $host in
12600       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12601         export_dynamic_flag_spec='$wl-Blargedynsym'
12602         ;;
12603       esac
12604     fi
12605   fi
12606
12607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12608 $as_echo "$ld_shlibs" >&6; }
12609 test no = "$ld_shlibs" && can_build_shared=no
12610
12611 with_gnu_ld=$with_gnu_ld
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627 #
12628 # Do we need to explicitly link libc?
12629 #
12630 case "x$archive_cmds_need_lc" in
12631 x|xyes)
12632   # Assume -lc should be added
12633   archive_cmds_need_lc=yes
12634
12635   if test yes,yes = "$GCC,$enable_shared"; then
12636     case $archive_cmds in
12637     *'~'*)
12638       # FIXME: we may have to deal with multi-command sequences.
12639       ;;
12640     '$CC '*)
12641       # Test whether the compiler implicitly links with -lc since on some
12642       # systems, -lgcc has to come before -lc. If gcc already passes -lc
12643       # to ld, don't add -lc before -lgcc.
12644       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12645 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12646 if ${lt_cv_archive_cmds_need_lc+:} false; then :
12647   $as_echo_n "(cached) " >&6
12648 else
12649   $RM conftest*
12650         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12651
12652         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12653   (eval $ac_compile) 2>&5
12654   ac_status=$?
12655   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12656   test $ac_status = 0; } 2>conftest.err; then
12657           soname=conftest
12658           lib=conftest
12659           libobjs=conftest.$ac_objext
12660           deplibs=
12661           wl=$lt_prog_compiler_wl
12662           pic_flag=$lt_prog_compiler_pic
12663           compiler_flags=-v
12664           linker_flags=-v
12665           verstring=
12666           output_objdir=.
12667           libname=conftest
12668           lt_save_allow_undefined_flag=$allow_undefined_flag
12669           allow_undefined_flag=
12670           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12671   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12672   ac_status=$?
12673   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12674   test $ac_status = 0; }
12675           then
12676             lt_cv_archive_cmds_need_lc=no
12677           else
12678             lt_cv_archive_cmds_need_lc=yes
12679           fi
12680           allow_undefined_flag=$lt_save_allow_undefined_flag
12681         else
12682           cat conftest.err 1>&5
12683         fi
12684         $RM conftest*
12685
12686 fi
12687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12688 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12689       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12690       ;;
12691     esac
12692   fi
12693   ;;
12694 esac
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12848 $as_echo_n "checking dynamic linker characteristics... " >&6; }
12849
12850 if test yes = "$GCC"; then
12851   case $host_os in
12852     darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
12853     *) lt_awk_arg='/^libraries:/' ;;
12854   esac
12855   case $host_os in
12856     mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
12857     *) lt_sed_strip_eq='s|=/|/|g' ;;
12858   esac
12859   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
12860   case $lt_search_path_spec in
12861   *\;*)
12862     # if the path contains ";" then we assume it to be the separator
12863     # otherwise default to the standard path separator (i.e. ":") - it is
12864     # assumed that no part of a normal pathname contains ";" but that should
12865     # okay in the real world where ";" in dirpaths is itself problematic.
12866     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
12867     ;;
12868   *)
12869     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
12870     ;;
12871   esac
12872   # Ok, now we have the path, separated by spaces, we can step through it
12873   # and add multilib dir if necessary...
12874   lt_tmp_lt_search_path_spec=
12875   lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
12876   # ...but if some path component already ends with the multilib dir we assume
12877   # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
12878   case "$lt_multi_os_dir; $lt_search_path_spec " in
12879   "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
12880     lt_multi_os_dir=
12881     ;;
12882   esac
12883   for lt_sys_path in $lt_search_path_spec; do
12884     if test -d "$lt_sys_path$lt_multi_os_dir"; then
12885       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
12886     elif test -n "$lt_multi_os_dir"; then
12887       test -d "$lt_sys_path" && \
12888         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
12889     fi
12890   done
12891   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
12892 BEGIN {RS = " "; FS = "/|\n";} {
12893   lt_foo = "";
12894   lt_count = 0;
12895   for (lt_i = NF; lt_i > 0; lt_i--) {
12896     if ($lt_i != "" && $lt_i != ".") {
12897       if ($lt_i == "..") {
12898         lt_count++;
12899       } else {
12900         if (lt_count == 0) {
12901           lt_foo = "/" $lt_i lt_foo;
12902         } else {
12903           lt_count--;
12904         }
12905       }
12906     }
12907   }
12908   if (lt_foo != "") { lt_freq[lt_foo]++; }
12909   if (lt_freq[lt_foo] == 1) { print lt_foo; }
12910 }'`
12911   # AWK program above erroneously prepends '/' to C:/dos/paths
12912   # for these hosts.
12913   case $host_os in
12914     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
12915       $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
12916   esac
12917   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
12918 else
12919   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12920 fi
12921 library_names_spec=
12922 libname_spec='lib$name'
12923 soname_spec=
12924 shrext_cmds=.so
12925 postinstall_cmds=
12926 postuninstall_cmds=
12927 finish_cmds=
12928 finish_eval=
12929 shlibpath_var=
12930 shlibpath_overrides_runpath=unknown
12931 version_type=none
12932 dynamic_linker="$host_os ld.so"
12933 sys_lib_dlsearch_path_spec="/lib /usr/lib"
12934 need_lib_prefix=unknown
12935 hardcode_into_libs=no
12936
12937 # when you set need_version to no, make sure it does not cause -set_version
12938 # flags to be left without arguments
12939 need_version=unknown
12940
12941
12942
12943 case $host_os in
12944 aix3*)
12945   version_type=linux # correct to gnu/linux during the next big refactor
12946   library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
12947   shlibpath_var=LIBPATH
12948
12949   # AIX 3 has no versioning support, so we append a major version to the name.
12950   soname_spec='$libname$release$shared_ext$major'
12951   ;;
12952
12953 aix[4-9]*)
12954   version_type=linux # correct to gnu/linux during the next big refactor
12955   need_lib_prefix=no
12956   need_version=no
12957   hardcode_into_libs=yes
12958   if test ia64 = "$host_cpu"; then
12959     # AIX 5 supports IA64
12960     library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
12961     shlibpath_var=LD_LIBRARY_PATH
12962   else
12963     # With GCC up to 2.95.x, collect2 would create an import file
12964     # for dependence libraries.  The import file would start with
12965     # the line '#! .'.  This would cause the generated library to
12966     # depend on '.', always an invalid library.  This was fixed in
12967     # development snapshots of GCC prior to 3.0.
12968     case $host_os in
12969       aix4 | aix4.[01] | aix4.[01].*)
12970       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12971            echo ' yes '
12972            echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
12973         :
12974       else
12975         can_build_shared=no
12976       fi
12977       ;;
12978     esac
12979     # Using Import Files as archive members, it is possible to support
12980     # filename-based versioning of shared library archives on AIX. While
12981     # this would work for both with and without runtime linking, it will
12982     # prevent static linking of such archives. So we do filename-based
12983     # shared library versioning with .so extension only, which is used
12984     # when both runtime linking and shared linking is enabled.
12985     # Unfortunately, runtime linking may impact performance, so we do
12986     # not want this to be the default eventually. Also, we use the
12987     # versioned .so libs for executables only if there is the -brtl
12988     # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
12989     # To allow for filename-based versioning support, we need to create
12990     # libNAME.so.V as an archive file, containing:
12991     # *) an Import File, referring to the versioned filename of the
12992     #    archive as well as the shared archive member, telling the
12993     #    bitwidth (32 or 64) of that shared object, and providing the
12994     #    list of exported symbols of that shared object, eventually
12995     #    decorated with the 'weak' keyword
12996     # *) the shared object with the F_LOADONLY flag set, to really avoid
12997     #    it being seen by the linker.
12998     # At run time we better use the real file rather than another symlink,
12999     # but for link time we create the symlink libNAME.so -> libNAME.so.V
13000
13001     case $with_aix_soname,$aix_use_runtimelinking in
13002     # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
13003     # soname into executable. Probably we can add versioning support to
13004     # collect2, so additional links can be useful in future.
13005     aix,yes) # traditional libtool
13006       dynamic_linker='AIX unversionable lib.so'
13007       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
13008       # instead of lib<name>.a to let people know that these are not
13009       # typical AIX shared libraries.
13010       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13011       ;;
13012     aix,no) # traditional AIX only
13013       dynamic_linker='AIX lib.a(lib.so.V)'
13014       # We preserve .a as extension for shared libraries through AIX4.2
13015       # and later when we are not doing run time linking.
13016       library_names_spec='$libname$release.a $libname.a'
13017       soname_spec='$libname$release$shared_ext$major'
13018       ;;
13019     svr4,*) # full svr4 only
13020       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
13021       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13022       # We do not specify a path in Import Files, so LIBPATH fires.
13023       shlibpath_overrides_runpath=yes
13024       ;;
13025     *,yes) # both, prefer svr4
13026       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
13027       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13028       # unpreferred sharedlib libNAME.a needs extra handling
13029       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"'
13030       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"'
13031       # We do not specify a path in Import Files, so LIBPATH fires.
13032       shlibpath_overrides_runpath=yes
13033       ;;
13034     *,no) # both, prefer aix
13035       dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
13036       library_names_spec='$libname$release.a $libname.a'
13037       soname_spec='$libname$release$shared_ext$major'
13038       # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
13039       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)'
13040       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"'
13041       ;;
13042     esac
13043     shlibpath_var=LIBPATH
13044   fi
13045   ;;
13046
13047 amigaos*)
13048   case $host_cpu in
13049   powerpc)
13050     # Since July 2007 AmigaOS4 officially supports .so libraries.
13051     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
13052     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13053     ;;
13054   m68k)
13055     library_names_spec='$libname.ixlibrary $libname.a'
13056     # Create ${libname}_ixlibrary.a entries in /sys/libs.
13057     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'
13058     ;;
13059   esac
13060   ;;
13061
13062 beos*)
13063   library_names_spec='$libname$shared_ext'
13064   dynamic_linker="$host_os ld.so"
13065   shlibpath_var=LIBRARY_PATH
13066   ;;
13067
13068 bsdi[45]*)
13069   version_type=linux # correct to gnu/linux during the next big refactor
13070   need_version=no
13071   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13072   soname_spec='$libname$release$shared_ext$major'
13073   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13074   shlibpath_var=LD_LIBRARY_PATH
13075   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13076   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13077   # the default ld.so.conf also contains /usr/contrib/lib and
13078   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13079   # libtool to hard-code these into programs
13080   ;;
13081
13082 cygwin* | mingw* | pw32* | cegcc*)
13083   version_type=windows
13084   shrext_cmds=.dll
13085   need_version=no
13086   need_lib_prefix=no
13087
13088   case $GCC,$cc_basename in
13089   yes,*)
13090     # gcc
13091     library_names_spec='$libname.dll.a'
13092     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13093     postinstall_cmds='base_file=`basename \$file`~
13094       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13095       dldir=$destdir/`dirname \$dlpath`~
13096       test -d \$dldir || mkdir -p \$dldir~
13097       $install_prog $dir/$dlname \$dldir/$dlname~
13098       chmod a+x \$dldir/$dlname~
13099       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13100         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13101       fi'
13102     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13103       dlpath=$dir/\$dldll~
13104        $RM \$dlpath'
13105     shlibpath_overrides_runpath=yes
13106
13107     case $host_os in
13108     cygwin*)
13109       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13110       soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13111
13112       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
13113       ;;
13114     mingw* | cegcc*)
13115       # MinGW DLLs use traditional 'lib' prefix
13116       soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13117       ;;
13118     pw32*)
13119       # pw32 DLLs use 'pw' prefix rather than 'lib'
13120       library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13121       ;;
13122     esac
13123     dynamic_linker='Win32 ld.exe'
13124     ;;
13125
13126   *,cl*)
13127     # Native MSVC
13128     libname_spec='$name'
13129     soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13130     library_names_spec='$libname.dll.lib'
13131
13132     case $build_os in
13133     mingw*)
13134       sys_lib_search_path_spec=
13135       lt_save_ifs=$IFS
13136       IFS=';'
13137       for lt_path in $LIB
13138       do
13139         IFS=$lt_save_ifs
13140         # Let DOS variable expansion print the short 8.3 style file name.
13141         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
13142         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13143       done
13144       IFS=$lt_save_ifs
13145       # Convert to MSYS style.
13146       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13147       ;;
13148     cygwin*)
13149       # Convert to unix form, then to dos form, then back to unix form
13150       # but this time dos style (no spaces!) so that the unix form looks
13151       # like /cygdrive/c/PROGRA~1:/cygdr...
13152       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13153       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13154       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13155       ;;
13156     *)
13157       sys_lib_search_path_spec=$LIB
13158       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13159         # It is most probably a Windows format PATH.
13160         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13161       else
13162         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13163       fi
13164       # FIXME: find the short name or the path components, as spaces are
13165       # common. (e.g. "Program Files" -> "PROGRA~1")
13166       ;;
13167     esac
13168
13169     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13170     postinstall_cmds='base_file=`basename \$file`~
13171       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13172       dldir=$destdir/`dirname \$dlpath`~
13173       test -d \$dldir || mkdir -p \$dldir~
13174       $install_prog $dir/$dlname \$dldir/$dlname'
13175     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13176       dlpath=$dir/\$dldll~
13177        $RM \$dlpath'
13178     shlibpath_overrides_runpath=yes
13179     dynamic_linker='Win32 link.exe'
13180     ;;
13181
13182   *)
13183     # Assume MSVC wrapper
13184     library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13185     dynamic_linker='Win32 ld.exe'
13186     ;;
13187   esac
13188   # FIXME: first we should search . and the directory the executable is in
13189   shlibpath_var=PATH
13190   ;;
13191
13192 darwin* | rhapsody*)
13193   dynamic_linker="$host_os dyld"
13194   version_type=darwin
13195   need_lib_prefix=no
13196   need_version=no
13197   library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13198   soname_spec='$libname$release$major$shared_ext'
13199   shlibpath_overrides_runpath=yes
13200   shlibpath_var=DYLD_LIBRARY_PATH
13201   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13202
13203   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13204   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13205   ;;
13206
13207 dgux*)
13208   version_type=linux # correct to gnu/linux during the next big refactor
13209   need_lib_prefix=no
13210   need_version=no
13211   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13212   soname_spec='$libname$release$shared_ext$major'
13213   shlibpath_var=LD_LIBRARY_PATH
13214   ;;
13215
13216 freebsd* | dragonfly*)
13217   # DragonFly does not have aout.  When/if they implement a new
13218   # versioning mechanism, adjust this.
13219   if test -x /usr/bin/objformat; then
13220     objformat=`/usr/bin/objformat`
13221   else
13222     case $host_os in
13223     freebsd[23].*) objformat=aout ;;
13224     *) objformat=elf ;;
13225     esac
13226   fi
13227   version_type=freebsd-$objformat
13228   case $version_type in
13229     freebsd-elf*)
13230       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13231       soname_spec='$libname$release$shared_ext$major'
13232       need_version=no
13233       need_lib_prefix=no
13234       ;;
13235     freebsd-*)
13236       library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13237       need_version=yes
13238       ;;
13239   esac
13240   shlibpath_var=LD_LIBRARY_PATH
13241   case $host_os in
13242   freebsd2.*)
13243     shlibpath_overrides_runpath=yes
13244     ;;
13245   freebsd3.[01]* | freebsdelf3.[01]*)
13246     shlibpath_overrides_runpath=yes
13247     hardcode_into_libs=yes
13248     ;;
13249   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13250   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13251     shlibpath_overrides_runpath=no
13252     hardcode_into_libs=yes
13253     ;;
13254   *) # from 4.6 on, and DragonFly
13255     shlibpath_overrides_runpath=yes
13256     hardcode_into_libs=yes
13257     ;;
13258   esac
13259   ;;
13260
13261 haiku*)
13262   version_type=linux # correct to gnu/linux during the next big refactor
13263   need_lib_prefix=no
13264   need_version=no
13265   dynamic_linker="$host_os runtime_loader"
13266   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13267   soname_spec='$libname$release$shared_ext$major'
13268   shlibpath_var=LIBRARY_PATH
13269   shlibpath_overrides_runpath=no
13270   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13271   hardcode_into_libs=yes
13272   ;;
13273
13274 hpux9* | hpux10* | hpux11*)
13275   # Give a soname corresponding to the major version so that dld.sl refuses to
13276   # link against other versions.
13277   version_type=sunos
13278   need_lib_prefix=no
13279   need_version=no
13280   case $host_cpu in
13281   ia64*)
13282     shrext_cmds='.so'
13283     hardcode_into_libs=yes
13284     dynamic_linker="$host_os dld.so"
13285     shlibpath_var=LD_LIBRARY_PATH
13286     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13287     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13288     soname_spec='$libname$release$shared_ext$major'
13289     if test 32 = "$HPUX_IA64_MODE"; then
13290       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13291       sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13292     else
13293       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13294       sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13295     fi
13296     ;;
13297   hppa*64*)
13298     shrext_cmds='.sl'
13299     hardcode_into_libs=yes
13300     dynamic_linker="$host_os dld.sl"
13301     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13302     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13303     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13304     soname_spec='$libname$release$shared_ext$major'
13305     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13306     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13307     ;;
13308   *)
13309     shrext_cmds='.sl'
13310     dynamic_linker="$host_os dld.sl"
13311     shlibpath_var=SHLIB_PATH
13312     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13313     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13314     soname_spec='$libname$release$shared_ext$major'
13315     ;;
13316   esac
13317   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13318   postinstall_cmds='chmod 555 $lib'
13319   # or fails outright, so override atomically:
13320   install_override_mode=555
13321   ;;
13322
13323 interix[3-9]*)
13324   version_type=linux # correct to gnu/linux during the next big refactor
13325   need_lib_prefix=no
13326   need_version=no
13327   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13328   soname_spec='$libname$release$shared_ext$major'
13329   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13330   shlibpath_var=LD_LIBRARY_PATH
13331   shlibpath_overrides_runpath=no
13332   hardcode_into_libs=yes
13333   ;;
13334
13335 irix5* | irix6* | nonstopux*)
13336   case $host_os in
13337     nonstopux*) version_type=nonstopux ;;
13338     *)
13339         if test yes = "$lt_cv_prog_gnu_ld"; then
13340                 version_type=linux # correct to gnu/linux during the next big refactor
13341         else
13342                 version_type=irix
13343         fi ;;
13344   esac
13345   need_lib_prefix=no
13346   need_version=no
13347   soname_spec='$libname$release$shared_ext$major'
13348   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13349   case $host_os in
13350   irix5* | nonstopux*)
13351     libsuff= shlibsuff=
13352     ;;
13353   *)
13354     case $LD in # libtool.m4 will add one of these switches to LD
13355     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13356       libsuff= shlibsuff= libmagic=32-bit;;
13357     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13358       libsuff=32 shlibsuff=N32 libmagic=N32;;
13359     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13360       libsuff=64 shlibsuff=64 libmagic=64-bit;;
13361     *) libsuff= shlibsuff= libmagic=never-match;;
13362     esac
13363     ;;
13364   esac
13365   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13366   shlibpath_overrides_runpath=no
13367   sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13368   sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13369   hardcode_into_libs=yes
13370   ;;
13371
13372 # No shared lib support for Linux oldld, aout, or coff.
13373 linux*oldld* | linux*aout* | linux*coff*)
13374   dynamic_linker=no
13375   ;;
13376
13377 linux*android*)
13378   version_type=none # Android doesn't support versioned libraries.
13379   need_lib_prefix=no
13380   need_version=no
13381   library_names_spec='$libname$release$shared_ext'
13382   soname_spec='$libname$release$shared_ext'
13383   finish_cmds=
13384   shlibpath_var=LD_LIBRARY_PATH
13385   shlibpath_overrides_runpath=yes
13386
13387   # This implies no fast_install, which is unacceptable.
13388   # Some rework will be needed to allow for fast_install
13389   # before this can be enabled.
13390   hardcode_into_libs=yes
13391
13392   dynamic_linker='Android linker'
13393   # Don't embed -rpath directories since the linker doesn't support them.
13394   hardcode_libdir_flag_spec='-L$libdir'
13395   ;;
13396
13397 # This must be glibc/ELF.
13398 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13399   version_type=linux # correct to gnu/linux during the next big refactor
13400   need_lib_prefix=no
13401   need_version=no
13402   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13403   soname_spec='$libname$release$shared_ext$major'
13404   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13405   shlibpath_var=LD_LIBRARY_PATH
13406   shlibpath_overrides_runpath=no
13407
13408   # Some binutils ld are patched to set DT_RUNPATH
13409   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
13410   $as_echo_n "(cached) " >&6
13411 else
13412   lt_cv_shlibpath_overrides_runpath=no
13413     save_LDFLAGS=$LDFLAGS
13414     save_libdir=$libdir
13415     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13416          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13417     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13418 /* end confdefs.h.  */
13419
13420 int
13421 main ()
13422 {
13423
13424   ;
13425   return 0;
13426 }
13427 _ACEOF
13428 if ac_fn_c_try_link "$LINENO"; then :
13429   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
13430   lt_cv_shlibpath_overrides_runpath=yes
13431 fi
13432 fi
13433 rm -f core conftest.err conftest.$ac_objext \
13434     conftest$ac_exeext conftest.$ac_ext
13435     LDFLAGS=$save_LDFLAGS
13436     libdir=$save_libdir
13437
13438 fi
13439
13440   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13441
13442   # This implies no fast_install, which is unacceptable.
13443   # Some rework will be needed to allow for fast_install
13444   # before this can be enabled.
13445   hardcode_into_libs=yes
13446
13447   # Add ABI-specific directories to the system library path.
13448   sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
13449
13450   # Ideally, we could use ldconfig to report *all* directores which are
13451   # searched for libraries, however this is still not possible.  Aside from not
13452   # being certain /sbin/ldconfig is available, command
13453   # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13454   # even though it is searched at run-time.  Try to do the best guess by
13455   # appending ld.so.conf contents (and includes) to the search path.
13456   if test -f /etc/ld.so.conf; then
13457     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' ' '`
13458     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
13459   fi
13460
13461   # We used to test for /lib/ld.so.1 and disable shared libraries on
13462   # powerpc, because MkLinux only supported shared libraries with the
13463   # GNU dynamic linker.  Since this was broken with cross compilers,
13464   # most powerpc-linux boxes support dynamic linking these days and
13465   # people can always --disable-shared, the test was removed, and we
13466   # assume the GNU/Linux dynamic linker is in use.
13467   dynamic_linker='GNU/Linux ld.so'
13468   ;;
13469
13470 netbsd*)
13471   version_type=sunos
13472   need_lib_prefix=no
13473   need_version=no
13474   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13475     library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13476     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13477     dynamic_linker='NetBSD (a.out) ld.so'
13478   else
13479     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13480     soname_spec='$libname$release$shared_ext$major'
13481     dynamic_linker='NetBSD ld.elf_so'
13482   fi
13483   shlibpath_var=LD_LIBRARY_PATH
13484   shlibpath_overrides_runpath=yes
13485   hardcode_into_libs=yes
13486   ;;
13487
13488 newsos6)
13489   version_type=linux # correct to gnu/linux during the next big refactor
13490   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13491   shlibpath_var=LD_LIBRARY_PATH
13492   shlibpath_overrides_runpath=yes
13493   ;;
13494
13495 *nto* | *qnx*)
13496   version_type=qnx
13497   need_lib_prefix=no
13498   need_version=no
13499   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13500   soname_spec='$libname$release$shared_ext$major'
13501   shlibpath_var=LD_LIBRARY_PATH
13502   shlibpath_overrides_runpath=no
13503   hardcode_into_libs=yes
13504   dynamic_linker='ldqnx.so'
13505   ;;
13506
13507 openbsd* | bitrig*)
13508   version_type=sunos
13509   sys_lib_dlsearch_path_spec=/usr/lib
13510   need_lib_prefix=no
13511   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13512     need_version=no
13513   else
13514     need_version=yes
13515   fi
13516   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13517   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13518   shlibpath_var=LD_LIBRARY_PATH
13519   shlibpath_overrides_runpath=yes
13520   ;;
13521
13522 os2*)
13523   libname_spec='$name'
13524   version_type=windows
13525   shrext_cmds=.dll
13526   need_version=no
13527   need_lib_prefix=no
13528   # OS/2 can only load a DLL with a base name of 8 characters or less.
13529   soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13530     v=$($ECHO $release$versuffix | tr -d .-);
13531     n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13532     $ECHO $n$v`$shared_ext'
13533   library_names_spec='${libname}_dll.$libext'
13534   dynamic_linker='OS/2 ld.exe'
13535   shlibpath_var=BEGINLIBPATH
13536   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13537   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13538   postinstall_cmds='base_file=`basename \$file`~
13539     dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13540     dldir=$destdir/`dirname \$dlpath`~
13541     test -d \$dldir || mkdir -p \$dldir~
13542     $install_prog $dir/$dlname \$dldir/$dlname~
13543     chmod a+x \$dldir/$dlname~
13544     if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13545       eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13546     fi'
13547   postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13548     dlpath=$dir/\$dldll~
13549     $RM \$dlpath'
13550   ;;
13551
13552 osf3* | osf4* | osf5*)
13553   version_type=osf
13554   need_lib_prefix=no
13555   need_version=no
13556   soname_spec='$libname$release$shared_ext$major'
13557   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13558   shlibpath_var=LD_LIBRARY_PATH
13559   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13560   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13561   ;;
13562
13563 rdos*)
13564   dynamic_linker=no
13565   ;;
13566
13567 solaris*)
13568   version_type=linux # correct to gnu/linux during the next big refactor
13569   need_lib_prefix=no
13570   need_version=no
13571   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13572   soname_spec='$libname$release$shared_ext$major'
13573   shlibpath_var=LD_LIBRARY_PATH
13574   shlibpath_overrides_runpath=yes
13575   hardcode_into_libs=yes
13576   # ldd complains unless libraries are executable
13577   postinstall_cmds='chmod +x $lib'
13578   ;;
13579
13580 sunos4*)
13581   version_type=sunos
13582   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13583   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13584   shlibpath_var=LD_LIBRARY_PATH
13585   shlibpath_overrides_runpath=yes
13586   if test yes = "$with_gnu_ld"; then
13587     need_lib_prefix=no
13588   fi
13589   need_version=yes
13590   ;;
13591
13592 sysv4 | sysv4.3*)
13593   version_type=linux # correct to gnu/linux during the next big refactor
13594   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13595   soname_spec='$libname$release$shared_ext$major'
13596   shlibpath_var=LD_LIBRARY_PATH
13597   case $host_vendor in
13598     sni)
13599       shlibpath_overrides_runpath=no
13600       need_lib_prefix=no
13601       runpath_var=LD_RUN_PATH
13602       ;;
13603     siemens)
13604       need_lib_prefix=no
13605       ;;
13606     motorola)
13607       need_lib_prefix=no
13608       need_version=no
13609       shlibpath_overrides_runpath=no
13610       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13611       ;;
13612   esac
13613   ;;
13614
13615 sysv4*MP*)
13616   if test -d /usr/nec; then
13617     version_type=linux # correct to gnu/linux during the next big refactor
13618     library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13619     soname_spec='$libname$shared_ext.$major'
13620     shlibpath_var=LD_LIBRARY_PATH
13621   fi
13622   ;;
13623
13624 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13625   version_type=sco
13626   need_lib_prefix=no
13627   need_version=no
13628   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13629   soname_spec='$libname$release$shared_ext$major'
13630   shlibpath_var=LD_LIBRARY_PATH
13631   shlibpath_overrides_runpath=yes
13632   hardcode_into_libs=yes
13633   if test yes = "$with_gnu_ld"; then
13634     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13635   else
13636     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13637     case $host_os in
13638       sco3.2v5*)
13639         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13640         ;;
13641     esac
13642   fi
13643   sys_lib_dlsearch_path_spec='/usr/lib'
13644   ;;
13645
13646 tpf*)
13647   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13648   version_type=linux # correct to gnu/linux during the next big refactor
13649   need_lib_prefix=no
13650   need_version=no
13651   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13652   shlibpath_var=LD_LIBRARY_PATH
13653   shlibpath_overrides_runpath=no
13654   hardcode_into_libs=yes
13655   ;;
13656
13657 uts4*)
13658   version_type=linux # correct to gnu/linux during the next big refactor
13659   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13660   soname_spec='$libname$release$shared_ext$major'
13661   shlibpath_var=LD_LIBRARY_PATH
13662   ;;
13663
13664 *)
13665   dynamic_linker=no
13666   ;;
13667 esac
13668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13669 $as_echo "$dynamic_linker" >&6; }
13670 test no = "$dynamic_linker" && can_build_shared=no
13671
13672 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13673 if test yes = "$GCC"; then
13674   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13675 fi
13676
13677 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13678   sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13679 fi
13680
13681 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13682   sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13683 fi
13684
13685 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13686 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13687
13688 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13689 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13690
13691 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13692 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13791 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13792 hardcode_action=
13793 if test -n "$hardcode_libdir_flag_spec" ||
13794    test -n "$runpath_var" ||
13795    test yes = "$hardcode_automatic"; then
13796
13797   # We can hardcode non-existent directories.
13798   if test no != "$hardcode_direct" &&
13799      # If the only mechanism to avoid hardcoding is shlibpath_var, we
13800      # have to relink, otherwise we might link with an installed library
13801      # when we should be linking with a yet-to-be-installed one
13802      ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13803      test no != "$hardcode_minus_L"; then
13804     # Linking always hardcodes the temporary library directory.
13805     hardcode_action=relink
13806   else
13807     # We can link without hardcoding, and we can hardcode nonexisting dirs.
13808     hardcode_action=immediate
13809   fi
13810 else
13811   # We cannot hardcode anything, or else we can only hardcode existing
13812   # directories.
13813   hardcode_action=unsupported
13814 fi
13815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13816 $as_echo "$hardcode_action" >&6; }
13817
13818 if test relink = "$hardcode_action" ||
13819    test yes = "$inherit_rpath"; then
13820   # Fast installation is not supported
13821   enable_fast_install=no
13822 elif test yes = "$shlibpath_overrides_runpath" ||
13823      test no = "$enable_shared"; then
13824   # Fast installation is not necessary
13825   enable_fast_install=needless
13826 fi
13827
13828
13829
13830
13831
13832
13833   if test yes != "$enable_dlopen"; then
13834   enable_dlopen=unknown
13835   enable_dlopen_self=unknown
13836   enable_dlopen_self_static=unknown
13837 else
13838   lt_cv_dlopen=no
13839   lt_cv_dlopen_libs=
13840
13841   case $host_os in
13842   beos*)
13843     lt_cv_dlopen=load_add_on
13844     lt_cv_dlopen_libs=
13845     lt_cv_dlopen_self=yes
13846     ;;
13847
13848   mingw* | pw32* | cegcc*)
13849     lt_cv_dlopen=LoadLibrary
13850     lt_cv_dlopen_libs=
13851     ;;
13852
13853   cygwin*)
13854     lt_cv_dlopen=dlopen
13855     lt_cv_dlopen_libs=
13856     ;;
13857
13858   darwin*)
13859     # if libdl is installed we need to link against it
13860     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13861 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13862 if ${ac_cv_lib_dl_dlopen+:} false; then :
13863   $as_echo_n "(cached) " >&6
13864 else
13865   ac_check_lib_save_LIBS=$LIBS
13866 LIBS="-ldl  $LIBS"
13867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13868 /* end confdefs.h.  */
13869
13870 /* Override any GCC internal prototype to avoid an error.
13871    Use char because int might match the return type of a GCC
13872    builtin and then its argument prototype would still apply.  */
13873 #ifdef __cplusplus
13874 extern "C"
13875 #endif
13876 char dlopen ();
13877 int
13878 main ()
13879 {
13880 return dlopen ();
13881   ;
13882   return 0;
13883 }
13884 _ACEOF
13885 if ac_fn_c_try_link "$LINENO"; then :
13886   ac_cv_lib_dl_dlopen=yes
13887 else
13888   ac_cv_lib_dl_dlopen=no
13889 fi
13890 rm -f core conftest.err conftest.$ac_objext \
13891     conftest$ac_exeext conftest.$ac_ext
13892 LIBS=$ac_check_lib_save_LIBS
13893 fi
13894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13895 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13896 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13897   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13898 else
13899
13900     lt_cv_dlopen=dyld
13901     lt_cv_dlopen_libs=
13902     lt_cv_dlopen_self=yes
13903
13904 fi
13905
13906     ;;
13907
13908   tpf*)
13909     # Don't try to run any link tests for TPF.  We know it's impossible
13910     # because TPF is a cross-compiler, and we know how we open DSOs.
13911     lt_cv_dlopen=dlopen
13912     lt_cv_dlopen_libs=
13913     lt_cv_dlopen_self=no
13914     ;;
13915
13916   *)
13917     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
13918 if test "x$ac_cv_func_shl_load" = xyes; then :
13919   lt_cv_dlopen=shl_load
13920 else
13921   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
13922 $as_echo_n "checking for shl_load in -ldld... " >&6; }
13923 if ${ac_cv_lib_dld_shl_load+:} false; then :
13924   $as_echo_n "(cached) " >&6
13925 else
13926   ac_check_lib_save_LIBS=$LIBS
13927 LIBS="-ldld  $LIBS"
13928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13929 /* end confdefs.h.  */
13930
13931 /* Override any GCC internal prototype to avoid an error.
13932    Use char because int might match the return type of a GCC
13933    builtin and then its argument prototype would still apply.  */
13934 #ifdef __cplusplus
13935 extern "C"
13936 #endif
13937 char shl_load ();
13938 int
13939 main ()
13940 {
13941 return shl_load ();
13942   ;
13943   return 0;
13944 }
13945 _ACEOF
13946 if ac_fn_c_try_link "$LINENO"; then :
13947   ac_cv_lib_dld_shl_load=yes
13948 else
13949   ac_cv_lib_dld_shl_load=no
13950 fi
13951 rm -f core conftest.err conftest.$ac_objext \
13952     conftest$ac_exeext conftest.$ac_ext
13953 LIBS=$ac_check_lib_save_LIBS
13954 fi
13955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
13956 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
13957 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
13958   lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
13959 else
13960   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
13961 if test "x$ac_cv_func_dlopen" = xyes; then :
13962   lt_cv_dlopen=dlopen
13963 else
13964   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13965 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13966 if ${ac_cv_lib_dl_dlopen+:} false; then :
13967   $as_echo_n "(cached) " >&6
13968 else
13969   ac_check_lib_save_LIBS=$LIBS
13970 LIBS="-ldl  $LIBS"
13971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13972 /* end confdefs.h.  */
13973
13974 /* Override any GCC internal prototype to avoid an error.
13975    Use char because int might match the return type of a GCC
13976    builtin and then its argument prototype would still apply.  */
13977 #ifdef __cplusplus
13978 extern "C"
13979 #endif
13980 char dlopen ();
13981 int
13982 main ()
13983 {
13984 return dlopen ();
13985   ;
13986   return 0;
13987 }
13988 _ACEOF
13989 if ac_fn_c_try_link "$LINENO"; then :
13990   ac_cv_lib_dl_dlopen=yes
13991 else
13992   ac_cv_lib_dl_dlopen=no
13993 fi
13994 rm -f core conftest.err conftest.$ac_objext \
13995     conftest$ac_exeext conftest.$ac_ext
13996 LIBS=$ac_check_lib_save_LIBS
13997 fi
13998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13999 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14000 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14001   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14002 else
14003   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
14004 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
14005 if ${ac_cv_lib_svld_dlopen+:} false; then :
14006   $as_echo_n "(cached) " >&6
14007 else
14008   ac_check_lib_save_LIBS=$LIBS
14009 LIBS="-lsvld  $LIBS"
14010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14011 /* end confdefs.h.  */
14012
14013 /* Override any GCC internal prototype to avoid an error.
14014    Use char because int might match the return type of a GCC
14015    builtin and then its argument prototype would still apply.  */
14016 #ifdef __cplusplus
14017 extern "C"
14018 #endif
14019 char dlopen ();
14020 int
14021 main ()
14022 {
14023 return dlopen ();
14024   ;
14025   return 0;
14026 }
14027 _ACEOF
14028 if ac_fn_c_try_link "$LINENO"; then :
14029   ac_cv_lib_svld_dlopen=yes
14030 else
14031   ac_cv_lib_svld_dlopen=no
14032 fi
14033 rm -f core conftest.err conftest.$ac_objext \
14034     conftest$ac_exeext conftest.$ac_ext
14035 LIBS=$ac_check_lib_save_LIBS
14036 fi
14037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
14038 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
14039 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
14040   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
14041 else
14042   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
14043 $as_echo_n "checking for dld_link in -ldld... " >&6; }
14044 if ${ac_cv_lib_dld_dld_link+:} false; then :
14045   $as_echo_n "(cached) " >&6
14046 else
14047   ac_check_lib_save_LIBS=$LIBS
14048 LIBS="-ldld  $LIBS"
14049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14050 /* end confdefs.h.  */
14051
14052 /* Override any GCC internal prototype to avoid an error.
14053    Use char because int might match the return type of a GCC
14054    builtin and then its argument prototype would still apply.  */
14055 #ifdef __cplusplus
14056 extern "C"
14057 #endif
14058 char dld_link ();
14059 int
14060 main ()
14061 {
14062 return dld_link ();
14063   ;
14064   return 0;
14065 }
14066 _ACEOF
14067 if ac_fn_c_try_link "$LINENO"; then :
14068   ac_cv_lib_dld_dld_link=yes
14069 else
14070   ac_cv_lib_dld_dld_link=no
14071 fi
14072 rm -f core conftest.err conftest.$ac_objext \
14073     conftest$ac_exeext conftest.$ac_ext
14074 LIBS=$ac_check_lib_save_LIBS
14075 fi
14076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
14077 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
14078 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
14079   lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
14080 fi
14081
14082
14083 fi
14084
14085
14086 fi
14087
14088
14089 fi
14090
14091
14092 fi
14093
14094
14095 fi
14096
14097     ;;
14098   esac
14099
14100   if test no = "$lt_cv_dlopen"; then
14101     enable_dlopen=no
14102   else
14103     enable_dlopen=yes
14104   fi
14105
14106   case $lt_cv_dlopen in
14107   dlopen)
14108     save_CPPFLAGS=$CPPFLAGS
14109     test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14110
14111     save_LDFLAGS=$LDFLAGS
14112     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14113
14114     save_LIBS=$LIBS
14115     LIBS="$lt_cv_dlopen_libs $LIBS"
14116
14117     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
14118 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
14119 if ${lt_cv_dlopen_self+:} false; then :
14120   $as_echo_n "(cached) " >&6
14121 else
14122           if test yes = "$cross_compiling"; then :
14123   lt_cv_dlopen_self=cross
14124 else
14125   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14126   lt_status=$lt_dlunknown
14127   cat > conftest.$ac_ext <<_LT_EOF
14128 #line $LINENO "configure"
14129 #include "confdefs.h"
14130
14131 #if HAVE_DLFCN_H
14132 #include <dlfcn.h>
14133 #endif
14134
14135 #include <stdio.h>
14136
14137 #ifdef RTLD_GLOBAL
14138 #  define LT_DLGLOBAL           RTLD_GLOBAL
14139 #else
14140 #  ifdef DL_GLOBAL
14141 #    define LT_DLGLOBAL         DL_GLOBAL
14142 #  else
14143 #    define LT_DLGLOBAL         0
14144 #  endif
14145 #endif
14146
14147 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14148    find out it does not work in some platform. */
14149 #ifndef LT_DLLAZY_OR_NOW
14150 #  ifdef RTLD_LAZY
14151 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14152 #  else
14153 #    ifdef DL_LAZY
14154 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14155 #    else
14156 #      ifdef RTLD_NOW
14157 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14158 #      else
14159 #        ifdef DL_NOW
14160 #          define LT_DLLAZY_OR_NOW      DL_NOW
14161 #        else
14162 #          define LT_DLLAZY_OR_NOW      0
14163 #        endif
14164 #      endif
14165 #    endif
14166 #  endif
14167 #endif
14168
14169 /* When -fvisibility=hidden is used, assume the code has been annotated
14170    correspondingly for the symbols needed.  */
14171 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14172 int fnord () __attribute__((visibility("default")));
14173 #endif
14174
14175 int fnord () { return 42; }
14176 int main ()
14177 {
14178   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14179   int status = $lt_dlunknown;
14180
14181   if (self)
14182     {
14183       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14184       else
14185         {
14186           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14187           else puts (dlerror ());
14188         }
14189       /* dlclose (self); */
14190     }
14191   else
14192     puts (dlerror ());
14193
14194   return status;
14195 }
14196 _LT_EOF
14197   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14198   (eval $ac_link) 2>&5
14199   ac_status=$?
14200   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14201   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14202     (./conftest; exit; ) >&5 2>/dev/null
14203     lt_status=$?
14204     case x$lt_status in
14205       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14206       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14207       x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14208     esac
14209   else :
14210     # compilation failed
14211     lt_cv_dlopen_self=no
14212   fi
14213 fi
14214 rm -fr conftest*
14215
14216
14217 fi
14218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14219 $as_echo "$lt_cv_dlopen_self" >&6; }
14220
14221     if test yes = "$lt_cv_dlopen_self"; then
14222       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14223       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14224 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
14225 if ${lt_cv_dlopen_self_static+:} false; then :
14226   $as_echo_n "(cached) " >&6
14227 else
14228           if test yes = "$cross_compiling"; then :
14229   lt_cv_dlopen_self_static=cross
14230 else
14231   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14232   lt_status=$lt_dlunknown
14233   cat > conftest.$ac_ext <<_LT_EOF
14234 #line $LINENO "configure"
14235 #include "confdefs.h"
14236
14237 #if HAVE_DLFCN_H
14238 #include <dlfcn.h>
14239 #endif
14240
14241 #include <stdio.h>
14242
14243 #ifdef RTLD_GLOBAL
14244 #  define LT_DLGLOBAL           RTLD_GLOBAL
14245 #else
14246 #  ifdef DL_GLOBAL
14247 #    define LT_DLGLOBAL         DL_GLOBAL
14248 #  else
14249 #    define LT_DLGLOBAL         0
14250 #  endif
14251 #endif
14252
14253 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14254    find out it does not work in some platform. */
14255 #ifndef LT_DLLAZY_OR_NOW
14256 #  ifdef RTLD_LAZY
14257 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14258 #  else
14259 #    ifdef DL_LAZY
14260 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14261 #    else
14262 #      ifdef RTLD_NOW
14263 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14264 #      else
14265 #        ifdef DL_NOW
14266 #          define LT_DLLAZY_OR_NOW      DL_NOW
14267 #        else
14268 #          define LT_DLLAZY_OR_NOW      0
14269 #        endif
14270 #      endif
14271 #    endif
14272 #  endif
14273 #endif
14274
14275 /* When -fvisibility=hidden is used, assume the code has been annotated
14276    correspondingly for the symbols needed.  */
14277 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14278 int fnord () __attribute__((visibility("default")));
14279 #endif
14280
14281 int fnord () { return 42; }
14282 int main ()
14283 {
14284   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14285   int status = $lt_dlunknown;
14286
14287   if (self)
14288     {
14289       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14290       else
14291         {
14292           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14293           else puts (dlerror ());
14294         }
14295       /* dlclose (self); */
14296     }
14297   else
14298     puts (dlerror ());
14299
14300   return status;
14301 }
14302 _LT_EOF
14303   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14304   (eval $ac_link) 2>&5
14305   ac_status=$?
14306   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14307   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14308     (./conftest; exit; ) >&5 2>/dev/null
14309     lt_status=$?
14310     case x$lt_status in
14311       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14312       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14313       x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14314     esac
14315   else :
14316     # compilation failed
14317     lt_cv_dlopen_self_static=no
14318   fi
14319 fi
14320 rm -fr conftest*
14321
14322
14323 fi
14324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14325 $as_echo "$lt_cv_dlopen_self_static" >&6; }
14326     fi
14327
14328     CPPFLAGS=$save_CPPFLAGS
14329     LDFLAGS=$save_LDFLAGS
14330     LIBS=$save_LIBS
14331     ;;
14332   esac
14333
14334   case $lt_cv_dlopen_self in
14335   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14336   *) enable_dlopen_self=unknown ;;
14337   esac
14338
14339   case $lt_cv_dlopen_self_static in
14340   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14341   *) enable_dlopen_self_static=unknown ;;
14342   esac
14343 fi
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361 striplib=
14362 old_striplib=
14363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14364 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
14365 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14366   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14367   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14369 $as_echo "yes" >&6; }
14370 else
14371 # FIXME - insert some real tests, host_os isn't really good enough
14372   case $host_os in
14373   darwin*)
14374     if test -n "$STRIP"; then
14375       striplib="$STRIP -x"
14376       old_striplib="$STRIP -S"
14377       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14378 $as_echo "yes" >&6; }
14379     else
14380       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14381 $as_echo "no" >&6; }
14382     fi
14383     ;;
14384   *)
14385     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14386 $as_echo "no" >&6; }
14387     ;;
14388   esac
14389 fi
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402   # Report what library types will actually be built
14403   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14404 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
14405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14406 $as_echo "$can_build_shared" >&6; }
14407
14408   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14409 $as_echo_n "checking whether to build shared libraries... " >&6; }
14410   test no = "$can_build_shared" && enable_shared=no
14411
14412   # On AIX, shared libraries and static libraries use the same namespace, and
14413   # are all built from PIC.
14414   case $host_os in
14415   aix3*)
14416     test yes = "$enable_shared" && enable_static=no
14417     if test -n "$RANLIB"; then
14418       archive_cmds="$archive_cmds~\$RANLIB \$lib"
14419       postinstall_cmds='$RANLIB $lib'
14420     fi
14421     ;;
14422
14423   aix[4-9]*)
14424     if test ia64 != "$host_cpu"; then
14425       case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14426       yes,aix,yes) ;;                   # shared object as lib.so file only
14427       yes,svr4,*) ;;                    # shared object as lib.so archive member only
14428       yes,*) enable_static=no ;;        # shared object in lib.a archive as well
14429       esac
14430     fi
14431     ;;
14432   esac
14433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14434 $as_echo "$enable_shared" >&6; }
14435
14436   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14437 $as_echo_n "checking whether to build static libraries... " >&6; }
14438   # Make sure either enable_shared or enable_static is yes.
14439   test yes = "$enable_shared" || enable_static=yes
14440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14441 $as_echo "$enable_static" >&6; }
14442
14443
14444
14445
14446 fi
14447 ac_ext=c
14448 ac_cpp='$CPP $CPPFLAGS'
14449 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14450 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14451 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14452
14453 CC=$lt_save_CC
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469         ac_config_commands="$ac_config_commands libtool"
14470
14471
14472
14473
14474 # Only expand once:
14475
14476
14477
14478
14479 # Checks for header files.
14480 for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/ipc.h sys/shm.h
14481 do :
14482   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14483 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
14484 "
14485 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14486   cat >>confdefs.h <<_ACEOF
14487 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14488 _ACEOF
14489
14490 fi
14491
14492 done
14493
14494
14495 # check for types.
14496 # Using own tests for int64* because autoconf builtin only give 32bit.
14497 ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
14498 if test "x$ac_cv_type_int8_t" = xyes; then :
14499
14500 else
14501
14502 cat >>confdefs.h <<_ACEOF
14503 #define int8_t signed char
14504 _ACEOF
14505
14506 fi
14507
14508 ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
14509 if test "x$ac_cv_type_int16_t" = xyes; then :
14510
14511 else
14512
14513 cat >>confdefs.h <<_ACEOF
14514 #define int16_t short
14515 _ACEOF
14516
14517 fi
14518
14519 ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
14520 if test "x$ac_cv_type_int32_t" = xyes; then :
14521
14522 else
14523
14524 cat >>confdefs.h <<_ACEOF
14525 #define int32_t int
14526 _ACEOF
14527
14528 fi
14529
14530 ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
14531 if test "x$ac_cv_type_int64_t" = xyes; then :
14532
14533 else
14534
14535 cat >>confdefs.h <<_ACEOF
14536 #define int64_t long long
14537 _ACEOF
14538
14539 fi
14540
14541 ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
14542 if test "x$ac_cv_type_uint8_t" = xyes; then :
14543
14544 else
14545
14546 cat >>confdefs.h <<_ACEOF
14547 #define uint8_t unsigned char
14548 _ACEOF
14549
14550 fi
14551
14552 ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
14553 if test "x$ac_cv_type_uint16_t" = xyes; then :
14554
14555 else
14556
14557 cat >>confdefs.h <<_ACEOF
14558 #define uint16_t unsigned short
14559 _ACEOF
14560
14561 fi
14562
14563 ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
14564 if test "x$ac_cv_type_uint32_t" = xyes; then :
14565
14566 else
14567
14568 cat >>confdefs.h <<_ACEOF
14569 #define uint32_t unsigned int
14570 _ACEOF
14571
14572 fi
14573
14574 ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
14575 if test "x$ac_cv_type_uint64_t" = xyes; then :
14576
14577 else
14578
14579 cat >>confdefs.h <<_ACEOF
14580 #define uint64_t unsigned long long
14581 _ACEOF
14582
14583 fi
14584
14585 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14586 if test "x$ac_cv_type_size_t" = xyes; then :
14587
14588 else
14589
14590 cat >>confdefs.h <<_ACEOF
14591 #define size_t unsigned int
14592 _ACEOF
14593
14594 fi
14595
14596 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
14597 if test "x$ac_cv_type_ssize_t" = xyes; then :
14598
14599 else
14600
14601 cat >>confdefs.h <<_ACEOF
14602 #define ssize_t int
14603 _ACEOF
14604
14605 fi
14606
14607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
14608 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
14609 if ${ac_cv_type_uid_t+:} false; then :
14610   $as_echo_n "(cached) " >&6
14611 else
14612   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14613 /* end confdefs.h.  */
14614 #include <sys/types.h>
14615
14616 _ACEOF
14617 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14618   $EGREP "uid_t" >/dev/null 2>&1; then :
14619   ac_cv_type_uid_t=yes
14620 else
14621   ac_cv_type_uid_t=no
14622 fi
14623 rm -f conftest*
14624
14625 fi
14626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
14627 $as_echo "$ac_cv_type_uid_t" >&6; }
14628 if test $ac_cv_type_uid_t = no; then
14629
14630 $as_echo "#define uid_t int" >>confdefs.h
14631
14632
14633 $as_echo "#define gid_t int" >>confdefs.h
14634
14635 fi
14636
14637 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14638 if test "x$ac_cv_type_pid_t" = xyes; then :
14639
14640 else
14641
14642 cat >>confdefs.h <<_ACEOF
14643 #define pid_t int
14644 _ACEOF
14645
14646 fi
14647
14648 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
14649 if test "x$ac_cv_type_off_t" = xyes; then :
14650
14651 else
14652
14653 cat >>confdefs.h <<_ACEOF
14654 #define off_t long int
14655 _ACEOF
14656
14657 fi
14658
14659 ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
14660 $ac_includes_default
14661 #ifdef HAVE_WINSOCK2_H
14662 #  include <winsock2.h>
14663 #endif
14664
14665 "
14666 if test "x$ac_cv_type_u_char" = xyes; then :
14667
14668 else
14669
14670 $as_echo "#define u_char unsigned char" >>confdefs.h
14671
14672 fi
14673
14674 ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
14675 $ac_includes_default
14676 #ifdef HAVE_SYS_RESOURCE_H
14677 #  include <sys/resource.h>
14678 #endif
14679
14680 "
14681 if test "x$ac_cv_type_rlim_t" = xyes; then :
14682
14683 else
14684
14685 $as_echo "#define rlim_t unsigned long" >>confdefs.h
14686
14687 fi
14688
14689
14690 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
14691 $ac_includes_default
14692 #ifdef HAVE_SYS_SOCKET_H
14693 #  include <sys/socket.h>
14694 #endif
14695 #ifdef HAVE_WS2TCPIP_H
14696 #  include <ws2tcpip.h>
14697 #endif
14698
14699 "
14700 if test "x$ac_cv_type_socklen_t" = xyes; then :
14701
14702 else
14703
14704 $as_echo "#define socklen_t int" >>confdefs.h
14705
14706 fi
14707
14708  ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
14709 $ac_includes_default
14710 #ifdef HAVE_SYS_TYPES_H
14711 # include <sys/types.h>
14712 #endif
14713 #ifdef HAVE_NETINET_IN_H
14714 # include <netinet/in.h>
14715 #endif
14716
14717 "
14718 if test "x$ac_cv_type_in_addr_t" = xyes; then :
14719
14720 else
14721
14722 $as_echo "#define in_addr_t uint32_t" >>confdefs.h
14723
14724 fi
14725
14726  ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
14727 $ac_includes_default
14728 #ifdef HAVE_SYS_TYPES_H
14729 # include <sys/types.h>
14730 #endif
14731 #ifdef HAVE_NETINET_IN_H
14732 # include <netinet/in.h>
14733 #endif
14734
14735 "
14736 if test "x$ac_cv_type_in_port_t" = xyes; then :
14737
14738 else
14739
14740 $as_echo "#define in_port_t uint16_t" >>confdefs.h
14741
14742 fi
14743
14744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
14745 $as_echo_n "checking if memcmp compares unsigned... " >&6; }
14746 if test "$cross_compiling" = yes; then :
14747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
14748 $as_echo "cross-compile no" >&6; }
14749
14750 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14751
14752   case " $LIBOBJS " in
14753   *" memcmp.$ac_objext "* ) ;;
14754   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14755  ;;
14756 esac
14757
14758
14759 else
14760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14761 /* end confdefs.h.  */
14762
14763 #include <stdio.h>
14764 #include <stdlib.h>
14765 #include <string.h>
14766 int main(void)
14767 {
14768         char a = 255, b = 0;
14769         if(memcmp(&a, &b, 1) < 0)
14770                 return 1;
14771         return 0;
14772 }
14773
14774 _ACEOF
14775 if ac_fn_c_try_run "$LINENO"; then :
14776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14777 $as_echo "yes" >&6; }
14778 else
14779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14780 $as_echo "no" >&6; }
14781
14782 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14783
14784   case " $LIBOBJS " in
14785   *" memcmp.$ac_objext "* ) ;;
14786   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14787  ;;
14788 esac
14789
14790
14791 fi
14792 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14793   conftest.$ac_objext conftest.beam conftest.$ac_ext
14794 fi
14795
14796
14797 # The cast to long int works around a bug in the HP C Compiler
14798 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14799 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14800 # This bug is HP SR number 8606223364.
14801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
14802 $as_echo_n "checking size of time_t... " >&6; }
14803 if ${ac_cv_sizeof_time_t+:} false; then :
14804   $as_echo_n "(cached) " >&6
14805 else
14806   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
14807 $ac_includes_default
14808 #ifdef TIME_WITH_SYS_TIME
14809 # include <sys/time.h>
14810 # include <time.h>
14811 #else
14812 # ifdef HAVE_SYS_TIME_H
14813 #  include <sys/time.h>
14814 # else
14815 #  include <time.h>
14816 # endif
14817 #endif
14818
14819 "; then :
14820
14821 else
14822   if test "$ac_cv_type_time_t" = yes; then
14823      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14824 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14825 as_fn_error 77 "cannot compute sizeof (time_t)
14826 See \`config.log' for more details" "$LINENO" 5; }
14827    else
14828      ac_cv_sizeof_time_t=0
14829    fi
14830 fi
14831
14832 fi
14833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
14834 $as_echo "$ac_cv_sizeof_time_t" >&6; }
14835
14836
14837
14838 cat >>confdefs.h <<_ACEOF
14839 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
14840 _ACEOF
14841
14842
14843
14844 # add option to disable the evil rpath
14845
14846 # Check whether --enable-rpath was given.
14847 if test "${enable_rpath+set}" = set; then :
14848   enableval=$enable_rpath; enable_rpath=$enableval
14849 else
14850   enable_rpath=yes
14851 fi
14852
14853 if test "x$enable_rpath" = xno; then
14854                 ac_config_commands="$ac_config_commands disable-rpath"
14855
14856 fi
14857
14858
14859
14860 # check to see if libraries are needed for these functions.
14861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
14862 $as_echo_n "checking for library containing inet_pton... " >&6; }
14863 if ${ac_cv_search_inet_pton+:} false; then :
14864   $as_echo_n "(cached) " >&6
14865 else
14866   ac_func_search_save_LIBS=$LIBS
14867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14868 /* end confdefs.h.  */
14869
14870 /* Override any GCC internal prototype to avoid an error.
14871    Use char because int might match the return type of a GCC
14872    builtin and then its argument prototype would still apply.  */
14873 #ifdef __cplusplus
14874 extern "C"
14875 #endif
14876 char inet_pton ();
14877 int
14878 main ()
14879 {
14880 return inet_pton ();
14881   ;
14882   return 0;
14883 }
14884 _ACEOF
14885 for ac_lib in '' nsl; do
14886   if test -z "$ac_lib"; then
14887     ac_res="none required"
14888   else
14889     ac_res=-l$ac_lib
14890     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14891   fi
14892   if ac_fn_c_try_link "$LINENO"; then :
14893   ac_cv_search_inet_pton=$ac_res
14894 fi
14895 rm -f core conftest.err conftest.$ac_objext \
14896     conftest$ac_exeext
14897   if ${ac_cv_search_inet_pton+:} false; then :
14898   break
14899 fi
14900 done
14901 if ${ac_cv_search_inet_pton+:} false; then :
14902
14903 else
14904   ac_cv_search_inet_pton=no
14905 fi
14906 rm conftest.$ac_ext
14907 LIBS=$ac_func_search_save_LIBS
14908 fi
14909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
14910 $as_echo "$ac_cv_search_inet_pton" >&6; }
14911 ac_res=$ac_cv_search_inet_pton
14912 if test "$ac_res" != no; then :
14913   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14914
14915 fi
14916
14917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
14918 $as_echo_n "checking for library containing socket... " >&6; }
14919 if ${ac_cv_search_socket+:} false; then :
14920   $as_echo_n "(cached) " >&6
14921 else
14922   ac_func_search_save_LIBS=$LIBS
14923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14924 /* end confdefs.h.  */
14925
14926 /* Override any GCC internal prototype to avoid an error.
14927    Use char because int might match the return type of a GCC
14928    builtin and then its argument prototype would still apply.  */
14929 #ifdef __cplusplus
14930 extern "C"
14931 #endif
14932 char socket ();
14933 int
14934 main ()
14935 {
14936 return socket ();
14937   ;
14938   return 0;
14939 }
14940 _ACEOF
14941 for ac_lib in '' socket; do
14942   if test -z "$ac_lib"; then
14943     ac_res="none required"
14944   else
14945     ac_res=-l$ac_lib
14946     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14947   fi
14948   if ac_fn_c_try_link "$LINENO"; then :
14949   ac_cv_search_socket=$ac_res
14950 fi
14951 rm -f core conftest.err conftest.$ac_objext \
14952     conftest$ac_exeext
14953   if ${ac_cv_search_socket+:} false; then :
14954   break
14955 fi
14956 done
14957 if ${ac_cv_search_socket+:} false; then :
14958
14959 else
14960   ac_cv_search_socket=no
14961 fi
14962 rm conftest.$ac_ext
14963 LIBS=$ac_func_search_save_LIBS
14964 fi
14965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
14966 $as_echo "$ac_cv_search_socket" >&6; }
14967 ac_res=$ac_cv_search_socket
14968 if test "$ac_res" != no; then :
14969   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14970
14971 fi
14972
14973
14974 # check wether strptime also works
14975
14976 # check some functions of the OS before linking libs (while still runnable).
14977 for ac_header in unistd.h
14978 do :
14979   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
14980 if test "x$ac_cv_header_unistd_h" = xyes; then :
14981   cat >>confdefs.h <<_ACEOF
14982 #define HAVE_UNISTD_H 1
14983 _ACEOF
14984
14985 fi
14986
14987 done
14988
14989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
14990 $as_echo_n "checking for working chown... " >&6; }
14991 if ${ac_cv_func_chown_works+:} false; then :
14992   $as_echo_n "(cached) " >&6
14993 else
14994   if test "$cross_compiling" = yes; then :
14995   ac_cv_func_chown_works=no
14996 else
14997   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14998 /* end confdefs.h.  */
14999 $ac_includes_default
15000 #include <fcntl.h>
15001
15002 int
15003 main ()
15004 {
15005   char *f = "conftest.chown";
15006   struct stat before, after;
15007
15008   if (creat (f, 0600) < 0)
15009     return 1;
15010   if (stat (f, &before) < 0)
15011     return 1;
15012   if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
15013     return 1;
15014   if (stat (f, &after) < 0)
15015     return 1;
15016   return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
15017
15018   ;
15019   return 0;
15020 }
15021 _ACEOF
15022 if ac_fn_c_try_run "$LINENO"; then :
15023   ac_cv_func_chown_works=yes
15024 else
15025   ac_cv_func_chown_works=no
15026 fi
15027 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15028   conftest.$ac_objext conftest.beam conftest.$ac_ext
15029 fi
15030
15031 rm -f conftest.chown
15032
15033 fi
15034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
15035 $as_echo "$ac_cv_func_chown_works" >&6; }
15036 if test $ac_cv_func_chown_works = yes; then
15037
15038 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
15039
15040 fi
15041
15042 for ac_header in vfork.h
15043 do :
15044   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15045 if test "x$ac_cv_header_vfork_h" = xyes; then :
15046   cat >>confdefs.h <<_ACEOF
15047 #define HAVE_VFORK_H 1
15048 _ACEOF
15049
15050 fi
15051
15052 done
15053
15054 for ac_func in fork vfork
15055 do :
15056   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15057 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15058 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15059   cat >>confdefs.h <<_ACEOF
15060 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15061 _ACEOF
15062
15063 fi
15064 done
15065
15066 if test "x$ac_cv_func_fork" = xyes; then
15067   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15068 $as_echo_n "checking for working fork... " >&6; }
15069 if ${ac_cv_func_fork_works+:} false; then :
15070   $as_echo_n "(cached) " >&6
15071 else
15072   if test "$cross_compiling" = yes; then :
15073   ac_cv_func_fork_works=cross
15074 else
15075   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15076 /* end confdefs.h.  */
15077 $ac_includes_default
15078 int
15079 main ()
15080 {
15081
15082           /* By Ruediger Kuhlmann. */
15083           return fork () < 0;
15084
15085   ;
15086   return 0;
15087 }
15088 _ACEOF
15089 if ac_fn_c_try_run "$LINENO"; then :
15090   ac_cv_func_fork_works=yes
15091 else
15092   ac_cv_func_fork_works=no
15093 fi
15094 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15095   conftest.$ac_objext conftest.beam conftest.$ac_ext
15096 fi
15097
15098 fi
15099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15100 $as_echo "$ac_cv_func_fork_works" >&6; }
15101
15102 else
15103   ac_cv_func_fork_works=$ac_cv_func_fork
15104 fi
15105 if test "x$ac_cv_func_fork_works" = xcross; then
15106   case $host in
15107     *-*-amigaos* | *-*-msdosdjgpp*)
15108       # Override, as these systems have only a dummy fork() stub
15109       ac_cv_func_fork_works=no
15110       ;;
15111     *)
15112       ac_cv_func_fork_works=yes
15113       ;;
15114   esac
15115   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15116 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15117 fi
15118 ac_cv_func_vfork_works=$ac_cv_func_vfork
15119 if test "x$ac_cv_func_vfork" = xyes; then
15120   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15121 $as_echo_n "checking for working vfork... " >&6; }
15122 if ${ac_cv_func_vfork_works+:} false; then :
15123   $as_echo_n "(cached) " >&6
15124 else
15125   if test "$cross_compiling" = yes; then :
15126   ac_cv_func_vfork_works=cross
15127 else
15128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15129 /* end confdefs.h.  */
15130 /* Thanks to Paul Eggert for this test.  */
15131 $ac_includes_default
15132 #include <sys/wait.h>
15133 #ifdef HAVE_VFORK_H
15134 # include <vfork.h>
15135 #endif
15136 /* On some sparc systems, changes by the child to local and incoming
15137    argument registers are propagated back to the parent.  The compiler
15138    is told about this with #include <vfork.h>, but some compilers
15139    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15140    static variable whose address is put into a register that is
15141    clobbered by the vfork.  */
15142 static void
15143 #ifdef __cplusplus
15144 sparc_address_test (int arg)
15145 # else
15146 sparc_address_test (arg) int arg;
15147 #endif
15148 {
15149   static pid_t child;
15150   if (!child) {
15151     child = vfork ();
15152     if (child < 0) {
15153       perror ("vfork");
15154       _exit(2);
15155     }
15156     if (!child) {
15157       arg = getpid();
15158       write(-1, "", 0);
15159       _exit (arg);
15160     }
15161   }
15162 }
15163
15164 int
15165 main ()
15166 {
15167   pid_t parent = getpid ();
15168   pid_t child;
15169
15170   sparc_address_test (0);
15171
15172   child = vfork ();
15173
15174   if (child == 0) {
15175     /* Here is another test for sparc vfork register problems.  This
15176        test uses lots of local variables, at least as many local
15177        variables as main has allocated so far including compiler
15178        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15179        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15180        reuse the register of parent for one of the local variables,
15181        since it will think that parent can't possibly be used any more
15182        in this routine.  Assigning to the local variable will thus
15183        munge parent in the parent process.  */
15184     pid_t
15185       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15186       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15187     /* Convince the compiler that p..p7 are live; otherwise, it might
15188        use the same hardware register for all 8 local variables.  */
15189     if (p != p1 || p != p2 || p != p3 || p != p4
15190         || p != p5 || p != p6 || p != p7)
15191       _exit(1);
15192
15193     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15194        from child file descriptors.  If the child closes a descriptor
15195        before it execs or exits, this munges the parent's descriptor
15196        as well.  Test for this by closing stdout in the child.  */
15197     _exit(close(fileno(stdout)) != 0);
15198   } else {
15199     int status;
15200     struct stat st;
15201
15202     while (wait(&status) != child)
15203       ;
15204     return (
15205          /* Was there some problem with vforking?  */
15206          child < 0
15207
15208          /* Did the child fail?  (This shouldn't happen.)  */
15209          || status
15210
15211          /* Did the vfork/compiler bug occur?  */
15212          || parent != getpid()
15213
15214          /* Did the file descriptor bug occur?  */
15215          || fstat(fileno(stdout), &st) != 0
15216          );
15217   }
15218 }
15219 _ACEOF
15220 if ac_fn_c_try_run "$LINENO"; then :
15221   ac_cv_func_vfork_works=yes
15222 else
15223   ac_cv_func_vfork_works=no
15224 fi
15225 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15226   conftest.$ac_objext conftest.beam conftest.$ac_ext
15227 fi
15228
15229 fi
15230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15231 $as_echo "$ac_cv_func_vfork_works" >&6; }
15232
15233 fi;
15234 if test "x$ac_cv_func_fork_works" = xcross; then
15235   ac_cv_func_vfork_works=$ac_cv_func_vfork
15236   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15237 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15238 fi
15239
15240 if test "x$ac_cv_func_vfork_works" = xyes; then
15241
15242 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15243
15244 else
15245
15246 $as_echo "#define vfork fork" >>confdefs.h
15247
15248 fi
15249 if test "x$ac_cv_func_fork_works" = xyes; then
15250
15251 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15252
15253 fi
15254
15255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
15256 $as_echo_n "checking return type of signal handlers... " >&6; }
15257 if ${ac_cv_type_signal+:} false; then :
15258   $as_echo_n "(cached) " >&6
15259 else
15260   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15261 /* end confdefs.h.  */
15262 #include <sys/types.h>
15263 #include <signal.h>
15264
15265 int
15266 main ()
15267 {
15268 return *(signal (0, 0)) (0) == 1;
15269   ;
15270   return 0;
15271 }
15272 _ACEOF
15273 if ac_fn_c_try_compile "$LINENO"; then :
15274   ac_cv_type_signal=int
15275 else
15276   ac_cv_type_signal=void
15277 fi
15278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15279 fi
15280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
15281 $as_echo "$ac_cv_type_signal" >&6; }
15282
15283 cat >>confdefs.h <<_ACEOF
15284 #define RETSIGTYPE $ac_cv_type_signal
15285 _ACEOF
15286
15287
15288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15289 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15290 if ${ac_cv_sys_largefile_source+:} false; then :
15291   $as_echo_n "(cached) " >&6
15292 else
15293   while :; do
15294   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15295 /* end confdefs.h.  */
15296 #include <sys/types.h> /* for off_t */
15297      #include <stdio.h>
15298 int
15299 main ()
15300 {
15301 int (*fp) (FILE *, off_t, int) = fseeko;
15302      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15303   ;
15304   return 0;
15305 }
15306 _ACEOF
15307 if ac_fn_c_try_link "$LINENO"; then :
15308   ac_cv_sys_largefile_source=no; break
15309 fi
15310 rm -f core conftest.err conftest.$ac_objext \
15311     conftest$ac_exeext conftest.$ac_ext
15312   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15313 /* end confdefs.h.  */
15314 #define _LARGEFILE_SOURCE 1
15315 #include <sys/types.h> /* for off_t */
15316      #include <stdio.h>
15317 int
15318 main ()
15319 {
15320 int (*fp) (FILE *, off_t, int) = fseeko;
15321      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15322   ;
15323   return 0;
15324 }
15325 _ACEOF
15326 if ac_fn_c_try_link "$LINENO"; then :
15327   ac_cv_sys_largefile_source=1; break
15328 fi
15329 rm -f core conftest.err conftest.$ac_objext \
15330     conftest$ac_exeext conftest.$ac_ext
15331   ac_cv_sys_largefile_source=unknown
15332   break
15333 done
15334 fi
15335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15336 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15337 case $ac_cv_sys_largefile_source in #(
15338   no | unknown) ;;
15339   *)
15340 cat >>confdefs.h <<_ACEOF
15341 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15342 _ACEOF
15343 ;;
15344 esac
15345 rm -rf conftest*
15346
15347 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15348 # in glibc 2.1.3, but that breaks too many other things.
15349 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15350 if test $ac_cv_sys_largefile_source != unknown; then
15351
15352 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15353
15354 fi
15355
15356
15357 # Check whether --enable-largefile was given.
15358 if test "${enable_largefile+set}" = set; then :
15359   enableval=$enable_largefile;
15360 fi
15361
15362 if test "$enable_largefile" != no; then
15363
15364   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15365 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15366 if ${ac_cv_sys_largefile_CC+:} false; then :
15367   $as_echo_n "(cached) " >&6
15368 else
15369   ac_cv_sys_largefile_CC=no
15370      if test "$GCC" != yes; then
15371        ac_save_CC=$CC
15372        while :; do
15373          # IRIX 6.2 and later do not support large files by default,
15374          # so use the C compiler's -n32 option if that helps.
15375          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15376 /* end confdefs.h.  */
15377 #include <sys/types.h>
15378  /* Check that off_t can represent 2**63 - 1 correctly.
15379     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15380     since some C++ compilers masquerading as C compilers
15381     incorrectly reject 9223372036854775807.  */
15382 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15383   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15384                        && LARGE_OFF_T % 2147483647 == 1)
15385                       ? 1 : -1];
15386 int
15387 main ()
15388 {
15389
15390   ;
15391   return 0;
15392 }
15393 _ACEOF
15394          if ac_fn_c_try_compile "$LINENO"; then :
15395   break
15396 fi
15397 rm -f core conftest.err conftest.$ac_objext
15398          CC="$CC -n32"
15399          if ac_fn_c_try_compile "$LINENO"; then :
15400   ac_cv_sys_largefile_CC=' -n32'; break
15401 fi
15402 rm -f core conftest.err conftest.$ac_objext
15403          break
15404        done
15405        CC=$ac_save_CC
15406        rm -f conftest.$ac_ext
15407     fi
15408 fi
15409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15410 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15411   if test "$ac_cv_sys_largefile_CC" != no; then
15412     CC=$CC$ac_cv_sys_largefile_CC
15413   fi
15414
15415   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15416 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15417 if ${ac_cv_sys_file_offset_bits+:} false; then :
15418   $as_echo_n "(cached) " >&6
15419 else
15420   while :; do
15421   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15422 /* end confdefs.h.  */
15423 #include <sys/types.h>
15424  /* Check that off_t can represent 2**63 - 1 correctly.
15425     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15426     since some C++ compilers masquerading as C compilers
15427     incorrectly reject 9223372036854775807.  */
15428 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15429   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15430                        && LARGE_OFF_T % 2147483647 == 1)
15431                       ? 1 : -1];
15432 int
15433 main ()
15434 {
15435
15436   ;
15437   return 0;
15438 }
15439 _ACEOF
15440 if ac_fn_c_try_compile "$LINENO"; then :
15441   ac_cv_sys_file_offset_bits=no; break
15442 fi
15443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15444   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15445 /* end confdefs.h.  */
15446 #define _FILE_OFFSET_BITS 64
15447 #include <sys/types.h>
15448  /* Check that off_t can represent 2**63 - 1 correctly.
15449     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15450     since some C++ compilers masquerading as C compilers
15451     incorrectly reject 9223372036854775807.  */
15452 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15453   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15454                        && LARGE_OFF_T % 2147483647 == 1)
15455                       ? 1 : -1];
15456 int
15457 main ()
15458 {
15459
15460   ;
15461   return 0;
15462 }
15463 _ACEOF
15464 if ac_fn_c_try_compile "$LINENO"; then :
15465   ac_cv_sys_file_offset_bits=64; break
15466 fi
15467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15468   ac_cv_sys_file_offset_bits=unknown
15469   break
15470 done
15471 fi
15472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15473 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15474 case $ac_cv_sys_file_offset_bits in #(
15475   no | unknown) ;;
15476   *)
15477 cat >>confdefs.h <<_ACEOF
15478 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15479 _ACEOF
15480 ;;
15481 esac
15482 rm -rf conftest*
15483   if test $ac_cv_sys_file_offset_bits = unknown; then
15484     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15485 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15486 if ${ac_cv_sys_large_files+:} false; then :
15487   $as_echo_n "(cached) " >&6
15488 else
15489   while :; do
15490   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15491 /* end confdefs.h.  */
15492 #include <sys/types.h>
15493  /* Check that off_t can represent 2**63 - 1 correctly.
15494     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15495     since some C++ compilers masquerading as C compilers
15496     incorrectly reject 9223372036854775807.  */
15497 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15498   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15499                        && LARGE_OFF_T % 2147483647 == 1)
15500                       ? 1 : -1];
15501 int
15502 main ()
15503 {
15504
15505   ;
15506   return 0;
15507 }
15508 _ACEOF
15509 if ac_fn_c_try_compile "$LINENO"; then :
15510   ac_cv_sys_large_files=no; break
15511 fi
15512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15513   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15514 /* end confdefs.h.  */
15515 #define _LARGE_FILES 1
15516 #include <sys/types.h>
15517  /* Check that off_t can represent 2**63 - 1 correctly.
15518     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15519     since some C++ compilers masquerading as C compilers
15520     incorrectly reject 9223372036854775807.  */
15521 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15522   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15523                        && LARGE_OFF_T % 2147483647 == 1)
15524                       ? 1 : -1];
15525 int
15526 main ()
15527 {
15528
15529   ;
15530   return 0;
15531 }
15532 _ACEOF
15533 if ac_fn_c_try_compile "$LINENO"; then :
15534   ac_cv_sys_large_files=1; break
15535 fi
15536 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15537   ac_cv_sys_large_files=unknown
15538   break
15539 done
15540 fi
15541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15542 $as_echo "$ac_cv_sys_large_files" >&6; }
15543 case $ac_cv_sys_large_files in #(
15544   no | unknown) ;;
15545   *)
15546 cat >>confdefs.h <<_ACEOF
15547 #define _LARGE_FILES $ac_cv_sys_large_files
15548 _ACEOF
15549 ;;
15550 esac
15551 rm -rf conftest*
15552   fi
15553
15554
15555 fi
15556
15557
15558
15559
15560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
15561 $as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
15562 cache=_D_LARGEFILE_SOURCE_1
15563 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
15564   $as_echo_n "(cached) " >&6
15565 else
15566
15567 echo '
15568 #include <stdio.h>
15569 int test() {
15570         int a = fseeko(stdin, 0, 0);
15571         return a;
15572 }
15573 ' > conftest.c
15574 echo 'void f(){}' >>conftest.c
15575 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
15576 eval "cv_prog_cc_flag_needed_$cache=no"
15577 else
15578
15579 if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
15580 eval "cv_prog_cc_flag_needed_$cache=yes"
15581 else
15582 eval "cv_prog_cc_flag_needed_$cache=fail"
15583 #echo 'Test with flag fails too!'
15584 #cat conftest.c
15585 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15586 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15587 #exit 1
15588 fi
15589
15590 fi
15591 rm -f conftest conftest.c conftest.o
15592
15593 fi
15594
15595 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
15596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15597 $as_echo "yes" >&6; }
15598 :
15599 CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
15600 else
15601 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
15602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15603 $as_echo "no" >&6; }
15604 #echo 'Test with flag is no!'
15605 #cat conftest.c
15606 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15607 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15608 #exit 1
15609 :
15610
15611 else
15612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15613 $as_echo "failed" >&6; }
15614 :
15615
15616 fi
15617 fi
15618
15619
15620
15621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
15622 $as_echo_n "checking if nonblocking sockets work... " >&6; }
15623 if echo $target | grep mingw32 >/dev/null; then
15624         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
15625 $as_echo "no (windows)" >&6; }
15626
15627 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15628
15629 else
15630 if test "$cross_compiling" = yes; then :
15631
15632         { $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
15633 $as_echo "crosscompile(yes)" >&6; }
15634
15635 else
15636   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15637 /* end confdefs.h.  */
15638
15639
15640 #include <stdio.h>
15641 #include <string.h>
15642 #include <stdlib.h>
15643 #include <fcntl.h>
15644 #include <errno.h>
15645 #ifdef HAVE_SYS_TYPES_H
15646 #include <sys/types.h>
15647 #endif
15648 #ifdef HAVE_SYS_SOCKET_H
15649 #include <sys/socket.h>
15650 #endif
15651 #ifdef HAVE_NETINET_IN_H
15652 #include <netinet/in.h>
15653 #endif
15654 #ifdef HAVE_ARPA_INET_H
15655 #include <arpa/inet.h>
15656 #endif
15657 #ifdef HAVE_UNISTD_H
15658 #include <unistd.h>
15659 #endif
15660 #ifdef HAVE_TIME_H
15661 #include <time.h>
15662 #endif
15663
15664 int main(void)
15665 {
15666         int port;
15667         int sfd, cfd;
15668         int num = 10;
15669         int i, p;
15670         struct sockaddr_in a;
15671         /* test if select and nonblocking reads work well together */
15672         /* open port.
15673            fork child to send 10 messages.
15674            select to read.
15675            then try to nonblocking read the 10 messages
15676            then, nonblocking read must give EAGAIN
15677         */
15678
15679         port = 12345 + (time(0)%32);
15680         sfd = socket(PF_INET, SOCK_DGRAM, 0);
15681         if(sfd == -1) {
15682                 perror("socket");
15683                 return 1;
15684         }
15685         memset(&a, 0, sizeof(a));
15686         a.sin_family = AF_INET;
15687         a.sin_port = htons(port);
15688         a.sin_addr.s_addr = inet_addr("127.0.0.1");
15689         if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15690                 perror("bind");
15691                 return 1;
15692         }
15693         if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
15694                 perror("fcntl");
15695                 return 1;
15696         }
15697
15698         cfd = socket(PF_INET, SOCK_DGRAM, 0);
15699         if(cfd == -1) {
15700                 perror("client socket");
15701                 return 1;
15702         }
15703         a.sin_port = 0;
15704         if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15705                 perror("client bind");
15706                 return 1;
15707         }
15708         a.sin_port = htons(port);
15709
15710         /* no handler, causes exit in 10 seconds */
15711         alarm(10);
15712
15713         /* send and receive on the socket */
15714         if((p=fork()) == 0) {
15715                 for(i=0; i<num; i++) {
15716                         if(sendto(cfd, &i, sizeof(i), 0,
15717                                 (struct sockaddr*)&a, sizeof(a)) < 0) {
15718                                 perror("sendto");
15719                                 return 1;
15720                         }
15721                 }
15722         } else {
15723                 /* parent */
15724                 fd_set rset;
15725                 int x;
15726                 if(p == -1) {
15727                         perror("fork");
15728                         return 1;
15729                 }
15730                 FD_ZERO(&rset);
15731                 FD_SET(sfd, &rset);
15732                 if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
15733                         perror("select");
15734                         return 1;
15735                 }
15736                 i = 0;
15737                 while(i < num) {
15738                         if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
15739                                 if(errno == EAGAIN)
15740                                         continue;
15741                                 perror("recv");
15742                                 return 1;
15743                         }
15744                         i++;
15745                 }
15746                 /* now we want to get EAGAIN: nonblocking goodness */
15747                 errno = 0;
15748                 recv(sfd, &x, sizeof(x), 0);
15749                 if(errno != EAGAIN) {
15750                         perror("trying to recv again");
15751                         return 1;
15752                 }
15753                 /* EAGAIN encountered */
15754         }
15755
15756         close(sfd);
15757         close(cfd);
15758         return 0;
15759 }
15760
15761 _ACEOF
15762 if ac_fn_c_try_run "$LINENO"; then :
15763
15764         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15765 $as_echo "yes" >&6; }
15766
15767 else
15768
15769         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15770 $as_echo "no" >&6; }
15771
15772 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15773
15774
15775 fi
15776 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15777   conftest.$ac_objext conftest.beam conftest.$ac_ext
15778 fi
15779
15780 fi
15781
15782
15783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
15784 $as_echo_n "checking whether mkdir has one arg... " >&6; }
15785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15786 /* end confdefs.h.  */
15787
15788 #include <stdio.h>
15789 #include <unistd.h>
15790 #ifdef HAVE_WINSOCK2_H
15791 #include <winsock2.h>
15792 #endif
15793 #ifdef HAVE_SYS_STAT_H
15794 #include <sys/stat.h>
15795 #endif
15796
15797 int
15798 main ()
15799 {
15800
15801         (void)mkdir("directory");
15802
15803   ;
15804   return 0;
15805 }
15806 _ACEOF
15807 if ac_fn_c_try_compile "$LINENO"; then :
15808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15809 $as_echo "yes" >&6; }
15810
15811 $as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
15812
15813
15814 else
15815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15816 $as_echo "no" >&6; }
15817
15818 fi
15819 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15820
15821 for ac_func in strptime
15822 do :
15823   ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
15824 if test "x$ac_cv_func_strptime" = xyes; then :
15825   cat >>confdefs.h <<_ACEOF
15826 #define HAVE_STRPTIME 1
15827 _ACEOF
15828
15829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
15830 $as_echo_n "checking whether strptime works... " >&6; }
15831 if test c${cross_compiling} = cno; then
15832 if test "$cross_compiling" = yes; then :
15833   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15834 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15835 as_fn_error $? "cannot run test program while cross compiling
15836 See \`config.log' for more details" "$LINENO" 5; }
15837 else
15838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15839 /* end confdefs.h.  */
15840
15841 #define _XOPEN_SOURCE 600
15842 #include <time.h>
15843 int main(void) { struct tm tm; char *res;
15844 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);
15845 if (!res) return 2;
15846 res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
15847 if (!res) return 1; return 0; }
15848
15849 _ACEOF
15850 if ac_fn_c_try_run "$LINENO"; then :
15851   eval "ac_cv_c_strptime_works=yes"
15852 else
15853   eval "ac_cv_c_strptime_works=no"
15854 fi
15855 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15856   conftest.$ac_objext conftest.beam conftest.$ac_ext
15857 fi
15858
15859 else
15860 eval "ac_cv_c_strptime_works=maybe"
15861 fi
15862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
15863 $as_echo "$ac_cv_c_strptime_works" >&6; }
15864 if test $ac_cv_c_strptime_works = no; then
15865 case " $LIBOBJS " in
15866   *" strptime.$ac_objext "* ) ;;
15867   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15868  ;;
15869 esac
15870
15871 else
15872
15873 cat >>confdefs.h <<_ACEOF
15874 #define STRPTIME_WORKS 1
15875 _ACEOF
15876
15877 fi
15878
15879 else
15880   case " $LIBOBJS " in
15881   *" strptime.$ac_objext "* ) ;;
15882   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15883  ;;
15884 esac
15885
15886 fi
15887 done
15888
15889
15890 # set memory allocation checking if requested
15891 # Check whether --enable-alloc-checks was given.
15892 if test "${enable_alloc_checks+set}" = set; then :
15893   enableval=$enable_alloc_checks;
15894 fi
15895
15896 # Check whether --enable-alloc-lite was given.
15897 if test "${enable_alloc_lite+set}" = set; then :
15898   enableval=$enable_alloc_lite;
15899 fi
15900
15901 # Check whether --enable-alloc-nonregional was given.
15902 if test "${enable_alloc_nonregional+set}" = set; then :
15903   enableval=$enable_alloc_nonregional;
15904 fi
15905
15906 if test x_$enable_alloc_nonregional = x_yes; then
15907
15908 $as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
15909
15910 fi
15911 if test x_$enable_alloc_checks = x_yes; then
15912
15913 $as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
15914
15915 else
15916         if test x_$enable_alloc_lite = x_yes; then
15917
15918 $as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
15919
15920         else
15921
15922         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15923 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15924         if test "$cross_compiling" = yes; then :
15925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
15926 $as_echo "no (crosscompile)" >&6; }
15927         case " $LIBOBJS " in
15928   *" malloc.$ac_objext "* ) ;;
15929   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15930  ;;
15931 esac
15932
15933
15934 cat >>confdefs.h <<_ACEOF
15935 #define malloc rpl_malloc_unbound
15936 _ACEOF
15937
15938 else
15939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15940 /* end confdefs.h.  */
15941 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
15942 #include <stdlib.h>
15943 #else
15944 char *malloc ();
15945 #endif
15946
15947 int
15948 main ()
15949 {
15950  if(malloc(0) != 0) return 1;
15951   ;
15952   return 0;
15953 }
15954
15955 _ACEOF
15956 if ac_fn_c_try_run "$LINENO"; then :
15957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15958 $as_echo "no" >&6; }
15959         case " $LIBOBJS " in
15960   *" malloc.$ac_objext "* ) ;;
15961   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15962  ;;
15963 esac
15964
15965
15966 cat >>confdefs.h <<_ACEOF
15967 #define malloc rpl_malloc_unbound
15968 _ACEOF
15969
15970 else
15971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15972 $as_echo "yes" >&6; }
15973
15974 $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
15975
15976 fi
15977 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15978   conftest.$ac_objext conftest.beam conftest.$ac_ext
15979 fi
15980
15981
15982         fi
15983 fi
15984
15985 # check windows threads (we use them, not pthreads, on windows).
15986 if test "$on_mingw" = "yes"; then
15987 # check windows threads
15988         for ac_header in windows.h
15989 do :
15990   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
15991 "
15992 if test "x$ac_cv_header_windows_h" = xyes; then :
15993   cat >>confdefs.h <<_ACEOF
15994 #define HAVE_WINDOWS_H 1
15995 _ACEOF
15996
15997 fi
15998
15999 done
16000
16001         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
16002 $as_echo_n "checking for CreateThread... " >&6; }
16003         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16004 /* end confdefs.h.  */
16005
16006 #ifdef HAVE_WINDOWS_H
16007 #include <windows.h>
16008 #endif
16009
16010 int
16011 main ()
16012 {
16013
16014         HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
16015
16016   ;
16017   return 0;
16018 }
16019 _ACEOF
16020 if ac_fn_c_try_compile "$LINENO"; then :
16021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16022 $as_echo "yes" >&6; }
16023
16024 $as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
16025
16026
16027 else
16028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16029 $as_echo "no" >&6; }
16030
16031 fi
16032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16033
16034 else
16035 # not on mingw, check thread libraries.
16036
16037 # check for thread library.
16038 # check this first, so that the pthread lib does not get linked in via
16039 # libssl or libpython, and thus distorts the tests, and we end up using
16040 # the non-threadsafe C libraries.
16041
16042 # Check whether --with-pthreads was given.
16043 if test "${with_pthreads+set}" = set; then :
16044   withval=$with_pthreads;
16045 else
16046    withval="yes"
16047 fi
16048
16049 ub_have_pthreads=no
16050 if test x_$withval != x_no; then
16051
16052
16053 ac_ext=c
16054 ac_cpp='$CPP $CPPFLAGS'
16055 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16056 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16057 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16058
16059 ax_pthread_ok=no
16060
16061 # We used to check for pthread.h first, but this fails if pthread.h
16062 # requires special compiler flags (e.g. on True64 or Sequent).
16063 # It gets checked for in the link test anyway.
16064
16065 # First of all, check if the user has set any of the PTHREAD_LIBS,
16066 # etcetera environment variables, and if threads linking works using
16067 # them:
16068 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16069         save_CFLAGS="$CFLAGS"
16070         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16071         save_LIBS="$LIBS"
16072         LIBS="$PTHREAD_LIBS $LIBS"
16073         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16074 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
16075         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16076 /* end confdefs.h.  */
16077
16078 /* Override any GCC internal prototype to avoid an error.
16079    Use char because int might match the return type of a GCC
16080    builtin and then its argument prototype would still apply.  */
16081 #ifdef __cplusplus
16082 extern "C"
16083 #endif
16084 char pthread_join ();
16085 int
16086 main ()
16087 {
16088 return pthread_join ();
16089   ;
16090   return 0;
16091 }
16092 _ACEOF
16093 if ac_fn_c_try_link "$LINENO"; then :
16094   ax_pthread_ok=yes
16095 fi
16096 rm -f core conftest.err conftest.$ac_objext \
16097     conftest$ac_exeext conftest.$ac_ext
16098         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16099 $as_echo "$ax_pthread_ok" >&6; }
16100         if test x"$ax_pthread_ok" = xno; then
16101                 PTHREAD_LIBS=""
16102                 PTHREAD_CFLAGS=""
16103         fi
16104         LIBS="$save_LIBS"
16105         CFLAGS="$save_CFLAGS"
16106 fi
16107
16108 # We must check for the threads library under a number of different
16109 # names; the ordering is very important because some systems
16110 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16111 # libraries is broken (non-POSIX).
16112
16113 # Create a list of thread flags to try.  Items starting with a "-" are
16114 # C compiler flags, and other items are library names, except for "none"
16115 # which indicates that we try without any flags at all, and "pthread-config"
16116 # which is a program returning the flags for the Pth emulation library.
16117
16118 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
16119
16120 # The ordering *is* (sometimes) important.  Some notes on the
16121 # individual items follow:
16122
16123 # pthreads: AIX (must check this before -lpthread)
16124 # none: in case threads are in libc; should be tried before -Kthread and
16125 #       other compiler flags to prevent continual compiler warnings
16126 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16127 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16128 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16129 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16130 # -pthreads: Solaris/gcc
16131 # -mthreads: Mingw32/gcc, Lynx/gcc
16132 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16133 #      doesn't hurt to check since this sometimes defines pthreads too;
16134 #      also defines -D_REENTRANT)
16135 #      ... -mt is also the pthreads flag for HP/aCC
16136 # pthread: Linux, etcetera
16137 # --thread-safe: KAI C++
16138 # pthread-config: use pthread-config program (for GNU Pth library)
16139
16140 case ${host_os} in
16141         solaris*)
16142
16143         # On Solaris (at least, for some versions), libc contains stubbed
16144         # (non-functional) versions of the pthreads routines, so link-based
16145         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
16146         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16147         # a function called by this macro, so we could check for that, but
16148         # who knows whether they'll stub that too in a future libc.)  So,
16149         # we'll just look for -pthreads and -lpthread first:
16150
16151         ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
16152         ;;
16153
16154         darwin*)
16155         ax_pthread_flags="-pthread $ax_pthread_flags"
16156         ;;
16157 esac
16158
16159 # Clang doesn't consider unrecognized options an error unless we specify
16160 # -Werror. We throw in some extra Clang-specific options to ensure that
16161 # this doesn't happen for GCC, which also accepts -Werror.
16162
16163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
16164 $as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
16165 save_CFLAGS="$CFLAGS"
16166 ax_pthread_extra_flags="-Werror"
16167 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
16168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16169 /* end confdefs.h.  */
16170 int foo(void);
16171 int
16172 main ()
16173 {
16174 foo()
16175   ;
16176   return 0;
16177 }
16178 _ACEOF
16179 if ac_fn_c_try_compile "$LINENO"; then :
16180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16181 $as_echo "yes" >&6; }
16182 else
16183   ax_pthread_extra_flags=
16184                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16185 $as_echo "no" >&6; }
16186 fi
16187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16188 CFLAGS="$save_CFLAGS"
16189
16190 if test x"$ax_pthread_ok" = xno; then
16191 for flag in $ax_pthread_flags; do
16192
16193         case $flag in
16194                 none)
16195                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
16196 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
16197                 ;;
16198
16199                 -*)
16200                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
16201 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
16202                 PTHREAD_CFLAGS="$flag"
16203                 ;;
16204
16205                 pthread-config)
16206                 # Extract the first word of "pthread-config", so it can be a program name with args.
16207 set dummy pthread-config; ac_word=$2
16208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16209 $as_echo_n "checking for $ac_word... " >&6; }
16210 if ${ac_cv_prog_ax_pthread_config+:} false; then :
16211   $as_echo_n "(cached) " >&6
16212 else
16213   if test -n "$ax_pthread_config"; then
16214   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
16215 else
16216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16217 for as_dir in $PATH
16218 do
16219   IFS=$as_save_IFS
16220   test -z "$as_dir" && as_dir=.
16221     for ac_exec_ext in '' $ac_executable_extensions; do
16222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16223     ac_cv_prog_ax_pthread_config="yes"
16224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16225     break 2
16226   fi
16227 done
16228   done
16229 IFS=$as_save_IFS
16230
16231   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
16232 fi
16233 fi
16234 ax_pthread_config=$ac_cv_prog_ax_pthread_config
16235 if test -n "$ax_pthread_config"; then
16236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
16237 $as_echo "$ax_pthread_config" >&6; }
16238 else
16239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16240 $as_echo "no" >&6; }
16241 fi
16242
16243
16244                 if test x"$ax_pthread_config" = xno; then continue; fi
16245                 PTHREAD_CFLAGS="`pthread-config --cflags`"
16246                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16247                 ;;
16248
16249                 *)
16250                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
16251 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
16252                 PTHREAD_LIBS="-l$flag"
16253                 ;;
16254         esac
16255
16256         save_LIBS="$LIBS"
16257         save_CFLAGS="$CFLAGS"
16258         LIBS="$PTHREAD_LIBS $LIBS"
16259         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
16260
16261         # Check for various functions.  We must include pthread.h,
16262         # since some functions may be macros.  (On the Sequent, we
16263         # need a special flag -Kthread to make this header compile.)
16264         # We check for pthread_join because it is in -lpthread on IRIX
16265         # while pthread_create is in libc.  We check for pthread_attr_init
16266         # due to DEC craziness with -lpthreads.  We check for
16267         # pthread_cleanup_push because it is one of the few pthread
16268         # functions on Solaris that doesn't have a non-functional libc stub.
16269         # We try pthread_create on general principles.
16270         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16271 /* end confdefs.h.  */
16272 #include <pthread.h>
16273                         static void routine(void *a) { *((int*)a) = 0; }
16274                         static void *start_routine(void *a) { return a; }
16275 int
16276 main ()
16277 {
16278 pthread_t th; pthread_attr_t attr;
16279                         pthread_create(&th, 0, start_routine, 0);
16280                         pthread_join(th, 0);
16281                         pthread_attr_init(&attr);
16282                         pthread_cleanup_push(routine, 0);
16283                         pthread_cleanup_pop(0) /* ; */
16284   ;
16285   return 0;
16286 }
16287 _ACEOF
16288 if ac_fn_c_try_link "$LINENO"; then :
16289   ax_pthread_ok=yes
16290 fi
16291 rm -f core conftest.err conftest.$ac_objext \
16292     conftest$ac_exeext conftest.$ac_ext
16293
16294         LIBS="$save_LIBS"
16295         CFLAGS="$save_CFLAGS"
16296
16297         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16298 $as_echo "$ax_pthread_ok" >&6; }
16299         if test "x$ax_pthread_ok" = xyes; then
16300                 break;
16301         fi
16302
16303         PTHREAD_LIBS=""
16304         PTHREAD_CFLAGS=""
16305 done
16306 fi
16307
16308 # Various other checks:
16309 if test "x$ax_pthread_ok" = xyes; then
16310         save_LIBS="$LIBS"
16311         LIBS="$PTHREAD_LIBS $LIBS"
16312         save_CFLAGS="$CFLAGS"
16313         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16314
16315         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
16316         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
16317 $as_echo_n "checking for joinable pthread attribute... " >&6; }
16318         attr_name=unknown
16319         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
16320             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16321 /* end confdefs.h.  */
16322 #include <pthread.h>
16323 int
16324 main ()
16325 {
16326 int attr = $attr; return attr /* ; */
16327   ;
16328   return 0;
16329 }
16330 _ACEOF
16331 if ac_fn_c_try_link "$LINENO"; then :
16332   attr_name=$attr; break
16333 fi
16334 rm -f core conftest.err conftest.$ac_objext \
16335     conftest$ac_exeext conftest.$ac_ext
16336         done
16337         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
16338 $as_echo "$attr_name" >&6; }
16339         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
16340
16341 cat >>confdefs.h <<_ACEOF
16342 #define PTHREAD_CREATE_JOINABLE $attr_name
16343 _ACEOF
16344
16345         fi
16346
16347         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
16348 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
16349         flag=no
16350         case ${host_os} in
16351             aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
16352             osf* | hpux*) flag="-D_REENTRANT";;
16353             solaris*)
16354             if test "$GCC" = "yes"; then
16355                 flag="-D_REENTRANT"
16356             else
16357                 # TODO: What about Clang on Solaris?
16358                 flag="-mt -D_REENTRANT"
16359             fi
16360             ;;
16361         esac
16362         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
16363 $as_echo "$flag" >&6; }
16364         if test "x$flag" != xno; then
16365             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16366         fi
16367
16368         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
16369 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
16370 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
16371   $as_echo_n "(cached) " >&6
16372 else
16373
16374                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16375 /* end confdefs.h.  */
16376 #include <pthread.h>
16377 int
16378 main ()
16379 {
16380 int i = PTHREAD_PRIO_INHERIT;
16381   ;
16382   return 0;
16383 }
16384 _ACEOF
16385 if ac_fn_c_try_link "$LINENO"; then :
16386   ax_cv_PTHREAD_PRIO_INHERIT=yes
16387 else
16388   ax_cv_PTHREAD_PRIO_INHERIT=no
16389 fi
16390 rm -f core conftest.err conftest.$ac_objext \
16391     conftest$ac_exeext conftest.$ac_ext
16392
16393 fi
16394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
16395 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
16396         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
16397
16398 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
16399
16400 fi
16401
16402         LIBS="$save_LIBS"
16403         CFLAGS="$save_CFLAGS"
16404
16405         # More AIX lossage: compile with *_r variant
16406         if test "x$GCC" != xyes; then
16407             case $host_os in
16408                 aix*)
16409                 case "x/$CC" in #(
16410   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
16411     #handle absolute path differently from PATH based program lookup
16412                    case "x$CC" in #(
16413   x/*) :
16414     if as_fn_executable_p ${CC}_r; then :
16415   PTHREAD_CC="${CC}_r"
16416 fi ;; #(
16417   *) :
16418     for ac_prog in ${CC}_r
16419 do
16420   # Extract the first word of "$ac_prog", so it can be a program name with args.
16421 set dummy $ac_prog; ac_word=$2
16422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16423 $as_echo_n "checking for $ac_word... " >&6; }
16424 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
16425   $as_echo_n "(cached) " >&6
16426 else
16427   if test -n "$PTHREAD_CC"; then
16428   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16429 else
16430 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16431 for as_dir in $PATH
16432 do
16433   IFS=$as_save_IFS
16434   test -z "$as_dir" && as_dir=.
16435     for ac_exec_ext in '' $ac_executable_extensions; do
16436   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16437     ac_cv_prog_PTHREAD_CC="$ac_prog"
16438     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16439     break 2
16440   fi
16441 done
16442   done
16443 IFS=$as_save_IFS
16444
16445 fi
16446 fi
16447 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16448 if test -n "$PTHREAD_CC"; then
16449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
16450 $as_echo "$PTHREAD_CC" >&6; }
16451 else
16452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16453 $as_echo "no" >&6; }
16454 fi
16455
16456
16457   test -n "$PTHREAD_CC" && break
16458 done
16459 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16460  ;;
16461 esac ;; #(
16462   *) :
16463      ;;
16464 esac
16465                 ;;
16466             esac
16467         fi
16468 fi
16469
16470 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16471
16472
16473
16474
16475
16476 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16477 if test x"$ax_pthread_ok" = xyes; then
16478
16479
16480 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
16481
16482                 if test -n "$PTHREAD_LIBS"; then
16483                   LIBS="$PTHREAD_LIBS $LIBS"
16484                 fi
16485                 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16486                 CC="$PTHREAD_CC"
16487                 ub_have_pthreads=yes
16488                 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
16489 "
16490 if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
16491
16492 cat >>confdefs.h <<_ACEOF
16493 #define HAVE_PTHREAD_SPINLOCK_T 1
16494 _ACEOF
16495
16496
16497 fi
16498 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
16499 "
16500 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
16501
16502 cat >>confdefs.h <<_ACEOF
16503 #define HAVE_PTHREAD_RWLOCK_T 1
16504 _ACEOF
16505
16506
16507 fi
16508
16509
16510                 if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
16511                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
16512 $as_echo_n "checking if -pthread unused during linking... " >&6; }
16513                 # catch clang warning 'argument unused during compilation'
16514                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16515 /* end confdefs.h.  */
16516 $ac_includes_default
16517
16518 int main(void) {return 0;}
16519
16520 _ACEOF
16521                 pthread_unused="yes"
16522                 # first compile
16523                 echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
16524                 $CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
16525                 if test $? = 0; then
16526                         # then link
16527                         echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
16528                         $CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
16529                         if test $? -ne 0; then
16530                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16531 $as_echo "yes" >&6; }
16532                                 CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
16533                                 PTHREAD_CFLAGS_ONLY="-pthread"
16534
16535                         else
16536                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16537 $as_echo "no" >&6; }
16538                         fi
16539                 else
16540                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16541 $as_echo "no" >&6; }
16542                 fi # endif cc successful
16543                 rm -f conftest conftest.c conftest.o
16544                 fi # endif -pthread in CFLAGS
16545
16546
16547         :
16548 else
16549         ax_pthread_ok=no
16550
16551 fi
16552 ac_ext=c
16553 ac_cpp='$CPP $CPPFLAGS'
16554 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16555 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16556 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16557
16558
16559 fi
16560
16561 # check solaris thread library
16562
16563 # Check whether --with-solaris-threads was given.
16564 if test "${with_solaris_threads+set}" = set; then :
16565   withval=$with_solaris_threads;
16566 else
16567    withval="no"
16568 fi
16569
16570 ub_have_sol_threads=no
16571 if test x_$withval != x_no; then
16572         if test x_$ub_have_pthreads != x_no; then
16573             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
16574 $as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
16575         else
16576         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
16577 $as_echo_n "checking for library containing thr_create... " >&6; }
16578 if ${ac_cv_search_thr_create+:} false; then :
16579   $as_echo_n "(cached) " >&6
16580 else
16581   ac_func_search_save_LIBS=$LIBS
16582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16583 /* end confdefs.h.  */
16584
16585 /* Override any GCC internal prototype to avoid an error.
16586    Use char because int might match the return type of a GCC
16587    builtin and then its argument prototype would still apply.  */
16588 #ifdef __cplusplus
16589 extern "C"
16590 #endif
16591 char thr_create ();
16592 int
16593 main ()
16594 {
16595 return thr_create ();
16596   ;
16597   return 0;
16598 }
16599 _ACEOF
16600 for ac_lib in '' thread; do
16601   if test -z "$ac_lib"; then
16602     ac_res="none required"
16603   else
16604     ac_res=-l$ac_lib
16605     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16606   fi
16607   if ac_fn_c_try_link "$LINENO"; then :
16608   ac_cv_search_thr_create=$ac_res
16609 fi
16610 rm -f core conftest.err conftest.$ac_objext \
16611     conftest$ac_exeext
16612   if ${ac_cv_search_thr_create+:} false; then :
16613   break
16614 fi
16615 done
16616 if ${ac_cv_search_thr_create+:} false; then :
16617
16618 else
16619   ac_cv_search_thr_create=no
16620 fi
16621 rm conftest.$ac_ext
16622 LIBS=$ac_func_search_save_LIBS
16623 fi
16624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
16625 $as_echo "$ac_cv_search_thr_create" >&6; }
16626 ac_res=$ac_cv_search_thr_create
16627 if test "$ac_res" != no; then :
16628   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16629
16630
16631 $as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
16632
16633
16634
16635
16636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
16637 $as_echo_n "checking whether $CC supports -mt... " >&6; }
16638 cache=`echo mt | sed 'y%.=/+-%___p_%'`
16639 if eval \${cv_prog_cc_flag_$cache+:} false; then :
16640   $as_echo_n "(cached) " >&6
16641 else
16642
16643 echo 'void f(void){}' >conftest.c
16644 if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
16645 eval "cv_prog_cc_flag_$cache=yes"
16646 else
16647 eval "cv_prog_cc_flag_$cache=no"
16648 fi
16649 rm -f conftest conftest.o conftest.c
16650
16651 fi
16652
16653 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
16654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16655 $as_echo "yes" >&6; }
16656 :
16657 CFLAGS="$CFLAGS -mt"
16658 else
16659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16660 $as_echo "no" >&6; }
16661 :
16662 CFLAGS="$CFLAGS -D_REENTRANT"
16663 fi
16664
16665                 ub_have_sol_threads=yes
16666
16667 else
16668
16669                 as_fn_error $? "no solaris threads found." "$LINENO" 5
16670
16671 fi
16672
16673         fi
16674 fi
16675
16676 fi # end of non-mingw check of thread libraries
16677
16678 # Check for PyUnbound
16679
16680 # Check whether --with-pyunbound was given.
16681 if test "${with_pyunbound+set}" = set; then :
16682   withval=$with_pyunbound;
16683 else
16684    withval="no"
16685 fi
16686
16687
16688 ub_test_python=no
16689 ub_with_pyunbound=no
16690 if test x_$withval != x_no; then
16691    ub_with_pyunbound=yes
16692    ub_test_python=yes
16693 fi
16694
16695 # Check for Python module
16696
16697 # Check whether --with-pythonmodule was given.
16698 if test "${with_pythonmodule+set}" = set; then :
16699   withval=$with_pythonmodule;
16700 else
16701    withval="no"
16702 fi
16703
16704
16705 ub_with_pythonmod=no
16706 if test x_$withval != x_no; then
16707    ub_with_pythonmod=yes
16708    ub_test_python=yes
16709 fi
16710
16711 # Check for Python & SWIG only on PyUnbound or PyModule
16712 if test x_$ub_test_python != x_no; then
16713
16714    # Check for Python
16715    ub_have_python=no
16716    ac_save_LIBS="$LIBS"
16717         #
16718         # Allow the use of a (user set) custom python version
16719         #
16720
16721
16722         # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
16723 set dummy python$PYTHON_VERSION; ac_word=$2
16724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16725 $as_echo_n "checking for $ac_word... " >&6; }
16726 if ${ac_cv_path_PYTHON+:} false; then :
16727   $as_echo_n "(cached) " >&6
16728 else
16729   case $PYTHON in
16730   [\\/]* | ?:[\\/]*)
16731   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
16732   ;;
16733   *)
16734   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16735 for as_dir in $PATH
16736 do
16737   IFS=$as_save_IFS
16738   test -z "$as_dir" && as_dir=.
16739     for ac_exec_ext in '' $ac_executable_extensions; do
16740   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16741     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
16742     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16743     break 2
16744   fi
16745 done
16746   done
16747 IFS=$as_save_IFS
16748
16749   ;;
16750 esac
16751 fi
16752 PYTHON=$ac_cv_path_PYTHON
16753 if test -n "$PYTHON"; then
16754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
16755 $as_echo "$PYTHON" >&6; }
16756 else
16757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16758 $as_echo "no" >&6; }
16759 fi
16760
16761
16762         if test -z "$PYTHON"; then
16763            as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
16764            PYTHON_VERSION=""
16765         fi
16766
16767         if test -z "$PYTHON_VERSION"; then
16768                 PYTHON_VERSION=`$PYTHON -c "import sys; \
16769                         print(sys.version.split()[0])"`
16770         fi
16771
16772         #
16773         # Check if you have distutils, else fail
16774         #
16775         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
16776 $as_echo_n "checking for the distutils Python package... " >&6; }
16777         if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then
16778                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16779 $as_echo "yes" >&6; }
16780         else
16781                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16782 $as_echo "no" >&6; }
16783                 as_fn_error $? "cannot import Python module \"distutils\".
16784 Please check your Python installation. The error was:
16785 $ac_distutils_result" "$LINENO" 5
16786                 PYTHON_VERSION=""
16787         fi
16788
16789         #
16790         # Check for Python include path
16791         #
16792         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
16793 $as_echo_n "checking for Python include path... " >&6; }
16794         if test -z "$PYTHON_CPPFLAGS"; then
16795                 python_path=`$PYTHON -c "import distutils.sysconfig; \
16796                         print(distutils.sysconfig.get_python_inc());"`
16797                 if test -n "${python_path}"; then
16798                         python_path="-I$python_path"
16799                 fi
16800                 PYTHON_CPPFLAGS=$python_path
16801         fi
16802         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
16803 $as_echo "$PYTHON_CPPFLAGS" >&6; }
16804
16805
16806         #
16807         # Check for Python library path
16808         #
16809         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
16810 $as_echo_n "checking for Python library path... " >&6; }
16811         if test -z "$PYTHON_LDFLAGS"; then
16812                 PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
16813                         print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
16814         fi
16815         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
16816 $as_echo "$PYTHON_LDFLAGS" >&6; }
16817
16818
16819         #
16820         # Check for site packages
16821         #
16822         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
16823 $as_echo_n "checking for Python site-packages path... " >&6; }
16824         if test -z "$PYTHON_SITE_PKG"; then
16825                 PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
16826                         print(distutils.sysconfig.get_python_lib(1,0));"`
16827         fi
16828         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
16829 $as_echo "$PYTHON_SITE_PKG" >&6; }
16830
16831
16832         #
16833         # final check to see if everything compiles alright
16834         #
16835         { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
16836 $as_echo_n "checking consistency of all components of python development environment... " >&6; }
16837         ac_ext=c
16838 ac_cpp='$CPP $CPPFLAGS'
16839 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16840 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16841 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16842
16843         # save current global flags
16844         ac_save_LIBS="$LIBS"
16845         ac_save_CPPFLAGS="$CPPFLAGS"
16846
16847         LIBS="$LIBS $PYTHON_LDFLAGS"
16848         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16849         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16850 /* end confdefs.h.  */
16851
16852                 #include <Python.h>
16853
16854 int
16855 main ()
16856 {
16857
16858                 Py_Initialize();
16859
16860   ;
16861   return 0;
16862 }
16863 _ACEOF
16864 if ac_fn_c_try_link "$LINENO"; then :
16865   pythonexists=yes
16866 else
16867   pythonexists=no
16868 fi
16869 rm -f core conftest.err conftest.$ac_objext \
16870     conftest$ac_exeext conftest.$ac_ext
16871
16872         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
16873 $as_echo "$pythonexists" >&6; }
16874
16875         if test ! "$pythonexists" = "yes"; then
16876            as_fn_error $? "
16877   Could not link test program to Python. Maybe the main Python library has been
16878   installed in some non-standard library path. If so, pass it to configure,
16879   via the LDFLAGS environment variable.
16880   Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
16881   ============================================================================
16882    ERROR!
16883    You probably have to install the development version of the Python package
16884    for your distribution.  The exact name of this package varies among them.
16885   ============================================================================
16886            " "$LINENO" 5
16887           PYTHON_VERSION=""
16888         fi
16889         ac_ext=c
16890 ac_cpp='$CPP $CPPFLAGS'
16891 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16892 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16893 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16894
16895         # turn back to default flags
16896         CPPFLAGS="$ac_save_CPPFLAGS"
16897         LIBS="$ac_save_LIBS"
16898
16899         #
16900         # all done!
16901         #
16902
16903    if test ! -z "$PYTHON_VERSION"; then
16904         if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
16905                 as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
16906         fi
16907
16908       PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
16909
16910       # Have Python
16911
16912 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
16913
16914       if test -n "$LIBS"; then
16915         LIBS="$PYTHON_LDFLAGS $LIBS"
16916       else
16917         LIBS="$PYTHON_LDFLAGS"
16918       fi
16919       if test -n "$CPPFLAGS"; then
16920         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16921       else
16922         CPPFLAGS="$PYTHON_CPPFLAGS"
16923       fi
16924       ub_have_python=yes
16925       PC_PY_DEPENDENCY="python"
16926
16927
16928       # Check for SWIG
16929       ub_have_swig=no
16930       # Check whether --enable-swig-version-check was given.
16931 if test "${enable_swig_version_check+set}" = set; then :
16932   enableval=$enable_swig_version_check;
16933 fi
16934
16935       if test "$enable_swig_version_check" = "yes"; then
16936
16937         # Extract the first word of "swig", so it can be a program name with args.
16938 set dummy swig; ac_word=$2
16939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16940 $as_echo_n "checking for $ac_word... " >&6; }
16941 if ${ac_cv_path_SWIG+:} false; then :
16942   $as_echo_n "(cached) " >&6
16943 else
16944   case $SWIG in
16945   [\\/]* | ?:[\\/]*)
16946   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
16947   ;;
16948   *)
16949   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16950 for as_dir in $PATH
16951 do
16952   IFS=$as_save_IFS
16953   test -z "$as_dir" && as_dir=.
16954     for ac_exec_ext in '' $ac_executable_extensions; do
16955   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16956     ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
16957     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16958     break 2
16959   fi
16960 done
16961   done
16962 IFS=$as_save_IFS
16963
16964   ;;
16965 esac
16966 fi
16967 SWIG=$ac_cv_path_SWIG
16968 if test -n "$SWIG"; then
16969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
16970 $as_echo "$SWIG" >&6; }
16971 else
16972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16973 $as_echo "no" >&6; }
16974 fi
16975
16976
16977         if test -z "$SWIG" ; then
16978                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
16979 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
16980                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
16981         elif test -n "2.0.1" ; then
16982                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
16983 $as_echo_n "checking for SWIG version... " >&6; }
16984                 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'`
16985                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
16986 $as_echo "$swig_version" >&6; }
16987                 if test -n "$swig_version" ; then
16988                         # Calculate the required version number components
16989                         required=2.0.1
16990                         required_major=`echo $required | sed 's/[^0-9].*//'`
16991                         if test -z "$required_major" ; then
16992                                 required_major=0
16993                         fi
16994                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
16995                         required_minor=`echo $required | sed 's/[^0-9].*//'`
16996                         if test -z "$required_minor" ; then
16997                                 required_minor=0
16998                         fi
16999                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17000                         required_patch=`echo $required | sed 's/[^0-9].*//'`
17001                         if test -z "$required_patch" ; then
17002                                 required_patch=0
17003                         fi
17004                         # Calculate the available version number components
17005                         available=$swig_version
17006                         available_major=`echo $available | sed 's/[^0-9].*//'`
17007                         if test -z "$available_major" ; then
17008                                 available_major=0
17009                         fi
17010                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17011                         available_minor=`echo $available | sed 's/[^0-9].*//'`
17012                         if test -z "$available_minor" ; then
17013                                 available_minor=0
17014                         fi
17015                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17016                         available_patch=`echo $available | sed 's/[^0-9].*//'`
17017                         if test -z "$available_patch" ; then
17018                                 available_patch=0
17019                         fi
17020                         badversion=0
17021                         if test $available_major -lt $required_major ; then
17022                                 badversion=1
17023                         fi
17024                         if test $available_major -eq $required_major \
17025                                 -a $available_minor -lt $required_minor ; then
17026                                 badversion=1
17027                         fi
17028                         if test $available_major -eq $required_major \
17029                                 -a $available_minor -eq $required_minor \
17030                                 -a $available_patch -lt $required_patch ; then
17031                                 badversion=1
17032                         fi
17033                         if test $badversion -eq 1 ; then
17034                                 { $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
17035 $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;}
17036                                 SWIG='echo "Error: SWIG version >= 2.0.1 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17037                         else
17038                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17039 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17040                                 SWIG_LIB=`$SWIG -swiglib`
17041                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17042 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17043                         fi
17044                 else
17045                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17046 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17047                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17048                 fi
17049         fi
17050
17051
17052       else
17053
17054         # Extract the first word of "swig", so it can be a program name with args.
17055 set dummy swig; ac_word=$2
17056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17057 $as_echo_n "checking for $ac_word... " >&6; }
17058 if ${ac_cv_path_SWIG+:} false; then :
17059   $as_echo_n "(cached) " >&6
17060 else
17061   case $SWIG in
17062   [\\/]* | ?:[\\/]*)
17063   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17064   ;;
17065   *)
17066   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17067 for as_dir in $PATH
17068 do
17069   IFS=$as_save_IFS
17070   test -z "$as_dir" && as_dir=.
17071     for ac_exec_ext in '' $ac_executable_extensions; do
17072   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17073     ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17075     break 2
17076   fi
17077 done
17078   done
17079 IFS=$as_save_IFS
17080
17081   ;;
17082 esac
17083 fi
17084 SWIG=$ac_cv_path_SWIG
17085 if test -n "$SWIG"; then
17086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17087 $as_echo "$SWIG" >&6; }
17088 else
17089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17090 $as_echo "no" >&6; }
17091 fi
17092
17093
17094         if test -z "$SWIG" ; then
17095                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17096 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17097                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17098         elif test -n "" ; then
17099                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17100 $as_echo_n "checking for SWIG version... " >&6; }
17101                 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'`
17102                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17103 $as_echo "$swig_version" >&6; }
17104                 if test -n "$swig_version" ; then
17105                         # Calculate the required version number components
17106                         required=
17107                         required_major=`echo $required | sed 's/[^0-9].*//'`
17108                         if test -z "$required_major" ; then
17109                                 required_major=0
17110                         fi
17111                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17112                         required_minor=`echo $required | sed 's/[^0-9].*//'`
17113                         if test -z "$required_minor" ; then
17114                                 required_minor=0
17115                         fi
17116                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17117                         required_patch=`echo $required | sed 's/[^0-9].*//'`
17118                         if test -z "$required_patch" ; then
17119                                 required_patch=0
17120                         fi
17121                         # Calculate the available version number components
17122                         available=$swig_version
17123                         available_major=`echo $available | sed 's/[^0-9].*//'`
17124                         if test -z "$available_major" ; then
17125                                 available_major=0
17126                         fi
17127                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17128                         available_minor=`echo $available | sed 's/[^0-9].*//'`
17129                         if test -z "$available_minor" ; then
17130                                 available_minor=0
17131                         fi
17132                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17133                         available_patch=`echo $available | sed 's/[^0-9].*//'`
17134                         if test -z "$available_patch" ; then
17135                                 available_patch=0
17136                         fi
17137                         badversion=0
17138                         if test $available_major -lt $required_major ; then
17139                                 badversion=1
17140                         fi
17141                         if test $available_major -eq $required_major \
17142                                 -a $available_minor -lt $required_minor ; then
17143                                 badversion=1
17144                         fi
17145                         if test $available_major -eq $required_major \
17146                                 -a $available_minor -eq $required_minor \
17147                                 -a $available_patch -lt $required_patch ; then
17148                                 badversion=1
17149                         fi
17150                         if test $badversion -eq 1 ; then
17151                                 { $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
17152 $as_echo "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
17153                                 SWIG='echo "Error: SWIG version >=  is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17154                         else
17155                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17156 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17157                                 SWIG_LIB=`$SWIG -swiglib`
17158                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17159 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17160                         fi
17161                 else
17162                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17163 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17164                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17165                 fi
17166         fi
17167
17168
17169       fi
17170       { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
17171 $as_echo_n "checking SWIG... " >&6; }
17172       if test ! -x "$SWIG"; then
17173          as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
17174       else
17175
17176 $as_echo "#define HAVE_SWIG 1" >>confdefs.h
17177
17178          swig="$SWIG"
17179
17180          { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
17181 $as_echo "present" >&6; }
17182
17183          # If have Python & SWIG
17184          # Declare PythonMod
17185          if test x_$ub_with_pythonmod != x_no; then
17186
17187 $as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
17188
17189             WITH_PYTHONMODULE=yes
17190
17191             PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
17192
17193             PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
17194
17195             PYTHONMOD_INSTALL=pythonmod-install
17196
17197             PYTHONMOD_UNINSTALL=pythonmod-uninstall
17198
17199          fi
17200
17201          # Declare PyUnbound
17202          if test x_$ub_with_pyunbound != x_no; then
17203
17204 $as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
17205
17206             WITH_PYUNBOUND=yes
17207
17208             PYUNBOUND_OBJ="libunbound_wrap.lo"
17209
17210             PYUNBOUND_TARGET="_unbound.la"
17211
17212             PYUNBOUND_INSTALL=pyunbound-install
17213
17214             PYUNBOUND_UNINSTALL=pyunbound-uninstall
17215
17216          fi
17217       fi
17218    else
17219       { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
17220 $as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
17221       ub_with_pyunbound=no
17222       ub_with_pythonmod=no
17223    fi
17224 fi
17225
17226 if test "`uname`" = "NetBSD"; then
17227         NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
17228
17229 fi
17230 CONFIG_DATE=`date +%Y%m%d`
17231
17232
17233 # Checks for libraries.
17234
17235 # libnss
17236 USE_NSS="no"
17237
17238 # Check whether --with-nss was given.
17239 if test "${with_nss+set}" = set; then :
17240   withval=$with_nss;
17241         USE_NSS="yes"
17242
17243 $as_echo "#define HAVE_NSS 1" >>confdefs.h
17244
17245         if test "$withval" != "" -a "$withval" != "yes"; then
17246                 CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
17247                 LDFLAGS="$LDFLAGS -L$withval/lib"
17248
17249         if test "x$enable_rpath" = xyes; then
17250                 if echo "$withval/lib" | grep "^/" >/dev/null; then
17251                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17252                 fi
17253         fi
17254
17255                 CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
17256         else
17257                 CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
17258                 CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
17259         fi
17260         LIBS="$LIBS -lnss3 -lnspr4"
17261         SSLLIB=""
17262
17263
17264 fi
17265
17266
17267 # libnettle
17268 USE_NETTLE="no"
17269
17270 # Check whether --with-nettle was given.
17271 if test "${with_nettle+set}" = set; then :
17272   withval=$with_nettle;
17273         USE_NETTLE="yes"
17274
17275 $as_echo "#define HAVE_NETTLE 1" >>confdefs.h
17276
17277         for ac_header in nettle/dsa-compat.h
17278 do :
17279   ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
17280 "
17281 if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then :
17282   cat >>confdefs.h <<_ACEOF
17283 #define HAVE_NETTLE_DSA_COMPAT_H 1
17284 _ACEOF
17285
17286 fi
17287
17288 done
17289
17290         if test "$withval" != "" -a "$withval" != "yes"; then
17291                 CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
17292                 LDFLAGS="$LDFLAGS -L$withval/lib"
17293
17294         if test "x$enable_rpath" = xyes; then
17295                 if echo "$withval/lib" | grep "^/" >/dev/null; then
17296                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17297                 fi
17298         fi
17299
17300         else
17301                 CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
17302         fi
17303         LIBS="$LIBS -lhogweed -lnettle -lgmp"
17304         SSLLIB=""
17305
17306
17307 fi
17308
17309
17310 # openssl
17311 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17312
17313
17314 # Check whether --with-ssl was given.
17315 if test "${with_ssl+set}" = set; then :
17316   withval=$with_ssl;
17317
17318 else
17319
17320             withval="yes"
17321
17322 fi
17323
17324     if test x_$withval = x_no; then
17325         as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
17326     fi
17327
17328     withval=$withval
17329     if test x_$withval != x_no; then
17330         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
17331 $as_echo_n "checking for SSL... " >&6; }
17332         if test x_$withval = x_ -o x_$withval = x_yes; then
17333             withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
17334         fi
17335         for dir in $withval; do
17336             ssldir="$dir"
17337             if test -f "$dir/include/openssl/ssl.h"; then
17338                 found_ssl="yes"
17339
17340 cat >>confdefs.h <<_ACEOF
17341 #define HAVE_SSL /**/
17342 _ACEOF
17343
17344                                 if test "$ssldir" != "/usr"; then
17345                         CPPFLAGS="$CPPFLAGS -I$ssldir/include"
17346                         LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
17347                 fi
17348                 break;
17349             fi
17350         done
17351         if test x_$found_ssl != x_yes; then
17352             as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
17353         else
17354             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
17355 $as_echo "found in $ssldir" >&6; }
17356             HAVE_SSL=yes
17357                         if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
17358                 LDFLAGS="$LDFLAGS -L$ssldir/lib"
17359                 LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
17360
17361         if test "x$enable_rpath" = xyes; then
17362                 if echo "$ssldir/lib" | grep "^/" >/dev/null; then
17363                         RUNTIME_PATH="$RUNTIME_PATH -R$ssldir/lib"
17364                 fi
17365         fi
17366
17367             fi
17368
17369             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_Update in -lcrypto" >&5
17370 $as_echo_n "checking for HMAC_Update in -lcrypto... " >&6; }
17371             LIBS="$LIBS -lcrypto"
17372             LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
17373             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17374 /* end confdefs.h.  */
17375
17376 int
17377 main ()
17378 {
17379
17380                 int HMAC_Update(void);
17381                 (void)HMAC_Update();
17382
17383   ;
17384   return 0;
17385 }
17386 _ACEOF
17387 if ac_fn_c_try_link "$LINENO"; then :
17388
17389                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17390 $as_echo "yes" >&6; }
17391
17392 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17393
17394
17395 else
17396
17397                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17398 $as_echo "no" >&6; }
17399                 # check if -lwsock32 or -lgdi32 are needed.
17400                 BAKLIBS="$LIBS"
17401                 BAKSSLLIBS="$LIBSSL_LIBS"
17402                 LIBS="$LIBS -lgdi32 -lws2_32"
17403                 LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
17404                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
17405 $as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
17406                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17407 /* end confdefs.h.  */
17408
17409 int
17410 main ()
17411 {
17412
17413                     int HMAC_Update(void);
17414                     (void)HMAC_Update();
17415
17416   ;
17417   return 0;
17418 }
17419 _ACEOF
17420 if ac_fn_c_try_link "$LINENO"; then :
17421
17422
17423 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17424
17425                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17426 $as_echo "yes" >&6; }
17427
17428 else
17429
17430                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17431 $as_echo "no" >&6; }
17432                     LIBS="$BAKLIBS"
17433                     LIBSSL_LIBS="$BAKSSLLIBS"
17434                     LIBS="$LIBS -ldl"
17435                     LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
17436                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
17437 $as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
17438                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17439 /* end confdefs.h.  */
17440
17441 int
17442 main ()
17443 {
17444
17445                         int HMAC_Update(void);
17446                         (void)HMAC_Update();
17447
17448   ;
17449   return 0;
17450 }
17451 _ACEOF
17452 if ac_fn_c_try_link "$LINENO"; then :
17453
17454
17455 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17456
17457                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17458 $as_echo "yes" >&6; }
17459
17460 else
17461
17462                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17463 $as_echo "no" >&6; }
17464                         LIBS="$BAKLIBS"
17465                         LIBSSL_LIBS="$BAKSSLLIBS"
17466                         LIBS="$LIBS -ldl -pthread"
17467                         LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
17468                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
17469 $as_echo_n "checking if -lcrypto needs -ldl -pthread... " >&6; }
17470                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17471 /* end confdefs.h.  */
17472
17473 int
17474 main ()
17475 {
17476
17477                             int HMAC_Update(void);
17478                             (void)HMAC_Update();
17479
17480   ;
17481   return 0;
17482 }
17483 _ACEOF
17484 if ac_fn_c_try_link "$LINENO"; then :
17485
17486
17487 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17488
17489                             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17490 $as_echo "yes" >&6; }
17491
17492 else
17493
17494                             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17495 $as_echo "no" >&6; }
17496                             as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
17497
17498 fi
17499 rm -f core conftest.err conftest.$ac_objext \
17500     conftest$ac_exeext conftest.$ac_ext
17501
17502 fi
17503 rm -f core conftest.err conftest.$ac_objext \
17504     conftest$ac_exeext conftest.$ac_ext
17505
17506 fi
17507 rm -f core conftest.err conftest.$ac_objext \
17508     conftest$ac_exeext conftest.$ac_ext
17509
17510 fi
17511 rm -f core conftest.err conftest.$ac_objext \
17512     conftest$ac_exeext conftest.$ac_ext
17513         fi
17514
17515
17516     fi
17517 for ac_header in openssl/ssl.h
17518 do :
17519   ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
17520 "
17521 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
17522   cat >>confdefs.h <<_ACEOF
17523 #define HAVE_OPENSSL_SSL_H 1
17524 _ACEOF
17525
17526 fi
17527
17528 done
17529
17530 for ac_header in openssl/err.h
17531 do :
17532   ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
17533 "
17534 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
17535   cat >>confdefs.h <<_ACEOF
17536 #define HAVE_OPENSSL_ERR_H 1
17537 _ACEOF
17538
17539 fi
17540
17541 done
17542
17543 for ac_header in openssl/rand.h
17544 do :
17545   ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
17546 "
17547 if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
17548   cat >>confdefs.h <<_ACEOF
17549 #define HAVE_OPENSSL_RAND_H 1
17550 _ACEOF
17551
17552 fi
17553
17554 done
17555
17556
17557
17558
17559 # check if libssl needs libdl
17560 BAKLIBS="$LIBS"
17561 LIBS="-lssl $LIBS"
17562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
17563 $as_echo_n "checking if libssl needs libdl... " >&6; }
17564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17565 /* end confdefs.h.  */
17566
17567 /* Override any GCC internal prototype to avoid an error.
17568    Use char because int might match the return type of a GCC
17569    builtin and then its argument prototype would still apply.  */
17570 #ifdef __cplusplus
17571 extern "C"
17572 #endif
17573 char SSL_CTX_new ();
17574 int
17575 main ()
17576 {
17577 return SSL_CTX_new ();
17578   ;
17579   return 0;
17580 }
17581 _ACEOF
17582 if ac_fn_c_try_link "$LINENO"; then :
17583
17584         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17585 $as_echo "no" >&6; }
17586         LIBS="$BAKLIBS"
17587
17588 else
17589
17590         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17591 $as_echo "yes" >&6; }
17592         LIBS="$BAKLIBS"
17593         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17594 $as_echo_n "checking for library containing dlopen... " >&6; }
17595 if ${ac_cv_search_dlopen+:} false; then :
17596   $as_echo_n "(cached) " >&6
17597 else
17598   ac_func_search_save_LIBS=$LIBS
17599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17600 /* end confdefs.h.  */
17601
17602 /* Override any GCC internal prototype to avoid an error.
17603    Use char because int might match the return type of a GCC
17604    builtin and then its argument prototype would still apply.  */
17605 #ifdef __cplusplus
17606 extern "C"
17607 #endif
17608 char dlopen ();
17609 int
17610 main ()
17611 {
17612 return dlopen ();
17613   ;
17614   return 0;
17615 }
17616 _ACEOF
17617 for ac_lib in '' dl; do
17618   if test -z "$ac_lib"; then
17619     ac_res="none required"
17620   else
17621     ac_res=-l$ac_lib
17622     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17623   fi
17624   if ac_fn_c_try_link "$LINENO"; then :
17625   ac_cv_search_dlopen=$ac_res
17626 fi
17627 rm -f core conftest.err conftest.$ac_objext \
17628     conftest$ac_exeext
17629   if ${ac_cv_search_dlopen+:} false; then :
17630   break
17631 fi
17632 done
17633 if ${ac_cv_search_dlopen+:} false; then :
17634
17635 else
17636   ac_cv_search_dlopen=no
17637 fi
17638 rm conftest.$ac_ext
17639 LIBS=$ac_func_search_save_LIBS
17640 fi
17641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17642 $as_echo "$ac_cv_search_dlopen" >&6; }
17643 ac_res=$ac_cv_search_dlopen
17644 if test "$ac_res" != no; then :
17645   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17646
17647 fi
17648
17649
17650 fi
17651 rm -f core conftest.err conftest.$ac_objext \
17652     conftest$ac_exeext conftest.$ac_ext
17653 SSLLIB="-lssl"
17654
17655 # check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
17656 BAKLIBS="$LIBS"
17657 LIBS="-lssl $LIBS"
17658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
17659 $as_echo_n "checking if libssl needs -lcrypt32... " >&6; }
17660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17661 /* end confdefs.h.  */
17662
17663 /* Override any GCC internal prototype to avoid an error.
17664    Use char because int might match the return type of a GCC
17665    builtin and then its argument prototype would still apply.  */
17666 #ifdef __cplusplus
17667 extern "C"
17668 #endif
17669 char HMAC_Update ();
17670 int
17671 main ()
17672 {
17673 return HMAC_Update ();
17674   ;
17675   return 0;
17676 }
17677 _ACEOF
17678 if ac_fn_c_try_link "$LINENO"; then :
17679
17680         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17681 $as_echo "no" >&6; }
17682         LIBS="$BAKLIBS"
17683
17684 else
17685
17686         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17687 $as_echo "yes" >&6; }
17688         LIBS="$BAKLIBS"
17689         LIBS="$LIBS -lcrypt32"
17690
17691 fi
17692 rm -f core conftest.err conftest.$ac_objext \
17693     conftest$ac_exeext conftest.$ac_ext
17694
17695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
17696 $as_echo_n "checking for LibreSSL... " >&6; }
17697 if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
17698         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17699 $as_echo "yes" >&6; }
17700
17701 $as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
17702
17703         # libressl provides these compat functions, but they may also be
17704         # declared by the OS in libc.  See if they have been declared.
17705         ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
17706 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
17707   ac_have_decl=1
17708 else
17709   ac_have_decl=0
17710 fi
17711
17712 cat >>confdefs.h <<_ACEOF
17713 #define HAVE_DECL_STRLCPY $ac_have_decl
17714 _ACEOF
17715 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
17716 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
17717   ac_have_decl=1
17718 else
17719   ac_have_decl=0
17720 fi
17721
17722 cat >>confdefs.h <<_ACEOF
17723 #define HAVE_DECL_STRLCAT $ac_have_decl
17724 _ACEOF
17725 ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
17726 if test "x$ac_cv_have_decl_arc4random" = xyes; then :
17727   ac_have_decl=1
17728 else
17729   ac_have_decl=0
17730 fi
17731
17732 cat >>confdefs.h <<_ACEOF
17733 #define HAVE_DECL_ARC4RANDOM $ac_have_decl
17734 _ACEOF
17735 ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
17736 if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
17737   ac_have_decl=1
17738 else
17739   ac_have_decl=0
17740 fi
17741
17742 cat >>confdefs.h <<_ACEOF
17743 #define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
17744 _ACEOF
17745 ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
17746 if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
17747   ac_have_decl=1
17748 else
17749   ac_have_decl=0
17750 fi
17751
17752 cat >>confdefs.h <<_ACEOF
17753 #define HAVE_DECL_REALLOCARRAY $ac_have_decl
17754 _ACEOF
17755
17756 else
17757         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17758 $as_echo "no" >&6; }
17759 fi
17760 for ac_header in openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h
17761 do :
17762   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17763 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
17764 "
17765 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17766   cat >>confdefs.h <<_ACEOF
17767 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17768 _ACEOF
17769
17770 fi
17771
17772 done
17773
17774 for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1 EVP_DigestVerify
17775 do :
17776   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17777 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17778 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17779   cat >>confdefs.h <<_ACEOF
17780 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17781 _ACEOF
17782
17783 fi
17784 done
17785
17786
17787 # these check_funcs need -lssl
17788 BAKLIBS="$LIBS"
17789 LIBS="-lssl $LIBS"
17790 for ac_func in OPENSSL_init_ssl SSL_CTX_set_security_level SSL_set1_host SSL_get0_peername
17791 do :
17792   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17793 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17794 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17795   cat >>confdefs.h <<_ACEOF
17796 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17797 _ACEOF
17798
17799 fi
17800 done
17801
17802 LIBS="$BAKLIBS"
17803
17804 ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
17805 $ac_includes_default
17806 #ifdef HAVE_OPENSSL_ERR_H
17807 #include <openssl/err.h>
17808 #endif
17809
17810 #ifdef HAVE_OPENSSL_RAND_H
17811 #include <openssl/rand.h>
17812 #endif
17813
17814 #ifdef HAVE_OPENSSL_CONF_H
17815 #include <openssl/conf.h>
17816 #endif
17817
17818 #ifdef HAVE_OPENSSL_ENGINE_H
17819 #include <openssl/engine.h>
17820 #endif
17821 #include <openssl/ssl.h>
17822 #include <openssl/evp.h>
17823
17824 "
17825 if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
17826   ac_have_decl=1
17827 else
17828   ac_have_decl=0
17829 fi
17830
17831 cat >>confdefs.h <<_ACEOF
17832 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
17833 _ACEOF
17834 ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
17835 $ac_includes_default
17836 #ifdef HAVE_OPENSSL_ERR_H
17837 #include <openssl/err.h>
17838 #endif
17839
17840 #ifdef HAVE_OPENSSL_RAND_H
17841 #include <openssl/rand.h>
17842 #endif
17843
17844 #ifdef HAVE_OPENSSL_CONF_H
17845 #include <openssl/conf.h>
17846 #endif
17847
17848 #ifdef HAVE_OPENSSL_ENGINE_H
17849 #include <openssl/engine.h>
17850 #endif
17851 #include <openssl/ssl.h>
17852 #include <openssl/evp.h>
17853
17854 "
17855 if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
17856   ac_have_decl=1
17857 else
17858   ac_have_decl=0
17859 fi
17860
17861 cat >>confdefs.h <<_ACEOF
17862 #define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
17863 _ACEOF
17864 ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
17865 $ac_includes_default
17866 #ifdef HAVE_OPENSSL_ERR_H
17867 #include <openssl/err.h>
17868 #endif
17869
17870 #ifdef HAVE_OPENSSL_RAND_H
17871 #include <openssl/rand.h>
17872 #endif
17873
17874 #ifdef HAVE_OPENSSL_CONF_H
17875 #include <openssl/conf.h>
17876 #endif
17877
17878 #ifdef HAVE_OPENSSL_ENGINE_H
17879 #include <openssl/engine.h>
17880 #endif
17881 #include <openssl/ssl.h>
17882 #include <openssl/evp.h>
17883
17884 "
17885 if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
17886   ac_have_decl=1
17887 else
17888   ac_have_decl=0
17889 fi
17890
17891 cat >>confdefs.h <<_ACEOF
17892 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
17893 _ACEOF
17894
17895 fi
17896
17897
17898
17899 # Check whether --enable-sha1 was given.
17900 if test "${enable_sha1+set}" = set; then :
17901   enableval=$enable_sha1;
17902 fi
17903
17904 case "$enable_sha1" in
17905         no)
17906         ;;
17907         yes|*)
17908
17909 $as_echo "#define USE_SHA1 1" >>confdefs.h
17910
17911         ;;
17912 esac
17913
17914
17915 # Check whether --enable-sha2 was given.
17916 if test "${enable_sha2+set}" = set; then :
17917   enableval=$enable_sha2;
17918 fi
17919
17920 case "$enable_sha2" in
17921         no)
17922         ;;
17923         yes|*)
17924
17925 $as_echo "#define USE_SHA2 1" >>confdefs.h
17926
17927         ;;
17928 esac
17929
17930 # Check whether --enable-subnet was given.
17931 if test "${enable_subnet+set}" = set; then :
17932   enableval=$enable_subnet;
17933 fi
17934
17935 case "$enable_subnet" in
17936         yes)
17937
17938 $as_echo "#define CLIENT_SUBNET 1" >>confdefs.h
17939
17940         SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
17941
17942         SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
17943
17944         ;;
17945         no|*)
17946         ;;
17947 esac
17948
17949 # check wether gost also works
17950
17951 # Check whether --enable-gost was given.
17952 if test "${enable_gost+set}" = set; then :
17953   enableval=$enable_gost;
17954 fi
17955
17956 use_gost="no"
17957 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17958 case "$enable_gost" in
17959         no)
17960         ;;
17961         *)
17962         ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
17963 if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
17964   :
17965 else
17966   as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
17967 fi
17968
17969         ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
17970 if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
17971
17972 else
17973   as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
17974 fi
17975
17976
17977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
17978 $as_echo_n "checking if GOST works... " >&6; }
17979 if test c${cross_compiling} = cno; then
17980 BAKCFLAGS="$CFLAGS"
17981 if test -n "$ssldir"; then
17982         CFLAGS="$CFLAGS -Wl,-rpath,$ssldir/lib"
17983 fi
17984 if test "$cross_compiling" = yes; then :
17985   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17986 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17987 as_fn_error $? "cannot run test program while cross compiling
17988 See \`config.log' for more details" "$LINENO" 5; }
17989 else
17990   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17991 /* end confdefs.h.  */
17992
17993 #include <string.h>
17994 #include <openssl/ssl.h>
17995 #include <openssl/evp.h>
17996 #include <openssl/engine.h>
17997 #include <openssl/conf.h>
17998 /* routine to load gost (from sldns) */
17999 int load_gost_id(void)
18000 {
18001         static int gost_id = 0;
18002         const EVP_PKEY_ASN1_METHOD* meth;
18003         ENGINE* e;
18004
18005         if(gost_id) return gost_id;
18006
18007         /* see if configuration loaded gost implementation from other engine*/
18008         meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
18009         if(meth) {
18010                 EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18011                 return gost_id;
18012         }
18013
18014         /* see if engine can be loaded already */
18015         e = ENGINE_by_id("gost");
18016         if(!e) {
18017                 /* load it ourself, in case statically linked */
18018                 ENGINE_load_builtin_engines();
18019                 ENGINE_load_dynamic();
18020                 e = ENGINE_by_id("gost");
18021         }
18022         if(!e) {
18023                 /* no gost engine in openssl */
18024                 return 0;
18025         }
18026         if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
18027                 ENGINE_finish(e);
18028                 ENGINE_free(e);
18029                 return 0;
18030         }
18031
18032         meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
18033         if(!meth) {
18034                 /* algo not found */
18035                 ENGINE_finish(e);
18036                 ENGINE_free(e);
18037                 return 0;
18038         }
18039         EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18040         return gost_id;
18041 }
18042 int main(void) {
18043         EVP_MD_CTX* ctx;
18044         const EVP_MD* md;
18045         unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
18046         const char* str = "Hello world";
18047         const unsigned char check[] = {
18048                 0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
18049                 0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
18050                 0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
18051                 0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
18052         };
18053         OPENSSL_config(NULL);
18054         (void)load_gost_id();
18055         md = EVP_get_digestbyname("md_gost94");
18056         if(!md) return 1;
18057         memset(digest, 0, sizeof(digest));
18058         ctx = EVP_MD_CTX_create();
18059         if(!ctx) return 2;
18060         if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
18061         if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
18062         if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
18063         /* uncomment to see the hash calculated.
18064                 {int i;
18065                 for(i=0; i<32; i++)
18066                         printf(" %2.2x", (int)digest[i]);
18067                 printf("\n");}
18068         */
18069         if(memcmp(digest, check, sizeof(check)) != 0)
18070                 return 6;
18071         return 0;
18072 }
18073
18074 _ACEOF
18075 if ac_fn_c_try_run "$LINENO"; then :
18076   eval "ac_cv_c_gost_works=yes"
18077 else
18078   eval "ac_cv_c_gost_works=no"
18079 fi
18080 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18081   conftest.$ac_objext conftest.beam conftest.$ac_ext
18082 fi
18083
18084 CFLAGS="$BAKCFLAGS"
18085 else
18086 eval "ac_cv_c_gost_works=maybe"
18087 fi
18088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
18089 $as_echo "$ac_cv_c_gost_works" >&6; }
18090
18091         if test "$ac_cv_c_gost_works" != no; then
18092                 use_gost="yes"
18093
18094 $as_echo "#define USE_GOST 1" >>confdefs.h
18095
18096         fi
18097         ;;
18098 esac
18099 fi
18100 # Check whether --enable-ecdsa was given.
18101 if test "${enable_ecdsa+set}" = set; then :
18102   enableval=$enable_ecdsa;
18103 fi
18104
18105 use_ecdsa="no"
18106 case "$enable_ecdsa" in
18107     no)
18108       ;;
18109     *)
18110       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18111               ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
18112 if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
18113
18114 else
18115   as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18116 fi
18117
18118               ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
18119 if test "x$ac_cv_func_SHA384_Init" = xyes; then :
18120
18121 else
18122   as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18123 fi
18124
18125               ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
18126 #include <openssl/evp.h>
18127
18128 "
18129 if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
18130   ac_have_decl=1
18131 else
18132   ac_have_decl=0
18133 fi
18134
18135 cat >>confdefs.h <<_ACEOF
18136 #define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
18137 _ACEOF
18138 if test $ac_have_decl = 1; then :
18139
18140 else
18141   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18142 fi
18143 ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
18144 #include <openssl/evp.h>
18145
18146 "
18147 if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
18148   ac_have_decl=1
18149 else
18150   ac_have_decl=0
18151 fi
18152
18153 cat >>confdefs.h <<_ACEOF
18154 #define HAVE_DECL_NID_SECP384R1 $ac_have_decl
18155 _ACEOF
18156 if test $ac_have_decl = 1; then :
18157
18158 else
18159   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18160 fi
18161
18162               # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
18163               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
18164 $as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
18165               if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
18166                 if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
18167                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18168 $as_echo "no" >&6; }
18169
18170 cat >>confdefs.h <<_ACEOF
18171 #define USE_ECDSA_EVP_WORKAROUND 1
18172 _ACEOF
18173
18174                 else
18175                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18176 $as_echo "yes" >&6; }
18177                 fi
18178               else
18179                 # not OpenSSL, thus likely LibreSSL, which supports it
18180                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18181 $as_echo "yes" >&6; }
18182               fi
18183       fi
18184       # we now know we have ECDSA and the required curves.
18185
18186 cat >>confdefs.h <<_ACEOF
18187 #define USE_ECDSA 1
18188 _ACEOF
18189
18190       use_ecdsa="yes"
18191       ;;
18192 esac
18193
18194 # Check whether --enable-dsa was given.
18195 if test "${enable_dsa+set}" = set; then :
18196   enableval=$enable_dsa;
18197 fi
18198
18199 use_dsa="no"
18200 case "$enable_dsa" in
18201     no)
18202       ;;
18203     *)
18204       # detect if DSA is supported, and turn it off if not.
18205       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18206       ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
18207 if test "x$ac_cv_func_DSA_SIG_new" = xyes; then :
18208
18209       as_ac_Type=`$as_echo "ac_cv_type_DSA_SIG*" | $as_tr_sh`
18210 ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
18211 $ac_includes_default
18212 #ifdef HAVE_OPENSSL_ERR_H
18213 #include <openssl/err.h>
18214 #endif
18215
18216 #ifdef HAVE_OPENSSL_RAND_H
18217 #include <openssl/rand.h>
18218 #endif
18219
18220 #ifdef HAVE_OPENSSL_CONF_H
18221 #include <openssl/conf.h>
18222 #endif
18223
18224 #ifdef HAVE_OPENSSL_ENGINE_H
18225 #include <openssl/engine.h>
18226 #endif
18227
18228 "
18229 if eval test \"x\$"$as_ac_Type"\" = x"yes"; then :
18230
18231
18232 cat >>confdefs.h <<_ACEOF
18233 #define USE_DSA 1
18234 _ACEOF
18235
18236
18237 else
18238   if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
18239                fi
18240 fi
18241
18242
18243 else
18244   if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
18245                fi
18246 fi
18247
18248       else
18249
18250 cat >>confdefs.h <<_ACEOF
18251 #define USE_DSA 1
18252 _ACEOF
18253
18254       fi
18255       ;;
18256 esac
18257
18258 # Check whether --enable-ed25519 was given.
18259 if test "${enable_ed25519+set}" = set; then :
18260   enableval=$enable_ed25519;
18261 fi
18262
18263 use_ed25519="no"
18264 case "$enable_ed25519" in
18265     no)
18266       ;;
18267     *)
18268       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18269               ac_fn_c_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
18270 #include <openssl/evp.h>
18271
18272 "
18273 if test "x$ac_cv_have_decl_NID_ED25519" = xyes; then :
18274   ac_have_decl=1
18275 else
18276   ac_have_decl=0
18277 fi
18278
18279 cat >>confdefs.h <<_ACEOF
18280 #define HAVE_DECL_NID_ED25519 $ac_have_decl
18281 _ACEOF
18282 if test $ac_have_decl = 1; then :
18283
18284                 use_ed25519="yes"
18285
18286 else
18287    if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
18288                 fi
18289 fi
18290
18291       fi
18292       if test $USE_NETTLE = "yes"; then
18293                 for ac_header in nettle/eddsa.h
18294 do :
18295   ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
18296 "
18297 if test "x$ac_cv_header_nettle_eddsa_h" = xyes; then :
18298   cat >>confdefs.h <<_ACEOF
18299 #define HAVE_NETTLE_EDDSA_H 1
18300 _ACEOF
18301  use_ed25519="yes"
18302 fi
18303
18304 done
18305
18306       fi
18307       if test $use_ed25519 = "yes"; then
18308
18309 cat >>confdefs.h <<_ACEOF
18310 #define USE_ED25519 1
18311 _ACEOF
18312
18313       fi
18314       ;;
18315 esac
18316
18317 # Check whether --enable-event-api was given.
18318 if test "${enable_event_api+set}" = set; then :
18319   enableval=$enable_event_api;
18320 fi
18321
18322 case "$enable_event_api" in
18323     yes)
18324       UNBOUND_EVENT_INSTALL=unbound-event-install
18325
18326       UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
18327
18328       ;;
18329     *)
18330       ;;
18331 esac
18332
18333 # Check whether --enable-tfo-client was given.
18334 if test "${enable_tfo_client+set}" = set; then :
18335   enableval=$enable_tfo_client;
18336 fi
18337
18338 case "$enable_tfo_client" in
18339         yes)
18340                 case `uname` in
18341                         Linux) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
18342 #include <netinet/tcp.h>
18343
18344 "
18345 if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then :
18346   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
18347 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
18348 else
18349   as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
18350 fi
18351
18352
18353 cat >>confdefs.h <<_ACEOF
18354 #define USE_MSG_FASTOPEN 1
18355 _ACEOF
18356
18357                           ;;
18358                         Darwin) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
18359 #include <sys/socket.h>
18360
18361 "
18362 if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then :
18363   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
18364 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
18365 else
18366   as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
18367 fi
18368
18369
18370 cat >>confdefs.h <<_ACEOF
18371 #define USE_OSX_MSG_FASTOPEN 1
18372 _ACEOF
18373
18374                           ;;
18375                 esac
18376         ;;
18377         no|*)
18378                 ;;
18379 esac
18380
18381 # Check whether --enable-tfo-server was given.
18382 if test "${enable_tfo_server+set}" = set; then :
18383   enableval=$enable_tfo_server;
18384 fi
18385
18386 case "$enable_tfo_server" in
18387         yes)
18388               ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
18389 #include <netinet/tcp.h>
18390
18391 "
18392 if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then :
18393   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
18394 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
18395 else
18396   as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
18397 fi
18398
18399
18400 cat >>confdefs.h <<_ACEOF
18401 #define USE_TCP_FASTOPEN 1
18402 _ACEOF
18403
18404                 ;;
18405         no|*)
18406                 ;;
18407 esac
18408
18409 # check for libevent
18410
18411 # Check whether --with-libevent was given.
18412 if test "${with_libevent+set}" = set; then :
18413   withval=$with_libevent;
18414 else
18415    withval="no"
18416 fi
18417
18418 if test x_$withval = x_yes -o x_$withval != x_no; then
18419         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
18420 $as_echo_n "checking for libevent... " >&6; }
18421         if test x_$withval = x_ -o x_$withval = x_yes; then
18422             withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18423         fi
18424         for dir in $withval; do
18425             thedir="$dir"
18426             if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
18427                 found_libevent="yes"
18428                                 if test "$thedir" != "/usr"; then
18429                     CPPFLAGS="$CPPFLAGS -I$thedir/include"
18430                 fi
18431                 break;
18432             fi
18433         done
18434         if test x_$found_libevent != x_yes; then
18435                 if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
18436                         # libevent source directory
18437                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
18438 $as_echo "found in $thedir" >&6; }
18439                         CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
18440                         BAK_LDFLAGS_SET="1"
18441                         BAK_LDFLAGS="$LDFLAGS"
18442                         # remove evdns from linking
18443                         mkdir build >/dev/null 2>&1
18444                         mkdir build/libevent >/dev/null 2>&1
18445                         mkdir build/libevent/.libs >/dev/null 2>&1
18446                         ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
18447                         ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
18448                         ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
18449                         cp $ev_files_o build/libevent
18450                         cp $ev_files_lo build/libevent
18451                         cp $ev_files_libso build/libevent/.libs
18452                         LATE_LDFLAGS="build/libevent/*.lo -lm"
18453                         LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
18454                 else
18455                         as_fn_error $? "Cannot find the libevent library in $withval
18456 You can restart ./configure --with-libevent=no to use a builtin alternative.
18457 Please note that this alternative is not as capable as libevent when using
18458 large outgoing port ranges.  " "$LINENO" 5
18459                 fi
18460         else
18461             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
18462 $as_echo "found in $thedir" >&6; }
18463                     if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
18464                     LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
18465
18466         if test "x$enable_rpath" = xyes; then
18467                 if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
18468                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
18469                 fi
18470         fi
18471
18472             else
18473                                     if test "$thedir" != "/usr" -a "$thedir" != ""; then
18474                         LDFLAGS="$LDFLAGS -L$thedir/lib"
18475
18476         if test "x$enable_rpath" = xyes; then
18477                 if echo "$thedir/lib" | grep "^/" >/dev/null; then
18478                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
18479                 fi
18480         fi
18481
18482                     fi
18483             fi
18484         fi
18485         # check for library used by libevent after 1.3c
18486         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18487 $as_echo_n "checking for library containing clock_gettime... " >&6; }
18488 if ${ac_cv_search_clock_gettime+:} false; then :
18489   $as_echo_n "(cached) " >&6
18490 else
18491   ac_func_search_save_LIBS=$LIBS
18492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18493 /* end confdefs.h.  */
18494
18495 /* Override any GCC internal prototype to avoid an error.
18496    Use char because int might match the return type of a GCC
18497    builtin and then its argument prototype would still apply.  */
18498 #ifdef __cplusplus
18499 extern "C"
18500 #endif
18501 char clock_gettime ();
18502 int
18503 main ()
18504 {
18505 return clock_gettime ();
18506   ;
18507   return 0;
18508 }
18509 _ACEOF
18510 for ac_lib in '' rt; do
18511   if test -z "$ac_lib"; then
18512     ac_res="none required"
18513   else
18514     ac_res=-l$ac_lib
18515     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18516   fi
18517   if ac_fn_c_try_link "$LINENO"; then :
18518   ac_cv_search_clock_gettime=$ac_res
18519 fi
18520 rm -f core conftest.err conftest.$ac_objext \
18521     conftest$ac_exeext
18522   if ${ac_cv_search_clock_gettime+:} false; then :
18523   break
18524 fi
18525 done
18526 if ${ac_cv_search_clock_gettime+:} false; then :
18527
18528 else
18529   ac_cv_search_clock_gettime=no
18530 fi
18531 rm conftest.$ac_ext
18532 LIBS=$ac_func_search_save_LIBS
18533 fi
18534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18535 $as_echo "$ac_cv_search_clock_gettime" >&6; }
18536 ac_res=$ac_cv_search_clock_gettime
18537 if test "$ac_res" != no; then :
18538   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18539
18540 fi
18541
18542
18543         # is the event.h header libev or libevent?
18544         for ac_header in event.h
18545 do :
18546   ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
18547 "
18548 if test "x$ac_cv_header_event_h" = xyes; then :
18549   cat >>confdefs.h <<_ACEOF
18550 #define HAVE_EVENT_H 1
18551 _ACEOF
18552
18553 fi
18554
18555 done
18556
18557         ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
18558 #include <event.h>
18559
18560 "
18561 if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
18562
18563                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
18564 $as_echo_n "checking for library containing event_set... " >&6; }
18565 if ${ac_cv_search_event_set+:} false; then :
18566   $as_echo_n "(cached) " >&6
18567 else
18568   ac_func_search_save_LIBS=$LIBS
18569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18570 /* end confdefs.h.  */
18571
18572 /* Override any GCC internal prototype to avoid an error.
18573    Use char because int might match the return type of a GCC
18574    builtin and then its argument prototype would still apply.  */
18575 #ifdef __cplusplus
18576 extern "C"
18577 #endif
18578 char event_set ();
18579 int
18580 main ()
18581 {
18582 return event_set ();
18583   ;
18584   return 0;
18585 }
18586 _ACEOF
18587 for ac_lib in '' ev; do
18588   if test -z "$ac_lib"; then
18589     ac_res="none required"
18590   else
18591     ac_res=-l$ac_lib
18592     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18593   fi
18594   if ac_fn_c_try_link "$LINENO"; then :
18595   ac_cv_search_event_set=$ac_res
18596 fi
18597 rm -f core conftest.err conftest.$ac_objext \
18598     conftest$ac_exeext
18599   if ${ac_cv_search_event_set+:} false; then :
18600   break
18601 fi
18602 done
18603 if ${ac_cv_search_event_set+:} false; then :
18604
18605 else
18606   ac_cv_search_event_set=no
18607 fi
18608 rm conftest.$ac_ext
18609 LIBS=$ac_func_search_save_LIBS
18610 fi
18611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
18612 $as_echo "$ac_cv_search_event_set" >&6; }
18613 ac_res=$ac_cv_search_event_set
18614 if test "$ac_res" != no; then :
18615   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18616
18617 fi
18618
18619
18620 else
18621
18622                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
18623 $as_echo_n "checking for library containing event_set... " >&6; }
18624 if ${ac_cv_search_event_set+:} false; then :
18625   $as_echo_n "(cached) " >&6
18626 else
18627   ac_func_search_save_LIBS=$LIBS
18628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18629 /* end confdefs.h.  */
18630
18631 /* Override any GCC internal prototype to avoid an error.
18632    Use char because int might match the return type of a GCC
18633    builtin and then its argument prototype would still apply.  */
18634 #ifdef __cplusplus
18635 extern "C"
18636 #endif
18637 char event_set ();
18638 int
18639 main ()
18640 {
18641 return event_set ();
18642   ;
18643   return 0;
18644 }
18645 _ACEOF
18646 for ac_lib in '' event; do
18647   if test -z "$ac_lib"; then
18648     ac_res="none required"
18649   else
18650     ac_res=-l$ac_lib
18651     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18652   fi
18653   if ac_fn_c_try_link "$LINENO"; then :
18654   ac_cv_search_event_set=$ac_res
18655 fi
18656 rm -f core conftest.err conftest.$ac_objext \
18657     conftest$ac_exeext
18658   if ${ac_cv_search_event_set+:} false; then :
18659   break
18660 fi
18661 done
18662 if ${ac_cv_search_event_set+:} false; then :
18663
18664 else
18665   ac_cv_search_event_set=no
18666 fi
18667 rm conftest.$ac_ext
18668 LIBS=$ac_func_search_save_LIBS
18669 fi
18670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
18671 $as_echo "$ac_cv_search_event_set" >&6; }
18672 ac_res=$ac_cv_search_event_set
18673 if test "$ac_res" != no; then :
18674   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18675
18676 fi
18677
18678
18679 fi
18680
18681         for ac_func in event_base_free
18682 do :
18683   ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
18684 if test "x$ac_cv_func_event_base_free" = xyes; then :
18685   cat >>confdefs.h <<_ACEOF
18686 #define HAVE_EVENT_BASE_FREE 1
18687 _ACEOF
18688
18689 fi
18690 done
18691  # only in libevent 1.2 and later
18692         for ac_func in event_base_once
18693 do :
18694   ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
18695 if test "x$ac_cv_func_event_base_once" = xyes; then :
18696   cat >>confdefs.h <<_ACEOF
18697 #define HAVE_EVENT_BASE_ONCE 1
18698 _ACEOF
18699
18700 fi
18701 done
18702  # only in libevent 1.4.1 and later
18703         for ac_func in event_base_new
18704 do :
18705   ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
18706 if test "x$ac_cv_func_event_base_new" = xyes; then :
18707   cat >>confdefs.h <<_ACEOF
18708 #define HAVE_EVENT_BASE_NEW 1
18709 _ACEOF
18710
18711 fi
18712 done
18713  # only in libevent 1.4.1 and later
18714         for ac_func in event_base_get_method
18715 do :
18716   ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
18717 if test "x$ac_cv_func_event_base_get_method" = xyes; then :
18718   cat >>confdefs.h <<_ACEOF
18719 #define HAVE_EVENT_BASE_GET_METHOD 1
18720 _ACEOF
18721
18722 fi
18723 done
18724  # only in libevent 1.4.3 and later
18725         for ac_func in ev_loop
18726 do :
18727   ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
18728 if test "x$ac_cv_func_ev_loop" = xyes; then :
18729   cat >>confdefs.h <<_ACEOF
18730 #define HAVE_EV_LOOP 1
18731 _ACEOF
18732
18733 fi
18734 done
18735  # only in libev. (tested on 3.51)
18736         for ac_func in ev_default_loop
18737 do :
18738   ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
18739 if test "x$ac_cv_func_ev_default_loop" = xyes; then :
18740   cat >>confdefs.h <<_ACEOF
18741 #define HAVE_EV_DEFAULT_LOOP 1
18742 _ACEOF
18743
18744 fi
18745 done
18746  # only in libev. (tested on 4.00)
18747         PC_LIBEVENT_DEPENDENCY="libevent"
18748
18749         if test -n "$BAK_LDFLAGS_SET"; then
18750                 LDFLAGS="$BAK_LDFLAGS"
18751         fi
18752 else
18753
18754 $as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
18755
18756 fi
18757
18758 # check for libexpat
18759
18760 # Check whether --with-libexpat was given.
18761 if test "${with_libexpat+set}" = set; then :
18762   withval=$with_libexpat;
18763 else
18764    withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18765 fi
18766
18767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
18768 $as_echo_n "checking for libexpat... " >&6; }
18769 found_libexpat="no"
18770 for dir in $withval ; do
18771             if test -f "$dir/include/expat.h"; then
18772                 found_libexpat="yes"
18773                                 if test "$dir" != "/usr"; then
18774                     CPPFLAGS="$CPPFLAGS -I$dir/include"
18775                     LDFLAGS="$LDFLAGS -L$dir/lib"
18776                 fi
18777                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
18778 $as_echo "found in $dir" >&6; }
18779                 break;
18780             fi
18781 done
18782 if test x_$found_libexpat != x_yes; then
18783         as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
18784 fi
18785 for ac_header in expat.h
18786 do :
18787   ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
18788 "
18789 if test "x$ac_cv_header_expat_h" = xyes; then :
18790   cat >>confdefs.h <<_ACEOF
18791 #define HAVE_EXPAT_H 1
18792 _ACEOF
18793
18794 fi
18795
18796 done
18797
18798 ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
18799 #include <expat.h>
18800
18801 "
18802 if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then :
18803   ac_have_decl=1
18804 else
18805   ac_have_decl=0
18806 fi
18807
18808 cat >>confdefs.h <<_ACEOF
18809 #define HAVE_DECL_XML_STOPPARSER $ac_have_decl
18810 _ACEOF
18811
18812
18813 # set static linking if requested
18814
18815 staticexe=""
18816 # Check whether --enable-static-exe was given.
18817 if test "${enable_static_exe+set}" = set; then :
18818   enableval=$enable_static_exe;
18819 fi
18820
18821 if test x_$enable_static_exe = x_yes; then
18822         staticexe="-static"
18823         if test "$on_mingw" = yes; then
18824                 staticexe="-all-static"
18825                 # for static compile, include gdi32 and zlib here.
18826                 if echo $LIBS | grep 'lgdi32' >/dev/null; then
18827                         :
18828                 else
18829                         LIBS="$LIBS -lgdi32"
18830                 fi
18831                 LIBS="$LIBS -lz"
18832         fi
18833 fi
18834
18835 # Include systemd.m4 - begin
18836 #   macros for configuring systemd
18837 #   Copyright 2015, Sami Kerola, CloudFlare.
18838 #   BSD licensed.
18839 # Check whether --enable-systemd was given.
18840 if test "${enable_systemd+set}" = set; then :
18841   enableval=$enable_systemd;
18842 else
18843   enable_systemd=no
18844 fi
18845
18846 have_systemd=no
18847
18848
18849
18850
18851
18852
18853
18854 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
18855         if test -n "$ac_tool_prefix"; then
18856   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
18857 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
18858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18859 $as_echo_n "checking for $ac_word... " >&6; }
18860 if ${ac_cv_path_PKG_CONFIG+:} false; then :
18861   $as_echo_n "(cached) " >&6
18862 else
18863   case $PKG_CONFIG in
18864   [\\/]* | ?:[\\/]*)
18865   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
18866   ;;
18867   *)
18868   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18869 for as_dir in $PATH
18870 do
18871   IFS=$as_save_IFS
18872   test -z "$as_dir" && as_dir=.
18873     for ac_exec_ext in '' $ac_executable_extensions; do
18874   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18875     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18876     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18877     break 2
18878   fi
18879 done
18880   done
18881 IFS=$as_save_IFS
18882
18883   ;;
18884 esac
18885 fi
18886 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
18887 if test -n "$PKG_CONFIG"; then
18888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
18889 $as_echo "$PKG_CONFIG" >&6; }
18890 else
18891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18892 $as_echo "no" >&6; }
18893 fi
18894
18895
18896 fi
18897 if test -z "$ac_cv_path_PKG_CONFIG"; then
18898   ac_pt_PKG_CONFIG=$PKG_CONFIG
18899   # Extract the first word of "pkg-config", so it can be a program name with args.
18900 set dummy pkg-config; ac_word=$2
18901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18902 $as_echo_n "checking for $ac_word... " >&6; }
18903 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
18904   $as_echo_n "(cached) " >&6
18905 else
18906   case $ac_pt_PKG_CONFIG in
18907   [\\/]* | ?:[\\/]*)
18908   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
18909   ;;
18910   *)
18911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18912 for as_dir in $PATH
18913 do
18914   IFS=$as_save_IFS
18915   test -z "$as_dir" && as_dir=.
18916     for ac_exec_ext in '' $ac_executable_extensions; do
18917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18918     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18920     break 2
18921   fi
18922 done
18923   done
18924 IFS=$as_save_IFS
18925
18926   ;;
18927 esac
18928 fi
18929 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
18930 if test -n "$ac_pt_PKG_CONFIG"; then
18931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
18932 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
18933 else
18934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18935 $as_echo "no" >&6; }
18936 fi
18937
18938   if test "x$ac_pt_PKG_CONFIG" = x; then
18939     PKG_CONFIG=""
18940   else
18941     case $cross_compiling:$ac_tool_warned in
18942 yes:)
18943 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18944 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18945 ac_tool_warned=yes ;;
18946 esac
18947     PKG_CONFIG=$ac_pt_PKG_CONFIG
18948   fi
18949 else
18950   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
18951 fi
18952
18953 fi
18954 if test -n "$PKG_CONFIG"; then
18955         _pkg_min_version=0.9.0
18956         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
18957 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
18958         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
18959                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18960 $as_echo "yes" >&6; }
18961         else
18962                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18963 $as_echo "no" >&6; }
18964                 PKG_CONFIG=""
18965         fi
18966 fi
18967 if test "x$enable_systemd" != xno; then :
18968
18969
18970
18971 pkg_failed=no
18972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
18973 $as_echo_n "checking for SYSTEMD... " >&6; }
18974
18975 if test -n "$SYSTEMD_CFLAGS"; then
18976     pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
18977  elif test -n "$PKG_CONFIG"; then
18978     if test -n "$PKG_CONFIG" && \
18979     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
18980   ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
18981   ac_status=$?
18982   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18983   test $ac_status = 0; }; then
18984   pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
18985                       test "x$?" != "x0" && pkg_failed=yes
18986 else
18987   pkg_failed=yes
18988 fi
18989  else
18990     pkg_failed=untried
18991 fi
18992 if test -n "$SYSTEMD_LIBS"; then
18993     pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
18994  elif test -n "$PKG_CONFIG"; then
18995     if test -n "$PKG_CONFIG" && \
18996     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
18997   ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
18998   ac_status=$?
18999   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19000   test $ac_status = 0; }; then
19001   pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
19002                       test "x$?" != "x0" && pkg_failed=yes
19003 else
19004   pkg_failed=yes
19005 fi
19006  else
19007     pkg_failed=untried
19008 fi
19009
19010
19011
19012 if test $pkg_failed = yes; then
19013         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19014 $as_echo "no" >&6; }
19015
19016 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
19017         _pkg_short_errors_supported=yes
19018 else
19019         _pkg_short_errors_supported=no
19020 fi
19021         if test $_pkg_short_errors_supported = yes; then
19022                 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
19023         else
19024                 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
19025         fi
19026         # Put the nasty error message in config.log where it belongs
19027         echo "$SYSTEMD_PKG_ERRORS" >&5
19028
19029         have_systemd=no
19030 elif test $pkg_failed = untried; then
19031         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19032 $as_echo "no" >&6; }
19033         have_systemd=no
19034 else
19035         SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
19036         SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
19037         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19038 $as_echo "yes" >&6; }
19039         have_systemd=yes
19040 fi
19041                 if test "x$have_systemd" != "xyes"; then :
19042
19043
19044 pkg_failed=no
19045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
19046 $as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
19047
19048 if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
19049     pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
19050  elif test -n "$PKG_CONFIG"; then
19051     if test -n "$PKG_CONFIG" && \
19052     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
19053   ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
19054   ac_status=$?
19055   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19056   test $ac_status = 0; }; then
19057   pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
19058                       test "x$?" != "x0" && pkg_failed=yes
19059 else
19060   pkg_failed=yes
19061 fi
19062  else
19063     pkg_failed=untried
19064 fi
19065 if test -n "$SYSTEMD_DAEMON_LIBS"; then
19066     pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
19067  elif test -n "$PKG_CONFIG"; then
19068     if test -n "$PKG_CONFIG" && \
19069     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
19070   ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
19071   ac_status=$?
19072   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19073   test $ac_status = 0; }; then
19074   pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
19075                       test "x$?" != "x0" && pkg_failed=yes
19076 else
19077   pkg_failed=yes
19078 fi
19079  else
19080     pkg_failed=untried
19081 fi
19082
19083
19084
19085 if test $pkg_failed = yes; then
19086         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19087 $as_echo "no" >&6; }
19088
19089 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
19090         _pkg_short_errors_supported=yes
19091 else
19092         _pkg_short_errors_supported=no
19093 fi
19094         if test $_pkg_short_errors_supported = yes; then
19095                 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
19096         else
19097                 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
19098         fi
19099         # Put the nasty error message in config.log where it belongs
19100         echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
19101
19102         have_systemd_daemon=no
19103 elif test $pkg_failed = untried; then
19104         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19105 $as_echo "no" >&6; }
19106         have_systemd_daemon=no
19107 else
19108         SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
19109         SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
19110         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19111 $as_echo "yes" >&6; }
19112         have_systemd_daemon=yes
19113 fi
19114                 if test "x$have_systemd_daemon" = "xyes"; then :
19115   have_systemd=yes
19116 fi
19117
19118 fi
19119         case $enable_systemd:$have_systemd in #(
19120   yes:no) :
19121     as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
19122   *:yes) :
19123
19124 $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
19125
19126                 LIBS="$LIBS $SYSTEMD_LIBS"
19127
19128          ;; #(
19129   *) :
19130      ;;
19131 esac
19132
19133
19134 fi
19135  if test "x$have_systemd" = xyes; then
19136   USE_SYSTEMD_TRUE=
19137   USE_SYSTEMD_FALSE='#'
19138 else
19139   USE_SYSTEMD_TRUE='#'
19140   USE_SYSTEMD_FALSE=
19141 fi
19142
19143
19144 # Include systemd.m4 - end
19145
19146 # set lock checking if requested
19147 # Check whether --enable-lock_checks was given.
19148 if test "${enable_lock_checks+set}" = set; then :
19149   enableval=$enable_lock_checks;
19150 fi
19151
19152 if test x_$enable_lock_checks = x_yes; then
19153
19154 $as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
19155
19156         CHECKLOCK_OBJ="checklocks.lo"
19157
19158 fi
19159
19160
19161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
19162 $as_echo_n "checking for getaddrinfo... " >&6; }
19163 ac_cv_func_getaddrinfo=no
19164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19165 /* end confdefs.h.  */
19166
19167 #ifdef __cplusplus
19168 extern "C"
19169 {
19170 #endif
19171 char* getaddrinfo();
19172 char* (*f) () = getaddrinfo;
19173 #ifdef __cplusplus
19174 }
19175 #endif
19176 int main() {
19177         ;
19178         return 0;
19179 }
19180
19181 _ACEOF
19182 if ac_fn_c_try_link "$LINENO"; then :
19183   ac_cv_func_getaddrinfo="yes"
19184 if test "$ac_cv_header_windows_h" = "yes"; then
19185
19186 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
19187
19188         USE_WINSOCK="1"
19189         if echo $LIBS | grep 'lws2_32' >/dev/null; then
19190                 :
19191         else
19192                 LIBS="$LIBS -lws2_32"
19193         fi
19194 fi
19195
19196 else
19197   ORIGLIBS="$LIBS"
19198 LIBS="$LIBS -lws2_32"
19199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19200 /* end confdefs.h.  */
19201
19202 #ifdef HAVE_WS2TCPIP_H
19203 #include <ws2tcpip.h>
19204 #endif
19205
19206 int
19207 main ()
19208 {
19209
19210         (void)getaddrinfo(NULL, NULL, NULL, NULL);
19211
19212
19213   ;
19214   return 0;
19215 }
19216 _ACEOF
19217 if ac_fn_c_try_link "$LINENO"; then :
19218
19219 ac_cv_func_getaddrinfo="yes"
19220
19221 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
19222
19223 USE_WINSOCK="1"
19224
19225 else
19226
19227 ac_cv_func_getaddrinfo="no"
19228 LIBS="$ORIGLIBS"
19229
19230 fi
19231 rm -f core conftest.err conftest.$ac_objext \
19232     conftest$ac_exeext conftest.$ac_ext
19233
19234 fi
19235 rm -f core conftest.err conftest.$ac_objext \
19236     conftest$ac_exeext conftest.$ac_ext
19237
19238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
19239 $as_echo "$ac_cv_func_getaddrinfo" >&6; }
19240 if test $ac_cv_func_getaddrinfo = yes; then
19241
19242 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
19243
19244 fi
19245
19246 if test "$USE_WINSOCK" = 1; then
19247
19248 $as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
19249
19250         for ac_header in iphlpapi.h
19251 do :
19252   ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
19253 #include <windows.h>
19254
19255 "
19256 if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
19257   cat >>confdefs.h <<_ACEOF
19258 #define HAVE_IPHLPAPI_H 1
19259 _ACEOF
19260
19261 fi
19262
19263 done
19264
19265         if test -n "$ac_tool_prefix"; then
19266   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
19267 set dummy ${ac_tool_prefix}windres; ac_word=$2
19268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19269 $as_echo_n "checking for $ac_word... " >&6; }
19270 if ${ac_cv_prog_WINDRES+:} false; then :
19271   $as_echo_n "(cached) " >&6
19272 else
19273   if test -n "$WINDRES"; then
19274   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
19275 else
19276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19277 for as_dir in $PATH
19278 do
19279   IFS=$as_save_IFS
19280   test -z "$as_dir" && as_dir=.
19281     for ac_exec_ext in '' $ac_executable_extensions; do
19282   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19283     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
19284     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19285     break 2
19286   fi
19287 done
19288   done
19289 IFS=$as_save_IFS
19290
19291 fi
19292 fi
19293 WINDRES=$ac_cv_prog_WINDRES
19294 if test -n "$WINDRES"; then
19295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
19296 $as_echo "$WINDRES" >&6; }
19297 else
19298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19299 $as_echo "no" >&6; }
19300 fi
19301
19302
19303 fi
19304 if test -z "$ac_cv_prog_WINDRES"; then
19305   ac_ct_WINDRES=$WINDRES
19306   # Extract the first word of "windres", so it can be a program name with args.
19307 set dummy windres; ac_word=$2
19308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19309 $as_echo_n "checking for $ac_word... " >&6; }
19310 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
19311   $as_echo_n "(cached) " >&6
19312 else
19313   if test -n "$ac_ct_WINDRES"; then
19314   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
19315 else
19316 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19317 for as_dir in $PATH
19318 do
19319   IFS=$as_save_IFS
19320   test -z "$as_dir" && as_dir=.
19321     for ac_exec_ext in '' $ac_executable_extensions; do
19322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19323     ac_cv_prog_ac_ct_WINDRES="windres"
19324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19325     break 2
19326   fi
19327 done
19328   done
19329 IFS=$as_save_IFS
19330
19331 fi
19332 fi
19333 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
19334 if test -n "$ac_ct_WINDRES"; then
19335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
19336 $as_echo "$ac_ct_WINDRES" >&6; }
19337 else
19338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19339 $as_echo "no" >&6; }
19340 fi
19341
19342   if test "x$ac_ct_WINDRES" = x; then
19343     WINDRES=""
19344   else
19345     case $cross_compiling:$ac_tool_warned in
19346 yes:)
19347 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19348 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19349 ac_tool_warned=yes ;;
19350 esac
19351     WINDRES=$ac_ct_WINDRES
19352   fi
19353 else
19354   WINDRES="$ac_cv_prog_WINDRES"
19355 fi
19356
19357         LIBS="$LIBS -liphlpapi"
19358         WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
19359
19360         WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
19361
19362         WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
19363
19364         WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
19365
19366         WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
19367
19368         WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
19369
19370         WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
19371
19372         WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
19373
19374 fi
19375 if test $ac_cv_func_getaddrinfo = no; then
19376         case " $LIBOBJS " in
19377   *" fake-rfc2553.$ac_objext "* ) ;;
19378   *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
19379  ;;
19380 esac
19381
19382 fi
19383 # check after getaddrinfo for its libraries
19384
19385 # check ioctlsocket
19386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
19387 $as_echo_n "checking for ioctlsocket... " >&6; }
19388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19389 /* end confdefs.h.  */
19390
19391 #ifdef HAVE_WINSOCK2_H
19392 #include <winsock2.h>
19393 #endif
19394
19395 int
19396 main ()
19397 {
19398
19399         (void)ioctlsocket(0, 0, NULL);
19400
19401   ;
19402   return 0;
19403 }
19404 _ACEOF
19405 if ac_fn_c_try_link "$LINENO"; then :
19406
19407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19408 $as_echo "yes" >&6; }
19409
19410 $as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
19411
19412
19413 else
19414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19415 $as_echo "no" >&6; }
19416 fi
19417 rm -f core conftest.err conftest.$ac_objext \
19418     conftest$ac_exeext conftest.$ac_ext
19419
19420
19421 # see if daemon(3) exists, and if it is deprecated.
19422 for ac_func in daemon
19423 do :
19424   ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
19425 if test "x$ac_cv_func_daemon" = xyes; then :
19426   cat >>confdefs.h <<_ACEOF
19427 #define HAVE_DAEMON 1
19428 _ACEOF
19429
19430 fi
19431 done
19432
19433 if test $ac_cv_func_daemon = yes; then
19434
19435
19436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
19437 $as_echo_n "checking if daemon is deprecated... " >&6; }
19438 cache=`echo daemon | sed 'y%.=/+-%___p_%'`
19439 if eval \${cv_cc_deprecated_$cache+:} false; then :
19440   $as_echo_n "(cached) " >&6
19441 else
19442
19443 echo '
19444 #include <stdlib.h>
19445 ' >conftest.c
19446 echo 'void f(){ (void)daemon(0, 0); }' >>conftest.c
19447 if test -z "`$CC -c conftest.c 2>&1 | grep deprecated`"; then
19448 eval "cv_cc_deprecated_$cache=no"
19449 else
19450 eval "cv_cc_deprecated_$cache=yes"
19451 fi
19452 rm -f conftest conftest.o conftest.c
19453
19454 fi
19455
19456 if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
19457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19458 $as_echo "yes" >&6; }
19459
19460 cat >>confdefs.h <<_ACEOF
19461 #define DEPRECATED_DAEMON 1
19462 _ACEOF
19463
19464 :
19465
19466 else
19467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19468 $as_echo "no" >&6; }
19469 :
19470
19471 fi
19472
19473 fi
19474
19475 ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
19476 $ac_includes_default
19477 #ifdef HAVE_SYS_UN_H
19478 #include <sys/un.h>
19479 #endif
19480
19481 "
19482 if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
19483
19484 cat >>confdefs.h <<_ACEOF
19485 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
19486 _ACEOF
19487
19488
19489 fi
19490
19491 ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
19492 $ac_includes_default
19493 #if HAVE_SYS_PARAM_H
19494 #include <sys/param.h>
19495 #endif
19496
19497 #ifdef HAVE_SYS_SOCKET_H
19498 #include <sys/socket.h>
19499 #endif
19500
19501 #ifdef HAVE_SYS_UIO_H
19502 #include <sys/uio.h>
19503 #endif
19504
19505 #ifdef HAVE_NETINET_IN_H
19506 #include <netinet/in.h>
19507 #endif
19508
19509 #ifdef HAVE_NETINET_TCP_H
19510 #include <netinet/tcp.h>
19511 #endif
19512
19513 #ifdef HAVE_ARPA_INET_H
19514 #include <arpa/inet.h>
19515 #endif
19516
19517 #ifdef HAVE_WINSOCK2_H
19518 #include <winsock2.h>
19519 #endif
19520
19521 #ifdef HAVE_WS2TCPIP_H
19522 #include <ws2tcpip.h>
19523 #endif
19524
19525 "
19526 if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
19527
19528 cat >>confdefs.h <<_ACEOF
19529 #define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
19530 _ACEOF
19531
19532
19533 fi
19534
19535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
19536 $as_echo_n "checking for library containing setusercontext... " >&6; }
19537 if ${ac_cv_search_setusercontext+:} false; then :
19538   $as_echo_n "(cached) " >&6
19539 else
19540   ac_func_search_save_LIBS=$LIBS
19541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19542 /* end confdefs.h.  */
19543
19544 /* Override any GCC internal prototype to avoid an error.
19545    Use char because int might match the return type of a GCC
19546    builtin and then its argument prototype would still apply.  */
19547 #ifdef __cplusplus
19548 extern "C"
19549 #endif
19550 char setusercontext ();
19551 int
19552 main ()
19553 {
19554 return setusercontext ();
19555   ;
19556   return 0;
19557 }
19558 _ACEOF
19559 for ac_lib in '' util; do
19560   if test -z "$ac_lib"; then
19561     ac_res="none required"
19562   else
19563     ac_res=-l$ac_lib
19564     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19565   fi
19566   if ac_fn_c_try_link "$LINENO"; then :
19567   ac_cv_search_setusercontext=$ac_res
19568 fi
19569 rm -f core conftest.err conftest.$ac_objext \
19570     conftest$ac_exeext
19571   if ${ac_cv_search_setusercontext+:} false; then :
19572   break
19573 fi
19574 done
19575 if ${ac_cv_search_setusercontext+:} false; then :
19576
19577 else
19578   ac_cv_search_setusercontext=no
19579 fi
19580 rm conftest.$ac_ext
19581 LIBS=$ac_func_search_save_LIBS
19582 fi
19583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
19584 $as_echo "$ac_cv_search_setusercontext" >&6; }
19585 ac_res=$ac_cv_search_setusercontext
19586 if test "$ac_res" != no; then :
19587   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19588
19589 fi
19590
19591 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
19592 do :
19593   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19594 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19595 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19596   cat >>confdefs.h <<_ACEOF
19597 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19598 _ACEOF
19599
19600 fi
19601 done
19602
19603 for ac_func in setresuid
19604 do :
19605   ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
19606 if test "x$ac_cv_func_setresuid" = xyes; then :
19607   cat >>confdefs.h <<_ACEOF
19608 #define HAVE_SETRESUID 1
19609 _ACEOF
19610
19611 else
19612   for ac_func in setreuid
19613 do :
19614   ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
19615 if test "x$ac_cv_func_setreuid" = xyes; then :
19616   cat >>confdefs.h <<_ACEOF
19617 #define HAVE_SETREUID 1
19618 _ACEOF
19619
19620 fi
19621 done
19622
19623 fi
19624 done
19625
19626 for ac_func in setresgid
19627 do :
19628   ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
19629 if test "x$ac_cv_func_setresgid" = xyes; then :
19630   cat >>confdefs.h <<_ACEOF
19631 #define HAVE_SETRESGID 1
19632 _ACEOF
19633
19634 else
19635   for ac_func in setregid
19636 do :
19637   ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
19638 if test "x$ac_cv_func_setregid" = xyes; then :
19639   cat >>confdefs.h <<_ACEOF
19640 #define HAVE_SETREGID 1
19641 _ACEOF
19642
19643 fi
19644 done
19645
19646 fi
19647 done
19648
19649
19650 # check if setreuid en setregid fail, on MacOSX10.4(darwin8).
19651 if echo $build_os | grep darwin8 > /dev/null; then
19652
19653 $as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
19654
19655 fi
19656 ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
19657 $ac_includes_default
19658 #ifdef HAVE_NETINET_IN_H
19659 #include <netinet/in.h>
19660 #endif
19661
19662 #ifdef HAVE_NETINET_TCP_H
19663 #include <netinet/tcp.h>
19664 #endif
19665
19666 #ifdef HAVE_ARPA_INET_H
19667 #include <arpa/inet.h>
19668 #endif
19669
19670 #ifdef HAVE_WINSOCK2_H
19671 #include <winsock2.h>
19672 #endif
19673
19674 #ifdef HAVE_WS2TCPIP_H
19675 #include <ws2tcpip.h>
19676 #endif
19677
19678 "
19679 if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
19680   ac_have_decl=1
19681 else
19682   ac_have_decl=0
19683 fi
19684
19685 cat >>confdefs.h <<_ACEOF
19686 #define HAVE_DECL_INET_PTON $ac_have_decl
19687 _ACEOF
19688 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
19689 $ac_includes_default
19690 #ifdef HAVE_NETINET_IN_H
19691 #include <netinet/in.h>
19692 #endif
19693
19694 #ifdef HAVE_NETINET_TCP_H
19695 #include <netinet/tcp.h>
19696 #endif
19697
19698 #ifdef HAVE_ARPA_INET_H
19699 #include <arpa/inet.h>
19700 #endif
19701
19702 #ifdef HAVE_WINSOCK2_H
19703 #include <winsock2.h>
19704 #endif
19705
19706 #ifdef HAVE_WS2TCPIP_H
19707 #include <ws2tcpip.h>
19708 #endif
19709
19710 "
19711 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
19712   ac_have_decl=1
19713 else
19714   ac_have_decl=0
19715 fi
19716
19717 cat >>confdefs.h <<_ACEOF
19718 #define HAVE_DECL_INET_NTOP $ac_have_decl
19719 _ACEOF
19720
19721 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
19722 if test "x$ac_cv_func_inet_aton" = xyes; then :
19723   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
19724
19725 else
19726   case " $LIBOBJS " in
19727   *" inet_aton.$ac_objext "* ) ;;
19728   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
19729  ;;
19730 esac
19731
19732 fi
19733
19734
19735 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
19736 if test "x$ac_cv_func_inet_pton" = xyes; then :
19737   $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
19738
19739 else
19740   case " $LIBOBJS " in
19741   *" inet_pton.$ac_objext "* ) ;;
19742   *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
19743  ;;
19744 esac
19745
19746 fi
19747
19748
19749 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
19750 if test "x$ac_cv_func_inet_ntop" = xyes; then :
19751   $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
19752
19753 else
19754   case " $LIBOBJS " in
19755   *" inet_ntop.$ac_objext "* ) ;;
19756   *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
19757  ;;
19758 esac
19759
19760 fi
19761
19762
19763 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
19764 if test "x$ac_cv_func_snprintf" = xyes; then :
19765   $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
19766
19767 else
19768   case " $LIBOBJS " in
19769   *" snprintf.$ac_objext "* ) ;;
19770   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
19771  ;;
19772 esac
19773
19774 fi
19775
19776
19777 # test if snprintf return the proper length
19778 if test "x$ac_cv_func_snprintf" = xyes; then
19779     if test c${cross_compiling} = cno; then
19780         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
19781 $as_echo_n "checking for correct snprintf return value... " >&6; }
19782         if test "$cross_compiling" = yes; then :
19783   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19784 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19785 as_fn_error $? "cannot run test program while cross compiling
19786 See \`config.log' for more details" "$LINENO" 5; }
19787 else
19788   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19789 /* end confdefs.h.  */
19790 $ac_includes_default
19791
19792 int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
19793
19794 _ACEOF
19795 if ac_fn_c_try_run "$LINENO"; then :
19796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19797 $as_echo "yes" >&6; }
19798 else
19799
19800                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19801 $as_echo "no" >&6; }
19802
19803 $as_echo "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
19804
19805                 case " $LIBOBJS " in
19806   *" snprintf.$ac_objext "* ) ;;
19807   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
19808  ;;
19809 esac
19810
19811
19812 fi
19813 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19814   conftest.$ac_objext conftest.beam conftest.$ac_ext
19815 fi
19816
19817     fi
19818 fi
19819 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
19820 if test "x$ac_cv_func_strlcat" = xyes; then :
19821   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
19822
19823 else
19824   case " $LIBOBJS " in
19825   *" strlcat.$ac_objext "* ) ;;
19826   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
19827  ;;
19828 esac
19829
19830 fi
19831
19832
19833 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
19834 if test "x$ac_cv_func_strlcpy" = xyes; then :
19835   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
19836
19837 else
19838   case " $LIBOBJS " in
19839   *" strlcpy.$ac_objext "* ) ;;
19840   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
19841  ;;
19842 esac
19843
19844 fi
19845
19846
19847 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
19848 if test "x$ac_cv_func_memmove" = xyes; then :
19849   $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
19850
19851 else
19852   case " $LIBOBJS " in
19853   *" memmove.$ac_objext "* ) ;;
19854   *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
19855  ;;
19856 esac
19857
19858 fi
19859
19860
19861 ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
19862 if test "x$ac_cv_func_gmtime_r" = xyes; then :
19863   $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
19864
19865 else
19866   case " $LIBOBJS " in
19867   *" gmtime_r.$ac_objext "* ) ;;
19868   *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
19869  ;;
19870 esac
19871
19872 fi
19873
19874
19875 ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
19876 if test "x$ac_cv_func_isblank" = xyes; then :
19877   $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
19878
19879 else
19880   case " $LIBOBJS " in
19881   *" isblank.$ac_objext "* ) ;;
19882   *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
19883  ;;
19884 esac
19885
19886 fi
19887
19888
19889 LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
19890
19891 ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
19892 if test "x$ac_cv_func_reallocarray" = xyes; then :
19893   $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
19894
19895 else
19896   case " $LIBOBJS " in
19897   *" reallocarray.$ac_objext "* ) ;;
19898   *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
19899  ;;
19900 esac
19901
19902 fi
19903
19904
19905 if test "$USE_NSS" = "no"; then
19906         ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
19907 if test "x$ac_cv_func_arc4random" = xyes; then :
19908   $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
19909
19910 else
19911   case " $LIBOBJS " in
19912   *" arc4random.$ac_objext "* ) ;;
19913   *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
19914  ;;
19915 esac
19916
19917 fi
19918
19919
19920         ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
19921 if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
19922   $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
19923
19924 else
19925   case " $LIBOBJS " in
19926   *" arc4random_uniform.$ac_objext "* ) ;;
19927   *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
19928  ;;
19929 esac
19930
19931 fi
19932
19933
19934         if test "$ac_cv_func_arc4random" = "no"; then
19935                 case " $LIBOBJS " in
19936   *" explicit_bzero.$ac_objext "* ) ;;
19937   *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
19938  ;;
19939 esac
19940
19941                 case " $LIBOBJS " in
19942   *" arc4_lock.$ac_objext "* ) ;;
19943   *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
19944  ;;
19945 esac
19946
19947                 for ac_func in getentropy
19948 do :
19949   ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
19950 if test "x$ac_cv_func_getentropy" = xyes; then :
19951   cat >>confdefs.h <<_ACEOF
19952 #define HAVE_GETENTROPY 1
19953 _ACEOF
19954
19955 else
19956
19957                     if test "$USE_WINSOCK" = 1; then
19958                         case " $LIBOBJS " in
19959   *" getentropy_win.$ac_objext "* ) ;;
19960   *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
19961  ;;
19962 esac
19963
19964                     else
19965                         case "$host" in
19966                         Darwin|*darwin*)
19967                                 case " $LIBOBJS " in
19968   *" getentropy_osx.$ac_objext "* ) ;;
19969   *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
19970  ;;
19971 esac
19972
19973                         ;;
19974                         *solaris*|*sunos*|SunOS)
19975                                 case " $LIBOBJS " in
19976   *" getentropy_solaris.$ac_objext "* ) ;;
19977   *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
19978  ;;
19979 esac
19980
19981                                 for ac_header in sys/sha2.h
19982 do :
19983   ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
19984 "
19985 if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
19986   cat >>confdefs.h <<_ACEOF
19987 #define HAVE_SYS_SHA2_H 1
19988 _ACEOF
19989
19990 else
19991
19992                                         for ac_func in SHA512_Update
19993 do :
19994   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
19995 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
19996   cat >>confdefs.h <<_ACEOF
19997 #define HAVE_SHA512_UPDATE 1
19998 _ACEOF
19999
20000 else
20001
20002                                                 case " $LIBOBJS " in
20003   *" sha512.$ac_objext "* ) ;;
20004   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20005  ;;
20006 esac
20007
20008
20009 fi
20010 done
20011
20012
20013 fi
20014
20015 done
20016
20017                                 if test "$ac_cv_header_sys_sha2_h" = "yes"; then
20018                                         # this lib needed for sha2 on solaris
20019                                         LIBS="$LIBS -lmd"
20020                                 fi
20021                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20022 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20023 if ${ac_cv_search_clock_gettime+:} false; then :
20024   $as_echo_n "(cached) " >&6
20025 else
20026   ac_func_search_save_LIBS=$LIBS
20027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20028 /* end confdefs.h.  */
20029
20030 /* Override any GCC internal prototype to avoid an error.
20031    Use char because int might match the return type of a GCC
20032    builtin and then its argument prototype would still apply.  */
20033 #ifdef __cplusplus
20034 extern "C"
20035 #endif
20036 char clock_gettime ();
20037 int
20038 main ()
20039 {
20040 return clock_gettime ();
20041   ;
20042   return 0;
20043 }
20044 _ACEOF
20045 for ac_lib in '' rt; do
20046   if test -z "$ac_lib"; then
20047     ac_res="none required"
20048   else
20049     ac_res=-l$ac_lib
20050     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20051   fi
20052   if ac_fn_c_try_link "$LINENO"; then :
20053   ac_cv_search_clock_gettime=$ac_res
20054 fi
20055 rm -f core conftest.err conftest.$ac_objext \
20056     conftest$ac_exeext
20057   if ${ac_cv_search_clock_gettime+:} false; then :
20058   break
20059 fi
20060 done
20061 if ${ac_cv_search_clock_gettime+:} false; then :
20062
20063 else
20064   ac_cv_search_clock_gettime=no
20065 fi
20066 rm conftest.$ac_ext
20067 LIBS=$ac_func_search_save_LIBS
20068 fi
20069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20070 $as_echo "$ac_cv_search_clock_gettime" >&6; }
20071 ac_res=$ac_cv_search_clock_gettime
20072 if test "$ac_res" != no; then :
20073   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20074
20075 fi
20076
20077                         ;;
20078                         *linux*|Linux|*)
20079                                 case " $LIBOBJS " in
20080   *" getentropy_linux.$ac_objext "* ) ;;
20081   *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
20082  ;;
20083 esac
20084
20085                                 for ac_func in SHA512_Update
20086 do :
20087   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20088 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20089   cat >>confdefs.h <<_ACEOF
20090 #define HAVE_SHA512_UPDATE 1
20091 _ACEOF
20092
20093 else
20094
20095
20096 $as_echo "#define COMPAT_SHA512 1" >>confdefs.h
20097
20098                                         case " $LIBOBJS " in
20099   *" sha512.$ac_objext "* ) ;;
20100   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20101  ;;
20102 esac
20103
20104
20105 fi
20106 done
20107
20108                                 for ac_header in sys/sysctl.h
20109 do :
20110   ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
20111 "
20112 if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
20113   cat >>confdefs.h <<_ACEOF
20114 #define HAVE_SYS_SYSCTL_H 1
20115 _ACEOF
20116
20117 fi
20118
20119 done
20120
20121                                 for ac_func in getauxval
20122 do :
20123   ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
20124 if test "x$ac_cv_func_getauxval" = xyes; then :
20125   cat >>confdefs.h <<_ACEOF
20126 #define HAVE_GETAUXVAL 1
20127 _ACEOF
20128
20129 fi
20130 done
20131
20132                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20133 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20134 if ${ac_cv_search_clock_gettime+:} false; then :
20135   $as_echo_n "(cached) " >&6
20136 else
20137   ac_func_search_save_LIBS=$LIBS
20138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20139 /* end confdefs.h.  */
20140
20141 /* Override any GCC internal prototype to avoid an error.
20142    Use char because int might match the return type of a GCC
20143    builtin and then its argument prototype would still apply.  */
20144 #ifdef __cplusplus
20145 extern "C"
20146 #endif
20147 char clock_gettime ();
20148 int
20149 main ()
20150 {
20151 return clock_gettime ();
20152   ;
20153   return 0;
20154 }
20155 _ACEOF
20156 for ac_lib in '' rt; do
20157   if test -z "$ac_lib"; then
20158     ac_res="none required"
20159   else
20160     ac_res=-l$ac_lib
20161     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20162   fi
20163   if ac_fn_c_try_link "$LINENO"; then :
20164   ac_cv_search_clock_gettime=$ac_res
20165 fi
20166 rm -f core conftest.err conftest.$ac_objext \
20167     conftest$ac_exeext
20168   if ${ac_cv_search_clock_gettime+:} false; then :
20169   break
20170 fi
20171 done
20172 if ${ac_cv_search_clock_gettime+:} false; then :
20173
20174 else
20175   ac_cv_search_clock_gettime=no
20176 fi
20177 rm conftest.$ac_ext
20178 LIBS=$ac_func_search_save_LIBS
20179 fi
20180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20181 $as_echo "$ac_cv_search_clock_gettime" >&6; }
20182 ac_res=$ac_cv_search_clock_gettime
20183 if test "$ac_res" != no; then :
20184   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20185
20186 fi
20187
20188                         ;;
20189                         esac
20190                     fi
20191
20192 fi
20193 done
20194
20195         fi
20196 fi
20197 LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
20198
20199 ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
20200 if test "x$ac_cv_func_ctime_r" = xyes; then :
20201   $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
20202
20203 else
20204   case " $LIBOBJS " in
20205   *" ctime_r.$ac_objext "* ) ;;
20206   *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
20207  ;;
20208 esac
20209
20210 fi
20211
20212
20213 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
20214 if test "x$ac_cv_func_strsep" = xyes; then :
20215   $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
20216
20217 else
20218   case " $LIBOBJS " in
20219   *" strsep.$ac_objext "* ) ;;
20220   *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
20221  ;;
20222 esac
20223
20224 fi
20225
20226
20227
20228 # Check whether --enable-allsymbols was given.
20229 if test "${enable_allsymbols+set}" = set; then :
20230   enableval=$enable_allsymbols;
20231 fi
20232
20233 case "$enable_allsymbols" in
20234         yes)
20235         COMMON_OBJ_ALL_SYMBOLS=""
20236         UBSYMS=""
20237         EXTRALINK="-L. -L.libs -lunbound"
20238
20239 $as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
20240
20241         ;;
20242         no|*)
20243         COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
20244         UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
20245         EXTRALINK=""
20246         ;;
20247 esac
20248
20249
20250
20251 if test x_$enable_lock_checks = x_yes; then
20252         UBSYMS="-export-symbols clubsyms.def"
20253         cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
20254         echo lock_protect >> clubsyms.def
20255         echo lock_unprotect >> clubsyms.def
20256         echo lock_get_mem >> clubsyms.def
20257         echo checklock_start >> clubsyms.def
20258         echo checklock_stop >> clubsyms.def
20259         echo checklock_lock >> clubsyms.def
20260         echo checklock_unlock >> clubsyms.def
20261         echo checklock_init >> clubsyms.def
20262         echo checklock_thrcreate >> clubsyms.def
20263         echo checklock_thrjoin >> clubsyms.def
20264 fi
20265
20266 # check for dnstap if requested
20267
20268   # Check whether --enable-dnstap was given.
20269 if test "${enable_dnstap+set}" = set; then :
20270   enableval=$enable_dnstap; opt_dnstap=$enableval
20271 else
20272   opt_dnstap=no
20273 fi
20274
20275
20276
20277 # Check whether --with-dnstap-socket-path was given.
20278 if test "${with_dnstap_socket_path+set}" = set; then :
20279   withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
20280 else
20281   opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
20282 fi
20283
20284
20285   if test "x$opt_dnstap" != "xno"; then
20286     # Extract the first word of "protoc-c", so it can be a program name with args.
20287 set dummy protoc-c; ac_word=$2
20288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20289 $as_echo_n "checking for $ac_word... " >&6; }
20290 if ${ac_cv_path_PROTOC_C+:} false; then :
20291   $as_echo_n "(cached) " >&6
20292 else
20293   case $PROTOC_C in
20294   [\\/]* | ?:[\\/]*)
20295   ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
20296   ;;
20297   *)
20298   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20299 for as_dir in $PATH
20300 do
20301   IFS=$as_save_IFS
20302   test -z "$as_dir" && as_dir=.
20303     for ac_exec_ext in '' $ac_executable_extensions; do
20304   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20305     ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
20306     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20307     break 2
20308   fi
20309 done
20310   done
20311 IFS=$as_save_IFS
20312
20313   ;;
20314 esac
20315 fi
20316 PROTOC_C=$ac_cv_path_PROTOC_C
20317 if test -n "$PROTOC_C"; then
20318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
20319 $as_echo "$PROTOC_C" >&6; }
20320 else
20321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20322 $as_echo "no" >&6; }
20323 fi
20324
20325
20326     if test -z "$PROTOC_C"; then
20327       as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
20328     fi
20329
20330 # Check whether --with-protobuf-c was given.
20331 if test "${with_protobuf_c+set}" = set; then :
20332   withval=$with_protobuf_c;
20333           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
20334           if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
20335             CFLAGS="$CFLAGS -I$withval/include/google"
20336           else
20337             CFLAGS="$CFLAGS -I$withval/include"
20338           fi
20339           LDFLAGS="$LDFLAGS -L$withval/lib"
20340
20341 else
20342
20343           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
20344           if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
20345             CFLAGS="$CFLAGS -I/usr/include/google"
20346           else
20347             if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
20348               CFLAGS="$CFLAGS -I/usr/local/include/google"
20349               LDFLAGS="$LDFLAGS -L/usr/local/lib"
20350             fi
20351           fi
20352
20353 fi
20354
20355
20356 # Check whether --with-libfstrm was given.
20357 if test "${with_libfstrm+set}" = set; then :
20358   withval=$with_libfstrm;
20359         CFLAGS="$CFLAGS -I$withval/include"
20360         LDFLAGS="$LDFLAGS -L$withval/lib"
20361
20362 fi
20363
20364     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fstrm_iothr_init" >&5
20365 $as_echo_n "checking for library containing fstrm_iothr_init... " >&6; }
20366 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20367   $as_echo_n "(cached) " >&6
20368 else
20369   ac_func_search_save_LIBS=$LIBS
20370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20371 /* end confdefs.h.  */
20372
20373 /* Override any GCC internal prototype to avoid an error.
20374    Use char because int might match the return type of a GCC
20375    builtin and then its argument prototype would still apply.  */
20376 #ifdef __cplusplus
20377 extern "C"
20378 #endif
20379 char fstrm_iothr_init ();
20380 int
20381 main ()
20382 {
20383 return fstrm_iothr_init ();
20384   ;
20385   return 0;
20386 }
20387 _ACEOF
20388 for ac_lib in '' fstrm; do
20389   if test -z "$ac_lib"; then
20390     ac_res="none required"
20391   else
20392     ac_res=-l$ac_lib
20393     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20394   fi
20395   if ac_fn_c_try_link "$LINENO"; then :
20396   ac_cv_search_fstrm_iothr_init=$ac_res
20397 fi
20398 rm -f core conftest.err conftest.$ac_objext \
20399     conftest$ac_exeext
20400   if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20401   break
20402 fi
20403 done
20404 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20405
20406 else
20407   ac_cv_search_fstrm_iothr_init=no
20408 fi
20409 rm conftest.$ac_ext
20410 LIBS=$ac_func_search_save_LIBS
20411 fi
20412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fstrm_iothr_init" >&5
20413 $as_echo "$ac_cv_search_fstrm_iothr_init" >&6; }
20414 ac_res=$ac_cv_search_fstrm_iothr_init
20415 if test "$ac_res" != no; then :
20416   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20417
20418 else
20419   as_fn_error $? "The fstrm library was not found. Please install fstrm!" "$LINENO" 5
20420 fi
20421
20422     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
20423 $as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
20424 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20425   $as_echo_n "(cached) " >&6
20426 else
20427   ac_func_search_save_LIBS=$LIBS
20428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20429 /* end confdefs.h.  */
20430
20431 /* Override any GCC internal prototype to avoid an error.
20432    Use char because int might match the return type of a GCC
20433    builtin and then its argument prototype would still apply.  */
20434 #ifdef __cplusplus
20435 extern "C"
20436 #endif
20437 char protobuf_c_message_pack ();
20438 int
20439 main ()
20440 {
20441 return protobuf_c_message_pack ();
20442   ;
20443   return 0;
20444 }
20445 _ACEOF
20446 for ac_lib in '' protobuf-c; do
20447   if test -z "$ac_lib"; then
20448     ac_res="none required"
20449   else
20450     ac_res=-l$ac_lib
20451     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20452   fi
20453   if ac_fn_c_try_link "$LINENO"; then :
20454   ac_cv_search_protobuf_c_message_pack=$ac_res
20455 fi
20456 rm -f core conftest.err conftest.$ac_objext \
20457     conftest$ac_exeext
20458   if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20459   break
20460 fi
20461 done
20462 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20463
20464 else
20465   ac_cv_search_protobuf_c_message_pack=no
20466 fi
20467 rm conftest.$ac_ext
20468 LIBS=$ac_func_search_save_LIBS
20469 fi
20470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
20471 $as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
20472 ac_res=$ac_cv_search_protobuf_c_message_pack
20473 if test "$ac_res" != no; then :
20474   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20475
20476 else
20477   as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
20478 fi
20479
20480
20481
20482 $as_echo "#define USE_DNSTAP 1" >>confdefs.h
20483
20484         ENABLE_DNSTAP=1
20485
20486
20487
20488         hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
20489
20490
20491 cat >>confdefs.h <<_ACEOF
20492 #define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
20493 _ACEOF
20494
20495
20496         DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c"
20497
20498         DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo"
20499
20500
20501   else
20502
20503         ENABLE_DNSTAP=0
20504
20505
20506
20507   fi
20508
20509
20510 # check for dnscrypt if requested
20511
20512   # Check whether --enable-dnscrypt was given.
20513 if test "${enable_dnscrypt+set}" = set; then :
20514   enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
20515 else
20516   opt_dnscrypt=no
20517 fi
20518
20519
20520   if test "x$opt_dnscrypt" != "xno"; then
20521
20522 # Check whether --with-libsodium was given.
20523 if test "${with_libsodium+set}" = set; then :
20524   withval=$with_libsodium;
20525         CFLAGS="$CFLAGS -I$withval/include"
20526         LDFLAGS="$LDFLAGS -L$withval/lib"
20527
20528 fi
20529
20530     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
20531 $as_echo_n "checking for library containing sodium_init... " >&6; }
20532 if ${ac_cv_search_sodium_init+:} false; then :
20533   $as_echo_n "(cached) " >&6
20534 else
20535   ac_func_search_save_LIBS=$LIBS
20536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20537 /* end confdefs.h.  */
20538
20539 /* Override any GCC internal prototype to avoid an error.
20540    Use char because int might match the return type of a GCC
20541    builtin and then its argument prototype would still apply.  */
20542 #ifdef __cplusplus
20543 extern "C"
20544 #endif
20545 char sodium_init ();
20546 int
20547 main ()
20548 {
20549 return sodium_init ();
20550   ;
20551   return 0;
20552 }
20553 _ACEOF
20554 for ac_lib in '' sodium; do
20555   if test -z "$ac_lib"; then
20556     ac_res="none required"
20557   else
20558     ac_res=-l$ac_lib
20559     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20560   fi
20561   if ac_fn_c_try_link "$LINENO"; then :
20562   ac_cv_search_sodium_init=$ac_res
20563 fi
20564 rm -f core conftest.err conftest.$ac_objext \
20565     conftest$ac_exeext
20566   if ${ac_cv_search_sodium_init+:} false; then :
20567   break
20568 fi
20569 done
20570 if ${ac_cv_search_sodium_init+:} false; then :
20571
20572 else
20573   ac_cv_search_sodium_init=no
20574 fi
20575 rm conftest.$ac_ext
20576 LIBS=$ac_func_search_save_LIBS
20577 fi
20578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
20579 $as_echo "$ac_cv_search_sodium_init" >&6; }
20580 ac_res=$ac_cv_search_sodium_init
20581 if test "$ac_res" != no; then :
20582   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20583
20584 else
20585   as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
20586 fi
20587
20588     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
20589 $as_echo_n "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
20590 if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20591   $as_echo_n "(cached) " >&6
20592 else
20593   ac_func_search_save_LIBS=$LIBS
20594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20595 /* end confdefs.h.  */
20596
20597 /* Override any GCC internal prototype to avoid an error.
20598    Use char because int might match the return type of a GCC
20599    builtin and then its argument prototype would still apply.  */
20600 #ifdef __cplusplus
20601 extern "C"
20602 #endif
20603 char crypto_box_curve25519xchacha20poly1305_beforenm ();
20604 int
20605 main ()
20606 {
20607 return crypto_box_curve25519xchacha20poly1305_beforenm ();
20608   ;
20609   return 0;
20610 }
20611 _ACEOF
20612 for ac_lib in '' sodium; do
20613   if test -z "$ac_lib"; then
20614     ac_res="none required"
20615   else
20616     ac_res=-l$ac_lib
20617     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20618   fi
20619   if ac_fn_c_try_link "$LINENO"; then :
20620   ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
20621 fi
20622 rm -f core conftest.err conftest.$ac_objext \
20623     conftest$ac_exeext
20624   if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20625   break
20626 fi
20627 done
20628 if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20629
20630 else
20631   ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
20632 fi
20633 rm conftest.$ac_ext
20634 LIBS=$ac_func_search_save_LIBS
20635 fi
20636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
20637 $as_echo "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
20638 ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
20639 if test "$ac_res" != no; then :
20640   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20641
20642             ENABLE_DNSCRYPT_XCHACHA20=1
20643
20644
20645 $as_echo "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
20646
20647
20648 else
20649
20650             ENABLE_DNSCRYPT_XCHACHA20=0
20651
20652
20653 fi
20654
20655     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
20656 $as_echo_n "checking for library containing sodium_set_misuse_handler... " >&6; }
20657 if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20658   $as_echo_n "(cached) " >&6
20659 else
20660   ac_func_search_save_LIBS=$LIBS
20661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20662 /* end confdefs.h.  */
20663
20664 /* Override any GCC internal prototype to avoid an error.
20665    Use char because int might match the return type of a GCC
20666    builtin and then its argument prototype would still apply.  */
20667 #ifdef __cplusplus
20668 extern "C"
20669 #endif
20670 char sodium_set_misuse_handler ();
20671 int
20672 main ()
20673 {
20674 return sodium_set_misuse_handler ();
20675   ;
20676   return 0;
20677 }
20678 _ACEOF
20679 for ac_lib in '' sodium; do
20680   if test -z "$ac_lib"; then
20681     ac_res="none required"
20682   else
20683     ac_res=-l$ac_lib
20684     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20685   fi
20686   if ac_fn_c_try_link "$LINENO"; then :
20687   ac_cv_search_sodium_set_misuse_handler=$ac_res
20688 fi
20689 rm -f core conftest.err conftest.$ac_objext \
20690     conftest$ac_exeext
20691   if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20692   break
20693 fi
20694 done
20695 if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20696
20697 else
20698   ac_cv_search_sodium_set_misuse_handler=no
20699 fi
20700 rm conftest.$ac_ext
20701 LIBS=$ac_func_search_save_LIBS
20702 fi
20703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
20704 $as_echo "$ac_cv_search_sodium_set_misuse_handler" >&6; }
20705 ac_res=$ac_cv_search_sodium_set_misuse_handler
20706 if test "$ac_res" != no; then :
20707   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20708
20709
20710 $as_echo "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
20711
20712
20713 fi
20714
20715
20716
20717 $as_echo "#define USE_DNSCRYPT 1" >>confdefs.h
20718
20719         ENABLE_DNSCRYPT=1
20720
20721
20722         DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
20723
20724         DNSCRYPT_OBJ="dnscrypt.lo"
20725
20726
20727   else
20728     ENABLE_DNSCRYPT_XCHACHA20=0
20729
20730
20731         ENABLE_DNSCRYPT=0
20732
20733
20734
20735   fi
20736
20737
20738 # check for cachedb if requested
20739 # Check whether --enable-cachedb was given.
20740 if test "${enable_cachedb+set}" = set; then :
20741   enableval=$enable_cachedb;
20742 fi
20743
20744 case "$enable_cachedb" in
20745     yes)
20746
20747 $as_echo "#define USE_CACHEDB 1" >>confdefs.h
20748
20749         ;;
20750     no|*)
20751         # nothing
20752         ;;
20753 esac
20754
20755 # check for ipsecmod if requested
20756 # Check whether --enable-ipsecmod was given.
20757 if test "${enable_ipsecmod+set}" = set; then :
20758   enableval=$enable_ipsecmod;
20759 fi
20760
20761 case "$enable_ipsecmod" in
20762         yes)
20763
20764 $as_echo "#define USE_IPSECMOD 1" >>confdefs.h
20765
20766                 IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
20767
20768                 IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
20769
20770                 ;;
20771         no|*)
20772                 # nothing
20773                 ;;
20774 esac
20775
20776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
20777 $as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
20778 # on openBSD, the implicit rule make $< work.
20779 # on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
20780 # gmake works.
20781 cat >conftest.make <<EOF
20782 all:    conftest.lo
20783
20784 conftest.lo foo.lo bla.lo:
20785         if test -f "\$<"; then touch \$@; fi
20786
20787 .SUFFIXES: .lo
20788 .c.lo:
20789         if test -f "\$<"; then touch \$@; fi
20790
20791 conftest.lo:        conftest.dir/conftest.c
20792 EOF
20793 mkdir conftest.dir
20794 touch conftest.dir/conftest.c
20795 rm -f conftest.lo conftest.c
20796 ${MAKE:-make} -f conftest.make >/dev/null
20797 rm -f conftest.make conftest.c conftest.dir/conftest.c
20798 rm -rf conftest.dir
20799 if test ! -f conftest.lo; then
20800         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20801 $as_echo "no" >&6; }
20802         SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
20803         SOURCEFILE='`cat .source`'
20804 else
20805         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20806 $as_echo "yes" >&6; }
20807         SOURCEDETERMINE=':'
20808         SOURCEFILE='$<'
20809 fi
20810 rm -f conftest.lo
20811
20812
20813
20814 # see if we want to build the library or everything
20815 ALLTARGET="alltargets"
20816 INSTALLTARGET="install-all"
20817
20818 # Check whether --with-libunbound-only was given.
20819 if test "${with_libunbound_only+set}" = set; then :
20820   withval=$with_libunbound_only;
20821         if test "$withval" = "yes"; then
20822                 ALLTARGET="lib"
20823                 INSTALLTARGET="install-lib"
20824         fi
20825
20826 fi
20827
20828 if test $ALLTARGET = "alltargets"; then
20829         if test $USE_NSS = "yes"; then
20830                 as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
20831         fi
20832         if test $USE_NETTLE = "yes"; then
20833                 as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
20834         fi
20835 fi
20836
20837
20838
20839
20840
20841   { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
20842 $as_echo "$as_me: Stripping extension flags..." >&6;}
20843
20844   if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
20845     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
20846
20847 $as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
20848
20849   fi
20850
20851
20852   if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
20853     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
20854
20855 $as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
20856
20857   fi
20858
20859
20860   if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
20861     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
20862
20863 $as_echo "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
20864
20865   fi
20866
20867
20868   if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
20869     CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
20870
20871 $as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
20872
20873   fi
20874
20875
20876   if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
20877     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
20878
20879 $as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
20880
20881   fi
20882
20883
20884   if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
20885     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
20886
20887 $as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
20888
20889   fi
20890
20891
20892   if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
20893     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
20894
20895 $as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
20896
20897   fi
20898
20899
20900   if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
20901     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
20902
20903 $as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
20904
20905   fi
20906
20907
20908   if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
20909     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
20910
20911 $as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
20912
20913   fi
20914
20915
20916 if test -n "$LATE_LDFLAGS"; then
20917   LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
20918 fi
20919 # remove start spaces
20920 LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
20921 LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
20922
20923
20924 cat >>confdefs.h <<_ACEOF
20925 #define MAXSYSLOGMSGLEN 10240
20926 _ACEOF
20927
20928
20929
20930
20931 version=1.7.0
20932
20933 date=`date +'%b %e, %Y'`
20934
20935
20936 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"
20937
20938 ac_config_headers="$ac_config_headers config.h"
20939
20940 cat >confcache <<\_ACEOF
20941 # This file is a shell script that caches the results of configure
20942 # tests run on this system so they can be shared between configure
20943 # scripts and configure runs, see configure's option --config-cache.
20944 # It is not useful on other systems.  If it contains results you don't
20945 # want to keep, you may remove or edit it.
20946 #
20947 # config.status only pays attention to the cache file if you give it
20948 # the --recheck option to rerun configure.
20949 #
20950 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20951 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20952 # following values.
20953
20954 _ACEOF
20955
20956 # The following way of writing the cache mishandles newlines in values,
20957 # but we know of no workaround that is simple, portable, and efficient.
20958 # So, we kill variables containing newlines.
20959 # Ultrix sh set writes to stderr and can't be redirected directly,
20960 # and sets the high bit in the cache file unless we assign to the vars.
20961 (
20962   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20963     eval ac_val=\$$ac_var
20964     case $ac_val in #(
20965     *${as_nl}*)
20966       case $ac_var in #(
20967       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20968 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
20969       esac
20970       case $ac_var in #(
20971       _ | IFS | as_nl) ;; #(
20972       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
20973       *) { eval $ac_var=; unset $ac_var;} ;;
20974       esac ;;
20975     esac
20976   done
20977
20978   (set) 2>&1 |
20979     case $as_nl`(ac_space=' '; set) 2>&1` in #(
20980     *${as_nl}ac_space=\ *)
20981       # `set' does not quote correctly, so add quotes: double-quote
20982       # substitution turns \\\\ into \\, and sed turns \\ into \.
20983       sed -n \
20984         "s/'/'\\\\''/g;
20985           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20986       ;; #(
20987     *)
20988       # `set' quotes correctly as required by POSIX, so do not add quotes.
20989       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20990       ;;
20991     esac |
20992     sort
20993 ) |
20994   sed '
20995      /^ac_cv_env_/b end
20996      t clear
20997      :clear
20998      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20999      t end
21000      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21001      :end' >>confcache
21002 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21003   if test -w "$cache_file"; then
21004     if test "x$cache_file" != "x/dev/null"; then
21005       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
21006 $as_echo "$as_me: updating cache $cache_file" >&6;}
21007       if test ! -f "$cache_file" || test -h "$cache_file"; then
21008         cat confcache >"$cache_file"
21009       else
21010         case $cache_file in #(
21011         */* | ?:*)
21012           mv -f confcache "$cache_file"$$ &&
21013           mv -f "$cache_file"$$ "$cache_file" ;; #(
21014         *)
21015           mv -f confcache "$cache_file" ;;
21016         esac
21017       fi
21018     fi
21019   else
21020     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
21021 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21022   fi
21023 fi
21024 rm -f confcache
21025
21026 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21027 # Let make expand exec_prefix.
21028 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21029
21030 DEFS=-DHAVE_CONFIG_H
21031
21032 ac_libobjs=
21033 ac_ltlibobjs=
21034 U=
21035 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21036   # 1. Remove the extension, and $U if already installed.
21037   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21038   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21039   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
21040   #    will be set to the directory where LIBOBJS objects are built.
21041   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21042   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
21043 done
21044 LIBOBJS=$ac_libobjs
21045
21046 LTLIBOBJS=$ac_ltlibobjs
21047
21048
21049 if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
21050   as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
21051 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21052 fi
21053
21054 : "${CONFIG_STATUS=./config.status}"
21055 ac_write_fail=0
21056 ac_clean_files_save=$ac_clean_files
21057 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21058 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
21059 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
21060 as_write_fail=0
21061 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
21062 #! $SHELL
21063 # Generated by $as_me.
21064 # Run this file to recreate the current configuration.
21065 # Compiler output produced by configure, useful for debugging
21066 # configure, is in config.log if it exists.
21067
21068 debug=false
21069 ac_cs_recheck=false
21070 ac_cs_silent=false
21071
21072 SHELL=\${CONFIG_SHELL-$SHELL}
21073 export SHELL
21074 _ASEOF
21075 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
21076 ## -------------------- ##
21077 ## M4sh Initialization. ##
21078 ## -------------------- ##
21079
21080 # Be more Bourne compatible
21081 DUALCASE=1; export DUALCASE # for MKS sh
21082 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
21083   emulate sh
21084   NULLCMD=:
21085   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21086   # is contrary to our usage.  Disable this feature.
21087   alias -g '${1+"$@"}'='"$@"'
21088   setopt NO_GLOB_SUBST
21089 else
21090   case `(set -o) 2>/dev/null` in #(
21091   *posix*) :
21092     set -o posix ;; #(
21093   *) :
21094      ;;
21095 esac
21096 fi
21097
21098
21099 as_nl='
21100 '
21101 export as_nl
21102 # Printing a long string crashes Solaris 7 /usr/bin/printf.
21103 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
21104 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
21105 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
21106 # Prefer a ksh shell builtin over an external printf program on Solaris,
21107 # but without wasting forks for bash or zsh.
21108 if test -z "$BASH_VERSION$ZSH_VERSION" \
21109     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
21110   as_echo='print -r --'
21111   as_echo_n='print -rn --'
21112 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
21113   as_echo='printf %s\n'
21114   as_echo_n='printf %s'
21115 else
21116   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
21117     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
21118     as_echo_n='/usr/ucb/echo -n'
21119   else
21120     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
21121     as_echo_n_body='eval
21122       arg=$1;
21123       case $arg in #(
21124       *"$as_nl"*)
21125         expr "X$arg" : "X\\(.*\\)$as_nl";
21126         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
21127       esac;
21128       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
21129     '
21130     export as_echo_n_body
21131     as_echo_n='sh -c $as_echo_n_body as_echo'
21132   fi
21133   export as_echo_body
21134   as_echo='sh -c $as_echo_body as_echo'
21135 fi
21136
21137 # The user is always right.
21138 if test "${PATH_SEPARATOR+set}" != set; then
21139   PATH_SEPARATOR=:
21140   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
21141     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
21142       PATH_SEPARATOR=';'
21143   }
21144 fi
21145
21146
21147 # IFS
21148 # We need space, tab and new line, in precisely that order.  Quoting is
21149 # there to prevent editors from complaining about space-tab.
21150 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
21151 # splitting by setting IFS to empty value.)
21152 IFS=" ""        $as_nl"
21153
21154 # Find who we are.  Look in the path if we contain no directory separator.
21155 as_myself=
21156 case $0 in #((
21157   *[\\/]* ) as_myself=$0 ;;
21158   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21159 for as_dir in $PATH
21160 do
21161   IFS=$as_save_IFS
21162   test -z "$as_dir" && as_dir=.
21163     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21164   done
21165 IFS=$as_save_IFS
21166
21167      ;;
21168 esac
21169 # We did not find ourselves, most probably we were run as `sh COMMAND'
21170 # in which case we are not to be found in the path.
21171 if test "x$as_myself" = x; then
21172   as_myself=$0
21173 fi
21174 if test ! -f "$as_myself"; then
21175   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
21176   exit 1
21177 fi
21178
21179 # Unset variables that we do not need and which cause bugs (e.g. in
21180 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
21181 # suppresses any "Segmentation fault" message there.  '((' could
21182 # trigger a bug in pdksh 5.2.14.
21183 for as_var in BASH_ENV ENV MAIL MAILPATH
21184 do eval test x\${$as_var+set} = xset \
21185   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
21186 done
21187 PS1='$ '
21188 PS2='> '
21189 PS4='+ '
21190
21191 # NLS nuisances.
21192 LC_ALL=C
21193 export LC_ALL
21194 LANGUAGE=C
21195 export LANGUAGE
21196
21197 # CDPATH.
21198 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21199
21200
21201 # as_fn_error STATUS ERROR [LINENO LOG_FD]
21202 # ----------------------------------------
21203 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
21204 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
21205 # script with STATUS, using 1 if that was 0.
21206 as_fn_error ()
21207 {
21208   as_status=$1; test $as_status -eq 0 && as_status=1
21209   if test "$4"; then
21210     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
21211     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
21212   fi
21213   $as_echo "$as_me: error: $2" >&2
21214   as_fn_exit $as_status
21215 } # as_fn_error
21216
21217
21218 # as_fn_set_status STATUS
21219 # -----------------------
21220 # Set $? to STATUS, without forking.
21221 as_fn_set_status ()
21222 {
21223   return $1
21224 } # as_fn_set_status
21225
21226 # as_fn_exit STATUS
21227 # -----------------
21228 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
21229 as_fn_exit ()
21230 {
21231   set +e
21232   as_fn_set_status $1
21233   exit $1
21234 } # as_fn_exit
21235
21236 # as_fn_unset VAR
21237 # ---------------
21238 # Portably unset VAR.
21239 as_fn_unset ()
21240 {
21241   { eval $1=; unset $1;}
21242 }
21243 as_unset=as_fn_unset
21244 # as_fn_append VAR VALUE
21245 # ----------------------
21246 # Append the text in VALUE to the end of the definition contained in VAR. Take
21247 # advantage of any shell optimizations that allow amortized linear growth over
21248 # repeated appends, instead of the typical quadratic growth present in naive
21249 # implementations.
21250 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
21251   eval 'as_fn_append ()
21252   {
21253     eval $1+=\$2
21254   }'
21255 else
21256   as_fn_append ()
21257   {
21258     eval $1=\$$1\$2
21259   }
21260 fi # as_fn_append
21261
21262 # as_fn_arith ARG...
21263 # ------------------
21264 # Perform arithmetic evaluation on the ARGs, and store the result in the
21265 # global $as_val. Take advantage of shells that can avoid forks. The arguments
21266 # must be portable across $(()) and expr.
21267 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
21268   eval 'as_fn_arith ()
21269   {
21270     as_val=$(( $* ))
21271   }'
21272 else
21273   as_fn_arith ()
21274   {
21275     as_val=`expr "$@" || test $? -eq 1`
21276   }
21277 fi # as_fn_arith
21278
21279
21280 if expr a : '\(a\)' >/dev/null 2>&1 &&
21281    test "X`expr 00001 : '.*\(...\)'`" = X001; then
21282   as_expr=expr
21283 else
21284   as_expr=false
21285 fi
21286
21287 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
21288   as_basename=basename
21289 else
21290   as_basename=false
21291 fi
21292
21293 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
21294   as_dirname=dirname
21295 else
21296   as_dirname=false
21297 fi
21298
21299 as_me=`$as_basename -- "$0" ||
21300 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21301          X"$0" : 'X\(//\)$' \| \
21302          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
21303 $as_echo X/"$0" |
21304     sed '/^.*\/\([^/][^/]*\)\/*$/{
21305             s//\1/
21306             q
21307           }
21308           /^X\/\(\/\/\)$/{
21309             s//\1/
21310             q
21311           }
21312           /^X\/\(\/\).*/{
21313             s//\1/
21314             q
21315           }
21316           s/.*/./; q'`
21317
21318 # Avoid depending upon Character Ranges.
21319 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21320 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21321 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21322 as_cr_digits='0123456789'
21323 as_cr_alnum=$as_cr_Letters$as_cr_digits
21324
21325 ECHO_C= ECHO_N= ECHO_T=
21326 case `echo -n x` in #(((((
21327 -n*)
21328   case `echo 'xy\c'` in
21329   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
21330   xy)  ECHO_C='\c';;
21331   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
21332        ECHO_T=' ';;
21333   esac;;
21334 *)
21335   ECHO_N='-n';;
21336 esac
21337
21338 rm -f conf$$ conf$$.exe conf$$.file
21339 if test -d conf$$.dir; then
21340   rm -f conf$$.dir/conf$$.file
21341 else
21342   rm -f conf$$.dir
21343   mkdir conf$$.dir 2>/dev/null
21344 fi
21345 if (echo >conf$$.file) 2>/dev/null; then
21346   if ln -s conf$$.file conf$$ 2>/dev/null; then
21347     as_ln_s='ln -s'
21348     # ... but there are two gotchas:
21349     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
21350     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
21351     # In both cases, we have to default to `cp -pR'.
21352     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
21353       as_ln_s='cp -pR'
21354   elif ln conf$$.file conf$$ 2>/dev/null; then
21355     as_ln_s=ln
21356   else
21357     as_ln_s='cp -pR'
21358   fi
21359 else
21360   as_ln_s='cp -pR'
21361 fi
21362 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
21363 rmdir conf$$.dir 2>/dev/null
21364
21365
21366 # as_fn_mkdir_p
21367 # -------------
21368 # Create "$as_dir" as a directory, including parents if necessary.
21369 as_fn_mkdir_p ()
21370 {
21371
21372   case $as_dir in #(
21373   -*) as_dir=./$as_dir;;
21374   esac
21375   test -d "$as_dir" || eval $as_mkdir_p || {
21376     as_dirs=
21377     while :; do
21378       case $as_dir in #(
21379       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
21380       *) as_qdir=$as_dir;;
21381       esac
21382       as_dirs="'$as_qdir' $as_dirs"
21383       as_dir=`$as_dirname -- "$as_dir" ||
21384 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21385          X"$as_dir" : 'X\(//\)[^/]' \| \
21386          X"$as_dir" : 'X\(//\)$' \| \
21387          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21388 $as_echo X"$as_dir" |
21389     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21390             s//\1/
21391             q
21392           }
21393           /^X\(\/\/\)[^/].*/{
21394             s//\1/
21395             q
21396           }
21397           /^X\(\/\/\)$/{
21398             s//\1/
21399             q
21400           }
21401           /^X\(\/\).*/{
21402             s//\1/
21403             q
21404           }
21405           s/.*/./; q'`
21406       test -d "$as_dir" && break
21407     done
21408     test -z "$as_dirs" || eval "mkdir $as_dirs"
21409   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
21410
21411
21412 } # as_fn_mkdir_p
21413 if mkdir -p . 2>/dev/null; then
21414   as_mkdir_p='mkdir -p "$as_dir"'
21415 else
21416   test -d ./-p && rmdir ./-p
21417   as_mkdir_p=false
21418 fi
21419
21420
21421 # as_fn_executable_p FILE
21422 # -----------------------
21423 # Test if FILE is an executable regular file.
21424 as_fn_executable_p ()
21425 {
21426   test -f "$1" && test -x "$1"
21427 } # as_fn_executable_p
21428 as_test_x='test -x'
21429 as_executable_p=as_fn_executable_p
21430
21431 # Sed expression to map a string onto a valid CPP name.
21432 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21433
21434 # Sed expression to map a string onto a valid variable name.
21435 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21436
21437
21438 exec 6>&1
21439 ## ----------------------------------- ##
21440 ## Main body of $CONFIG_STATUS script. ##
21441 ## ----------------------------------- ##
21442 _ASEOF
21443 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
21444
21445 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21446 # Save the log message, to keep $0 and so on meaningful, and to
21447 # report actual input values of CONFIG_FILES etc. instead of their
21448 # values after options handling.
21449 ac_log="
21450 This file was extended by unbound $as_me 1.7.0, which was
21451 generated by GNU Autoconf 2.69.  Invocation command line was
21452
21453   CONFIG_FILES    = $CONFIG_FILES
21454   CONFIG_HEADERS  = $CONFIG_HEADERS
21455   CONFIG_LINKS    = $CONFIG_LINKS
21456   CONFIG_COMMANDS = $CONFIG_COMMANDS
21457   $ $0 $@
21458
21459 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21460 "
21461
21462 _ACEOF
21463
21464 case $ac_config_files in *"
21465 "*) set x $ac_config_files; shift; ac_config_files=$*;;
21466 esac
21467
21468 case $ac_config_headers in *"
21469 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
21470 esac
21471
21472
21473 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21474 # Files that config.status was made for.
21475 config_files="$ac_config_files"
21476 config_headers="$ac_config_headers"
21477 config_commands="$ac_config_commands"
21478
21479 _ACEOF
21480
21481 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21482 ac_cs_usage="\
21483 \`$as_me' instantiates files and other configuration actions
21484 from templates according to the current configuration.  Unless the files
21485 and actions are specified as TAGs, all are instantiated by default.
21486
21487 Usage: $0 [OPTION]... [TAG]...
21488
21489   -h, --help       print this help, then exit
21490   -V, --version    print version number and configuration settings, then exit
21491       --config     print configuration, then exit
21492   -q, --quiet, --silent
21493                    do not print progress messages
21494   -d, --debug      don't remove temporary files
21495       --recheck    update $as_me by reconfiguring in the same conditions
21496       --file=FILE[:TEMPLATE]
21497                    instantiate the configuration file FILE
21498       --header=FILE[:TEMPLATE]
21499                    instantiate the configuration header FILE
21500
21501 Configuration files:
21502 $config_files
21503
21504 Configuration headers:
21505 $config_headers
21506
21507 Configuration commands:
21508 $config_commands
21509
21510 Report bugs to <unbound-bugs@nlnetlabs.nl>."
21511
21512 _ACEOF
21513 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21514 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
21515 ac_cs_version="\\
21516 unbound config.status 1.7.0
21517 configured by $0, generated by GNU Autoconf 2.69,
21518   with options \\"\$ac_cs_config\\"
21519
21520 Copyright (C) 2012 Free Software Foundation, Inc.
21521 This config.status script is free software; the Free Software Foundation
21522 gives unlimited permission to copy, distribute and modify it."
21523
21524 ac_pwd='$ac_pwd'
21525 srcdir='$srcdir'
21526 AWK='$AWK'
21527 test -n "\$AWK" || AWK=awk
21528 _ACEOF
21529
21530 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21531 # The default lists apply if the user does not specify any file.
21532 ac_need_defaults=:
21533 while test $# != 0
21534 do
21535   case $1 in
21536   --*=?*)
21537     ac_option=`expr "X$1" : 'X\([^=]*\)='`
21538     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
21539     ac_shift=:
21540     ;;
21541   --*=)
21542     ac_option=`expr "X$1" : 'X\([^=]*\)='`
21543     ac_optarg=
21544     ac_shift=:
21545     ;;
21546   *)
21547     ac_option=$1
21548     ac_optarg=$2
21549     ac_shift=shift
21550     ;;
21551   esac
21552
21553   case $ac_option in
21554   # Handling of the options.
21555   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21556     ac_cs_recheck=: ;;
21557   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
21558     $as_echo "$ac_cs_version"; exit ;;
21559   --config | --confi | --conf | --con | --co | --c )
21560     $as_echo "$ac_cs_config"; exit ;;
21561   --debug | --debu | --deb | --de | --d | -d )
21562     debug=: ;;
21563   --file | --fil | --fi | --f )
21564     $ac_shift
21565     case $ac_optarg in
21566     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21567     '') as_fn_error $? "missing file argument" ;;
21568     esac
21569     as_fn_append CONFIG_FILES " '$ac_optarg'"
21570     ac_need_defaults=false;;
21571   --header | --heade | --head | --hea )
21572     $ac_shift
21573     case $ac_optarg in
21574     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21575     esac
21576     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
21577     ac_need_defaults=false;;
21578   --he | --h)
21579     # Conflict between --help and --header
21580     as_fn_error $? "ambiguous option: \`$1'
21581 Try \`$0 --help' for more information.";;
21582   --help | --hel | -h )
21583     $as_echo "$ac_cs_usage"; exit ;;
21584   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21585   | -silent | --silent | --silen | --sile | --sil | --si | --s)
21586     ac_cs_silent=: ;;
21587
21588   # This is an error.
21589   -*) as_fn_error $? "unrecognized option: \`$1'
21590 Try \`$0 --help' for more information." ;;
21591
21592   *) as_fn_append ac_config_targets " $1"
21593      ac_need_defaults=false ;;
21594
21595   esac
21596   shift
21597 done
21598
21599 ac_configure_extra_args=
21600
21601 if $ac_cs_silent; then
21602   exec 6>/dev/null
21603   ac_configure_extra_args="$ac_configure_extra_args --silent"
21604 fi
21605
21606 _ACEOF
21607 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21608 if \$ac_cs_recheck; then
21609   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21610   shift
21611   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
21612   CONFIG_SHELL='$SHELL'
21613   export CONFIG_SHELL
21614   exec "\$@"
21615 fi
21616
21617 _ACEOF
21618 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21619 exec 5>>config.log
21620 {
21621   echo
21622   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21623 ## Running $as_me. ##
21624 _ASBOX
21625   $as_echo "$ac_log"
21626 } >&5
21627
21628 _ACEOF
21629 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21630 #
21631 # INIT-COMMANDS
21632 #
21633
21634
21635 # The HP-UX ksh and POSIX shell print the target directory to stdout
21636 # if CDPATH is set.
21637 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21638
21639 sed_quote_subst='$sed_quote_subst'
21640 double_quote_subst='$double_quote_subst'
21641 delay_variable_subst='$delay_variable_subst'
21642 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
21643 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
21644 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
21645 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
21646 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
21647 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
21648 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
21649 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
21650 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
21651 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
21652 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
21653 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
21654 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
21655 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
21656 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
21657 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
21658 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
21659 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
21660 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
21661 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
21662 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
21663 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
21664 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
21665 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
21666 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
21667 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
21668 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
21669 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
21670 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
21671 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
21672 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
21673 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
21674 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
21675 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
21676 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
21677 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
21678 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
21679 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
21680 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
21681 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
21682 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
21683 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
21684 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
21685 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
21686 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
21687 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
21688 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
21689 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
21690 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
21691 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
21692 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
21693 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
21694 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
21695 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
21696 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
21697 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
21698 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
21699 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
21700 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"`'
21701 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
21702 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
21703 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
21704 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
21705 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
21706 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
21707 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
21708 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
21709 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
21710 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
21711 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
21712 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
21713 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
21714 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
21715 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
21716 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
21717 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
21718 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
21719 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
21720 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
21721 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
21722 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
21723 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
21724 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
21725 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
21726 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
21727 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
21728 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
21729 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
21730 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
21731 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
21732 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
21733 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
21734 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
21735 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
21736 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
21737 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
21738 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
21739 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
21740 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
21741 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
21742 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
21743 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
21744 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
21745 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
21746 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
21747 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
21748 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
21749 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
21750 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
21751 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
21752 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
21753 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
21754 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
21755 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
21756 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
21757 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
21758 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
21759 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
21760 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
21761 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
21762 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
21763 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
21764 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
21765 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
21766 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
21767 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
21768 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
21769 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
21770 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
21771 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
21772 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
21773 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
21774 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
21775 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
21776 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
21777
21778 LTCC='$LTCC'
21779 LTCFLAGS='$LTCFLAGS'
21780 compiler='$compiler_DEFAULT'
21781
21782 # A function that is used when there is no print builtin or printf.
21783 func_fallback_echo ()
21784 {
21785   eval 'cat <<_LTECHO_EOF
21786 \$1
21787 _LTECHO_EOF'
21788 }
21789
21790 # Quote evaled strings.
21791 for var in SHELL \
21792 ECHO \
21793 PATH_SEPARATOR \
21794 SED \
21795 GREP \
21796 EGREP \
21797 FGREP \
21798 LD \
21799 NM \
21800 LN_S \
21801 lt_SP2NL \
21802 lt_NL2SP \
21803 reload_flag \
21804 OBJDUMP \
21805 deplibs_check_method \
21806 file_magic_cmd \
21807 file_magic_glob \
21808 want_nocaseglob \
21809 DLLTOOL \
21810 sharedlib_from_linklib_cmd \
21811 AR \
21812 AR_FLAGS \
21813 archiver_list_spec \
21814 STRIP \
21815 RANLIB \
21816 CC \
21817 CFLAGS \
21818 compiler \
21819 lt_cv_sys_global_symbol_pipe \
21820 lt_cv_sys_global_symbol_to_cdecl \
21821 lt_cv_sys_global_symbol_to_import \
21822 lt_cv_sys_global_symbol_to_c_name_address \
21823 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
21824 lt_cv_nm_interface \
21825 nm_file_list_spec \
21826 lt_cv_truncate_bin \
21827 lt_prog_compiler_no_builtin_flag \
21828 lt_prog_compiler_pic \
21829 lt_prog_compiler_wl \
21830 lt_prog_compiler_static \
21831 lt_cv_prog_compiler_c_o \
21832 need_locks \
21833 MANIFEST_TOOL \
21834 DSYMUTIL \
21835 NMEDIT \
21836 LIPO \
21837 OTOOL \
21838 OTOOL64 \
21839 shrext_cmds \
21840 export_dynamic_flag_spec \
21841 whole_archive_flag_spec \
21842 compiler_needs_object \
21843 with_gnu_ld \
21844 allow_undefined_flag \
21845 no_undefined_flag \
21846 hardcode_libdir_flag_spec \
21847 hardcode_libdir_separator \
21848 exclude_expsyms \
21849 include_expsyms \
21850 file_list_spec \
21851 variables_saved_for_relink \
21852 libname_spec \
21853 library_names_spec \
21854 soname_spec \
21855 install_override_mode \
21856 finish_eval \
21857 old_striplib \
21858 striplib; do
21859     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
21860     *[\\\\\\\`\\"\\\$]*)
21861       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
21862       ;;
21863     *)
21864       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
21865       ;;
21866     esac
21867 done
21868
21869 # Double-quote double-evaled strings.
21870 for var in reload_cmds \
21871 old_postinstall_cmds \
21872 old_postuninstall_cmds \
21873 old_archive_cmds \
21874 extract_expsyms_cmds \
21875 old_archive_from_new_cmds \
21876 old_archive_from_expsyms_cmds \
21877 archive_cmds \
21878 archive_expsym_cmds \
21879 module_cmds \
21880 module_expsym_cmds \
21881 export_symbols_cmds \
21882 prelink_cmds \
21883 postlink_cmds \
21884 postinstall_cmds \
21885 postuninstall_cmds \
21886 finish_cmds \
21887 sys_lib_search_path_spec \
21888 configure_time_dlsearch_path \
21889 configure_time_lt_sys_library_path; do
21890     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
21891     *[\\\\\\\`\\"\\\$]*)
21892       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
21893       ;;
21894     *)
21895       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
21896       ;;
21897     esac
21898 done
21899
21900 ac_aux_dir='$ac_aux_dir'
21901
21902 # See if we are running on zsh, and set the options that allow our
21903 # commands through without removal of \ escapes INIT.
21904 if test -n "\${ZSH_VERSION+set}"; then
21905    setopt NO_GLOB_SUBST
21906 fi
21907
21908
21909     PACKAGE='$PACKAGE'
21910     VERSION='$VERSION'
21911     RM='$RM'
21912     ofile='$ofile'
21913
21914
21915
21916
21917 _ACEOF
21918
21919 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21920
21921 # Handling of arguments.
21922 for ac_config_target in $ac_config_targets
21923 do
21924   case $ac_config_target in
21925     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
21926     "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
21927     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21928     "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
21929     "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
21930     "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
21931     "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
21932     "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
21933     "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
21934     "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
21935     "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
21936     "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
21937     "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
21938     "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
21939     "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
21940     "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
21941     "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
21942     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
21943
21944   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
21945   esac
21946 done
21947
21948
21949 # If the user did not use the arguments to specify the items to instantiate,
21950 # then the envvar interface is used.  Set only those that are not.
21951 # We use the long form for the default assignment because of an extremely
21952 # bizarre bug on SunOS 4.1.3.
21953 if $ac_need_defaults; then
21954   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21955   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21956   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21957 fi
21958
21959 # Have a temporary directory for convenience.  Make it in the build tree
21960 # simply because there is no reason against having it here, and in addition,
21961 # creating and moving files from /tmp can sometimes cause problems.
21962 # Hook for its removal unless debugging.
21963 # Note that there is a small window in which the directory will not be cleaned:
21964 # after its creation but before its name has been assigned to `$tmp'.
21965 $debug ||
21966 {
21967   tmp= ac_tmp=
21968   trap 'exit_status=$?
21969   : "${ac_tmp:=$tmp}"
21970   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
21971 ' 0
21972   trap 'as_fn_exit 1' 1 2 13 15
21973 }
21974 # Create a (secure) tmp directory for tmp files.
21975
21976 {
21977   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
21978   test -d "$tmp"
21979 }  ||
21980 {
21981   tmp=./conf$$-$RANDOM
21982   (umask 077 && mkdir "$tmp")
21983 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
21984 ac_tmp=$tmp
21985
21986 # Set up the scripts for CONFIG_FILES section.
21987 # No need to generate them if there are no CONFIG_FILES.
21988 # This happens for instance with `./config.status config.h'.
21989 if test -n "$CONFIG_FILES"; then
21990
21991
21992 ac_cr=`echo X | tr X '\015'`
21993 # On cygwin, bash can eat \r inside `` if the user requested igncr.
21994 # But we know of no other shell where ac_cr would be empty at this
21995 # point, so we can use a bashism as a fallback.
21996 if test "x$ac_cr" = x; then
21997   eval ac_cr=\$\'\\r\'
21998 fi
21999 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
22000 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
22001   ac_cs_awk_cr='\\r'
22002 else
22003   ac_cs_awk_cr=$ac_cr
22004 fi
22005
22006 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
22007 _ACEOF
22008
22009
22010 {
22011   echo "cat >conf$$subs.awk <<_ACEOF" &&
22012   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
22013   echo "_ACEOF"
22014 } >conf$$subs.sh ||
22015   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22016 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
22017 ac_delim='%!_!# '
22018 for ac_last_try in false false false false false :; do
22019   . ./conf$$subs.sh ||
22020     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22021
22022   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
22023   if test $ac_delim_n = $ac_delim_num; then
22024     break
22025   elif $ac_last_try; then
22026     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22027   else
22028     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22029   fi
22030 done
22031 rm -f conf$$subs.sh
22032
22033 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22034 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
22035 _ACEOF
22036 sed -n '
22037 h
22038 s/^/S["/; s/!.*/"]=/
22039 p
22040 g
22041 s/^[^!]*!//
22042 :repl
22043 t repl
22044 s/'"$ac_delim"'$//
22045 t delim
22046 :nl
22047 h
22048 s/\(.\{148\}\)..*/\1/
22049 t more1
22050 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
22051 p
22052 n
22053 b repl
22054 :more1
22055 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22056 p
22057 g
22058 s/.\{148\}//
22059 t nl
22060 :delim
22061 h
22062 s/\(.\{148\}\)..*/\1/
22063 t more2
22064 s/["\\]/\\&/g; s/^/"/; s/$/"/
22065 p
22066 b
22067 :more2
22068 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22069 p
22070 g
22071 s/.\{148\}//
22072 t delim
22073 ' <conf$$subs.awk | sed '
22074 /^[^""]/{
22075   N
22076   s/\n//
22077 }
22078 ' >>$CONFIG_STATUS || ac_write_fail=1
22079 rm -f conf$$subs.awk
22080 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22081 _ACAWK
22082 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
22083   for (key in S) S_is_set[key] = 1
22084   FS = "\a"
22085
22086 }
22087 {
22088   line = $ 0
22089   nfields = split(line, field, "@")
22090   substed = 0
22091   len = length(field[1])
22092   for (i = 2; i < nfields; i++) {
22093     key = field[i]
22094     keylen = length(key)
22095     if (S_is_set[key]) {
22096       value = S[key]
22097       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
22098       len += length(value) + length(field[++i])
22099       substed = 1
22100     } else
22101       len += 1 + keylen
22102   }
22103
22104   print line
22105 }
22106
22107 _ACAWK
22108 _ACEOF
22109 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22110 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22111   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
22112 else
22113   cat
22114 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
22115   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
22116 _ACEOF
22117
22118 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
22119 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
22120 # trailing colons and then remove the whole line if VPATH becomes empty
22121 # (actually we leave an empty line to preserve line numbers).
22122 if test "x$srcdir" = x.; then
22123   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
22124 h
22125 s///
22126 s/^/:/
22127 s/[      ]*$/:/
22128 s/:\$(srcdir):/:/g
22129 s/:\${srcdir}:/:/g
22130 s/:@srcdir@:/:/g
22131 s/^:*//
22132 s/:*$//
22133 x
22134 s/\(=[   ]*\).*/\1/
22135 G
22136 s/\n//
22137 s/^[^=]*=[       ]*$//
22138 }'
22139 fi
22140
22141 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22142 fi # test -n "$CONFIG_FILES"
22143
22144 # Set up the scripts for CONFIG_HEADERS section.
22145 # No need to generate them if there are no CONFIG_HEADERS.
22146 # This happens for instance with `./config.status Makefile'.
22147 if test -n "$CONFIG_HEADERS"; then
22148 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
22149 BEGIN {
22150 _ACEOF
22151
22152 # Transform confdefs.h into an awk script `defines.awk', embedded as
22153 # here-document in config.status, that substitutes the proper values into
22154 # config.h.in to produce config.h.
22155
22156 # Create a delimiter string that does not exist in confdefs.h, to ease
22157 # handling of long lines.
22158 ac_delim='%!_!# '
22159 for ac_last_try in false false :; do
22160   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
22161   if test -z "$ac_tt"; then
22162     break
22163   elif $ac_last_try; then
22164     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
22165   else
22166     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22167   fi
22168 done
22169
22170 # For the awk script, D is an array of macro values keyed by name,
22171 # likewise P contains macro parameters if any.  Preserve backslash
22172 # newline sequences.
22173
22174 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
22175 sed -n '
22176 s/.\{148\}/&'"$ac_delim"'/g
22177 t rset
22178 :rset
22179 s/^[     ]*#[    ]*define[       ][      ]*/ /
22180 t def
22181 d
22182 :def
22183 s/\\$//
22184 t bsnl
22185 s/["\\]/\\&/g
22186 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22187 D["\1"]=" \3"/p
22188 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
22189 d
22190 :bsnl
22191 s/["\\]/\\&/g
22192 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22193 D["\1"]=" \3\\\\\\n"\\/p
22194 t cont
22195 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
22196 t cont
22197 d
22198 :cont
22199 n
22200 s/.\{148\}/&'"$ac_delim"'/g
22201 t clear
22202 :clear
22203 s/\\$//
22204 t bsnlc
22205 s/["\\]/\\&/g; s/^/"/; s/$/"/p
22206 d
22207 :bsnlc
22208 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
22209 b cont
22210 ' <confdefs.h | sed '
22211 s/'"$ac_delim"'/"\\\
22212 "/g' >>$CONFIG_STATUS || ac_write_fail=1
22213
22214 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22215   for (key in D) D_is_set[key] = 1
22216   FS = "\a"
22217 }
22218 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
22219   line = \$ 0
22220   split(line, arg, " ")
22221   if (arg[1] == "#") {
22222     defundef = arg[2]
22223     mac1 = arg[3]
22224   } else {
22225     defundef = substr(arg[1], 2)
22226     mac1 = arg[2]
22227   }
22228   split(mac1, mac2, "(") #)
22229   macro = mac2[1]
22230   prefix = substr(line, 1, index(line, defundef) - 1)
22231   if (D_is_set[macro]) {
22232     # Preserve the white space surrounding the "#".
22233     print prefix "define", macro P[macro] D[macro]
22234     next
22235   } else {
22236     # Replace #undef with comments.  This is necessary, for example,
22237     # in the case of _POSIX_SOURCE, which is predefined and required
22238     # on some systems where configure will not decide to define it.
22239     if (defundef == "undef") {
22240       print "/*", prefix defundef, macro, "*/"
22241       next
22242     }
22243   }
22244 }
22245 { print }
22246 _ACAWK
22247 _ACEOF
22248 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22249   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
22250 fi # test -n "$CONFIG_HEADERS"
22251
22252
22253 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
22254 shift
22255 for ac_tag
22256 do
22257   case $ac_tag in
22258   :[FHLC]) ac_mode=$ac_tag; continue;;
22259   esac
22260   case $ac_mode$ac_tag in
22261   :[FHL]*:*);;
22262   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
22263   :[FH]-) ac_tag=-:-;;
22264   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22265   esac
22266   ac_save_IFS=$IFS
22267   IFS=:
22268   set x $ac_tag
22269   IFS=$ac_save_IFS
22270   shift
22271   ac_file=$1
22272   shift
22273
22274   case $ac_mode in
22275   :L) ac_source=$1;;
22276   :[FH])
22277     ac_file_inputs=
22278     for ac_f
22279     do
22280       case $ac_f in
22281       -) ac_f="$ac_tmp/stdin";;
22282       *) # Look for the file first in the build tree, then in the source tree
22283          # (if the path is not absolute).  The absolute path cannot be DOS-style,
22284          # because $ac_f cannot contain `:'.
22285          test -f "$ac_f" ||
22286            case $ac_f in
22287            [\\/$]*) false;;
22288            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22289            esac ||
22290            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
22291       esac
22292       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
22293       as_fn_append ac_file_inputs " '$ac_f'"
22294     done
22295
22296     # Let's still pretend it is `configure' which instantiates (i.e., don't
22297     # use $as_me), people would be surprised to read:
22298     #    /* config.h.  Generated by config.status.  */
22299     configure_input='Generated from '`
22300           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
22301         `' by configure.'
22302     if test x"$ac_file" != x-; then
22303       configure_input="$ac_file.  $configure_input"
22304       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
22305 $as_echo "$as_me: creating $ac_file" >&6;}
22306     fi
22307     # Neutralize special characters interpreted by sed in replacement strings.
22308     case $configure_input in #(
22309     *\&* | *\|* | *\\* )
22310        ac_sed_conf_input=`$as_echo "$configure_input" |
22311        sed 's/[\\\\&|]/\\\\&/g'`;; #(
22312     *) ac_sed_conf_input=$configure_input;;
22313     esac
22314
22315     case $ac_tag in
22316     *:-:* | *:-) cat >"$ac_tmp/stdin" \
22317       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
22318     esac
22319     ;;
22320   esac
22321
22322   ac_dir=`$as_dirname -- "$ac_file" ||
22323 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22324          X"$ac_file" : 'X\(//\)[^/]' \| \
22325          X"$ac_file" : 'X\(//\)$' \| \
22326          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
22327 $as_echo X"$ac_file" |
22328     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22329             s//\1/
22330             q
22331           }
22332           /^X\(\/\/\)[^/].*/{
22333             s//\1/
22334             q
22335           }
22336           /^X\(\/\/\)$/{
22337             s//\1/
22338             q
22339           }
22340           /^X\(\/\).*/{
22341             s//\1/
22342             q
22343           }
22344           s/.*/./; q'`
22345   as_dir="$ac_dir"; as_fn_mkdir_p
22346   ac_builddir=.
22347
22348 case "$ac_dir" in
22349 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
22350 *)
22351   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
22352   # A ".." for each directory in $ac_dir_suffix.
22353   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
22354   case $ac_top_builddir_sub in
22355   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
22356   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
22357   esac ;;
22358 esac
22359 ac_abs_top_builddir=$ac_pwd
22360 ac_abs_builddir=$ac_pwd$ac_dir_suffix
22361 # for backward compatibility:
22362 ac_top_builddir=$ac_top_build_prefix
22363
22364 case $srcdir in
22365   .)  # We are building in place.
22366     ac_srcdir=.
22367     ac_top_srcdir=$ac_top_builddir_sub
22368     ac_abs_top_srcdir=$ac_pwd ;;
22369   [\\/]* | ?:[\\/]* )  # Absolute name.
22370     ac_srcdir=$srcdir$ac_dir_suffix;
22371     ac_top_srcdir=$srcdir
22372     ac_abs_top_srcdir=$srcdir ;;
22373   *) # Relative name.
22374     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
22375     ac_top_srcdir=$ac_top_build_prefix$srcdir
22376     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
22377 esac
22378 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
22379
22380
22381   case $ac_mode in
22382   :F)
22383   #
22384   # CONFIG_FILE
22385   #
22386
22387 _ACEOF
22388
22389 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22390 # If the template does not know about datarootdir, expand it.
22391 # FIXME: This hack should be removed a few years after 2.60.
22392 ac_datarootdir_hack=; ac_datarootdir_seen=
22393 ac_sed_dataroot='
22394 /datarootdir/ {
22395   p
22396   q
22397 }
22398 /@datadir@/p
22399 /@docdir@/p
22400 /@infodir@/p
22401 /@localedir@/p
22402 /@mandir@/p'
22403 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
22404 *datarootdir*) ac_datarootdir_seen=yes;;
22405 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
22406   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
22407 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
22408 _ACEOF
22409 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22410   ac_datarootdir_hack='
22411   s&@datadir@&$datadir&g
22412   s&@docdir@&$docdir&g
22413   s&@infodir@&$infodir&g
22414   s&@localedir@&$localedir&g
22415   s&@mandir@&$mandir&g
22416   s&\\\${datarootdir}&$datarootdir&g' ;;
22417 esac
22418 _ACEOF
22419
22420 # Neutralize VPATH when `$srcdir' = `.'.
22421 # Shell code in configure.ac might set extrasub.
22422 # FIXME: do we really want to maintain this feature?
22423 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22424 ac_sed_extra="$ac_vpsub
22425 $extrasub
22426 _ACEOF
22427 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22428 :t
22429 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22430 s|@configure_input@|$ac_sed_conf_input|;t t
22431 s&@top_builddir@&$ac_top_builddir_sub&;t t
22432 s&@top_build_prefix@&$ac_top_build_prefix&;t t
22433 s&@srcdir@&$ac_srcdir&;t t
22434 s&@abs_srcdir@&$ac_abs_srcdir&;t t
22435 s&@top_srcdir@&$ac_top_srcdir&;t t
22436 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
22437 s&@builddir@&$ac_builddir&;t t
22438 s&@abs_builddir@&$ac_abs_builddir&;t t
22439 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
22440 $ac_datarootdir_hack
22441 "
22442 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
22443   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22444
22445 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
22446   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
22447   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
22448       "$ac_tmp/out"`; test -z "$ac_out"; } &&
22449   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22450 which seems to be undefined.  Please make sure it is defined" >&5
22451 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22452 which seems to be undefined.  Please make sure it is defined" >&2;}
22453
22454   rm -f "$ac_tmp/stdin"
22455   case $ac_file in
22456   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
22457   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
22458   esac \
22459   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22460  ;;
22461   :H)
22462   #
22463   # CONFIG_HEADER
22464   #
22465   if test x"$ac_file" != x-; then
22466     {
22467       $as_echo "/* $configure_input  */" \
22468       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
22469     } >"$ac_tmp/config.h" \
22470       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22471     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
22472       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
22473 $as_echo "$as_me: $ac_file is unchanged" >&6;}
22474     else
22475       rm -f "$ac_file"
22476       mv "$ac_tmp/config.h" "$ac_file" \
22477         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22478     fi
22479   else
22480     $as_echo "/* $configure_input  */" \
22481       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
22482       || as_fn_error $? "could not create -" "$LINENO" 5
22483   fi
22484  ;;
22485
22486   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
22487 $as_echo "$as_me: executing $ac_file commands" >&6;}
22488  ;;
22489   esac
22490
22491
22492   case $ac_file$ac_mode in
22493     "libtool":C)
22494
22495     # See if we are running on zsh, and set the options that allow our
22496     # commands through without removal of \ escapes.
22497     if test -n "${ZSH_VERSION+set}"; then
22498       setopt NO_GLOB_SUBST
22499     fi
22500
22501     cfgfile=${ofile}T
22502     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
22503     $RM "$cfgfile"
22504
22505     cat <<_LT_EOF >> "$cfgfile"
22506 #! $SHELL
22507 # Generated automatically by $as_me ($PACKAGE) $VERSION
22508 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22509 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
22510
22511 # Provide generalized library-building support services.
22512 # Written by Gordon Matzigkeit, 1996
22513
22514 # Copyright (C) 2014 Free Software Foundation, Inc.
22515 # This is free software; see the source for copying conditions.  There is NO
22516 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22517
22518 # GNU Libtool is free software; you can redistribute it and/or modify
22519 # it under the terms of the GNU General Public License as published by
22520 # the Free Software Foundation; either version 2 of of the License, or
22521 # (at your option) any later version.
22522 #
22523 # As a special exception to the GNU General Public License, if you
22524 # distribute this file as part of a program or library that is built
22525 # using GNU Libtool, you may include this file under the  same
22526 # distribution terms that you use for the rest of that program.
22527 #
22528 # GNU Libtool is distributed in the hope that it will be useful, but
22529 # WITHOUT ANY WARRANTY; without even the implied warranty of
22530 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22531 # GNU General Public License for more details.
22532 #
22533 # You should have received a copy of the GNU General Public License
22534 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22535
22536
22537 # The names of the tagged configurations supported by this script.
22538 available_tags=''
22539
22540 # Configured defaults for sys_lib_dlsearch_path munging.
22541 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
22542
22543 # ### BEGIN LIBTOOL CONFIG
22544
22545 # Which release of libtool.m4 was used?
22546 macro_version=$macro_version
22547 macro_revision=$macro_revision
22548
22549 # Whether or not to build shared libraries.
22550 build_libtool_libs=$enable_shared
22551
22552 # Whether or not to build static libraries.
22553 build_old_libs=$enable_static
22554
22555 # What type of objects to build.
22556 pic_mode=$pic_mode
22557
22558 # Whether or not to optimize for fast installation.
22559 fast_install=$enable_fast_install
22560
22561 # Shared archive member basename,for filename based shared library versioning on AIX.
22562 shared_archive_member_spec=$shared_archive_member_spec
22563
22564 # Shell to use when invoking shell scripts.
22565 SHELL=$lt_SHELL
22566
22567 # An echo program that protects backslashes.
22568 ECHO=$lt_ECHO
22569
22570 # The PATH separator for the build system.
22571 PATH_SEPARATOR=$lt_PATH_SEPARATOR
22572
22573 # The host system.
22574 host_alias=$host_alias
22575 host=$host
22576 host_os=$host_os
22577
22578 # The build system.
22579 build_alias=$build_alias
22580 build=$build
22581 build_os=$build_os
22582
22583 # A sed program that does not truncate output.
22584 SED=$lt_SED
22585
22586 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
22587 Xsed="\$SED -e 1s/^X//"
22588
22589 # A grep program that handles long lines.
22590 GREP=$lt_GREP
22591
22592 # An ERE matcher.
22593 EGREP=$lt_EGREP
22594
22595 # A literal string matcher.
22596 FGREP=$lt_FGREP
22597
22598 # A BSD- or MS-compatible name lister.
22599 NM=$lt_NM
22600
22601 # Whether we need soft or hard links.
22602 LN_S=$lt_LN_S
22603
22604 # What is the maximum length of a command?
22605 max_cmd_len=$max_cmd_len
22606
22607 # Object file suffix (normally "o").
22608 objext=$ac_objext
22609
22610 # Executable file suffix (normally "").
22611 exeext=$exeext
22612
22613 # whether the shell understands "unset".
22614 lt_unset=$lt_unset
22615
22616 # turn spaces into newlines.
22617 SP2NL=$lt_lt_SP2NL
22618
22619 # turn newlines into spaces.
22620 NL2SP=$lt_lt_NL2SP
22621
22622 # convert \$build file names to \$host format.
22623 to_host_file_cmd=$lt_cv_to_host_file_cmd
22624
22625 # convert \$build files to toolchain format.
22626 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
22627
22628 # An object symbol dumper.
22629 OBJDUMP=$lt_OBJDUMP
22630
22631 # Method to check whether dependent libraries are shared objects.
22632 deplibs_check_method=$lt_deplibs_check_method
22633
22634 # Command to use when deplibs_check_method = "file_magic".
22635 file_magic_cmd=$lt_file_magic_cmd
22636
22637 # How to find potential files when deplibs_check_method = "file_magic".
22638 file_magic_glob=$lt_file_magic_glob
22639
22640 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
22641 want_nocaseglob=$lt_want_nocaseglob
22642
22643 # DLL creation program.
22644 DLLTOOL=$lt_DLLTOOL
22645
22646 # Command to associate shared and link libraries.
22647 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
22648
22649 # The archiver.
22650 AR=$lt_AR
22651
22652 # Flags to create an archive.
22653 AR_FLAGS=$lt_AR_FLAGS
22654
22655 # How to feed a file listing to the archiver.
22656 archiver_list_spec=$lt_archiver_list_spec
22657
22658 # A symbol stripping program.
22659 STRIP=$lt_STRIP
22660
22661 # Commands used to install an old-style archive.
22662 RANLIB=$lt_RANLIB
22663 old_postinstall_cmds=$lt_old_postinstall_cmds
22664 old_postuninstall_cmds=$lt_old_postuninstall_cmds
22665
22666 # Whether to use a lock for old archive extraction.
22667 lock_old_archive_extraction=$lock_old_archive_extraction
22668
22669 # A C compiler.
22670 LTCC=$lt_CC
22671
22672 # LTCC compiler flags.
22673 LTCFLAGS=$lt_CFLAGS
22674
22675 # Take the output of nm and produce a listing of raw symbols and C names.
22676 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
22677
22678 # Transform the output of nm in a proper C declaration.
22679 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
22680
22681 # Transform the output of nm into a list of symbols to manually relocate.
22682 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
22683
22684 # Transform the output of nm in a C name address pair.
22685 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
22686
22687 # Transform the output of nm in a C name address pair when lib prefix is needed.
22688 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
22689
22690 # The name lister interface.
22691 nm_interface=$lt_lt_cv_nm_interface
22692
22693 # Specify filename containing input files for \$NM.
22694 nm_file_list_spec=$lt_nm_file_list_spec
22695
22696 # The root where to search for dependent libraries,and where our libraries should be installed.
22697 lt_sysroot=$lt_sysroot
22698
22699 # Command to truncate a binary pipe.
22700 lt_truncate_bin=$lt_lt_cv_truncate_bin
22701
22702 # The name of the directory that contains temporary libtool files.
22703 objdir=$objdir
22704
22705 # Used to examine libraries when file_magic_cmd begins with "file".
22706 MAGIC_CMD=$MAGIC_CMD
22707
22708 # Must we lock files when doing compilation?
22709 need_locks=$lt_need_locks
22710
22711 # Manifest tool.
22712 MANIFEST_TOOL=$lt_MANIFEST_TOOL
22713
22714 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
22715 DSYMUTIL=$lt_DSYMUTIL
22716
22717 # Tool to change global to local symbols on Mac OS X.
22718 NMEDIT=$lt_NMEDIT
22719
22720 # Tool to manipulate fat objects and archives on Mac OS X.
22721 LIPO=$lt_LIPO
22722
22723 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
22724 OTOOL=$lt_OTOOL
22725
22726 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
22727 OTOOL64=$lt_OTOOL64
22728
22729 # Old archive suffix (normally "a").
22730 libext=$libext
22731
22732 # Shared library suffix (normally ".so").
22733 shrext_cmds=$lt_shrext_cmds
22734
22735 # The commands to extract the exported symbol list from a shared archive.
22736 extract_expsyms_cmds=$lt_extract_expsyms_cmds
22737
22738 # Variables whose values should be saved in libtool wrapper scripts and
22739 # restored at link time.
22740 variables_saved_for_relink=$lt_variables_saved_for_relink
22741
22742 # Do we need the "lib" prefix for modules?
22743 need_lib_prefix=$need_lib_prefix
22744
22745 # Do we need a version for libraries?
22746 need_version=$need_version
22747
22748 # Library versioning type.
22749 version_type=$version_type
22750
22751 # Shared library runtime path variable.
22752 runpath_var=$runpath_var
22753
22754 # Shared library path variable.
22755 shlibpath_var=$shlibpath_var
22756
22757 # Is shlibpath searched before the hard-coded library search path?
22758 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
22759
22760 # Format of library name prefix.
22761 libname_spec=$lt_libname_spec
22762
22763 # List of archive names.  First name is the real one, the rest are links.
22764 # The last name is the one that the linker finds with -lNAME
22765 library_names_spec=$lt_library_names_spec
22766
22767 # The coded name of the library, if different from the real name.
22768 soname_spec=$lt_soname_spec
22769
22770 # Permission mode override for installation of shared libraries.
22771 install_override_mode=$lt_install_override_mode
22772
22773 # Command to use after installation of a shared archive.
22774 postinstall_cmds=$lt_postinstall_cmds
22775
22776 # Command to use after uninstallation of a shared archive.
22777 postuninstall_cmds=$lt_postuninstall_cmds
22778
22779 # Commands used to finish a libtool library installation in a directory.
22780 finish_cmds=$lt_finish_cmds
22781
22782 # As "finish_cmds", except a single script fragment to be evaled but
22783 # not shown.
22784 finish_eval=$lt_finish_eval
22785
22786 # Whether we should hardcode library paths into libraries.
22787 hardcode_into_libs=$hardcode_into_libs
22788
22789 # Compile-time system search path for libraries.
22790 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
22791
22792 # Detected run-time system search path for libraries.
22793 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
22794
22795 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
22796 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
22797
22798 # Whether dlopen is supported.
22799 dlopen_support=$enable_dlopen
22800
22801 # Whether dlopen of programs is supported.
22802 dlopen_self=$enable_dlopen_self
22803
22804 # Whether dlopen of statically linked programs is supported.
22805 dlopen_self_static=$enable_dlopen_self_static
22806
22807 # Commands to strip libraries.
22808 old_striplib=$lt_old_striplib
22809 striplib=$lt_striplib
22810
22811
22812 # The linker used to build libraries.
22813 LD=$lt_LD
22814
22815 # How to create reloadable object files.
22816 reload_flag=$lt_reload_flag
22817 reload_cmds=$lt_reload_cmds
22818
22819 # Commands used to build an old-style archive.
22820 old_archive_cmds=$lt_old_archive_cmds
22821
22822 # A language specific compiler.
22823 CC=$lt_compiler
22824
22825 # Is the compiler the GNU compiler?
22826 with_gcc=$GCC
22827
22828 # Compiler flag to turn off builtin functions.
22829 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
22830
22831 # Additional compiler flags for building library objects.
22832 pic_flag=$lt_lt_prog_compiler_pic
22833
22834 # How to pass a linker flag through the compiler.
22835 wl=$lt_lt_prog_compiler_wl
22836
22837 # Compiler flag to prevent dynamic linking.
22838 link_static_flag=$lt_lt_prog_compiler_static
22839
22840 # Does compiler simultaneously support -c and -o options?
22841 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
22842
22843 # Whether or not to add -lc for building shared libraries.
22844 build_libtool_need_lc=$archive_cmds_need_lc
22845
22846 # Whether or not to disallow shared libs when runtime libs are static.
22847 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
22848
22849 # Compiler flag to allow reflexive dlopens.
22850 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
22851
22852 # Compiler flag to generate shared objects directly from archives.
22853 whole_archive_flag_spec=$lt_whole_archive_flag_spec
22854
22855 # Whether the compiler copes with passing no objects directly.
22856 compiler_needs_object=$lt_compiler_needs_object
22857
22858 # Create an old-style archive from a shared archive.
22859 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
22860
22861 # Create a temporary old-style archive to link instead of a shared archive.
22862 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
22863
22864 # Commands used to build a shared archive.
22865 archive_cmds=$lt_archive_cmds
22866 archive_expsym_cmds=$lt_archive_expsym_cmds
22867
22868 # Commands used to build a loadable module if different from building
22869 # a shared archive.
22870 module_cmds=$lt_module_cmds
22871 module_expsym_cmds=$lt_module_expsym_cmds
22872
22873 # Whether we are building with GNU ld or not.
22874 with_gnu_ld=$lt_with_gnu_ld
22875
22876 # Flag that allows shared libraries with undefined symbols to be built.
22877 allow_undefined_flag=$lt_allow_undefined_flag
22878
22879 # Flag that enforces no undefined symbols.
22880 no_undefined_flag=$lt_no_undefined_flag
22881
22882 # Flag to hardcode \$libdir into a binary during linking.
22883 # This must work even if \$libdir does not exist
22884 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
22885
22886 # Whether we need a single "-rpath" flag with a separated argument.
22887 hardcode_libdir_separator=$lt_hardcode_libdir_separator
22888
22889 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
22890 # DIR into the resulting binary.
22891 hardcode_direct=$hardcode_direct
22892
22893 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
22894 # DIR into the resulting binary and the resulting library dependency is
22895 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
22896 # library is relocated.
22897 hardcode_direct_absolute=$hardcode_direct_absolute
22898
22899 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
22900 # into the resulting binary.
22901 hardcode_minus_L=$hardcode_minus_L
22902
22903 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
22904 # into the resulting binary.
22905 hardcode_shlibpath_var=$hardcode_shlibpath_var
22906
22907 # Set to "yes" if building a shared library automatically hardcodes DIR
22908 # into the library and all subsequent libraries and executables linked
22909 # against it.
22910 hardcode_automatic=$hardcode_automatic
22911
22912 # Set to yes if linker adds runtime paths of dependent libraries
22913 # to runtime path list.
22914 inherit_rpath=$inherit_rpath
22915
22916 # Whether libtool must link a program against all its dependency libraries.
22917 link_all_deplibs=$link_all_deplibs
22918
22919 # Set to "yes" if exported symbols are required.
22920 always_export_symbols=$always_export_symbols
22921
22922 # The commands to list exported symbols.
22923 export_symbols_cmds=$lt_export_symbols_cmds
22924
22925 # Symbols that should not be listed in the preloaded symbols.
22926 exclude_expsyms=$lt_exclude_expsyms
22927
22928 # Symbols that must always be exported.
22929 include_expsyms=$lt_include_expsyms
22930
22931 # Commands necessary for linking programs (against libraries) with templates.
22932 prelink_cmds=$lt_prelink_cmds
22933
22934 # Commands necessary for finishing linking programs.
22935 postlink_cmds=$lt_postlink_cmds
22936
22937 # Specify filename containing input files.
22938 file_list_spec=$lt_file_list_spec
22939
22940 # How to hardcode a shared library path into an executable.
22941 hardcode_action=$hardcode_action
22942
22943 # ### END LIBTOOL CONFIG
22944
22945 _LT_EOF
22946
22947     cat <<'_LT_EOF' >> "$cfgfile"
22948
22949 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
22950
22951 # func_munge_path_list VARIABLE PATH
22952 # -----------------------------------
22953 # VARIABLE is name of variable containing _space_ separated list of
22954 # directories to be munged by the contents of PATH, which is string
22955 # having a format:
22956 # "DIR[:DIR]:"
22957 #       string "DIR[ DIR]" will be prepended to VARIABLE
22958 # ":DIR[:DIR]"
22959 #       string "DIR[ DIR]" will be appended to VARIABLE
22960 # "DIRP[:DIRP]::[DIRA:]DIRA"
22961 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
22962 #       "DIRA[ DIRA]" will be appended to VARIABLE
22963 # "DIR[:DIR]"
22964 #       VARIABLE will be replaced by "DIR[ DIR]"
22965 func_munge_path_list ()
22966 {
22967     case x$2 in
22968     x)
22969         ;;
22970     *:)
22971         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
22972         ;;
22973     x:*)
22974         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
22975         ;;
22976     *::*)
22977         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
22978         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
22979         ;;
22980     *)
22981         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
22982         ;;
22983     esac
22984 }
22985
22986
22987 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
22988 func_cc_basename ()
22989 {
22990     for cc_temp in $*""; do
22991       case $cc_temp in
22992         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
22993         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
22994         \-*) ;;
22995         *) break;;
22996       esac
22997     done
22998     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
22999 }
23000
23001
23002 # ### END FUNCTIONS SHARED WITH CONFIGURE
23003
23004 _LT_EOF
23005
23006   case $host_os in
23007   aix3*)
23008     cat <<\_LT_EOF >> "$cfgfile"
23009 # AIX sometimes has problems with the GCC collect2 program.  For some
23010 # reason, if we set the COLLECT_NAMES environment variable, the problems
23011 # vanish in a puff of smoke.
23012 if test set != "${COLLECT_NAMES+set}"; then
23013   COLLECT_NAMES=
23014   export COLLECT_NAMES
23015 fi
23016 _LT_EOF
23017     ;;
23018   esac
23019
23020
23021 ltmain=$ac_aux_dir/ltmain.sh
23022
23023
23024   # We use sed instead of cat because bash on DJGPP gets confused if
23025   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
23026   # text mode, it properly converts lines to CR/LF.  This bash problem
23027   # is reportedly fixed, but why not run on old versions too?
23028   sed '$q' "$ltmain" >> "$cfgfile" \
23029      || (rm -f "$cfgfile"; exit 1)
23030
23031    mv -f "$cfgfile" "$ofile" ||
23032     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
23033   chmod +x "$ofile"
23034
23035  ;;
23036     "disable-rpath":C)
23037         sed < libtool > libtool-2 \
23038         's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
23039         mv libtool-2 libtool
23040         chmod 755 libtool
23041         libtool="./libtool"
23042          ;;
23043
23044   esac
23045 done # for ac_tag
23046
23047
23048 as_fn_exit 0
23049 _ACEOF
23050 ac_clean_files=$ac_clean_files_save
23051
23052 test $ac_write_fail = 0 ||
23053   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
23054
23055
23056 # configure is writing to config.log, and then calls config.status.
23057 # config.status does its own redirection, appending to config.log.
23058 # Unfortunately, on DOS this fails, as config.log is still kept open
23059 # by configure, so config.status won't be able to write to it; its
23060 # output is simply discarded.  So we exec the FD to /dev/null,
23061 # effectively closing config.log, so it can be properly (re)opened and
23062 # appended to by config.status.  When coming back to configure, we
23063 # need to make the FD available again.
23064 if test "$no_create" != yes; then
23065   ac_cs_success=:
23066   ac_config_status_args=
23067   test "$silent" = yes &&
23068     ac_config_status_args="$ac_config_status_args --quiet"
23069   exec 5>/dev/null
23070   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23071   exec 5>>config.log
23072   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23073   # would make configure fail if this is the last instruction.
23074   $ac_cs_success || as_fn_exit 1
23075 fi
23076 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
23077   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
23078 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
23079 fi
23080