]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/unbound/configure
Upgrade Unbound to 1.7.2. 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.2.
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.2'
594 PACKAGE_STRING='unbound 1.7.2'
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_ed448
863 enable_event_api
864 enable_tfo_client
865 enable_tfo_server
866 with_libevent
867 with_libexpat
868 with_libhiredis
869 enable_static_exe
870 enable_systemd
871 enable_lock_checks
872 enable_allsymbols
873 enable_dnstap
874 with_dnstap_socket_path
875 with_protobuf_c
876 with_libfstrm
877 enable_dnscrypt
878 with_libsodium
879 enable_cachedb
880 enable_ipsecmod
881 with_libunbound_only
882 '
883       ac_precious_vars='build_alias
884 host_alias
885 target_alias
886 CC
887 CFLAGS
888 LDFLAGS
889 LIBS
890 CPPFLAGS
891 CPP
892 YACC
893 YFLAGS
894 LT_SYS_LIBRARY_PATH
895 PYTHON_VERSION
896 PKG_CONFIG
897 PKG_CONFIG_PATH
898 PKG_CONFIG_LIBDIR
899 SYSTEMD_CFLAGS
900 SYSTEMD_LIBS
901 SYSTEMD_DAEMON_CFLAGS
902 SYSTEMD_DAEMON_LIBS'
903
904
905 # Initialize some variables set by options.
906 ac_init_help=
907 ac_init_version=false
908 ac_unrecognized_opts=
909 ac_unrecognized_sep=
910 # The variables have the same names as the options, with
911 # dashes changed to underlines.
912 cache_file=/dev/null
913 exec_prefix=NONE
914 no_create=
915 no_recursion=
916 prefix=NONE
917 program_prefix=NONE
918 program_suffix=NONE
919 program_transform_name=s,x,x,
920 silent=
921 site=
922 srcdir=
923 verbose=
924 x_includes=NONE
925 x_libraries=NONE
926
927 # Installation directory options.
928 # These are left unexpanded so users can "make install exec_prefix=/foo"
929 # and all the variables that are supposed to be based on exec_prefix
930 # by default will actually change.
931 # Use braces instead of parens because sh, perl, etc. also accept them.
932 # (The list follows the same order as the GNU Coding Standards.)
933 bindir='${exec_prefix}/bin'
934 sbindir='${exec_prefix}/sbin'
935 libexecdir='${exec_prefix}/libexec'
936 datarootdir='${prefix}/share'
937 datadir='${datarootdir}'
938 sysconfdir='${prefix}/etc'
939 sharedstatedir='${prefix}/com'
940 localstatedir='${prefix}/var'
941 includedir='${prefix}/include'
942 oldincludedir='/usr/include'
943 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
944 infodir='${datarootdir}/info'
945 htmldir='${docdir}'
946 dvidir='${docdir}'
947 pdfdir='${docdir}'
948 psdir='${docdir}'
949 libdir='${exec_prefix}/lib'
950 localedir='${datarootdir}/locale'
951 mandir='${datarootdir}/man'
952
953 ac_prev=
954 ac_dashdash=
955 for ac_option
956 do
957   # If the previous option needs an argument, assign it.
958   if test -n "$ac_prev"; then
959     eval $ac_prev=\$ac_option
960     ac_prev=
961     continue
962   fi
963
964   case $ac_option in
965   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
966   *=)   ac_optarg= ;;
967   *)    ac_optarg=yes ;;
968   esac
969
970   # Accept the important Cygnus configure options, so we can diagnose typos.
971
972   case $ac_dashdash$ac_option in
973   --)
974     ac_dashdash=yes ;;
975
976   -bindir | --bindir | --bindi | --bind | --bin | --bi)
977     ac_prev=bindir ;;
978   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
979     bindir=$ac_optarg ;;
980
981   -build | --build | --buil | --bui | --bu)
982     ac_prev=build_alias ;;
983   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
984     build_alias=$ac_optarg ;;
985
986   -cache-file | --cache-file | --cache-fil | --cache-fi \
987   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
988     ac_prev=cache_file ;;
989   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
990   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
991     cache_file=$ac_optarg ;;
992
993   --config-cache | -C)
994     cache_file=config.cache ;;
995
996   -datadir | --datadir | --datadi | --datad)
997     ac_prev=datadir ;;
998   -datadir=* | --datadir=* | --datadi=* | --datad=*)
999     datadir=$ac_optarg ;;
1000
1001   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1002   | --dataroo | --dataro | --datar)
1003     ac_prev=datarootdir ;;
1004   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1005   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1006     datarootdir=$ac_optarg ;;
1007
1008   -disable-* | --disable-*)
1009     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1010     # Reject names that are not valid shell variable names.
1011     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1012       as_fn_error $? "invalid feature name: $ac_useropt"
1013     ac_useropt_orig=$ac_useropt
1014     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1015     case $ac_user_opts in
1016       *"
1017 "enable_$ac_useropt"
1018 "*) ;;
1019       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1020          ac_unrecognized_sep=', ';;
1021     esac
1022     eval enable_$ac_useropt=no ;;
1023
1024   -docdir | --docdir | --docdi | --doc | --do)
1025     ac_prev=docdir ;;
1026   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1027     docdir=$ac_optarg ;;
1028
1029   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1030     ac_prev=dvidir ;;
1031   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1032     dvidir=$ac_optarg ;;
1033
1034   -enable-* | --enable-*)
1035     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1036     # Reject names that are not valid shell variable names.
1037     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1038       as_fn_error $? "invalid feature name: $ac_useropt"
1039     ac_useropt_orig=$ac_useropt
1040     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1041     case $ac_user_opts in
1042       *"
1043 "enable_$ac_useropt"
1044 "*) ;;
1045       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1046          ac_unrecognized_sep=', ';;
1047     esac
1048     eval enable_$ac_useropt=\$ac_optarg ;;
1049
1050   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1051   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1052   | --exec | --exe | --ex)
1053     ac_prev=exec_prefix ;;
1054   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1055   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1056   | --exec=* | --exe=* | --ex=*)
1057     exec_prefix=$ac_optarg ;;
1058
1059   -gas | --gas | --ga | --g)
1060     # Obsolete; use --with-gas.
1061     with_gas=yes ;;
1062
1063   -help | --help | --hel | --he | -h)
1064     ac_init_help=long ;;
1065   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1066     ac_init_help=recursive ;;
1067   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1068     ac_init_help=short ;;
1069
1070   -host | --host | --hos | --ho)
1071     ac_prev=host_alias ;;
1072   -host=* | --host=* | --hos=* | --ho=*)
1073     host_alias=$ac_optarg ;;
1074
1075   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1076     ac_prev=htmldir ;;
1077   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1078   | --ht=*)
1079     htmldir=$ac_optarg ;;
1080
1081   -includedir | --includedir | --includedi | --included | --include \
1082   | --includ | --inclu | --incl | --inc)
1083     ac_prev=includedir ;;
1084   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1085   | --includ=* | --inclu=* | --incl=* | --inc=*)
1086     includedir=$ac_optarg ;;
1087
1088   -infodir | --infodir | --infodi | --infod | --info | --inf)
1089     ac_prev=infodir ;;
1090   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1091     infodir=$ac_optarg ;;
1092
1093   -libdir | --libdir | --libdi | --libd)
1094     ac_prev=libdir ;;
1095   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1096     libdir=$ac_optarg ;;
1097
1098   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1099   | --libexe | --libex | --libe)
1100     ac_prev=libexecdir ;;
1101   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1102   | --libexe=* | --libex=* | --libe=*)
1103     libexecdir=$ac_optarg ;;
1104
1105   -localedir | --localedir | --localedi | --localed | --locale)
1106     ac_prev=localedir ;;
1107   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1108     localedir=$ac_optarg ;;
1109
1110   -localstatedir | --localstatedir | --localstatedi | --localstated \
1111   | --localstate | --localstat | --localsta | --localst | --locals)
1112     ac_prev=localstatedir ;;
1113   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1114   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1115     localstatedir=$ac_optarg ;;
1116
1117   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1118     ac_prev=mandir ;;
1119   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1120     mandir=$ac_optarg ;;
1121
1122   -nfp | --nfp | --nf)
1123     # Obsolete; use --without-fp.
1124     with_fp=no ;;
1125
1126   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1127   | --no-cr | --no-c | -n)
1128     no_create=yes ;;
1129
1130   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1131   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1132     no_recursion=yes ;;
1133
1134   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1135   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1136   | --oldin | --oldi | --old | --ol | --o)
1137     ac_prev=oldincludedir ;;
1138   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1139   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1140   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1141     oldincludedir=$ac_optarg ;;
1142
1143   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1144     ac_prev=prefix ;;
1145   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1146     prefix=$ac_optarg ;;
1147
1148   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1149   | --program-pre | --program-pr | --program-p)
1150     ac_prev=program_prefix ;;
1151   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1152   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1153     program_prefix=$ac_optarg ;;
1154
1155   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1156   | --program-suf | --program-su | --program-s)
1157     ac_prev=program_suffix ;;
1158   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1159   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1160     program_suffix=$ac_optarg ;;
1161
1162   -program-transform-name | --program-transform-name \
1163   | --program-transform-nam | --program-transform-na \
1164   | --program-transform-n | --program-transform- \
1165   | --program-transform | --program-transfor \
1166   | --program-transfo | --program-transf \
1167   | --program-trans | --program-tran \
1168   | --progr-tra | --program-tr | --program-t)
1169     ac_prev=program_transform_name ;;
1170   -program-transform-name=* | --program-transform-name=* \
1171   | --program-transform-nam=* | --program-transform-na=* \
1172   | --program-transform-n=* | --program-transform-=* \
1173   | --program-transform=* | --program-transfor=* \
1174   | --program-transfo=* | --program-transf=* \
1175   | --program-trans=* | --program-tran=* \
1176   | --progr-tra=* | --program-tr=* | --program-t=*)
1177     program_transform_name=$ac_optarg ;;
1178
1179   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1180     ac_prev=pdfdir ;;
1181   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1182     pdfdir=$ac_optarg ;;
1183
1184   -psdir | --psdir | --psdi | --psd | --ps)
1185     ac_prev=psdir ;;
1186   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1187     psdir=$ac_optarg ;;
1188
1189   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1190   | -silent | --silent | --silen | --sile | --sil)
1191     silent=yes ;;
1192
1193   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1194     ac_prev=sbindir ;;
1195   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1196   | --sbi=* | --sb=*)
1197     sbindir=$ac_optarg ;;
1198
1199   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1200   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1201   | --sharedst | --shareds | --shared | --share | --shar \
1202   | --sha | --sh)
1203     ac_prev=sharedstatedir ;;
1204   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1205   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1206   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1207   | --sha=* | --sh=*)
1208     sharedstatedir=$ac_optarg ;;
1209
1210   -site | --site | --sit)
1211     ac_prev=site ;;
1212   -site=* | --site=* | --sit=*)
1213     site=$ac_optarg ;;
1214
1215   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1216     ac_prev=srcdir ;;
1217   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1218     srcdir=$ac_optarg ;;
1219
1220   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1221   | --syscon | --sysco | --sysc | --sys | --sy)
1222     ac_prev=sysconfdir ;;
1223   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1224   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1225     sysconfdir=$ac_optarg ;;
1226
1227   -target | --target | --targe | --targ | --tar | --ta | --t)
1228     ac_prev=target_alias ;;
1229   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1230     target_alias=$ac_optarg ;;
1231
1232   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1233     verbose=yes ;;
1234
1235   -version | --version | --versio | --versi | --vers | -V)
1236     ac_init_version=: ;;
1237
1238   -with-* | --with-*)
1239     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1240     # Reject names that are not valid shell variable names.
1241     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1242       as_fn_error $? "invalid package name: $ac_useropt"
1243     ac_useropt_orig=$ac_useropt
1244     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1245     case $ac_user_opts in
1246       *"
1247 "with_$ac_useropt"
1248 "*) ;;
1249       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1250          ac_unrecognized_sep=', ';;
1251     esac
1252     eval with_$ac_useropt=\$ac_optarg ;;
1253
1254   -without-* | --without-*)
1255     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1256     # Reject names that are not valid shell variable names.
1257     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1258       as_fn_error $? "invalid package name: $ac_useropt"
1259     ac_useropt_orig=$ac_useropt
1260     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1261     case $ac_user_opts in
1262       *"
1263 "with_$ac_useropt"
1264 "*) ;;
1265       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1266          ac_unrecognized_sep=', ';;
1267     esac
1268     eval with_$ac_useropt=no ;;
1269
1270   --x)
1271     # Obsolete; use --with-x.
1272     with_x=yes ;;
1273
1274   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1275   | --x-incl | --x-inc | --x-in | --x-i)
1276     ac_prev=x_includes ;;
1277   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1278   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1279     x_includes=$ac_optarg ;;
1280
1281   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1282   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1283     ac_prev=x_libraries ;;
1284   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1285   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1286     x_libraries=$ac_optarg ;;
1287
1288   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1289 Try \`$0 --help' for more information"
1290     ;;
1291
1292   *=*)
1293     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1294     # Reject names that are not valid shell variable names.
1295     case $ac_envvar in #(
1296       '' | [0-9]* | *[!_$as_cr_alnum]* )
1297       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1298     esac
1299     eval $ac_envvar=\$ac_optarg
1300     export $ac_envvar ;;
1301
1302   *)
1303     # FIXME: should be removed in autoconf 3.0.
1304     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1305     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1306       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1307     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1308     ;;
1309
1310   esac
1311 done
1312
1313 if test -n "$ac_prev"; then
1314   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1315   as_fn_error $? "missing argument to $ac_option"
1316 fi
1317
1318 if test -n "$ac_unrecognized_opts"; then
1319   case $enable_option_checking in
1320     no) ;;
1321     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1322     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1323   esac
1324 fi
1325
1326 # Check all directory arguments for consistency.
1327 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1328                 datadir sysconfdir sharedstatedir localstatedir includedir \
1329                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1330                 libdir localedir mandir
1331 do
1332   eval ac_val=\$$ac_var
1333   # Remove trailing slashes.
1334   case $ac_val in
1335     */ )
1336       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1337       eval $ac_var=\$ac_val;;
1338   esac
1339   # Be sure to have absolute directory names.
1340   case $ac_val in
1341     [\\/$]* | ?:[\\/]* )  continue;;
1342     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1343   esac
1344   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1345 done
1346
1347 # There might be people who depend on the old broken behavior: `$host'
1348 # used to hold the argument of --host etc.
1349 # FIXME: To remove some day.
1350 build=$build_alias
1351 host=$host_alias
1352 target=$target_alias
1353
1354 # FIXME: To remove some day.
1355 if test "x$host_alias" != x; then
1356   if test "x$build_alias" = x; then
1357     cross_compiling=maybe
1358   elif test "x$build_alias" != "x$host_alias"; then
1359     cross_compiling=yes
1360   fi
1361 fi
1362
1363 ac_tool_prefix=
1364 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1365
1366 test "$silent" = yes && exec 6>/dev/null
1367
1368
1369 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1370 ac_ls_di=`ls -di .` &&
1371 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1372   as_fn_error $? "working directory cannot be determined"
1373 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1374   as_fn_error $? "pwd does not report name of working directory"
1375
1376
1377 # Find the source files, if location was not specified.
1378 if test -z "$srcdir"; then
1379   ac_srcdir_defaulted=yes
1380   # Try the directory containing this script, then the parent directory.
1381   ac_confdir=`$as_dirname -- "$as_myself" ||
1382 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1383          X"$as_myself" : 'X\(//\)[^/]' \| \
1384          X"$as_myself" : 'X\(//\)$' \| \
1385          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1386 $as_echo X"$as_myself" |
1387     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1388             s//\1/
1389             q
1390           }
1391           /^X\(\/\/\)[^/].*/{
1392             s//\1/
1393             q
1394           }
1395           /^X\(\/\/\)$/{
1396             s//\1/
1397             q
1398           }
1399           /^X\(\/\).*/{
1400             s//\1/
1401             q
1402           }
1403           s/.*/./; q'`
1404   srcdir=$ac_confdir
1405   if test ! -r "$srcdir/$ac_unique_file"; then
1406     srcdir=..
1407   fi
1408 else
1409   ac_srcdir_defaulted=no
1410 fi
1411 if test ! -r "$srcdir/$ac_unique_file"; then
1412   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1413   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1414 fi
1415 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1416 ac_abs_confdir=`(
1417         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1418         pwd)`
1419 # When building in place, set srcdir=.
1420 if test "$ac_abs_confdir" = "$ac_pwd"; then
1421   srcdir=.
1422 fi
1423 # Remove unnecessary trailing slashes from srcdir.
1424 # Double slashes in file names in object file debugging info
1425 # mess up M-x gdb in Emacs.
1426 case $srcdir in
1427 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1428 esac
1429 for ac_var in $ac_precious_vars; do
1430   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1431   eval ac_env_${ac_var}_value=\$${ac_var}
1432   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1433   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1434 done
1435
1436 #
1437 # Report the --help message.
1438 #
1439 if test "$ac_init_help" = "long"; then
1440   # Omit some internal or obsolete options to make the list less imposing.
1441   # This message is too long to be a string in the A/UX 3.1 sh.
1442   cat <<_ACEOF
1443 \`configure' configures unbound 1.7.2 to adapt to many kinds of systems.
1444
1445 Usage: $0 [OPTION]... [VAR=VALUE]...
1446
1447 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1448 VAR=VALUE.  See below for descriptions of some of the useful variables.
1449
1450 Defaults for the options are specified in brackets.
1451
1452 Configuration:
1453   -h, --help              display this help and exit
1454       --help=short        display options specific to this package
1455       --help=recursive    display the short help of all the included packages
1456   -V, --version           display version information and exit
1457   -q, --quiet, --silent   do not print \`checking ...' messages
1458       --cache-file=FILE   cache test results in FILE [disabled]
1459   -C, --config-cache      alias for \`--cache-file=config.cache'
1460   -n, --no-create         do not create output files
1461       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1462
1463 Installation directories:
1464   --prefix=PREFIX         install architecture-independent files in PREFIX
1465                           [$ac_default_prefix]
1466   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1467                           [PREFIX]
1468
1469 By default, \`make install' will install all the files in
1470 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1471 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1472 for instance \`--prefix=\$HOME'.
1473
1474 For better control, use the options below.
1475
1476 Fine tuning of the installation directories:
1477   --bindir=DIR            user executables [EPREFIX/bin]
1478   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1479   --libexecdir=DIR        program executables [EPREFIX/libexec]
1480   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1481   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1482   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1483   --libdir=DIR            object code libraries [EPREFIX/lib]
1484   --includedir=DIR        C header files [PREFIX/include]
1485   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1486   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1487   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1488   --infodir=DIR           info documentation [DATAROOTDIR/info]
1489   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1490   --mandir=DIR            man documentation [DATAROOTDIR/man]
1491   --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1492   --htmldir=DIR           html documentation [DOCDIR]
1493   --dvidir=DIR            dvi documentation [DOCDIR]
1494   --pdfdir=DIR            pdf documentation [DOCDIR]
1495   --psdir=DIR             ps documentation [DOCDIR]
1496 _ACEOF
1497
1498   cat <<\_ACEOF
1499
1500 System types:
1501   --build=BUILD     configure for building on BUILD [guessed]
1502   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1503 _ACEOF
1504 fi
1505
1506 if test -n "$ac_init_help"; then
1507   case $ac_init_help in
1508      short | recursive ) echo "Configuration of unbound 1.7.2:";;
1509    esac
1510   cat <<\_ACEOF
1511
1512 Optional Features:
1513   --disable-option-checking  ignore unrecognized --enable/--with options
1514   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1515   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1516   --enable-checking       Enable warnings, asserts, makefile-dependencies
1517   --enable-debug          same as enable-checking
1518   --disable-flto          Disable link-time optimization (gcc specific option)
1519   --enable-pie            Enable Position-Independent Executable (eg. to fully
1520                           benefit from ASLR, small performance penalty)
1521   --enable-relro-now      Enable full relocation binding at load-time (RELRO
1522                           NOW, to protect GOT and .dtor areas)
1523   --enable-shared[=PKGS]  build shared libraries [default=yes]
1524   --enable-static[=PKGS]  build static libraries [default=yes]
1525   --enable-fast-install[=PKGS]
1526                           optimize for fast installation [default=yes]
1527   --disable-libtool-lock  avoid locking (might break parallel builds)
1528   --disable-rpath         disable hardcoded rpath (default=enabled)
1529   --disable-largefile     omit support for large files
1530   --enable-alloc-checks   enable to memory allocation statistics, for debug
1531                           purposes
1532   --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1533                           purposes
1534   --enable-alloc-nonregional
1535                           enable nonregional allocs, slow but exposes regional
1536                           allocations to other memory purifiers, for debug
1537                           purposes
1538   --disable-swig-version-check
1539                           Disable swig version check to build python modules
1540                           with older swig even though that is unreliable
1541   --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1542                           support
1543   --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1544   --enable-subnet         Enable client subnet
1545   --disable-gost          Disable GOST support
1546   --disable-ecdsa         Disable ECDSA support
1547   --disable-dsa           Disable DSA support
1548   --disable-ed25519       Disable ED25519 support
1549   --disable-ed448         Disable ED448 support
1550   --enable-event-api      Enable (experimental) pluggable event base
1551                           libunbound API installed to unbound-event.h
1552   --enable-tfo-client     Enable TCP Fast Open for client mode
1553   --enable-tfo-server     Enable TCP Fast Open for server mode
1554   --enable-static-exe     enable to compile executables statically against
1555                           (event) libs, for debug purposes
1556   --enable-systemd        compile with systemd support
1557   --enable-lock-checks    enable to check lock and unlock calls, for debug
1558                           purposes
1559   --enable-allsymbols     export all symbols from libunbound and link binaries
1560                           to it, smaller install size but libunbound export
1561                           table is polluted by internal symbols
1562   --enable-dnstap         Enable dnstap support (requires fstrm, protobuf-c)
1563   --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1564   --enable-cachedb        enable cachedb module that can use external cache
1565                           storage
1566   --enable-ipsecmod       Enable ipsecmod module that facilitates
1567                           opportunistic IPsec
1568
1569 Optional Packages:
1570   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1571   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1572   --with-conf-file=path   Pathname to the Unbound configuration file
1573   --with-run-dir=path     set default directory to chdir to (by default dir
1574                           part of cfg file)
1575   --with-chroot-dir=path  set default directory to chroot to (by default same
1576                           as run-dir)
1577   --with-share-dir=path   set default directory with shared data (by default
1578                           same as share/unbound)
1579   --with-pidfile=filename set default pathname to unbound pidfile (default
1580                           run-dir/unbound.pid)
1581   --with-rootkey-file=filename
1582                           set default pathname to root key file (default
1583                           run-dir/root.key). This file is read and written.
1584   --with-rootcert-file=filename
1585                           set default pathname to root update certificate file
1586                           (default run-dir/icannbundle.pem). This file need
1587                           not exist if you are content with the builtin.
1588   --with-username=user    set default user that unbound changes to (default
1589                           user is unbound)
1590   --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1591                           both]
1592   --with-aix-soname=aix|svr4|both
1593                           shared library versioning (aka "SONAME") variant to
1594                           provide on AIX, [default=aix].
1595   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1596   --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1597                           compiler's sysroot if not specified).
1598   --with-pthreads         use pthreads library, or --without-pthreads to
1599                           disable threading support.
1600   --with-solaris-threads  use solaris native thread library.
1601   --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1602                           (default=no)
1603   --with-pythonmodule     build Python module, or --without-pythonmodule to
1604                           disable script engine. (default=no)
1605   --with-nss=path         use libnss instead of openssl, installed at path.
1606   --with-nettle=path      use libnettle as crypto library, installed at path.
1607   --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1608                           /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1609                           /usr)
1610   --with-libevent=pathname
1611                           use libevent (will check /usr/local /opt/local
1612                           /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1613                           an explicit path). Slower, but allows use of large
1614                           outgoing port ranges.
1615   --with-libexpat=path    specify explicit path for libexpat.
1616   --with-libhiredis=path  specify explicit path for libhiredis.
1617   --with-dnstap-socket-path=pathname
1618                           set default dnstap socket path
1619   --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1620   --with-libfstrm=path    Path where libfstrm is installed, for dnstap
1621   --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1622   --with-libunbound-only  do not build daemon and tool programs
1623
1624 Some influential environment variables:
1625   CC          C compiler command
1626   CFLAGS      C compiler flags
1627   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1628               nonstandard directory <lib dir>
1629   LIBS        libraries to pass to the linker, e.g. -l<library>
1630   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1631               you have headers in a nonstandard directory <include dir>
1632   CPP         C preprocessor
1633   YACC        The `Yet Another Compiler Compiler' implementation to use.
1634               Defaults to the first program found out of: `bison -y', `byacc',
1635               `yacc'.
1636   YFLAGS      The list of arguments that will be passed by default to $YACC.
1637               This script will default YFLAGS to the empty string to avoid a
1638               default value of `-d' given by some make applications.
1639   LT_SYS_LIBRARY_PATH
1640               User-defined run-time library search path.
1641   PYTHON_VERSION
1642               The installed Python version to use, for example '2.3'. This
1643               string will be appended to the Python interpreter canonical
1644               name.
1645   PKG_CONFIG  path to pkg-config utility
1646   PKG_CONFIG_PATH
1647               directories to add to pkg-config's search path
1648   PKG_CONFIG_LIBDIR
1649               path overriding pkg-config's built-in search path
1650   SYSTEMD_CFLAGS
1651               C compiler flags for SYSTEMD, overriding pkg-config
1652   SYSTEMD_LIBS
1653               linker flags for SYSTEMD, overriding pkg-config
1654   SYSTEMD_DAEMON_CFLAGS
1655               C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1656   SYSTEMD_DAEMON_LIBS
1657               linker flags for SYSTEMD_DAEMON, overriding pkg-config
1658
1659 Use these variables to override the choices made by `configure' or to help
1660 it to find libraries and programs with nonstandard names/locations.
1661
1662 Report bugs to <unbound-bugs@nlnetlabs.nl>.
1663 _ACEOF
1664 ac_status=$?
1665 fi
1666
1667 if test "$ac_init_help" = "recursive"; then
1668   # If there are subdirs, report their specific --help.
1669   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1670     test -d "$ac_dir" ||
1671       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1672       continue
1673     ac_builddir=.
1674
1675 case "$ac_dir" in
1676 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1677 *)
1678   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1679   # A ".." for each directory in $ac_dir_suffix.
1680   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1681   case $ac_top_builddir_sub in
1682   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1683   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1684   esac ;;
1685 esac
1686 ac_abs_top_builddir=$ac_pwd
1687 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1688 # for backward compatibility:
1689 ac_top_builddir=$ac_top_build_prefix
1690
1691 case $srcdir in
1692   .)  # We are building in place.
1693     ac_srcdir=.
1694     ac_top_srcdir=$ac_top_builddir_sub
1695     ac_abs_top_srcdir=$ac_pwd ;;
1696   [\\/]* | ?:[\\/]* )  # Absolute name.
1697     ac_srcdir=$srcdir$ac_dir_suffix;
1698     ac_top_srcdir=$srcdir
1699     ac_abs_top_srcdir=$srcdir ;;
1700   *) # Relative name.
1701     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1702     ac_top_srcdir=$ac_top_build_prefix$srcdir
1703     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1704 esac
1705 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1706
1707     cd "$ac_dir" || { ac_status=$?; continue; }
1708     # Check for guested configure.
1709     if test -f "$ac_srcdir/configure.gnu"; then
1710       echo &&
1711       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1712     elif test -f "$ac_srcdir/configure"; then
1713       echo &&
1714       $SHELL "$ac_srcdir/configure" --help=recursive
1715     else
1716       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1717     fi || ac_status=$?
1718     cd "$ac_pwd" || { ac_status=$?; break; }
1719   done
1720 fi
1721
1722 test -n "$ac_init_help" && exit $ac_status
1723 if $ac_init_version; then
1724   cat <<\_ACEOF
1725 unbound configure 1.7.2
1726 generated by GNU Autoconf 2.69
1727
1728 Copyright (C) 2012 Free Software Foundation, Inc.
1729 This configure script is free software; the Free Software Foundation
1730 gives unlimited permission to copy, distribute and modify it.
1731 _ACEOF
1732   exit
1733 fi
1734
1735 ## ------------------------ ##
1736 ## Autoconf initialization. ##
1737 ## ------------------------ ##
1738
1739 # ac_fn_c_try_compile LINENO
1740 # --------------------------
1741 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1742 ac_fn_c_try_compile ()
1743 {
1744   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1745   rm -f conftest.$ac_objext
1746   if { { ac_try="$ac_compile"
1747 case "(($ac_try" in
1748   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1749   *) ac_try_echo=$ac_try;;
1750 esac
1751 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1752 $as_echo "$ac_try_echo"; } >&5
1753   (eval "$ac_compile") 2>conftest.err
1754   ac_status=$?
1755   if test -s conftest.err; then
1756     grep -v '^ *+' conftest.err >conftest.er1
1757     cat conftest.er1 >&5
1758     mv -f conftest.er1 conftest.err
1759   fi
1760   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1761   test $ac_status = 0; } && {
1762          test -z "$ac_c_werror_flag" ||
1763          test ! -s conftest.err
1764        } && test -s conftest.$ac_objext; then :
1765   ac_retval=0
1766 else
1767   $as_echo "$as_me: failed program was:" >&5
1768 sed 's/^/| /' conftest.$ac_ext >&5
1769
1770         ac_retval=1
1771 fi
1772   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1773   as_fn_set_status $ac_retval
1774
1775 } # ac_fn_c_try_compile
1776
1777 # ac_fn_c_try_cpp LINENO
1778 # ----------------------
1779 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1780 ac_fn_c_try_cpp ()
1781 {
1782   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1783   if { { ac_try="$ac_cpp conftest.$ac_ext"
1784 case "(($ac_try" in
1785   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1786   *) ac_try_echo=$ac_try;;
1787 esac
1788 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1789 $as_echo "$ac_try_echo"; } >&5
1790   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1791   ac_status=$?
1792   if test -s conftest.err; then
1793     grep -v '^ *+' conftest.err >conftest.er1
1794     cat conftest.er1 >&5
1795     mv -f conftest.er1 conftest.err
1796   fi
1797   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1798   test $ac_status = 0; } > conftest.i && {
1799          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1800          test ! -s conftest.err
1801        }; then :
1802   ac_retval=0
1803 else
1804   $as_echo "$as_me: failed program was:" >&5
1805 sed 's/^/| /' conftest.$ac_ext >&5
1806
1807     ac_retval=1
1808 fi
1809   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1810   as_fn_set_status $ac_retval
1811
1812 } # ac_fn_c_try_cpp
1813
1814 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1815 # -------------------------------------------------------
1816 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1817 # the include files in INCLUDES and setting the cache variable VAR
1818 # accordingly.
1819 ac_fn_c_check_header_mongrel ()
1820 {
1821   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1822   if eval \${$3+:} false; then :
1823   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1824 $as_echo_n "checking for $2... " >&6; }
1825 if eval \${$3+:} false; then :
1826   $as_echo_n "(cached) " >&6
1827 fi
1828 eval ac_res=\$$3
1829                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1830 $as_echo "$ac_res" >&6; }
1831 else
1832   # Is the header compilable?
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1834 $as_echo_n "checking $2 usability... " >&6; }
1835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1836 /* end confdefs.h.  */
1837 $4
1838 #include <$2>
1839 _ACEOF
1840 if ac_fn_c_try_compile "$LINENO"; then :
1841   ac_header_compiler=yes
1842 else
1843   ac_header_compiler=no
1844 fi
1845 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1847 $as_echo "$ac_header_compiler" >&6; }
1848
1849 # Is the header present?
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1851 $as_echo_n "checking $2 presence... " >&6; }
1852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1853 /* end confdefs.h.  */
1854 #include <$2>
1855 _ACEOF
1856 if ac_fn_c_try_cpp "$LINENO"; then :
1857   ac_header_preproc=yes
1858 else
1859   ac_header_preproc=no
1860 fi
1861 rm -f conftest.err conftest.i conftest.$ac_ext
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1863 $as_echo "$ac_header_preproc" >&6; }
1864
1865 # So?  What about this header?
1866 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1867   yes:no: )
1868     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1869 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1870     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1871 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1872     ;;
1873   no:yes:* )
1874     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1875 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1876     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1877 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1878     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1879 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1880     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1881 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1882     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1883 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1884 ( $as_echo "## ---------------------------------------- ##
1885 ## Report this to unbound-bugs@nlnetlabs.nl ##
1886 ## ---------------------------------------- ##"
1887      ) | sed "s/^/$as_me: WARNING:     /" >&2
1888     ;;
1889 esac
1890   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1891 $as_echo_n "checking for $2... " >&6; }
1892 if eval \${$3+:} false; then :
1893   $as_echo_n "(cached) " >&6
1894 else
1895   eval "$3=\$ac_header_compiler"
1896 fi
1897 eval ac_res=\$$3
1898                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1899 $as_echo "$ac_res" >&6; }
1900 fi
1901   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1902
1903 } # ac_fn_c_check_header_mongrel
1904
1905 # ac_fn_c_try_run LINENO
1906 # ----------------------
1907 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1908 # that executables *can* be run.
1909 ac_fn_c_try_run ()
1910 {
1911   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1912   if { { ac_try="$ac_link"
1913 case "(($ac_try" in
1914   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1915   *) ac_try_echo=$ac_try;;
1916 esac
1917 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1918 $as_echo "$ac_try_echo"; } >&5
1919   (eval "$ac_link") 2>&5
1920   ac_status=$?
1921   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1922   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1923   { { case "(($ac_try" in
1924   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1925   *) ac_try_echo=$ac_try;;
1926 esac
1927 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1928 $as_echo "$ac_try_echo"; } >&5
1929   (eval "$ac_try") 2>&5
1930   ac_status=$?
1931   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1932   test $ac_status = 0; }; }; then :
1933   ac_retval=0
1934 else
1935   $as_echo "$as_me: program exited with status $ac_status" >&5
1936        $as_echo "$as_me: failed program was:" >&5
1937 sed 's/^/| /' conftest.$ac_ext >&5
1938
1939        ac_retval=$ac_status
1940 fi
1941   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1942   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1943   as_fn_set_status $ac_retval
1944
1945 } # ac_fn_c_try_run
1946
1947 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1948 # -------------------------------------------------------
1949 # Tests whether HEADER exists and can be compiled using the include files in
1950 # INCLUDES, setting the cache variable VAR accordingly.
1951 ac_fn_c_check_header_compile ()
1952 {
1953   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1954   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1955 $as_echo_n "checking for $2... " >&6; }
1956 if eval \${$3+:} false; then :
1957   $as_echo_n "(cached) " >&6
1958 else
1959   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960 /* end confdefs.h.  */
1961 $4
1962 #include <$2>
1963 _ACEOF
1964 if ac_fn_c_try_compile "$LINENO"; then :
1965   eval "$3=yes"
1966 else
1967   eval "$3=no"
1968 fi
1969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1970 fi
1971 eval ac_res=\$$3
1972                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1973 $as_echo "$ac_res" >&6; }
1974   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1975
1976 } # ac_fn_c_check_header_compile
1977
1978 # ac_fn_c_try_link LINENO
1979 # -----------------------
1980 # Try to link conftest.$ac_ext, and return whether this succeeded.
1981 ac_fn_c_try_link ()
1982 {
1983   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984   rm -f conftest.$ac_objext conftest$ac_exeext
1985   if { { ac_try="$ac_link"
1986 case "(($ac_try" in
1987   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1988   *) ac_try_echo=$ac_try;;
1989 esac
1990 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1991 $as_echo "$ac_try_echo"; } >&5
1992   (eval "$ac_link") 2>conftest.err
1993   ac_status=$?
1994   if test -s conftest.err; then
1995     grep -v '^ *+' conftest.err >conftest.er1
1996     cat conftest.er1 >&5
1997     mv -f conftest.er1 conftest.err
1998   fi
1999   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2000   test $ac_status = 0; } && {
2001          test -z "$ac_c_werror_flag" ||
2002          test ! -s conftest.err
2003        } && test -s conftest$ac_exeext && {
2004          test "$cross_compiling" = yes ||
2005          test -x conftest$ac_exeext
2006        }; then :
2007   ac_retval=0
2008 else
2009   $as_echo "$as_me: failed program was:" >&5
2010 sed 's/^/| /' conftest.$ac_ext >&5
2011
2012         ac_retval=1
2013 fi
2014   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2015   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2016   # interfere with the next link command; also delete a directory that is
2017   # left behind by Apple's compiler.  We do this before executing the actions.
2018   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2019   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2020   as_fn_set_status $ac_retval
2021
2022 } # ac_fn_c_try_link
2023
2024 # ac_fn_c_check_func LINENO FUNC VAR
2025 # ----------------------------------
2026 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2027 ac_fn_c_check_func ()
2028 {
2029   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2030   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2031 $as_echo_n "checking for $2... " >&6; }
2032 if eval \${$3+:} false; then :
2033   $as_echo_n "(cached) " >&6
2034 else
2035   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2036 /* end confdefs.h.  */
2037 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2038    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2039 #define $2 innocuous_$2
2040
2041 /* System header to define __stub macros and hopefully few prototypes,
2042     which can conflict with char $2 (); below.
2043     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2044     <limits.h> exists even on freestanding compilers.  */
2045
2046 #ifdef __STDC__
2047 # include <limits.h>
2048 #else
2049 # include <assert.h>
2050 #endif
2051
2052 #undef $2
2053
2054 /* Override any GCC internal prototype to avoid an error.
2055    Use char because int might match the return type of a GCC
2056    builtin and then its argument prototype would still apply.  */
2057 #ifdef __cplusplus
2058 extern "C"
2059 #endif
2060 char $2 ();
2061 /* The GNU C library defines this for functions which it implements
2062     to always fail with ENOSYS.  Some functions are actually named
2063     something starting with __ and the normal name is an alias.  */
2064 #if defined __stub_$2 || defined __stub___$2
2065 choke me
2066 #endif
2067
2068 int
2069 main ()
2070 {
2071 return $2 ();
2072   ;
2073   return 0;
2074 }
2075 _ACEOF
2076 if ac_fn_c_try_link "$LINENO"; then :
2077   eval "$3=yes"
2078 else
2079   eval "$3=no"
2080 fi
2081 rm -f core conftest.err conftest.$ac_objext \
2082     conftest$ac_exeext conftest.$ac_ext
2083 fi
2084 eval ac_res=\$$3
2085                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2086 $as_echo "$ac_res" >&6; }
2087   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2088
2089 } # ac_fn_c_check_func
2090
2091 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2092 # -------------------------------------------
2093 # Tests whether TYPE exists after having included INCLUDES, setting cache
2094 # variable VAR accordingly.
2095 ac_fn_c_check_type ()
2096 {
2097   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2098   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2099 $as_echo_n "checking for $2... " >&6; }
2100 if eval \${$3+:} false; then :
2101   $as_echo_n "(cached) " >&6
2102 else
2103   eval "$3=no"
2104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105 /* end confdefs.h.  */
2106 $4
2107 int
2108 main ()
2109 {
2110 if (sizeof ($2))
2111          return 0;
2112   ;
2113   return 0;
2114 }
2115 _ACEOF
2116 if ac_fn_c_try_compile "$LINENO"; then :
2117   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2118 /* end confdefs.h.  */
2119 $4
2120 int
2121 main ()
2122 {
2123 if (sizeof (($2)))
2124             return 0;
2125   ;
2126   return 0;
2127 }
2128 _ACEOF
2129 if ac_fn_c_try_compile "$LINENO"; then :
2130
2131 else
2132   eval "$3=yes"
2133 fi
2134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2135 fi
2136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2137 fi
2138 eval ac_res=\$$3
2139                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2140 $as_echo "$ac_res" >&6; }
2141   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2142
2143 } # ac_fn_c_check_type
2144
2145 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2146 # --------------------------------------------
2147 # Tries to find the compile-time value of EXPR in a program that includes
2148 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2149 # computed
2150 ac_fn_c_compute_int ()
2151 {
2152   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2153   if test "$cross_compiling" = yes; then
2154     # Depending upon the size, compute the lo and hi bounds.
2155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2156 /* end confdefs.h.  */
2157 $4
2158 int
2159 main ()
2160 {
2161 static int test_array [1 - 2 * !(($2) >= 0)];
2162 test_array [0] = 0;
2163 return test_array [0];
2164
2165   ;
2166   return 0;
2167 }
2168 _ACEOF
2169 if ac_fn_c_try_compile "$LINENO"; then :
2170   ac_lo=0 ac_mid=0
2171   while :; do
2172     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2173 /* end confdefs.h.  */
2174 $4
2175 int
2176 main ()
2177 {
2178 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2179 test_array [0] = 0;
2180 return test_array [0];
2181
2182   ;
2183   return 0;
2184 }
2185 _ACEOF
2186 if ac_fn_c_try_compile "$LINENO"; then :
2187   ac_hi=$ac_mid; break
2188 else
2189   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2190                         if test $ac_lo -le $ac_mid; then
2191                           ac_lo= ac_hi=
2192                           break
2193                         fi
2194                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2195 fi
2196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2197   done
2198 else
2199   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2200 /* end confdefs.h.  */
2201 $4
2202 int
2203 main ()
2204 {
2205 static int test_array [1 - 2 * !(($2) < 0)];
2206 test_array [0] = 0;
2207 return test_array [0];
2208
2209   ;
2210   return 0;
2211 }
2212 _ACEOF
2213 if ac_fn_c_try_compile "$LINENO"; then :
2214   ac_hi=-1 ac_mid=-1
2215   while :; do
2216     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2217 /* end confdefs.h.  */
2218 $4
2219 int
2220 main ()
2221 {
2222 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2223 test_array [0] = 0;
2224 return test_array [0];
2225
2226   ;
2227   return 0;
2228 }
2229 _ACEOF
2230 if ac_fn_c_try_compile "$LINENO"; then :
2231   ac_lo=$ac_mid; break
2232 else
2233   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2234                         if test $ac_mid -le $ac_hi; then
2235                           ac_lo= ac_hi=
2236                           break
2237                         fi
2238                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2239 fi
2240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2241   done
2242 else
2243   ac_lo= ac_hi=
2244 fi
2245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2246 fi
2247 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2248 # Binary search between lo and hi bounds.
2249 while test "x$ac_lo" != "x$ac_hi"; do
2250   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2251   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252 /* end confdefs.h.  */
2253 $4
2254 int
2255 main ()
2256 {
2257 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2258 test_array [0] = 0;
2259 return test_array [0];
2260
2261   ;
2262   return 0;
2263 }
2264 _ACEOF
2265 if ac_fn_c_try_compile "$LINENO"; then :
2266   ac_hi=$ac_mid
2267 else
2268   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2269 fi
2270 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2271 done
2272 case $ac_lo in #((
2273 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2274 '') ac_retval=1 ;;
2275 esac
2276   else
2277     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278 /* end confdefs.h.  */
2279 $4
2280 static long int longval () { return $2; }
2281 static unsigned long int ulongval () { return $2; }
2282 #include <stdio.h>
2283 #include <stdlib.h>
2284 int
2285 main ()
2286 {
2287
2288   FILE *f = fopen ("conftest.val", "w");
2289   if (! f)
2290     return 1;
2291   if (($2) < 0)
2292     {
2293       long int i = longval ();
2294       if (i != ($2))
2295         return 1;
2296       fprintf (f, "%ld", i);
2297     }
2298   else
2299     {
2300       unsigned long int i = ulongval ();
2301       if (i != ($2))
2302         return 1;
2303       fprintf (f, "%lu", i);
2304     }
2305   /* Do not output a trailing newline, as this causes \r\n confusion
2306      on some platforms.  */
2307   return ferror (f) || fclose (f) != 0;
2308
2309   ;
2310   return 0;
2311 }
2312 _ACEOF
2313 if ac_fn_c_try_run "$LINENO"; then :
2314   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2315 else
2316   ac_retval=1
2317 fi
2318 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2319   conftest.$ac_objext conftest.beam conftest.$ac_ext
2320 rm -f conftest.val
2321
2322   fi
2323   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2324   as_fn_set_status $ac_retval
2325
2326 } # ac_fn_c_compute_int
2327
2328 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2329 # ---------------------------------------------
2330 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2331 # accordingly.
2332 ac_fn_c_check_decl ()
2333 {
2334   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2335   as_decl_name=`echo $2|sed 's/ *(.*//'`
2336   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2337   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2338 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2339 if eval \${$3+:} false; then :
2340   $as_echo_n "(cached) " >&6
2341 else
2342   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2343 /* end confdefs.h.  */
2344 $4
2345 int
2346 main ()
2347 {
2348 #ifndef $as_decl_name
2349 #ifdef __cplusplus
2350   (void) $as_decl_use;
2351 #else
2352   (void) $as_decl_name;
2353 #endif
2354 #endif
2355
2356   ;
2357   return 0;
2358 }
2359 _ACEOF
2360 if ac_fn_c_try_compile "$LINENO"; then :
2361   eval "$3=yes"
2362 else
2363   eval "$3=no"
2364 fi
2365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2366 fi
2367 eval ac_res=\$$3
2368                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2369 $as_echo "$ac_res" >&6; }
2370   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2371
2372 } # ac_fn_c_check_decl
2373
2374 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2375 # ----------------------------------------------------
2376 # Tries to find if the field MEMBER exists in type AGGR, after including
2377 # INCLUDES, setting cache variable VAR accordingly.
2378 ac_fn_c_check_member ()
2379 {
2380   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2381   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2382 $as_echo_n "checking for $2.$3... " >&6; }
2383 if eval \${$4+:} false; then :
2384   $as_echo_n "(cached) " >&6
2385 else
2386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2387 /* end confdefs.h.  */
2388 $5
2389 int
2390 main ()
2391 {
2392 static $2 ac_aggr;
2393 if (ac_aggr.$3)
2394 return 0;
2395   ;
2396   return 0;
2397 }
2398 _ACEOF
2399 if ac_fn_c_try_compile "$LINENO"; then :
2400   eval "$4=yes"
2401 else
2402   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2403 /* end confdefs.h.  */
2404 $5
2405 int
2406 main ()
2407 {
2408 static $2 ac_aggr;
2409 if (sizeof ac_aggr.$3)
2410 return 0;
2411   ;
2412   return 0;
2413 }
2414 _ACEOF
2415 if ac_fn_c_try_compile "$LINENO"; then :
2416   eval "$4=yes"
2417 else
2418   eval "$4=no"
2419 fi
2420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2421 fi
2422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2423 fi
2424 eval ac_res=\$$4
2425                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2426 $as_echo "$ac_res" >&6; }
2427   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2428
2429 } # ac_fn_c_check_member
2430 cat >config.log <<_ACEOF
2431 This file contains any messages produced by compilers while
2432 running configure, to aid debugging if configure makes a mistake.
2433
2434 It was created by unbound $as_me 1.7.2, which was
2435 generated by GNU Autoconf 2.69.  Invocation command line was
2436
2437   $ $0 $@
2438
2439 _ACEOF
2440 exec 5>>config.log
2441 {
2442 cat <<_ASUNAME
2443 ## --------- ##
2444 ## Platform. ##
2445 ## --------- ##
2446
2447 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2448 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2449 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2450 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2451 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2452
2453 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2454 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2455
2456 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2457 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2458 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2459 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2460 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2461 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2462 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2463
2464 _ASUNAME
2465
2466 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2467 for as_dir in $PATH
2468 do
2469   IFS=$as_save_IFS
2470   test -z "$as_dir" && as_dir=.
2471     $as_echo "PATH: $as_dir"
2472   done
2473 IFS=$as_save_IFS
2474
2475 } >&5
2476
2477 cat >&5 <<_ACEOF
2478
2479
2480 ## ----------- ##
2481 ## Core tests. ##
2482 ## ----------- ##
2483
2484 _ACEOF
2485
2486
2487 # Keep a trace of the command line.
2488 # Strip out --no-create and --no-recursion so they do not pile up.
2489 # Strip out --silent because we don't want to record it for future runs.
2490 # Also quote any args containing shell meta-characters.
2491 # Make two passes to allow for proper duplicate-argument suppression.
2492 ac_configure_args=
2493 ac_configure_args0=
2494 ac_configure_args1=
2495 ac_must_keep_next=false
2496 for ac_pass in 1 2
2497 do
2498   for ac_arg
2499   do
2500     case $ac_arg in
2501     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2502     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2503     | -silent | --silent | --silen | --sile | --sil)
2504       continue ;;
2505     *\'*)
2506       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2507     esac
2508     case $ac_pass in
2509     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2510     2)
2511       as_fn_append ac_configure_args1 " '$ac_arg'"
2512       if test $ac_must_keep_next = true; then
2513         ac_must_keep_next=false # Got value, back to normal.
2514       else
2515         case $ac_arg in
2516           *=* | --config-cache | -C | -disable-* | --disable-* \
2517           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2518           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2519           | -with-* | --with-* | -without-* | --without-* | --x)
2520             case "$ac_configure_args0 " in
2521               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2522             esac
2523             ;;
2524           -* ) ac_must_keep_next=true ;;
2525         esac
2526       fi
2527       as_fn_append ac_configure_args " '$ac_arg'"
2528       ;;
2529     esac
2530   done
2531 done
2532 { ac_configure_args0=; unset ac_configure_args0;}
2533 { ac_configure_args1=; unset ac_configure_args1;}
2534
2535 # When interrupted or exit'd, cleanup temporary files, and complete
2536 # config.log.  We remove comments because anyway the quotes in there
2537 # would cause problems or look ugly.
2538 # WARNING: Use '\'' to represent an apostrophe within the trap.
2539 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2540 trap 'exit_status=$?
2541   # Save into config.log some information that might help in debugging.
2542   {
2543     echo
2544
2545     $as_echo "## ---------------- ##
2546 ## Cache variables. ##
2547 ## ---------------- ##"
2548     echo
2549     # The following way of writing the cache mishandles newlines in values,
2550 (
2551   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2552     eval ac_val=\$$ac_var
2553     case $ac_val in #(
2554     *${as_nl}*)
2555       case $ac_var in #(
2556       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2557 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2558       esac
2559       case $ac_var in #(
2560       _ | IFS | as_nl) ;; #(
2561       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2562       *) { eval $ac_var=; unset $ac_var;} ;;
2563       esac ;;
2564     esac
2565   done
2566   (set) 2>&1 |
2567     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2568     *${as_nl}ac_space=\ *)
2569       sed -n \
2570         "s/'\''/'\''\\\\'\'''\''/g;
2571           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2572       ;; #(
2573     *)
2574       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2575       ;;
2576     esac |
2577     sort
2578 )
2579     echo
2580
2581     $as_echo "## ----------------- ##
2582 ## Output variables. ##
2583 ## ----------------- ##"
2584     echo
2585     for ac_var in $ac_subst_vars
2586     do
2587       eval ac_val=\$$ac_var
2588       case $ac_val in
2589       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2590       esac
2591       $as_echo "$ac_var='\''$ac_val'\''"
2592     done | sort
2593     echo
2594
2595     if test -n "$ac_subst_files"; then
2596       $as_echo "## ------------------- ##
2597 ## File substitutions. ##
2598 ## ------------------- ##"
2599       echo
2600       for ac_var in $ac_subst_files
2601       do
2602         eval ac_val=\$$ac_var
2603         case $ac_val in
2604         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2605         esac
2606         $as_echo "$ac_var='\''$ac_val'\''"
2607       done | sort
2608       echo
2609     fi
2610
2611     if test -s confdefs.h; then
2612       $as_echo "## ----------- ##
2613 ## confdefs.h. ##
2614 ## ----------- ##"
2615       echo
2616       cat confdefs.h
2617       echo
2618     fi
2619     test "$ac_signal" != 0 &&
2620       $as_echo "$as_me: caught signal $ac_signal"
2621     $as_echo "$as_me: exit $exit_status"
2622   } >&5
2623   rm -f core *.core core.conftest.* &&
2624     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2625     exit $exit_status
2626 ' 0
2627 for ac_signal in 1 2 13 15; do
2628   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2629 done
2630 ac_signal=0
2631
2632 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2633 rm -f -r conftest* confdefs.h
2634
2635 $as_echo "/* confdefs.h */" > confdefs.h
2636
2637 # Predefined preprocessor variables.
2638
2639 cat >>confdefs.h <<_ACEOF
2640 #define PACKAGE_NAME "$PACKAGE_NAME"
2641 _ACEOF
2642
2643 cat >>confdefs.h <<_ACEOF
2644 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2645 _ACEOF
2646
2647 cat >>confdefs.h <<_ACEOF
2648 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2649 _ACEOF
2650
2651 cat >>confdefs.h <<_ACEOF
2652 #define PACKAGE_STRING "$PACKAGE_STRING"
2653 _ACEOF
2654
2655 cat >>confdefs.h <<_ACEOF
2656 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2657 _ACEOF
2658
2659 cat >>confdefs.h <<_ACEOF
2660 #define PACKAGE_URL "$PACKAGE_URL"
2661 _ACEOF
2662
2663
2664 # Let the site file select an alternate cache file if it wants to.
2665 # Prefer an explicitly selected file to automatically selected ones.
2666 ac_site_file1=NONE
2667 ac_site_file2=NONE
2668 if test -n "$CONFIG_SITE"; then
2669   # We do not want a PATH search for config.site.
2670   case $CONFIG_SITE in #((
2671     -*)  ac_site_file1=./$CONFIG_SITE;;
2672     */*) ac_site_file1=$CONFIG_SITE;;
2673     *)   ac_site_file1=./$CONFIG_SITE;;
2674   esac
2675 elif test "x$prefix" != xNONE; then
2676   ac_site_file1=$prefix/share/config.site
2677   ac_site_file2=$prefix/etc/config.site
2678 else
2679   ac_site_file1=$ac_default_prefix/share/config.site
2680   ac_site_file2=$ac_default_prefix/etc/config.site
2681 fi
2682 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2683 do
2684   test "x$ac_site_file" = xNONE && continue
2685   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2686     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2687 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2688     sed 's/^/| /' "$ac_site_file" >&5
2689     . "$ac_site_file" \
2690       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2691 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2692 as_fn_error $? "failed to load site script $ac_site_file
2693 See \`config.log' for more details" "$LINENO" 5; }
2694   fi
2695 done
2696
2697 if test -r "$cache_file"; then
2698   # Some versions of bash will fail to source /dev/null (special files
2699   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2700   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2701     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2702 $as_echo "$as_me: loading cache $cache_file" >&6;}
2703     case $cache_file in
2704       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2705       *)                      . "./$cache_file";;
2706     esac
2707   fi
2708 else
2709   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2710 $as_echo "$as_me: creating cache $cache_file" >&6;}
2711   >$cache_file
2712 fi
2713
2714 # Check that the precious variables saved in the cache have kept the same
2715 # value.
2716 ac_cache_corrupted=false
2717 for ac_var in $ac_precious_vars; do
2718   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2719   eval ac_new_set=\$ac_env_${ac_var}_set
2720   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2721   eval ac_new_val=\$ac_env_${ac_var}_value
2722   case $ac_old_set,$ac_new_set in
2723     set,)
2724       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2725 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2726       ac_cache_corrupted=: ;;
2727     ,set)
2728       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2729 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2730       ac_cache_corrupted=: ;;
2731     ,);;
2732     *)
2733       if test "x$ac_old_val" != "x$ac_new_val"; then
2734         # differences in whitespace do not lead to failure.
2735         ac_old_val_w=`echo x $ac_old_val`
2736         ac_new_val_w=`echo x $ac_new_val`
2737         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2738           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2739 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2740           ac_cache_corrupted=:
2741         else
2742           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2743 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2744           eval $ac_var=\$ac_old_val
2745         fi
2746         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2747 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2748         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2749 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2750       fi;;
2751   esac
2752   # Pass precious variables to config.status.
2753   if test "$ac_new_set" = set; then
2754     case $ac_new_val in
2755     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2756     *) ac_arg=$ac_var=$ac_new_val ;;
2757     esac
2758     case " $ac_configure_args " in
2759       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2760       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2761     esac
2762   fi
2763 done
2764 if $ac_cache_corrupted; then
2765   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2766 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2767   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2768 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2769   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2770 fi
2771 ## -------------------- ##
2772 ## Main body of script. ##
2773 ## -------------------- ##
2774
2775 ac_ext=c
2776 ac_cpp='$CPP $CPPFLAGS'
2777 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2778 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2779 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2780
2781
2782 UNBOUND_VERSION_MAJOR=1
2783
2784 UNBOUND_VERSION_MINOR=7
2785
2786 UNBOUND_VERSION_MICRO=2
2787
2788
2789 LIBUNBOUND_CURRENT=7
2790 LIBUNBOUND_REVISION=10
2791 LIBUNBOUND_AGE=5
2792 # 1.0.0 had 0:12:0
2793 # 1.0.1 had 0:13:0
2794 # 1.0.2 had 0:14:0
2795 # 1.1.0 had 0:15:0
2796 # 1.1.1 had 0:16:0
2797 # 1.2.0 had 0:17:0
2798 # 1.2.1 had 0:18:0
2799 # 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
2800 # 1.3.1 had 1:1:0
2801 # 1.3.2 had 1:2:0
2802 # 1.3.3 had 1:3:0
2803 # 1.3.4 had 1:4:0
2804 # 1.4.0-snapshots had 1:5:0
2805 # 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
2806 # 1.4.1 had 2:1:0
2807 # 1.4.2 had 2:2:0
2808 # 1.4.3 had 2:3:0
2809 # 1.4.4 had 2:4:0
2810 # 1.4.5 had 2:5:0
2811 # 1.4.6 had 2:6:0
2812 # 1.4.7 had 2:7:0
2813 # 1.4.8 had 2:8:0
2814 # 1.4.9 had 2:9:0
2815 # 1.4.10 had 2:10:0
2816 # 1.4.11 had 2:11:0
2817 # 1.4.12 had 2:12:0
2818 # 1.4.13 had 2:13:0
2819 # and 1.4.13p1 and 1.4.13.p2
2820 # 1.4.14 had 2:14:0
2821 # 1.4.15 had 3:0:1 # adds ub_version()
2822 # 1.4.16 had 3:1:1
2823 # 1.4.17 had 3:2:1
2824 # 1.4.18 had 3:3:1
2825 # 1.4.19 had 3:4:1
2826 # 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
2827 # 1.4.21 had 4:1:2
2828 # 1.4.22 had 4:1:2
2829 # 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2830 # 1.5.1 had 5:3:3
2831 # 1.5.2 had 5:5:3
2832 # 1.5.3 had 5:6:3
2833 # 1.5.4 had 5:7:3
2834 # 1.5.5 had 5:8:3
2835 # 1.5.6 had 5:9:3
2836 # 1.5.7 had 5:10:3
2837 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
2838 # 1.5.9 had 6:1:4
2839 # 1.5.10 had 6:2:4
2840 # 1.6.0 had 6:3:4
2841 # 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
2842 # 1.6.2 had 7:1:5
2843 # 1.6.3 had 7:2:5
2844 # 1.6.4 had 7:3:5
2845 # 1.6.5 had 7:4:5
2846 # 1.6.6 had 7:5:5
2847 # 1.6.7 had 7:6:5
2848 # 1.6.8 had 7:7:5
2849 # 1.7.0 had 7:8:5
2850 # 1.7.1 had 7:9:5
2851 # 1.7.2 had 7:10:5
2852
2853 #   Current  -- the number of the binary API that we're implementing
2854 #   Revision -- which iteration of the implementation of the binary
2855 #               API are we supplying?
2856 #   Age      -- How many previous binary API versions do we also
2857 #               support?
2858 #
2859 # If we release a new version that does not change the binary API,
2860 # increment Revision.
2861 #
2862 # If we release a new version that changes the binary API, but does
2863 # not break programs compiled against the old binary API, increment
2864 # Current and Age.  Set Revision to 0, since this is the first
2865 # implementation of the new API.
2866 #
2867 # Otherwise, we're changing the binary API and breaking backward
2868 # compatibility with old binaries.  Increment Current.  Set Age to 0,
2869 # since we're backward compatible with no previous APIs.  Set Revision
2870 # to 0 too.
2871
2872
2873
2874
2875 CFLAGS="$CFLAGS"
2876 ac_ext=c
2877 ac_cpp='$CPP $CPPFLAGS'
2878 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2879 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2880 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2881 if test -n "$ac_tool_prefix"; then
2882   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2883 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2885 $as_echo_n "checking for $ac_word... " >&6; }
2886 if ${ac_cv_prog_CC+:} false; then :
2887   $as_echo_n "(cached) " >&6
2888 else
2889   if test -n "$CC"; then
2890   ac_cv_prog_CC="$CC" # Let the user override the test.
2891 else
2892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2893 for as_dir in $PATH
2894 do
2895   IFS=$as_save_IFS
2896   test -z "$as_dir" && as_dir=.
2897     for ac_exec_ext in '' $ac_executable_extensions; do
2898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2899     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2901     break 2
2902   fi
2903 done
2904   done
2905 IFS=$as_save_IFS
2906
2907 fi
2908 fi
2909 CC=$ac_cv_prog_CC
2910 if test -n "$CC"; then
2911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2912 $as_echo "$CC" >&6; }
2913 else
2914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2915 $as_echo "no" >&6; }
2916 fi
2917
2918
2919 fi
2920 if test -z "$ac_cv_prog_CC"; then
2921   ac_ct_CC=$CC
2922   # Extract the first word of "gcc", so it can be a program name with args.
2923 set dummy gcc; ac_word=$2
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2925 $as_echo_n "checking for $ac_word... " >&6; }
2926 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2927   $as_echo_n "(cached) " >&6
2928 else
2929   if test -n "$ac_ct_CC"; then
2930   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2931 else
2932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2933 for as_dir in $PATH
2934 do
2935   IFS=$as_save_IFS
2936   test -z "$as_dir" && as_dir=.
2937     for ac_exec_ext in '' $ac_executable_extensions; do
2938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2939     ac_cv_prog_ac_ct_CC="gcc"
2940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2941     break 2
2942   fi
2943 done
2944   done
2945 IFS=$as_save_IFS
2946
2947 fi
2948 fi
2949 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2950 if test -n "$ac_ct_CC"; then
2951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2952 $as_echo "$ac_ct_CC" >&6; }
2953 else
2954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2955 $as_echo "no" >&6; }
2956 fi
2957
2958   if test "x$ac_ct_CC" = x; then
2959     CC=""
2960   else
2961     case $cross_compiling:$ac_tool_warned in
2962 yes:)
2963 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2964 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2965 ac_tool_warned=yes ;;
2966 esac
2967     CC=$ac_ct_CC
2968   fi
2969 else
2970   CC="$ac_cv_prog_CC"
2971 fi
2972
2973 if test -z "$CC"; then
2974           if test -n "$ac_tool_prefix"; then
2975     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2976 set dummy ${ac_tool_prefix}cc; ac_word=$2
2977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2978 $as_echo_n "checking for $ac_word... " >&6; }
2979 if ${ac_cv_prog_CC+:} false; then :
2980   $as_echo_n "(cached) " >&6
2981 else
2982   if test -n "$CC"; then
2983   ac_cv_prog_CC="$CC" # Let the user override the test.
2984 else
2985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2986 for as_dir in $PATH
2987 do
2988   IFS=$as_save_IFS
2989   test -z "$as_dir" && as_dir=.
2990     for ac_exec_ext in '' $ac_executable_extensions; do
2991   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2992     ac_cv_prog_CC="${ac_tool_prefix}cc"
2993     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2994     break 2
2995   fi
2996 done
2997   done
2998 IFS=$as_save_IFS
2999
3000 fi
3001 fi
3002 CC=$ac_cv_prog_CC
3003 if test -n "$CC"; then
3004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3005 $as_echo "$CC" >&6; }
3006 else
3007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3008 $as_echo "no" >&6; }
3009 fi
3010
3011
3012   fi
3013 fi
3014 if test -z "$CC"; then
3015   # Extract the first word of "cc", so it can be a program name with args.
3016 set dummy cc; ac_word=$2
3017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3018 $as_echo_n "checking for $ac_word... " >&6; }
3019 if ${ac_cv_prog_CC+:} false; then :
3020   $as_echo_n "(cached) " >&6
3021 else
3022   if test -n "$CC"; then
3023   ac_cv_prog_CC="$CC" # Let the user override the test.
3024 else
3025   ac_prog_rejected=no
3026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3027 for as_dir in $PATH
3028 do
3029   IFS=$as_save_IFS
3030   test -z "$as_dir" && as_dir=.
3031     for ac_exec_ext in '' $ac_executable_extensions; do
3032   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3033     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3034        ac_prog_rejected=yes
3035        continue
3036      fi
3037     ac_cv_prog_CC="cc"
3038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3039     break 2
3040   fi
3041 done
3042   done
3043 IFS=$as_save_IFS
3044
3045 if test $ac_prog_rejected = yes; then
3046   # We found a bogon in the path, so make sure we never use it.
3047   set dummy $ac_cv_prog_CC
3048   shift
3049   if test $# != 0; then
3050     # We chose a different compiler from the bogus one.
3051     # However, it has the same basename, so the bogon will be chosen
3052     # first if we set CC to just the basename; use the full file name.
3053     shift
3054     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3055   fi
3056 fi
3057 fi
3058 fi
3059 CC=$ac_cv_prog_CC
3060 if test -n "$CC"; then
3061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3062 $as_echo "$CC" >&6; }
3063 else
3064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3065 $as_echo "no" >&6; }
3066 fi
3067
3068
3069 fi
3070 if test -z "$CC"; then
3071   if test -n "$ac_tool_prefix"; then
3072   for ac_prog in cl.exe
3073   do
3074     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3075 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3077 $as_echo_n "checking for $ac_word... " >&6; }
3078 if ${ac_cv_prog_CC+:} false; then :
3079   $as_echo_n "(cached) " >&6
3080 else
3081   if test -n "$CC"; then
3082   ac_cv_prog_CC="$CC" # Let the user override the test.
3083 else
3084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3085 for as_dir in $PATH
3086 do
3087   IFS=$as_save_IFS
3088   test -z "$as_dir" && as_dir=.
3089     for ac_exec_ext in '' $ac_executable_extensions; do
3090   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3091     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3092     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3093     break 2
3094   fi
3095 done
3096   done
3097 IFS=$as_save_IFS
3098
3099 fi
3100 fi
3101 CC=$ac_cv_prog_CC
3102 if test -n "$CC"; then
3103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3104 $as_echo "$CC" >&6; }
3105 else
3106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3107 $as_echo "no" >&6; }
3108 fi
3109
3110
3111     test -n "$CC" && break
3112   done
3113 fi
3114 if test -z "$CC"; then
3115   ac_ct_CC=$CC
3116   for ac_prog in cl.exe
3117 do
3118   # Extract the first word of "$ac_prog", so it can be a program name with args.
3119 set dummy $ac_prog; ac_word=$2
3120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3121 $as_echo_n "checking for $ac_word... " >&6; }
3122 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3123   $as_echo_n "(cached) " >&6
3124 else
3125   if test -n "$ac_ct_CC"; then
3126   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3127 else
3128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3129 for as_dir in $PATH
3130 do
3131   IFS=$as_save_IFS
3132   test -z "$as_dir" && as_dir=.
3133     for ac_exec_ext in '' $ac_executable_extensions; do
3134   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3135     ac_cv_prog_ac_ct_CC="$ac_prog"
3136     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3137     break 2
3138   fi
3139 done
3140   done
3141 IFS=$as_save_IFS
3142
3143 fi
3144 fi
3145 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3146 if test -n "$ac_ct_CC"; then
3147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3148 $as_echo "$ac_ct_CC" >&6; }
3149 else
3150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3151 $as_echo "no" >&6; }
3152 fi
3153
3154
3155   test -n "$ac_ct_CC" && break
3156 done
3157
3158   if test "x$ac_ct_CC" = x; then
3159     CC=""
3160   else
3161     case $cross_compiling:$ac_tool_warned in
3162 yes:)
3163 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3164 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3165 ac_tool_warned=yes ;;
3166 esac
3167     CC=$ac_ct_CC
3168   fi
3169 fi
3170
3171 fi
3172
3173
3174 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3175 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3176 as_fn_error $? "no acceptable C compiler found in \$PATH
3177 See \`config.log' for more details" "$LINENO" 5; }
3178
3179 # Provide some information about the compiler.
3180 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3181 set X $ac_compile
3182 ac_compiler=$2
3183 for ac_option in --version -v -V -qversion; do
3184   { { ac_try="$ac_compiler $ac_option >&5"
3185 case "(($ac_try" in
3186   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3187   *) ac_try_echo=$ac_try;;
3188 esac
3189 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3190 $as_echo "$ac_try_echo"; } >&5
3191   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3192   ac_status=$?
3193   if test -s conftest.err; then
3194     sed '10a\
3195 ... rest of stderr output deleted ...
3196          10q' conftest.err >conftest.er1
3197     cat conftest.er1 >&5
3198   fi
3199   rm -f conftest.er1 conftest.err
3200   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3201   test $ac_status = 0; }
3202 done
3203
3204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3205 /* end confdefs.h.  */
3206
3207 int
3208 main ()
3209 {
3210
3211   ;
3212   return 0;
3213 }
3214 _ACEOF
3215 ac_clean_files_save=$ac_clean_files
3216 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3217 # Try to create an executable without -o first, disregard a.out.
3218 # It will help us diagnose broken compilers, and finding out an intuition
3219 # of exeext.
3220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3221 $as_echo_n "checking whether the C compiler works... " >&6; }
3222 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3223
3224 # The possible output files:
3225 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3226
3227 ac_rmfiles=
3228 for ac_file in $ac_files
3229 do
3230   case $ac_file in
3231     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3232     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3233   esac
3234 done
3235 rm -f $ac_rmfiles
3236
3237 if { { ac_try="$ac_link_default"
3238 case "(($ac_try" in
3239   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3240   *) ac_try_echo=$ac_try;;
3241 esac
3242 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3243 $as_echo "$ac_try_echo"; } >&5
3244   (eval "$ac_link_default") 2>&5
3245   ac_status=$?
3246   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3247   test $ac_status = 0; }; then :
3248   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3249 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3250 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3251 # so that the user can short-circuit this test for compilers unknown to
3252 # Autoconf.
3253 for ac_file in $ac_files ''
3254 do
3255   test -f "$ac_file" || continue
3256   case $ac_file in
3257     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3258         ;;
3259     [ab].out )
3260         # We found the default executable, but exeext='' is most
3261         # certainly right.
3262         break;;
3263     *.* )
3264         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3265         then :; else
3266            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3267         fi
3268         # We set ac_cv_exeext here because the later test for it is not
3269         # safe: cross compilers may not add the suffix if given an `-o'
3270         # argument, so we may need to know it at that point already.
3271         # Even if this section looks crufty: it has the advantage of
3272         # actually working.
3273         break;;
3274     * )
3275         break;;
3276   esac
3277 done
3278 test "$ac_cv_exeext" = no && ac_cv_exeext=
3279
3280 else
3281   ac_file=''
3282 fi
3283 if test -z "$ac_file"; then :
3284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3285 $as_echo "no" >&6; }
3286 $as_echo "$as_me: failed program was:" >&5
3287 sed 's/^/| /' conftest.$ac_ext >&5
3288
3289 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3290 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3291 as_fn_error 77 "C compiler cannot create executables
3292 See \`config.log' for more details" "$LINENO" 5; }
3293 else
3294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3295 $as_echo "yes" >&6; }
3296 fi
3297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3298 $as_echo_n "checking for C compiler default output file name... " >&6; }
3299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3300 $as_echo "$ac_file" >&6; }
3301 ac_exeext=$ac_cv_exeext
3302
3303 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3304 ac_clean_files=$ac_clean_files_save
3305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3306 $as_echo_n "checking for suffix of executables... " >&6; }
3307 if { { ac_try="$ac_link"
3308 case "(($ac_try" in
3309   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3310   *) ac_try_echo=$ac_try;;
3311 esac
3312 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3313 $as_echo "$ac_try_echo"; } >&5
3314   (eval "$ac_link") 2>&5
3315   ac_status=$?
3316   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3317   test $ac_status = 0; }; then :
3318   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3319 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3320 # work properly (i.e., refer to `conftest.exe'), while it won't with
3321 # `rm'.
3322 for ac_file in conftest.exe conftest conftest.*; do
3323   test -f "$ac_file" || continue
3324   case $ac_file in
3325     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3326     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3327           break;;
3328     * ) break;;
3329   esac
3330 done
3331 else
3332   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3333 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3334 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3335 See \`config.log' for more details" "$LINENO" 5; }
3336 fi
3337 rm -f conftest conftest$ac_cv_exeext
3338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3339 $as_echo "$ac_cv_exeext" >&6; }
3340
3341 rm -f conftest.$ac_ext
3342 EXEEXT=$ac_cv_exeext
3343 ac_exeext=$EXEEXT
3344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3345 /* end confdefs.h.  */
3346 #include <stdio.h>
3347 int
3348 main ()
3349 {
3350 FILE *f = fopen ("conftest.out", "w");
3351  return ferror (f) || fclose (f) != 0;
3352
3353   ;
3354   return 0;
3355 }
3356 _ACEOF
3357 ac_clean_files="$ac_clean_files conftest.out"
3358 # Check that the compiler produces executables we can run.  If not, either
3359 # the compiler is broken, or we cross compile.
3360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3361 $as_echo_n "checking whether we are cross compiling... " >&6; }
3362 if test "$cross_compiling" != yes; then
3363   { { ac_try="$ac_link"
3364 case "(($ac_try" in
3365   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3366   *) ac_try_echo=$ac_try;;
3367 esac
3368 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3369 $as_echo "$ac_try_echo"; } >&5
3370   (eval "$ac_link") 2>&5
3371   ac_status=$?
3372   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3373   test $ac_status = 0; }
3374   if { ac_try='./conftest$ac_cv_exeext'
3375   { { case "(($ac_try" in
3376   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3377   *) ac_try_echo=$ac_try;;
3378 esac
3379 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3380 $as_echo "$ac_try_echo"; } >&5
3381   (eval "$ac_try") 2>&5
3382   ac_status=$?
3383   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3384   test $ac_status = 0; }; }; then
3385     cross_compiling=no
3386   else
3387     if test "$cross_compiling" = maybe; then
3388         cross_compiling=yes
3389     else
3390         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3391 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3392 as_fn_error $? "cannot run C compiled programs.
3393 If you meant to cross compile, use \`--host'.
3394 See \`config.log' for more details" "$LINENO" 5; }
3395     fi
3396   fi
3397 fi
3398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3399 $as_echo "$cross_compiling" >&6; }
3400
3401 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3402 ac_clean_files=$ac_clean_files_save
3403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3404 $as_echo_n "checking for suffix of object files... " >&6; }
3405 if ${ac_cv_objext+:} false; then :
3406   $as_echo_n "(cached) " >&6
3407 else
3408   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3409 /* end confdefs.h.  */
3410
3411 int
3412 main ()
3413 {
3414
3415   ;
3416   return 0;
3417 }
3418 _ACEOF
3419 rm -f conftest.o conftest.obj
3420 if { { ac_try="$ac_compile"
3421 case "(($ac_try" in
3422   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3423   *) ac_try_echo=$ac_try;;
3424 esac
3425 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3426 $as_echo "$ac_try_echo"; } >&5
3427   (eval "$ac_compile") 2>&5
3428   ac_status=$?
3429   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3430   test $ac_status = 0; }; then :
3431   for ac_file in conftest.o conftest.obj conftest.*; do
3432   test -f "$ac_file" || continue;
3433   case $ac_file in
3434     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3435     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3436        break;;
3437   esac
3438 done
3439 else
3440   $as_echo "$as_me: failed program was:" >&5
3441 sed 's/^/| /' conftest.$ac_ext >&5
3442
3443 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3444 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3445 as_fn_error $? "cannot compute suffix of object files: cannot compile
3446 See \`config.log' for more details" "$LINENO" 5; }
3447 fi
3448 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3449 fi
3450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3451 $as_echo "$ac_cv_objext" >&6; }
3452 OBJEXT=$ac_cv_objext
3453 ac_objext=$OBJEXT
3454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3455 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3456 if ${ac_cv_c_compiler_gnu+:} false; then :
3457   $as_echo_n "(cached) " >&6
3458 else
3459   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3460 /* end confdefs.h.  */
3461
3462 int
3463 main ()
3464 {
3465 #ifndef __GNUC__
3466        choke me
3467 #endif
3468
3469   ;
3470   return 0;
3471 }
3472 _ACEOF
3473 if ac_fn_c_try_compile "$LINENO"; then :
3474   ac_compiler_gnu=yes
3475 else
3476   ac_compiler_gnu=no
3477 fi
3478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3479 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3480
3481 fi
3482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3483 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3484 if test $ac_compiler_gnu = yes; then
3485   GCC=yes
3486 else
3487   GCC=
3488 fi
3489 ac_test_CFLAGS=${CFLAGS+set}
3490 ac_save_CFLAGS=$CFLAGS
3491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3492 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3493 if ${ac_cv_prog_cc_g+:} false; then :
3494   $as_echo_n "(cached) " >&6
3495 else
3496   ac_save_c_werror_flag=$ac_c_werror_flag
3497    ac_c_werror_flag=yes
3498    ac_cv_prog_cc_g=no
3499    CFLAGS="-g"
3500    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3501 /* end confdefs.h.  */
3502
3503 int
3504 main ()
3505 {
3506
3507   ;
3508   return 0;
3509 }
3510 _ACEOF
3511 if ac_fn_c_try_compile "$LINENO"; then :
3512   ac_cv_prog_cc_g=yes
3513 else
3514   CFLAGS=""
3515       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3516 /* end confdefs.h.  */
3517
3518 int
3519 main ()
3520 {
3521
3522   ;
3523   return 0;
3524 }
3525 _ACEOF
3526 if ac_fn_c_try_compile "$LINENO"; then :
3527
3528 else
3529   ac_c_werror_flag=$ac_save_c_werror_flag
3530          CFLAGS="-g"
3531          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3532 /* end confdefs.h.  */
3533
3534 int
3535 main ()
3536 {
3537
3538   ;
3539   return 0;
3540 }
3541 _ACEOF
3542 if ac_fn_c_try_compile "$LINENO"; then :
3543   ac_cv_prog_cc_g=yes
3544 fi
3545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3546 fi
3547 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3548 fi
3549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3550    ac_c_werror_flag=$ac_save_c_werror_flag
3551 fi
3552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3553 $as_echo "$ac_cv_prog_cc_g" >&6; }
3554 if test "$ac_test_CFLAGS" = set; then
3555   CFLAGS=$ac_save_CFLAGS
3556 elif test $ac_cv_prog_cc_g = yes; then
3557   if test "$GCC" = yes; then
3558     CFLAGS="-g -O2"
3559   else
3560     CFLAGS="-g"
3561   fi
3562 else
3563   if test "$GCC" = yes; then
3564     CFLAGS="-O2"
3565   else
3566     CFLAGS=
3567   fi
3568 fi
3569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3570 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3571 if ${ac_cv_prog_cc_c89+:} false; then :
3572   $as_echo_n "(cached) " >&6
3573 else
3574   ac_cv_prog_cc_c89=no
3575 ac_save_CC=$CC
3576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3577 /* end confdefs.h.  */
3578 #include <stdarg.h>
3579 #include <stdio.h>
3580 struct stat;
3581 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3582 struct buf { int x; };
3583 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3584 static char *e (p, i)
3585      char **p;
3586      int i;
3587 {
3588   return p[i];
3589 }
3590 static char *f (char * (*g) (char **, int), char **p, ...)
3591 {
3592   char *s;
3593   va_list v;
3594   va_start (v,p);
3595   s = g (p, va_arg (v,int));
3596   va_end (v);
3597   return s;
3598 }
3599
3600 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3601    function prototypes and stuff, but not '\xHH' hex character constants.
3602    These don't provoke an error unfortunately, instead are silently treated
3603    as 'x'.  The following induces an error, until -std is added to get
3604    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3605    array size at least.  It's necessary to write '\x00'==0 to get something
3606    that's true only with -std.  */
3607 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3608
3609 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3610    inside strings and character constants.  */
3611 #define FOO(x) 'x'
3612 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3613
3614 int test (int i, double x);
3615 struct s1 {int (*f) (int a);};
3616 struct s2 {int (*f) (double a);};
3617 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3618 int argc;
3619 char **argv;
3620 int
3621 main ()
3622 {
3623 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3624   ;
3625   return 0;
3626 }
3627 _ACEOF
3628 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3629         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3630 do
3631   CC="$ac_save_CC $ac_arg"
3632   if ac_fn_c_try_compile "$LINENO"; then :
3633   ac_cv_prog_cc_c89=$ac_arg
3634 fi
3635 rm -f core conftest.err conftest.$ac_objext
3636   test "x$ac_cv_prog_cc_c89" != "xno" && break
3637 done
3638 rm -f conftest.$ac_ext
3639 CC=$ac_save_CC
3640
3641 fi
3642 # AC_CACHE_VAL
3643 case "x$ac_cv_prog_cc_c89" in
3644   x)
3645     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3646 $as_echo "none needed" >&6; } ;;
3647   xno)
3648     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3649 $as_echo "unsupported" >&6; } ;;
3650   *)
3651     CC="$CC $ac_cv_prog_cc_c89"
3652     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3653 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3654 esac
3655 if test "x$ac_cv_prog_cc_c89" != xno; then :
3656
3657 fi
3658
3659 ac_ext=c
3660 ac_cpp='$CPP $CPPFLAGS'
3661 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3662 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3663 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3664
3665
3666 ac_ext=c
3667 ac_cpp='$CPP $CPPFLAGS'
3668 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3669 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3670 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3672 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3673 # On Suns, sometimes $CPP names a directory.
3674 if test -n "$CPP" && test -d "$CPP"; then
3675   CPP=
3676 fi
3677 if test -z "$CPP"; then
3678   if ${ac_cv_prog_CPP+:} false; then :
3679   $as_echo_n "(cached) " >&6
3680 else
3681       # Double quotes because CPP needs to be expanded
3682     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3683     do
3684       ac_preproc_ok=false
3685 for ac_c_preproc_warn_flag in '' yes
3686 do
3687   # Use a header file that comes with gcc, so configuring glibc
3688   # with a fresh cross-compiler works.
3689   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3690   # <limits.h> exists even on freestanding compilers.
3691   # On the NeXT, cc -E runs the code through the compiler's parser,
3692   # not just through cpp. "Syntax error" is here to catch this case.
3693   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3694 /* end confdefs.h.  */
3695 #ifdef __STDC__
3696 # include <limits.h>
3697 #else
3698 # include <assert.h>
3699 #endif
3700                      Syntax error
3701 _ACEOF
3702 if ac_fn_c_try_cpp "$LINENO"; then :
3703
3704 else
3705   # Broken: fails on valid input.
3706 continue
3707 fi
3708 rm -f conftest.err conftest.i conftest.$ac_ext
3709
3710   # OK, works on sane cases.  Now check whether nonexistent headers
3711   # can be detected and how.
3712   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3713 /* end confdefs.h.  */
3714 #include <ac_nonexistent.h>
3715 _ACEOF
3716 if ac_fn_c_try_cpp "$LINENO"; then :
3717   # Broken: success on invalid input.
3718 continue
3719 else
3720   # Passes both tests.
3721 ac_preproc_ok=:
3722 break
3723 fi
3724 rm -f conftest.err conftest.i conftest.$ac_ext
3725
3726 done
3727 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3728 rm -f conftest.i conftest.err conftest.$ac_ext
3729 if $ac_preproc_ok; then :
3730   break
3731 fi
3732
3733     done
3734     ac_cv_prog_CPP=$CPP
3735
3736 fi
3737   CPP=$ac_cv_prog_CPP
3738 else
3739   ac_cv_prog_CPP=$CPP
3740 fi
3741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3742 $as_echo "$CPP" >&6; }
3743 ac_preproc_ok=false
3744 for ac_c_preproc_warn_flag in '' yes
3745 do
3746   # Use a header file that comes with gcc, so configuring glibc
3747   # with a fresh cross-compiler works.
3748   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3749   # <limits.h> exists even on freestanding compilers.
3750   # On the NeXT, cc -E runs the code through the compiler's parser,
3751   # not just through cpp. "Syntax error" is here to catch this case.
3752   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3753 /* end confdefs.h.  */
3754 #ifdef __STDC__
3755 # include <limits.h>
3756 #else
3757 # include <assert.h>
3758 #endif
3759                      Syntax error
3760 _ACEOF
3761 if ac_fn_c_try_cpp "$LINENO"; then :
3762
3763 else
3764   # Broken: fails on valid input.
3765 continue
3766 fi
3767 rm -f conftest.err conftest.i conftest.$ac_ext
3768
3769   # OK, works on sane cases.  Now check whether nonexistent headers
3770   # can be detected and how.
3771   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3772 /* end confdefs.h.  */
3773 #include <ac_nonexistent.h>
3774 _ACEOF
3775 if ac_fn_c_try_cpp "$LINENO"; then :
3776   # Broken: success on invalid input.
3777 continue
3778 else
3779   # Passes both tests.
3780 ac_preproc_ok=:
3781 break
3782 fi
3783 rm -f conftest.err conftest.i conftest.$ac_ext
3784
3785 done
3786 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3787 rm -f conftest.i conftest.err conftest.$ac_ext
3788 if $ac_preproc_ok; then :
3789
3790 else
3791   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3792 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3793 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3794 See \`config.log' for more details" "$LINENO" 5; }
3795 fi
3796
3797 ac_ext=c
3798 ac_cpp='$CPP $CPPFLAGS'
3799 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3800 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3801 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3802
3803
3804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3805 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3806 if ${ac_cv_path_GREP+:} false; then :
3807   $as_echo_n "(cached) " >&6
3808 else
3809   if test -z "$GREP"; then
3810   ac_path_GREP_found=false
3811   # Loop through the user's path and test for each of PROGNAME-LIST
3812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3813 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3814 do
3815   IFS=$as_save_IFS
3816   test -z "$as_dir" && as_dir=.
3817     for ac_prog in grep ggrep; do
3818     for ac_exec_ext in '' $ac_executable_extensions; do
3819       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3820       as_fn_executable_p "$ac_path_GREP" || continue
3821 # Check for GNU ac_path_GREP and select it if it is found.
3822   # Check for GNU $ac_path_GREP
3823 case `"$ac_path_GREP" --version 2>&1` in
3824 *GNU*)
3825   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3826 *)
3827   ac_count=0
3828   $as_echo_n 0123456789 >"conftest.in"
3829   while :
3830   do
3831     cat "conftest.in" "conftest.in" >"conftest.tmp"
3832     mv "conftest.tmp" "conftest.in"
3833     cp "conftest.in" "conftest.nl"
3834     $as_echo 'GREP' >> "conftest.nl"
3835     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3836     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3837     as_fn_arith $ac_count + 1 && ac_count=$as_val
3838     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3839       # Best one so far, save it but keep looking for a better one
3840       ac_cv_path_GREP="$ac_path_GREP"
3841       ac_path_GREP_max=$ac_count
3842     fi
3843     # 10*(2^10) chars as input seems more than enough
3844     test $ac_count -gt 10 && break
3845   done
3846   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3847 esac
3848
3849       $ac_path_GREP_found && break 3
3850     done
3851   done
3852   done
3853 IFS=$as_save_IFS
3854   if test -z "$ac_cv_path_GREP"; then
3855     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3856   fi
3857 else
3858   ac_cv_path_GREP=$GREP
3859 fi
3860
3861 fi
3862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3863 $as_echo "$ac_cv_path_GREP" >&6; }
3864  GREP="$ac_cv_path_GREP"
3865
3866
3867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3868 $as_echo_n "checking for egrep... " >&6; }
3869 if ${ac_cv_path_EGREP+:} false; then :
3870   $as_echo_n "(cached) " >&6
3871 else
3872   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3873    then ac_cv_path_EGREP="$GREP -E"
3874    else
3875      if test -z "$EGREP"; then
3876   ac_path_EGREP_found=false
3877   # Loop through the user's path and test for each of PROGNAME-LIST
3878   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3879 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3880 do
3881   IFS=$as_save_IFS
3882   test -z "$as_dir" && as_dir=.
3883     for ac_prog in egrep; do
3884     for ac_exec_ext in '' $ac_executable_extensions; do
3885       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3886       as_fn_executable_p "$ac_path_EGREP" || continue
3887 # Check for GNU ac_path_EGREP and select it if it is found.
3888   # Check for GNU $ac_path_EGREP
3889 case `"$ac_path_EGREP" --version 2>&1` in
3890 *GNU*)
3891   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3892 *)
3893   ac_count=0
3894   $as_echo_n 0123456789 >"conftest.in"
3895   while :
3896   do
3897     cat "conftest.in" "conftest.in" >"conftest.tmp"
3898     mv "conftest.tmp" "conftest.in"
3899     cp "conftest.in" "conftest.nl"
3900     $as_echo 'EGREP' >> "conftest.nl"
3901     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3902     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3903     as_fn_arith $ac_count + 1 && ac_count=$as_val
3904     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3905       # Best one so far, save it but keep looking for a better one
3906       ac_cv_path_EGREP="$ac_path_EGREP"
3907       ac_path_EGREP_max=$ac_count
3908     fi
3909     # 10*(2^10) chars as input seems more than enough
3910     test $ac_count -gt 10 && break
3911   done
3912   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3913 esac
3914
3915       $ac_path_EGREP_found && break 3
3916     done
3917   done
3918   done
3919 IFS=$as_save_IFS
3920   if test -z "$ac_cv_path_EGREP"; then
3921     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3922   fi
3923 else
3924   ac_cv_path_EGREP=$EGREP
3925 fi
3926
3927    fi
3928 fi
3929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3930 $as_echo "$ac_cv_path_EGREP" >&6; }
3931  EGREP="$ac_cv_path_EGREP"
3932
3933
3934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3935 $as_echo_n "checking for ANSI C header files... " >&6; }
3936 if ${ac_cv_header_stdc+:} false; then :
3937   $as_echo_n "(cached) " >&6
3938 else
3939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3940 /* end confdefs.h.  */
3941 #include <stdlib.h>
3942 #include <stdarg.h>
3943 #include <string.h>
3944 #include <float.h>
3945
3946 int
3947 main ()
3948 {
3949
3950   ;
3951   return 0;
3952 }
3953 _ACEOF
3954 if ac_fn_c_try_compile "$LINENO"; then :
3955   ac_cv_header_stdc=yes
3956 else
3957   ac_cv_header_stdc=no
3958 fi
3959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3960
3961 if test $ac_cv_header_stdc = yes; then
3962   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3963   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3964 /* end confdefs.h.  */
3965 #include <string.h>
3966
3967 _ACEOF
3968 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3969   $EGREP "memchr" >/dev/null 2>&1; then :
3970
3971 else
3972   ac_cv_header_stdc=no
3973 fi
3974 rm -f conftest*
3975
3976 fi
3977
3978 if test $ac_cv_header_stdc = yes; then
3979   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3980   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3981 /* end confdefs.h.  */
3982 #include <stdlib.h>
3983
3984 _ACEOF
3985 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3986   $EGREP "free" >/dev/null 2>&1; then :
3987
3988 else
3989   ac_cv_header_stdc=no
3990 fi
3991 rm -f conftest*
3992
3993 fi
3994
3995 if test $ac_cv_header_stdc = yes; then
3996   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3997   if test "$cross_compiling" = yes; then :
3998   :
3999 else
4000   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4001 /* end confdefs.h.  */
4002 #include <ctype.h>
4003 #include <stdlib.h>
4004 #if ((' ' & 0x0FF) == 0x020)
4005 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4006 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4007 #else
4008 # define ISLOWER(c) \
4009                    (('a' <= (c) && (c) <= 'i') \
4010                      || ('j' <= (c) && (c) <= 'r') \
4011                      || ('s' <= (c) && (c) <= 'z'))
4012 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4013 #endif
4014
4015 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4016 int
4017 main ()
4018 {
4019   int i;
4020   for (i = 0; i < 256; i++)
4021     if (XOR (islower (i), ISLOWER (i))
4022         || toupper (i) != TOUPPER (i))
4023       return 2;
4024   return 0;
4025 }
4026 _ACEOF
4027 if ac_fn_c_try_run "$LINENO"; then :
4028
4029 else
4030   ac_cv_header_stdc=no
4031 fi
4032 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4033   conftest.$ac_objext conftest.beam conftest.$ac_ext
4034 fi
4035
4036 fi
4037 fi
4038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4039 $as_echo "$ac_cv_header_stdc" >&6; }
4040 if test $ac_cv_header_stdc = yes; then
4041
4042 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4043
4044 fi
4045
4046 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4047 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4048                   inttypes.h stdint.h unistd.h
4049 do :
4050   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4051 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4052 "
4053 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4054   cat >>confdefs.h <<_ACEOF
4055 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4056 _ACEOF
4057
4058 fi
4059
4060 done
4061
4062
4063
4064   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4065 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4066   MINIX=yes
4067 else
4068   MINIX=
4069 fi
4070
4071
4072   if test "$MINIX" = yes; then
4073
4074 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4075
4076
4077 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4078
4079
4080 $as_echo "#define _MINIX 1" >>confdefs.h
4081
4082   fi
4083
4084
4085   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4086 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4087 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4088   $as_echo_n "(cached) " >&6
4089 else
4090   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4091 /* end confdefs.h.  */
4092
4093 #         define __EXTENSIONS__ 1
4094           $ac_includes_default
4095 int
4096 main ()
4097 {
4098
4099   ;
4100   return 0;
4101 }
4102 _ACEOF
4103 if ac_fn_c_try_compile "$LINENO"; then :
4104   ac_cv_safe_to_define___extensions__=yes
4105 else
4106   ac_cv_safe_to_define___extensions__=no
4107 fi
4108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4109 fi
4110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4111 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4112   test $ac_cv_safe_to_define___extensions__ = yes &&
4113     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4114
4115   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4116
4117   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4118
4119   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4120
4121   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4122
4123
4124
4125 if test "$ac_cv_header_minix_config_h" = "yes"; then
4126
4127 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4128
4129 fi
4130
4131 case "$prefix" in
4132         NONE)
4133                 prefix="/usr/local"
4134         ;;
4135 esac
4136 case "$exec_prefix" in
4137         NONE)
4138                 exec_prefix="$prefix"
4139         ;;
4140 esac
4141
4142 # are we on MinGW?
4143 if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
4144 else
4145         if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes"
4146         else on_mingw="no"; fi
4147 fi
4148
4149 #
4150 # Determine configuration file
4151 # the eval is to evaluate shell expansion twice
4152 UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4153
4154 UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4155
4156 UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4157
4158 if test $on_mingw = "no"; then
4159   ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4160 else
4161   ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4162 fi
4163
4164 # Check whether --with-conf_file was given.
4165 if test "${with_conf_file+set}" = set; then :
4166   withval=$with_conf_file; ub_conf_file="$withval"
4167 fi
4168
4169
4170 hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4171
4172
4173 cat >>confdefs.h <<_ACEOF
4174 #define CONFIGFILE "$hdr_config"
4175 _ACEOF
4176
4177 ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4178 $as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4179          X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4180          X"$ub_conf_file" : 'X\(//\)$' \| \
4181          X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4182 $as_echo X"$ub_conf_file" |
4183     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4184             s//\1/
4185             q
4186           }
4187           /^X\(\/\/\)[^/].*/{
4188             s//\1/
4189             q
4190           }
4191           /^X\(\/\/\)$/{
4192             s//\1/
4193             q
4194           }
4195           /^X\(\/\).*/{
4196             s//\1/
4197             q
4198           }
4199           s/.*/./; q'`
4200
4201
4202 # Determine run, chroot directory and pidfile locations
4203
4204 # Check whether --with-run-dir was given.
4205 if test "${with_run_dir+set}" = set; then :
4206   withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4207 else
4208   if test $on_mingw = no; then
4209     UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4210 else
4211     UNBOUND_RUN_DIR=""
4212 fi
4213
4214 fi
4215
4216
4217 hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4218
4219
4220 cat >>confdefs.h <<_ACEOF
4221 #define RUN_DIR "$hdr_run"
4222 _ACEOF
4223
4224
4225
4226 # Check whether --with-chroot-dir was given.
4227 if test "${with_chroot_dir+set}" = set; then :
4228   withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4229 else
4230   if test $on_mingw = no; then
4231     UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4232 else
4233     UNBOUND_CHROOT_DIR=""
4234 fi
4235
4236 fi
4237
4238
4239 hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4240
4241
4242 cat >>confdefs.h <<_ACEOF
4243 #define CHROOT_DIR "$hdr_chroot"
4244 _ACEOF
4245
4246
4247
4248 # Check whether --with-share-dir was given.
4249 if test "${with_share_dir+set}" = set; then :
4250   withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4251 else
4252   UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4253 fi
4254
4255
4256
4257 cat >>confdefs.h <<_ACEOF
4258 #define SHARE_DIR "$UNBOUND_SHARE_DIR"
4259 _ACEOF
4260
4261
4262
4263 # Check whether --with-pidfile was given.
4264 if test "${with_pidfile+set}" = set; then :
4265   withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4266 else
4267   if test $on_mingw = no; then
4268     UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4269 else
4270     UNBOUND_PIDFILE=""
4271 fi
4272
4273 fi
4274
4275
4276 hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4277
4278
4279 cat >>confdefs.h <<_ACEOF
4280 #define PIDFILE "$hdr_pid"
4281 _ACEOF
4282
4283
4284
4285 # Check whether --with-rootkey-file was given.
4286 if test "${with_rootkey_file+set}" = set; then :
4287   withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4288 else
4289   if test $on_mingw = no; then
4290     UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4291 else
4292     UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4293 fi
4294
4295 fi
4296
4297
4298 hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4299
4300
4301 cat >>confdefs.h <<_ACEOF
4302 #define ROOT_ANCHOR_FILE "$hdr_rkey"
4303 _ACEOF
4304
4305
4306
4307 # Check whether --with-rootcert-file was given.
4308 if test "${with_rootcert_file+set}" = set; then :
4309   withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4310 else
4311   if test $on_mingw = no; then
4312     UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4313 else
4314     UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4315 fi
4316
4317 fi
4318
4319
4320 hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4321
4322
4323 cat >>confdefs.h <<_ACEOF
4324 #define ROOT_CERT_FILE "$hdr_rpem"
4325 _ACEOF
4326
4327
4328
4329 # Check whether --with-username was given.
4330 if test "${with_username+set}" = set; then :
4331   withval=$with_username; UNBOUND_USERNAME="$withval"
4332 else
4333   UNBOUND_USERNAME="unbound"
4334 fi
4335
4336
4337
4338 cat >>confdefs.h <<_ACEOF
4339 #define UB_USERNAME "$UNBOUND_USERNAME"
4340 _ACEOF
4341
4342
4343
4344 $as_echo "#define WINVER 0x0502" >>confdefs.h
4345
4346 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/' `
4347
4348
4349 cat >>confdefs.h <<_ACEOF
4350 #define RSRC_PACKAGE_VERSION $wnvs
4351 _ACEOF
4352
4353
4354 # Checks for typedefs, structures, and compiler characteristics.
4355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4356 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4357 if ${ac_cv_c_const+:} false; then :
4358   $as_echo_n "(cached) " >&6
4359 else
4360   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4361 /* end confdefs.h.  */
4362
4363 int
4364 main ()
4365 {
4366
4367 #ifndef __cplusplus
4368   /* Ultrix mips cc rejects this sort of thing.  */
4369   typedef int charset[2];
4370   const charset cs = { 0, 0 };
4371   /* SunOS 4.1.1 cc rejects this.  */
4372   char const *const *pcpcc;
4373   char **ppc;
4374   /* NEC SVR4.0.2 mips cc rejects this.  */
4375   struct point {int x, y;};
4376   static struct point const zero = {0,0};
4377   /* AIX XL C 1.02.0.0 rejects this.
4378      It does not let you subtract one const X* pointer from another in
4379      an arm of an if-expression whose if-part is not a constant
4380      expression */
4381   const char *g = "string";
4382   pcpcc = &g + (g ? g-g : 0);
4383   /* HPUX 7.0 cc rejects these. */
4384   ++pcpcc;
4385   ppc = (char**) pcpcc;
4386   pcpcc = (char const *const *) ppc;
4387   { /* SCO 3.2v4 cc rejects this sort of thing.  */
4388     char tx;
4389     char *t = &tx;
4390     char const *s = 0 ? (char *) 0 : (char const *) 0;
4391
4392     *t++ = 0;
4393     if (s) return 0;
4394   }
4395   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4396     int x[] = {25, 17};
4397     const int *foo = &x[0];
4398     ++foo;
4399   }
4400   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4401     typedef const int *iptr;
4402     iptr p = 0;
4403     ++p;
4404   }
4405   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4406        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4407     struct s { int j; const int *ap[3]; } bx;
4408     struct s *b = &bx; b->j = 5;
4409   }
4410   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4411     const int foo = 10;
4412     if (!foo) return 0;
4413   }
4414   return !cs[0] && !zero.x;
4415 #endif
4416
4417   ;
4418   return 0;
4419 }
4420 _ACEOF
4421 if ac_fn_c_try_compile "$LINENO"; then :
4422   ac_cv_c_const=yes
4423 else
4424   ac_cv_c_const=no
4425 fi
4426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4427 fi
4428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4429 $as_echo "$ac_cv_c_const" >&6; }
4430 if test $ac_cv_c_const = no; then
4431
4432 $as_echo "#define const /**/" >>confdefs.h
4433
4434 fi
4435
4436 ac_ext=c
4437 ac_cpp='$CPP $CPPFLAGS'
4438 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4439 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4440 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4441
4442 # allow user to override the -g -O2 flags.
4443 default_cflags=no
4444 if test "x$CFLAGS" = "x" ; then
4445
4446
4447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4448 $as_echo_n "checking whether $CC supports -g... " >&6; }
4449 cache=`echo g | sed 'y%.=/+-%___p_%'`
4450 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4451   $as_echo_n "(cached) " >&6
4452 else
4453
4454 echo 'void f(void){}' >conftest.c
4455 if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4456 eval "cv_prog_cc_flag_$cache=yes"
4457 else
4458 eval "cv_prog_cc_flag_$cache=no"
4459 fi
4460 rm -f conftest conftest.o conftest.c
4461
4462 fi
4463
4464 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4466 $as_echo "yes" >&6; }
4467 :
4468 CFLAGS="$CFLAGS -g"
4469 else
4470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4471 $as_echo "no" >&6; }
4472 :
4473
4474 fi
4475
4476
4477
4478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4479 $as_echo_n "checking whether $CC supports -O2... " >&6; }
4480 cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4481 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4482   $as_echo_n "(cached) " >&6
4483 else
4484
4485 echo 'void f(void){}' >conftest.c
4486 if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4487 eval "cv_prog_cc_flag_$cache=yes"
4488 else
4489 eval "cv_prog_cc_flag_$cache=no"
4490 fi
4491 rm -f conftest conftest.o conftest.c
4492
4493 fi
4494
4495 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4497 $as_echo "yes" >&6; }
4498 :
4499 CFLAGS="$CFLAGS -O2"
4500 else
4501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4502 $as_echo "no" >&6; }
4503 :
4504
4505 fi
4506
4507 default_cflags=yes
4508 fi
4509 ac_ext=c
4510 ac_cpp='$CPP $CPPFLAGS'
4511 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4512 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4513 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4514 if test -n "$ac_tool_prefix"; then
4515   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4516 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4518 $as_echo_n "checking for $ac_word... " >&6; }
4519 if ${ac_cv_prog_CC+:} false; then :
4520   $as_echo_n "(cached) " >&6
4521 else
4522   if test -n "$CC"; then
4523   ac_cv_prog_CC="$CC" # Let the user override the test.
4524 else
4525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4526 for as_dir in $PATH
4527 do
4528   IFS=$as_save_IFS
4529   test -z "$as_dir" && as_dir=.
4530     for ac_exec_ext in '' $ac_executable_extensions; do
4531   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4532     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4533     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4534     break 2
4535   fi
4536 done
4537   done
4538 IFS=$as_save_IFS
4539
4540 fi
4541 fi
4542 CC=$ac_cv_prog_CC
4543 if test -n "$CC"; then
4544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4545 $as_echo "$CC" >&6; }
4546 else
4547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4548 $as_echo "no" >&6; }
4549 fi
4550
4551
4552 fi
4553 if test -z "$ac_cv_prog_CC"; then
4554   ac_ct_CC=$CC
4555   # Extract the first word of "gcc", so it can be a program name with args.
4556 set dummy gcc; ac_word=$2
4557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4558 $as_echo_n "checking for $ac_word... " >&6; }
4559 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4560   $as_echo_n "(cached) " >&6
4561 else
4562   if test -n "$ac_ct_CC"; then
4563   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4564 else
4565 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4566 for as_dir in $PATH
4567 do
4568   IFS=$as_save_IFS
4569   test -z "$as_dir" && as_dir=.
4570     for ac_exec_ext in '' $ac_executable_extensions; do
4571   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4572     ac_cv_prog_ac_ct_CC="gcc"
4573     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4574     break 2
4575   fi
4576 done
4577   done
4578 IFS=$as_save_IFS
4579
4580 fi
4581 fi
4582 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4583 if test -n "$ac_ct_CC"; then
4584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4585 $as_echo "$ac_ct_CC" >&6; }
4586 else
4587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4588 $as_echo "no" >&6; }
4589 fi
4590
4591   if test "x$ac_ct_CC" = x; then
4592     CC=""
4593   else
4594     case $cross_compiling:$ac_tool_warned in
4595 yes:)
4596 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4597 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4598 ac_tool_warned=yes ;;
4599 esac
4600     CC=$ac_ct_CC
4601   fi
4602 else
4603   CC="$ac_cv_prog_CC"
4604 fi
4605
4606 if test -z "$CC"; then
4607           if test -n "$ac_tool_prefix"; then
4608     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4609 set dummy ${ac_tool_prefix}cc; ac_word=$2
4610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4611 $as_echo_n "checking for $ac_word... " >&6; }
4612 if ${ac_cv_prog_CC+:} false; then :
4613   $as_echo_n "(cached) " >&6
4614 else
4615   if test -n "$CC"; then
4616   ac_cv_prog_CC="$CC" # Let the user override the test.
4617 else
4618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4619 for as_dir in $PATH
4620 do
4621   IFS=$as_save_IFS
4622   test -z "$as_dir" && as_dir=.
4623     for ac_exec_ext in '' $ac_executable_extensions; do
4624   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4625     ac_cv_prog_CC="${ac_tool_prefix}cc"
4626     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4627     break 2
4628   fi
4629 done
4630   done
4631 IFS=$as_save_IFS
4632
4633 fi
4634 fi
4635 CC=$ac_cv_prog_CC
4636 if test -n "$CC"; then
4637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4638 $as_echo "$CC" >&6; }
4639 else
4640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4641 $as_echo "no" >&6; }
4642 fi
4643
4644
4645   fi
4646 fi
4647 if test -z "$CC"; then
4648   # Extract the first word of "cc", so it can be a program name with args.
4649 set dummy cc; ac_word=$2
4650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4651 $as_echo_n "checking for $ac_word... " >&6; }
4652 if ${ac_cv_prog_CC+:} false; then :
4653   $as_echo_n "(cached) " >&6
4654 else
4655   if test -n "$CC"; then
4656   ac_cv_prog_CC="$CC" # Let the user override the test.
4657 else
4658   ac_prog_rejected=no
4659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4660 for as_dir in $PATH
4661 do
4662   IFS=$as_save_IFS
4663   test -z "$as_dir" && as_dir=.
4664     for ac_exec_ext in '' $ac_executable_extensions; do
4665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4666     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4667        ac_prog_rejected=yes
4668        continue
4669      fi
4670     ac_cv_prog_CC="cc"
4671     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4672     break 2
4673   fi
4674 done
4675   done
4676 IFS=$as_save_IFS
4677
4678 if test $ac_prog_rejected = yes; then
4679   # We found a bogon in the path, so make sure we never use it.
4680   set dummy $ac_cv_prog_CC
4681   shift
4682   if test $# != 0; then
4683     # We chose a different compiler from the bogus one.
4684     # However, it has the same basename, so the bogon will be chosen
4685     # first if we set CC to just the basename; use the full file name.
4686     shift
4687     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4688   fi
4689 fi
4690 fi
4691 fi
4692 CC=$ac_cv_prog_CC
4693 if test -n "$CC"; then
4694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4695 $as_echo "$CC" >&6; }
4696 else
4697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4698 $as_echo "no" >&6; }
4699 fi
4700
4701
4702 fi
4703 if test -z "$CC"; then
4704   if test -n "$ac_tool_prefix"; then
4705   for ac_prog in cl.exe
4706   do
4707     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4708 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4710 $as_echo_n "checking for $ac_word... " >&6; }
4711 if ${ac_cv_prog_CC+:} false; then :
4712   $as_echo_n "(cached) " >&6
4713 else
4714   if test -n "$CC"; then
4715   ac_cv_prog_CC="$CC" # Let the user override the test.
4716 else
4717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4718 for as_dir in $PATH
4719 do
4720   IFS=$as_save_IFS
4721   test -z "$as_dir" && as_dir=.
4722     for ac_exec_ext in '' $ac_executable_extensions; do
4723   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4724     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4725     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4726     break 2
4727   fi
4728 done
4729   done
4730 IFS=$as_save_IFS
4731
4732 fi
4733 fi
4734 CC=$ac_cv_prog_CC
4735 if test -n "$CC"; then
4736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4737 $as_echo "$CC" >&6; }
4738 else
4739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4740 $as_echo "no" >&6; }
4741 fi
4742
4743
4744     test -n "$CC" && break
4745   done
4746 fi
4747 if test -z "$CC"; then
4748   ac_ct_CC=$CC
4749   for ac_prog in cl.exe
4750 do
4751   # Extract the first word of "$ac_prog", so it can be a program name with args.
4752 set dummy $ac_prog; ac_word=$2
4753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4754 $as_echo_n "checking for $ac_word... " >&6; }
4755 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4756   $as_echo_n "(cached) " >&6
4757 else
4758   if test -n "$ac_ct_CC"; then
4759   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4760 else
4761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4762 for as_dir in $PATH
4763 do
4764   IFS=$as_save_IFS
4765   test -z "$as_dir" && as_dir=.
4766     for ac_exec_ext in '' $ac_executable_extensions; do
4767   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4768     ac_cv_prog_ac_ct_CC="$ac_prog"
4769     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4770     break 2
4771   fi
4772 done
4773   done
4774 IFS=$as_save_IFS
4775
4776 fi
4777 fi
4778 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4779 if test -n "$ac_ct_CC"; then
4780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4781 $as_echo "$ac_ct_CC" >&6; }
4782 else
4783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4784 $as_echo "no" >&6; }
4785 fi
4786
4787
4788   test -n "$ac_ct_CC" && break
4789 done
4790
4791   if test "x$ac_ct_CC" = x; then
4792     CC=""
4793   else
4794     case $cross_compiling:$ac_tool_warned in
4795 yes:)
4796 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4797 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4798 ac_tool_warned=yes ;;
4799 esac
4800     CC=$ac_ct_CC
4801   fi
4802 fi
4803
4804 fi
4805
4806
4807 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4808 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4809 as_fn_error $? "no acceptable C compiler found in \$PATH
4810 See \`config.log' for more details" "$LINENO" 5; }
4811
4812 # Provide some information about the compiler.
4813 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4814 set X $ac_compile
4815 ac_compiler=$2
4816 for ac_option in --version -v -V -qversion; do
4817   { { ac_try="$ac_compiler $ac_option >&5"
4818 case "(($ac_try" in
4819   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4820   *) ac_try_echo=$ac_try;;
4821 esac
4822 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4823 $as_echo "$ac_try_echo"; } >&5
4824   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4825   ac_status=$?
4826   if test -s conftest.err; then
4827     sed '10a\
4828 ... rest of stderr output deleted ...
4829          10q' conftest.err >conftest.er1
4830     cat conftest.er1 >&5
4831   fi
4832   rm -f conftest.er1 conftest.err
4833   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4834   test $ac_status = 0; }
4835 done
4836
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4838 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4839 if ${ac_cv_c_compiler_gnu+:} false; then :
4840   $as_echo_n "(cached) " >&6
4841 else
4842   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4843 /* end confdefs.h.  */
4844
4845 int
4846 main ()
4847 {
4848 #ifndef __GNUC__
4849        choke me
4850 #endif
4851
4852   ;
4853   return 0;
4854 }
4855 _ACEOF
4856 if ac_fn_c_try_compile "$LINENO"; then :
4857   ac_compiler_gnu=yes
4858 else
4859   ac_compiler_gnu=no
4860 fi
4861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4862 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4863
4864 fi
4865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4866 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4867 if test $ac_compiler_gnu = yes; then
4868   GCC=yes
4869 else
4870   GCC=
4871 fi
4872 ac_test_CFLAGS=${CFLAGS+set}
4873 ac_save_CFLAGS=$CFLAGS
4874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4875 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4876 if ${ac_cv_prog_cc_g+:} false; then :
4877   $as_echo_n "(cached) " >&6
4878 else
4879   ac_save_c_werror_flag=$ac_c_werror_flag
4880    ac_c_werror_flag=yes
4881    ac_cv_prog_cc_g=no
4882    CFLAGS="-g"
4883    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4884 /* end confdefs.h.  */
4885
4886 int
4887 main ()
4888 {
4889
4890   ;
4891   return 0;
4892 }
4893 _ACEOF
4894 if ac_fn_c_try_compile "$LINENO"; then :
4895   ac_cv_prog_cc_g=yes
4896 else
4897   CFLAGS=""
4898       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4899 /* end confdefs.h.  */
4900
4901 int
4902 main ()
4903 {
4904
4905   ;
4906   return 0;
4907 }
4908 _ACEOF
4909 if ac_fn_c_try_compile "$LINENO"; then :
4910
4911 else
4912   ac_c_werror_flag=$ac_save_c_werror_flag
4913          CFLAGS="-g"
4914          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4915 /* end confdefs.h.  */
4916
4917 int
4918 main ()
4919 {
4920
4921   ;
4922   return 0;
4923 }
4924 _ACEOF
4925 if ac_fn_c_try_compile "$LINENO"; then :
4926   ac_cv_prog_cc_g=yes
4927 fi
4928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4929 fi
4930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4931 fi
4932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4933    ac_c_werror_flag=$ac_save_c_werror_flag
4934 fi
4935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4936 $as_echo "$ac_cv_prog_cc_g" >&6; }
4937 if test "$ac_test_CFLAGS" = set; then
4938   CFLAGS=$ac_save_CFLAGS
4939 elif test $ac_cv_prog_cc_g = yes; then
4940   if test "$GCC" = yes; then
4941     CFLAGS="-g -O2"
4942   else
4943     CFLAGS="-g"
4944   fi
4945 else
4946   if test "$GCC" = yes; then
4947     CFLAGS="-O2"
4948   else
4949     CFLAGS=
4950   fi
4951 fi
4952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4953 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4954 if ${ac_cv_prog_cc_c89+:} false; then :
4955   $as_echo_n "(cached) " >&6
4956 else
4957   ac_cv_prog_cc_c89=no
4958 ac_save_CC=$CC
4959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4960 /* end confdefs.h.  */
4961 #include <stdarg.h>
4962 #include <stdio.h>
4963 struct stat;
4964 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4965 struct buf { int x; };
4966 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4967 static char *e (p, i)
4968      char **p;
4969      int i;
4970 {
4971   return p[i];
4972 }
4973 static char *f (char * (*g) (char **, int), char **p, ...)
4974 {
4975   char *s;
4976   va_list v;
4977   va_start (v,p);
4978   s = g (p, va_arg (v,int));
4979   va_end (v);
4980   return s;
4981 }
4982
4983 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4984    function prototypes and stuff, but not '\xHH' hex character constants.
4985    These don't provoke an error unfortunately, instead are silently treated
4986    as 'x'.  The following induces an error, until -std is added to get
4987    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4988    array size at least.  It's necessary to write '\x00'==0 to get something
4989    that's true only with -std.  */
4990 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4991
4992 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4993    inside strings and character constants.  */
4994 #define FOO(x) 'x'
4995 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4996
4997 int test (int i, double x);
4998 struct s1 {int (*f) (int a);};
4999 struct s2 {int (*f) (double a);};
5000 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5001 int argc;
5002 char **argv;
5003 int
5004 main ()
5005 {
5006 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5007   ;
5008   return 0;
5009 }
5010 _ACEOF
5011 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5012         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5013 do
5014   CC="$ac_save_CC $ac_arg"
5015   if ac_fn_c_try_compile "$LINENO"; then :
5016   ac_cv_prog_cc_c89=$ac_arg
5017 fi
5018 rm -f core conftest.err conftest.$ac_objext
5019   test "x$ac_cv_prog_cc_c89" != "xno" && break
5020 done
5021 rm -f conftest.$ac_ext
5022 CC=$ac_save_CC
5023
5024 fi
5025 # AC_CACHE_VAL
5026 case "x$ac_cv_prog_cc_c89" in
5027   x)
5028     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5029 $as_echo "none needed" >&6; } ;;
5030   xno)
5031     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5032 $as_echo "unsupported" >&6; } ;;
5033   *)
5034     CC="$CC $ac_cv_prog_cc_c89"
5035     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5036 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5037 esac
5038 if test "x$ac_cv_prog_cc_c89" != xno; then :
5039
5040 fi
5041
5042 ac_ext=c
5043 ac_cpp='$CPP $CPPFLAGS'
5044 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5045 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5046 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5047
5048
5049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5050 $as_echo_n "checking $CC dependency flag... " >&6; }
5051 echo 'void f(){}' >conftest.c
5052 if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5053         DEPFLAG="-MM"
5054 else
5055   if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5056         DEPFLAG="-xM1"
5057   else
5058         DEPFLAG="-MM"  # dunno do something
5059   fi
5060 fi
5061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5062 $as_echo "$DEPFLAG" >&6; }
5063 rm -f conftest.c
5064
5065
5066
5067
5068
5069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5070 $as_echo_n "checking whether $CC supports -Werror... " >&6; }
5071 cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5072 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5073   $as_echo_n "(cached) " >&6
5074 else
5075
5076 echo 'void f(void){}' >conftest.c
5077 if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5078 eval "cv_prog_cc_flag_$cache=yes"
5079 else
5080 eval "cv_prog_cc_flag_$cache=no"
5081 fi
5082 rm -f conftest conftest.o conftest.c
5083
5084 fi
5085
5086 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5088 $as_echo "yes" >&6; }
5089 :
5090 ERRFLAG="-Werror"
5091 else
5092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5093 $as_echo "no" >&6; }
5094 :
5095 ERRFLAG="-errwarn"
5096 fi
5097
5098
5099
5100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5101 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5102 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5103 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5104   $as_echo_n "(cached) " >&6
5105 else
5106
5107 echo 'void f(void){}' >conftest.c
5108 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5109 eval "cv_prog_cc_flag_$cache=yes"
5110 else
5111 eval "cv_prog_cc_flag_$cache=no"
5112 fi
5113 rm -f conftest conftest.o conftest.c
5114
5115 fi
5116
5117 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5119 $as_echo "yes" >&6; }
5120 :
5121 ERRFLAG="$ERRFLAG -Wall"
5122 else
5123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5124 $as_echo "no" >&6; }
5125 :
5126 ERRFLAG="$ERRFLAG -errfmt"
5127 fi
5128
5129
5130
5131
5132
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5134 $as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5135 cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5136 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5137   $as_echo_n "(cached) " >&6
5138 else
5139
5140 echo 'void f(void){}' >conftest.c
5141 if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5142 eval "cv_prog_cc_flag_$cache=yes"
5143 else
5144 eval "cv_prog_cc_flag_$cache=no"
5145 fi
5146 rm -f conftest conftest.o conftest.c
5147
5148 fi
5149
5150 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5152 $as_echo "yes" >&6; }
5153 :
5154 C99FLAG="-std=c99"
5155 else
5156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5157 $as_echo "no" >&6; }
5158 :
5159
5160 fi
5161
5162
5163
5164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5165 $as_echo_n "checking whether $CC supports -xc99... " >&6; }
5166 cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5167 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5168   $as_echo_n "(cached) " >&6
5169 else
5170
5171 echo 'void f(void){}' >conftest.c
5172 if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5173 eval "cv_prog_cc_flag_$cache=yes"
5174 else
5175 eval "cv_prog_cc_flag_$cache=no"
5176 fi
5177 rm -f conftest conftest.o conftest.c
5178
5179 fi
5180
5181 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5183 $as_echo "yes" >&6; }
5184 :
5185 C99FLAG="-xc99"
5186 else
5187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5188 $as_echo "no" >&6; }
5189 :
5190
5191 fi
5192
5193
5194 for ac_header in getopt.h time.h
5195 do :
5196   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5197 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5198 "
5199 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5200   cat >>confdefs.h <<_ACEOF
5201 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5202 _ACEOF
5203
5204 fi
5205
5206 done
5207
5208
5209
5210
5211
5212 { $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
5213 $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; }
5214 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`
5215 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5216   $as_echo_n "(cached) " >&6
5217 else
5218
5219 echo '
5220 #include "confdefs.h"
5221 #include <stdlib.h>
5222 #include <ctype.h>
5223 #include <sys/time.h>
5224 #ifdef HAVE_TIME_H
5225 #include <time.h>
5226 #endif
5227 #include <unistd.h>
5228 #include <netdb.h>
5229 #ifdef HAVE_GETOPT_H
5230 #include <getopt.h>
5231 #endif
5232
5233 int test() {
5234         int a;
5235         char **opts = NULL;
5236         struct timeval tv;
5237         char *t;
5238         time_t time = 0;
5239         char *buf = NULL;
5240         const char* str = NULL;
5241         struct msghdr msg;
5242         msg.msg_control = 0;
5243         t = ctime_r(&time, buf);
5244         tv.tv_usec = 10;
5245         srandom(32);
5246         a = getopt(2, opts, "a");
5247         a = isascii(32);
5248         str = gai_strerror(0);
5249         if(str && t && tv.tv_usec && msg.msg_control)
5250                 a = 0;
5251         return a;
5252 }
5253 ' > conftest.c
5254 echo 'void f(){}' >>conftest.c
5255 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5256 eval "cv_prog_cc_flag_needed_$cache=no"
5257 else
5258
5259 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
5260 eval "cv_prog_cc_flag_needed_$cache=yes"
5261 else
5262 eval "cv_prog_cc_flag_needed_$cache=fail"
5263 #echo 'Test with flag fails too!'
5264 #cat conftest.c
5265 #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"
5266 #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`
5267 #exit 1
5268 fi
5269
5270 fi
5271 rm -f conftest conftest.c conftest.o
5272
5273 fi
5274
5275 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5277 $as_echo "yes" >&6; }
5278 :
5279 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"
5280 else
5281 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5283 $as_echo "no" >&6; }
5284 #echo 'Test with flag is no!'
5285 #cat conftest.c
5286 #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"
5287 #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`
5288 #exit 1
5289 :
5290
5291 else
5292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5293 $as_echo "failed" >&6; }
5294 :
5295
5296 fi
5297 fi
5298
5299
5300
5301
5302
5303 { $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
5304 $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; }
5305 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`
5306 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5307   $as_echo_n "(cached) " >&6
5308 else
5309
5310 echo '
5311 #include "confdefs.h"
5312 #include <stdlib.h>
5313 #include <ctype.h>
5314 #include <sys/time.h>
5315 #ifdef HAVE_TIME_H
5316 #include <time.h>
5317 #endif
5318 #include <unistd.h>
5319 #include <netdb.h>
5320 #ifdef HAVE_GETOPT_H
5321 #include <getopt.h>
5322 #endif
5323
5324 int test() {
5325         int a;
5326         char **opts = NULL;
5327         struct timeval tv;
5328         char *t;
5329         time_t time = 0;
5330         char *buf = NULL;
5331         const char* str = NULL;
5332         struct msghdr msg;
5333         msg.msg_control = 0;
5334         t = ctime_r(&time, buf);
5335         tv.tv_usec = 10;
5336         srandom(32);
5337         a = getopt(2, opts, "a");
5338         a = isascii(32);
5339         str = gai_strerror(0);
5340         if(str && t && tv.tv_usec && msg.msg_control)
5341                 a = 0;
5342         return a;
5343 }
5344 ' > conftest.c
5345 echo 'void f(){}' >>conftest.c
5346 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5347 eval "cv_prog_cc_flag_needed_$cache=no"
5348 else
5349
5350 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
5351 eval "cv_prog_cc_flag_needed_$cache=yes"
5352 else
5353 eval "cv_prog_cc_flag_needed_$cache=fail"
5354 #echo 'Test with flag fails too!'
5355 #cat conftest.c
5356 #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"
5357 #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`
5358 #exit 1
5359 fi
5360
5361 fi
5362 rm -f conftest conftest.c conftest.o
5363
5364 fi
5365
5366 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5368 $as_echo "yes" >&6; }
5369 :
5370 CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5371 else
5372 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5374 $as_echo "no" >&6; }
5375 #echo 'Test with flag is no!'
5376 #cat conftest.c
5377 #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"
5378 #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`
5379 #exit 1
5380 :
5381
5382 else
5383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5384 $as_echo "failed" >&6; }
5385 :
5386
5387 fi
5388 fi
5389
5390
5391
5392
5393
5394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5395 $as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5396 cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5397 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5398   $as_echo_n "(cached) " >&6
5399 else
5400
5401 echo '
5402 #include <stdbool.h>
5403 #include <ctype.h>
5404 int test() {
5405         int a = 0;
5406         return a;
5407 }
5408 ' > conftest.c
5409 echo 'void f(){}' >>conftest.c
5410 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5411 eval "cv_prog_cc_flag_needed_$cache=no"
5412 else
5413
5414 if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5415 eval "cv_prog_cc_flag_needed_$cache=yes"
5416 else
5417 eval "cv_prog_cc_flag_needed_$cache=fail"
5418 #echo 'Test with flag fails too!'
5419 #cat conftest.c
5420 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5421 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5422 #exit 1
5423 fi
5424
5425 fi
5426 rm -f conftest conftest.c conftest.o
5427
5428 fi
5429
5430 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5432 $as_echo "yes" >&6; }
5433 :
5434 CFLAGS="$CFLAGS $C99FLAG"
5435 else
5436 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5438 $as_echo "no" >&6; }
5439 #echo 'Test with flag is no!'
5440 #cat conftest.c
5441 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5442 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5443 #exit 1
5444 :
5445
5446 else
5447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5448 $as_echo "failed" >&6; }
5449 :
5450
5451 fi
5452 fi
5453
5454
5455
5456
5457
5458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
5459 $as_echo_n "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
5460 cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
5461 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5462   $as_echo_n "(cached) " >&6
5463 else
5464
5465 echo '
5466 #include <ctype.h>
5467
5468 int test() {
5469         int a;
5470         a = isascii(32);
5471         return a;
5472 }
5473 ' > conftest.c
5474 echo 'void f(){}' >>conftest.c
5475 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5476 eval "cv_prog_cc_flag_needed_$cache=no"
5477 else
5478
5479 if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5480 eval "cv_prog_cc_flag_needed_$cache=yes"
5481 else
5482 eval "cv_prog_cc_flag_needed_$cache=fail"
5483 #echo 'Test with flag fails too!'
5484 #cat conftest.c
5485 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5486 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5487 #exit 1
5488 fi
5489
5490 fi
5491 rm -f conftest conftest.c conftest.o
5492
5493 fi
5494
5495 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5497 $as_echo "yes" >&6; }
5498 :
5499 CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
5500 else
5501 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5503 $as_echo "no" >&6; }
5504 #echo 'Test with flag is no!'
5505 #cat conftest.c
5506 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5507 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5508 #exit 1
5509 :
5510
5511 else
5512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5513 $as_echo "failed" >&6; }
5514 :
5515
5516 fi
5517 fi
5518
5519
5520
5521
5522
5523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5524 $as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5525 cache=_D_GNU_SOURCE
5526 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5527   $as_echo_n "(cached) " >&6
5528 else
5529
5530 echo '
5531 #include <netinet/in.h>
5532
5533 int test() {
5534         struct in6_pktinfo inf;
5535         int a = (int)sizeof(inf);
5536         return a;
5537 }
5538 ' > conftest.c
5539 echo 'void f(){}' >>conftest.c
5540 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5541 eval "cv_prog_cc_flag_needed_$cache=no"
5542 else
5543
5544 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5545 eval "cv_prog_cc_flag_needed_$cache=yes"
5546 else
5547 eval "cv_prog_cc_flag_needed_$cache=fail"
5548 #echo 'Test with flag fails too!'
5549 #cat conftest.c
5550 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5551 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5552 #exit 1
5553 fi
5554
5555 fi
5556 rm -f conftest conftest.c conftest.o
5557
5558 fi
5559
5560 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5562 $as_echo "yes" >&6; }
5563 :
5564 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5565 else
5566 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5568 $as_echo "no" >&6; }
5569 #echo 'Test with flag is no!'
5570 #cat conftest.c
5571 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5572 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5573 #exit 1
5574 :
5575
5576 else
5577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5578 $as_echo "failed" >&6; }
5579 :
5580
5581 fi
5582 fi
5583
5584
5585 # check again for GNU_SOURCE for setresgid. May fail if setresgid
5586 # is not available at all. -D_FRSRESGID is to make this check unique.
5587 # otherwise we would get the previous cached result.
5588
5589
5590
5591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5592 $as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5593 cache=_D_GNU_SOURCE__D_FRSRESGID
5594 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5595   $as_echo_n "(cached) " >&6
5596 else
5597
5598 echo '
5599 #include <unistd.h>
5600
5601 int test() {
5602         int a = setresgid(0,0,0);
5603         a = setresuid(0,0,0);
5604         return a;
5605 }
5606 ' > conftest.c
5607 echo 'void f(){}' >>conftest.c
5608 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5609 eval "cv_prog_cc_flag_needed_$cache=no"
5610 else
5611
5612 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5613 eval "cv_prog_cc_flag_needed_$cache=yes"
5614 else
5615 eval "cv_prog_cc_flag_needed_$cache=fail"
5616 #echo 'Test with flag fails too!'
5617 #cat conftest.c
5618 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5619 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5620 #exit 1
5621 fi
5622
5623 fi
5624 rm -f conftest conftest.c conftest.o
5625
5626 fi
5627
5628 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5630 $as_echo "yes" >&6; }
5631 :
5632 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5633 else
5634 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5636 $as_echo "no" >&6; }
5637 #echo 'Test with flag is no!'
5638 #cat conftest.c
5639 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5640 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5641 #exit 1
5642 :
5643
5644 else
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5646 $as_echo "failed" >&6; }
5647 :
5648
5649 fi
5650 fi
5651
5652
5653
5654
5655
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5657 $as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5658 cache=_D_POSIX_C_SOURCE_200112
5659 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5660   $as_echo_n "(cached) " >&6
5661 else
5662
5663 echo '
5664 #include "confdefs.h"
5665 #ifdef HAVE_TIME_H
5666 #include <time.h>
5667 #endif
5668 #include <netdb.h>
5669
5670 int test() {
5671         int a = 0;
5672         char *t;
5673         time_t time = 0;
5674         char *buf = NULL;
5675         const char* str = NULL;
5676         t = ctime_r(&time, buf);
5677         str = gai_strerror(0);
5678         if(t && str)
5679                 a = 0;
5680         return a;
5681 }
5682 ' > conftest.c
5683 echo 'void f(){}' >>conftest.c
5684 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5685 eval "cv_prog_cc_flag_needed_$cache=no"
5686 else
5687
5688 if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5689 eval "cv_prog_cc_flag_needed_$cache=yes"
5690 else
5691 eval "cv_prog_cc_flag_needed_$cache=fail"
5692 #echo 'Test with flag fails too!'
5693 #cat conftest.c
5694 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5695 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5696 #exit 1
5697 fi
5698
5699 fi
5700 rm -f conftest conftest.c conftest.o
5701
5702 fi
5703
5704 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5706 $as_echo "yes" >&6; }
5707 :
5708 CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5709 else
5710 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5712 $as_echo "no" >&6; }
5713 #echo 'Test with flag is no!'
5714 #cat conftest.c
5715 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5716 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5717 #exit 1
5718 :
5719
5720 else
5721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5722 $as_echo "failed" >&6; }
5723 :
5724
5725 fi
5726 fi
5727
5728
5729
5730
5731
5732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5733 $as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5734 cache=_D__EXTENSIONS__
5735 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5736   $as_echo_n "(cached) " >&6
5737 else
5738
5739 echo '
5740 #include "confdefs.h"
5741 #include <stdlib.h>
5742 #include <ctype.h>
5743 #include <sys/time.h>
5744 #ifdef HAVE_TIME_H
5745 #include <time.h>
5746 #endif
5747 #include <unistd.h>
5748 #ifdef HAVE_GETOPT_H
5749 #include <getopt.h>
5750 #endif
5751
5752 int test() {
5753         int a;
5754         char **opts = NULL;
5755         struct timeval tv;
5756         tv.tv_usec = 10;
5757         srandom(32);
5758         a = getopt(2, opts, "a");
5759         a = isascii(32);
5760         if(tv.tv_usec)
5761                 a = 0;
5762         return a;
5763 }
5764 ' > conftest.c
5765 echo 'void f(){}' >>conftest.c
5766 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5767 eval "cv_prog_cc_flag_needed_$cache=no"
5768 else
5769
5770 if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5771 eval "cv_prog_cc_flag_needed_$cache=yes"
5772 else
5773 eval "cv_prog_cc_flag_needed_$cache=fail"
5774 #echo 'Test with flag fails too!'
5775 #cat conftest.c
5776 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5777 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5778 #exit 1
5779 fi
5780
5781 fi
5782 rm -f conftest conftest.c conftest.o
5783
5784 fi
5785
5786 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5788 $as_echo "yes" >&6; }
5789 :
5790 CFLAGS="$CFLAGS -D__EXTENSIONS__"
5791 else
5792 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5794 $as_echo "no" >&6; }
5795 #echo 'Test with flag is no!'
5796 #cat conftest.c
5797 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5798 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5799 #exit 1
5800 :
5801
5802 else
5803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5804 $as_echo "failed" >&6; }
5805 :
5806
5807 fi
5808 fi
5809
5810
5811
5812
5813 # debug mode flags warnings
5814 # Check whether --enable-checking was given.
5815 if test "${enable_checking+set}" = set; then :
5816   enableval=$enable_checking;
5817 fi
5818
5819 # Check whether --enable-debug was given.
5820 if test "${enable_debug+set}" = set; then :
5821   enableval=$enable_debug;
5822 fi
5823
5824 if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5825 else debug_enabled="$enable_checking"; fi
5826
5827 case "$debug_enabled" in
5828         yes)
5829
5830
5831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5832 $as_echo_n "checking whether $CC supports -W... " >&6; }
5833 cache=`echo W | sed 'y%.=/+-%___p_%'`
5834 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5835   $as_echo_n "(cached) " >&6
5836 else
5837
5838 echo 'void f(void){}' >conftest.c
5839 if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5840 eval "cv_prog_cc_flag_$cache=yes"
5841 else
5842 eval "cv_prog_cc_flag_$cache=no"
5843 fi
5844 rm -f conftest conftest.o conftest.c
5845
5846 fi
5847
5848 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5850 $as_echo "yes" >&6; }
5851 :
5852 CFLAGS="$CFLAGS -W"
5853 else
5854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5855 $as_echo "no" >&6; }
5856 :
5857
5858 fi
5859
5860
5861
5862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5863 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5864 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5865 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5866   $as_echo_n "(cached) " >&6
5867 else
5868
5869 echo 'void f(void){}' >conftest.c
5870 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5871 eval "cv_prog_cc_flag_$cache=yes"
5872 else
5873 eval "cv_prog_cc_flag_$cache=no"
5874 fi
5875 rm -f conftest conftest.o conftest.c
5876
5877 fi
5878
5879 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5881 $as_echo "yes" >&6; }
5882 :
5883 CFLAGS="$CFLAGS -Wall"
5884 else
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5886 $as_echo "no" >&6; }
5887 :
5888
5889 fi
5890
5891
5892
5893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5894 $as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5895 cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5896 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5897   $as_echo_n "(cached) " >&6
5898 else
5899
5900 echo 'void f(void){}' >conftest.c
5901 if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5902 eval "cv_prog_cc_flag_$cache=yes"
5903 else
5904 eval "cv_prog_cc_flag_$cache=no"
5905 fi
5906 rm -f conftest conftest.o conftest.c
5907
5908 fi
5909
5910 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5912 $as_echo "yes" >&6; }
5913 :
5914 CFLAGS="$CFLAGS -Wextra"
5915 else
5916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5917 $as_echo "no" >&6; }
5918 :
5919
5920 fi
5921
5922
5923
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
5925 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
5926 cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
5927 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5928   $as_echo_n "(cached) " >&6
5929 else
5930
5931 echo 'void f(void){}' >conftest.c
5932 if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
5933 eval "cv_prog_cc_flag_$cache=yes"
5934 else
5935 eval "cv_prog_cc_flag_$cache=no"
5936 fi
5937 rm -f conftest conftest.o conftest.c
5938
5939 fi
5940
5941 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5943 $as_echo "yes" >&6; }
5944 :
5945 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
5946 else
5947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5948 $as_echo "no" >&6; }
5949 :
5950
5951 fi
5952
5953
5954 $as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
5955
5956                 ;;
5957         no|*)
5958                 # nothing to do.
5959                 ;;
5960 esac
5961 if test "$default_cflags" = "yes"; then
5962         # only when CFLAGS was "" at the start, if the users wants to
5963         # override we shouldn't add default cflags, because they wouldn't
5964         # be able to turn off these options and set the CFLAGS wanted.
5965
5966     # Check whether --enable-flto was given.
5967 if test "${enable_flto+set}" = set; then :
5968   enableval=$enable_flto;
5969 fi
5970
5971     if test "x$enable_flto" != "xno"; then :
5972
5973         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
5974 $as_echo_n "checking if $CC supports -flto... " >&6; }
5975         BAKCFLAGS="$CFLAGS"
5976         CFLAGS="$CFLAGS -flto"
5977         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5978 /* end confdefs.h.  */
5979
5980 int
5981 main ()
5982 {
5983
5984   ;
5985   return 0;
5986 }
5987 _ACEOF
5988 if ac_fn_c_try_link "$LINENO"; then :
5989
5990             if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
5991                 CFLAGS="$BAKCFLAGS"
5992                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5993 $as_echo "no" >&6; }
5994             else
5995                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5996 $as_echo "yes" >&6; }
5997             fi
5998             rm -f conftest conftest.c conftest.o
5999
6000 else
6001   CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6002 $as_echo "no" >&6; }
6003 fi
6004 rm -f core conftest.err conftest.$ac_objext \
6005     conftest$ac_exeext conftest.$ac_ext
6006
6007 fi
6008
6009
6010     # Check whether --enable-pie was given.
6011 if test "${enable_pie+set}" = set; then :
6012   enableval=$enable_pie;
6013 fi
6014
6015     if test "x$enable_pie" = "xyes"; then :
6016
6017         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6018 $as_echo_n "checking if $CC supports PIE... " >&6; }
6019         BAKLDFLAGS="$LDFLAGS"
6020         BAKCFLAGS="$CFLAGS"
6021         LDFLAGS="$LDFLAGS -pie"
6022         CFLAGS="$CFLAGS -fPIE"
6023         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6024 /* end confdefs.h.  */
6025
6026 int
6027 main ()
6028 {
6029
6030   ;
6031   return 0;
6032 }
6033 _ACEOF
6034 if ac_fn_c_try_link "$LINENO"; then :
6035
6036             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6037                 LDFLAGS="$BAKLDFLAGS"
6038                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6039 $as_echo "no" >&6; }
6040             else
6041                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6042 $as_echo "yes" >&6; }
6043             fi
6044             rm -f conftest conftest.c conftest.o
6045
6046 else
6047   LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6048 $as_echo "no" >&6; }
6049 fi
6050 rm -f core conftest.err conftest.$ac_objext \
6051     conftest$ac_exeext conftest.$ac_ext
6052
6053 fi
6054
6055
6056     # Check whether --enable-relro_now was given.
6057 if test "${enable_relro_now+set}" = set; then :
6058   enableval=$enable_relro_now;
6059 fi
6060
6061     if test "x$enable_relro_now" = "xyes"; then :
6062
6063         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6064 $as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6065         BAKLDFLAGS="$LDFLAGS"
6066         LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6067         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6068 /* end confdefs.h.  */
6069
6070 int
6071 main ()
6072 {
6073
6074   ;
6075   return 0;
6076 }
6077 _ACEOF
6078 if ac_fn_c_try_link "$LINENO"; then :
6079
6080             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6081                 LDFLAGS="$BAKLDFLAGS"
6082                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6083 $as_echo "no" >&6; }
6084             else
6085                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6086 $as_echo "yes" >&6; }
6087             fi
6088             rm -f conftest conftest.c conftest.o
6089
6090 else
6091   LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6092 $as_echo "no" >&6; }
6093 fi
6094 rm -f core conftest.err conftest.$ac_objext \
6095     conftest$ac_exeext conftest.$ac_ext
6096
6097 fi
6098
6099 fi
6100
6101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6102 $as_echo_n "checking for inline... " >&6; }
6103 if ${ac_cv_c_inline+:} false; then :
6104   $as_echo_n "(cached) " >&6
6105 else
6106   ac_cv_c_inline=no
6107 for ac_kw in inline __inline__ __inline; do
6108   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6109 /* end confdefs.h.  */
6110 #ifndef __cplusplus
6111 typedef int foo_t;
6112 static $ac_kw foo_t static_foo () {return 0; }
6113 $ac_kw foo_t foo () {return 0; }
6114 #endif
6115
6116 _ACEOF
6117 if ac_fn_c_try_compile "$LINENO"; then :
6118   ac_cv_c_inline=$ac_kw
6119 fi
6120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6121   test "$ac_cv_c_inline" != no && break
6122 done
6123
6124 fi
6125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6126 $as_echo "$ac_cv_c_inline" >&6; }
6127
6128 case $ac_cv_c_inline in
6129   inline | yes) ;;
6130   *)
6131     case $ac_cv_c_inline in
6132       no) ac_val=;;
6133       *) ac_val=$ac_cv_c_inline;;
6134     esac
6135     cat >>confdefs.h <<_ACEOF
6136 #ifndef __cplusplus
6137 #define inline $ac_val
6138 #endif
6139 _ACEOF
6140     ;;
6141 esac
6142
6143
6144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6145 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6146 if ${ac_cv_c_format_attribute+:} false; then :
6147   $as_echo_n "(cached) " >&6
6148 else
6149   ac_cv_c_format_attribute=no
6150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6151 /* end confdefs.h.  */
6152 #include <stdio.h>
6153 void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6154 void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6155
6156 int
6157 main ()
6158 {
6159
6160    f ("%s", "str");
6161
6162   ;
6163   return 0;
6164 }
6165 _ACEOF
6166 if ac_fn_c_try_compile "$LINENO"; then :
6167   ac_cv_c_format_attribute="yes"
6168 else
6169   ac_cv_c_format_attribute="no"
6170 fi
6171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6172
6173 fi
6174
6175
6176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6177 $as_echo "$ac_cv_c_format_attribute" >&6; }
6178 if test $ac_cv_c_format_attribute = yes; then
6179
6180 $as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6181
6182 fi
6183
6184
6185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6186 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6187 if ${ac_cv_c_unused_attribute+:} false; then :
6188   $as_echo_n "(cached) " >&6
6189 else
6190   ac_cv_c_unused_attribute=no
6191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6192 /* end confdefs.h.  */
6193 #include <stdio.h>
6194 void f (char *u __attribute__((unused)));
6195
6196 int
6197 main ()
6198 {
6199
6200    f ("x");
6201
6202   ;
6203   return 0;
6204 }
6205 _ACEOF
6206 if ac_fn_c_try_compile "$LINENO"; then :
6207   ac_cv_c_unused_attribute="yes"
6208 else
6209   ac_cv_c_unused_attribute="no"
6210 fi
6211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6212
6213 fi
6214
6215
6216
6217
6218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6219 $as_echo "$ac_cv_c_unused_attribute" >&6; }
6220 if test $ac_cv_c_unused_attribute = yes; then
6221
6222 $as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6223
6224 fi
6225
6226
6227
6228
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6230 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6231 if ${ac_cv_c_weak_attribute+:} false; then :
6232   $as_echo_n "(cached) " >&6
6233 else
6234   ac_cv_c_weak_attribute=no
6235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6236 /* end confdefs.h.  */
6237  #include <stdio.h>
6238 __attribute__((weak)) void f(int x) { printf("%d", x); }
6239
6240 int
6241 main ()
6242 {
6243
6244    f(1);
6245
6246   ;
6247   return 0;
6248 }
6249 _ACEOF
6250 if ac_fn_c_try_compile "$LINENO"; then :
6251   ac_cv_c_weak_attribute="yes"
6252 else
6253   ac_cv_c_weak_attribute="no"
6254 fi
6255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6256
6257 fi
6258
6259
6260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6261 $as_echo "$ac_cv_c_weak_attribute" >&6; }
6262 if test $ac_cv_c_weak_attribute = yes; then
6263
6264 $as_echo "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6265
6266 fi
6267
6268
6269 if test "$srcdir" != "."; then
6270         CPPFLAGS="$CPPFLAGS -I$srcdir"
6271 fi
6272
6273
6274
6275 for ac_prog in flex lex
6276 do
6277   # Extract the first word of "$ac_prog", so it can be a program name with args.
6278 set dummy $ac_prog; ac_word=$2
6279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6280 $as_echo_n "checking for $ac_word... " >&6; }
6281 if ${ac_cv_prog_LEX+:} false; then :
6282   $as_echo_n "(cached) " >&6
6283 else
6284   if test -n "$LEX"; then
6285   ac_cv_prog_LEX="$LEX" # Let the user override the test.
6286 else
6287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6288 for as_dir in $PATH
6289 do
6290   IFS=$as_save_IFS
6291   test -z "$as_dir" && as_dir=.
6292     for ac_exec_ext in '' $ac_executable_extensions; do
6293   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6294     ac_cv_prog_LEX="$ac_prog"
6295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6296     break 2
6297   fi
6298 done
6299   done
6300 IFS=$as_save_IFS
6301
6302 fi
6303 fi
6304 LEX=$ac_cv_prog_LEX
6305 if test -n "$LEX"; then
6306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6307 $as_echo "$LEX" >&6; }
6308 else
6309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6310 $as_echo "no" >&6; }
6311 fi
6312
6313
6314   test -n "$LEX" && break
6315 done
6316 test -n "$LEX" || LEX=":"
6317
6318 if test "x$LEX" != "x:"; then
6319   cat >conftest.l <<_ACEOF
6320 %%
6321 a { ECHO; }
6322 b { REJECT; }
6323 c { yymore (); }
6324 d { yyless (1); }
6325 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6326     yyless ((input () != 0)); }
6327 f { unput (yytext[0]); }
6328 . { BEGIN INITIAL; }
6329 %%
6330 #ifdef YYTEXT_POINTER
6331 extern char *yytext;
6332 #endif
6333 int
6334 main (void)
6335 {
6336   return ! yylex () + ! yywrap ();
6337 }
6338 _ACEOF
6339 { { ac_try="$LEX conftest.l"
6340 case "(($ac_try" in
6341   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6342   *) ac_try_echo=$ac_try;;
6343 esac
6344 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6345 $as_echo "$ac_try_echo"; } >&5
6346   (eval "$LEX conftest.l") 2>&5
6347   ac_status=$?
6348   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6349   test $ac_status = 0; }
6350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6351 $as_echo_n "checking lex output file root... " >&6; }
6352 if ${ac_cv_prog_lex_root+:} false; then :
6353   $as_echo_n "(cached) " >&6
6354 else
6355
6356 if test -f lex.yy.c; then
6357   ac_cv_prog_lex_root=lex.yy
6358 elif test -f lexyy.c; then
6359   ac_cv_prog_lex_root=lexyy
6360 else
6361   as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6362 fi
6363 fi
6364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6365 $as_echo "$ac_cv_prog_lex_root" >&6; }
6366 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6367
6368 if test -z "${LEXLIB+set}"; then
6369   { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6370 $as_echo_n "checking lex library... " >&6; }
6371 if ${ac_cv_lib_lex+:} false; then :
6372   $as_echo_n "(cached) " >&6
6373 else
6374
6375     ac_save_LIBS=$LIBS
6376     ac_cv_lib_lex='none needed'
6377     for ac_lib in '' -lfl -ll; do
6378       LIBS="$ac_lib $ac_save_LIBS"
6379       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6380 /* end confdefs.h.  */
6381 `cat $LEX_OUTPUT_ROOT.c`
6382 _ACEOF
6383 if ac_fn_c_try_link "$LINENO"; then :
6384   ac_cv_lib_lex=$ac_lib
6385 fi
6386 rm -f core conftest.err conftest.$ac_objext \
6387     conftest$ac_exeext conftest.$ac_ext
6388       test "$ac_cv_lib_lex" != 'none needed' && break
6389     done
6390     LIBS=$ac_save_LIBS
6391
6392 fi
6393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6394 $as_echo "$ac_cv_lib_lex" >&6; }
6395   test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6396 fi
6397
6398
6399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6400 $as_echo_n "checking whether yytext is a pointer... " >&6; }
6401 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6402   $as_echo_n "(cached) " >&6
6403 else
6404   # POSIX says lex can declare yytext either as a pointer or an array; the
6405 # default is implementation-dependent.  Figure out which it is, since
6406 # not all implementations provide the %pointer and %array declarations.
6407 ac_cv_prog_lex_yytext_pointer=no
6408 ac_save_LIBS=$LIBS
6409 LIBS="$LEXLIB $ac_save_LIBS"
6410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6411 /* end confdefs.h.  */
6412
6413   #define YYTEXT_POINTER 1
6414 `cat $LEX_OUTPUT_ROOT.c`
6415 _ACEOF
6416 if ac_fn_c_try_link "$LINENO"; then :
6417   ac_cv_prog_lex_yytext_pointer=yes
6418 fi
6419 rm -f core conftest.err conftest.$ac_objext \
6420     conftest$ac_exeext conftest.$ac_ext
6421 LIBS=$ac_save_LIBS
6422
6423 fi
6424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6425 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6426 if test $ac_cv_prog_lex_yytext_pointer = yes; then
6427
6428 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6429
6430 fi
6431 rm -f conftest.l $LEX_OUTPUT_ROOT.c
6432
6433 fi
6434
6435         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6436 $as_echo_n "checking for yylex_destroy... " >&6; }
6437         if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6438
6439 $as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6440
6441                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6442 $as_echo "yes" >&6; }
6443         else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6444 $as_echo "no" >&6; }; fi
6445
6446 for ac_prog in 'bison -y' byacc
6447 do
6448   # Extract the first word of "$ac_prog", so it can be a program name with args.
6449 set dummy $ac_prog; ac_word=$2
6450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6451 $as_echo_n "checking for $ac_word... " >&6; }
6452 if ${ac_cv_prog_YACC+:} false; then :
6453   $as_echo_n "(cached) " >&6
6454 else
6455   if test -n "$YACC"; then
6456   ac_cv_prog_YACC="$YACC" # Let the user override the test.
6457 else
6458 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6459 for as_dir in $PATH
6460 do
6461   IFS=$as_save_IFS
6462   test -z "$as_dir" && as_dir=.
6463     for ac_exec_ext in '' $ac_executable_extensions; do
6464   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6465     ac_cv_prog_YACC="$ac_prog"
6466     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6467     break 2
6468   fi
6469 done
6470   done
6471 IFS=$as_save_IFS
6472
6473 fi
6474 fi
6475 YACC=$ac_cv_prog_YACC
6476 if test -n "$YACC"; then
6477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6478 $as_echo "$YACC" >&6; }
6479 else
6480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6481 $as_echo "no" >&6; }
6482 fi
6483
6484
6485   test -n "$YACC" && break
6486 done
6487 test -n "$YACC" || YACC="yacc"
6488
6489 # Extract the first word of "doxygen", so it can be a program name with args.
6490 set dummy doxygen; ac_word=$2
6491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6492 $as_echo_n "checking for $ac_word... " >&6; }
6493 if ${ac_cv_prog_doxygen+:} false; then :
6494   $as_echo_n "(cached) " >&6
6495 else
6496   if test -n "$doxygen"; then
6497   ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6498 else
6499 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6500 for as_dir in $PATH
6501 do
6502   IFS=$as_save_IFS
6503   test -z "$as_dir" && as_dir=.
6504     for ac_exec_ext in '' $ac_executable_extensions; do
6505   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6506     ac_cv_prog_doxygen="doxygen"
6507     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6508     break 2
6509   fi
6510 done
6511   done
6512 IFS=$as_save_IFS
6513
6514 fi
6515 fi
6516 doxygen=$ac_cv_prog_doxygen
6517 if test -n "$doxygen"; then
6518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6519 $as_echo "$doxygen" >&6; }
6520 else
6521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6522 $as_echo "no" >&6; }
6523 fi
6524
6525
6526 if test -n "$ac_tool_prefix"; then
6527   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6528 set dummy ${ac_tool_prefix}strip; ac_word=$2
6529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6530 $as_echo_n "checking for $ac_word... " >&6; }
6531 if ${ac_cv_prog_STRIP+:} false; then :
6532   $as_echo_n "(cached) " >&6
6533 else
6534   if test -n "$STRIP"; then
6535   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6536 else
6537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6538 for as_dir in $PATH
6539 do
6540   IFS=$as_save_IFS
6541   test -z "$as_dir" && as_dir=.
6542     for ac_exec_ext in '' $ac_executable_extensions; do
6543   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6544     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6545     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6546     break 2
6547   fi
6548 done
6549   done
6550 IFS=$as_save_IFS
6551
6552 fi
6553 fi
6554 STRIP=$ac_cv_prog_STRIP
6555 if test -n "$STRIP"; then
6556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6557 $as_echo "$STRIP" >&6; }
6558 else
6559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6560 $as_echo "no" >&6; }
6561 fi
6562
6563
6564 fi
6565 if test -z "$ac_cv_prog_STRIP"; then
6566   ac_ct_STRIP=$STRIP
6567   # Extract the first word of "strip", so it can be a program name with args.
6568 set dummy strip; ac_word=$2
6569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6570 $as_echo_n "checking for $ac_word... " >&6; }
6571 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6572   $as_echo_n "(cached) " >&6
6573 else
6574   if test -n "$ac_ct_STRIP"; then
6575   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6576 else
6577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6578 for as_dir in $PATH
6579 do
6580   IFS=$as_save_IFS
6581   test -z "$as_dir" && as_dir=.
6582     for ac_exec_ext in '' $ac_executable_extensions; do
6583   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6584     ac_cv_prog_ac_ct_STRIP="strip"
6585     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6586     break 2
6587   fi
6588 done
6589   done
6590 IFS=$as_save_IFS
6591
6592 fi
6593 fi
6594 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6595 if test -n "$ac_ct_STRIP"; then
6596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6597 $as_echo "$ac_ct_STRIP" >&6; }
6598 else
6599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6600 $as_echo "no" >&6; }
6601 fi
6602
6603   if test "x$ac_ct_STRIP" = x; then
6604     STRIP=""
6605   else
6606     case $cross_compiling:$ac_tool_warned in
6607 yes:)
6608 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6609 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6610 ac_tool_warned=yes ;;
6611 esac
6612     STRIP=$ac_ct_STRIP
6613   fi
6614 else
6615   STRIP="$ac_cv_prog_STRIP"
6616 fi
6617
6618 ac_aux_dir=
6619 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6620   if test -f "$ac_dir/install-sh"; then
6621     ac_aux_dir=$ac_dir
6622     ac_install_sh="$ac_aux_dir/install-sh -c"
6623     break
6624   elif test -f "$ac_dir/install.sh"; then
6625     ac_aux_dir=$ac_dir
6626     ac_install_sh="$ac_aux_dir/install.sh -c"
6627     break
6628   elif test -f "$ac_dir/shtool"; then
6629     ac_aux_dir=$ac_dir
6630     ac_install_sh="$ac_aux_dir/shtool install -c"
6631     break
6632   fi
6633 done
6634 if test -z "$ac_aux_dir"; then
6635   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6636 fi
6637
6638 # These three variables are undocumented and unsupported,
6639 # and are intended to be withdrawn in a future Autoconf release.
6640 # They can cause serious problems if a builder's source tree is in a directory
6641 # whose full name contains unusual characters.
6642 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6643 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6644 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6645
6646
6647 # Make sure we can run config.sub.
6648 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6649   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6650
6651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6652 $as_echo_n "checking build system type... " >&6; }
6653 if ${ac_cv_build+:} false; then :
6654   $as_echo_n "(cached) " >&6
6655 else
6656   ac_build_alias=$build_alias
6657 test "x$ac_build_alias" = x &&
6658   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6659 test "x$ac_build_alias" = x &&
6660   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6661 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6662   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6663
6664 fi
6665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6666 $as_echo "$ac_cv_build" >&6; }
6667 case $ac_cv_build in
6668 *-*-*) ;;
6669 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6670 esac
6671 build=$ac_cv_build
6672 ac_save_IFS=$IFS; IFS='-'
6673 set x $ac_cv_build
6674 shift
6675 build_cpu=$1
6676 build_vendor=$2
6677 shift; shift
6678 # Remember, the first character of IFS is used to create $*,
6679 # except with old shells:
6680 build_os=$*
6681 IFS=$ac_save_IFS
6682 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6683
6684
6685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6686 $as_echo_n "checking host system type... " >&6; }
6687 if ${ac_cv_host+:} false; then :
6688   $as_echo_n "(cached) " >&6
6689 else
6690   if test "x$host_alias" = x; then
6691   ac_cv_host=$ac_cv_build
6692 else
6693   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6694     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6695 fi
6696
6697 fi
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6699 $as_echo "$ac_cv_host" >&6; }
6700 case $ac_cv_host in
6701 *-*-*) ;;
6702 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6703 esac
6704 host=$ac_cv_host
6705 ac_save_IFS=$IFS; IFS='-'
6706 set x $ac_cv_host
6707 shift
6708 host_cpu=$1
6709 host_vendor=$2
6710 shift; shift
6711 # Remember, the first character of IFS is used to create $*,
6712 # except with old shells:
6713 host_os=$*
6714 IFS=$ac_save_IFS
6715 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6716
6717
6718
6719 # skip these tests, we do not need them.
6720
6721
6722
6723
6724
6725
6726
6727
6728 # always use ./libtool unless override from commandline (libtool=mylibtool)
6729 if test -z "$libtool"; then
6730         libtool="./libtool"
6731 fi
6732
6733 # avoid libtool max commandline length test on systems that fork slowly.
6734
6735 if echo "$host_os" | grep "sunos4" >/dev/null; then
6736         lt_cv_sys_max_cmd_len=32750;
6737 fi
6738 if test -n "$ac_tool_prefix"; then
6739   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6740 set dummy ${ac_tool_prefix}ar; ac_word=$2
6741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6742 $as_echo_n "checking for $ac_word... " >&6; }
6743 if ${ac_cv_path_AR+:} false; then :
6744   $as_echo_n "(cached) " >&6
6745 else
6746   case $AR in
6747   [\\/]* | ?:[\\/]*)
6748   ac_cv_path_AR="$AR" # Let the user override the test with a path.
6749   ;;
6750   *)
6751   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6752 for as_dir in $PATH
6753 do
6754   IFS=$as_save_IFS
6755   test -z "$as_dir" && as_dir=.
6756     for ac_exec_ext in '' $ac_executable_extensions; do
6757   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6758     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6759     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6760     break 2
6761   fi
6762 done
6763   done
6764 IFS=$as_save_IFS
6765
6766   ;;
6767 esac
6768 fi
6769 AR=$ac_cv_path_AR
6770 if test -n "$AR"; then
6771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6772 $as_echo "$AR" >&6; }
6773 else
6774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6775 $as_echo "no" >&6; }
6776 fi
6777
6778
6779 fi
6780 if test -z "$ac_cv_path_AR"; then
6781   ac_pt_AR=$AR
6782   # Extract the first word of "ar", so it can be a program name with args.
6783 set dummy ar; ac_word=$2
6784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6785 $as_echo_n "checking for $ac_word... " >&6; }
6786 if ${ac_cv_path_ac_pt_AR+:} false; then :
6787   $as_echo_n "(cached) " >&6
6788 else
6789   case $ac_pt_AR in
6790   [\\/]* | ?:[\\/]*)
6791   ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6792   ;;
6793   *)
6794   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6795 for as_dir in $PATH
6796 do
6797   IFS=$as_save_IFS
6798   test -z "$as_dir" && as_dir=.
6799     for ac_exec_ext in '' $ac_executable_extensions; do
6800   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6801     ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6802     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6803     break 2
6804   fi
6805 done
6806   done
6807 IFS=$as_save_IFS
6808
6809   ;;
6810 esac
6811 fi
6812 ac_pt_AR=$ac_cv_path_ac_pt_AR
6813 if test -n "$ac_pt_AR"; then
6814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6815 $as_echo "$ac_pt_AR" >&6; }
6816 else
6817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6818 $as_echo "no" >&6; }
6819 fi
6820
6821   if test "x$ac_pt_AR" = x; then
6822     AR="false"
6823   else
6824     case $cross_compiling:$ac_tool_warned in
6825 yes:)
6826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6827 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6828 ac_tool_warned=yes ;;
6829 esac
6830     AR=$ac_pt_AR
6831   fi
6832 else
6833   AR="$ac_cv_path_AR"
6834 fi
6835
6836 if test $AR = false; then
6837         as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
6838 fi
6839
6840 case `pwd` in
6841   *\ * | *\     *)
6842     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
6843 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
6844 esac
6845
6846
6847
6848 macro_version='2.4.6'
6849 macro_revision='2.4.6'
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863 ltmain=$ac_aux_dir/ltmain.sh
6864
6865 # Backslashify metacharacters that are still active within
6866 # double-quoted strings.
6867 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6868
6869 # Same as above, but do not quote variable references.
6870 double_quote_subst='s/\(["`\\]\)/\\\1/g'
6871
6872 # Sed substitution to delay expansion of an escaped shell variable in a
6873 # double_quote_subst'ed string.
6874 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6875
6876 # Sed substitution to delay expansion of an escaped single quote.
6877 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
6878
6879 # Sed substitution to avoid accidental globbing in evaled expressions
6880 no_glob_subst='s/\*/\\\*/g'
6881
6882 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6883 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
6884 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
6885
6886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
6887 $as_echo_n "checking how to print strings... " >&6; }
6888 # Test print first, because it will be a builtin if present.
6889 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6890    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6891   ECHO='print -r --'
6892 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6893   ECHO='printf %s\n'
6894 else
6895   # Use this function as a fallback that always works.
6896   func_fallback_echo ()
6897   {
6898     eval 'cat <<_LTECHO_EOF
6899 $1
6900 _LTECHO_EOF'
6901   }
6902   ECHO='func_fallback_echo'
6903 fi
6904
6905 # func_echo_all arg...
6906 # Invoke $ECHO with all args, space-separated.
6907 func_echo_all ()
6908 {
6909     $ECHO ""
6910 }
6911
6912 case $ECHO in
6913   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
6914 $as_echo "printf" >&6; } ;;
6915   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
6916 $as_echo "print -r" >&6; } ;;
6917   *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
6918 $as_echo "cat" >&6; } ;;
6919 esac
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6935 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6936 if ${ac_cv_path_SED+:} false; then :
6937   $as_echo_n "(cached) " >&6
6938 else
6939             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6940      for ac_i in 1 2 3 4 5 6 7; do
6941        ac_script="$ac_script$as_nl$ac_script"
6942      done
6943      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6944      { ac_script=; unset ac_script;}
6945      if test -z "$SED"; then
6946   ac_path_SED_found=false
6947   # Loop through the user's path and test for each of PROGNAME-LIST
6948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6949 for as_dir in $PATH
6950 do
6951   IFS=$as_save_IFS
6952   test -z "$as_dir" && as_dir=.
6953     for ac_prog in sed gsed; do
6954     for ac_exec_ext in '' $ac_executable_extensions; do
6955       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6956       as_fn_executable_p "$ac_path_SED" || continue
6957 # Check for GNU ac_path_SED and select it if it is found.
6958   # Check for GNU $ac_path_SED
6959 case `"$ac_path_SED" --version 2>&1` in
6960 *GNU*)
6961   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6962 *)
6963   ac_count=0
6964   $as_echo_n 0123456789 >"conftest.in"
6965   while :
6966   do
6967     cat "conftest.in" "conftest.in" >"conftest.tmp"
6968     mv "conftest.tmp" "conftest.in"
6969     cp "conftest.in" "conftest.nl"
6970     $as_echo '' >> "conftest.nl"
6971     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6972     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6973     as_fn_arith $ac_count + 1 && ac_count=$as_val
6974     if test $ac_count -gt ${ac_path_SED_max-0}; then
6975       # Best one so far, save it but keep looking for a better one
6976       ac_cv_path_SED="$ac_path_SED"
6977       ac_path_SED_max=$ac_count
6978     fi
6979     # 10*(2^10) chars as input seems more than enough
6980     test $ac_count -gt 10 && break
6981   done
6982   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6983 esac
6984
6985       $ac_path_SED_found && break 3
6986     done
6987   done
6988   done
6989 IFS=$as_save_IFS
6990   if test -z "$ac_cv_path_SED"; then
6991     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6992   fi
6993 else
6994   ac_cv_path_SED=$SED
6995 fi
6996
6997 fi
6998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6999 $as_echo "$ac_cv_path_SED" >&6; }
7000  SED="$ac_cv_path_SED"
7001   rm -f conftest.sed
7002
7003 test -z "$SED" && SED=sed
7004 Xsed="$SED -e 1s/^X//"
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7017 $as_echo_n "checking for fgrep... " >&6; }
7018 if ${ac_cv_path_FGREP+:} false; then :
7019   $as_echo_n "(cached) " >&6
7020 else
7021   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7022    then ac_cv_path_FGREP="$GREP -F"
7023    else
7024      if test -z "$FGREP"; then
7025   ac_path_FGREP_found=false
7026   # Loop through the user's path and test for each of PROGNAME-LIST
7027   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7028 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7029 do
7030   IFS=$as_save_IFS
7031   test -z "$as_dir" && as_dir=.
7032     for ac_prog in fgrep; do
7033     for ac_exec_ext in '' $ac_executable_extensions; do
7034       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
7035       as_fn_executable_p "$ac_path_FGREP" || continue
7036 # Check for GNU ac_path_FGREP and select it if it is found.
7037   # Check for GNU $ac_path_FGREP
7038 case `"$ac_path_FGREP" --version 2>&1` in
7039 *GNU*)
7040   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7041 *)
7042   ac_count=0
7043   $as_echo_n 0123456789 >"conftest.in"
7044   while :
7045   do
7046     cat "conftest.in" "conftest.in" >"conftest.tmp"
7047     mv "conftest.tmp" "conftest.in"
7048     cp "conftest.in" "conftest.nl"
7049     $as_echo 'FGREP' >> "conftest.nl"
7050     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7051     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7052     as_fn_arith $ac_count + 1 && ac_count=$as_val
7053     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7054       # Best one so far, save it but keep looking for a better one
7055       ac_cv_path_FGREP="$ac_path_FGREP"
7056       ac_path_FGREP_max=$ac_count
7057     fi
7058     # 10*(2^10) chars as input seems more than enough
7059     test $ac_count -gt 10 && break
7060   done
7061   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7062 esac
7063
7064       $ac_path_FGREP_found && break 3
7065     done
7066   done
7067   done
7068 IFS=$as_save_IFS
7069   if test -z "$ac_cv_path_FGREP"; then
7070     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7071   fi
7072 else
7073   ac_cv_path_FGREP=$FGREP
7074 fi
7075
7076    fi
7077 fi
7078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7079 $as_echo "$ac_cv_path_FGREP" >&6; }
7080  FGREP="$ac_cv_path_FGREP"
7081
7082
7083 test -z "$GREP" && GREP=grep
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103 # Check whether --with-gnu-ld was given.
7104 if test "${with_gnu_ld+set}" = set; then :
7105   withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7106 else
7107   with_gnu_ld=no
7108 fi
7109
7110 ac_prog=ld
7111 if test yes = "$GCC"; then
7112   # Check if gcc -print-prog-name=ld gives a path.
7113   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7114 $as_echo_n "checking for ld used by $CC... " >&6; }
7115   case $host in
7116   *-*-mingw*)
7117     # gcc leaves a trailing carriage return, which upsets mingw
7118     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7119   *)
7120     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7121   esac
7122   case $ac_prog in
7123     # Accept absolute paths.
7124     [\\/]* | ?:[\\/]*)
7125       re_direlt='/[^/][^/]*/\.\./'
7126       # Canonicalize the pathname of ld
7127       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7128       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7129         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7130       done
7131       test -z "$LD" && LD=$ac_prog
7132       ;;
7133   "")
7134     # If it fails, then pretend we aren't using GCC.
7135     ac_prog=ld
7136     ;;
7137   *)
7138     # If it is relative, then search for the first ld in PATH.
7139     with_gnu_ld=unknown
7140     ;;
7141   esac
7142 elif test yes = "$with_gnu_ld"; then
7143   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7144 $as_echo_n "checking for GNU ld... " >&6; }
7145 else
7146   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7147 $as_echo_n "checking for non-GNU ld... " >&6; }
7148 fi
7149 if ${lt_cv_path_LD+:} false; then :
7150   $as_echo_n "(cached) " >&6
7151 else
7152   if test -z "$LD"; then
7153   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7154   for ac_dir in $PATH; do
7155     IFS=$lt_save_ifs
7156     test -z "$ac_dir" && ac_dir=.
7157     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7158       lt_cv_path_LD=$ac_dir/$ac_prog
7159       # Check to see if the program is GNU ld.  I'd rather use --version,
7160       # but apparently some variants of GNU ld only accept -v.
7161       # Break only if it was the GNU/non-GNU ld that we prefer.
7162       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7163       *GNU* | *'with BFD'*)
7164         test no != "$with_gnu_ld" && break
7165         ;;
7166       *)
7167         test yes != "$with_gnu_ld" && break
7168         ;;
7169       esac
7170     fi
7171   done
7172   IFS=$lt_save_ifs
7173 else
7174   lt_cv_path_LD=$LD # Let the user override the test with a path.
7175 fi
7176 fi
7177
7178 LD=$lt_cv_path_LD
7179 if test -n "$LD"; then
7180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7181 $as_echo "$LD" >&6; }
7182 else
7183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7184 $as_echo "no" >&6; }
7185 fi
7186 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7188 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7189 if ${lt_cv_prog_gnu_ld+:} false; then :
7190   $as_echo_n "(cached) " >&6
7191 else
7192   # I'd rather use --version here, but apparently some GNU lds only accept -v.
7193 case `$LD -v 2>&1 </dev/null` in
7194 *GNU* | *'with BFD'*)
7195   lt_cv_prog_gnu_ld=yes
7196   ;;
7197 *)
7198   lt_cv_prog_gnu_ld=no
7199   ;;
7200 esac
7201 fi
7202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7203 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
7204 with_gnu_ld=$lt_cv_prog_gnu_ld
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7215 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7216 if ${lt_cv_path_NM+:} false; then :
7217   $as_echo_n "(cached) " >&6
7218 else
7219   if test -n "$NM"; then
7220   # Let the user override the test.
7221   lt_cv_path_NM=$NM
7222 else
7223   lt_nm_to_check=${ac_tool_prefix}nm
7224   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7225     lt_nm_to_check="$lt_nm_to_check nm"
7226   fi
7227   for lt_tmp_nm in $lt_nm_to_check; do
7228     lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7229     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7230       IFS=$lt_save_ifs
7231       test -z "$ac_dir" && ac_dir=.
7232       tmp_nm=$ac_dir/$lt_tmp_nm
7233       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7234         # Check to see if the nm accepts a BSD-compat flag.
7235         # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7236         #   nm: unknown option "B" ignored
7237         # Tru64's nm complains that /dev/null is an invalid object file
7238         # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7239         case $build_os in
7240         mingw*) lt_bad_file=conftest.nm/nofile ;;
7241         *) lt_bad_file=/dev/null ;;
7242         esac
7243         case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7244         *$lt_bad_file* | *'Invalid file or object type'*)
7245           lt_cv_path_NM="$tmp_nm -B"
7246           break 2
7247           ;;
7248         *)
7249           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7250           */dev/null*)
7251             lt_cv_path_NM="$tmp_nm -p"
7252             break 2
7253             ;;
7254           *)
7255             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7256             continue # so that we can try to find one that supports BSD flags
7257             ;;
7258           esac
7259           ;;
7260         esac
7261       fi
7262     done
7263     IFS=$lt_save_ifs
7264   done
7265   : ${lt_cv_path_NM=no}
7266 fi
7267 fi
7268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7269 $as_echo "$lt_cv_path_NM" >&6; }
7270 if test no != "$lt_cv_path_NM"; then
7271   NM=$lt_cv_path_NM
7272 else
7273   # Didn't find any BSD compatible name lister, look for dumpbin.
7274   if test -n "$DUMPBIN"; then :
7275     # Let the user override the test.
7276   else
7277     if test -n "$ac_tool_prefix"; then
7278   for ac_prog in dumpbin "link -dump"
7279   do
7280     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7281 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7283 $as_echo_n "checking for $ac_word... " >&6; }
7284 if ${ac_cv_prog_DUMPBIN+:} false; then :
7285   $as_echo_n "(cached) " >&6
7286 else
7287   if test -n "$DUMPBIN"; then
7288   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7289 else
7290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7291 for as_dir in $PATH
7292 do
7293   IFS=$as_save_IFS
7294   test -z "$as_dir" && as_dir=.
7295     for ac_exec_ext in '' $ac_executable_extensions; do
7296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7297     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7299     break 2
7300   fi
7301 done
7302   done
7303 IFS=$as_save_IFS
7304
7305 fi
7306 fi
7307 DUMPBIN=$ac_cv_prog_DUMPBIN
7308 if test -n "$DUMPBIN"; then
7309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7310 $as_echo "$DUMPBIN" >&6; }
7311 else
7312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7313 $as_echo "no" >&6; }
7314 fi
7315
7316
7317     test -n "$DUMPBIN" && break
7318   done
7319 fi
7320 if test -z "$DUMPBIN"; then
7321   ac_ct_DUMPBIN=$DUMPBIN
7322   for ac_prog in dumpbin "link -dump"
7323 do
7324   # Extract the first word of "$ac_prog", so it can be a program name with args.
7325 set dummy $ac_prog; ac_word=$2
7326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7327 $as_echo_n "checking for $ac_word... " >&6; }
7328 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7329   $as_echo_n "(cached) " >&6
7330 else
7331   if test -n "$ac_ct_DUMPBIN"; then
7332   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7333 else
7334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7335 for as_dir in $PATH
7336 do
7337   IFS=$as_save_IFS
7338   test -z "$as_dir" && as_dir=.
7339     for ac_exec_ext in '' $ac_executable_extensions; do
7340   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7341     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7342     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7343     break 2
7344   fi
7345 done
7346   done
7347 IFS=$as_save_IFS
7348
7349 fi
7350 fi
7351 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7352 if test -n "$ac_ct_DUMPBIN"; then
7353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7354 $as_echo "$ac_ct_DUMPBIN" >&6; }
7355 else
7356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7357 $as_echo "no" >&6; }
7358 fi
7359
7360
7361   test -n "$ac_ct_DUMPBIN" && break
7362 done
7363
7364   if test "x$ac_ct_DUMPBIN" = x; then
7365     DUMPBIN=":"
7366   else
7367     case $cross_compiling:$ac_tool_warned in
7368 yes:)
7369 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7370 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7371 ac_tool_warned=yes ;;
7372 esac
7373     DUMPBIN=$ac_ct_DUMPBIN
7374   fi
7375 fi
7376
7377     case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7378     *COFF*)
7379       DUMPBIN="$DUMPBIN -symbols -headers"
7380       ;;
7381     *)
7382       DUMPBIN=:
7383       ;;
7384     esac
7385   fi
7386
7387   if test : != "$DUMPBIN"; then
7388     NM=$DUMPBIN
7389   fi
7390 fi
7391 test -z "$NM" && NM=nm
7392
7393
7394
7395
7396
7397
7398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7399 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
7400 if ${lt_cv_nm_interface+:} false; then :
7401   $as_echo_n "(cached) " >&6
7402 else
7403   lt_cv_nm_interface="BSD nm"
7404   echo "int some_variable = 0;" > conftest.$ac_ext
7405   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7406   (eval "$ac_compile" 2>conftest.err)
7407   cat conftest.err >&5
7408   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7409   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7410   cat conftest.err >&5
7411   (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7412   cat conftest.out >&5
7413   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7414     lt_cv_nm_interface="MS dumpbin"
7415   fi
7416   rm -f conftest*
7417 fi
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7419 $as_echo "$lt_cv_nm_interface" >&6; }
7420
7421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7422 $as_echo_n "checking whether ln -s works... " >&6; }
7423 LN_S=$as_ln_s
7424 if test "$LN_S" = "ln -s"; then
7425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7426 $as_echo "yes" >&6; }
7427 else
7428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7429 $as_echo "no, using $LN_S" >&6; }
7430 fi
7431
7432 # find the maximum length of command line arguments
7433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7434 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7435 if ${lt_cv_sys_max_cmd_len+:} false; then :
7436   $as_echo_n "(cached) " >&6
7437 else
7438     i=0
7439   teststring=ABCD
7440
7441   case $build_os in
7442   msdosdjgpp*)
7443     # On DJGPP, this test can blow up pretty badly due to problems in libc
7444     # (any single argument exceeding 2000 bytes causes a buffer overrun
7445     # during glob expansion).  Even if it were fixed, the result of this
7446     # check would be larger than it should be.
7447     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7448     ;;
7449
7450   gnu*)
7451     # Under GNU Hurd, this test is not required because there is
7452     # no limit to the length of command line arguments.
7453     # Libtool will interpret -1 as no limit whatsoever
7454     lt_cv_sys_max_cmd_len=-1;
7455     ;;
7456
7457   cygwin* | mingw* | cegcc*)
7458     # On Win9x/ME, this test blows up -- it succeeds, but takes
7459     # about 5 minutes as the teststring grows exponentially.
7460     # Worse, since 9x/ME are not pre-emptively multitasking,
7461     # you end up with a "frozen" computer, even though with patience
7462     # the test eventually succeeds (with a max line length of 256k).
7463     # Instead, let's just punt: use the minimum linelength reported by
7464     # all of the supported platforms: 8192 (on NT/2K/XP).
7465     lt_cv_sys_max_cmd_len=8192;
7466     ;;
7467
7468   mint*)
7469     # On MiNT this can take a long time and run out of memory.
7470     lt_cv_sys_max_cmd_len=8192;
7471     ;;
7472
7473   amigaos*)
7474     # On AmigaOS with pdksh, this test takes hours, literally.
7475     # So we just punt and use a minimum line length of 8192.
7476     lt_cv_sys_max_cmd_len=8192;
7477     ;;
7478
7479   bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7480     # This has been around since 386BSD, at least.  Likely further.
7481     if test -x /sbin/sysctl; then
7482       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7483     elif test -x /usr/sbin/sysctl; then
7484       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7485     else
7486       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7487     fi
7488     # And add a safety zone
7489     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7490     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7491     ;;
7492
7493   interix*)
7494     # We know the value 262144 and hardcode it with a safety zone (like BSD)
7495     lt_cv_sys_max_cmd_len=196608
7496     ;;
7497
7498   os2*)
7499     # The test takes a long time on OS/2.
7500     lt_cv_sys_max_cmd_len=8192
7501     ;;
7502
7503   osf*)
7504     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7505     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7506     # nice to cause kernel panics so lets avoid the loop below.
7507     # First set a reasonable default.
7508     lt_cv_sys_max_cmd_len=16384
7509     #
7510     if test -x /sbin/sysconfig; then
7511       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7512         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7513       esac
7514     fi
7515     ;;
7516   sco3.2v5*)
7517     lt_cv_sys_max_cmd_len=102400
7518     ;;
7519   sysv5* | sco5v6* | sysv4.2uw2*)
7520     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7521     if test -n "$kargmax"; then
7522       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[  ]//'`
7523     else
7524       lt_cv_sys_max_cmd_len=32768
7525     fi
7526     ;;
7527   *)
7528     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7529     if test -n "$lt_cv_sys_max_cmd_len" && \
7530        test undefined != "$lt_cv_sys_max_cmd_len"; then
7531       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7532       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7533     else
7534       # Make teststring a little bigger before we do anything with it.
7535       # a 1K string should be a reasonable start.
7536       for i in 1 2 3 4 5 6 7 8; do
7537         teststring=$teststring$teststring
7538       done
7539       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7540       # If test is not a shell built-in, we'll probably end up computing a
7541       # maximum length that is only half of the actual maximum length, but
7542       # we can't tell.
7543       while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7544                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7545               test 17 != "$i" # 1/2 MB should be enough
7546       do
7547         i=`expr $i + 1`
7548         teststring=$teststring$teststring
7549       done
7550       # Only check the string length outside the loop.
7551       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7552       teststring=
7553       # Add a significant safety factor because C++ compilers can tack on
7554       # massive amounts of additional arguments before passing them to the
7555       # linker.  It appears as though 1/2 is a usable value.
7556       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7557     fi
7558     ;;
7559   esac
7560
7561 fi
7562
7563 if test -n "$lt_cv_sys_max_cmd_len"; then
7564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7565 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7566 else
7567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7568 $as_echo "none" >&6; }
7569 fi
7570 max_cmd_len=$lt_cv_sys_max_cmd_len
7571
7572
7573
7574
7575
7576
7577 : ${CP="cp -f"}
7578 : ${MV="mv -f"}
7579 : ${RM="rm -f"}
7580
7581 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7582   lt_unset=unset
7583 else
7584   lt_unset=false
7585 fi
7586
7587
7588
7589
7590
7591 # test EBCDIC or ASCII
7592 case `echo X|tr X '\101'` in
7593  A) # ASCII based system
7594     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7595   lt_SP2NL='tr \040 \012'
7596   lt_NL2SP='tr \015\012 \040\040'
7597   ;;
7598  *) # EBCDIC based system
7599   lt_SP2NL='tr \100 \n'
7600   lt_NL2SP='tr \r\n \100\100'
7601   ;;
7602 esac
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7613 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7614 if ${lt_cv_to_host_file_cmd+:} false; then :
7615   $as_echo_n "(cached) " >&6
7616 else
7617   case $host in
7618   *-*-mingw* )
7619     case $build in
7620       *-*-mingw* ) # actually msys
7621         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7622         ;;
7623       *-*-cygwin* )
7624         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7625         ;;
7626       * ) # otherwise, assume *nix
7627         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7628         ;;
7629     esac
7630     ;;
7631   *-*-cygwin* )
7632     case $build in
7633       *-*-mingw* ) # actually msys
7634         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7635         ;;
7636       *-*-cygwin* )
7637         lt_cv_to_host_file_cmd=func_convert_file_noop
7638         ;;
7639       * ) # otherwise, assume *nix
7640         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7641         ;;
7642     esac
7643     ;;
7644   * ) # unhandled hosts (and "normal" native builds)
7645     lt_cv_to_host_file_cmd=func_convert_file_noop
7646     ;;
7647 esac
7648
7649 fi
7650
7651 to_host_file_cmd=$lt_cv_to_host_file_cmd
7652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7653 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
7654
7655
7656
7657
7658
7659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7660 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7661 if ${lt_cv_to_tool_file_cmd+:} false; then :
7662   $as_echo_n "(cached) " >&6
7663 else
7664   #assume ordinary cross tools, or native build.
7665 lt_cv_to_tool_file_cmd=func_convert_file_noop
7666 case $host in
7667   *-*-mingw* )
7668     case $build in
7669       *-*-mingw* ) # actually msys
7670         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7671         ;;
7672     esac
7673     ;;
7674 esac
7675
7676 fi
7677
7678 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7680 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7681
7682
7683
7684
7685
7686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7687 $as_echo_n "checking for $LD option to reload object files... " >&6; }
7688 if ${lt_cv_ld_reload_flag+:} false; then :
7689   $as_echo_n "(cached) " >&6
7690 else
7691   lt_cv_ld_reload_flag='-r'
7692 fi
7693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7694 $as_echo "$lt_cv_ld_reload_flag" >&6; }
7695 reload_flag=$lt_cv_ld_reload_flag
7696 case $reload_flag in
7697 "" | " "*) ;;
7698 *) reload_flag=" $reload_flag" ;;
7699 esac
7700 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7701 case $host_os in
7702   cygwin* | mingw* | pw32* | cegcc*)
7703     if test yes != "$GCC"; then
7704       reload_cmds=false
7705     fi
7706     ;;
7707   darwin*)
7708     if test yes = "$GCC"; then
7709       reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7710     else
7711       reload_cmds='$LD$reload_flag -o $output$reload_objs'
7712     fi
7713     ;;
7714 esac
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724 if test -n "$ac_tool_prefix"; then
7725   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7726 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7728 $as_echo_n "checking for $ac_word... " >&6; }
7729 if ${ac_cv_prog_OBJDUMP+:} false; then :
7730   $as_echo_n "(cached) " >&6
7731 else
7732   if test -n "$OBJDUMP"; then
7733   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7734 else
7735 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7736 for as_dir in $PATH
7737 do
7738   IFS=$as_save_IFS
7739   test -z "$as_dir" && as_dir=.
7740     for ac_exec_ext in '' $ac_executable_extensions; do
7741   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7742     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7743     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7744     break 2
7745   fi
7746 done
7747   done
7748 IFS=$as_save_IFS
7749
7750 fi
7751 fi
7752 OBJDUMP=$ac_cv_prog_OBJDUMP
7753 if test -n "$OBJDUMP"; then
7754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7755 $as_echo "$OBJDUMP" >&6; }
7756 else
7757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7758 $as_echo "no" >&6; }
7759 fi
7760
7761
7762 fi
7763 if test -z "$ac_cv_prog_OBJDUMP"; then
7764   ac_ct_OBJDUMP=$OBJDUMP
7765   # Extract the first word of "objdump", so it can be a program name with args.
7766 set dummy objdump; ac_word=$2
7767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7768 $as_echo_n "checking for $ac_word... " >&6; }
7769 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7770   $as_echo_n "(cached) " >&6
7771 else
7772   if test -n "$ac_ct_OBJDUMP"; then
7773   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7774 else
7775 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7776 for as_dir in $PATH
7777 do
7778   IFS=$as_save_IFS
7779   test -z "$as_dir" && as_dir=.
7780     for ac_exec_ext in '' $ac_executable_extensions; do
7781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7782     ac_cv_prog_ac_ct_OBJDUMP="objdump"
7783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7784     break 2
7785   fi
7786 done
7787   done
7788 IFS=$as_save_IFS
7789
7790 fi
7791 fi
7792 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7793 if test -n "$ac_ct_OBJDUMP"; then
7794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7795 $as_echo "$ac_ct_OBJDUMP" >&6; }
7796 else
7797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7798 $as_echo "no" >&6; }
7799 fi
7800
7801   if test "x$ac_ct_OBJDUMP" = x; then
7802     OBJDUMP="false"
7803   else
7804     case $cross_compiling:$ac_tool_warned in
7805 yes:)
7806 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7807 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7808 ac_tool_warned=yes ;;
7809 esac
7810     OBJDUMP=$ac_ct_OBJDUMP
7811   fi
7812 else
7813   OBJDUMP="$ac_cv_prog_OBJDUMP"
7814 fi
7815
7816 test -z "$OBJDUMP" && OBJDUMP=objdump
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7827 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
7828 if ${lt_cv_deplibs_check_method+:} false; then :
7829   $as_echo_n "(cached) " >&6
7830 else
7831   lt_cv_file_magic_cmd='$MAGIC_CMD'
7832 lt_cv_file_magic_test_file=
7833 lt_cv_deplibs_check_method='unknown'
7834 # Need to set the preceding variable on all platforms that support
7835 # interlibrary dependencies.
7836 # 'none' -- dependencies not supported.
7837 # 'unknown' -- same as none, but documents that we really don't know.
7838 # 'pass_all' -- all dependencies passed with no checks.
7839 # 'test_compile' -- check by making test program.
7840 # 'file_magic [[regex]]' -- check by looking for files in library path
7841 # that responds to the $file_magic_cmd with a given extended regex.
7842 # If you have 'file' or equivalent on your system and you're not sure
7843 # whether 'pass_all' will *always* work, you probably want this one.
7844
7845 case $host_os in
7846 aix[4-9]*)
7847   lt_cv_deplibs_check_method=pass_all
7848   ;;
7849
7850 beos*)
7851   lt_cv_deplibs_check_method=pass_all
7852   ;;
7853
7854 bsdi[45]*)
7855   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
7856   lt_cv_file_magic_cmd='/usr/bin/file -L'
7857   lt_cv_file_magic_test_file=/shlib/libc.so
7858   ;;
7859
7860 cygwin*)
7861   # func_win32_libid is a shell function defined in ltmain.sh
7862   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7863   lt_cv_file_magic_cmd='func_win32_libid'
7864   ;;
7865
7866 mingw* | pw32*)
7867   # Base MSYS/MinGW do not provide the 'file' command needed by
7868   # func_win32_libid shell function, so use a weaker test based on 'objdump',
7869   # unless we find 'file', for example because we are cross-compiling.
7870   if ( file / ) >/dev/null 2>&1; then
7871     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7872     lt_cv_file_magic_cmd='func_win32_libid'
7873   else
7874     # Keep this pattern in sync with the one in func_win32_libid.
7875     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
7876     lt_cv_file_magic_cmd='$OBJDUMP -f'
7877   fi
7878   ;;
7879
7880 cegcc*)
7881   # use the weaker test based on 'objdump'. See mingw*.
7882   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
7883   lt_cv_file_magic_cmd='$OBJDUMP -f'
7884   ;;
7885
7886 darwin* | rhapsody*)
7887   lt_cv_deplibs_check_method=pass_all
7888   ;;
7889
7890 freebsd* | dragonfly*)
7891   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7892     case $host_cpu in
7893     i*86 )
7894       # Not sure whether the presence of OpenBSD here was a mistake.
7895       # Let's accept both of them until this is cleared up.
7896       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
7897       lt_cv_file_magic_cmd=/usr/bin/file
7898       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7899       ;;
7900     esac
7901   else
7902     lt_cv_deplibs_check_method=pass_all
7903   fi
7904   ;;
7905
7906 haiku*)
7907   lt_cv_deplibs_check_method=pass_all
7908   ;;
7909
7910 hpux10.20* | hpux11*)
7911   lt_cv_file_magic_cmd=/usr/bin/file
7912   case $host_cpu in
7913   ia64*)
7914     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
7915     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7916     ;;
7917   hppa*64*)
7918     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]'
7919     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7920     ;;
7921   *)
7922     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
7923     lt_cv_file_magic_test_file=/usr/lib/libc.sl
7924     ;;
7925   esac
7926   ;;
7927
7928 interix[3-9]*)
7929   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
7930   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
7931   ;;
7932
7933 irix5* | irix6* | nonstopux*)
7934   case $LD in
7935   *-32|*"-32 ") libmagic=32-bit;;
7936   *-n32|*"-n32 ") libmagic=N32;;
7937   *-64|*"-64 ") libmagic=64-bit;;
7938   *) libmagic=never-match;;
7939   esac
7940   lt_cv_deplibs_check_method=pass_all
7941   ;;
7942
7943 # This must be glibc/ELF.
7944 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7945   lt_cv_deplibs_check_method=pass_all
7946   ;;
7947
7948 netbsd*)
7949   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7950     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7951   else
7952     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
7953   fi
7954   ;;
7955
7956 newos6*)
7957   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
7958   lt_cv_file_magic_cmd=/usr/bin/file
7959   lt_cv_file_magic_test_file=/usr/lib/libnls.so
7960   ;;
7961
7962 *nto* | *qnx*)
7963   lt_cv_deplibs_check_method=pass_all
7964   ;;
7965
7966 openbsd* | bitrig*)
7967   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
7968     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
7969   else
7970     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7971   fi
7972   ;;
7973
7974 osf3* | osf4* | osf5*)
7975   lt_cv_deplibs_check_method=pass_all
7976   ;;
7977
7978 rdos*)
7979   lt_cv_deplibs_check_method=pass_all
7980   ;;
7981
7982 solaris*)
7983   lt_cv_deplibs_check_method=pass_all
7984   ;;
7985
7986 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
7987   lt_cv_deplibs_check_method=pass_all
7988   ;;
7989
7990 sysv4 | sysv4.3*)
7991   case $host_vendor in
7992   motorola)
7993     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]'
7994     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7995     ;;
7996   ncr)
7997     lt_cv_deplibs_check_method=pass_all
7998     ;;
7999   sequent)
8000     lt_cv_file_magic_cmd='/bin/file'
8001     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
8002     ;;
8003   sni)
8004     lt_cv_file_magic_cmd='/bin/file'
8005     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
8006     lt_cv_file_magic_test_file=/lib/libc.so
8007     ;;
8008   siemens)
8009     lt_cv_deplibs_check_method=pass_all
8010     ;;
8011   pc)
8012     lt_cv_deplibs_check_method=pass_all
8013     ;;
8014   esac
8015   ;;
8016
8017 tpf*)
8018   lt_cv_deplibs_check_method=pass_all
8019   ;;
8020 os2*)
8021   lt_cv_deplibs_check_method=pass_all
8022   ;;
8023 esac
8024
8025 fi
8026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
8027 $as_echo "$lt_cv_deplibs_check_method" >&6; }
8028
8029 file_magic_glob=
8030 want_nocaseglob=no
8031 if test "$build" = "$host"; then
8032   case $host_os in
8033   mingw* | pw32*)
8034     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
8035       want_nocaseglob=yes
8036     else
8037       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
8038     fi
8039     ;;
8040   esac
8041 fi
8042
8043 file_magic_cmd=$lt_cv_file_magic_cmd
8044 deplibs_check_method=$lt_cv_deplibs_check_method
8045 test -z "$deplibs_check_method" && deplibs_check_method=unknown
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068 if test -n "$ac_tool_prefix"; then
8069   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8070 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8072 $as_echo_n "checking for $ac_word... " >&6; }
8073 if ${ac_cv_prog_DLLTOOL+:} false; then :
8074   $as_echo_n "(cached) " >&6
8075 else
8076   if test -n "$DLLTOOL"; then
8077   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8078 else
8079 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8080 for as_dir in $PATH
8081 do
8082   IFS=$as_save_IFS
8083   test -z "$as_dir" && as_dir=.
8084     for ac_exec_ext in '' $ac_executable_extensions; do
8085   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8086     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8087     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8088     break 2
8089   fi
8090 done
8091   done
8092 IFS=$as_save_IFS
8093
8094 fi
8095 fi
8096 DLLTOOL=$ac_cv_prog_DLLTOOL
8097 if test -n "$DLLTOOL"; then
8098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8099 $as_echo "$DLLTOOL" >&6; }
8100 else
8101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8102 $as_echo "no" >&6; }
8103 fi
8104
8105
8106 fi
8107 if test -z "$ac_cv_prog_DLLTOOL"; then
8108   ac_ct_DLLTOOL=$DLLTOOL
8109   # Extract the first word of "dlltool", so it can be a program name with args.
8110 set dummy dlltool; ac_word=$2
8111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8112 $as_echo_n "checking for $ac_word... " >&6; }
8113 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8114   $as_echo_n "(cached) " >&6
8115 else
8116   if test -n "$ac_ct_DLLTOOL"; then
8117   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8118 else
8119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8120 for as_dir in $PATH
8121 do
8122   IFS=$as_save_IFS
8123   test -z "$as_dir" && as_dir=.
8124     for ac_exec_ext in '' $ac_executable_extensions; do
8125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8126     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8128     break 2
8129   fi
8130 done
8131   done
8132 IFS=$as_save_IFS
8133
8134 fi
8135 fi
8136 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8137 if test -n "$ac_ct_DLLTOOL"; then
8138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8139 $as_echo "$ac_ct_DLLTOOL" >&6; }
8140 else
8141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8142 $as_echo "no" >&6; }
8143 fi
8144
8145   if test "x$ac_ct_DLLTOOL" = x; then
8146     DLLTOOL="false"
8147   else
8148     case $cross_compiling:$ac_tool_warned in
8149 yes:)
8150 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8151 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8152 ac_tool_warned=yes ;;
8153 esac
8154     DLLTOOL=$ac_ct_DLLTOOL
8155   fi
8156 else
8157   DLLTOOL="$ac_cv_prog_DLLTOOL"
8158 fi
8159
8160 test -z "$DLLTOOL" && DLLTOOL=dlltool
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8172 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8173 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8174   $as_echo_n "(cached) " >&6
8175 else
8176   lt_cv_sharedlib_from_linklib_cmd='unknown'
8177
8178 case $host_os in
8179 cygwin* | mingw* | pw32* | cegcc*)
8180   # two different shell functions defined in ltmain.sh;
8181   # decide which one to use based on capabilities of $DLLTOOL
8182   case `$DLLTOOL --help 2>&1` in
8183   *--identify-strict*)
8184     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8185     ;;
8186   *)
8187     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8188     ;;
8189   esac
8190   ;;
8191 *)
8192   # fallback: assume linklib IS sharedlib
8193   lt_cv_sharedlib_from_linklib_cmd=$ECHO
8194   ;;
8195 esac
8196
8197 fi
8198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8199 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8200 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8201 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8202
8203
8204
8205
8206
8207
8208
8209 if test -n "$ac_tool_prefix"; then
8210   for ac_prog in ar
8211   do
8212     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8213 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8215 $as_echo_n "checking for $ac_word... " >&6; }
8216 if ${ac_cv_prog_AR+:} false; then :
8217   $as_echo_n "(cached) " >&6
8218 else
8219   if test -n "$AR"; then
8220   ac_cv_prog_AR="$AR" # Let the user override the test.
8221 else
8222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8223 for as_dir in $PATH
8224 do
8225   IFS=$as_save_IFS
8226   test -z "$as_dir" && as_dir=.
8227     for ac_exec_ext in '' $ac_executable_extensions; do
8228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8229     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8231     break 2
8232   fi
8233 done
8234   done
8235 IFS=$as_save_IFS
8236
8237 fi
8238 fi
8239 AR=$ac_cv_prog_AR
8240 if test -n "$AR"; then
8241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8242 $as_echo "$AR" >&6; }
8243 else
8244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8245 $as_echo "no" >&6; }
8246 fi
8247
8248
8249     test -n "$AR" && break
8250   done
8251 fi
8252 if test -z "$AR"; then
8253   ac_ct_AR=$AR
8254   for ac_prog in ar
8255 do
8256   # Extract the first word of "$ac_prog", so it can be a program name with args.
8257 set dummy $ac_prog; ac_word=$2
8258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8259 $as_echo_n "checking for $ac_word... " >&6; }
8260 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8261   $as_echo_n "(cached) " >&6
8262 else
8263   if test -n "$ac_ct_AR"; then
8264   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8265 else
8266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8267 for as_dir in $PATH
8268 do
8269   IFS=$as_save_IFS
8270   test -z "$as_dir" && as_dir=.
8271     for ac_exec_ext in '' $ac_executable_extensions; do
8272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8273     ac_cv_prog_ac_ct_AR="$ac_prog"
8274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8275     break 2
8276   fi
8277 done
8278   done
8279 IFS=$as_save_IFS
8280
8281 fi
8282 fi
8283 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8284 if test -n "$ac_ct_AR"; then
8285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8286 $as_echo "$ac_ct_AR" >&6; }
8287 else
8288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8289 $as_echo "no" >&6; }
8290 fi
8291
8292
8293   test -n "$ac_ct_AR" && break
8294 done
8295
8296   if test "x$ac_ct_AR" = x; then
8297     AR="false"
8298   else
8299     case $cross_compiling:$ac_tool_warned in
8300 yes:)
8301 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8302 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8303 ac_tool_warned=yes ;;
8304 esac
8305     AR=$ac_ct_AR
8306   fi
8307 fi
8308
8309 : ${AR=ar}
8310 : ${AR_FLAGS=cru}
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8323 $as_echo_n "checking for archiver @FILE support... " >&6; }
8324 if ${lt_cv_ar_at_file+:} false; then :
8325   $as_echo_n "(cached) " >&6
8326 else
8327   lt_cv_ar_at_file=no
8328    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8329 /* end confdefs.h.  */
8330
8331 int
8332 main ()
8333 {
8334
8335   ;
8336   return 0;
8337 }
8338 _ACEOF
8339 if ac_fn_c_try_compile "$LINENO"; then :
8340   echo conftest.$ac_objext > conftest.lst
8341       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8342       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8343   (eval $lt_ar_try) 2>&5
8344   ac_status=$?
8345   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8346   test $ac_status = 0; }
8347       if test 0 -eq "$ac_status"; then
8348         # Ensure the archiver fails upon bogus file names.
8349         rm -f conftest.$ac_objext libconftest.a
8350         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8351   (eval $lt_ar_try) 2>&5
8352   ac_status=$?
8353   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8354   test $ac_status = 0; }
8355         if test 0 -ne "$ac_status"; then
8356           lt_cv_ar_at_file=@
8357         fi
8358       fi
8359       rm -f conftest.* libconftest.a
8360
8361 fi
8362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8363
8364 fi
8365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8366 $as_echo "$lt_cv_ar_at_file" >&6; }
8367
8368 if test no = "$lt_cv_ar_at_file"; then
8369   archiver_list_spec=
8370 else
8371   archiver_list_spec=$lt_cv_ar_at_file
8372 fi
8373
8374
8375
8376
8377
8378
8379
8380 if test -n "$ac_tool_prefix"; then
8381   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8382 set dummy ${ac_tool_prefix}strip; ac_word=$2
8383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8384 $as_echo_n "checking for $ac_word... " >&6; }
8385 if ${ac_cv_prog_STRIP+:} false; then :
8386   $as_echo_n "(cached) " >&6
8387 else
8388   if test -n "$STRIP"; then
8389   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8390 else
8391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8392 for as_dir in $PATH
8393 do
8394   IFS=$as_save_IFS
8395   test -z "$as_dir" && as_dir=.
8396     for ac_exec_ext in '' $ac_executable_extensions; do
8397   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8398     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8399     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8400     break 2
8401   fi
8402 done
8403   done
8404 IFS=$as_save_IFS
8405
8406 fi
8407 fi
8408 STRIP=$ac_cv_prog_STRIP
8409 if test -n "$STRIP"; then
8410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8411 $as_echo "$STRIP" >&6; }
8412 else
8413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8414 $as_echo "no" >&6; }
8415 fi
8416
8417
8418 fi
8419 if test -z "$ac_cv_prog_STRIP"; then
8420   ac_ct_STRIP=$STRIP
8421   # Extract the first word of "strip", so it can be a program name with args.
8422 set dummy strip; ac_word=$2
8423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8424 $as_echo_n "checking for $ac_word... " >&6; }
8425 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8426   $as_echo_n "(cached) " >&6
8427 else
8428   if test -n "$ac_ct_STRIP"; then
8429   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8430 else
8431 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8432 for as_dir in $PATH
8433 do
8434   IFS=$as_save_IFS
8435   test -z "$as_dir" && as_dir=.
8436     for ac_exec_ext in '' $ac_executable_extensions; do
8437   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8438     ac_cv_prog_ac_ct_STRIP="strip"
8439     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8440     break 2
8441   fi
8442 done
8443   done
8444 IFS=$as_save_IFS
8445
8446 fi
8447 fi
8448 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8449 if test -n "$ac_ct_STRIP"; then
8450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8451 $as_echo "$ac_ct_STRIP" >&6; }
8452 else
8453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8454 $as_echo "no" >&6; }
8455 fi
8456
8457   if test "x$ac_ct_STRIP" = x; then
8458     STRIP=":"
8459   else
8460     case $cross_compiling:$ac_tool_warned in
8461 yes:)
8462 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8463 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8464 ac_tool_warned=yes ;;
8465 esac
8466     STRIP=$ac_ct_STRIP
8467   fi
8468 else
8469   STRIP="$ac_cv_prog_STRIP"
8470 fi
8471
8472 test -z "$STRIP" && STRIP=:
8473
8474
8475
8476
8477
8478
8479 if test -n "$ac_tool_prefix"; then
8480   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8481 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8483 $as_echo_n "checking for $ac_word... " >&6; }
8484 if ${ac_cv_prog_RANLIB+:} false; then :
8485   $as_echo_n "(cached) " >&6
8486 else
8487   if test -n "$RANLIB"; then
8488   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8489 else
8490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8491 for as_dir in $PATH
8492 do
8493   IFS=$as_save_IFS
8494   test -z "$as_dir" && as_dir=.
8495     for ac_exec_ext in '' $ac_executable_extensions; do
8496   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8497     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8498     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8499     break 2
8500   fi
8501 done
8502   done
8503 IFS=$as_save_IFS
8504
8505 fi
8506 fi
8507 RANLIB=$ac_cv_prog_RANLIB
8508 if test -n "$RANLIB"; then
8509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8510 $as_echo "$RANLIB" >&6; }
8511 else
8512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8513 $as_echo "no" >&6; }
8514 fi
8515
8516
8517 fi
8518 if test -z "$ac_cv_prog_RANLIB"; then
8519   ac_ct_RANLIB=$RANLIB
8520   # Extract the first word of "ranlib", so it can be a program name with args.
8521 set dummy ranlib; ac_word=$2
8522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8523 $as_echo_n "checking for $ac_word... " >&6; }
8524 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8525   $as_echo_n "(cached) " >&6
8526 else
8527   if test -n "$ac_ct_RANLIB"; then
8528   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8529 else
8530 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8531 for as_dir in $PATH
8532 do
8533   IFS=$as_save_IFS
8534   test -z "$as_dir" && as_dir=.
8535     for ac_exec_ext in '' $ac_executable_extensions; do
8536   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8537     ac_cv_prog_ac_ct_RANLIB="ranlib"
8538     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8539     break 2
8540   fi
8541 done
8542   done
8543 IFS=$as_save_IFS
8544
8545 fi
8546 fi
8547 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8548 if test -n "$ac_ct_RANLIB"; then
8549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8550 $as_echo "$ac_ct_RANLIB" >&6; }
8551 else
8552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8553 $as_echo "no" >&6; }
8554 fi
8555
8556   if test "x$ac_ct_RANLIB" = x; then
8557     RANLIB=":"
8558   else
8559     case $cross_compiling:$ac_tool_warned in
8560 yes:)
8561 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8562 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8563 ac_tool_warned=yes ;;
8564 esac
8565     RANLIB=$ac_ct_RANLIB
8566   fi
8567 else
8568   RANLIB="$ac_cv_prog_RANLIB"
8569 fi
8570
8571 test -z "$RANLIB" && RANLIB=:
8572
8573
8574
8575
8576
8577
8578 # Determine commands to create old-style static archives.
8579 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8580 old_postinstall_cmds='chmod 644 $oldlib'
8581 old_postuninstall_cmds=
8582
8583 if test -n "$RANLIB"; then
8584   case $host_os in
8585   bitrig* | openbsd*)
8586     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8587     ;;
8588   *)
8589     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8590     ;;
8591   esac
8592   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8593 fi
8594
8595 case $host_os in
8596   darwin*)
8597     lock_old_archive_extraction=yes ;;
8598   *)
8599     lock_old_archive_extraction=no ;;
8600 esac
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622 for ac_prog in gawk mawk nawk awk
8623 do
8624   # Extract the first word of "$ac_prog", so it can be a program name with args.
8625 set dummy $ac_prog; ac_word=$2
8626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8627 $as_echo_n "checking for $ac_word... " >&6; }
8628 if ${ac_cv_prog_AWK+:} false; then :
8629   $as_echo_n "(cached) " >&6
8630 else
8631   if test -n "$AWK"; then
8632   ac_cv_prog_AWK="$AWK" # Let the user override the test.
8633 else
8634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8635 for as_dir in $PATH
8636 do
8637   IFS=$as_save_IFS
8638   test -z "$as_dir" && as_dir=.
8639     for ac_exec_ext in '' $ac_executable_extensions; do
8640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8641     ac_cv_prog_AWK="$ac_prog"
8642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8643     break 2
8644   fi
8645 done
8646   done
8647 IFS=$as_save_IFS
8648
8649 fi
8650 fi
8651 AWK=$ac_cv_prog_AWK
8652 if test -n "$AWK"; then
8653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8654 $as_echo "$AWK" >&6; }
8655 else
8656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8657 $as_echo "no" >&6; }
8658 fi
8659
8660
8661   test -n "$AWK" && break
8662 done
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682 # If no C compiler was specified, use CC.
8683 LTCC=${LTCC-"$CC"}
8684
8685 # If no C compiler flags were specified, use CFLAGS.
8686 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8687
8688 # Allow CC to be a program name with arguments.
8689 compiler=$CC
8690
8691
8692 # Check for command to grab the raw symbol name followed by C symbol from nm.
8693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8694 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8695 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8696   $as_echo_n "(cached) " >&6
8697 else
8698
8699 # These are sane defaults that work on at least a few old systems.
8700 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8701
8702 # Character class describing NM global symbol codes.
8703 symcode='[BCDEGRST]'
8704
8705 # Regexp to match symbols that can be accessed directly from C.
8706 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8707
8708 # Define system-specific variables.
8709 case $host_os in
8710 aix*)
8711   symcode='[BCDT]'
8712   ;;
8713 cygwin* | mingw* | pw32* | cegcc*)
8714   symcode='[ABCDGISTW]'
8715   ;;
8716 hpux*)
8717   if test ia64 = "$host_cpu"; then
8718     symcode='[ABCDEGRST]'
8719   fi
8720   ;;
8721 irix* | nonstopux*)
8722   symcode='[BCDEGRST]'
8723   ;;
8724 osf*)
8725   symcode='[BCDEGQRST]'
8726   ;;
8727 solaris*)
8728   symcode='[BDRT]'
8729   ;;
8730 sco3.2v5*)
8731   symcode='[DT]'
8732   ;;
8733 sysv4.2uw2*)
8734   symcode='[DT]'
8735   ;;
8736 sysv5* | sco5v6* | unixware* | OpenUNIX*)
8737   symcode='[ABDT]'
8738   ;;
8739 sysv4)
8740   symcode='[DFNSTU]'
8741   ;;
8742 esac
8743
8744 # If we're using GNU nm, then use its standard symbol codes.
8745 case `$NM -V 2>&1` in
8746 *GNU* | *'with BFD'*)
8747   symcode='[ABCDGIRSTW]' ;;
8748 esac
8749
8750 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8751   # Gets list of data symbols to import.
8752   lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8753   # Adjust the below global symbol transforms to fixup imported variables.
8754   lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8755   lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
8756   lt_c_name_lib_hook="\
8757   -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
8758   -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
8759 else
8760   # Disable hooks by default.
8761   lt_cv_sys_global_symbol_to_import=
8762   lt_cdecl_hook=
8763   lt_c_name_hook=
8764   lt_c_name_lib_hook=
8765 fi
8766
8767 # Transform an extracted symbol line into a proper C declaration.
8768 # Some systems (esp. on ia64) link data and code symbols differently,
8769 # so use this general approach.
8770 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8771 $lt_cdecl_hook\
8772 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8773 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8774
8775 # Transform an extracted symbol line into symbol name and symbol address
8776 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8777 $lt_c_name_hook\
8778 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8779 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8780
8781 # Transform an extracted symbol line into symbol name with lib prefix and
8782 # symbol address.
8783 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8784 $lt_c_name_lib_hook\
8785 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8786 " -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8787 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8788
8789 # Handle CRLF in mingw tool chain
8790 opt_cr=
8791 case $build_os in
8792 mingw*)
8793   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8794   ;;
8795 esac
8796
8797 # Try without a prefix underscore, then with it.
8798 for ac_symprfx in "" "_"; do
8799
8800   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8801   symxfrm="\\1 $ac_symprfx\\2 \\2"
8802
8803   # Write the raw and C identifiers.
8804   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8805     # Fake it for dumpbin and say T for any non-static function,
8806     # D for any global variable and I for any imported variable.
8807     # Also find C++ and __fastcall symbols from MSVC++,
8808     # which start with @ or ?.
8809     lt_cv_sys_global_symbol_pipe="$AWK '"\
8810 "     {last_section=section; section=\$ 3};"\
8811 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8812 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8813 "     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8814 "     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8815 "     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8816 "     \$ 0!~/External *\|/{next};"\
8817 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8818 "     {if(hide[section]) next};"\
8819 "     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8820 "     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8821 "     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8822 "     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8823 "     ' prfx=^$ac_symprfx"
8824   else
8825     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8826   fi
8827   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8828
8829   # Check to see that the pipe works correctly.
8830   pipe_works=no
8831
8832   rm -f conftest*
8833   cat > conftest.$ac_ext <<_LT_EOF
8834 #ifdef __cplusplus
8835 extern "C" {
8836 #endif
8837 char nm_test_var;
8838 void nm_test_func(void);
8839 void nm_test_func(void){}
8840 #ifdef __cplusplus
8841 }
8842 #endif
8843 int main(){nm_test_var='a';nm_test_func();return(0);}
8844 _LT_EOF
8845
8846   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8847   (eval $ac_compile) 2>&5
8848   ac_status=$?
8849   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8850   test $ac_status = 0; }; then
8851     # Now try to grab the symbols.
8852     nlist=conftest.nm
8853     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
8854   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
8855   ac_status=$?
8856   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8857   test $ac_status = 0; } && test -s "$nlist"; then
8858       # Try sorting and uniquifying the output.
8859       if sort "$nlist" | uniq > "$nlist"T; then
8860         mv -f "$nlist"T "$nlist"
8861       else
8862         rm -f "$nlist"T
8863       fi
8864
8865       # Make sure that we snagged all the symbols we need.
8866       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
8867         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
8868           cat <<_LT_EOF > conftest.$ac_ext
8869 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
8870 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
8871 /* DATA imports from DLLs on WIN32 can't be const, because runtime
8872    relocations are performed -- see ld's documentation on pseudo-relocs.  */
8873 # define LT_DLSYM_CONST
8874 #elif defined __osf__
8875 /* This system does not cope well with relocations in const data.  */
8876 # define LT_DLSYM_CONST
8877 #else
8878 # define LT_DLSYM_CONST const
8879 #endif
8880
8881 #ifdef __cplusplus
8882 extern "C" {
8883 #endif
8884
8885 _LT_EOF
8886           # Now generate the symbol file.
8887           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
8888
8889           cat <<_LT_EOF >> conftest.$ac_ext
8890
8891 /* The mapping between symbol names and symbols.  */
8892 LT_DLSYM_CONST struct {
8893   const char *name;
8894   void       *address;
8895 }
8896 lt__PROGRAM__LTX_preloaded_symbols[] =
8897 {
8898   { "@PROGRAM@", (void *) 0 },
8899 _LT_EOF
8900           $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
8901           cat <<\_LT_EOF >> conftest.$ac_ext
8902   {0, (void *) 0}
8903 };
8904
8905 /* This works around a problem in FreeBSD linker */
8906 #ifdef FREEBSD_WORKAROUND
8907 static const void *lt_preloaded_setup() {
8908   return lt__PROGRAM__LTX_preloaded_symbols;
8909 }
8910 #endif
8911
8912 #ifdef __cplusplus
8913 }
8914 #endif
8915 _LT_EOF
8916           # Now try linking the two files.
8917           mv conftest.$ac_objext conftstm.$ac_objext
8918           lt_globsym_save_LIBS=$LIBS
8919           lt_globsym_save_CFLAGS=$CFLAGS
8920           LIBS=conftstm.$ac_objext
8921           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
8922           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8923   (eval $ac_link) 2>&5
8924   ac_status=$?
8925   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8926   test $ac_status = 0; } && test -s conftest$ac_exeext; then
8927             pipe_works=yes
8928           fi
8929           LIBS=$lt_globsym_save_LIBS
8930           CFLAGS=$lt_globsym_save_CFLAGS
8931         else
8932           echo "cannot find nm_test_func in $nlist" >&5
8933         fi
8934       else
8935         echo "cannot find nm_test_var in $nlist" >&5
8936       fi
8937     else
8938       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
8939     fi
8940   else
8941     echo "$progname: failed program was:" >&5
8942     cat conftest.$ac_ext >&5
8943   fi
8944   rm -rf conftest* conftst*
8945
8946   # Do not use the global_symbol_pipe unless it works.
8947   if test yes = "$pipe_works"; then
8948     break
8949   else
8950     lt_cv_sys_global_symbol_pipe=
8951   fi
8952 done
8953
8954 fi
8955
8956 if test -z "$lt_cv_sys_global_symbol_pipe"; then
8957   lt_cv_sys_global_symbol_to_cdecl=
8958 fi
8959 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
8960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
8961 $as_echo "failed" >&6; }
8962 else
8963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
8964 $as_echo "ok" >&6; }
8965 fi
8966
8967 # Response file support.
8968 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8969   nm_file_list_spec='@'
8970 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
8971   nm_file_list_spec='@'
8972 fi
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
9005
9006
9007
9008
9009
9010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
9011 $as_echo_n "checking for sysroot... " >&6; }
9012
9013 # Check whether --with-sysroot was given.
9014 if test "${with_sysroot+set}" = set; then :
9015   withval=$with_sysroot;
9016 else
9017   with_sysroot=no
9018 fi
9019
9020
9021 lt_sysroot=
9022 case $with_sysroot in #(
9023  yes)
9024    if test yes = "$GCC"; then
9025      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
9026    fi
9027    ;; #(
9028  /*)
9029    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
9030    ;; #(
9031  no|'')
9032    ;; #(
9033  *)
9034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
9035 $as_echo "$with_sysroot" >&6; }
9036    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
9037    ;;
9038 esac
9039
9040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
9041 $as_echo "${lt_sysroot:-no}" >&6; }
9042
9043
9044
9045
9046
9047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
9048 $as_echo_n "checking for a working dd... " >&6; }
9049 if ${ac_cv_path_lt_DD+:} false; then :
9050   $as_echo_n "(cached) " >&6
9051 else
9052   printf 0123456789abcdef0123456789abcdef >conftest.i
9053 cat conftest.i conftest.i >conftest2.i
9054 : ${lt_DD:=$DD}
9055 if test -z "$lt_DD"; then
9056   ac_path_lt_DD_found=false
9057   # Loop through the user's path and test for each of PROGNAME-LIST
9058   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9059 for as_dir in $PATH
9060 do
9061   IFS=$as_save_IFS
9062   test -z "$as_dir" && as_dir=.
9063     for ac_prog in dd; do
9064     for ac_exec_ext in '' $ac_executable_extensions; do
9065       ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
9066       as_fn_executable_p "$ac_path_lt_DD" || continue
9067 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9068   cmp -s conftest.i conftest.out \
9069   && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
9070 fi
9071       $ac_path_lt_DD_found && break 3
9072     done
9073   done
9074   done
9075 IFS=$as_save_IFS
9076   if test -z "$ac_cv_path_lt_DD"; then
9077     :
9078   fi
9079 else
9080   ac_cv_path_lt_DD=$lt_DD
9081 fi
9082
9083 rm -f conftest.i conftest2.i conftest.out
9084 fi
9085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
9086 $as_echo "$ac_cv_path_lt_DD" >&6; }
9087
9088
9089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
9090 $as_echo_n "checking how to truncate binary pipes... " >&6; }
9091 if ${lt_cv_truncate_bin+:} false; then :
9092   $as_echo_n "(cached) " >&6
9093 else
9094   printf 0123456789abcdef0123456789abcdef >conftest.i
9095 cat conftest.i conftest.i >conftest2.i
9096 lt_cv_truncate_bin=
9097 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9098   cmp -s conftest.i conftest.out \
9099   && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
9100 fi
9101 rm -f conftest.i conftest2.i conftest.out
9102 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
9103 fi
9104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
9105 $as_echo "$lt_cv_truncate_bin" >&6; }
9106
9107
9108
9109
9110
9111
9112
9113 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
9114 func_cc_basename ()
9115 {
9116     for cc_temp in $*""; do
9117       case $cc_temp in
9118         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9119         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9120         \-*) ;;
9121         *) break;;
9122       esac
9123     done
9124     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9125 }
9126
9127 # Check whether --enable-libtool-lock was given.
9128 if test "${enable_libtool_lock+set}" = set; then :
9129   enableval=$enable_libtool_lock;
9130 fi
9131
9132 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
9133
9134 # Some flags need to be propagated to the compiler or linker for good
9135 # libtool support.
9136 case $host in
9137 ia64-*-hpux*)
9138   # Find out what ABI is being produced by ac_compile, and set mode
9139   # options accordingly.
9140   echo 'int i;' > conftest.$ac_ext
9141   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9142   (eval $ac_compile) 2>&5
9143   ac_status=$?
9144   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9145   test $ac_status = 0; }; then
9146     case `/usr/bin/file conftest.$ac_objext` in
9147       *ELF-32*)
9148         HPUX_IA64_MODE=32
9149         ;;
9150       *ELF-64*)
9151         HPUX_IA64_MODE=64
9152         ;;
9153     esac
9154   fi
9155   rm -rf conftest*
9156   ;;
9157 *-*-irix6*)
9158   # Find out what ABI is being produced by ac_compile, and set linker
9159   # options accordingly.
9160   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9161   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9162   (eval $ac_compile) 2>&5
9163   ac_status=$?
9164   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9165   test $ac_status = 0; }; then
9166     if test yes = "$lt_cv_prog_gnu_ld"; then
9167       case `/usr/bin/file conftest.$ac_objext` in
9168         *32-bit*)
9169           LD="${LD-ld} -melf32bsmip"
9170           ;;
9171         *N32*)
9172           LD="${LD-ld} -melf32bmipn32"
9173           ;;
9174         *64-bit*)
9175           LD="${LD-ld} -melf64bmip"
9176         ;;
9177       esac
9178     else
9179       case `/usr/bin/file conftest.$ac_objext` in
9180         *32-bit*)
9181           LD="${LD-ld} -32"
9182           ;;
9183         *N32*)
9184           LD="${LD-ld} -n32"
9185           ;;
9186         *64-bit*)
9187           LD="${LD-ld} -64"
9188           ;;
9189       esac
9190     fi
9191   fi
9192   rm -rf conftest*
9193   ;;
9194
9195 mips64*-*linux*)
9196   # Find out what ABI is being produced by ac_compile, and set linker
9197   # options accordingly.
9198   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9199   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9200   (eval $ac_compile) 2>&5
9201   ac_status=$?
9202   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9203   test $ac_status = 0; }; then
9204     emul=elf
9205     case `/usr/bin/file conftest.$ac_objext` in
9206       *32-bit*)
9207         emul="${emul}32"
9208         ;;
9209       *64-bit*)
9210         emul="${emul}64"
9211         ;;
9212     esac
9213     case `/usr/bin/file conftest.$ac_objext` in
9214       *MSB*)
9215         emul="${emul}btsmip"
9216         ;;
9217       *LSB*)
9218         emul="${emul}ltsmip"
9219         ;;
9220     esac
9221     case `/usr/bin/file conftest.$ac_objext` in
9222       *N32*)
9223         emul="${emul}n32"
9224         ;;
9225     esac
9226     LD="${LD-ld} -m $emul"
9227   fi
9228   rm -rf conftest*
9229   ;;
9230
9231 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9232 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9233   # Find out what ABI is being produced by ac_compile, and set linker
9234   # options accordingly.  Note that the listed cases only cover the
9235   # situations where additional linker options are needed (such as when
9236   # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9237   # vice versa); the common cases where no linker options are needed do
9238   # not appear in the list.
9239   echo 'int i;' > conftest.$ac_ext
9240   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9241   (eval $ac_compile) 2>&5
9242   ac_status=$?
9243   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9244   test $ac_status = 0; }; then
9245     case `/usr/bin/file conftest.o` in
9246       *32-bit*)
9247         case $host in
9248           x86_64-*kfreebsd*-gnu)
9249             LD="${LD-ld} -m elf_i386_fbsd"
9250             ;;
9251           x86_64-*linux*)
9252             case `/usr/bin/file conftest.o` in
9253               *x86-64*)
9254                 LD="${LD-ld} -m elf32_x86_64"
9255                 ;;
9256               *)
9257                 LD="${LD-ld} -m elf_i386"
9258                 ;;
9259             esac
9260             ;;
9261           powerpc64le-*linux*)
9262             LD="${LD-ld} -m elf32lppclinux"
9263             ;;
9264           powerpc64-*linux*)
9265             LD="${LD-ld} -m elf32ppclinux"
9266             ;;
9267           s390x-*linux*)
9268             LD="${LD-ld} -m elf_s390"
9269             ;;
9270           sparc64-*linux*)
9271             LD="${LD-ld} -m elf32_sparc"
9272             ;;
9273         esac
9274         ;;
9275       *64-bit*)
9276         case $host in
9277           x86_64-*kfreebsd*-gnu)
9278             LD="${LD-ld} -m elf_x86_64_fbsd"
9279             ;;
9280           x86_64-*linux*)
9281             LD="${LD-ld} -m elf_x86_64"
9282             ;;
9283           powerpcle-*linux*)
9284             LD="${LD-ld} -m elf64lppc"
9285             ;;
9286           powerpc-*linux*)
9287             LD="${LD-ld} -m elf64ppc"
9288             ;;
9289           s390*-*linux*|s390*-*tpf*)
9290             LD="${LD-ld} -m elf64_s390"
9291             ;;
9292           sparc*-*linux*)
9293             LD="${LD-ld} -m elf64_sparc"
9294             ;;
9295         esac
9296         ;;
9297     esac
9298   fi
9299   rm -rf conftest*
9300   ;;
9301
9302 *-*-sco3.2v5*)
9303   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9304   SAVE_CFLAGS=$CFLAGS
9305   CFLAGS="$CFLAGS -belf"
9306   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9307 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
9308 if ${lt_cv_cc_needs_belf+:} false; then :
9309   $as_echo_n "(cached) " >&6
9310 else
9311   ac_ext=c
9312 ac_cpp='$CPP $CPPFLAGS'
9313 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9314 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9315 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9316
9317      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9318 /* end confdefs.h.  */
9319
9320 int
9321 main ()
9322 {
9323
9324   ;
9325   return 0;
9326 }
9327 _ACEOF
9328 if ac_fn_c_try_link "$LINENO"; then :
9329   lt_cv_cc_needs_belf=yes
9330 else
9331   lt_cv_cc_needs_belf=no
9332 fi
9333 rm -f core conftest.err conftest.$ac_objext \
9334     conftest$ac_exeext conftest.$ac_ext
9335      ac_ext=c
9336 ac_cpp='$CPP $CPPFLAGS'
9337 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9338 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9339 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9340
9341 fi
9342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9343 $as_echo "$lt_cv_cc_needs_belf" >&6; }
9344   if test yes != "$lt_cv_cc_needs_belf"; then
9345     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9346     CFLAGS=$SAVE_CFLAGS
9347   fi
9348   ;;
9349 *-*solaris*)
9350   # Find out what ABI is being produced by ac_compile, and set linker
9351   # options accordingly.
9352   echo 'int i;' > conftest.$ac_ext
9353   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9354   (eval $ac_compile) 2>&5
9355   ac_status=$?
9356   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9357   test $ac_status = 0; }; then
9358     case `/usr/bin/file conftest.o` in
9359     *64-bit*)
9360       case $lt_cv_prog_gnu_ld in
9361       yes*)
9362         case $host in
9363         i?86-*-solaris*|x86_64-*-solaris*)
9364           LD="${LD-ld} -m elf_x86_64"
9365           ;;
9366         sparc*-*-solaris*)
9367           LD="${LD-ld} -m elf64_sparc"
9368           ;;
9369         esac
9370         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9371         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9372           LD=${LD-ld}_sol2
9373         fi
9374         ;;
9375       *)
9376         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9377           LD="${LD-ld} -64"
9378         fi
9379         ;;
9380       esac
9381       ;;
9382     esac
9383   fi
9384   rm -rf conftest*
9385   ;;
9386 esac
9387
9388 need_locks=$enable_libtool_lock
9389
9390 if test -n "$ac_tool_prefix"; then
9391   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9392 set dummy ${ac_tool_prefix}mt; ac_word=$2
9393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9394 $as_echo_n "checking for $ac_word... " >&6; }
9395 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9396   $as_echo_n "(cached) " >&6
9397 else
9398   if test -n "$MANIFEST_TOOL"; then
9399   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9400 else
9401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9402 for as_dir in $PATH
9403 do
9404   IFS=$as_save_IFS
9405   test -z "$as_dir" && as_dir=.
9406     for ac_exec_ext in '' $ac_executable_extensions; do
9407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9408     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9410     break 2
9411   fi
9412 done
9413   done
9414 IFS=$as_save_IFS
9415
9416 fi
9417 fi
9418 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9419 if test -n "$MANIFEST_TOOL"; then
9420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9421 $as_echo "$MANIFEST_TOOL" >&6; }
9422 else
9423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9424 $as_echo "no" >&6; }
9425 fi
9426
9427
9428 fi
9429 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9430   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9431   # Extract the first word of "mt", so it can be a program name with args.
9432 set dummy mt; ac_word=$2
9433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9434 $as_echo_n "checking for $ac_word... " >&6; }
9435 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9436   $as_echo_n "(cached) " >&6
9437 else
9438   if test -n "$ac_ct_MANIFEST_TOOL"; then
9439   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9440 else
9441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9442 for as_dir in $PATH
9443 do
9444   IFS=$as_save_IFS
9445   test -z "$as_dir" && as_dir=.
9446     for ac_exec_ext in '' $ac_executable_extensions; do
9447   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9448     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9450     break 2
9451   fi
9452 done
9453   done
9454 IFS=$as_save_IFS
9455
9456 fi
9457 fi
9458 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9459 if test -n "$ac_ct_MANIFEST_TOOL"; then
9460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9461 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9462 else
9463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9464 $as_echo "no" >&6; }
9465 fi
9466
9467   if test "x$ac_ct_MANIFEST_TOOL" = x; then
9468     MANIFEST_TOOL=":"
9469   else
9470     case $cross_compiling:$ac_tool_warned in
9471 yes:)
9472 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9473 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9474 ac_tool_warned=yes ;;
9475 esac
9476     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9477   fi
9478 else
9479   MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9480 fi
9481
9482 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9484 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9485 if ${lt_cv_path_mainfest_tool+:} false; then :
9486   $as_echo_n "(cached) " >&6
9487 else
9488   lt_cv_path_mainfest_tool=no
9489   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9490   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9491   cat conftest.err >&5
9492   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9493     lt_cv_path_mainfest_tool=yes
9494   fi
9495   rm -f conftest*
9496 fi
9497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9498 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
9499 if test yes != "$lt_cv_path_mainfest_tool"; then
9500   MANIFEST_TOOL=:
9501 fi
9502
9503
9504
9505
9506
9507
9508   case $host_os in
9509     rhapsody* | darwin*)
9510     if test -n "$ac_tool_prefix"; then
9511   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9512 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9514 $as_echo_n "checking for $ac_word... " >&6; }
9515 if ${ac_cv_prog_DSYMUTIL+:} false; then :
9516   $as_echo_n "(cached) " >&6
9517 else
9518   if test -n "$DSYMUTIL"; then
9519   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9520 else
9521 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9522 for as_dir in $PATH
9523 do
9524   IFS=$as_save_IFS
9525   test -z "$as_dir" && as_dir=.
9526     for ac_exec_ext in '' $ac_executable_extensions; do
9527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9528     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9530     break 2
9531   fi
9532 done
9533   done
9534 IFS=$as_save_IFS
9535
9536 fi
9537 fi
9538 DSYMUTIL=$ac_cv_prog_DSYMUTIL
9539 if test -n "$DSYMUTIL"; then
9540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9541 $as_echo "$DSYMUTIL" >&6; }
9542 else
9543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9544 $as_echo "no" >&6; }
9545 fi
9546
9547
9548 fi
9549 if test -z "$ac_cv_prog_DSYMUTIL"; then
9550   ac_ct_DSYMUTIL=$DSYMUTIL
9551   # Extract the first word of "dsymutil", so it can be a program name with args.
9552 set dummy dsymutil; ac_word=$2
9553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9554 $as_echo_n "checking for $ac_word... " >&6; }
9555 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9556   $as_echo_n "(cached) " >&6
9557 else
9558   if test -n "$ac_ct_DSYMUTIL"; then
9559   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9560 else
9561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9562 for as_dir in $PATH
9563 do
9564   IFS=$as_save_IFS
9565   test -z "$as_dir" && as_dir=.
9566     for ac_exec_ext in '' $ac_executable_extensions; do
9567   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9568     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9570     break 2
9571   fi
9572 done
9573   done
9574 IFS=$as_save_IFS
9575
9576 fi
9577 fi
9578 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9579 if test -n "$ac_ct_DSYMUTIL"; then
9580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9581 $as_echo "$ac_ct_DSYMUTIL" >&6; }
9582 else
9583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9584 $as_echo "no" >&6; }
9585 fi
9586
9587   if test "x$ac_ct_DSYMUTIL" = x; then
9588     DSYMUTIL=":"
9589   else
9590     case $cross_compiling:$ac_tool_warned in
9591 yes:)
9592 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9593 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9594 ac_tool_warned=yes ;;
9595 esac
9596     DSYMUTIL=$ac_ct_DSYMUTIL
9597   fi
9598 else
9599   DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9600 fi
9601
9602     if test -n "$ac_tool_prefix"; then
9603   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9604 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9606 $as_echo_n "checking for $ac_word... " >&6; }
9607 if ${ac_cv_prog_NMEDIT+:} false; then :
9608   $as_echo_n "(cached) " >&6
9609 else
9610   if test -n "$NMEDIT"; then
9611   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9612 else
9613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9614 for as_dir in $PATH
9615 do
9616   IFS=$as_save_IFS
9617   test -z "$as_dir" && as_dir=.
9618     for ac_exec_ext in '' $ac_executable_extensions; do
9619   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9620     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9621     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9622     break 2
9623   fi
9624 done
9625   done
9626 IFS=$as_save_IFS
9627
9628 fi
9629 fi
9630 NMEDIT=$ac_cv_prog_NMEDIT
9631 if test -n "$NMEDIT"; then
9632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9633 $as_echo "$NMEDIT" >&6; }
9634 else
9635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9636 $as_echo "no" >&6; }
9637 fi
9638
9639
9640 fi
9641 if test -z "$ac_cv_prog_NMEDIT"; then
9642   ac_ct_NMEDIT=$NMEDIT
9643   # Extract the first word of "nmedit", so it can be a program name with args.
9644 set dummy nmedit; ac_word=$2
9645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9646 $as_echo_n "checking for $ac_word... " >&6; }
9647 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9648   $as_echo_n "(cached) " >&6
9649 else
9650   if test -n "$ac_ct_NMEDIT"; then
9651   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9652 else
9653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9654 for as_dir in $PATH
9655 do
9656   IFS=$as_save_IFS
9657   test -z "$as_dir" && as_dir=.
9658     for ac_exec_ext in '' $ac_executable_extensions; do
9659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9660     ac_cv_prog_ac_ct_NMEDIT="nmedit"
9661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9662     break 2
9663   fi
9664 done
9665   done
9666 IFS=$as_save_IFS
9667
9668 fi
9669 fi
9670 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9671 if test -n "$ac_ct_NMEDIT"; then
9672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9673 $as_echo "$ac_ct_NMEDIT" >&6; }
9674 else
9675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9676 $as_echo "no" >&6; }
9677 fi
9678
9679   if test "x$ac_ct_NMEDIT" = x; then
9680     NMEDIT=":"
9681   else
9682     case $cross_compiling:$ac_tool_warned in
9683 yes:)
9684 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9685 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9686 ac_tool_warned=yes ;;
9687 esac
9688     NMEDIT=$ac_ct_NMEDIT
9689   fi
9690 else
9691   NMEDIT="$ac_cv_prog_NMEDIT"
9692 fi
9693
9694     if test -n "$ac_tool_prefix"; then
9695   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9696 set dummy ${ac_tool_prefix}lipo; ac_word=$2
9697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9698 $as_echo_n "checking for $ac_word... " >&6; }
9699 if ${ac_cv_prog_LIPO+:} false; then :
9700   $as_echo_n "(cached) " >&6
9701 else
9702   if test -n "$LIPO"; then
9703   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9704 else
9705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9706 for as_dir in $PATH
9707 do
9708   IFS=$as_save_IFS
9709   test -z "$as_dir" && as_dir=.
9710     for ac_exec_ext in '' $ac_executable_extensions; do
9711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9712     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9714     break 2
9715   fi
9716 done
9717   done
9718 IFS=$as_save_IFS
9719
9720 fi
9721 fi
9722 LIPO=$ac_cv_prog_LIPO
9723 if test -n "$LIPO"; then
9724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9725 $as_echo "$LIPO" >&6; }
9726 else
9727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9728 $as_echo "no" >&6; }
9729 fi
9730
9731
9732 fi
9733 if test -z "$ac_cv_prog_LIPO"; then
9734   ac_ct_LIPO=$LIPO
9735   # Extract the first word of "lipo", so it can be a program name with args.
9736 set dummy lipo; ac_word=$2
9737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9738 $as_echo_n "checking for $ac_word... " >&6; }
9739 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9740   $as_echo_n "(cached) " >&6
9741 else
9742   if test -n "$ac_ct_LIPO"; then
9743   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9744 else
9745 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9746 for as_dir in $PATH
9747 do
9748   IFS=$as_save_IFS
9749   test -z "$as_dir" && as_dir=.
9750     for ac_exec_ext in '' $ac_executable_extensions; do
9751   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9752     ac_cv_prog_ac_ct_LIPO="lipo"
9753     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9754     break 2
9755   fi
9756 done
9757   done
9758 IFS=$as_save_IFS
9759
9760 fi
9761 fi
9762 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9763 if test -n "$ac_ct_LIPO"; then
9764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9765 $as_echo "$ac_ct_LIPO" >&6; }
9766 else
9767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9768 $as_echo "no" >&6; }
9769 fi
9770
9771   if test "x$ac_ct_LIPO" = x; then
9772     LIPO=":"
9773   else
9774     case $cross_compiling:$ac_tool_warned in
9775 yes:)
9776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9777 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9778 ac_tool_warned=yes ;;
9779 esac
9780     LIPO=$ac_ct_LIPO
9781   fi
9782 else
9783   LIPO="$ac_cv_prog_LIPO"
9784 fi
9785
9786     if test -n "$ac_tool_prefix"; then
9787   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9788 set dummy ${ac_tool_prefix}otool; ac_word=$2
9789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9790 $as_echo_n "checking for $ac_word... " >&6; }
9791 if ${ac_cv_prog_OTOOL+:} false; then :
9792   $as_echo_n "(cached) " >&6
9793 else
9794   if test -n "$OTOOL"; then
9795   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9796 else
9797 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9798 for as_dir in $PATH
9799 do
9800   IFS=$as_save_IFS
9801   test -z "$as_dir" && as_dir=.
9802     for ac_exec_ext in '' $ac_executable_extensions; do
9803   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9804     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9805     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9806     break 2
9807   fi
9808 done
9809   done
9810 IFS=$as_save_IFS
9811
9812 fi
9813 fi
9814 OTOOL=$ac_cv_prog_OTOOL
9815 if test -n "$OTOOL"; then
9816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9817 $as_echo "$OTOOL" >&6; }
9818 else
9819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9820 $as_echo "no" >&6; }
9821 fi
9822
9823
9824 fi
9825 if test -z "$ac_cv_prog_OTOOL"; then
9826   ac_ct_OTOOL=$OTOOL
9827   # Extract the first word of "otool", so it can be a program name with args.
9828 set dummy otool; ac_word=$2
9829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9830 $as_echo_n "checking for $ac_word... " >&6; }
9831 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9832   $as_echo_n "(cached) " >&6
9833 else
9834   if test -n "$ac_ct_OTOOL"; then
9835   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
9836 else
9837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9838 for as_dir in $PATH
9839 do
9840   IFS=$as_save_IFS
9841   test -z "$as_dir" && as_dir=.
9842     for ac_exec_ext in '' $ac_executable_extensions; do
9843   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9844     ac_cv_prog_ac_ct_OTOOL="otool"
9845     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9846     break 2
9847   fi
9848 done
9849   done
9850 IFS=$as_save_IFS
9851
9852 fi
9853 fi
9854 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
9855 if test -n "$ac_ct_OTOOL"; then
9856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
9857 $as_echo "$ac_ct_OTOOL" >&6; }
9858 else
9859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9860 $as_echo "no" >&6; }
9861 fi
9862
9863   if test "x$ac_ct_OTOOL" = x; then
9864     OTOOL=":"
9865   else
9866     case $cross_compiling:$ac_tool_warned in
9867 yes:)
9868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9869 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9870 ac_tool_warned=yes ;;
9871 esac
9872     OTOOL=$ac_ct_OTOOL
9873   fi
9874 else
9875   OTOOL="$ac_cv_prog_OTOOL"
9876 fi
9877
9878     if test -n "$ac_tool_prefix"; then
9879   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
9880 set dummy ${ac_tool_prefix}otool64; ac_word=$2
9881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9882 $as_echo_n "checking for $ac_word... " >&6; }
9883 if ${ac_cv_prog_OTOOL64+:} false; then :
9884   $as_echo_n "(cached) " >&6
9885 else
9886   if test -n "$OTOOL64"; then
9887   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
9888 else
9889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9890 for as_dir in $PATH
9891 do
9892   IFS=$as_save_IFS
9893   test -z "$as_dir" && as_dir=.
9894     for ac_exec_ext in '' $ac_executable_extensions; do
9895   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9896     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
9897     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9898     break 2
9899   fi
9900 done
9901   done
9902 IFS=$as_save_IFS
9903
9904 fi
9905 fi
9906 OTOOL64=$ac_cv_prog_OTOOL64
9907 if test -n "$OTOOL64"; then
9908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
9909 $as_echo "$OTOOL64" >&6; }
9910 else
9911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9912 $as_echo "no" >&6; }
9913 fi
9914
9915
9916 fi
9917 if test -z "$ac_cv_prog_OTOOL64"; then
9918   ac_ct_OTOOL64=$OTOOL64
9919   # Extract the first word of "otool64", so it can be a program name with args.
9920 set dummy otool64; ac_word=$2
9921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9922 $as_echo_n "checking for $ac_word... " >&6; }
9923 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
9924   $as_echo_n "(cached) " >&6
9925 else
9926   if test -n "$ac_ct_OTOOL64"; then
9927   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
9928 else
9929 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9930 for as_dir in $PATH
9931 do
9932   IFS=$as_save_IFS
9933   test -z "$as_dir" && as_dir=.
9934     for ac_exec_ext in '' $ac_executable_extensions; do
9935   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9936     ac_cv_prog_ac_ct_OTOOL64="otool64"
9937     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9938     break 2
9939   fi
9940 done
9941   done
9942 IFS=$as_save_IFS
9943
9944 fi
9945 fi
9946 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
9947 if test -n "$ac_ct_OTOOL64"; then
9948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
9949 $as_echo "$ac_ct_OTOOL64" >&6; }
9950 else
9951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9952 $as_echo "no" >&6; }
9953 fi
9954
9955   if test "x$ac_ct_OTOOL64" = x; then
9956     OTOOL64=":"
9957   else
9958     case $cross_compiling:$ac_tool_warned in
9959 yes:)
9960 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9961 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9962 ac_tool_warned=yes ;;
9963 esac
9964     OTOOL64=$ac_ct_OTOOL64
9965   fi
9966 else
9967   OTOOL64="$ac_cv_prog_OTOOL64"
9968 fi
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
9997 $as_echo_n "checking for -single_module linker flag... " >&6; }
9998 if ${lt_cv_apple_cc_single_mod+:} false; then :
9999   $as_echo_n "(cached) " >&6
10000 else
10001   lt_cv_apple_cc_single_mod=no
10002       if test -z "$LT_MULTI_MODULE"; then
10003         # By default we will add the -single_module flag. You can override
10004         # by either setting the environment variable LT_MULTI_MODULE
10005         # non-empty at configure time, or by adding -multi_module to the
10006         # link flags.
10007         rm -rf libconftest.dylib*
10008         echo "int foo(void){return 1;}" > conftest.c
10009         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10010 -dynamiclib -Wl,-single_module conftest.c" >&5
10011         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10012           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10013         _lt_result=$?
10014         # If there is a non-empty error log, and "single_module"
10015         # appears in it, assume the flag caused a linker warning
10016         if test -s conftest.err && $GREP single_module conftest.err; then
10017           cat conftest.err >&5
10018         # Otherwise, if the output was created with a 0 exit code from
10019         # the compiler, it worked.
10020         elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10021           lt_cv_apple_cc_single_mod=yes
10022         else
10023           cat conftest.err >&5
10024         fi
10025         rm -rf libconftest.dylib*
10026         rm -f conftest.*
10027       fi
10028 fi
10029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
10030 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
10031
10032     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
10033 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
10034 if ${lt_cv_ld_exported_symbols_list+:} false; then :
10035   $as_echo_n "(cached) " >&6
10036 else
10037   lt_cv_ld_exported_symbols_list=no
10038       save_LDFLAGS=$LDFLAGS
10039       echo "_main" > conftest.sym
10040       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10041       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10042 /* end confdefs.h.  */
10043
10044 int
10045 main ()
10046 {
10047
10048   ;
10049   return 0;
10050 }
10051 _ACEOF
10052 if ac_fn_c_try_link "$LINENO"; then :
10053   lt_cv_ld_exported_symbols_list=yes
10054 else
10055   lt_cv_ld_exported_symbols_list=no
10056 fi
10057 rm -f core conftest.err conftest.$ac_objext \
10058     conftest$ac_exeext conftest.$ac_ext
10059         LDFLAGS=$save_LDFLAGS
10060
10061 fi
10062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
10063 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
10064
10065     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
10066 $as_echo_n "checking for -force_load linker flag... " >&6; }
10067 if ${lt_cv_ld_force_load+:} false; then :
10068   $as_echo_n "(cached) " >&6
10069 else
10070   lt_cv_ld_force_load=no
10071       cat > conftest.c << _LT_EOF
10072 int forced_loaded() { return 2;}
10073 _LT_EOF
10074       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
10075       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
10076       echo "$AR cru libconftest.a conftest.o" >&5
10077       $AR cru libconftest.a conftest.o 2>&5
10078       echo "$RANLIB libconftest.a" >&5
10079       $RANLIB libconftest.a 2>&5
10080       cat > conftest.c << _LT_EOF
10081 int main() { return 0;}
10082 _LT_EOF
10083       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
10084       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10085       _lt_result=$?
10086       if test -s conftest.err && $GREP force_load conftest.err; then
10087         cat conftest.err >&5
10088       elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10089         lt_cv_ld_force_load=yes
10090       else
10091         cat conftest.err >&5
10092       fi
10093         rm -f conftest.err libconftest.a conftest conftest.c
10094         rm -rf conftest.dSYM
10095
10096 fi
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
10098 $as_echo "$lt_cv_ld_force_load" >&6; }
10099     case $host_os in
10100     rhapsody* | darwin1.[012])
10101       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10102     darwin1.*)
10103       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10104     darwin*) # darwin 5.x on
10105       # if running on 10.5 or later, the deployment target defaults
10106       # to the OS version, if on x86, and 10.4, the deployment
10107       # target defaults to 10.4. Don't you love it?
10108       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10109         10.0,*86*-darwin8*|10.0,*-darwin[91]*)
10110           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10111         10.[012][,.]*)
10112           _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10113         10.*)
10114           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10115       esac
10116     ;;
10117   esac
10118     if test yes = "$lt_cv_apple_cc_single_mod"; then
10119       _lt_dar_single_mod='$single_module'
10120     fi
10121     if test yes = "$lt_cv_ld_exported_symbols_list"; then
10122       _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10123     else
10124       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10125     fi
10126     if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10127       _lt_dsymutil='~$DSYMUTIL $lib || :'
10128     else
10129       _lt_dsymutil=
10130     fi
10131     ;;
10132   esac
10133
10134 # func_munge_path_list VARIABLE PATH
10135 # -----------------------------------
10136 # VARIABLE is name of variable containing _space_ separated list of
10137 # directories to be munged by the contents of PATH, which is string
10138 # having a format:
10139 # "DIR[:DIR]:"
10140 #       string "DIR[ DIR]" will be prepended to VARIABLE
10141 # ":DIR[:DIR]"
10142 #       string "DIR[ DIR]" will be appended to VARIABLE
10143 # "DIRP[:DIRP]::[DIRA:]DIRA"
10144 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
10145 #       "DIRA[ DIRA]" will be appended to VARIABLE
10146 # "DIR[:DIR]"
10147 #       VARIABLE will be replaced by "DIR[ DIR]"
10148 func_munge_path_list ()
10149 {
10150     case x$2 in
10151     x)
10152         ;;
10153     *:)
10154         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10155         ;;
10156     x:*)
10157         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10158         ;;
10159     *::*)
10160         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10161         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10162         ;;
10163     *)
10164         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10165         ;;
10166     esac
10167 }
10168
10169 for ac_header in dlfcn.h
10170 do :
10171   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10172 "
10173 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
10174   cat >>confdefs.h <<_ACEOF
10175 #define HAVE_DLFCN_H 1
10176 _ACEOF
10177
10178 fi
10179
10180 done
10181
10182
10183
10184
10185
10186
10187
10188 # Set options
10189
10190
10191
10192         enable_dlopen=no
10193
10194
10195   enable_win32_dll=no
10196
10197
10198             # Check whether --enable-shared was given.
10199 if test "${enable_shared+set}" = set; then :
10200   enableval=$enable_shared; p=${PACKAGE-default}
10201     case $enableval in
10202     yes) enable_shared=yes ;;
10203     no) enable_shared=no ;;
10204     *)
10205       enable_shared=no
10206       # Look at the argument we got.  We use all the common list separators.
10207       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10208       for pkg in $enableval; do
10209         IFS=$lt_save_ifs
10210         if test "X$pkg" = "X$p"; then
10211           enable_shared=yes
10212         fi
10213       done
10214       IFS=$lt_save_ifs
10215       ;;
10216     esac
10217 else
10218   enable_shared=yes
10219 fi
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229   # Check whether --enable-static was given.
10230 if test "${enable_static+set}" = set; then :
10231   enableval=$enable_static; p=${PACKAGE-default}
10232     case $enableval in
10233     yes) enable_static=yes ;;
10234     no) enable_static=no ;;
10235     *)
10236      enable_static=no
10237       # Look at the argument we got.  We use all the common list separators.
10238       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10239       for pkg in $enableval; do
10240         IFS=$lt_save_ifs
10241         if test "X$pkg" = "X$p"; then
10242           enable_static=yes
10243         fi
10244       done
10245       IFS=$lt_save_ifs
10246       ;;
10247     esac
10248 else
10249   enable_static=yes
10250 fi
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261 # Check whether --with-pic was given.
10262 if test "${with_pic+set}" = set; then :
10263   withval=$with_pic; lt_p=${PACKAGE-default}
10264     case $withval in
10265     yes|no) pic_mode=$withval ;;
10266     *)
10267       pic_mode=default
10268       # Look at the argument we got.  We use all the common list separators.
10269       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10270       for lt_pkg in $withval; do
10271         IFS=$lt_save_ifs
10272         if test "X$lt_pkg" = "X$lt_p"; then
10273           pic_mode=yes
10274         fi
10275       done
10276       IFS=$lt_save_ifs
10277       ;;
10278     esac
10279 else
10280   pic_mode=default
10281 fi
10282
10283
10284
10285
10286
10287
10288
10289
10290   # Check whether --enable-fast-install was given.
10291 if test "${enable_fast_install+set}" = set; then :
10292   enableval=$enable_fast_install; p=${PACKAGE-default}
10293     case $enableval in
10294     yes) enable_fast_install=yes ;;
10295     no) enable_fast_install=no ;;
10296     *)
10297       enable_fast_install=no
10298       # Look at the argument we got.  We use all the common list separators.
10299       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10300       for pkg in $enableval; do
10301         IFS=$lt_save_ifs
10302         if test "X$pkg" = "X$p"; then
10303           enable_fast_install=yes
10304         fi
10305       done
10306       IFS=$lt_save_ifs
10307       ;;
10308     esac
10309 else
10310   enable_fast_install=yes
10311 fi
10312
10313
10314
10315
10316
10317
10318
10319
10320   shared_archive_member_spec=
10321 case $host,$enable_shared in
10322 power*-*-aix[5-9]*,yes)
10323   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10324 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
10325
10326 # Check whether --with-aix-soname was given.
10327 if test "${with_aix_soname+set}" = set; then :
10328   withval=$with_aix_soname; case $withval in
10329     aix|svr4|both)
10330       ;;
10331     *)
10332       as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10333       ;;
10334     esac
10335     lt_cv_with_aix_soname=$with_aix_soname
10336 else
10337   if ${lt_cv_with_aix_soname+:} false; then :
10338   $as_echo_n "(cached) " >&6
10339 else
10340   lt_cv_with_aix_soname=aix
10341 fi
10342
10343     with_aix_soname=$lt_cv_with_aix_soname
10344 fi
10345
10346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10347 $as_echo "$with_aix_soname" >&6; }
10348   if test aix != "$with_aix_soname"; then
10349     # For the AIX way of multilib, we name the shared archive member
10350     # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10351     # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10352     # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10353     # the AIX toolchain works better with OBJECT_MODE set (default 32).
10354     if test 64 = "${OBJECT_MODE-32}"; then
10355       shared_archive_member_spec=shr_64
10356     else
10357       shared_archive_member_spec=shr
10358     fi
10359   fi
10360   ;;
10361 *)
10362   with_aix_soname=aix
10363   ;;
10364 esac
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375 # This can be used to rebuild libtool when needed
10376 LIBTOOL_DEPS=$ltmain
10377
10378 # Always use our own libtool.
10379 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
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
10405
10406
10407
10408
10409
10410 test -z "$LN_S" && LN_S="ln -s"
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425 if test -n "${ZSH_VERSION+set}"; then
10426    setopt NO_GLOB_SUBST
10427 fi
10428
10429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10430 $as_echo_n "checking for objdir... " >&6; }
10431 if ${lt_cv_objdir+:} false; then :
10432   $as_echo_n "(cached) " >&6
10433 else
10434   rm -f .libs 2>/dev/null
10435 mkdir .libs 2>/dev/null
10436 if test -d .libs; then
10437   lt_cv_objdir=.libs
10438 else
10439   # MS-DOS does not allow filenames that begin with a dot.
10440   lt_cv_objdir=_libs
10441 fi
10442 rmdir .libs 2>/dev/null
10443 fi
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10445 $as_echo "$lt_cv_objdir" >&6; }
10446 objdir=$lt_cv_objdir
10447
10448
10449
10450
10451
10452 cat >>confdefs.h <<_ACEOF
10453 #define LT_OBJDIR "$lt_cv_objdir/"
10454 _ACEOF
10455
10456
10457
10458
10459 case $host_os in
10460 aix3*)
10461   # AIX sometimes has problems with the GCC collect2 program.  For some
10462   # reason, if we set the COLLECT_NAMES environment variable, the problems
10463   # vanish in a puff of smoke.
10464   if test set != "${COLLECT_NAMES+set}"; then
10465     COLLECT_NAMES=
10466     export COLLECT_NAMES
10467   fi
10468   ;;
10469 esac
10470
10471 # Global variables:
10472 ofile=libtool
10473 can_build_shared=yes
10474
10475 # All known linkers require a '.a' archive for static linking (except MSVC,
10476 # which needs '.lib').
10477 libext=a
10478
10479 with_gnu_ld=$lt_cv_prog_gnu_ld
10480
10481 old_CC=$CC
10482 old_CFLAGS=$CFLAGS
10483
10484 # Set sane defaults for various variables
10485 test -z "$CC" && CC=cc
10486 test -z "$LTCC" && LTCC=$CC
10487 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10488 test -z "$LD" && LD=ld
10489 test -z "$ac_objext" && ac_objext=o
10490
10491 func_cc_basename $compiler
10492 cc_basename=$func_cc_basename_result
10493
10494
10495 # Only perform the check for file, if the check method requires it
10496 test -z "$MAGIC_CMD" && MAGIC_CMD=file
10497 case $deplibs_check_method in
10498 file_magic*)
10499   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10500     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10501 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10502 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10503   $as_echo_n "(cached) " >&6
10504 else
10505   case $MAGIC_CMD in
10506 [\\/*] |  ?:[\\/]*)
10507   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10508   ;;
10509 *)
10510   lt_save_MAGIC_CMD=$MAGIC_CMD
10511   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10512   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10513   for ac_dir in $ac_dummy; do
10514     IFS=$lt_save_ifs
10515     test -z "$ac_dir" && ac_dir=.
10516     if test -f "$ac_dir/${ac_tool_prefix}file"; then
10517       lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10518       if test -n "$file_magic_test_file"; then
10519         case $deplibs_check_method in
10520         "file_magic "*)
10521           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10522           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10523           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10524             $EGREP "$file_magic_regex" > /dev/null; then
10525             :
10526           else
10527             cat <<_LT_EOF 1>&2
10528
10529 *** Warning: the command libtool uses to detect shared libraries,
10530 *** $file_magic_cmd, produces output that libtool cannot recognize.
10531 *** The result is that libtool may fail to recognize shared libraries
10532 *** as such.  This will affect the creation of libtool libraries that
10533 *** depend on shared libraries, but programs linked with such libtool
10534 *** libraries will work regardless of this problem.  Nevertheless, you
10535 *** may want to report the problem to your system manager and/or to
10536 *** bug-libtool@gnu.org
10537
10538 _LT_EOF
10539           fi ;;
10540         esac
10541       fi
10542       break
10543     fi
10544   done
10545   IFS=$lt_save_ifs
10546   MAGIC_CMD=$lt_save_MAGIC_CMD
10547   ;;
10548 esac
10549 fi
10550
10551 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10552 if test -n "$MAGIC_CMD"; then
10553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10554 $as_echo "$MAGIC_CMD" >&6; }
10555 else
10556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10557 $as_echo "no" >&6; }
10558 fi
10559
10560
10561
10562
10563
10564 if test -z "$lt_cv_path_MAGIC_CMD"; then
10565   if test -n "$ac_tool_prefix"; then
10566     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10567 $as_echo_n "checking for file... " >&6; }
10568 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10569   $as_echo_n "(cached) " >&6
10570 else
10571   case $MAGIC_CMD in
10572 [\\/*] |  ?:[\\/]*)
10573   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10574   ;;
10575 *)
10576   lt_save_MAGIC_CMD=$MAGIC_CMD
10577   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10578   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10579   for ac_dir in $ac_dummy; do
10580     IFS=$lt_save_ifs
10581     test -z "$ac_dir" && ac_dir=.
10582     if test -f "$ac_dir/file"; then
10583       lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10584       if test -n "$file_magic_test_file"; then
10585         case $deplibs_check_method in
10586         "file_magic "*)
10587           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10588           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10589           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10590             $EGREP "$file_magic_regex" > /dev/null; then
10591             :
10592           else
10593             cat <<_LT_EOF 1>&2
10594
10595 *** Warning: the command libtool uses to detect shared libraries,
10596 *** $file_magic_cmd, produces output that libtool cannot recognize.
10597 *** The result is that libtool may fail to recognize shared libraries
10598 *** as such.  This will affect the creation of libtool libraries that
10599 *** depend on shared libraries, but programs linked with such libtool
10600 *** libraries will work regardless of this problem.  Nevertheless, you
10601 *** may want to report the problem to your system manager and/or to
10602 *** bug-libtool@gnu.org
10603
10604 _LT_EOF
10605           fi ;;
10606         esac
10607       fi
10608       break
10609     fi
10610   done
10611   IFS=$lt_save_ifs
10612   MAGIC_CMD=$lt_save_MAGIC_CMD
10613   ;;
10614 esac
10615 fi
10616
10617 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10618 if test -n "$MAGIC_CMD"; then
10619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10620 $as_echo "$MAGIC_CMD" >&6; }
10621 else
10622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10623 $as_echo "no" >&6; }
10624 fi
10625
10626
10627   else
10628     MAGIC_CMD=:
10629   fi
10630 fi
10631
10632   fi
10633   ;;
10634 esac
10635
10636 # Use C for the default configuration in the libtool script
10637
10638 lt_save_CC=$CC
10639 ac_ext=c
10640 ac_cpp='$CPP $CPPFLAGS'
10641 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10642 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10643 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10644
10645
10646 # Source file extension for C test sources.
10647 ac_ext=c
10648
10649 # Object file extension for compiled C test sources.
10650 objext=o
10651 objext=$objext
10652
10653 # Code to be used in simple compile tests
10654 lt_simple_compile_test_code="int some_variable = 0;"
10655
10656 # Code to be used in simple link tests
10657 lt_simple_link_test_code='int main(){return(0);}'
10658
10659
10660
10661
10662
10663
10664
10665 # If no C compiler was specified, use CC.
10666 LTCC=${LTCC-"$CC"}
10667
10668 # If no C compiler flags were specified, use CFLAGS.
10669 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10670
10671 # Allow CC to be a program name with arguments.
10672 compiler=$CC
10673
10674 # Save the default compiler, since it gets overwritten when the other
10675 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10676 compiler_DEFAULT=$CC
10677
10678 # save warnings/boilerplate of simple test code
10679 ac_outfile=conftest.$ac_objext
10680 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10681 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10682 _lt_compiler_boilerplate=`cat conftest.err`
10683 $RM conftest*
10684
10685 ac_outfile=conftest.$ac_objext
10686 echo "$lt_simple_link_test_code" >conftest.$ac_ext
10687 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10688 _lt_linker_boilerplate=`cat conftest.err`
10689 $RM -r conftest*
10690
10691
10692 if test -n "$compiler"; then
10693
10694 lt_prog_compiler_no_builtin_flag=
10695
10696 if test yes = "$GCC"; then
10697   case $cc_basename in
10698   nvcc*)
10699     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10700   *)
10701     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10702   esac
10703
10704   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10705 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10706 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10707   $as_echo_n "(cached) " >&6
10708 else
10709   lt_cv_prog_compiler_rtti_exceptions=no
10710    ac_outfile=conftest.$ac_objext
10711    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10712    lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
10713    # Insert the option either (1) after the last *FLAGS variable, or
10714    # (2) before a word containing "conftest.", or (3) at the end.
10715    # Note that $ac_compile itself does not contain backslashes and begins
10716    # with a dollar sign (not a hyphen), so the echo should work correctly.
10717    # The option is referenced via a variable to avoid confusing sed.
10718    lt_compile=`echo "$ac_compile" | $SED \
10719    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10720    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10721    -e 's:$: $lt_compiler_flag:'`
10722    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10723    (eval "$lt_compile" 2>conftest.err)
10724    ac_status=$?
10725    cat conftest.err >&5
10726    echo "$as_me:$LINENO: \$? = $ac_status" >&5
10727    if (exit $ac_status) && test -s "$ac_outfile"; then
10728      # The compiler can only warn and ignore the option if not recognized
10729      # So say no if there are warnings other than the usual output.
10730      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10731      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10732      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10733        lt_cv_prog_compiler_rtti_exceptions=yes
10734      fi
10735    fi
10736    $RM conftest*
10737
10738 fi
10739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10740 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10741
10742 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10743     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10744 else
10745     :
10746 fi
10747
10748 fi
10749
10750
10751
10752
10753
10754
10755   lt_prog_compiler_wl=
10756 lt_prog_compiler_pic=
10757 lt_prog_compiler_static=
10758
10759
10760   if test yes = "$GCC"; then
10761     lt_prog_compiler_wl='-Wl,'
10762     lt_prog_compiler_static='-static'
10763
10764     case $host_os in
10765       aix*)
10766       # All AIX code is PIC.
10767       if test ia64 = "$host_cpu"; then
10768         # AIX 5 now supports IA64 processor
10769         lt_prog_compiler_static='-Bstatic'
10770       fi
10771       lt_prog_compiler_pic='-fPIC'
10772       ;;
10773
10774     amigaos*)
10775       case $host_cpu in
10776       powerpc)
10777             # see comment about AmigaOS4 .so support
10778             lt_prog_compiler_pic='-fPIC'
10779         ;;
10780       m68k)
10781             # FIXME: we need at least 68020 code to build shared libraries, but
10782             # adding the '-m68020' flag to GCC prevents building anything better,
10783             # like '-m68040'.
10784             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10785         ;;
10786       esac
10787       ;;
10788
10789     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10790       # PIC is the default for these OSes.
10791       ;;
10792
10793     mingw* | cygwin* | pw32* | os2* | cegcc*)
10794       # This hack is so that the source file can tell whether it is being
10795       # built for inclusion in a dll (and should export symbols for example).
10796       # Although the cygwin gcc ignores -fPIC, still need this for old-style
10797       # (--disable-auto-import) libraries
10798       lt_prog_compiler_pic='-DDLL_EXPORT'
10799       case $host_os in
10800       os2*)
10801         lt_prog_compiler_static='$wl-static'
10802         ;;
10803       esac
10804       ;;
10805
10806     darwin* | rhapsody*)
10807       # PIC is the default on this platform
10808       # Common symbols not allowed in MH_DYLIB files
10809       lt_prog_compiler_pic='-fno-common'
10810       ;;
10811
10812     haiku*)
10813       # PIC is the default for Haiku.
10814       # The "-static" flag exists, but is broken.
10815       lt_prog_compiler_static=
10816       ;;
10817
10818     hpux*)
10819       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10820       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10821       # sets the default TLS model and affects inlining.
10822       case $host_cpu in
10823       hppa*64*)
10824         # +Z the default
10825         ;;
10826       *)
10827         lt_prog_compiler_pic='-fPIC'
10828         ;;
10829       esac
10830       ;;
10831
10832     interix[3-9]*)
10833       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10834       # Instead, we relocate shared libraries at runtime.
10835       ;;
10836
10837     msdosdjgpp*)
10838       # Just because we use GCC doesn't mean we suddenly get shared libraries
10839       # on systems that don't support them.
10840       lt_prog_compiler_can_build_shared=no
10841       enable_shared=no
10842       ;;
10843
10844     *nto* | *qnx*)
10845       # QNX uses GNU C++, but need to define -shared option too, otherwise
10846       # it will coredump.
10847       lt_prog_compiler_pic='-fPIC -shared'
10848       ;;
10849
10850     sysv4*MP*)
10851       if test -d /usr/nec; then
10852         lt_prog_compiler_pic=-Kconform_pic
10853       fi
10854       ;;
10855
10856     *)
10857       lt_prog_compiler_pic='-fPIC'
10858       ;;
10859     esac
10860
10861     case $cc_basename in
10862     nvcc*) # Cuda Compiler Driver 2.2
10863       lt_prog_compiler_wl='-Xlinker '
10864       if test -n "$lt_prog_compiler_pic"; then
10865         lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
10866       fi
10867       ;;
10868     esac
10869   else
10870     # PORTME Check for flag to pass linker flags through the system compiler.
10871     case $host_os in
10872     aix*)
10873       lt_prog_compiler_wl='-Wl,'
10874       if test ia64 = "$host_cpu"; then
10875         # AIX 5 now supports IA64 processor
10876         lt_prog_compiler_static='-Bstatic'
10877       else
10878         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
10879       fi
10880       ;;
10881
10882     darwin* | rhapsody*)
10883       # PIC is the default on this platform
10884       # Common symbols not allowed in MH_DYLIB files
10885       lt_prog_compiler_pic='-fno-common'
10886       case $cc_basename in
10887       nagfor*)
10888         # NAG Fortran compiler
10889         lt_prog_compiler_wl='-Wl,-Wl,,'
10890         lt_prog_compiler_pic='-PIC'
10891         lt_prog_compiler_static='-Bstatic'
10892         ;;
10893       esac
10894       ;;
10895
10896     mingw* | cygwin* | pw32* | os2* | cegcc*)
10897       # This hack is so that the source file can tell whether it is being
10898       # built for inclusion in a dll (and should export symbols for example).
10899       lt_prog_compiler_pic='-DDLL_EXPORT'
10900       case $host_os in
10901       os2*)
10902         lt_prog_compiler_static='$wl-static'
10903         ;;
10904       esac
10905       ;;
10906
10907     hpux9* | hpux10* | hpux11*)
10908       lt_prog_compiler_wl='-Wl,'
10909       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10910       # not for PA HP-UX.
10911       case $host_cpu in
10912       hppa*64*|ia64*)
10913         # +Z the default
10914         ;;
10915       *)
10916         lt_prog_compiler_pic='+Z'
10917         ;;
10918       esac
10919       # Is there a better lt_prog_compiler_static that works with the bundled CC?
10920       lt_prog_compiler_static='$wl-a ${wl}archive'
10921       ;;
10922
10923     irix5* | irix6* | nonstopux*)
10924       lt_prog_compiler_wl='-Wl,'
10925       # PIC (with -KPIC) is the default.
10926       lt_prog_compiler_static='-non_shared'
10927       ;;
10928
10929     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
10930       case $cc_basename in
10931       # old Intel for x86_64, which still supported -KPIC.
10932       ecc*)
10933         lt_prog_compiler_wl='-Wl,'
10934         lt_prog_compiler_pic='-KPIC'
10935         lt_prog_compiler_static='-static'
10936         ;;
10937       # icc used to be incompatible with GCC.
10938       # ICC 10 doesn't accept -KPIC any more.
10939       icc* | ifort*)
10940         lt_prog_compiler_wl='-Wl,'
10941         lt_prog_compiler_pic='-fPIC'
10942         lt_prog_compiler_static='-static'
10943         ;;
10944       # Lahey Fortran 8.1.
10945       lf95*)
10946         lt_prog_compiler_wl='-Wl,'
10947         lt_prog_compiler_pic='--shared'
10948         lt_prog_compiler_static='--static'
10949         ;;
10950       nagfor*)
10951         # NAG Fortran compiler
10952         lt_prog_compiler_wl='-Wl,-Wl,,'
10953         lt_prog_compiler_pic='-PIC'
10954         lt_prog_compiler_static='-Bstatic'
10955         ;;
10956       tcc*)
10957         # Fabrice Bellard et al's Tiny C Compiler
10958         lt_prog_compiler_wl='-Wl,'
10959         lt_prog_compiler_pic='-fPIC'
10960         lt_prog_compiler_static='-static'
10961         ;;
10962       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
10963         # Portland Group compilers (*not* the Pentium gcc compiler,
10964         # which looks to be a dead project)
10965         lt_prog_compiler_wl='-Wl,'
10966         lt_prog_compiler_pic='-fpic'
10967         lt_prog_compiler_static='-Bstatic'
10968         ;;
10969       ccc*)
10970         lt_prog_compiler_wl='-Wl,'
10971         # All Alpha code is PIC.
10972         lt_prog_compiler_static='-non_shared'
10973         ;;
10974       xl* | bgxl* | bgf* | mpixl*)
10975         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
10976         lt_prog_compiler_wl='-Wl,'
10977         lt_prog_compiler_pic='-qpic'
10978         lt_prog_compiler_static='-qstaticlink'
10979         ;;
10980       *)
10981         case `$CC -V 2>&1 | sed 5q` in
10982         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
10983           # Sun Fortran 8.3 passes all unrecognized flags to the linker
10984           lt_prog_compiler_pic='-KPIC'
10985           lt_prog_compiler_static='-Bstatic'
10986           lt_prog_compiler_wl=''
10987           ;;
10988         *Sun\ F* | *Sun*Fortran*)
10989           lt_prog_compiler_pic='-KPIC'
10990           lt_prog_compiler_static='-Bstatic'
10991           lt_prog_compiler_wl='-Qoption ld '
10992           ;;
10993         *Sun\ C*)
10994           # Sun C 5.9
10995           lt_prog_compiler_pic='-KPIC'
10996           lt_prog_compiler_static='-Bstatic'
10997           lt_prog_compiler_wl='-Wl,'
10998           ;;
10999         *Intel*\ [CF]*Compiler*)
11000           lt_prog_compiler_wl='-Wl,'
11001           lt_prog_compiler_pic='-fPIC'
11002           lt_prog_compiler_static='-static'
11003           ;;
11004         *Portland\ Group*)
11005           lt_prog_compiler_wl='-Wl,'
11006           lt_prog_compiler_pic='-fpic'
11007           lt_prog_compiler_static='-Bstatic'
11008           ;;
11009         esac
11010         ;;
11011       esac
11012       ;;
11013
11014     newsos6)
11015       lt_prog_compiler_pic='-KPIC'
11016       lt_prog_compiler_static='-Bstatic'
11017       ;;
11018
11019     *nto* | *qnx*)
11020       # QNX uses GNU C++, but need to define -shared option too, otherwise
11021       # it will coredump.
11022       lt_prog_compiler_pic='-fPIC -shared'
11023       ;;
11024
11025     osf3* | osf4* | osf5*)
11026       lt_prog_compiler_wl='-Wl,'
11027       # All OSF/1 code is PIC.
11028       lt_prog_compiler_static='-non_shared'
11029       ;;
11030
11031     rdos*)
11032       lt_prog_compiler_static='-non_shared'
11033       ;;
11034
11035     solaris*)
11036       lt_prog_compiler_pic='-KPIC'
11037       lt_prog_compiler_static='-Bstatic'
11038       case $cc_basename in
11039       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
11040         lt_prog_compiler_wl='-Qoption ld ';;
11041       *)
11042         lt_prog_compiler_wl='-Wl,';;
11043       esac
11044       ;;
11045
11046     sunos4*)
11047       lt_prog_compiler_wl='-Qoption ld '
11048       lt_prog_compiler_pic='-PIC'
11049       lt_prog_compiler_static='-Bstatic'
11050       ;;
11051
11052     sysv4 | sysv4.2uw2* | sysv4.3*)
11053       lt_prog_compiler_wl='-Wl,'
11054       lt_prog_compiler_pic='-KPIC'
11055       lt_prog_compiler_static='-Bstatic'
11056       ;;
11057
11058     sysv4*MP*)
11059       if test -d /usr/nec; then
11060         lt_prog_compiler_pic='-Kconform_pic'
11061         lt_prog_compiler_static='-Bstatic'
11062       fi
11063       ;;
11064
11065     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11066       lt_prog_compiler_wl='-Wl,'
11067       lt_prog_compiler_pic='-KPIC'
11068       lt_prog_compiler_static='-Bstatic'
11069       ;;
11070
11071     unicos*)
11072       lt_prog_compiler_wl='-Wl,'
11073       lt_prog_compiler_can_build_shared=no
11074       ;;
11075
11076     uts4*)
11077       lt_prog_compiler_pic='-pic'
11078       lt_prog_compiler_static='-Bstatic'
11079       ;;
11080
11081     *)
11082       lt_prog_compiler_can_build_shared=no
11083       ;;
11084     esac
11085   fi
11086
11087 case $host_os in
11088   # For platforms that do not support PIC, -DPIC is meaningless:
11089   *djgpp*)
11090     lt_prog_compiler_pic=
11091     ;;
11092   *)
11093     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11094     ;;
11095 esac
11096
11097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11098 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
11099 if ${lt_cv_prog_compiler_pic+:} false; then :
11100   $as_echo_n "(cached) " >&6
11101 else
11102   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11103 fi
11104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11105 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
11106 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11107
11108 #
11109 # Check to make sure the PIC flag actually works.
11110 #
11111 if test -n "$lt_prog_compiler_pic"; then
11112   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
11113 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
11114 if ${lt_cv_prog_compiler_pic_works+:} false; then :
11115   $as_echo_n "(cached) " >&6
11116 else
11117   lt_cv_prog_compiler_pic_works=no
11118    ac_outfile=conftest.$ac_objext
11119    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11120    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
11121    # Insert the option either (1) after the last *FLAGS variable, or
11122    # (2) before a word containing "conftest.", or (3) at the end.
11123    # Note that $ac_compile itself does not contain backslashes and begins
11124    # with a dollar sign (not a hyphen), so the echo should work correctly.
11125    # The option is referenced via a variable to avoid confusing sed.
11126    lt_compile=`echo "$ac_compile" | $SED \
11127    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11128    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11129    -e 's:$: $lt_compiler_flag:'`
11130    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11131    (eval "$lt_compile" 2>conftest.err)
11132    ac_status=$?
11133    cat conftest.err >&5
11134    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11135    if (exit $ac_status) && test -s "$ac_outfile"; then
11136      # The compiler can only warn and ignore the option if not recognized
11137      # So say no if there are warnings other than the usual output.
11138      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11139      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11140      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11141        lt_cv_prog_compiler_pic_works=yes
11142      fi
11143    fi
11144    $RM conftest*
11145
11146 fi
11147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
11148 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
11149
11150 if test yes = "$lt_cv_prog_compiler_pic_works"; then
11151     case $lt_prog_compiler_pic in
11152      "" | " "*) ;;
11153      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11154      esac
11155 else
11156     lt_prog_compiler_pic=
11157      lt_prog_compiler_can_build_shared=no
11158 fi
11159
11160 fi
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172 #
11173 # Check to make sure the static flag actually works.
11174 #
11175 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11177 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11178 if ${lt_cv_prog_compiler_static_works+:} false; then :
11179   $as_echo_n "(cached) " >&6
11180 else
11181   lt_cv_prog_compiler_static_works=no
11182    save_LDFLAGS=$LDFLAGS
11183    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11184    echo "$lt_simple_link_test_code" > conftest.$ac_ext
11185    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11186      # The linker can only warn and ignore the option if not recognized
11187      # So say no if there are warnings
11188      if test -s conftest.err; then
11189        # Append any errors to the config.log.
11190        cat conftest.err 1>&5
11191        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11192        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11193        if diff conftest.exp conftest.er2 >/dev/null; then
11194          lt_cv_prog_compiler_static_works=yes
11195        fi
11196      else
11197        lt_cv_prog_compiler_static_works=yes
11198      fi
11199    fi
11200    $RM -r conftest*
11201    LDFLAGS=$save_LDFLAGS
11202
11203 fi
11204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11205 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
11206
11207 if test yes = "$lt_cv_prog_compiler_static_works"; then
11208     :
11209 else
11210     lt_prog_compiler_static=
11211 fi
11212
11213
11214
11215
11216
11217
11218
11219   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11220 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11221 if ${lt_cv_prog_compiler_c_o+:} false; then :
11222   $as_echo_n "(cached) " >&6
11223 else
11224   lt_cv_prog_compiler_c_o=no
11225    $RM -r conftest 2>/dev/null
11226    mkdir conftest
11227    cd conftest
11228    mkdir out
11229    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11230
11231    lt_compiler_flag="-o out/conftest2.$ac_objext"
11232    # Insert the option either (1) after the last *FLAGS variable, or
11233    # (2) before a word containing "conftest.", or (3) at the end.
11234    # Note that $ac_compile itself does not contain backslashes and begins
11235    # with a dollar sign (not a hyphen), so the echo should work correctly.
11236    lt_compile=`echo "$ac_compile" | $SED \
11237    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11238    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11239    -e 's:$: $lt_compiler_flag:'`
11240    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11241    (eval "$lt_compile" 2>out/conftest.err)
11242    ac_status=$?
11243    cat out/conftest.err >&5
11244    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11245    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11246    then
11247      # The compiler can only warn and ignore the option if not recognized
11248      # So say no if there are warnings
11249      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11250      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11251      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11252        lt_cv_prog_compiler_c_o=yes
11253      fi
11254    fi
11255    chmod u+w . 2>&5
11256    $RM conftest*
11257    # SGI C++ compiler will create directory out/ii_files/ for
11258    # template instantiation
11259    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11260    $RM out/* && rmdir out
11261    cd ..
11262    $RM -r conftest
11263    $RM conftest*
11264
11265 fi
11266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11267 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11268
11269
11270
11271
11272
11273
11274   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11275 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11276 if ${lt_cv_prog_compiler_c_o+:} false; then :
11277   $as_echo_n "(cached) " >&6
11278 else
11279   lt_cv_prog_compiler_c_o=no
11280    $RM -r conftest 2>/dev/null
11281    mkdir conftest
11282    cd conftest
11283    mkdir out
11284    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11285
11286    lt_compiler_flag="-o out/conftest2.$ac_objext"
11287    # Insert the option either (1) after the last *FLAGS variable, or
11288    # (2) before a word containing "conftest.", or (3) at the end.
11289    # Note that $ac_compile itself does not contain backslashes and begins
11290    # with a dollar sign (not a hyphen), so the echo should work correctly.
11291    lt_compile=`echo "$ac_compile" | $SED \
11292    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11293    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11294    -e 's:$: $lt_compiler_flag:'`
11295    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11296    (eval "$lt_compile" 2>out/conftest.err)
11297    ac_status=$?
11298    cat out/conftest.err >&5
11299    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11300    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11301    then
11302      # The compiler can only warn and ignore the option if not recognized
11303      # So say no if there are warnings
11304      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11305      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11306      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11307        lt_cv_prog_compiler_c_o=yes
11308      fi
11309    fi
11310    chmod u+w . 2>&5
11311    $RM conftest*
11312    # SGI C++ compiler will create directory out/ii_files/ for
11313    # template instantiation
11314    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11315    $RM out/* && rmdir out
11316    cd ..
11317    $RM -r conftest
11318    $RM conftest*
11319
11320 fi
11321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11322 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11323
11324
11325
11326
11327 hard_links=nottested
11328 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11329   # do not overwrite the value of need_locks provided by the user
11330   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11331 $as_echo_n "checking if we can lock with hard links... " >&6; }
11332   hard_links=yes
11333   $RM conftest*
11334   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11335   touch conftest.a
11336   ln conftest.a conftest.b 2>&5 || hard_links=no
11337   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11339 $as_echo "$hard_links" >&6; }
11340   if test no = "$hard_links"; then
11341     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11342 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11343     need_locks=warn
11344   fi
11345 else
11346   need_locks=no
11347 fi
11348
11349
11350
11351
11352
11353
11354   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11355 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11356
11357   runpath_var=
11358   allow_undefined_flag=
11359   always_export_symbols=no
11360   archive_cmds=
11361   archive_expsym_cmds=
11362   compiler_needs_object=no
11363   enable_shared_with_static_runtimes=no
11364   export_dynamic_flag_spec=
11365   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11366   hardcode_automatic=no
11367   hardcode_direct=no
11368   hardcode_direct_absolute=no
11369   hardcode_libdir_flag_spec=
11370   hardcode_libdir_separator=
11371   hardcode_minus_L=no
11372   hardcode_shlibpath_var=unsupported
11373   inherit_rpath=no
11374   link_all_deplibs=unknown
11375   module_cmds=
11376   module_expsym_cmds=
11377   old_archive_from_new_cmds=
11378   old_archive_from_expsyms_cmds=
11379   thread_safe_flag_spec=
11380   whole_archive_flag_spec=
11381   # include_expsyms should be a list of space-separated symbols to be *always*
11382   # included in the symbol list
11383   include_expsyms=
11384   # exclude_expsyms can be an extended regexp of symbols to exclude
11385   # it will be wrapped by ' (' and ')$', so one must not match beginning or
11386   # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11387   # as well as any symbol that contains 'd'.
11388   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11389   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11390   # platforms (ab)use it in PIC code, but their linkers get confused if
11391   # the symbol is explicitly referenced.  Since portable code cannot
11392   # rely on this symbol name, it's probably fine to never include it in
11393   # preloaded symbol tables.
11394   # Exclude shared library initialization/finalization symbols.
11395   extract_expsyms_cmds=
11396
11397   case $host_os in
11398   cygwin* | mingw* | pw32* | cegcc*)
11399     # FIXME: the MSVC++ port hasn't been tested in a loooong time
11400     # When not using gcc, we currently assume that we are using
11401     # Microsoft Visual C++.
11402     if test yes != "$GCC"; then
11403       with_gnu_ld=no
11404     fi
11405     ;;
11406   interix*)
11407     # we just hope/assume this is gcc and not c89 (= MSVC++)
11408     with_gnu_ld=yes
11409     ;;
11410   openbsd* | bitrig*)
11411     with_gnu_ld=no
11412     ;;
11413   esac
11414
11415   ld_shlibs=yes
11416
11417   # On some targets, GNU ld is compatible enough with the native linker
11418   # that we're better off using the native interface for both.
11419   lt_use_gnu_ld_interface=no
11420   if test yes = "$with_gnu_ld"; then
11421     case $host_os in
11422       aix*)
11423         # The AIX port of GNU ld has always aspired to compatibility
11424         # with the native linker.  However, as the warning in the GNU ld
11425         # block says, versions before 2.19.5* couldn't really create working
11426         # shared libraries, regardless of the interface used.
11427         case `$LD -v 2>&1` in
11428           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11429           *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11430           *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11431           *)
11432             lt_use_gnu_ld_interface=yes
11433             ;;
11434         esac
11435         ;;
11436       *)
11437         lt_use_gnu_ld_interface=yes
11438         ;;
11439     esac
11440   fi
11441
11442   if test yes = "$lt_use_gnu_ld_interface"; then
11443     # If archive_cmds runs LD, not CC, wlarc should be empty
11444     wlarc='$wl'
11445
11446     # Set some defaults for GNU ld with shared library support. These
11447     # are reset later if shared libraries are not supported. Putting them
11448     # here allows them to be overridden if necessary.
11449     runpath_var=LD_RUN_PATH
11450     hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11451     export_dynamic_flag_spec='$wl--export-dynamic'
11452     # ancient GNU ld didn't support --whole-archive et. al.
11453     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11454       whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11455     else
11456       whole_archive_flag_spec=
11457     fi
11458     supports_anon_versioning=no
11459     case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11460       *GNU\ gold*) supports_anon_versioning=yes ;;
11461       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11462       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11463       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11464       *\ 2.11.*) ;; # other 2.11 versions
11465       *) supports_anon_versioning=yes ;;
11466     esac
11467
11468     # See if GNU ld supports shared libraries.
11469     case $host_os in
11470     aix[3-9]*)
11471       # On AIX/PPC, the GNU linker is very broken
11472       if test ia64 != "$host_cpu"; then
11473         ld_shlibs=no
11474         cat <<_LT_EOF 1>&2
11475
11476 *** Warning: the GNU linker, at least up to release 2.19, is reported
11477 *** to be unable to reliably create shared libraries on AIX.
11478 *** Therefore, libtool is disabling shared libraries support.  If you
11479 *** really care for shared libraries, you may want to install binutils
11480 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11481 *** You will then need to restart the configuration process.
11482
11483 _LT_EOF
11484       fi
11485       ;;
11486
11487     amigaos*)
11488       case $host_cpu in
11489       powerpc)
11490             # see comment about AmigaOS4 .so support
11491             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11492             archive_expsym_cmds=''
11493         ;;
11494       m68k)
11495             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)'
11496             hardcode_libdir_flag_spec='-L$libdir'
11497             hardcode_minus_L=yes
11498         ;;
11499       esac
11500       ;;
11501
11502     beos*)
11503       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11504         allow_undefined_flag=unsupported
11505         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11506         # support --undefined.  This deserves some investigation.  FIXME
11507         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11508       else
11509         ld_shlibs=no
11510       fi
11511       ;;
11512
11513     cygwin* | mingw* | pw32* | cegcc*)
11514       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11515       # as there is no search path for DLLs.
11516       hardcode_libdir_flag_spec='-L$libdir'
11517       export_dynamic_flag_spec='$wl--export-all-symbols'
11518       allow_undefined_flag=unsupported
11519       always_export_symbols=no
11520       enable_shared_with_static_runtimes=yes
11521       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'
11522       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11523
11524       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11525         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11526         # If the export-symbols file already is a .def file, use it as
11527         # is; otherwise, prepend EXPORTS...
11528         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11529           cp $export_symbols $output_objdir/$soname.def;
11530         else
11531           echo EXPORTS > $output_objdir/$soname.def;
11532           cat $export_symbols >> $output_objdir/$soname.def;
11533         fi~
11534         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11535       else
11536         ld_shlibs=no
11537       fi
11538       ;;
11539
11540     haiku*)
11541       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11542       link_all_deplibs=yes
11543       ;;
11544
11545     os2*)
11546       hardcode_libdir_flag_spec='-L$libdir'
11547       hardcode_minus_L=yes
11548       allow_undefined_flag=unsupported
11549       shrext_cmds=.dll
11550       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11551         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11552         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11553         $ECHO EXPORTS >> $output_objdir/$libname.def~
11554         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11555         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11556         emximp -o $lib $output_objdir/$libname.def'
11557       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11558         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11559         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11560         $ECHO EXPORTS >> $output_objdir/$libname.def~
11561         prefix_cmds="$SED"~
11562         if test EXPORTS = "`$SED 1q $export_symbols`"; then
11563           prefix_cmds="$prefix_cmds -e 1d";
11564         fi~
11565         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11566         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11567         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11568         emximp -o $lib $output_objdir/$libname.def'
11569       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11570       enable_shared_with_static_runtimes=yes
11571       ;;
11572
11573     interix[3-9]*)
11574       hardcode_direct=no
11575       hardcode_shlibpath_var=no
11576       hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11577       export_dynamic_flag_spec='$wl-E'
11578       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11579       # Instead, shared libraries are loaded at an image base (0x10000000 by
11580       # default) and relocated if they conflict, which is a slow very memory
11581       # consuming and fragmenting process.  To avoid this, we pick a random,
11582       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11583       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11584       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11585       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'
11586       ;;
11587
11588     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11589       tmp_diet=no
11590       if test linux-dietlibc = "$host_os"; then
11591         case $cc_basename in
11592           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
11593         esac
11594       fi
11595       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11596          && test no = "$tmp_diet"
11597       then
11598         tmp_addflag=' $pic_flag'
11599         tmp_sharedflag='-shared'
11600         case $cc_basename,$host_cpu in
11601         pgcc*)                          # Portland Group C compiler
11602           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'
11603           tmp_addflag=' $pic_flag'
11604           ;;
11605         pgf77* | pgf90* | pgf95* | pgfortran*)
11606                                         # Portland Group f77 and f90 compilers
11607           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'
11608           tmp_addflag=' $pic_flag -Mnomain' ;;
11609         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
11610           tmp_addflag=' -i_dynamic' ;;
11611         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
11612           tmp_addflag=' -i_dynamic -nofor_main' ;;
11613         ifc* | ifort*)                  # Intel Fortran compiler
11614           tmp_addflag=' -nofor_main' ;;
11615         lf95*)                          # Lahey Fortran 8.1
11616           whole_archive_flag_spec=
11617           tmp_sharedflag='--shared' ;;
11618         nagfor*)                        # NAGFOR 5.3
11619           tmp_sharedflag='-Wl,-shared' ;;
11620         xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11621           tmp_sharedflag='-qmkshrobj'
11622           tmp_addflag= ;;
11623         nvcc*)  # Cuda Compiler Driver 2.2
11624           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'
11625           compiler_needs_object=yes
11626           ;;
11627         esac
11628         case `$CC -V 2>&1 | sed 5q` in
11629         *Sun\ C*)                       # Sun C 5.9
11630           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'
11631           compiler_needs_object=yes
11632           tmp_sharedflag='-G' ;;
11633         *Sun\ F*)                       # Sun Fortran 8.3
11634           tmp_sharedflag='-G' ;;
11635         esac
11636         archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11637
11638         if test yes = "$supports_anon_versioning"; then
11639           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11640             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11641             echo "local: *; };" >> $output_objdir/$libname.ver~
11642             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11643         fi
11644
11645         case $cc_basename in
11646         tcc*)
11647           export_dynamic_flag_spec='-rdynamic'
11648           ;;
11649         xlf* | bgf* | bgxlf* | mpixlf*)
11650           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11651           whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11652           hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11653           archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11654           if test yes = "$supports_anon_versioning"; then
11655             archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11656               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11657               echo "local: *; };" >> $output_objdir/$libname.ver~
11658               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11659           fi
11660           ;;
11661         esac
11662       else
11663         ld_shlibs=no
11664       fi
11665       ;;
11666
11667     netbsd*)
11668       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11669         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11670         wlarc=
11671       else
11672         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11673         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11674       fi
11675       ;;
11676
11677     solaris*)
11678       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11679         ld_shlibs=no
11680         cat <<_LT_EOF 1>&2
11681
11682 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
11683 *** create shared libraries on Solaris systems.  Therefore, libtool
11684 *** is disabling shared libraries support.  We urge you to upgrade GNU
11685 *** binutils to release 2.9.1 or newer.  Another option is to modify
11686 *** your PATH or compiler configuration so that the native linker is
11687 *** used, and then restart.
11688
11689 _LT_EOF
11690       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11691         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11692         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11693       else
11694         ld_shlibs=no
11695       fi
11696       ;;
11697
11698     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11699       case `$LD -v 2>&1` in
11700         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11701         ld_shlibs=no
11702         cat <<_LT_EOF 1>&2
11703
11704 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11705 *** reliably create shared libraries on SCO systems.  Therefore, libtool
11706 *** is disabling shared libraries support.  We urge you to upgrade GNU
11707 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11708 *** your PATH or compiler configuration so that the native linker is
11709 *** used, and then restart.
11710
11711 _LT_EOF
11712         ;;
11713         *)
11714           # For security reasons, it is highly recommended that you always
11715           # use absolute paths for naming shared libraries, and exclude the
11716           # DT_RUNPATH tag from executables and libraries.  But doing so
11717           # requires that you compile everything twice, which is a pain.
11718           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11719             hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11720             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11721             archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11722           else
11723             ld_shlibs=no
11724           fi
11725         ;;
11726       esac
11727       ;;
11728
11729     sunos4*)
11730       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11731       wlarc=
11732       hardcode_direct=yes
11733       hardcode_shlibpath_var=no
11734       ;;
11735
11736     *)
11737       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11738         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11739         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11740       else
11741         ld_shlibs=no
11742       fi
11743       ;;
11744     esac
11745
11746     if test no = "$ld_shlibs"; then
11747       runpath_var=
11748       hardcode_libdir_flag_spec=
11749       export_dynamic_flag_spec=
11750       whole_archive_flag_spec=
11751     fi
11752   else
11753     # PORTME fill in a description of your system's linker (not GNU ld)
11754     case $host_os in
11755     aix3*)
11756       allow_undefined_flag=unsupported
11757       always_export_symbols=yes
11758       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'
11759       # Note: this linker hardcodes the directories in LIBPATH if there
11760       # are no directories specified by -L.
11761       hardcode_minus_L=yes
11762       if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11763         # Neither direct hardcoding nor static linking is supported with a
11764         # broken collect2.
11765         hardcode_direct=unsupported
11766       fi
11767       ;;
11768
11769     aix[4-9]*)
11770       if test ia64 = "$host_cpu"; then
11771         # On IA64, the linker does run time linking by default, so we don't
11772         # have to do anything special.
11773         aix_use_runtimelinking=no
11774         exp_sym_flag='-Bexport'
11775         no_entry_flag=
11776       else
11777         # If we're using GNU nm, then we don't want the "-C" option.
11778         # -C means demangle to GNU nm, but means don't demangle to AIX nm.
11779         # Without the "-l" option, or with the "-B" option, AIX nm treats
11780         # weak defined symbols like other global defined symbols, whereas
11781         # GNU nm marks them as "W".
11782         # While the 'weak' keyword is ignored in the Export File, we need
11783         # it in the Import File for the 'aix-soname' feature, so we have
11784         # to replace the "-B" option with "-P" for AIX nm.
11785         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11786           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'
11787         else
11788           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'
11789         fi
11790         aix_use_runtimelinking=no
11791
11792         # Test if we are trying to use run time linking or normal
11793         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
11794         # have runtime linking enabled, and use it for executables.
11795         # For shared libraries, we enable/disable runtime linking
11796         # depending on the kind of the shared library created -
11797         # when "with_aix_soname,aix_use_runtimelinking" is:
11798         # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
11799         # "aix,yes"  lib.so          shared, rtl:yes, for executables
11800         #            lib.a           static archive
11801         # "both,no"  lib.so.V(shr.o) shared, rtl:yes
11802         #            lib.a(lib.so.V) shared, rtl:no,  for executables
11803         # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11804         #            lib.a(lib.so.V) shared, rtl:no
11805         # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
11806         #            lib.a           static archive
11807         case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11808           for ld_flag in $LDFLAGS; do
11809           if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11810             aix_use_runtimelinking=yes
11811             break
11812           fi
11813           done
11814           if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11815             # With aix-soname=svr4, we create the lib.so.V shared archives only,
11816             # so we don't have lib.a shared libs to link our executables.
11817             # We have to force runtime linking in this case.
11818             aix_use_runtimelinking=yes
11819             LDFLAGS="$LDFLAGS -Wl,-brtl"
11820           fi
11821           ;;
11822         esac
11823
11824         exp_sym_flag='-bexport'
11825         no_entry_flag='-bnoentry'
11826       fi
11827
11828       # When large executables or shared objects are built, AIX ld can
11829       # have problems creating the table of contents.  If linking a library
11830       # or program results in "error TOC overflow" add -mminimal-toc to
11831       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11832       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11833
11834       archive_cmds=''
11835       hardcode_direct=yes
11836       hardcode_direct_absolute=yes
11837       hardcode_libdir_separator=':'
11838       link_all_deplibs=yes
11839       file_list_spec='$wl-f,'
11840       case $with_aix_soname,$aix_use_runtimelinking in
11841       aix,*) ;; # traditional, no import file
11842       svr4,* | *,yes) # use import file
11843         # The Import File defines what to hardcode.
11844         hardcode_direct=no
11845         hardcode_direct_absolute=no
11846         ;;
11847       esac
11848
11849       if test yes = "$GCC"; then
11850         case $host_os in aix4.[012]|aix4.[012].*)
11851         # We only want to do this on AIX 4.2 and lower, the check
11852         # below for broken collect2 doesn't work under 4.3+
11853           collect2name=`$CC -print-prog-name=collect2`
11854           if test -f "$collect2name" &&
11855            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
11856           then
11857           # We have reworked collect2
11858           :
11859           else
11860           # We have old collect2
11861           hardcode_direct=unsupported
11862           # It fails to find uninstalled libraries when the uninstalled
11863           # path is not listed in the libpath.  Setting hardcode_minus_L
11864           # to unsupported forces relinking
11865           hardcode_minus_L=yes
11866           hardcode_libdir_flag_spec='-L$libdir'
11867           hardcode_libdir_separator=
11868           fi
11869           ;;
11870         esac
11871         shared_flag='-shared'
11872         if test yes = "$aix_use_runtimelinking"; then
11873           shared_flag="$shared_flag "'$wl-G'
11874         fi
11875         # Need to ensure runtime linking is disabled for the traditional
11876         # shared library, or the linker may eventually find shared libraries
11877         # /with/ Import File - we do not want to mix them.
11878         shared_flag_aix='-shared'
11879         shared_flag_svr4='-shared $wl-G'
11880       else
11881         # not using gcc
11882         if test ia64 = "$host_cpu"; then
11883         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11884         # chokes on -Wl,-G. The following line is correct:
11885           shared_flag='-G'
11886         else
11887           if test yes = "$aix_use_runtimelinking"; then
11888             shared_flag='$wl-G'
11889           else
11890             shared_flag='$wl-bM:SRE'
11891           fi
11892           shared_flag_aix='$wl-bM:SRE'
11893           shared_flag_svr4='$wl-G'
11894         fi
11895       fi
11896
11897       export_dynamic_flag_spec='$wl-bexpall'
11898       # It seems that -bexpall does not export symbols beginning with
11899       # underscore (_), so it is better to generate a list of symbols to export.
11900       always_export_symbols=yes
11901       if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
11902         # Warning - without using the other runtime loading flags (-brtl),
11903         # -berok will link without error, but may produce a broken library.
11904         allow_undefined_flag='-berok'
11905         # Determine the default libpath from the value encoded in an
11906         # empty executable.
11907         if test set = "${lt_cv_aix_libpath+set}"; then
11908   aix_libpath=$lt_cv_aix_libpath
11909 else
11910   if ${lt_cv_aix_libpath_+:} false; then :
11911   $as_echo_n "(cached) " >&6
11912 else
11913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11914 /* end confdefs.h.  */
11915
11916 int
11917 main ()
11918 {
11919
11920   ;
11921   return 0;
11922 }
11923 _ACEOF
11924 if ac_fn_c_try_link "$LINENO"; then :
11925
11926   lt_aix_libpath_sed='
11927       /Import File Strings/,/^$/ {
11928           /^0/ {
11929               s/^0  *\([^ ]*\) *$/\1/
11930               p
11931           }
11932       }'
11933   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11934   # Check for a 64-bit object if we didn't find anything.
11935   if test -z "$lt_cv_aix_libpath_"; then
11936     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11937   fi
11938 fi
11939 rm -f core conftest.err conftest.$ac_objext \
11940     conftest$ac_exeext conftest.$ac_ext
11941   if test -z "$lt_cv_aix_libpath_"; then
11942     lt_cv_aix_libpath_=/usr/lib:/lib
11943   fi
11944
11945 fi
11946
11947   aix_libpath=$lt_cv_aix_libpath_
11948 fi
11949
11950         hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
11951         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
11952       else
11953         if test ia64 = "$host_cpu"; then
11954           hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
11955           allow_undefined_flag="-z nodefs"
11956           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"
11957         else
11958          # Determine the default libpath from the value encoded in an
11959          # empty executable.
11960          if test set = "${lt_cv_aix_libpath+set}"; then
11961   aix_libpath=$lt_cv_aix_libpath
11962 else
11963   if ${lt_cv_aix_libpath_+:} false; then :
11964   $as_echo_n "(cached) " >&6
11965 else
11966   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11967 /* end confdefs.h.  */
11968
11969 int
11970 main ()
11971 {
11972
11973   ;
11974   return 0;
11975 }
11976 _ACEOF
11977 if ac_fn_c_try_link "$LINENO"; then :
11978
11979   lt_aix_libpath_sed='
11980       /Import File Strings/,/^$/ {
11981           /^0/ {
11982               s/^0  *\([^ ]*\) *$/\1/
11983               p
11984           }
11985       }'
11986   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11987   # Check for a 64-bit object if we didn't find anything.
11988   if test -z "$lt_cv_aix_libpath_"; then
11989     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11990   fi
11991 fi
11992 rm -f core conftest.err conftest.$ac_objext \
11993     conftest$ac_exeext conftest.$ac_ext
11994   if test -z "$lt_cv_aix_libpath_"; then
11995     lt_cv_aix_libpath_=/usr/lib:/lib
11996   fi
11997
11998 fi
11999
12000   aix_libpath=$lt_cv_aix_libpath_
12001 fi
12002
12003          hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12004           # Warning - without using the other run time loading flags,
12005           # -berok will link without error, but may produce a broken library.
12006           no_undefined_flag=' $wl-bernotok'
12007           allow_undefined_flag=' $wl-berok'
12008           if test yes = "$with_gnu_ld"; then
12009             # We only use this code for GNU lds that support --whole-archive.
12010             whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
12011           else
12012             # Exported symbols can be pulled into shared objects from archives
12013             whole_archive_flag_spec='$convenience'
12014           fi
12015           archive_cmds_need_lc=yes
12016           archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
12017           # -brtl affects multiple linker settings, -berok does not and is overridden later
12018           compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
12019           if test svr4 != "$with_aix_soname"; then
12020             # This is similar to how AIX traditionally builds its shared libraries.
12021             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'
12022           fi
12023           if test aix != "$with_aix_soname"; then
12024             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'
12025           else
12026             # used by -dlpreopen to get the symbols
12027             archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
12028           fi
12029           archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
12030         fi
12031       fi
12032       ;;
12033
12034     amigaos*)
12035       case $host_cpu in
12036       powerpc)
12037             # see comment about AmigaOS4 .so support
12038             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12039             archive_expsym_cmds=''
12040         ;;
12041       m68k)
12042             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)'
12043             hardcode_libdir_flag_spec='-L$libdir'
12044             hardcode_minus_L=yes
12045         ;;
12046       esac
12047       ;;
12048
12049     bsdi[45]*)
12050       export_dynamic_flag_spec=-rdynamic
12051       ;;
12052
12053     cygwin* | mingw* | pw32* | cegcc*)
12054       # When not using gcc, we currently assume that we are using
12055       # Microsoft Visual C++.
12056       # hardcode_libdir_flag_spec is actually meaningless, as there is
12057       # no search path for DLLs.
12058       case $cc_basename in
12059       cl*)
12060         # Native MSVC
12061         hardcode_libdir_flag_spec=' '
12062         allow_undefined_flag=unsupported
12063         always_export_symbols=yes
12064         file_list_spec='@'
12065         # Tell ltmain to make .lib files, not .a files.
12066         libext=lib
12067         # Tell ltmain to make .dll files, not .so files.
12068         shrext_cmds=.dll
12069         # FIXME: Setting linknames here is a bad hack.
12070         archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
12071         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12072             cp "$export_symbols" "$output_objdir/$soname.def";
12073             echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
12074           else
12075             $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
12076           fi~
12077           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12078           linknames='
12079         # The linker will not automatically build a static lib if we build a DLL.
12080         # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12081         enable_shared_with_static_runtimes=yes
12082         exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
12083         export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12084         # Don't use ranlib
12085         old_postinstall_cmds='chmod 644 $oldlib'
12086         postlink_cmds='lt_outputfile="@OUTPUT@"~
12087           lt_tool_outputfile="@TOOL_OUTPUT@"~
12088           case $lt_outputfile in
12089             *.exe|*.EXE) ;;
12090             *)
12091               lt_outputfile=$lt_outputfile.exe
12092               lt_tool_outputfile=$lt_tool_outputfile.exe
12093               ;;
12094           esac~
12095           if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
12096             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12097             $RM "$lt_outputfile.manifest";
12098           fi'
12099         ;;
12100       *)
12101         # Assume MSVC wrapper
12102         hardcode_libdir_flag_spec=' '
12103         allow_undefined_flag=unsupported
12104         # Tell ltmain to make .lib files, not .a files.
12105         libext=lib
12106         # Tell ltmain to make .dll files, not .so files.
12107         shrext_cmds=.dll
12108         # FIXME: Setting linknames here is a bad hack.
12109         archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12110         # The linker will automatically build a .lib file if we build a DLL.
12111         old_archive_from_new_cmds='true'
12112         # FIXME: Should let the user specify the lib program.
12113         old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12114         enable_shared_with_static_runtimes=yes
12115         ;;
12116       esac
12117       ;;
12118
12119     darwin* | rhapsody*)
12120
12121
12122   archive_cmds_need_lc=no
12123   hardcode_direct=no
12124   hardcode_automatic=yes
12125   hardcode_shlibpath_var=unsupported
12126   if test yes = "$lt_cv_ld_force_load"; then
12127     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\"`'
12128
12129   else
12130     whole_archive_flag_spec=''
12131   fi
12132   link_all_deplibs=yes
12133   allow_undefined_flag=$_lt_dar_allow_undefined
12134   case $cc_basename in
12135      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
12136      *) _lt_dar_can_shared=$GCC ;;
12137   esac
12138   if test yes = "$_lt_dar_can_shared"; then
12139     output_verbose_link_cmd=func_echo_all
12140     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
12141     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
12142     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"
12143     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"
12144
12145   else
12146   ld_shlibs=no
12147   fi
12148
12149       ;;
12150
12151     dgux*)
12152       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12153       hardcode_libdir_flag_spec='-L$libdir'
12154       hardcode_shlibpath_var=no
12155       ;;
12156
12157     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12158     # support.  Future versions do this automatically, but an explicit c++rt0.o
12159     # does not break anything, and helps significantly (at the cost of a little
12160     # extra space).
12161     freebsd2.2*)
12162       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12163       hardcode_libdir_flag_spec='-R$libdir'
12164       hardcode_direct=yes
12165       hardcode_shlibpath_var=no
12166       ;;
12167
12168     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12169     freebsd2.*)
12170       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12171       hardcode_direct=yes
12172       hardcode_minus_L=yes
12173       hardcode_shlibpath_var=no
12174       ;;
12175
12176     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12177     freebsd* | dragonfly*)
12178       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12179       hardcode_libdir_flag_spec='-R$libdir'
12180       hardcode_direct=yes
12181       hardcode_shlibpath_var=no
12182       ;;
12183
12184     hpux9*)
12185       if test yes = "$GCC"; then
12186         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'
12187       else
12188         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'
12189       fi
12190       hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12191       hardcode_libdir_separator=:
12192       hardcode_direct=yes
12193
12194       # hardcode_minus_L: Not really in the search PATH,
12195       # but as the default location of the library.
12196       hardcode_minus_L=yes
12197       export_dynamic_flag_spec='$wl-E'
12198       ;;
12199
12200     hpux10*)
12201       if test yes,no = "$GCC,$with_gnu_ld"; then
12202         archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12203       else
12204         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12205       fi
12206       if test no = "$with_gnu_ld"; then
12207         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12208         hardcode_libdir_separator=:
12209         hardcode_direct=yes
12210         hardcode_direct_absolute=yes
12211         export_dynamic_flag_spec='$wl-E'
12212         # hardcode_minus_L: Not really in the search PATH,
12213         # but as the default location of the library.
12214         hardcode_minus_L=yes
12215       fi
12216       ;;
12217
12218     hpux11*)
12219       if test yes,no = "$GCC,$with_gnu_ld"; then
12220         case $host_cpu in
12221         hppa*64*)
12222           archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12223           ;;
12224         ia64*)
12225           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12226           ;;
12227         *)
12228           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12229           ;;
12230         esac
12231       else
12232         case $host_cpu in
12233         hppa*64*)
12234           archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12235           ;;
12236         ia64*)
12237           archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12238           ;;
12239         *)
12240
12241           # Older versions of the 11.00 compiler do not understand -b yet
12242           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12243           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12244 $as_echo_n "checking if $CC understands -b... " >&6; }
12245 if ${lt_cv_prog_compiler__b+:} false; then :
12246   $as_echo_n "(cached) " >&6
12247 else
12248   lt_cv_prog_compiler__b=no
12249    save_LDFLAGS=$LDFLAGS
12250    LDFLAGS="$LDFLAGS -b"
12251    echo "$lt_simple_link_test_code" > conftest.$ac_ext
12252    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12253      # The linker can only warn and ignore the option if not recognized
12254      # So say no if there are warnings
12255      if test -s conftest.err; then
12256        # Append any errors to the config.log.
12257        cat conftest.err 1>&5
12258        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12259        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12260        if diff conftest.exp conftest.er2 >/dev/null; then
12261          lt_cv_prog_compiler__b=yes
12262        fi
12263      else
12264        lt_cv_prog_compiler__b=yes
12265      fi
12266    fi
12267    $RM -r conftest*
12268    LDFLAGS=$save_LDFLAGS
12269
12270 fi
12271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12272 $as_echo "$lt_cv_prog_compiler__b" >&6; }
12273
12274 if test yes = "$lt_cv_prog_compiler__b"; then
12275     archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12276 else
12277     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12278 fi
12279
12280           ;;
12281         esac
12282       fi
12283       if test no = "$with_gnu_ld"; then
12284         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12285         hardcode_libdir_separator=:
12286
12287         case $host_cpu in
12288         hppa*64*|ia64*)
12289           hardcode_direct=no
12290           hardcode_shlibpath_var=no
12291           ;;
12292         *)
12293           hardcode_direct=yes
12294           hardcode_direct_absolute=yes
12295           export_dynamic_flag_spec='$wl-E'
12296
12297           # hardcode_minus_L: Not really in the search PATH,
12298           # but as the default location of the library.
12299           hardcode_minus_L=yes
12300           ;;
12301         esac
12302       fi
12303       ;;
12304
12305     irix5* | irix6* | nonstopux*)
12306       if test yes = "$GCC"; then
12307         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'
12308         # Try to use the -exported_symbol ld option, if it does not
12309         # work, assume that -exports_file does not work either and
12310         # implicitly export all symbols.
12311         # This should be the same for all languages, so no per-tag cache variable.
12312         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12313 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12314 if ${lt_cv_irix_exported_symbol+:} false; then :
12315   $as_echo_n "(cached) " >&6
12316 else
12317   save_LDFLAGS=$LDFLAGS
12318            LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12319            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12320 /* end confdefs.h.  */
12321 int foo (void) { return 0; }
12322 _ACEOF
12323 if ac_fn_c_try_link "$LINENO"; then :
12324   lt_cv_irix_exported_symbol=yes
12325 else
12326   lt_cv_irix_exported_symbol=no
12327 fi
12328 rm -f core conftest.err conftest.$ac_objext \
12329     conftest$ac_exeext conftest.$ac_ext
12330            LDFLAGS=$save_LDFLAGS
12331 fi
12332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12333 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
12334         if test yes = "$lt_cv_irix_exported_symbol"; then
12335           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'
12336         fi
12337       else
12338         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'
12339         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'
12340       fi
12341       archive_cmds_need_lc='no'
12342       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12343       hardcode_libdir_separator=:
12344       inherit_rpath=yes
12345       link_all_deplibs=yes
12346       ;;
12347
12348     linux*)
12349       case $cc_basename in
12350       tcc*)
12351         # Fabrice Bellard et al's Tiny C Compiler
12352         ld_shlibs=yes
12353         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12354         ;;
12355       esac
12356       ;;
12357
12358     netbsd*)
12359       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12360         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12361       else
12362         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12363       fi
12364       hardcode_libdir_flag_spec='-R$libdir'
12365       hardcode_direct=yes
12366       hardcode_shlibpath_var=no
12367       ;;
12368
12369     newsos6)
12370       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12371       hardcode_direct=yes
12372       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12373       hardcode_libdir_separator=:
12374       hardcode_shlibpath_var=no
12375       ;;
12376
12377     *nto* | *qnx*)
12378       ;;
12379
12380     openbsd* | bitrig*)
12381       if test -f /usr/libexec/ld.so; then
12382         hardcode_direct=yes
12383         hardcode_shlibpath_var=no
12384         hardcode_direct_absolute=yes
12385         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12386           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12387           archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12388           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12389           export_dynamic_flag_spec='$wl-E'
12390         else
12391           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12392           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12393         fi
12394       else
12395         ld_shlibs=no
12396       fi
12397       ;;
12398
12399     os2*)
12400       hardcode_libdir_flag_spec='-L$libdir'
12401       hardcode_minus_L=yes
12402       allow_undefined_flag=unsupported
12403       shrext_cmds=.dll
12404       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12405         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12406         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12407         $ECHO EXPORTS >> $output_objdir/$libname.def~
12408         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12409         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12410         emximp -o $lib $output_objdir/$libname.def'
12411       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12412         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12413         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12414         $ECHO EXPORTS >> $output_objdir/$libname.def~
12415         prefix_cmds="$SED"~
12416         if test EXPORTS = "`$SED 1q $export_symbols`"; then
12417           prefix_cmds="$prefix_cmds -e 1d";
12418         fi~
12419         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12420         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12421         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12422         emximp -o $lib $output_objdir/$libname.def'
12423       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12424       enable_shared_with_static_runtimes=yes
12425       ;;
12426
12427     osf3*)
12428       if test yes = "$GCC"; then
12429         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12430         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'
12431       else
12432         allow_undefined_flag=' -expect_unresolved \*'
12433         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'
12434       fi
12435       archive_cmds_need_lc='no'
12436       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12437       hardcode_libdir_separator=:
12438       ;;
12439
12440     osf4* | osf5*)      # as osf3* with the addition of -msym flag
12441       if test yes = "$GCC"; then
12442         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12443         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'
12444         hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12445       else
12446         allow_undefined_flag=' -expect_unresolved \*'
12447         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'
12448         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~
12449           $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'
12450
12451         # Both c and cxx compiler support -rpath directly
12452         hardcode_libdir_flag_spec='-rpath $libdir'
12453       fi
12454       archive_cmds_need_lc='no'
12455       hardcode_libdir_separator=:
12456       ;;
12457
12458     solaris*)
12459       no_undefined_flag=' -z defs'
12460       if test yes = "$GCC"; then
12461         wlarc='$wl'
12462         archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12463         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12464           $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'
12465       else
12466         case `$CC -V 2>&1` in
12467         *"Compilers 5.0"*)
12468           wlarc=''
12469           archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12470           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12471             $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12472           ;;
12473         *)
12474           wlarc='$wl'
12475           archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12476           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12477             $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12478           ;;
12479         esac
12480       fi
12481       hardcode_libdir_flag_spec='-R$libdir'
12482       hardcode_shlibpath_var=no
12483       case $host_os in
12484       solaris2.[0-5] | solaris2.[0-5].*) ;;
12485       *)
12486         # The compiler driver will combine and reorder linker options,
12487         # but understands '-z linker_flag'.  GCC discards it without '$wl',
12488         # but is careful enough not to reorder.
12489         # Supported since Solaris 2.6 (maybe 2.5.1?)
12490         if test yes = "$GCC"; then
12491           whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12492         else
12493           whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12494         fi
12495         ;;
12496       esac
12497       link_all_deplibs=yes
12498       ;;
12499
12500     sunos4*)
12501       if test sequent = "$host_vendor"; then
12502         # Use $CC to link under sequent, because it throws in some extra .o
12503         # files that make .init and .fini sections work.
12504         archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12505       else
12506         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12507       fi
12508       hardcode_libdir_flag_spec='-L$libdir'
12509       hardcode_direct=yes
12510       hardcode_minus_L=yes
12511       hardcode_shlibpath_var=no
12512       ;;
12513
12514     sysv4)
12515       case $host_vendor in
12516         sni)
12517           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12518           hardcode_direct=yes # is this really true???
12519         ;;
12520         siemens)
12521           ## LD is ld it makes a PLAMLIB
12522           ## CC just makes a GrossModule.
12523           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12524           reload_cmds='$CC -r -o $output$reload_objs'
12525           hardcode_direct=no
12526         ;;
12527         motorola)
12528           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12529           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12530         ;;
12531       esac
12532       runpath_var='LD_RUN_PATH'
12533       hardcode_shlibpath_var=no
12534       ;;
12535
12536     sysv4.3*)
12537       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12538       hardcode_shlibpath_var=no
12539       export_dynamic_flag_spec='-Bexport'
12540       ;;
12541
12542     sysv4*MP*)
12543       if test -d /usr/nec; then
12544         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12545         hardcode_shlibpath_var=no
12546         runpath_var=LD_RUN_PATH
12547         hardcode_runpath_var=yes
12548         ld_shlibs=yes
12549       fi
12550       ;;
12551
12552     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12553       no_undefined_flag='$wl-z,text'
12554       archive_cmds_need_lc=no
12555       hardcode_shlibpath_var=no
12556       runpath_var='LD_RUN_PATH'
12557
12558       if test yes = "$GCC"; then
12559         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12560         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12561       else
12562         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12563         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12564       fi
12565       ;;
12566
12567     sysv5* | sco3.2v5* | sco5v6*)
12568       # Note: We CANNOT use -z defs as we might desire, because we do not
12569       # link with -lc, and that would cause any symbols used from libc to
12570       # always be unresolved, which means just about no library would
12571       # ever link correctly.  If we're not using GNU ld we use -z text
12572       # though, which does catch some bad symbols but isn't as heavy-handed
12573       # as -z defs.
12574       no_undefined_flag='$wl-z,text'
12575       allow_undefined_flag='$wl-z,nodefs'
12576       archive_cmds_need_lc=no
12577       hardcode_shlibpath_var=no
12578       hardcode_libdir_flag_spec='$wl-R,$libdir'
12579       hardcode_libdir_separator=':'
12580       link_all_deplibs=yes
12581       export_dynamic_flag_spec='$wl-Bexport'
12582       runpath_var='LD_RUN_PATH'
12583
12584       if test yes = "$GCC"; then
12585         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12586         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12587       else
12588         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12589         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12590       fi
12591       ;;
12592
12593     uts4*)
12594       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12595       hardcode_libdir_flag_spec='-L$libdir'
12596       hardcode_shlibpath_var=no
12597       ;;
12598
12599     *)
12600       ld_shlibs=no
12601       ;;
12602     esac
12603
12604     if test sni = "$host_vendor"; then
12605       case $host in
12606       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12607         export_dynamic_flag_spec='$wl-Blargedynsym'
12608         ;;
12609       esac
12610     fi
12611   fi
12612
12613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12614 $as_echo "$ld_shlibs" >&6; }
12615 test no = "$ld_shlibs" && can_build_shared=no
12616
12617 with_gnu_ld=$with_gnu_ld
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633 #
12634 # Do we need to explicitly link libc?
12635 #
12636 case "x$archive_cmds_need_lc" in
12637 x|xyes)
12638   # Assume -lc should be added
12639   archive_cmds_need_lc=yes
12640
12641   if test yes,yes = "$GCC,$enable_shared"; then
12642     case $archive_cmds in
12643     *'~'*)
12644       # FIXME: we may have to deal with multi-command sequences.
12645       ;;
12646     '$CC '*)
12647       # Test whether the compiler implicitly links with -lc since on some
12648       # systems, -lgcc has to come before -lc. If gcc already passes -lc
12649       # to ld, don't add -lc before -lgcc.
12650       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12651 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12652 if ${lt_cv_archive_cmds_need_lc+:} false; then :
12653   $as_echo_n "(cached) " >&6
12654 else
12655   $RM conftest*
12656         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12657
12658         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12659   (eval $ac_compile) 2>&5
12660   ac_status=$?
12661   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12662   test $ac_status = 0; } 2>conftest.err; then
12663           soname=conftest
12664           lib=conftest
12665           libobjs=conftest.$ac_objext
12666           deplibs=
12667           wl=$lt_prog_compiler_wl
12668           pic_flag=$lt_prog_compiler_pic
12669           compiler_flags=-v
12670           linker_flags=-v
12671           verstring=
12672           output_objdir=.
12673           libname=conftest
12674           lt_save_allow_undefined_flag=$allow_undefined_flag
12675           allow_undefined_flag=
12676           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12677   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12678   ac_status=$?
12679   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12680   test $ac_status = 0; }
12681           then
12682             lt_cv_archive_cmds_need_lc=no
12683           else
12684             lt_cv_archive_cmds_need_lc=yes
12685           fi
12686           allow_undefined_flag=$lt_save_allow_undefined_flag
12687         else
12688           cat conftest.err 1>&5
12689         fi
12690         $RM conftest*
12691
12692 fi
12693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12694 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12695       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12696       ;;
12697     esac
12698   fi
12699   ;;
12700 esac
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
12848
12849
12850
12851
12852
12853   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12854 $as_echo_n "checking dynamic linker characteristics... " >&6; }
12855
12856 if test yes = "$GCC"; then
12857   case $host_os in
12858     darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
12859     *) lt_awk_arg='/^libraries:/' ;;
12860   esac
12861   case $host_os in
12862     mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
12863     *) lt_sed_strip_eq='s|=/|/|g' ;;
12864   esac
12865   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
12866   case $lt_search_path_spec in
12867   *\;*)
12868     # if the path contains ";" then we assume it to be the separator
12869     # otherwise default to the standard path separator (i.e. ":") - it is
12870     # assumed that no part of a normal pathname contains ";" but that should
12871     # okay in the real world where ";" in dirpaths is itself problematic.
12872     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
12873     ;;
12874   *)
12875     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
12876     ;;
12877   esac
12878   # Ok, now we have the path, separated by spaces, we can step through it
12879   # and add multilib dir if necessary...
12880   lt_tmp_lt_search_path_spec=
12881   lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
12882   # ...but if some path component already ends with the multilib dir we assume
12883   # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
12884   case "$lt_multi_os_dir; $lt_search_path_spec " in
12885   "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
12886     lt_multi_os_dir=
12887     ;;
12888   esac
12889   for lt_sys_path in $lt_search_path_spec; do
12890     if test -d "$lt_sys_path$lt_multi_os_dir"; then
12891       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
12892     elif test -n "$lt_multi_os_dir"; then
12893       test -d "$lt_sys_path" && \
12894         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
12895     fi
12896   done
12897   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
12898 BEGIN {RS = " "; FS = "/|\n";} {
12899   lt_foo = "";
12900   lt_count = 0;
12901   for (lt_i = NF; lt_i > 0; lt_i--) {
12902     if ($lt_i != "" && $lt_i != ".") {
12903       if ($lt_i == "..") {
12904         lt_count++;
12905       } else {
12906         if (lt_count == 0) {
12907           lt_foo = "/" $lt_i lt_foo;
12908         } else {
12909           lt_count--;
12910         }
12911       }
12912     }
12913   }
12914   if (lt_foo != "") { lt_freq[lt_foo]++; }
12915   if (lt_freq[lt_foo] == 1) { print lt_foo; }
12916 }'`
12917   # AWK program above erroneously prepends '/' to C:/dos/paths
12918   # for these hosts.
12919   case $host_os in
12920     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
12921       $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
12922   esac
12923   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
12924 else
12925   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12926 fi
12927 library_names_spec=
12928 libname_spec='lib$name'
12929 soname_spec=
12930 shrext_cmds=.so
12931 postinstall_cmds=
12932 postuninstall_cmds=
12933 finish_cmds=
12934 finish_eval=
12935 shlibpath_var=
12936 shlibpath_overrides_runpath=unknown
12937 version_type=none
12938 dynamic_linker="$host_os ld.so"
12939 sys_lib_dlsearch_path_spec="/lib /usr/lib"
12940 need_lib_prefix=unknown
12941 hardcode_into_libs=no
12942
12943 # when you set need_version to no, make sure it does not cause -set_version
12944 # flags to be left without arguments
12945 need_version=unknown
12946
12947
12948
12949 case $host_os in
12950 aix3*)
12951   version_type=linux # correct to gnu/linux during the next big refactor
12952   library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
12953   shlibpath_var=LIBPATH
12954
12955   # AIX 3 has no versioning support, so we append a major version to the name.
12956   soname_spec='$libname$release$shared_ext$major'
12957   ;;
12958
12959 aix[4-9]*)
12960   version_type=linux # correct to gnu/linux during the next big refactor
12961   need_lib_prefix=no
12962   need_version=no
12963   hardcode_into_libs=yes
12964   if test ia64 = "$host_cpu"; then
12965     # AIX 5 supports IA64
12966     library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
12967     shlibpath_var=LD_LIBRARY_PATH
12968   else
12969     # With GCC up to 2.95.x, collect2 would create an import file
12970     # for dependence libraries.  The import file would start with
12971     # the line '#! .'.  This would cause the generated library to
12972     # depend on '.', always an invalid library.  This was fixed in
12973     # development snapshots of GCC prior to 3.0.
12974     case $host_os in
12975       aix4 | aix4.[01] | aix4.[01].*)
12976       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12977            echo ' yes '
12978            echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
12979         :
12980       else
12981         can_build_shared=no
12982       fi
12983       ;;
12984     esac
12985     # Using Import Files as archive members, it is possible to support
12986     # filename-based versioning of shared library archives on AIX. While
12987     # this would work for both with and without runtime linking, it will
12988     # prevent static linking of such archives. So we do filename-based
12989     # shared library versioning with .so extension only, which is used
12990     # when both runtime linking and shared linking is enabled.
12991     # Unfortunately, runtime linking may impact performance, so we do
12992     # not want this to be the default eventually. Also, we use the
12993     # versioned .so libs for executables only if there is the -brtl
12994     # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
12995     # To allow for filename-based versioning support, we need to create
12996     # libNAME.so.V as an archive file, containing:
12997     # *) an Import File, referring to the versioned filename of the
12998     #    archive as well as the shared archive member, telling the
12999     #    bitwidth (32 or 64) of that shared object, and providing the
13000     #    list of exported symbols of that shared object, eventually
13001     #    decorated with the 'weak' keyword
13002     # *) the shared object with the F_LOADONLY flag set, to really avoid
13003     #    it being seen by the linker.
13004     # At run time we better use the real file rather than another symlink,
13005     # but for link time we create the symlink libNAME.so -> libNAME.so.V
13006
13007     case $with_aix_soname,$aix_use_runtimelinking in
13008     # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
13009     # soname into executable. Probably we can add versioning support to
13010     # collect2, so additional links can be useful in future.
13011     aix,yes) # traditional libtool
13012       dynamic_linker='AIX unversionable lib.so'
13013       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
13014       # instead of lib<name>.a to let people know that these are not
13015       # typical AIX shared libraries.
13016       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13017       ;;
13018     aix,no) # traditional AIX only
13019       dynamic_linker='AIX lib.a(lib.so.V)'
13020       # We preserve .a as extension for shared libraries through AIX4.2
13021       # and later when we are not doing run time linking.
13022       library_names_spec='$libname$release.a $libname.a'
13023       soname_spec='$libname$release$shared_ext$major'
13024       ;;
13025     svr4,*) # full svr4 only
13026       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
13027       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13028       # We do not specify a path in Import Files, so LIBPATH fires.
13029       shlibpath_overrides_runpath=yes
13030       ;;
13031     *,yes) # both, prefer svr4
13032       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
13033       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13034       # unpreferred sharedlib libNAME.a needs extra handling
13035       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"'
13036       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"'
13037       # We do not specify a path in Import Files, so LIBPATH fires.
13038       shlibpath_overrides_runpath=yes
13039       ;;
13040     *,no) # both, prefer aix
13041       dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
13042       library_names_spec='$libname$release.a $libname.a'
13043       soname_spec='$libname$release$shared_ext$major'
13044       # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
13045       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)'
13046       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"'
13047       ;;
13048     esac
13049     shlibpath_var=LIBPATH
13050   fi
13051   ;;
13052
13053 amigaos*)
13054   case $host_cpu in
13055   powerpc)
13056     # Since July 2007 AmigaOS4 officially supports .so libraries.
13057     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
13058     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13059     ;;
13060   m68k)
13061     library_names_spec='$libname.ixlibrary $libname.a'
13062     # Create ${libname}_ixlibrary.a entries in /sys/libs.
13063     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'
13064     ;;
13065   esac
13066   ;;
13067
13068 beos*)
13069   library_names_spec='$libname$shared_ext'
13070   dynamic_linker="$host_os ld.so"
13071   shlibpath_var=LIBRARY_PATH
13072   ;;
13073
13074 bsdi[45]*)
13075   version_type=linux # correct to gnu/linux during the next big refactor
13076   need_version=no
13077   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13078   soname_spec='$libname$release$shared_ext$major'
13079   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13080   shlibpath_var=LD_LIBRARY_PATH
13081   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13082   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13083   # the default ld.so.conf also contains /usr/contrib/lib and
13084   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13085   # libtool to hard-code these into programs
13086   ;;
13087
13088 cygwin* | mingw* | pw32* | cegcc*)
13089   version_type=windows
13090   shrext_cmds=.dll
13091   need_version=no
13092   need_lib_prefix=no
13093
13094   case $GCC,$cc_basename in
13095   yes,*)
13096     # gcc
13097     library_names_spec='$libname.dll.a'
13098     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13099     postinstall_cmds='base_file=`basename \$file`~
13100       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13101       dldir=$destdir/`dirname \$dlpath`~
13102       test -d \$dldir || mkdir -p \$dldir~
13103       $install_prog $dir/$dlname \$dldir/$dlname~
13104       chmod a+x \$dldir/$dlname~
13105       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13106         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13107       fi'
13108     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13109       dlpath=$dir/\$dldll~
13110        $RM \$dlpath'
13111     shlibpath_overrides_runpath=yes
13112
13113     case $host_os in
13114     cygwin*)
13115       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13116       soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13117
13118       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
13119       ;;
13120     mingw* | cegcc*)
13121       # MinGW DLLs use traditional 'lib' prefix
13122       soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13123       ;;
13124     pw32*)
13125       # pw32 DLLs use 'pw' prefix rather than 'lib'
13126       library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13127       ;;
13128     esac
13129     dynamic_linker='Win32 ld.exe'
13130     ;;
13131
13132   *,cl*)
13133     # Native MSVC
13134     libname_spec='$name'
13135     soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13136     library_names_spec='$libname.dll.lib'
13137
13138     case $build_os in
13139     mingw*)
13140       sys_lib_search_path_spec=
13141       lt_save_ifs=$IFS
13142       IFS=';'
13143       for lt_path in $LIB
13144       do
13145         IFS=$lt_save_ifs
13146         # Let DOS variable expansion print the short 8.3 style file name.
13147         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
13148         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13149       done
13150       IFS=$lt_save_ifs
13151       # Convert to MSYS style.
13152       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13153       ;;
13154     cygwin*)
13155       # Convert to unix form, then to dos form, then back to unix form
13156       # but this time dos style (no spaces!) so that the unix form looks
13157       # like /cygdrive/c/PROGRA~1:/cygdr...
13158       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13159       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13160       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13161       ;;
13162     *)
13163       sys_lib_search_path_spec=$LIB
13164       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13165         # It is most probably a Windows format PATH.
13166         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13167       else
13168         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13169       fi
13170       # FIXME: find the short name or the path components, as spaces are
13171       # common. (e.g. "Program Files" -> "PROGRA~1")
13172       ;;
13173     esac
13174
13175     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13176     postinstall_cmds='base_file=`basename \$file`~
13177       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13178       dldir=$destdir/`dirname \$dlpath`~
13179       test -d \$dldir || mkdir -p \$dldir~
13180       $install_prog $dir/$dlname \$dldir/$dlname'
13181     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13182       dlpath=$dir/\$dldll~
13183        $RM \$dlpath'
13184     shlibpath_overrides_runpath=yes
13185     dynamic_linker='Win32 link.exe'
13186     ;;
13187
13188   *)
13189     # Assume MSVC wrapper
13190     library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13191     dynamic_linker='Win32 ld.exe'
13192     ;;
13193   esac
13194   # FIXME: first we should search . and the directory the executable is in
13195   shlibpath_var=PATH
13196   ;;
13197
13198 darwin* | rhapsody*)
13199   dynamic_linker="$host_os dyld"
13200   version_type=darwin
13201   need_lib_prefix=no
13202   need_version=no
13203   library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13204   soname_spec='$libname$release$major$shared_ext'
13205   shlibpath_overrides_runpath=yes
13206   shlibpath_var=DYLD_LIBRARY_PATH
13207   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13208
13209   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13210   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13211   ;;
13212
13213 dgux*)
13214   version_type=linux # correct to gnu/linux during the next big refactor
13215   need_lib_prefix=no
13216   need_version=no
13217   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13218   soname_spec='$libname$release$shared_ext$major'
13219   shlibpath_var=LD_LIBRARY_PATH
13220   ;;
13221
13222 freebsd* | dragonfly*)
13223   # DragonFly does not have aout.  When/if they implement a new
13224   # versioning mechanism, adjust this.
13225   if test -x /usr/bin/objformat; then
13226     objformat=`/usr/bin/objformat`
13227   else
13228     case $host_os in
13229     freebsd[23].*) objformat=aout ;;
13230     *) objformat=elf ;;
13231     esac
13232   fi
13233   version_type=freebsd-$objformat
13234   case $version_type in
13235     freebsd-elf*)
13236       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13237       soname_spec='$libname$release$shared_ext$major'
13238       need_version=no
13239       need_lib_prefix=no
13240       ;;
13241     freebsd-*)
13242       library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13243       need_version=yes
13244       ;;
13245   esac
13246   shlibpath_var=LD_LIBRARY_PATH
13247   case $host_os in
13248   freebsd2.*)
13249     shlibpath_overrides_runpath=yes
13250     ;;
13251   freebsd3.[01]* | freebsdelf3.[01]*)
13252     shlibpath_overrides_runpath=yes
13253     hardcode_into_libs=yes
13254     ;;
13255   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13256   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13257     shlibpath_overrides_runpath=no
13258     hardcode_into_libs=yes
13259     ;;
13260   *) # from 4.6 on, and DragonFly
13261     shlibpath_overrides_runpath=yes
13262     hardcode_into_libs=yes
13263     ;;
13264   esac
13265   ;;
13266
13267 haiku*)
13268   version_type=linux # correct to gnu/linux during the next big refactor
13269   need_lib_prefix=no
13270   need_version=no
13271   dynamic_linker="$host_os runtime_loader"
13272   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13273   soname_spec='$libname$release$shared_ext$major'
13274   shlibpath_var=LIBRARY_PATH
13275   shlibpath_overrides_runpath=no
13276   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13277   hardcode_into_libs=yes
13278   ;;
13279
13280 hpux9* | hpux10* | hpux11*)
13281   # Give a soname corresponding to the major version so that dld.sl refuses to
13282   # link against other versions.
13283   version_type=sunos
13284   need_lib_prefix=no
13285   need_version=no
13286   case $host_cpu in
13287   ia64*)
13288     shrext_cmds='.so'
13289     hardcode_into_libs=yes
13290     dynamic_linker="$host_os dld.so"
13291     shlibpath_var=LD_LIBRARY_PATH
13292     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13293     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13294     soname_spec='$libname$release$shared_ext$major'
13295     if test 32 = "$HPUX_IA64_MODE"; then
13296       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13297       sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13298     else
13299       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13300       sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13301     fi
13302     ;;
13303   hppa*64*)
13304     shrext_cmds='.sl'
13305     hardcode_into_libs=yes
13306     dynamic_linker="$host_os dld.sl"
13307     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13308     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13309     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13310     soname_spec='$libname$release$shared_ext$major'
13311     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13312     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13313     ;;
13314   *)
13315     shrext_cmds='.sl'
13316     dynamic_linker="$host_os dld.sl"
13317     shlibpath_var=SHLIB_PATH
13318     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13319     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13320     soname_spec='$libname$release$shared_ext$major'
13321     ;;
13322   esac
13323   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13324   postinstall_cmds='chmod 555 $lib'
13325   # or fails outright, so override atomically:
13326   install_override_mode=555
13327   ;;
13328
13329 interix[3-9]*)
13330   version_type=linux # correct to gnu/linux during the next big refactor
13331   need_lib_prefix=no
13332   need_version=no
13333   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13334   soname_spec='$libname$release$shared_ext$major'
13335   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13336   shlibpath_var=LD_LIBRARY_PATH
13337   shlibpath_overrides_runpath=no
13338   hardcode_into_libs=yes
13339   ;;
13340
13341 irix5* | irix6* | nonstopux*)
13342   case $host_os in
13343     nonstopux*) version_type=nonstopux ;;
13344     *)
13345         if test yes = "$lt_cv_prog_gnu_ld"; then
13346                 version_type=linux # correct to gnu/linux during the next big refactor
13347         else
13348                 version_type=irix
13349         fi ;;
13350   esac
13351   need_lib_prefix=no
13352   need_version=no
13353   soname_spec='$libname$release$shared_ext$major'
13354   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13355   case $host_os in
13356   irix5* | nonstopux*)
13357     libsuff= shlibsuff=
13358     ;;
13359   *)
13360     case $LD in # libtool.m4 will add one of these switches to LD
13361     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13362       libsuff= shlibsuff= libmagic=32-bit;;
13363     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13364       libsuff=32 shlibsuff=N32 libmagic=N32;;
13365     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13366       libsuff=64 shlibsuff=64 libmagic=64-bit;;
13367     *) libsuff= shlibsuff= libmagic=never-match;;
13368     esac
13369     ;;
13370   esac
13371   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13372   shlibpath_overrides_runpath=no
13373   sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13374   sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13375   hardcode_into_libs=yes
13376   ;;
13377
13378 # No shared lib support for Linux oldld, aout, or coff.
13379 linux*oldld* | linux*aout* | linux*coff*)
13380   dynamic_linker=no
13381   ;;
13382
13383 linux*android*)
13384   version_type=none # Android doesn't support versioned libraries.
13385   need_lib_prefix=no
13386   need_version=no
13387   library_names_spec='$libname$release$shared_ext'
13388   soname_spec='$libname$release$shared_ext'
13389   finish_cmds=
13390   shlibpath_var=LD_LIBRARY_PATH
13391   shlibpath_overrides_runpath=yes
13392
13393   # This implies no fast_install, which is unacceptable.
13394   # Some rework will be needed to allow for fast_install
13395   # before this can be enabled.
13396   hardcode_into_libs=yes
13397
13398   dynamic_linker='Android linker'
13399   # Don't embed -rpath directories since the linker doesn't support them.
13400   hardcode_libdir_flag_spec='-L$libdir'
13401   ;;
13402
13403 # This must be glibc/ELF.
13404 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13405   version_type=linux # correct to gnu/linux during the next big refactor
13406   need_lib_prefix=no
13407   need_version=no
13408   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13409   soname_spec='$libname$release$shared_ext$major'
13410   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13411   shlibpath_var=LD_LIBRARY_PATH
13412   shlibpath_overrides_runpath=no
13413
13414   # Some binutils ld are patched to set DT_RUNPATH
13415   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
13416   $as_echo_n "(cached) " >&6
13417 else
13418   lt_cv_shlibpath_overrides_runpath=no
13419     save_LDFLAGS=$LDFLAGS
13420     save_libdir=$libdir
13421     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13422          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13423     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13424 /* end confdefs.h.  */
13425
13426 int
13427 main ()
13428 {
13429
13430   ;
13431   return 0;
13432 }
13433 _ACEOF
13434 if ac_fn_c_try_link "$LINENO"; then :
13435   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
13436   lt_cv_shlibpath_overrides_runpath=yes
13437 fi
13438 fi
13439 rm -f core conftest.err conftest.$ac_objext \
13440     conftest$ac_exeext conftest.$ac_ext
13441     LDFLAGS=$save_LDFLAGS
13442     libdir=$save_libdir
13443
13444 fi
13445
13446   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13447
13448   # This implies no fast_install, which is unacceptable.
13449   # Some rework will be needed to allow for fast_install
13450   # before this can be enabled.
13451   hardcode_into_libs=yes
13452
13453   # Add ABI-specific directories to the system library path.
13454   sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
13455
13456   # Ideally, we could use ldconfig to report *all* directores which are
13457   # searched for libraries, however this is still not possible.  Aside from not
13458   # being certain /sbin/ldconfig is available, command
13459   # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13460   # even though it is searched at run-time.  Try to do the best guess by
13461   # appending ld.so.conf contents (and includes) to the search path.
13462   if test -f /etc/ld.so.conf; then
13463     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' ' '`
13464     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
13465   fi
13466
13467   # We used to test for /lib/ld.so.1 and disable shared libraries on
13468   # powerpc, because MkLinux only supported shared libraries with the
13469   # GNU dynamic linker.  Since this was broken with cross compilers,
13470   # most powerpc-linux boxes support dynamic linking these days and
13471   # people can always --disable-shared, the test was removed, and we
13472   # assume the GNU/Linux dynamic linker is in use.
13473   dynamic_linker='GNU/Linux ld.so'
13474   ;;
13475
13476 netbsd*)
13477   version_type=sunos
13478   need_lib_prefix=no
13479   need_version=no
13480   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13481     library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13482     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13483     dynamic_linker='NetBSD (a.out) ld.so'
13484   else
13485     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13486     soname_spec='$libname$release$shared_ext$major'
13487     dynamic_linker='NetBSD ld.elf_so'
13488   fi
13489   shlibpath_var=LD_LIBRARY_PATH
13490   shlibpath_overrides_runpath=yes
13491   hardcode_into_libs=yes
13492   ;;
13493
13494 newsos6)
13495   version_type=linux # correct to gnu/linux during the next big refactor
13496   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13497   shlibpath_var=LD_LIBRARY_PATH
13498   shlibpath_overrides_runpath=yes
13499   ;;
13500
13501 *nto* | *qnx*)
13502   version_type=qnx
13503   need_lib_prefix=no
13504   need_version=no
13505   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13506   soname_spec='$libname$release$shared_ext$major'
13507   shlibpath_var=LD_LIBRARY_PATH
13508   shlibpath_overrides_runpath=no
13509   hardcode_into_libs=yes
13510   dynamic_linker='ldqnx.so'
13511   ;;
13512
13513 openbsd* | bitrig*)
13514   version_type=sunos
13515   sys_lib_dlsearch_path_spec=/usr/lib
13516   need_lib_prefix=no
13517   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13518     need_version=no
13519   else
13520     need_version=yes
13521   fi
13522   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13523   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13524   shlibpath_var=LD_LIBRARY_PATH
13525   shlibpath_overrides_runpath=yes
13526   ;;
13527
13528 os2*)
13529   libname_spec='$name'
13530   version_type=windows
13531   shrext_cmds=.dll
13532   need_version=no
13533   need_lib_prefix=no
13534   # OS/2 can only load a DLL with a base name of 8 characters or less.
13535   soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13536     v=$($ECHO $release$versuffix | tr -d .-);
13537     n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13538     $ECHO $n$v`$shared_ext'
13539   library_names_spec='${libname}_dll.$libext'
13540   dynamic_linker='OS/2 ld.exe'
13541   shlibpath_var=BEGINLIBPATH
13542   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13543   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13544   postinstall_cmds='base_file=`basename \$file`~
13545     dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13546     dldir=$destdir/`dirname \$dlpath`~
13547     test -d \$dldir || mkdir -p \$dldir~
13548     $install_prog $dir/$dlname \$dldir/$dlname~
13549     chmod a+x \$dldir/$dlname~
13550     if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13551       eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13552     fi'
13553   postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13554     dlpath=$dir/\$dldll~
13555     $RM \$dlpath'
13556   ;;
13557
13558 osf3* | osf4* | osf5*)
13559   version_type=osf
13560   need_lib_prefix=no
13561   need_version=no
13562   soname_spec='$libname$release$shared_ext$major'
13563   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13564   shlibpath_var=LD_LIBRARY_PATH
13565   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13566   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13567   ;;
13568
13569 rdos*)
13570   dynamic_linker=no
13571   ;;
13572
13573 solaris*)
13574   version_type=linux # correct to gnu/linux during the next big refactor
13575   need_lib_prefix=no
13576   need_version=no
13577   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13578   soname_spec='$libname$release$shared_ext$major'
13579   shlibpath_var=LD_LIBRARY_PATH
13580   shlibpath_overrides_runpath=yes
13581   hardcode_into_libs=yes
13582   # ldd complains unless libraries are executable
13583   postinstall_cmds='chmod +x $lib'
13584   ;;
13585
13586 sunos4*)
13587   version_type=sunos
13588   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13589   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13590   shlibpath_var=LD_LIBRARY_PATH
13591   shlibpath_overrides_runpath=yes
13592   if test yes = "$with_gnu_ld"; then
13593     need_lib_prefix=no
13594   fi
13595   need_version=yes
13596   ;;
13597
13598 sysv4 | sysv4.3*)
13599   version_type=linux # correct to gnu/linux during the next big refactor
13600   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13601   soname_spec='$libname$release$shared_ext$major'
13602   shlibpath_var=LD_LIBRARY_PATH
13603   case $host_vendor in
13604     sni)
13605       shlibpath_overrides_runpath=no
13606       need_lib_prefix=no
13607       runpath_var=LD_RUN_PATH
13608       ;;
13609     siemens)
13610       need_lib_prefix=no
13611       ;;
13612     motorola)
13613       need_lib_prefix=no
13614       need_version=no
13615       shlibpath_overrides_runpath=no
13616       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13617       ;;
13618   esac
13619   ;;
13620
13621 sysv4*MP*)
13622   if test -d /usr/nec; then
13623     version_type=linux # correct to gnu/linux during the next big refactor
13624     library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13625     soname_spec='$libname$shared_ext.$major'
13626     shlibpath_var=LD_LIBRARY_PATH
13627   fi
13628   ;;
13629
13630 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13631   version_type=sco
13632   need_lib_prefix=no
13633   need_version=no
13634   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13635   soname_spec='$libname$release$shared_ext$major'
13636   shlibpath_var=LD_LIBRARY_PATH
13637   shlibpath_overrides_runpath=yes
13638   hardcode_into_libs=yes
13639   if test yes = "$with_gnu_ld"; then
13640     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13641   else
13642     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13643     case $host_os in
13644       sco3.2v5*)
13645         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13646         ;;
13647     esac
13648   fi
13649   sys_lib_dlsearch_path_spec='/usr/lib'
13650   ;;
13651
13652 tpf*)
13653   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13654   version_type=linux # correct to gnu/linux during the next big refactor
13655   need_lib_prefix=no
13656   need_version=no
13657   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13658   shlibpath_var=LD_LIBRARY_PATH
13659   shlibpath_overrides_runpath=no
13660   hardcode_into_libs=yes
13661   ;;
13662
13663 uts4*)
13664   version_type=linux # correct to gnu/linux during the next big refactor
13665   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13666   soname_spec='$libname$release$shared_ext$major'
13667   shlibpath_var=LD_LIBRARY_PATH
13668   ;;
13669
13670 *)
13671   dynamic_linker=no
13672   ;;
13673 esac
13674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13675 $as_echo "$dynamic_linker" >&6; }
13676 test no = "$dynamic_linker" && can_build_shared=no
13677
13678 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13679 if test yes = "$GCC"; then
13680   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13681 fi
13682
13683 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13684   sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13685 fi
13686
13687 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13688   sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13689 fi
13690
13691 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13692 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13693
13694 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13695 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13696
13697 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13698 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
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
13791
13792
13793
13794
13795
13796   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13797 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13798 hardcode_action=
13799 if test -n "$hardcode_libdir_flag_spec" ||
13800    test -n "$runpath_var" ||
13801    test yes = "$hardcode_automatic"; then
13802
13803   # We can hardcode non-existent directories.
13804   if test no != "$hardcode_direct" &&
13805      # If the only mechanism to avoid hardcoding is shlibpath_var, we
13806      # have to relink, otherwise we might link with an installed library
13807      # when we should be linking with a yet-to-be-installed one
13808      ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13809      test no != "$hardcode_minus_L"; then
13810     # Linking always hardcodes the temporary library directory.
13811     hardcode_action=relink
13812   else
13813     # We can link without hardcoding, and we can hardcode nonexisting dirs.
13814     hardcode_action=immediate
13815   fi
13816 else
13817   # We cannot hardcode anything, or else we can only hardcode existing
13818   # directories.
13819   hardcode_action=unsupported
13820 fi
13821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13822 $as_echo "$hardcode_action" >&6; }
13823
13824 if test relink = "$hardcode_action" ||
13825    test yes = "$inherit_rpath"; then
13826   # Fast installation is not supported
13827   enable_fast_install=no
13828 elif test yes = "$shlibpath_overrides_runpath" ||
13829      test no = "$enable_shared"; then
13830   # Fast installation is not necessary
13831   enable_fast_install=needless
13832 fi
13833
13834
13835
13836
13837
13838
13839   if test yes != "$enable_dlopen"; then
13840   enable_dlopen=unknown
13841   enable_dlopen_self=unknown
13842   enable_dlopen_self_static=unknown
13843 else
13844   lt_cv_dlopen=no
13845   lt_cv_dlopen_libs=
13846
13847   case $host_os in
13848   beos*)
13849     lt_cv_dlopen=load_add_on
13850     lt_cv_dlopen_libs=
13851     lt_cv_dlopen_self=yes
13852     ;;
13853
13854   mingw* | pw32* | cegcc*)
13855     lt_cv_dlopen=LoadLibrary
13856     lt_cv_dlopen_libs=
13857     ;;
13858
13859   cygwin*)
13860     lt_cv_dlopen=dlopen
13861     lt_cv_dlopen_libs=
13862     ;;
13863
13864   darwin*)
13865     # if libdl is installed we need to link against it
13866     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13867 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13868 if ${ac_cv_lib_dl_dlopen+:} false; then :
13869   $as_echo_n "(cached) " >&6
13870 else
13871   ac_check_lib_save_LIBS=$LIBS
13872 LIBS="-ldl  $LIBS"
13873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13874 /* end confdefs.h.  */
13875
13876 /* Override any GCC internal prototype to avoid an error.
13877    Use char because int might match the return type of a GCC
13878    builtin and then its argument prototype would still apply.  */
13879 #ifdef __cplusplus
13880 extern "C"
13881 #endif
13882 char dlopen ();
13883 int
13884 main ()
13885 {
13886 return dlopen ();
13887   ;
13888   return 0;
13889 }
13890 _ACEOF
13891 if ac_fn_c_try_link "$LINENO"; then :
13892   ac_cv_lib_dl_dlopen=yes
13893 else
13894   ac_cv_lib_dl_dlopen=no
13895 fi
13896 rm -f core conftest.err conftest.$ac_objext \
13897     conftest$ac_exeext conftest.$ac_ext
13898 LIBS=$ac_check_lib_save_LIBS
13899 fi
13900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13901 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13902 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13903   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13904 else
13905
13906     lt_cv_dlopen=dyld
13907     lt_cv_dlopen_libs=
13908     lt_cv_dlopen_self=yes
13909
13910 fi
13911
13912     ;;
13913
13914   tpf*)
13915     # Don't try to run any link tests for TPF.  We know it's impossible
13916     # because TPF is a cross-compiler, and we know how we open DSOs.
13917     lt_cv_dlopen=dlopen
13918     lt_cv_dlopen_libs=
13919     lt_cv_dlopen_self=no
13920     ;;
13921
13922   *)
13923     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
13924 if test "x$ac_cv_func_shl_load" = xyes; then :
13925   lt_cv_dlopen=shl_load
13926 else
13927   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
13928 $as_echo_n "checking for shl_load in -ldld... " >&6; }
13929 if ${ac_cv_lib_dld_shl_load+:} false; then :
13930   $as_echo_n "(cached) " >&6
13931 else
13932   ac_check_lib_save_LIBS=$LIBS
13933 LIBS="-ldld  $LIBS"
13934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13935 /* end confdefs.h.  */
13936
13937 /* Override any GCC internal prototype to avoid an error.
13938    Use char because int might match the return type of a GCC
13939    builtin and then its argument prototype would still apply.  */
13940 #ifdef __cplusplus
13941 extern "C"
13942 #endif
13943 char shl_load ();
13944 int
13945 main ()
13946 {
13947 return shl_load ();
13948   ;
13949   return 0;
13950 }
13951 _ACEOF
13952 if ac_fn_c_try_link "$LINENO"; then :
13953   ac_cv_lib_dld_shl_load=yes
13954 else
13955   ac_cv_lib_dld_shl_load=no
13956 fi
13957 rm -f core conftest.err conftest.$ac_objext \
13958     conftest$ac_exeext conftest.$ac_ext
13959 LIBS=$ac_check_lib_save_LIBS
13960 fi
13961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
13962 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
13963 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
13964   lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
13965 else
13966   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
13967 if test "x$ac_cv_func_dlopen" = xyes; then :
13968   lt_cv_dlopen=dlopen
13969 else
13970   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13971 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13972 if ${ac_cv_lib_dl_dlopen+:} false; then :
13973   $as_echo_n "(cached) " >&6
13974 else
13975   ac_check_lib_save_LIBS=$LIBS
13976 LIBS="-ldl  $LIBS"
13977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13978 /* end confdefs.h.  */
13979
13980 /* Override any GCC internal prototype to avoid an error.
13981    Use char because int might match the return type of a GCC
13982    builtin and then its argument prototype would still apply.  */
13983 #ifdef __cplusplus
13984 extern "C"
13985 #endif
13986 char dlopen ();
13987 int
13988 main ()
13989 {
13990 return dlopen ();
13991   ;
13992   return 0;
13993 }
13994 _ACEOF
13995 if ac_fn_c_try_link "$LINENO"; then :
13996   ac_cv_lib_dl_dlopen=yes
13997 else
13998   ac_cv_lib_dl_dlopen=no
13999 fi
14000 rm -f core conftest.err conftest.$ac_objext \
14001     conftest$ac_exeext conftest.$ac_ext
14002 LIBS=$ac_check_lib_save_LIBS
14003 fi
14004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14005 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14006 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14007   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14008 else
14009   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
14010 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
14011 if ${ac_cv_lib_svld_dlopen+:} false; then :
14012   $as_echo_n "(cached) " >&6
14013 else
14014   ac_check_lib_save_LIBS=$LIBS
14015 LIBS="-lsvld  $LIBS"
14016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14017 /* end confdefs.h.  */
14018
14019 /* Override any GCC internal prototype to avoid an error.
14020    Use char because int might match the return type of a GCC
14021    builtin and then its argument prototype would still apply.  */
14022 #ifdef __cplusplus
14023 extern "C"
14024 #endif
14025 char dlopen ();
14026 int
14027 main ()
14028 {
14029 return dlopen ();
14030   ;
14031   return 0;
14032 }
14033 _ACEOF
14034 if ac_fn_c_try_link "$LINENO"; then :
14035   ac_cv_lib_svld_dlopen=yes
14036 else
14037   ac_cv_lib_svld_dlopen=no
14038 fi
14039 rm -f core conftest.err conftest.$ac_objext \
14040     conftest$ac_exeext conftest.$ac_ext
14041 LIBS=$ac_check_lib_save_LIBS
14042 fi
14043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
14044 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
14045 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
14046   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
14047 else
14048   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
14049 $as_echo_n "checking for dld_link in -ldld... " >&6; }
14050 if ${ac_cv_lib_dld_dld_link+:} false; then :
14051   $as_echo_n "(cached) " >&6
14052 else
14053   ac_check_lib_save_LIBS=$LIBS
14054 LIBS="-ldld  $LIBS"
14055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14056 /* end confdefs.h.  */
14057
14058 /* Override any GCC internal prototype to avoid an error.
14059    Use char because int might match the return type of a GCC
14060    builtin and then its argument prototype would still apply.  */
14061 #ifdef __cplusplus
14062 extern "C"
14063 #endif
14064 char dld_link ();
14065 int
14066 main ()
14067 {
14068 return dld_link ();
14069   ;
14070   return 0;
14071 }
14072 _ACEOF
14073 if ac_fn_c_try_link "$LINENO"; then :
14074   ac_cv_lib_dld_dld_link=yes
14075 else
14076   ac_cv_lib_dld_dld_link=no
14077 fi
14078 rm -f core conftest.err conftest.$ac_objext \
14079     conftest$ac_exeext conftest.$ac_ext
14080 LIBS=$ac_check_lib_save_LIBS
14081 fi
14082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
14083 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
14084 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
14085   lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
14086 fi
14087
14088
14089 fi
14090
14091
14092 fi
14093
14094
14095 fi
14096
14097
14098 fi
14099
14100
14101 fi
14102
14103     ;;
14104   esac
14105
14106   if test no = "$lt_cv_dlopen"; then
14107     enable_dlopen=no
14108   else
14109     enable_dlopen=yes
14110   fi
14111
14112   case $lt_cv_dlopen in
14113   dlopen)
14114     save_CPPFLAGS=$CPPFLAGS
14115     test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14116
14117     save_LDFLAGS=$LDFLAGS
14118     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14119
14120     save_LIBS=$LIBS
14121     LIBS="$lt_cv_dlopen_libs $LIBS"
14122
14123     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
14124 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
14125 if ${lt_cv_dlopen_self+:} false; then :
14126   $as_echo_n "(cached) " >&6
14127 else
14128           if test yes = "$cross_compiling"; then :
14129   lt_cv_dlopen_self=cross
14130 else
14131   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14132   lt_status=$lt_dlunknown
14133   cat > conftest.$ac_ext <<_LT_EOF
14134 #line $LINENO "configure"
14135 #include "confdefs.h"
14136
14137 #if HAVE_DLFCN_H
14138 #include <dlfcn.h>
14139 #endif
14140
14141 #include <stdio.h>
14142
14143 #ifdef RTLD_GLOBAL
14144 #  define LT_DLGLOBAL           RTLD_GLOBAL
14145 #else
14146 #  ifdef DL_GLOBAL
14147 #    define LT_DLGLOBAL         DL_GLOBAL
14148 #  else
14149 #    define LT_DLGLOBAL         0
14150 #  endif
14151 #endif
14152
14153 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14154    find out it does not work in some platform. */
14155 #ifndef LT_DLLAZY_OR_NOW
14156 #  ifdef RTLD_LAZY
14157 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14158 #  else
14159 #    ifdef DL_LAZY
14160 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14161 #    else
14162 #      ifdef RTLD_NOW
14163 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14164 #      else
14165 #        ifdef DL_NOW
14166 #          define LT_DLLAZY_OR_NOW      DL_NOW
14167 #        else
14168 #          define LT_DLLAZY_OR_NOW      0
14169 #        endif
14170 #      endif
14171 #    endif
14172 #  endif
14173 #endif
14174
14175 /* When -fvisibility=hidden is used, assume the code has been annotated
14176    correspondingly for the symbols needed.  */
14177 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14178 int fnord () __attribute__((visibility("default")));
14179 #endif
14180
14181 int fnord () { return 42; }
14182 int main ()
14183 {
14184   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14185   int status = $lt_dlunknown;
14186
14187   if (self)
14188     {
14189       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14190       else
14191         {
14192           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14193           else puts (dlerror ());
14194         }
14195       /* dlclose (self); */
14196     }
14197   else
14198     puts (dlerror ());
14199
14200   return status;
14201 }
14202 _LT_EOF
14203   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14204   (eval $ac_link) 2>&5
14205   ac_status=$?
14206   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14207   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14208     (./conftest; exit; ) >&5 2>/dev/null
14209     lt_status=$?
14210     case x$lt_status in
14211       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14212       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14213       x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14214     esac
14215   else :
14216     # compilation failed
14217     lt_cv_dlopen_self=no
14218   fi
14219 fi
14220 rm -fr conftest*
14221
14222
14223 fi
14224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14225 $as_echo "$lt_cv_dlopen_self" >&6; }
14226
14227     if test yes = "$lt_cv_dlopen_self"; then
14228       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14229       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14230 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
14231 if ${lt_cv_dlopen_self_static+:} false; then :
14232   $as_echo_n "(cached) " >&6
14233 else
14234           if test yes = "$cross_compiling"; then :
14235   lt_cv_dlopen_self_static=cross
14236 else
14237   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14238   lt_status=$lt_dlunknown
14239   cat > conftest.$ac_ext <<_LT_EOF
14240 #line $LINENO "configure"
14241 #include "confdefs.h"
14242
14243 #if HAVE_DLFCN_H
14244 #include <dlfcn.h>
14245 #endif
14246
14247 #include <stdio.h>
14248
14249 #ifdef RTLD_GLOBAL
14250 #  define LT_DLGLOBAL           RTLD_GLOBAL
14251 #else
14252 #  ifdef DL_GLOBAL
14253 #    define LT_DLGLOBAL         DL_GLOBAL
14254 #  else
14255 #    define LT_DLGLOBAL         0
14256 #  endif
14257 #endif
14258
14259 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14260    find out it does not work in some platform. */
14261 #ifndef LT_DLLAZY_OR_NOW
14262 #  ifdef RTLD_LAZY
14263 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14264 #  else
14265 #    ifdef DL_LAZY
14266 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14267 #    else
14268 #      ifdef RTLD_NOW
14269 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14270 #      else
14271 #        ifdef DL_NOW
14272 #          define LT_DLLAZY_OR_NOW      DL_NOW
14273 #        else
14274 #          define LT_DLLAZY_OR_NOW      0
14275 #        endif
14276 #      endif
14277 #    endif
14278 #  endif
14279 #endif
14280
14281 /* When -fvisibility=hidden is used, assume the code has been annotated
14282    correspondingly for the symbols needed.  */
14283 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14284 int fnord () __attribute__((visibility("default")));
14285 #endif
14286
14287 int fnord () { return 42; }
14288 int main ()
14289 {
14290   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14291   int status = $lt_dlunknown;
14292
14293   if (self)
14294     {
14295       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14296       else
14297         {
14298           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14299           else puts (dlerror ());
14300         }
14301       /* dlclose (self); */
14302     }
14303   else
14304     puts (dlerror ());
14305
14306   return status;
14307 }
14308 _LT_EOF
14309   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14310   (eval $ac_link) 2>&5
14311   ac_status=$?
14312   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14313   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14314     (./conftest; exit; ) >&5 2>/dev/null
14315     lt_status=$?
14316     case x$lt_status in
14317       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14318       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14319       x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14320     esac
14321   else :
14322     # compilation failed
14323     lt_cv_dlopen_self_static=no
14324   fi
14325 fi
14326 rm -fr conftest*
14327
14328
14329 fi
14330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14331 $as_echo "$lt_cv_dlopen_self_static" >&6; }
14332     fi
14333
14334     CPPFLAGS=$save_CPPFLAGS
14335     LDFLAGS=$save_LDFLAGS
14336     LIBS=$save_LIBS
14337     ;;
14338   esac
14339
14340   case $lt_cv_dlopen_self in
14341   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14342   *) enable_dlopen_self=unknown ;;
14343   esac
14344
14345   case $lt_cv_dlopen_self_static in
14346   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14347   *) enable_dlopen_self_static=unknown ;;
14348   esac
14349 fi
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367 striplib=
14368 old_striplib=
14369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14370 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
14371 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14372   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14373   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14375 $as_echo "yes" >&6; }
14376 else
14377 # FIXME - insert some real tests, host_os isn't really good enough
14378   case $host_os in
14379   darwin*)
14380     if test -n "$STRIP"; then
14381       striplib="$STRIP -x"
14382       old_striplib="$STRIP -S"
14383       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14384 $as_echo "yes" >&6; }
14385     else
14386       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14387 $as_echo "no" >&6; }
14388     fi
14389     ;;
14390   *)
14391     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14392 $as_echo "no" >&6; }
14393     ;;
14394   esac
14395 fi
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408   # Report what library types will actually be built
14409   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14410 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
14411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14412 $as_echo "$can_build_shared" >&6; }
14413
14414   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14415 $as_echo_n "checking whether to build shared libraries... " >&6; }
14416   test no = "$can_build_shared" && enable_shared=no
14417
14418   # On AIX, shared libraries and static libraries use the same namespace, and
14419   # are all built from PIC.
14420   case $host_os in
14421   aix3*)
14422     test yes = "$enable_shared" && enable_static=no
14423     if test -n "$RANLIB"; then
14424       archive_cmds="$archive_cmds~\$RANLIB \$lib"
14425       postinstall_cmds='$RANLIB $lib'
14426     fi
14427     ;;
14428
14429   aix[4-9]*)
14430     if test ia64 != "$host_cpu"; then
14431       case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14432       yes,aix,yes) ;;                   # shared object as lib.so file only
14433       yes,svr4,*) ;;                    # shared object as lib.so archive member only
14434       yes,*) enable_static=no ;;        # shared object in lib.a archive as well
14435       esac
14436     fi
14437     ;;
14438   esac
14439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14440 $as_echo "$enable_shared" >&6; }
14441
14442   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14443 $as_echo_n "checking whether to build static libraries... " >&6; }
14444   # Make sure either enable_shared or enable_static is yes.
14445   test yes = "$enable_shared" || enable_static=yes
14446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14447 $as_echo "$enable_static" >&6; }
14448
14449
14450
14451
14452 fi
14453 ac_ext=c
14454 ac_cpp='$CPP $CPPFLAGS'
14455 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14456 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14457 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14458
14459 CC=$lt_save_CC
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475         ac_config_commands="$ac_config_commands libtool"
14476
14477
14478
14479
14480 # Only expand once:
14481
14482
14483
14484
14485 # Checks for header files.
14486 for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h
14487 do :
14488   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14489 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
14490 "
14491 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14492   cat >>confdefs.h <<_ACEOF
14493 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14494 _ACEOF
14495
14496 fi
14497
14498 done
14499
14500
14501 # check for types.
14502 # Using own tests for int64* because autoconf builtin only give 32bit.
14503 ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
14504 if test "x$ac_cv_type_int8_t" = xyes; then :
14505
14506 else
14507
14508 cat >>confdefs.h <<_ACEOF
14509 #define int8_t signed char
14510 _ACEOF
14511
14512 fi
14513
14514 ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
14515 if test "x$ac_cv_type_int16_t" = xyes; then :
14516
14517 else
14518
14519 cat >>confdefs.h <<_ACEOF
14520 #define int16_t short
14521 _ACEOF
14522
14523 fi
14524
14525 ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
14526 if test "x$ac_cv_type_int32_t" = xyes; then :
14527
14528 else
14529
14530 cat >>confdefs.h <<_ACEOF
14531 #define int32_t int
14532 _ACEOF
14533
14534 fi
14535
14536 ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
14537 if test "x$ac_cv_type_int64_t" = xyes; then :
14538
14539 else
14540
14541 cat >>confdefs.h <<_ACEOF
14542 #define int64_t long long
14543 _ACEOF
14544
14545 fi
14546
14547 ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
14548 if test "x$ac_cv_type_uint8_t" = xyes; then :
14549
14550 else
14551
14552 cat >>confdefs.h <<_ACEOF
14553 #define uint8_t unsigned char
14554 _ACEOF
14555
14556 fi
14557
14558 ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
14559 if test "x$ac_cv_type_uint16_t" = xyes; then :
14560
14561 else
14562
14563 cat >>confdefs.h <<_ACEOF
14564 #define uint16_t unsigned short
14565 _ACEOF
14566
14567 fi
14568
14569 ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
14570 if test "x$ac_cv_type_uint32_t" = xyes; then :
14571
14572 else
14573
14574 cat >>confdefs.h <<_ACEOF
14575 #define uint32_t unsigned int
14576 _ACEOF
14577
14578 fi
14579
14580 ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
14581 if test "x$ac_cv_type_uint64_t" = xyes; then :
14582
14583 else
14584
14585 cat >>confdefs.h <<_ACEOF
14586 #define uint64_t unsigned long long
14587 _ACEOF
14588
14589 fi
14590
14591 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14592 if test "x$ac_cv_type_size_t" = xyes; then :
14593
14594 else
14595
14596 cat >>confdefs.h <<_ACEOF
14597 #define size_t unsigned int
14598 _ACEOF
14599
14600 fi
14601
14602 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
14603 if test "x$ac_cv_type_ssize_t" = xyes; then :
14604
14605 else
14606
14607 cat >>confdefs.h <<_ACEOF
14608 #define ssize_t int
14609 _ACEOF
14610
14611 fi
14612
14613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
14614 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
14615 if ${ac_cv_type_uid_t+:} false; then :
14616   $as_echo_n "(cached) " >&6
14617 else
14618   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14619 /* end confdefs.h.  */
14620 #include <sys/types.h>
14621
14622 _ACEOF
14623 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14624   $EGREP "uid_t" >/dev/null 2>&1; then :
14625   ac_cv_type_uid_t=yes
14626 else
14627   ac_cv_type_uid_t=no
14628 fi
14629 rm -f conftest*
14630
14631 fi
14632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
14633 $as_echo "$ac_cv_type_uid_t" >&6; }
14634 if test $ac_cv_type_uid_t = no; then
14635
14636 $as_echo "#define uid_t int" >>confdefs.h
14637
14638
14639 $as_echo "#define gid_t int" >>confdefs.h
14640
14641 fi
14642
14643 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14644 if test "x$ac_cv_type_pid_t" = xyes; then :
14645
14646 else
14647
14648 cat >>confdefs.h <<_ACEOF
14649 #define pid_t int
14650 _ACEOF
14651
14652 fi
14653
14654 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
14655 if test "x$ac_cv_type_off_t" = xyes; then :
14656
14657 else
14658
14659 cat >>confdefs.h <<_ACEOF
14660 #define off_t long int
14661 _ACEOF
14662
14663 fi
14664
14665 ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
14666 $ac_includes_default
14667 #ifdef HAVE_WINSOCK2_H
14668 #  include <winsock2.h>
14669 #endif
14670
14671 "
14672 if test "x$ac_cv_type_u_char" = xyes; then :
14673
14674 else
14675
14676 $as_echo "#define u_char unsigned char" >>confdefs.h
14677
14678 fi
14679
14680 ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
14681 $ac_includes_default
14682 #ifdef HAVE_SYS_RESOURCE_H
14683 #  include <sys/resource.h>
14684 #endif
14685
14686 "
14687 if test "x$ac_cv_type_rlim_t" = xyes; then :
14688
14689 else
14690
14691 $as_echo "#define rlim_t unsigned long" >>confdefs.h
14692
14693 fi
14694
14695
14696 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
14697 $ac_includes_default
14698 #ifdef HAVE_SYS_SOCKET_H
14699 #  include <sys/socket.h>
14700 #endif
14701 #ifdef HAVE_WS2TCPIP_H
14702 #  include <ws2tcpip.h>
14703 #endif
14704
14705 "
14706 if test "x$ac_cv_type_socklen_t" = xyes; then :
14707
14708 else
14709
14710 $as_echo "#define socklen_t int" >>confdefs.h
14711
14712 fi
14713
14714  ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
14715 $ac_includes_default
14716 #ifdef HAVE_SYS_TYPES_H
14717 # include <sys/types.h>
14718 #endif
14719 #ifdef HAVE_NETINET_IN_H
14720 # include <netinet/in.h>
14721 #endif
14722
14723 "
14724 if test "x$ac_cv_type_in_addr_t" = xyes; then :
14725
14726 else
14727
14728 $as_echo "#define in_addr_t uint32_t" >>confdefs.h
14729
14730 fi
14731
14732  ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
14733 $ac_includes_default
14734 #ifdef HAVE_SYS_TYPES_H
14735 # include <sys/types.h>
14736 #endif
14737 #ifdef HAVE_NETINET_IN_H
14738 # include <netinet/in.h>
14739 #endif
14740
14741 "
14742 if test "x$ac_cv_type_in_port_t" = xyes; then :
14743
14744 else
14745
14746 $as_echo "#define in_port_t uint16_t" >>confdefs.h
14747
14748 fi
14749
14750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
14751 $as_echo_n "checking if memcmp compares unsigned... " >&6; }
14752 if test "$cross_compiling" = yes; then :
14753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
14754 $as_echo "cross-compile no" >&6; }
14755
14756 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14757
14758   case " $LIBOBJS " in
14759   *" memcmp.$ac_objext "* ) ;;
14760   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14761  ;;
14762 esac
14763
14764
14765 else
14766   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14767 /* end confdefs.h.  */
14768
14769 #include <stdio.h>
14770 #include <stdlib.h>
14771 #include <string.h>
14772 int main(void)
14773 {
14774         char a = 255, b = 0;
14775         if(memcmp(&a, &b, 1) < 0)
14776                 return 1;
14777         return 0;
14778 }
14779
14780 _ACEOF
14781 if ac_fn_c_try_run "$LINENO"; then :
14782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14783 $as_echo "yes" >&6; }
14784 else
14785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14786 $as_echo "no" >&6; }
14787
14788 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14789
14790   case " $LIBOBJS " in
14791   *" memcmp.$ac_objext "* ) ;;
14792   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14793  ;;
14794 esac
14795
14796
14797 fi
14798 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14799   conftest.$ac_objext conftest.beam conftest.$ac_ext
14800 fi
14801
14802
14803 # The cast to long int works around a bug in the HP C Compiler
14804 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14805 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14806 # This bug is HP SR number 8606223364.
14807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
14808 $as_echo_n "checking size of time_t... " >&6; }
14809 if ${ac_cv_sizeof_time_t+:} false; then :
14810   $as_echo_n "(cached) " >&6
14811 else
14812   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
14813 $ac_includes_default
14814 #ifdef TIME_WITH_SYS_TIME
14815 # include <sys/time.h>
14816 # include <time.h>
14817 #else
14818 # ifdef HAVE_SYS_TIME_H
14819 #  include <sys/time.h>
14820 # else
14821 #  include <time.h>
14822 # endif
14823 #endif
14824
14825 "; then :
14826
14827 else
14828   if test "$ac_cv_type_time_t" = yes; then
14829      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14830 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14831 as_fn_error 77 "cannot compute sizeof (time_t)
14832 See \`config.log' for more details" "$LINENO" 5; }
14833    else
14834      ac_cv_sizeof_time_t=0
14835    fi
14836 fi
14837
14838 fi
14839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
14840 $as_echo "$ac_cv_sizeof_time_t" >&6; }
14841
14842
14843
14844 cat >>confdefs.h <<_ACEOF
14845 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
14846 _ACEOF
14847
14848
14849
14850 # add option to disable the evil rpath
14851
14852 # Check whether --enable-rpath was given.
14853 if test "${enable_rpath+set}" = set; then :
14854   enableval=$enable_rpath; enable_rpath=$enableval
14855 else
14856   enable_rpath=yes
14857 fi
14858
14859 if test "x$enable_rpath" = xno; then
14860                 ac_config_commands="$ac_config_commands disable-rpath"
14861
14862 fi
14863
14864
14865
14866 # check to see if libraries are needed for these functions.
14867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
14868 $as_echo_n "checking for library containing inet_pton... " >&6; }
14869 if ${ac_cv_search_inet_pton+:} false; then :
14870   $as_echo_n "(cached) " >&6
14871 else
14872   ac_func_search_save_LIBS=$LIBS
14873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14874 /* end confdefs.h.  */
14875
14876 /* Override any GCC internal prototype to avoid an error.
14877    Use char because int might match the return type of a GCC
14878    builtin and then its argument prototype would still apply.  */
14879 #ifdef __cplusplus
14880 extern "C"
14881 #endif
14882 char inet_pton ();
14883 int
14884 main ()
14885 {
14886 return inet_pton ();
14887   ;
14888   return 0;
14889 }
14890 _ACEOF
14891 for ac_lib in '' nsl; do
14892   if test -z "$ac_lib"; then
14893     ac_res="none required"
14894   else
14895     ac_res=-l$ac_lib
14896     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14897   fi
14898   if ac_fn_c_try_link "$LINENO"; then :
14899   ac_cv_search_inet_pton=$ac_res
14900 fi
14901 rm -f core conftest.err conftest.$ac_objext \
14902     conftest$ac_exeext
14903   if ${ac_cv_search_inet_pton+:} false; then :
14904   break
14905 fi
14906 done
14907 if ${ac_cv_search_inet_pton+:} false; then :
14908
14909 else
14910   ac_cv_search_inet_pton=no
14911 fi
14912 rm conftest.$ac_ext
14913 LIBS=$ac_func_search_save_LIBS
14914 fi
14915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
14916 $as_echo "$ac_cv_search_inet_pton" >&6; }
14917 ac_res=$ac_cv_search_inet_pton
14918 if test "$ac_res" != no; then :
14919   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14920
14921 fi
14922
14923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
14924 $as_echo_n "checking for library containing socket... " >&6; }
14925 if ${ac_cv_search_socket+:} false; then :
14926   $as_echo_n "(cached) " >&6
14927 else
14928   ac_func_search_save_LIBS=$LIBS
14929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14930 /* end confdefs.h.  */
14931
14932 /* Override any GCC internal prototype to avoid an error.
14933    Use char because int might match the return type of a GCC
14934    builtin and then its argument prototype would still apply.  */
14935 #ifdef __cplusplus
14936 extern "C"
14937 #endif
14938 char socket ();
14939 int
14940 main ()
14941 {
14942 return socket ();
14943   ;
14944   return 0;
14945 }
14946 _ACEOF
14947 for ac_lib in '' socket; do
14948   if test -z "$ac_lib"; then
14949     ac_res="none required"
14950   else
14951     ac_res=-l$ac_lib
14952     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14953   fi
14954   if ac_fn_c_try_link "$LINENO"; then :
14955   ac_cv_search_socket=$ac_res
14956 fi
14957 rm -f core conftest.err conftest.$ac_objext \
14958     conftest$ac_exeext
14959   if ${ac_cv_search_socket+:} false; then :
14960   break
14961 fi
14962 done
14963 if ${ac_cv_search_socket+:} false; then :
14964
14965 else
14966   ac_cv_search_socket=no
14967 fi
14968 rm conftest.$ac_ext
14969 LIBS=$ac_func_search_save_LIBS
14970 fi
14971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
14972 $as_echo "$ac_cv_search_socket" >&6; }
14973 ac_res=$ac_cv_search_socket
14974 if test "$ac_res" != no; then :
14975   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14976
14977 fi
14978
14979
14980 # check wether strptime also works
14981
14982 # check some functions of the OS before linking libs (while still runnable).
14983 for ac_header in unistd.h
14984 do :
14985   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
14986 if test "x$ac_cv_header_unistd_h" = xyes; then :
14987   cat >>confdefs.h <<_ACEOF
14988 #define HAVE_UNISTD_H 1
14989 _ACEOF
14990
14991 fi
14992
14993 done
14994
14995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
14996 $as_echo_n "checking for working chown... " >&6; }
14997 if ${ac_cv_func_chown_works+:} false; then :
14998   $as_echo_n "(cached) " >&6
14999 else
15000   if test "$cross_compiling" = yes; then :
15001   ac_cv_func_chown_works=no
15002 else
15003   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15004 /* end confdefs.h.  */
15005 $ac_includes_default
15006 #include <fcntl.h>
15007
15008 int
15009 main ()
15010 {
15011   char *f = "conftest.chown";
15012   struct stat before, after;
15013
15014   if (creat (f, 0600) < 0)
15015     return 1;
15016   if (stat (f, &before) < 0)
15017     return 1;
15018   if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
15019     return 1;
15020   if (stat (f, &after) < 0)
15021     return 1;
15022   return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
15023
15024   ;
15025   return 0;
15026 }
15027 _ACEOF
15028 if ac_fn_c_try_run "$LINENO"; then :
15029   ac_cv_func_chown_works=yes
15030 else
15031   ac_cv_func_chown_works=no
15032 fi
15033 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15034   conftest.$ac_objext conftest.beam conftest.$ac_ext
15035 fi
15036
15037 rm -f conftest.chown
15038
15039 fi
15040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
15041 $as_echo "$ac_cv_func_chown_works" >&6; }
15042 if test $ac_cv_func_chown_works = yes; then
15043
15044 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
15045
15046 fi
15047
15048 for ac_header in vfork.h
15049 do :
15050   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15051 if test "x$ac_cv_header_vfork_h" = xyes; then :
15052   cat >>confdefs.h <<_ACEOF
15053 #define HAVE_VFORK_H 1
15054 _ACEOF
15055
15056 fi
15057
15058 done
15059
15060 for ac_func in fork vfork
15061 do :
15062   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15063 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15064 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15065   cat >>confdefs.h <<_ACEOF
15066 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15067 _ACEOF
15068
15069 fi
15070 done
15071
15072 if test "x$ac_cv_func_fork" = xyes; then
15073   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15074 $as_echo_n "checking for working fork... " >&6; }
15075 if ${ac_cv_func_fork_works+:} false; then :
15076   $as_echo_n "(cached) " >&6
15077 else
15078   if test "$cross_compiling" = yes; then :
15079   ac_cv_func_fork_works=cross
15080 else
15081   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15082 /* end confdefs.h.  */
15083 $ac_includes_default
15084 int
15085 main ()
15086 {
15087
15088           /* By Ruediger Kuhlmann. */
15089           return fork () < 0;
15090
15091   ;
15092   return 0;
15093 }
15094 _ACEOF
15095 if ac_fn_c_try_run "$LINENO"; then :
15096   ac_cv_func_fork_works=yes
15097 else
15098   ac_cv_func_fork_works=no
15099 fi
15100 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15101   conftest.$ac_objext conftest.beam conftest.$ac_ext
15102 fi
15103
15104 fi
15105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15106 $as_echo "$ac_cv_func_fork_works" >&6; }
15107
15108 else
15109   ac_cv_func_fork_works=$ac_cv_func_fork
15110 fi
15111 if test "x$ac_cv_func_fork_works" = xcross; then
15112   case $host in
15113     *-*-amigaos* | *-*-msdosdjgpp*)
15114       # Override, as these systems have only a dummy fork() stub
15115       ac_cv_func_fork_works=no
15116       ;;
15117     *)
15118       ac_cv_func_fork_works=yes
15119       ;;
15120   esac
15121   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15122 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15123 fi
15124 ac_cv_func_vfork_works=$ac_cv_func_vfork
15125 if test "x$ac_cv_func_vfork" = xyes; then
15126   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15127 $as_echo_n "checking for working vfork... " >&6; }
15128 if ${ac_cv_func_vfork_works+:} false; then :
15129   $as_echo_n "(cached) " >&6
15130 else
15131   if test "$cross_compiling" = yes; then :
15132   ac_cv_func_vfork_works=cross
15133 else
15134   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15135 /* end confdefs.h.  */
15136 /* Thanks to Paul Eggert for this test.  */
15137 $ac_includes_default
15138 #include <sys/wait.h>
15139 #ifdef HAVE_VFORK_H
15140 # include <vfork.h>
15141 #endif
15142 /* On some sparc systems, changes by the child to local and incoming
15143    argument registers are propagated back to the parent.  The compiler
15144    is told about this with #include <vfork.h>, but some compilers
15145    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15146    static variable whose address is put into a register that is
15147    clobbered by the vfork.  */
15148 static void
15149 #ifdef __cplusplus
15150 sparc_address_test (int arg)
15151 # else
15152 sparc_address_test (arg) int arg;
15153 #endif
15154 {
15155   static pid_t child;
15156   if (!child) {
15157     child = vfork ();
15158     if (child < 0) {
15159       perror ("vfork");
15160       _exit(2);
15161     }
15162     if (!child) {
15163       arg = getpid();
15164       write(-1, "", 0);
15165       _exit (arg);
15166     }
15167   }
15168 }
15169
15170 int
15171 main ()
15172 {
15173   pid_t parent = getpid ();
15174   pid_t child;
15175
15176   sparc_address_test (0);
15177
15178   child = vfork ();
15179
15180   if (child == 0) {
15181     /* Here is another test for sparc vfork register problems.  This
15182        test uses lots of local variables, at least as many local
15183        variables as main has allocated so far including compiler
15184        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15185        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15186        reuse the register of parent for one of the local variables,
15187        since it will think that parent can't possibly be used any more
15188        in this routine.  Assigning to the local variable will thus
15189        munge parent in the parent process.  */
15190     pid_t
15191       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15192       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15193     /* Convince the compiler that p..p7 are live; otherwise, it might
15194        use the same hardware register for all 8 local variables.  */
15195     if (p != p1 || p != p2 || p != p3 || p != p4
15196         || p != p5 || p != p6 || p != p7)
15197       _exit(1);
15198
15199     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15200        from child file descriptors.  If the child closes a descriptor
15201        before it execs or exits, this munges the parent's descriptor
15202        as well.  Test for this by closing stdout in the child.  */
15203     _exit(close(fileno(stdout)) != 0);
15204   } else {
15205     int status;
15206     struct stat st;
15207
15208     while (wait(&status) != child)
15209       ;
15210     return (
15211          /* Was there some problem with vforking?  */
15212          child < 0
15213
15214          /* Did the child fail?  (This shouldn't happen.)  */
15215          || status
15216
15217          /* Did the vfork/compiler bug occur?  */
15218          || parent != getpid()
15219
15220          /* Did the file descriptor bug occur?  */
15221          || fstat(fileno(stdout), &st) != 0
15222          );
15223   }
15224 }
15225 _ACEOF
15226 if ac_fn_c_try_run "$LINENO"; then :
15227   ac_cv_func_vfork_works=yes
15228 else
15229   ac_cv_func_vfork_works=no
15230 fi
15231 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15232   conftest.$ac_objext conftest.beam conftest.$ac_ext
15233 fi
15234
15235 fi
15236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15237 $as_echo "$ac_cv_func_vfork_works" >&6; }
15238
15239 fi;
15240 if test "x$ac_cv_func_fork_works" = xcross; then
15241   ac_cv_func_vfork_works=$ac_cv_func_vfork
15242   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15243 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15244 fi
15245
15246 if test "x$ac_cv_func_vfork_works" = xyes; then
15247
15248 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15249
15250 else
15251
15252 $as_echo "#define vfork fork" >>confdefs.h
15253
15254 fi
15255 if test "x$ac_cv_func_fork_works" = xyes; then
15256
15257 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15258
15259 fi
15260
15261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
15262 $as_echo_n "checking return type of signal handlers... " >&6; }
15263 if ${ac_cv_type_signal+:} false; then :
15264   $as_echo_n "(cached) " >&6
15265 else
15266   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15267 /* end confdefs.h.  */
15268 #include <sys/types.h>
15269 #include <signal.h>
15270
15271 int
15272 main ()
15273 {
15274 return *(signal (0, 0)) (0) == 1;
15275   ;
15276   return 0;
15277 }
15278 _ACEOF
15279 if ac_fn_c_try_compile "$LINENO"; then :
15280   ac_cv_type_signal=int
15281 else
15282   ac_cv_type_signal=void
15283 fi
15284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15285 fi
15286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
15287 $as_echo "$ac_cv_type_signal" >&6; }
15288
15289 cat >>confdefs.h <<_ACEOF
15290 #define RETSIGTYPE $ac_cv_type_signal
15291 _ACEOF
15292
15293
15294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15295 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15296 if ${ac_cv_sys_largefile_source+:} false; then :
15297   $as_echo_n "(cached) " >&6
15298 else
15299   while :; do
15300   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15301 /* end confdefs.h.  */
15302 #include <sys/types.h> /* for off_t */
15303      #include <stdio.h>
15304 int
15305 main ()
15306 {
15307 int (*fp) (FILE *, off_t, int) = fseeko;
15308      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15309   ;
15310   return 0;
15311 }
15312 _ACEOF
15313 if ac_fn_c_try_link "$LINENO"; then :
15314   ac_cv_sys_largefile_source=no; break
15315 fi
15316 rm -f core conftest.err conftest.$ac_objext \
15317     conftest$ac_exeext conftest.$ac_ext
15318   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15319 /* end confdefs.h.  */
15320 #define _LARGEFILE_SOURCE 1
15321 #include <sys/types.h> /* for off_t */
15322      #include <stdio.h>
15323 int
15324 main ()
15325 {
15326 int (*fp) (FILE *, off_t, int) = fseeko;
15327      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15328   ;
15329   return 0;
15330 }
15331 _ACEOF
15332 if ac_fn_c_try_link "$LINENO"; then :
15333   ac_cv_sys_largefile_source=1; break
15334 fi
15335 rm -f core conftest.err conftest.$ac_objext \
15336     conftest$ac_exeext conftest.$ac_ext
15337   ac_cv_sys_largefile_source=unknown
15338   break
15339 done
15340 fi
15341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15342 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15343 case $ac_cv_sys_largefile_source in #(
15344   no | unknown) ;;
15345   *)
15346 cat >>confdefs.h <<_ACEOF
15347 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15348 _ACEOF
15349 ;;
15350 esac
15351 rm -rf conftest*
15352
15353 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15354 # in glibc 2.1.3, but that breaks too many other things.
15355 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15356 if test $ac_cv_sys_largefile_source != unknown; then
15357
15358 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15359
15360 fi
15361
15362
15363 # Check whether --enable-largefile was given.
15364 if test "${enable_largefile+set}" = set; then :
15365   enableval=$enable_largefile;
15366 fi
15367
15368 if test "$enable_largefile" != no; then
15369
15370   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15371 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15372 if ${ac_cv_sys_largefile_CC+:} false; then :
15373   $as_echo_n "(cached) " >&6
15374 else
15375   ac_cv_sys_largefile_CC=no
15376      if test "$GCC" != yes; then
15377        ac_save_CC=$CC
15378        while :; do
15379          # IRIX 6.2 and later do not support large files by default,
15380          # so use the C compiler's -n32 option if that helps.
15381          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15382 /* end confdefs.h.  */
15383 #include <sys/types.h>
15384  /* Check that off_t can represent 2**63 - 1 correctly.
15385     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15386     since some C++ compilers masquerading as C compilers
15387     incorrectly reject 9223372036854775807.  */
15388 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15389   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15390                        && LARGE_OFF_T % 2147483647 == 1)
15391                       ? 1 : -1];
15392 int
15393 main ()
15394 {
15395
15396   ;
15397   return 0;
15398 }
15399 _ACEOF
15400          if ac_fn_c_try_compile "$LINENO"; then :
15401   break
15402 fi
15403 rm -f core conftest.err conftest.$ac_objext
15404          CC="$CC -n32"
15405          if ac_fn_c_try_compile "$LINENO"; then :
15406   ac_cv_sys_largefile_CC=' -n32'; break
15407 fi
15408 rm -f core conftest.err conftest.$ac_objext
15409          break
15410        done
15411        CC=$ac_save_CC
15412        rm -f conftest.$ac_ext
15413     fi
15414 fi
15415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15416 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15417   if test "$ac_cv_sys_largefile_CC" != no; then
15418     CC=$CC$ac_cv_sys_largefile_CC
15419   fi
15420
15421   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15422 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15423 if ${ac_cv_sys_file_offset_bits+:} false; then :
15424   $as_echo_n "(cached) " >&6
15425 else
15426   while :; do
15427   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15428 /* end confdefs.h.  */
15429 #include <sys/types.h>
15430  /* Check that off_t can represent 2**63 - 1 correctly.
15431     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15432     since some C++ compilers masquerading as C compilers
15433     incorrectly reject 9223372036854775807.  */
15434 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15435   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15436                        && LARGE_OFF_T % 2147483647 == 1)
15437                       ? 1 : -1];
15438 int
15439 main ()
15440 {
15441
15442   ;
15443   return 0;
15444 }
15445 _ACEOF
15446 if ac_fn_c_try_compile "$LINENO"; then :
15447   ac_cv_sys_file_offset_bits=no; break
15448 fi
15449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15451 /* end confdefs.h.  */
15452 #define _FILE_OFFSET_BITS 64
15453 #include <sys/types.h>
15454  /* Check that off_t can represent 2**63 - 1 correctly.
15455     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15456     since some C++ compilers masquerading as C compilers
15457     incorrectly reject 9223372036854775807.  */
15458 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15459   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15460                        && LARGE_OFF_T % 2147483647 == 1)
15461                       ? 1 : -1];
15462 int
15463 main ()
15464 {
15465
15466   ;
15467   return 0;
15468 }
15469 _ACEOF
15470 if ac_fn_c_try_compile "$LINENO"; then :
15471   ac_cv_sys_file_offset_bits=64; break
15472 fi
15473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15474   ac_cv_sys_file_offset_bits=unknown
15475   break
15476 done
15477 fi
15478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15479 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15480 case $ac_cv_sys_file_offset_bits in #(
15481   no | unknown) ;;
15482   *)
15483 cat >>confdefs.h <<_ACEOF
15484 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15485 _ACEOF
15486 ;;
15487 esac
15488 rm -rf conftest*
15489   if test $ac_cv_sys_file_offset_bits = unknown; then
15490     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15491 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15492 if ${ac_cv_sys_large_files+:} false; then :
15493   $as_echo_n "(cached) " >&6
15494 else
15495   while :; do
15496   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15497 /* end confdefs.h.  */
15498 #include <sys/types.h>
15499  /* Check that off_t can represent 2**63 - 1 correctly.
15500     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15501     since some C++ compilers masquerading as C compilers
15502     incorrectly reject 9223372036854775807.  */
15503 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15504   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15505                        && LARGE_OFF_T % 2147483647 == 1)
15506                       ? 1 : -1];
15507 int
15508 main ()
15509 {
15510
15511   ;
15512   return 0;
15513 }
15514 _ACEOF
15515 if ac_fn_c_try_compile "$LINENO"; then :
15516   ac_cv_sys_large_files=no; break
15517 fi
15518 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15519   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15520 /* end confdefs.h.  */
15521 #define _LARGE_FILES 1
15522 #include <sys/types.h>
15523  /* Check that off_t can represent 2**63 - 1 correctly.
15524     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15525     since some C++ compilers masquerading as C compilers
15526     incorrectly reject 9223372036854775807.  */
15527 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15528   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15529                        && LARGE_OFF_T % 2147483647 == 1)
15530                       ? 1 : -1];
15531 int
15532 main ()
15533 {
15534
15535   ;
15536   return 0;
15537 }
15538 _ACEOF
15539 if ac_fn_c_try_compile "$LINENO"; then :
15540   ac_cv_sys_large_files=1; break
15541 fi
15542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15543   ac_cv_sys_large_files=unknown
15544   break
15545 done
15546 fi
15547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15548 $as_echo "$ac_cv_sys_large_files" >&6; }
15549 case $ac_cv_sys_large_files in #(
15550   no | unknown) ;;
15551   *)
15552 cat >>confdefs.h <<_ACEOF
15553 #define _LARGE_FILES $ac_cv_sys_large_files
15554 _ACEOF
15555 ;;
15556 esac
15557 rm -rf conftest*
15558   fi
15559
15560
15561 fi
15562
15563
15564
15565
15566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
15567 $as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
15568 cache=_D_LARGEFILE_SOURCE_1
15569 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
15570   $as_echo_n "(cached) " >&6
15571 else
15572
15573 echo '
15574 #include <stdio.h>
15575 int test() {
15576         int a = fseeko(stdin, 0, 0);
15577         return a;
15578 }
15579 ' > conftest.c
15580 echo 'void f(){}' >>conftest.c
15581 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
15582 eval "cv_prog_cc_flag_needed_$cache=no"
15583 else
15584
15585 if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
15586 eval "cv_prog_cc_flag_needed_$cache=yes"
15587 else
15588 eval "cv_prog_cc_flag_needed_$cache=fail"
15589 #echo 'Test with flag fails too!'
15590 #cat conftest.c
15591 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15592 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15593 #exit 1
15594 fi
15595
15596 fi
15597 rm -f conftest conftest.c conftest.o
15598
15599 fi
15600
15601 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
15602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15603 $as_echo "yes" >&6; }
15604 :
15605 CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
15606 else
15607 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
15608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15609 $as_echo "no" >&6; }
15610 #echo 'Test with flag is no!'
15611 #cat conftest.c
15612 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15613 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15614 #exit 1
15615 :
15616
15617 else
15618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15619 $as_echo "failed" >&6; }
15620 :
15621
15622 fi
15623 fi
15624
15625
15626
15627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
15628 $as_echo_n "checking if nonblocking sockets work... " >&6; }
15629 if echo $target | grep mingw32 >/dev/null; then
15630         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
15631 $as_echo "no (windows)" >&6; }
15632
15633 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15634
15635 else
15636 if test "$cross_compiling" = yes; then :
15637
15638         { $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
15639 $as_echo "crosscompile(yes)" >&6; }
15640
15641 else
15642   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15643 /* end confdefs.h.  */
15644
15645
15646 #include <stdio.h>
15647 #include <string.h>
15648 #include <stdlib.h>
15649 #include <fcntl.h>
15650 #include <errno.h>
15651 #ifdef HAVE_SYS_TYPES_H
15652 #include <sys/types.h>
15653 #endif
15654 #ifdef HAVE_SYS_SOCKET_H
15655 #include <sys/socket.h>
15656 #endif
15657 #ifdef HAVE_NETINET_IN_H
15658 #include <netinet/in.h>
15659 #endif
15660 #ifdef HAVE_ARPA_INET_H
15661 #include <arpa/inet.h>
15662 #endif
15663 #ifdef HAVE_UNISTD_H
15664 #include <unistd.h>
15665 #endif
15666 #ifdef HAVE_TIME_H
15667 #include <time.h>
15668 #endif
15669
15670 int main(void)
15671 {
15672         int port;
15673         int sfd, cfd;
15674         int num = 10;
15675         int i, p;
15676         struct sockaddr_in a;
15677         /* test if select and nonblocking reads work well together */
15678         /* open port.
15679            fork child to send 10 messages.
15680            select to read.
15681            then try to nonblocking read the 10 messages
15682            then, nonblocking read must give EAGAIN
15683         */
15684
15685         port = 12345 + (time(0)%32);
15686         sfd = socket(PF_INET, SOCK_DGRAM, 0);
15687         if(sfd == -1) {
15688                 perror("socket");
15689                 return 1;
15690         }
15691         memset(&a, 0, sizeof(a));
15692         a.sin_family = AF_INET;
15693         a.sin_port = htons(port);
15694         a.sin_addr.s_addr = inet_addr("127.0.0.1");
15695         if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15696                 perror("bind");
15697                 return 1;
15698         }
15699         if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
15700                 perror("fcntl");
15701                 return 1;
15702         }
15703
15704         cfd = socket(PF_INET, SOCK_DGRAM, 0);
15705         if(cfd == -1) {
15706                 perror("client socket");
15707                 return 1;
15708         }
15709         a.sin_port = 0;
15710         if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15711                 perror("client bind");
15712                 return 1;
15713         }
15714         a.sin_port = htons(port);
15715
15716         /* no handler, causes exit in 10 seconds */
15717         alarm(10);
15718
15719         /* send and receive on the socket */
15720         if((p=fork()) == 0) {
15721                 for(i=0; i<num; i++) {
15722                         if(sendto(cfd, &i, sizeof(i), 0,
15723                                 (struct sockaddr*)&a, sizeof(a)) < 0) {
15724                                 perror("sendto");
15725                                 return 1;
15726                         }
15727                 }
15728         } else {
15729                 /* parent */
15730                 fd_set rset;
15731                 int x;
15732                 if(p == -1) {
15733                         perror("fork");
15734                         return 1;
15735                 }
15736                 FD_ZERO(&rset);
15737                 FD_SET(sfd, &rset);
15738                 if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
15739                         perror("select");
15740                         return 1;
15741                 }
15742                 i = 0;
15743                 while(i < num) {
15744                         if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
15745                                 if(errno == EAGAIN)
15746                                         continue;
15747                                 perror("recv");
15748                                 return 1;
15749                         }
15750                         i++;
15751                 }
15752                 /* now we want to get EAGAIN: nonblocking goodness */
15753                 errno = 0;
15754                 recv(sfd, &x, sizeof(x), 0);
15755                 if(errno != EAGAIN) {
15756                         perror("trying to recv again");
15757                         return 1;
15758                 }
15759                 /* EAGAIN encountered */
15760         }
15761
15762         close(sfd);
15763         close(cfd);
15764         return 0;
15765 }
15766
15767 _ACEOF
15768 if ac_fn_c_try_run "$LINENO"; then :
15769
15770         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15771 $as_echo "yes" >&6; }
15772
15773 else
15774
15775         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15776 $as_echo "no" >&6; }
15777
15778 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15779
15780
15781 fi
15782 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15783   conftest.$ac_objext conftest.beam conftest.$ac_ext
15784 fi
15785
15786 fi
15787
15788
15789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
15790 $as_echo_n "checking whether mkdir has one arg... " >&6; }
15791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15792 /* end confdefs.h.  */
15793
15794 #include <stdio.h>
15795 #include <unistd.h>
15796 #ifdef HAVE_WINSOCK2_H
15797 #include <winsock2.h>
15798 #endif
15799 #ifdef HAVE_SYS_STAT_H
15800 #include <sys/stat.h>
15801 #endif
15802
15803 int
15804 main ()
15805 {
15806
15807         (void)mkdir("directory");
15808
15809   ;
15810   return 0;
15811 }
15812 _ACEOF
15813 if ac_fn_c_try_compile "$LINENO"; then :
15814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15815 $as_echo "yes" >&6; }
15816
15817 $as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
15818
15819
15820 else
15821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15822 $as_echo "no" >&6; }
15823
15824 fi
15825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15826
15827 for ac_func in strptime
15828 do :
15829   ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
15830 if test "x$ac_cv_func_strptime" = xyes; then :
15831   cat >>confdefs.h <<_ACEOF
15832 #define HAVE_STRPTIME 1
15833 _ACEOF
15834
15835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
15836 $as_echo_n "checking whether strptime works... " >&6; }
15837 if test c${cross_compiling} = cno; then
15838 if test "$cross_compiling" = yes; then :
15839   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15840 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15841 as_fn_error $? "cannot run test program while cross compiling
15842 See \`config.log' for more details" "$LINENO" 5; }
15843 else
15844   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15845 /* end confdefs.h.  */
15846
15847 #define _XOPEN_SOURCE 600
15848 #include <time.h>
15849 int main(void) { struct tm tm; char *res;
15850 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);
15851 if (!res) return 2;
15852 res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
15853 if (!res) return 1; return 0; }
15854
15855 _ACEOF
15856 if ac_fn_c_try_run "$LINENO"; then :
15857   eval "ac_cv_c_strptime_works=yes"
15858 else
15859   eval "ac_cv_c_strptime_works=no"
15860 fi
15861 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15862   conftest.$ac_objext conftest.beam conftest.$ac_ext
15863 fi
15864
15865 else
15866 eval "ac_cv_c_strptime_works=maybe"
15867 fi
15868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
15869 $as_echo "$ac_cv_c_strptime_works" >&6; }
15870 if test $ac_cv_c_strptime_works = no; then
15871 case " $LIBOBJS " in
15872   *" strptime.$ac_objext "* ) ;;
15873   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15874  ;;
15875 esac
15876
15877 else
15878
15879 cat >>confdefs.h <<_ACEOF
15880 #define STRPTIME_WORKS 1
15881 _ACEOF
15882
15883 fi
15884
15885 else
15886   case " $LIBOBJS " in
15887   *" strptime.$ac_objext "* ) ;;
15888   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15889  ;;
15890 esac
15891
15892 fi
15893 done
15894
15895
15896 # set memory allocation checking if requested
15897 # Check whether --enable-alloc-checks was given.
15898 if test "${enable_alloc_checks+set}" = set; then :
15899   enableval=$enable_alloc_checks;
15900 fi
15901
15902 # Check whether --enable-alloc-lite was given.
15903 if test "${enable_alloc_lite+set}" = set; then :
15904   enableval=$enable_alloc_lite;
15905 fi
15906
15907 # Check whether --enable-alloc-nonregional was given.
15908 if test "${enable_alloc_nonregional+set}" = set; then :
15909   enableval=$enable_alloc_nonregional;
15910 fi
15911
15912 if test x_$enable_alloc_nonregional = x_yes; then
15913
15914 $as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
15915
15916 fi
15917 if test x_$enable_alloc_checks = x_yes; then
15918
15919 $as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
15920
15921 else
15922         if test x_$enable_alloc_lite = x_yes; then
15923
15924 $as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
15925
15926         else
15927
15928         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15929 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15930         if test "$cross_compiling" = yes; then :
15931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
15932 $as_echo "no (crosscompile)" >&6; }
15933         case " $LIBOBJS " in
15934   *" malloc.$ac_objext "* ) ;;
15935   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15936  ;;
15937 esac
15938
15939
15940 cat >>confdefs.h <<_ACEOF
15941 #define malloc rpl_malloc_unbound
15942 _ACEOF
15943
15944 else
15945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15946 /* end confdefs.h.  */
15947 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
15948 #include <stdlib.h>
15949 #else
15950 char *malloc ();
15951 #endif
15952
15953 int
15954 main ()
15955 {
15956  if(malloc(0) != 0) return 1;
15957   ;
15958   return 0;
15959 }
15960
15961 _ACEOF
15962 if ac_fn_c_try_run "$LINENO"; then :
15963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15964 $as_echo "no" >&6; }
15965         case " $LIBOBJS " in
15966   *" malloc.$ac_objext "* ) ;;
15967   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15968  ;;
15969 esac
15970
15971
15972 cat >>confdefs.h <<_ACEOF
15973 #define malloc rpl_malloc_unbound
15974 _ACEOF
15975
15976 else
15977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15978 $as_echo "yes" >&6; }
15979
15980 $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
15981
15982 fi
15983 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15984   conftest.$ac_objext conftest.beam conftest.$ac_ext
15985 fi
15986
15987
15988         fi
15989 fi
15990
15991 # check windows threads (we use them, not pthreads, on windows).
15992 if test "$on_mingw" = "yes"; then
15993 # check windows threads
15994         for ac_header in windows.h
15995 do :
15996   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
15997 "
15998 if test "x$ac_cv_header_windows_h" = xyes; then :
15999   cat >>confdefs.h <<_ACEOF
16000 #define HAVE_WINDOWS_H 1
16001 _ACEOF
16002
16003 fi
16004
16005 done
16006
16007         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
16008 $as_echo_n "checking for CreateThread... " >&6; }
16009         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16010 /* end confdefs.h.  */
16011
16012 #ifdef HAVE_WINDOWS_H
16013 #include <windows.h>
16014 #endif
16015
16016 int
16017 main ()
16018 {
16019
16020         HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
16021
16022   ;
16023   return 0;
16024 }
16025 _ACEOF
16026 if ac_fn_c_try_compile "$LINENO"; then :
16027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16028 $as_echo "yes" >&6; }
16029
16030 $as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
16031
16032
16033 else
16034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16035 $as_echo "no" >&6; }
16036
16037 fi
16038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16039
16040 else
16041 # not on mingw, check thread libraries.
16042
16043 # check for thread library.
16044 # check this first, so that the pthread lib does not get linked in via
16045 # libssl or libpython, and thus distorts the tests, and we end up using
16046 # the non-threadsafe C libraries.
16047
16048 # Check whether --with-pthreads was given.
16049 if test "${with_pthreads+set}" = set; then :
16050   withval=$with_pthreads;
16051 else
16052    withval="yes"
16053 fi
16054
16055 ub_have_pthreads=no
16056 if test x_$withval != x_no; then
16057
16058
16059 ac_ext=c
16060 ac_cpp='$CPP $CPPFLAGS'
16061 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16062 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16063 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16064
16065 ax_pthread_ok=no
16066
16067 # We used to check for pthread.h first, but this fails if pthread.h
16068 # requires special compiler flags (e.g. on True64 or Sequent).
16069 # It gets checked for in the link test anyway.
16070
16071 # First of all, check if the user has set any of the PTHREAD_LIBS,
16072 # etcetera environment variables, and if threads linking works using
16073 # them:
16074 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16075         save_CFLAGS="$CFLAGS"
16076         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16077         save_LIBS="$LIBS"
16078         LIBS="$PTHREAD_LIBS $LIBS"
16079         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16080 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
16081         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16082 /* end confdefs.h.  */
16083
16084 /* Override any GCC internal prototype to avoid an error.
16085    Use char because int might match the return type of a GCC
16086    builtin and then its argument prototype would still apply.  */
16087 #ifdef __cplusplus
16088 extern "C"
16089 #endif
16090 char pthread_join ();
16091 int
16092 main ()
16093 {
16094 return pthread_join ();
16095   ;
16096   return 0;
16097 }
16098 _ACEOF
16099 if ac_fn_c_try_link "$LINENO"; then :
16100   ax_pthread_ok=yes
16101 fi
16102 rm -f core conftest.err conftest.$ac_objext \
16103     conftest$ac_exeext conftest.$ac_ext
16104         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16105 $as_echo "$ax_pthread_ok" >&6; }
16106         if test x"$ax_pthread_ok" = xno; then
16107                 PTHREAD_LIBS=""
16108                 PTHREAD_CFLAGS=""
16109         fi
16110         LIBS="$save_LIBS"
16111         CFLAGS="$save_CFLAGS"
16112 fi
16113
16114 # We must check for the threads library under a number of different
16115 # names; the ordering is very important because some systems
16116 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16117 # libraries is broken (non-POSIX).
16118
16119 # Create a list of thread flags to try.  Items starting with a "-" are
16120 # C compiler flags, and other items are library names, except for "none"
16121 # which indicates that we try without any flags at all, and "pthread-config"
16122 # which is a program returning the flags for the Pth emulation library.
16123
16124 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
16125
16126 # The ordering *is* (sometimes) important.  Some notes on the
16127 # individual items follow:
16128
16129 # pthreads: AIX (must check this before -lpthread)
16130 # none: in case threads are in libc; should be tried before -Kthread and
16131 #       other compiler flags to prevent continual compiler warnings
16132 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16133 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16134 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16135 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16136 # -pthreads: Solaris/gcc
16137 # -mthreads: Mingw32/gcc, Lynx/gcc
16138 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16139 #      doesn't hurt to check since this sometimes defines pthreads too;
16140 #      also defines -D_REENTRANT)
16141 #      ... -mt is also the pthreads flag for HP/aCC
16142 # pthread: Linux, etcetera
16143 # --thread-safe: KAI C++
16144 # pthread-config: use pthread-config program (for GNU Pth library)
16145
16146 case ${host_os} in
16147         solaris*)
16148
16149         # On Solaris (at least, for some versions), libc contains stubbed
16150         # (non-functional) versions of the pthreads routines, so link-based
16151         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
16152         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16153         # a function called by this macro, so we could check for that, but
16154         # who knows whether they'll stub that too in a future libc.)  So,
16155         # we'll just look for -pthreads and -lpthread first:
16156
16157         ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
16158         ;;
16159
16160         darwin*)
16161         ax_pthread_flags="-pthread $ax_pthread_flags"
16162         ;;
16163 esac
16164
16165 # Clang doesn't consider unrecognized options an error unless we specify
16166 # -Werror. We throw in some extra Clang-specific options to ensure that
16167 # this doesn't happen for GCC, which also accepts -Werror.
16168
16169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
16170 $as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
16171 save_CFLAGS="$CFLAGS"
16172 ax_pthread_extra_flags="-Werror"
16173 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
16174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16175 /* end confdefs.h.  */
16176 int foo(void);
16177 int
16178 main ()
16179 {
16180 foo()
16181   ;
16182   return 0;
16183 }
16184 _ACEOF
16185 if ac_fn_c_try_compile "$LINENO"; then :
16186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16187 $as_echo "yes" >&6; }
16188 else
16189   ax_pthread_extra_flags=
16190                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16191 $as_echo "no" >&6; }
16192 fi
16193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16194 CFLAGS="$save_CFLAGS"
16195
16196 if test x"$ax_pthread_ok" = xno; then
16197 for flag in $ax_pthread_flags; do
16198
16199         case $flag in
16200                 none)
16201                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
16202 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
16203                 ;;
16204
16205                 -*)
16206                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
16207 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
16208                 PTHREAD_CFLAGS="$flag"
16209                 ;;
16210
16211                 pthread-config)
16212                 # Extract the first word of "pthread-config", so it can be a program name with args.
16213 set dummy pthread-config; ac_word=$2
16214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16215 $as_echo_n "checking for $ac_word... " >&6; }
16216 if ${ac_cv_prog_ax_pthread_config+:} false; then :
16217   $as_echo_n "(cached) " >&6
16218 else
16219   if test -n "$ax_pthread_config"; then
16220   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
16221 else
16222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16223 for as_dir in $PATH
16224 do
16225   IFS=$as_save_IFS
16226   test -z "$as_dir" && as_dir=.
16227     for ac_exec_ext in '' $ac_executable_extensions; do
16228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16229     ac_cv_prog_ax_pthread_config="yes"
16230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16231     break 2
16232   fi
16233 done
16234   done
16235 IFS=$as_save_IFS
16236
16237   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
16238 fi
16239 fi
16240 ax_pthread_config=$ac_cv_prog_ax_pthread_config
16241 if test -n "$ax_pthread_config"; then
16242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
16243 $as_echo "$ax_pthread_config" >&6; }
16244 else
16245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16246 $as_echo "no" >&6; }
16247 fi
16248
16249
16250                 if test x"$ax_pthread_config" = xno; then continue; fi
16251                 PTHREAD_CFLAGS="`pthread-config --cflags`"
16252                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16253                 ;;
16254
16255                 *)
16256                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
16257 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
16258                 PTHREAD_LIBS="-l$flag"
16259                 ;;
16260         esac
16261
16262         save_LIBS="$LIBS"
16263         save_CFLAGS="$CFLAGS"
16264         LIBS="$PTHREAD_LIBS $LIBS"
16265         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
16266
16267         # Check for various functions.  We must include pthread.h,
16268         # since some functions may be macros.  (On the Sequent, we
16269         # need a special flag -Kthread to make this header compile.)
16270         # We check for pthread_join because it is in -lpthread on IRIX
16271         # while pthread_create is in libc.  We check for pthread_attr_init
16272         # due to DEC craziness with -lpthreads.  We check for
16273         # pthread_cleanup_push because it is one of the few pthread
16274         # functions on Solaris that doesn't have a non-functional libc stub.
16275         # We try pthread_create on general principles.
16276         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16277 /* end confdefs.h.  */
16278 #include <pthread.h>
16279                         static void routine(void *a) { *((int*)a) = 0; }
16280                         static void *start_routine(void *a) { return a; }
16281 int
16282 main ()
16283 {
16284 pthread_t th; pthread_attr_t attr;
16285                         pthread_create(&th, 0, start_routine, 0);
16286                         pthread_join(th, 0);
16287                         pthread_attr_init(&attr);
16288                         pthread_cleanup_push(routine, 0);
16289                         pthread_cleanup_pop(0) /* ; */
16290   ;
16291   return 0;
16292 }
16293 _ACEOF
16294 if ac_fn_c_try_link "$LINENO"; then :
16295   ax_pthread_ok=yes
16296 fi
16297 rm -f core conftest.err conftest.$ac_objext \
16298     conftest$ac_exeext conftest.$ac_ext
16299
16300         LIBS="$save_LIBS"
16301         CFLAGS="$save_CFLAGS"
16302
16303         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16304 $as_echo "$ax_pthread_ok" >&6; }
16305         if test "x$ax_pthread_ok" = xyes; then
16306                 break;
16307         fi
16308
16309         PTHREAD_LIBS=""
16310         PTHREAD_CFLAGS=""
16311 done
16312 fi
16313
16314 # Various other checks:
16315 if test "x$ax_pthread_ok" = xyes; then
16316         save_LIBS="$LIBS"
16317         LIBS="$PTHREAD_LIBS $LIBS"
16318         save_CFLAGS="$CFLAGS"
16319         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16320
16321         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
16322         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
16323 $as_echo_n "checking for joinable pthread attribute... " >&6; }
16324         attr_name=unknown
16325         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
16326             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16327 /* end confdefs.h.  */
16328 #include <pthread.h>
16329 int
16330 main ()
16331 {
16332 int attr = $attr; return attr /* ; */
16333   ;
16334   return 0;
16335 }
16336 _ACEOF
16337 if ac_fn_c_try_link "$LINENO"; then :
16338   attr_name=$attr; break
16339 fi
16340 rm -f core conftest.err conftest.$ac_objext \
16341     conftest$ac_exeext conftest.$ac_ext
16342         done
16343         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
16344 $as_echo "$attr_name" >&6; }
16345         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
16346
16347 cat >>confdefs.h <<_ACEOF
16348 #define PTHREAD_CREATE_JOINABLE $attr_name
16349 _ACEOF
16350
16351         fi
16352
16353         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
16354 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
16355         flag=no
16356         case ${host_os} in
16357             aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
16358             osf* | hpux*) flag="-D_REENTRANT";;
16359             solaris*)
16360             if test "$GCC" = "yes"; then
16361                 flag="-D_REENTRANT"
16362             else
16363                 # TODO: What about Clang on Solaris?
16364                 flag="-mt -D_REENTRANT"
16365             fi
16366             ;;
16367         esac
16368         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
16369 $as_echo "$flag" >&6; }
16370         if test "x$flag" != xno; then
16371             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16372         fi
16373
16374         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
16375 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
16376 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
16377   $as_echo_n "(cached) " >&6
16378 else
16379
16380                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16381 /* end confdefs.h.  */
16382 #include <pthread.h>
16383 int
16384 main ()
16385 {
16386 int i = PTHREAD_PRIO_INHERIT;
16387   ;
16388   return 0;
16389 }
16390 _ACEOF
16391 if ac_fn_c_try_link "$LINENO"; then :
16392   ax_cv_PTHREAD_PRIO_INHERIT=yes
16393 else
16394   ax_cv_PTHREAD_PRIO_INHERIT=no
16395 fi
16396 rm -f core conftest.err conftest.$ac_objext \
16397     conftest$ac_exeext conftest.$ac_ext
16398
16399 fi
16400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
16401 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
16402         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
16403
16404 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
16405
16406 fi
16407
16408         LIBS="$save_LIBS"
16409         CFLAGS="$save_CFLAGS"
16410
16411         # More AIX lossage: compile with *_r variant
16412         if test "x$GCC" != xyes; then
16413             case $host_os in
16414                 aix*)
16415                 case "x/$CC" in #(
16416   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
16417     #handle absolute path differently from PATH based program lookup
16418                    case "x$CC" in #(
16419   x/*) :
16420     if as_fn_executable_p ${CC}_r; then :
16421   PTHREAD_CC="${CC}_r"
16422 fi ;; #(
16423   *) :
16424     for ac_prog in ${CC}_r
16425 do
16426   # Extract the first word of "$ac_prog", so it can be a program name with args.
16427 set dummy $ac_prog; ac_word=$2
16428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16429 $as_echo_n "checking for $ac_word... " >&6; }
16430 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
16431   $as_echo_n "(cached) " >&6
16432 else
16433   if test -n "$PTHREAD_CC"; then
16434   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16435 else
16436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16437 for as_dir in $PATH
16438 do
16439   IFS=$as_save_IFS
16440   test -z "$as_dir" && as_dir=.
16441     for ac_exec_ext in '' $ac_executable_extensions; do
16442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16443     ac_cv_prog_PTHREAD_CC="$ac_prog"
16444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16445     break 2
16446   fi
16447 done
16448   done
16449 IFS=$as_save_IFS
16450
16451 fi
16452 fi
16453 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16454 if test -n "$PTHREAD_CC"; then
16455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
16456 $as_echo "$PTHREAD_CC" >&6; }
16457 else
16458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16459 $as_echo "no" >&6; }
16460 fi
16461
16462
16463   test -n "$PTHREAD_CC" && break
16464 done
16465 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16466  ;;
16467 esac ;; #(
16468   *) :
16469      ;;
16470 esac
16471                 ;;
16472             esac
16473         fi
16474 fi
16475
16476 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16477
16478
16479
16480
16481
16482 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16483 if test x"$ax_pthread_ok" = xyes; then
16484
16485
16486 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
16487
16488                 if test -n "$PTHREAD_LIBS"; then
16489                   LIBS="$PTHREAD_LIBS $LIBS"
16490                 fi
16491                 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16492                 CC="$PTHREAD_CC"
16493                 ub_have_pthreads=yes
16494                 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
16495 "
16496 if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
16497
16498 cat >>confdefs.h <<_ACEOF
16499 #define HAVE_PTHREAD_SPINLOCK_T 1
16500 _ACEOF
16501
16502
16503 fi
16504 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
16505 "
16506 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
16507
16508 cat >>confdefs.h <<_ACEOF
16509 #define HAVE_PTHREAD_RWLOCK_T 1
16510 _ACEOF
16511
16512
16513 fi
16514
16515
16516                 if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
16517                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
16518 $as_echo_n "checking if -pthread unused during linking... " >&6; }
16519                 # catch clang warning 'argument unused during compilation'
16520                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16521 /* end confdefs.h.  */
16522 $ac_includes_default
16523
16524 int main(void) {return 0;}
16525
16526 _ACEOF
16527                 pthread_unused="yes"
16528                 # first compile
16529                 echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
16530                 $CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
16531                 if test $? = 0; then
16532                         # then link
16533                         echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
16534                         $CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
16535                         if test $? -ne 0; then
16536                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16537 $as_echo "yes" >&6; }
16538                                 CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
16539                                 PTHREAD_CFLAGS_ONLY="-pthread"
16540
16541                         else
16542                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16543 $as_echo "no" >&6; }
16544                         fi
16545                 else
16546                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16547 $as_echo "no" >&6; }
16548                 fi # endif cc successful
16549                 rm -f conftest conftest.c conftest.o
16550                 fi # endif -pthread in CFLAGS
16551
16552
16553         :
16554 else
16555         ax_pthread_ok=no
16556
16557 fi
16558 ac_ext=c
16559 ac_cpp='$CPP $CPPFLAGS'
16560 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16561 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16562 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16563
16564
16565 fi
16566
16567 # check solaris thread library
16568
16569 # Check whether --with-solaris-threads was given.
16570 if test "${with_solaris_threads+set}" = set; then :
16571   withval=$with_solaris_threads;
16572 else
16573    withval="no"
16574 fi
16575
16576 ub_have_sol_threads=no
16577 if test x_$withval != x_no; then
16578         if test x_$ub_have_pthreads != x_no; then
16579             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
16580 $as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
16581         else
16582         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
16583 $as_echo_n "checking for library containing thr_create... " >&6; }
16584 if ${ac_cv_search_thr_create+:} false; then :
16585   $as_echo_n "(cached) " >&6
16586 else
16587   ac_func_search_save_LIBS=$LIBS
16588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16589 /* end confdefs.h.  */
16590
16591 /* Override any GCC internal prototype to avoid an error.
16592    Use char because int might match the return type of a GCC
16593    builtin and then its argument prototype would still apply.  */
16594 #ifdef __cplusplus
16595 extern "C"
16596 #endif
16597 char thr_create ();
16598 int
16599 main ()
16600 {
16601 return thr_create ();
16602   ;
16603   return 0;
16604 }
16605 _ACEOF
16606 for ac_lib in '' thread; do
16607   if test -z "$ac_lib"; then
16608     ac_res="none required"
16609   else
16610     ac_res=-l$ac_lib
16611     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16612   fi
16613   if ac_fn_c_try_link "$LINENO"; then :
16614   ac_cv_search_thr_create=$ac_res
16615 fi
16616 rm -f core conftest.err conftest.$ac_objext \
16617     conftest$ac_exeext
16618   if ${ac_cv_search_thr_create+:} false; then :
16619   break
16620 fi
16621 done
16622 if ${ac_cv_search_thr_create+:} false; then :
16623
16624 else
16625   ac_cv_search_thr_create=no
16626 fi
16627 rm conftest.$ac_ext
16628 LIBS=$ac_func_search_save_LIBS
16629 fi
16630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
16631 $as_echo "$ac_cv_search_thr_create" >&6; }
16632 ac_res=$ac_cv_search_thr_create
16633 if test "$ac_res" != no; then :
16634   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16635
16636
16637 $as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
16638
16639
16640
16641
16642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
16643 $as_echo_n "checking whether $CC supports -mt... " >&6; }
16644 cache=`echo mt | sed 'y%.=/+-%___p_%'`
16645 if eval \${cv_prog_cc_flag_$cache+:} false; then :
16646   $as_echo_n "(cached) " >&6
16647 else
16648
16649 echo 'void f(void){}' >conftest.c
16650 if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
16651 eval "cv_prog_cc_flag_$cache=yes"
16652 else
16653 eval "cv_prog_cc_flag_$cache=no"
16654 fi
16655 rm -f conftest conftest.o conftest.c
16656
16657 fi
16658
16659 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
16660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16661 $as_echo "yes" >&6; }
16662 :
16663 CFLAGS="$CFLAGS -mt"
16664 else
16665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16666 $as_echo "no" >&6; }
16667 :
16668 CFLAGS="$CFLAGS -D_REENTRANT"
16669 fi
16670
16671                 ub_have_sol_threads=yes
16672
16673 else
16674
16675                 as_fn_error $? "no solaris threads found." "$LINENO" 5
16676
16677 fi
16678
16679         fi
16680 fi
16681
16682 fi # end of non-mingw check of thread libraries
16683
16684 # Check for PyUnbound
16685
16686 # Check whether --with-pyunbound was given.
16687 if test "${with_pyunbound+set}" = set; then :
16688   withval=$with_pyunbound;
16689 else
16690    withval="no"
16691 fi
16692
16693
16694 ub_test_python=no
16695 ub_with_pyunbound=no
16696 if test x_$withval != x_no; then
16697    ub_with_pyunbound=yes
16698    ub_test_python=yes
16699 fi
16700
16701 # Check for Python module
16702
16703 # Check whether --with-pythonmodule was given.
16704 if test "${with_pythonmodule+set}" = set; then :
16705   withval=$with_pythonmodule;
16706 else
16707    withval="no"
16708 fi
16709
16710
16711 ub_with_pythonmod=no
16712 if test x_$withval != x_no; then
16713    ub_with_pythonmod=yes
16714    ub_test_python=yes
16715 fi
16716
16717 # Check for Python & SWIG only on PyUnbound or PyModule
16718 if test x_$ub_test_python != x_no; then
16719
16720    # Check for Python
16721    ub_have_python=no
16722    ac_save_LIBS="$LIBS"
16723         #
16724         # Allow the use of a (user set) custom python version
16725         #
16726
16727
16728         # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
16729 set dummy python$PYTHON_VERSION; ac_word=$2
16730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16731 $as_echo_n "checking for $ac_word... " >&6; }
16732 if ${ac_cv_path_PYTHON+:} false; then :
16733   $as_echo_n "(cached) " >&6
16734 else
16735   case $PYTHON in
16736   [\\/]* | ?:[\\/]*)
16737   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
16738   ;;
16739   *)
16740   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16741 for as_dir in $PATH
16742 do
16743   IFS=$as_save_IFS
16744   test -z "$as_dir" && as_dir=.
16745     for ac_exec_ext in '' $ac_executable_extensions; do
16746   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16747     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
16748     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16749     break 2
16750   fi
16751 done
16752   done
16753 IFS=$as_save_IFS
16754
16755   ;;
16756 esac
16757 fi
16758 PYTHON=$ac_cv_path_PYTHON
16759 if test -n "$PYTHON"; then
16760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
16761 $as_echo "$PYTHON" >&6; }
16762 else
16763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16764 $as_echo "no" >&6; }
16765 fi
16766
16767
16768         if test -z "$PYTHON"; then
16769            as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
16770            PYTHON_VERSION=""
16771         fi
16772
16773         if test -z "$PYTHON_VERSION"; then
16774                 PYTHON_VERSION=`$PYTHON -c "import sys; \
16775                         print(sys.version.split()[0])"`
16776         fi
16777
16778         #
16779         # Check if you have distutils, else fail
16780         #
16781         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
16782 $as_echo_n "checking for the distutils Python package... " >&6; }
16783         if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then
16784                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16785 $as_echo "yes" >&6; }
16786         else
16787                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16788 $as_echo "no" >&6; }
16789                 as_fn_error $? "cannot import Python module \"distutils\".
16790 Please check your Python installation. The error was:
16791 $ac_distutils_result" "$LINENO" 5
16792                 PYTHON_VERSION=""
16793         fi
16794
16795         #
16796         # Check for Python include path
16797         #
16798         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
16799 $as_echo_n "checking for Python include path... " >&6; }
16800         if test -z "$PYTHON_CPPFLAGS"; then
16801                 python_path=`$PYTHON -c "import distutils.sysconfig; \
16802                         print(distutils.sysconfig.get_python_inc());"`
16803                 if test -n "${python_path}"; then
16804                         python_path="-I$python_path"
16805                 fi
16806                 PYTHON_CPPFLAGS=$python_path
16807         fi
16808         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
16809 $as_echo "$PYTHON_CPPFLAGS" >&6; }
16810
16811
16812         #
16813         # Check for Python library path
16814         #
16815         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
16816 $as_echo_n "checking for Python library path... " >&6; }
16817         if test -z "$PYTHON_LDFLAGS"; then
16818                 PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
16819                         print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
16820         fi
16821         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
16822 $as_echo "$PYTHON_LDFLAGS" >&6; }
16823
16824
16825         #
16826         # Check for site packages
16827         #
16828         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
16829 $as_echo_n "checking for Python site-packages path... " >&6; }
16830         if test -z "$PYTHON_SITE_PKG"; then
16831                 PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
16832                         print(distutils.sysconfig.get_python_lib(1,0));"`
16833         fi
16834         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
16835 $as_echo "$PYTHON_SITE_PKG" >&6; }
16836
16837
16838         #
16839         # final check to see if everything compiles alright
16840         #
16841         { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
16842 $as_echo_n "checking consistency of all components of python development environment... " >&6; }
16843         ac_ext=c
16844 ac_cpp='$CPP $CPPFLAGS'
16845 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16846 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16847 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16848
16849         # save current global flags
16850         ac_save_LIBS="$LIBS"
16851         ac_save_CPPFLAGS="$CPPFLAGS"
16852
16853         LIBS="$LIBS $PYTHON_LDFLAGS"
16854         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16855         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16856 /* end confdefs.h.  */
16857
16858                 #include <Python.h>
16859
16860 int
16861 main ()
16862 {
16863
16864                 Py_Initialize();
16865
16866   ;
16867   return 0;
16868 }
16869 _ACEOF
16870 if ac_fn_c_try_link "$LINENO"; then :
16871   pythonexists=yes
16872 else
16873   pythonexists=no
16874 fi
16875 rm -f core conftest.err conftest.$ac_objext \
16876     conftest$ac_exeext conftest.$ac_ext
16877
16878         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
16879 $as_echo "$pythonexists" >&6; }
16880
16881         if test ! "$pythonexists" = "yes"; then
16882            as_fn_error $? "
16883   Could not link test program to Python. Maybe the main Python library has been
16884   installed in some non-standard library path. If so, pass it to configure,
16885   via the LDFLAGS environment variable.
16886   Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
16887   ============================================================================
16888    ERROR!
16889    You probably have to install the development version of the Python package
16890    for your distribution.  The exact name of this package varies among them.
16891   ============================================================================
16892            " "$LINENO" 5
16893           PYTHON_VERSION=""
16894         fi
16895         ac_ext=c
16896 ac_cpp='$CPP $CPPFLAGS'
16897 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16898 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16899 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16900
16901         # turn back to default flags
16902         CPPFLAGS="$ac_save_CPPFLAGS"
16903         LIBS="$ac_save_LIBS"
16904
16905         #
16906         # all done!
16907         #
16908
16909    if test ! -z "$PYTHON_VERSION"; then
16910         if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
16911                 as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
16912         fi
16913
16914       PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
16915
16916       # Have Python
16917
16918 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
16919
16920       if test -n "$LIBS"; then
16921         LIBS="$PYTHON_LDFLAGS $LIBS"
16922       else
16923         LIBS="$PYTHON_LDFLAGS"
16924       fi
16925       if test -n "$CPPFLAGS"; then
16926         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16927       else
16928         CPPFLAGS="$PYTHON_CPPFLAGS"
16929       fi
16930       ub_have_python=yes
16931       PC_PY_DEPENDENCY="python"
16932
16933
16934       # Check for SWIG
16935       ub_have_swig=no
16936       # Check whether --enable-swig-version-check was given.
16937 if test "${enable_swig_version_check+set}" = set; then :
16938   enableval=$enable_swig_version_check;
16939 fi
16940
16941       if test "$enable_swig_version_check" = "yes"; then
16942
16943         # Extract the first word of "swig", so it can be a program name with args.
16944 set dummy swig; ac_word=$2
16945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16946 $as_echo_n "checking for $ac_word... " >&6; }
16947 if ${ac_cv_path_SWIG+:} false; then :
16948   $as_echo_n "(cached) " >&6
16949 else
16950   case $SWIG in
16951   [\\/]* | ?:[\\/]*)
16952   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
16953   ;;
16954   *)
16955   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16956 for as_dir in $PATH
16957 do
16958   IFS=$as_save_IFS
16959   test -z "$as_dir" && as_dir=.
16960     for ac_exec_ext in '' $ac_executable_extensions; do
16961   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16962     ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
16963     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16964     break 2
16965   fi
16966 done
16967   done
16968 IFS=$as_save_IFS
16969
16970   ;;
16971 esac
16972 fi
16973 SWIG=$ac_cv_path_SWIG
16974 if test -n "$SWIG"; then
16975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
16976 $as_echo "$SWIG" >&6; }
16977 else
16978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16979 $as_echo "no" >&6; }
16980 fi
16981
16982
16983         if test -z "$SWIG" ; then
16984                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
16985 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
16986                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
16987         elif test -n "2.0.1" ; then
16988                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
16989 $as_echo_n "checking for SWIG version... " >&6; }
16990                 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'`
16991                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
16992 $as_echo "$swig_version" >&6; }
16993                 if test -n "$swig_version" ; then
16994                         # Calculate the required version number components
16995                         required=2.0.1
16996                         required_major=`echo $required | sed 's/[^0-9].*//'`
16997                         if test -z "$required_major" ; then
16998                                 required_major=0
16999                         fi
17000                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17001                         required_minor=`echo $required | sed 's/[^0-9].*//'`
17002                         if test -z "$required_minor" ; then
17003                                 required_minor=0
17004                         fi
17005                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17006                         required_patch=`echo $required | sed 's/[^0-9].*//'`
17007                         if test -z "$required_patch" ; then
17008                                 required_patch=0
17009                         fi
17010                         # Calculate the available version number components
17011                         available=$swig_version
17012                         available_major=`echo $available | sed 's/[^0-9].*//'`
17013                         if test -z "$available_major" ; then
17014                                 available_major=0
17015                         fi
17016                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17017                         available_minor=`echo $available | sed 's/[^0-9].*//'`
17018                         if test -z "$available_minor" ; then
17019                                 available_minor=0
17020                         fi
17021                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17022                         available_patch=`echo $available | sed 's/[^0-9].*//'`
17023                         if test -z "$available_patch" ; then
17024                                 available_patch=0
17025                         fi
17026                         badversion=0
17027                         if test $available_major -lt $required_major ; then
17028                                 badversion=1
17029                         fi
17030                         if test $available_major -eq $required_major \
17031                                 -a $available_minor -lt $required_minor ; then
17032                                 badversion=1
17033                         fi
17034                         if test $available_major -eq $required_major \
17035                                 -a $available_minor -eq $required_minor \
17036                                 -a $available_patch -lt $required_patch ; then
17037                                 badversion=1
17038                         fi
17039                         if test $badversion -eq 1 ; then
17040                                 { $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
17041 $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;}
17042                                 SWIG='echo "Error: SWIG version >= 2.0.1 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17043                         else
17044                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17045 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17046                                 SWIG_LIB=`$SWIG -swiglib`
17047                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17048 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17049                         fi
17050                 else
17051                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17052 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17053                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17054                 fi
17055         fi
17056
17057
17058       else
17059
17060         # Extract the first word of "swig", so it can be a program name with args.
17061 set dummy swig; ac_word=$2
17062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17063 $as_echo_n "checking for $ac_word... " >&6; }
17064 if ${ac_cv_path_SWIG+:} false; then :
17065   $as_echo_n "(cached) " >&6
17066 else
17067   case $SWIG in
17068   [\\/]* | ?:[\\/]*)
17069   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17070   ;;
17071   *)
17072   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17073 for as_dir in $PATH
17074 do
17075   IFS=$as_save_IFS
17076   test -z "$as_dir" && as_dir=.
17077     for ac_exec_ext in '' $ac_executable_extensions; do
17078   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17079     ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17080     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17081     break 2
17082   fi
17083 done
17084   done
17085 IFS=$as_save_IFS
17086
17087   ;;
17088 esac
17089 fi
17090 SWIG=$ac_cv_path_SWIG
17091 if test -n "$SWIG"; then
17092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17093 $as_echo "$SWIG" >&6; }
17094 else
17095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17096 $as_echo "no" >&6; }
17097 fi
17098
17099
17100         if test -z "$SWIG" ; then
17101                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17102 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17103                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17104         elif test -n "" ; then
17105                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17106 $as_echo_n "checking for SWIG version... " >&6; }
17107                 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'`
17108                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17109 $as_echo "$swig_version" >&6; }
17110                 if test -n "$swig_version" ; then
17111                         # Calculate the required version number components
17112                         required=
17113                         required_major=`echo $required | sed 's/[^0-9].*//'`
17114                         if test -z "$required_major" ; then
17115                                 required_major=0
17116                         fi
17117                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17118                         required_minor=`echo $required | sed 's/[^0-9].*//'`
17119                         if test -z "$required_minor" ; then
17120                                 required_minor=0
17121                         fi
17122                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17123                         required_patch=`echo $required | sed 's/[^0-9].*//'`
17124                         if test -z "$required_patch" ; then
17125                                 required_patch=0
17126                         fi
17127                         # Calculate the available version number components
17128                         available=$swig_version
17129                         available_major=`echo $available | sed 's/[^0-9].*//'`
17130                         if test -z "$available_major" ; then
17131                                 available_major=0
17132                         fi
17133                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17134                         available_minor=`echo $available | sed 's/[^0-9].*//'`
17135                         if test -z "$available_minor" ; then
17136                                 available_minor=0
17137                         fi
17138                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17139                         available_patch=`echo $available | sed 's/[^0-9].*//'`
17140                         if test -z "$available_patch" ; then
17141                                 available_patch=0
17142                         fi
17143                         badversion=0
17144                         if test $available_major -lt $required_major ; then
17145                                 badversion=1
17146                         fi
17147                         if test $available_major -eq $required_major \
17148                                 -a $available_minor -lt $required_minor ; then
17149                                 badversion=1
17150                         fi
17151                         if test $available_major -eq $required_major \
17152                                 -a $available_minor -eq $required_minor \
17153                                 -a $available_patch -lt $required_patch ; then
17154                                 badversion=1
17155                         fi
17156                         if test $badversion -eq 1 ; then
17157                                 { $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
17158 $as_echo "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
17159                                 SWIG='echo "Error: SWIG version >=  is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17160                         else
17161                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17162 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17163                                 SWIG_LIB=`$SWIG -swiglib`
17164                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17165 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17166                         fi
17167                 else
17168                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17169 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17170                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17171                 fi
17172         fi
17173
17174
17175       fi
17176       { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
17177 $as_echo_n "checking SWIG... " >&6; }
17178       if test ! -x "$SWIG"; then
17179          as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
17180       else
17181
17182 $as_echo "#define HAVE_SWIG 1" >>confdefs.h
17183
17184          swig="$SWIG"
17185
17186          { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
17187 $as_echo "present" >&6; }
17188
17189          # If have Python & SWIG
17190          # Declare PythonMod
17191          if test x_$ub_with_pythonmod != x_no; then
17192
17193 $as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
17194
17195             WITH_PYTHONMODULE=yes
17196
17197             PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
17198
17199             PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
17200
17201             PYTHONMOD_INSTALL=pythonmod-install
17202
17203             PYTHONMOD_UNINSTALL=pythonmod-uninstall
17204
17205          fi
17206
17207          # Declare PyUnbound
17208          if test x_$ub_with_pyunbound != x_no; then
17209
17210 $as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
17211
17212             WITH_PYUNBOUND=yes
17213
17214             PYUNBOUND_OBJ="libunbound_wrap.lo"
17215
17216             PYUNBOUND_TARGET="_unbound.la"
17217
17218             PYUNBOUND_INSTALL=pyunbound-install
17219
17220             PYUNBOUND_UNINSTALL=pyunbound-uninstall
17221
17222          fi
17223       fi
17224    else
17225       { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
17226 $as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
17227       ub_with_pyunbound=no
17228       ub_with_pythonmod=no
17229    fi
17230 fi
17231
17232 if test "`uname`" = "NetBSD"; then
17233         NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
17234
17235 fi
17236 CONFIG_DATE=`date +%Y%m%d`
17237
17238
17239 # Checks for libraries.
17240
17241 # libnss
17242 USE_NSS="no"
17243
17244 # Check whether --with-nss was given.
17245 if test "${with_nss+set}" = set; then :
17246   withval=$with_nss;
17247         USE_NSS="yes"
17248
17249 $as_echo "#define HAVE_NSS 1" >>confdefs.h
17250
17251         if test "$withval" != "" -a "$withval" != "yes"; then
17252                 CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
17253                 LDFLAGS="$LDFLAGS -L$withval/lib"
17254
17255         if test "x$enable_rpath" = xyes; then
17256                 if echo "$withval/lib" | grep "^/" >/dev/null; then
17257                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17258                 fi
17259         fi
17260
17261                 CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
17262         else
17263                 CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
17264                 CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
17265         fi
17266         LIBS="$LIBS -lnss3 -lnspr4"
17267         SSLLIB=""
17268
17269
17270 fi
17271
17272
17273 # libnettle
17274 USE_NETTLE="no"
17275
17276 # Check whether --with-nettle was given.
17277 if test "${with_nettle+set}" = set; then :
17278   withval=$with_nettle;
17279         USE_NETTLE="yes"
17280
17281 $as_echo "#define HAVE_NETTLE 1" >>confdefs.h
17282
17283         for ac_header in nettle/dsa-compat.h
17284 do :
17285   ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
17286 "
17287 if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then :
17288   cat >>confdefs.h <<_ACEOF
17289 #define HAVE_NETTLE_DSA_COMPAT_H 1
17290 _ACEOF
17291
17292 fi
17293
17294 done
17295
17296         if test "$withval" != "" -a "$withval" != "yes"; then
17297                 CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
17298                 LDFLAGS="$LDFLAGS -L$withval/lib"
17299
17300         if test "x$enable_rpath" = xyes; then
17301                 if echo "$withval/lib" | grep "^/" >/dev/null; then
17302                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17303                 fi
17304         fi
17305
17306         else
17307                 CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
17308         fi
17309         LIBS="$LIBS -lhogweed -lnettle -lgmp"
17310         SSLLIB=""
17311
17312
17313 fi
17314
17315
17316 # openssl
17317 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17318
17319
17320 # Check whether --with-ssl was given.
17321 if test "${with_ssl+set}" = set; then :
17322   withval=$with_ssl;
17323
17324 else
17325
17326             withval="yes"
17327
17328 fi
17329
17330     if test x_$withval = x_no; then
17331         as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
17332     fi
17333
17334     withval=$withval
17335     if test x_$withval != x_no; then
17336         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
17337 $as_echo_n "checking for SSL... " >&6; }
17338         if test x_$withval = x_ -o x_$withval = x_yes; then
17339             withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
17340         fi
17341         for dir in $withval; do
17342             ssldir="$dir"
17343             if test -f "$dir/include/openssl/ssl.h"; then
17344                 found_ssl="yes"
17345
17346 cat >>confdefs.h <<_ACEOF
17347 #define HAVE_SSL /**/
17348 _ACEOF
17349
17350                                 if test "$ssldir" != "/usr"; then
17351                         CPPFLAGS="$CPPFLAGS -I$ssldir/include"
17352                         LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
17353                 fi
17354                 break;
17355             fi
17356         done
17357         if test x_$found_ssl != x_yes; then
17358             as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
17359         else
17360             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
17361 $as_echo "found in $ssldir" >&6; }
17362             HAVE_SSL=yes
17363                         if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
17364                 LDFLAGS="$LDFLAGS -L$ssldir/lib"
17365                 LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
17366
17367         if test "x$enable_rpath" = xyes; then
17368                 if echo "$ssldir/lib" | grep "^/" >/dev/null; then
17369                         RUNTIME_PATH="$RUNTIME_PATH -R$ssldir/lib"
17370                 fi
17371         fi
17372
17373             fi
17374
17375             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_Update in -lcrypto" >&5
17376 $as_echo_n "checking for HMAC_Update in -lcrypto... " >&6; }
17377             LIBS="$LIBS -lcrypto"
17378             LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
17379             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17380 /* end confdefs.h.  */
17381
17382 int
17383 main ()
17384 {
17385
17386                 int HMAC_Update(void);
17387                 (void)HMAC_Update();
17388
17389   ;
17390   return 0;
17391 }
17392 _ACEOF
17393 if ac_fn_c_try_link "$LINENO"; then :
17394
17395                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17396 $as_echo "yes" >&6; }
17397
17398 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17399
17400
17401 else
17402
17403                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17404 $as_echo "no" >&6; }
17405                 # check if -lwsock32 or -lgdi32 are needed.
17406                 BAKLIBS="$LIBS"
17407                 BAKSSLLIBS="$LIBSSL_LIBS"
17408                 LIBS="$LIBS -lgdi32 -lws2_32"
17409                 LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
17410                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
17411 $as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
17412                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17413 /* end confdefs.h.  */
17414
17415 int
17416 main ()
17417 {
17418
17419                     int HMAC_Update(void);
17420                     (void)HMAC_Update();
17421
17422   ;
17423   return 0;
17424 }
17425 _ACEOF
17426 if ac_fn_c_try_link "$LINENO"; then :
17427
17428
17429 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17430
17431                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17432 $as_echo "yes" >&6; }
17433
17434 else
17435
17436                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17437 $as_echo "no" >&6; }
17438                     LIBS="$BAKLIBS"
17439                     LIBSSL_LIBS="$BAKSSLLIBS"
17440                     LIBS="$LIBS -ldl"
17441                     LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
17442                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
17443 $as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
17444                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17445 /* end confdefs.h.  */
17446
17447 int
17448 main ()
17449 {
17450
17451                         int HMAC_Update(void);
17452                         (void)HMAC_Update();
17453
17454   ;
17455   return 0;
17456 }
17457 _ACEOF
17458 if ac_fn_c_try_link "$LINENO"; then :
17459
17460
17461 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17462
17463                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17464 $as_echo "yes" >&6; }
17465
17466 else
17467
17468                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17469 $as_echo "no" >&6; }
17470                         LIBS="$BAKLIBS"
17471                         LIBSSL_LIBS="$BAKSSLLIBS"
17472                         LIBS="$LIBS -ldl -pthread"
17473                         LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
17474                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
17475 $as_echo_n "checking if -lcrypto needs -ldl -pthread... " >&6; }
17476                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17477 /* end confdefs.h.  */
17478
17479 int
17480 main ()
17481 {
17482
17483                             int HMAC_Update(void);
17484                             (void)HMAC_Update();
17485
17486   ;
17487   return 0;
17488 }
17489 _ACEOF
17490 if ac_fn_c_try_link "$LINENO"; then :
17491
17492
17493 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17494
17495                             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17496 $as_echo "yes" >&6; }
17497
17498 else
17499
17500                             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17501 $as_echo "no" >&6; }
17502                             as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
17503
17504 fi
17505 rm -f core conftest.err conftest.$ac_objext \
17506     conftest$ac_exeext conftest.$ac_ext
17507
17508 fi
17509 rm -f core conftest.err conftest.$ac_objext \
17510     conftest$ac_exeext conftest.$ac_ext
17511
17512 fi
17513 rm -f core conftest.err conftest.$ac_objext \
17514     conftest$ac_exeext conftest.$ac_ext
17515
17516 fi
17517 rm -f core conftest.err conftest.$ac_objext \
17518     conftest$ac_exeext conftest.$ac_ext
17519         fi
17520
17521
17522     fi
17523 for ac_header in openssl/ssl.h
17524 do :
17525   ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
17526 "
17527 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
17528   cat >>confdefs.h <<_ACEOF
17529 #define HAVE_OPENSSL_SSL_H 1
17530 _ACEOF
17531
17532 fi
17533
17534 done
17535
17536 for ac_header in openssl/err.h
17537 do :
17538   ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
17539 "
17540 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
17541   cat >>confdefs.h <<_ACEOF
17542 #define HAVE_OPENSSL_ERR_H 1
17543 _ACEOF
17544
17545 fi
17546
17547 done
17548
17549 for ac_header in openssl/rand.h
17550 do :
17551   ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
17552 "
17553 if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
17554   cat >>confdefs.h <<_ACEOF
17555 #define HAVE_OPENSSL_RAND_H 1
17556 _ACEOF
17557
17558 fi
17559
17560 done
17561
17562
17563
17564
17565 # check if libssl needs libdl
17566 BAKLIBS="$LIBS"
17567 LIBS="-lssl $LIBS"
17568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
17569 $as_echo_n "checking if libssl needs libdl... " >&6; }
17570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17571 /* end confdefs.h.  */
17572
17573 /* Override any GCC internal prototype to avoid an error.
17574    Use char because int might match the return type of a GCC
17575    builtin and then its argument prototype would still apply.  */
17576 #ifdef __cplusplus
17577 extern "C"
17578 #endif
17579 char SSL_CTX_new ();
17580 int
17581 main ()
17582 {
17583 return SSL_CTX_new ();
17584   ;
17585   return 0;
17586 }
17587 _ACEOF
17588 if ac_fn_c_try_link "$LINENO"; then :
17589
17590         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17591 $as_echo "no" >&6; }
17592         LIBS="$BAKLIBS"
17593
17594 else
17595
17596         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17597 $as_echo "yes" >&6; }
17598         LIBS="$BAKLIBS"
17599         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17600 $as_echo_n "checking for library containing dlopen... " >&6; }
17601 if ${ac_cv_search_dlopen+:} false; then :
17602   $as_echo_n "(cached) " >&6
17603 else
17604   ac_func_search_save_LIBS=$LIBS
17605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17606 /* end confdefs.h.  */
17607
17608 /* Override any GCC internal prototype to avoid an error.
17609    Use char because int might match the return type of a GCC
17610    builtin and then its argument prototype would still apply.  */
17611 #ifdef __cplusplus
17612 extern "C"
17613 #endif
17614 char dlopen ();
17615 int
17616 main ()
17617 {
17618 return dlopen ();
17619   ;
17620   return 0;
17621 }
17622 _ACEOF
17623 for ac_lib in '' dl; do
17624   if test -z "$ac_lib"; then
17625     ac_res="none required"
17626   else
17627     ac_res=-l$ac_lib
17628     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17629   fi
17630   if ac_fn_c_try_link "$LINENO"; then :
17631   ac_cv_search_dlopen=$ac_res
17632 fi
17633 rm -f core conftest.err conftest.$ac_objext \
17634     conftest$ac_exeext
17635   if ${ac_cv_search_dlopen+:} false; then :
17636   break
17637 fi
17638 done
17639 if ${ac_cv_search_dlopen+:} false; then :
17640
17641 else
17642   ac_cv_search_dlopen=no
17643 fi
17644 rm conftest.$ac_ext
17645 LIBS=$ac_func_search_save_LIBS
17646 fi
17647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17648 $as_echo "$ac_cv_search_dlopen" >&6; }
17649 ac_res=$ac_cv_search_dlopen
17650 if test "$ac_res" != no; then :
17651   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17652
17653 fi
17654
17655
17656 fi
17657 rm -f core conftest.err conftest.$ac_objext \
17658     conftest$ac_exeext conftest.$ac_ext
17659 SSLLIB="-lssl"
17660
17661 # check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
17662 BAKLIBS="$LIBS"
17663 LIBS="-lssl $LIBS"
17664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
17665 $as_echo_n "checking if libssl needs -lcrypt32... " >&6; }
17666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17667 /* end confdefs.h.  */
17668
17669 /* Override any GCC internal prototype to avoid an error.
17670    Use char because int might match the return type of a GCC
17671    builtin and then its argument prototype would still apply.  */
17672 #ifdef __cplusplus
17673 extern "C"
17674 #endif
17675 char HMAC_Update ();
17676 int
17677 main ()
17678 {
17679 return HMAC_Update ();
17680   ;
17681   return 0;
17682 }
17683 _ACEOF
17684 if ac_fn_c_try_link "$LINENO"; then :
17685
17686         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17687 $as_echo "no" >&6; }
17688         LIBS="$BAKLIBS"
17689
17690 else
17691
17692         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17693 $as_echo "yes" >&6; }
17694         LIBS="$BAKLIBS"
17695         LIBS="$LIBS -lcrypt32"
17696
17697 fi
17698 rm -f core conftest.err conftest.$ac_objext \
17699     conftest$ac_exeext conftest.$ac_ext
17700
17701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
17702 $as_echo_n "checking for LibreSSL... " >&6; }
17703 if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
17704         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17705 $as_echo "yes" >&6; }
17706
17707 $as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
17708
17709         # libressl provides these compat functions, but they may also be
17710         # declared by the OS in libc.  See if they have been declared.
17711         ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
17712 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
17713   ac_have_decl=1
17714 else
17715   ac_have_decl=0
17716 fi
17717
17718 cat >>confdefs.h <<_ACEOF
17719 #define HAVE_DECL_STRLCPY $ac_have_decl
17720 _ACEOF
17721 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
17722 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
17723   ac_have_decl=1
17724 else
17725   ac_have_decl=0
17726 fi
17727
17728 cat >>confdefs.h <<_ACEOF
17729 #define HAVE_DECL_STRLCAT $ac_have_decl
17730 _ACEOF
17731 ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
17732 if test "x$ac_cv_have_decl_arc4random" = xyes; then :
17733   ac_have_decl=1
17734 else
17735   ac_have_decl=0
17736 fi
17737
17738 cat >>confdefs.h <<_ACEOF
17739 #define HAVE_DECL_ARC4RANDOM $ac_have_decl
17740 _ACEOF
17741 ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
17742 if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
17743   ac_have_decl=1
17744 else
17745   ac_have_decl=0
17746 fi
17747
17748 cat >>confdefs.h <<_ACEOF
17749 #define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
17750 _ACEOF
17751 ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
17752 if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
17753   ac_have_decl=1
17754 else
17755   ac_have_decl=0
17756 fi
17757
17758 cat >>confdefs.h <<_ACEOF
17759 #define HAVE_DECL_REALLOCARRAY $ac_have_decl
17760 _ACEOF
17761
17762 else
17763         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17764 $as_echo "no" >&6; }
17765 fi
17766 for ac_header in openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h
17767 do :
17768   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17769 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
17770 "
17771 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17772   cat >>confdefs.h <<_ACEOF
17773 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17774 _ACEOF
17775
17776 fi
17777
17778 done
17779
17780 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
17781 do :
17782   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17783 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17784 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17785   cat >>confdefs.h <<_ACEOF
17786 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17787 _ACEOF
17788
17789 fi
17790 done
17791
17792
17793 # these check_funcs need -lssl
17794 BAKLIBS="$LIBS"
17795 LIBS="-lssl $LIBS"
17796 for ac_func in OPENSSL_init_ssl SSL_CTX_set_security_level SSL_set1_host SSL_get0_peername
17797 do :
17798   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17799 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17800 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17801   cat >>confdefs.h <<_ACEOF
17802 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17803 _ACEOF
17804
17805 fi
17806 done
17807
17808 LIBS="$BAKLIBS"
17809
17810 ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
17811 $ac_includes_default
17812 #ifdef HAVE_OPENSSL_ERR_H
17813 #include <openssl/err.h>
17814 #endif
17815
17816 #ifdef HAVE_OPENSSL_RAND_H
17817 #include <openssl/rand.h>
17818 #endif
17819
17820 #ifdef HAVE_OPENSSL_CONF_H
17821 #include <openssl/conf.h>
17822 #endif
17823
17824 #ifdef HAVE_OPENSSL_ENGINE_H
17825 #include <openssl/engine.h>
17826 #endif
17827 #include <openssl/ssl.h>
17828 #include <openssl/evp.h>
17829
17830 "
17831 if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
17832   ac_have_decl=1
17833 else
17834   ac_have_decl=0
17835 fi
17836
17837 cat >>confdefs.h <<_ACEOF
17838 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
17839 _ACEOF
17840 ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
17841 $ac_includes_default
17842 #ifdef HAVE_OPENSSL_ERR_H
17843 #include <openssl/err.h>
17844 #endif
17845
17846 #ifdef HAVE_OPENSSL_RAND_H
17847 #include <openssl/rand.h>
17848 #endif
17849
17850 #ifdef HAVE_OPENSSL_CONF_H
17851 #include <openssl/conf.h>
17852 #endif
17853
17854 #ifdef HAVE_OPENSSL_ENGINE_H
17855 #include <openssl/engine.h>
17856 #endif
17857 #include <openssl/ssl.h>
17858 #include <openssl/evp.h>
17859
17860 "
17861 if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
17862   ac_have_decl=1
17863 else
17864   ac_have_decl=0
17865 fi
17866
17867 cat >>confdefs.h <<_ACEOF
17868 #define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
17869 _ACEOF
17870 ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
17871 $ac_includes_default
17872 #ifdef HAVE_OPENSSL_ERR_H
17873 #include <openssl/err.h>
17874 #endif
17875
17876 #ifdef HAVE_OPENSSL_RAND_H
17877 #include <openssl/rand.h>
17878 #endif
17879
17880 #ifdef HAVE_OPENSSL_CONF_H
17881 #include <openssl/conf.h>
17882 #endif
17883
17884 #ifdef HAVE_OPENSSL_ENGINE_H
17885 #include <openssl/engine.h>
17886 #endif
17887 #include <openssl/ssl.h>
17888 #include <openssl/evp.h>
17889
17890 "
17891 if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
17892   ac_have_decl=1
17893 else
17894   ac_have_decl=0
17895 fi
17896
17897 cat >>confdefs.h <<_ACEOF
17898 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
17899 _ACEOF
17900
17901 fi
17902
17903
17904
17905 # Check whether --enable-sha1 was given.
17906 if test "${enable_sha1+set}" = set; then :
17907   enableval=$enable_sha1;
17908 fi
17909
17910 case "$enable_sha1" in
17911         no)
17912         ;;
17913         yes|*)
17914
17915 $as_echo "#define USE_SHA1 1" >>confdefs.h
17916
17917         ;;
17918 esac
17919
17920
17921 # Check whether --enable-sha2 was given.
17922 if test "${enable_sha2+set}" = set; then :
17923   enableval=$enable_sha2;
17924 fi
17925
17926 case "$enable_sha2" in
17927         no)
17928         ;;
17929         yes|*)
17930
17931 $as_echo "#define USE_SHA2 1" >>confdefs.h
17932
17933         ;;
17934 esac
17935
17936 # Check whether --enable-subnet was given.
17937 if test "${enable_subnet+set}" = set; then :
17938   enableval=$enable_subnet;
17939 fi
17940
17941 case "$enable_subnet" in
17942         yes)
17943
17944 $as_echo "#define CLIENT_SUBNET 1" >>confdefs.h
17945
17946         SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
17947
17948         SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
17949
17950         ;;
17951         no|*)
17952         ;;
17953 esac
17954
17955 # check wether gost also works
17956
17957 # Check whether --enable-gost was given.
17958 if test "${enable_gost+set}" = set; then :
17959   enableval=$enable_gost;
17960 fi
17961
17962 use_gost="no"
17963 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17964 case "$enable_gost" in
17965         no)
17966         ;;
17967         *)
17968         ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
17969 if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
17970   :
17971 else
17972   as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
17973 fi
17974
17975         ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
17976 if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
17977
17978 else
17979   as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
17980 fi
17981
17982
17983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
17984 $as_echo_n "checking if GOST works... " >&6; }
17985 if test c${cross_compiling} = cno; then
17986 BAKCFLAGS="$CFLAGS"
17987 if test -n "$ssldir"; then
17988         CFLAGS="$CFLAGS -Wl,-rpath,$ssldir/lib"
17989 fi
17990 if test "$cross_compiling" = yes; then :
17991   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17992 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17993 as_fn_error $? "cannot run test program while cross compiling
17994 See \`config.log' for more details" "$LINENO" 5; }
17995 else
17996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17997 /* end confdefs.h.  */
17998
17999 #include <string.h>
18000 #include <openssl/ssl.h>
18001 #include <openssl/evp.h>
18002 #include <openssl/engine.h>
18003 #include <openssl/conf.h>
18004 /* routine to load gost (from sldns) */
18005 int load_gost_id(void)
18006 {
18007         static int gost_id = 0;
18008         const EVP_PKEY_ASN1_METHOD* meth;
18009         ENGINE* e;
18010
18011         if(gost_id) return gost_id;
18012
18013         /* see if configuration loaded gost implementation from other engine*/
18014         meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
18015         if(meth) {
18016                 EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18017                 return gost_id;
18018         }
18019
18020         /* see if engine can be loaded already */
18021         e = ENGINE_by_id("gost");
18022         if(!e) {
18023                 /* load it ourself, in case statically linked */
18024                 ENGINE_load_builtin_engines();
18025                 ENGINE_load_dynamic();
18026                 e = ENGINE_by_id("gost");
18027         }
18028         if(!e) {
18029                 /* no gost engine in openssl */
18030                 return 0;
18031         }
18032         if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
18033                 ENGINE_finish(e);
18034                 ENGINE_free(e);
18035                 return 0;
18036         }
18037
18038         meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
18039         if(!meth) {
18040                 /* algo not found */
18041                 ENGINE_finish(e);
18042                 ENGINE_free(e);
18043                 return 0;
18044         }
18045         EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18046         return gost_id;
18047 }
18048 int main(void) {
18049         EVP_MD_CTX* ctx;
18050         const EVP_MD* md;
18051         unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
18052         const char* str = "Hello world";
18053         const unsigned char check[] = {
18054                 0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
18055                 0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
18056                 0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
18057                 0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
18058         };
18059         OPENSSL_config(NULL);
18060         (void)load_gost_id();
18061         md = EVP_get_digestbyname("md_gost94");
18062         if(!md) return 1;
18063         memset(digest, 0, sizeof(digest));
18064         ctx = EVP_MD_CTX_create();
18065         if(!ctx) return 2;
18066         if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
18067         if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
18068         if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
18069         /* uncomment to see the hash calculated.
18070                 {int i;
18071                 for(i=0; i<32; i++)
18072                         printf(" %2.2x", (int)digest[i]);
18073                 printf("\n");}
18074         */
18075         if(memcmp(digest, check, sizeof(check)) != 0)
18076                 return 6;
18077         return 0;
18078 }
18079
18080 _ACEOF
18081 if ac_fn_c_try_run "$LINENO"; then :
18082   eval "ac_cv_c_gost_works=yes"
18083 else
18084   eval "ac_cv_c_gost_works=no"
18085 fi
18086 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18087   conftest.$ac_objext conftest.beam conftest.$ac_ext
18088 fi
18089
18090 CFLAGS="$BAKCFLAGS"
18091 else
18092 eval "ac_cv_c_gost_works=maybe"
18093 fi
18094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
18095 $as_echo "$ac_cv_c_gost_works" >&6; }
18096
18097         if test "$ac_cv_c_gost_works" != no; then
18098                 use_gost="yes"
18099
18100 $as_echo "#define USE_GOST 1" >>confdefs.h
18101
18102         fi
18103         ;;
18104 esac
18105 fi
18106 # Check whether --enable-ecdsa was given.
18107 if test "${enable_ecdsa+set}" = set; then :
18108   enableval=$enable_ecdsa;
18109 fi
18110
18111 use_ecdsa="no"
18112 case "$enable_ecdsa" in
18113     no)
18114       ;;
18115     *)
18116       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18117               ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
18118 if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
18119
18120 else
18121   as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18122 fi
18123
18124               ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
18125 if test "x$ac_cv_func_SHA384_Init" = xyes; then :
18126
18127 else
18128   as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18129 fi
18130
18131               ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
18132 #include <openssl/evp.h>
18133
18134 "
18135 if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
18136   ac_have_decl=1
18137 else
18138   ac_have_decl=0
18139 fi
18140
18141 cat >>confdefs.h <<_ACEOF
18142 #define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
18143 _ACEOF
18144 if test $ac_have_decl = 1; then :
18145
18146 else
18147   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18148 fi
18149 ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
18150 #include <openssl/evp.h>
18151
18152 "
18153 if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
18154   ac_have_decl=1
18155 else
18156   ac_have_decl=0
18157 fi
18158
18159 cat >>confdefs.h <<_ACEOF
18160 #define HAVE_DECL_NID_SECP384R1 $ac_have_decl
18161 _ACEOF
18162 if test $ac_have_decl = 1; then :
18163
18164 else
18165   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18166 fi
18167
18168               # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
18169               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
18170 $as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
18171               if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
18172                 if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
18173                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18174 $as_echo "no" >&6; }
18175
18176 cat >>confdefs.h <<_ACEOF
18177 #define USE_ECDSA_EVP_WORKAROUND 1
18178 _ACEOF
18179
18180                 else
18181                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18182 $as_echo "yes" >&6; }
18183                 fi
18184               else
18185                 # not OpenSSL, thus likely LibreSSL, which supports it
18186                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18187 $as_echo "yes" >&6; }
18188               fi
18189       fi
18190       # we now know we have ECDSA and the required curves.
18191
18192 cat >>confdefs.h <<_ACEOF
18193 #define USE_ECDSA 1
18194 _ACEOF
18195
18196       use_ecdsa="yes"
18197       ;;
18198 esac
18199
18200 # Check whether --enable-dsa was given.
18201 if test "${enable_dsa+set}" = set; then :
18202   enableval=$enable_dsa;
18203 fi
18204
18205 use_dsa="no"
18206 case "$enable_dsa" in
18207     no)
18208       ;;
18209     *)
18210       # detect if DSA is supported, and turn it off if not.
18211       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18212       ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
18213 if test "x$ac_cv_func_DSA_SIG_new" = xyes; then :
18214
18215       as_ac_Type=`$as_echo "ac_cv_type_DSA_SIG*" | $as_tr_sh`
18216 ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
18217 $ac_includes_default
18218 #ifdef HAVE_OPENSSL_ERR_H
18219 #include <openssl/err.h>
18220 #endif
18221
18222 #ifdef HAVE_OPENSSL_RAND_H
18223 #include <openssl/rand.h>
18224 #endif
18225
18226 #ifdef HAVE_OPENSSL_CONF_H
18227 #include <openssl/conf.h>
18228 #endif
18229
18230 #ifdef HAVE_OPENSSL_ENGINE_H
18231 #include <openssl/engine.h>
18232 #endif
18233
18234 "
18235 if eval test \"x\$"$as_ac_Type"\" = x"yes"; then :
18236
18237
18238 cat >>confdefs.h <<_ACEOF
18239 #define USE_DSA 1
18240 _ACEOF
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
18249 else
18250   if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
18251                fi
18252 fi
18253
18254       else
18255
18256 cat >>confdefs.h <<_ACEOF
18257 #define USE_DSA 1
18258 _ACEOF
18259
18260       fi
18261       ;;
18262 esac
18263
18264 # Check whether --enable-ed25519 was given.
18265 if test "${enable_ed25519+set}" = set; then :
18266   enableval=$enable_ed25519;
18267 fi
18268
18269 use_ed25519="no"
18270 case "$enable_ed25519" in
18271     no)
18272       ;;
18273     *)
18274       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18275               ac_fn_c_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
18276 #include <openssl/evp.h>
18277
18278 "
18279 if test "x$ac_cv_have_decl_NID_ED25519" = xyes; then :
18280   ac_have_decl=1
18281 else
18282   ac_have_decl=0
18283 fi
18284
18285 cat >>confdefs.h <<_ACEOF
18286 #define HAVE_DECL_NID_ED25519 $ac_have_decl
18287 _ACEOF
18288 if test $ac_have_decl = 1; then :
18289
18290                 use_ed25519="yes"
18291
18292 else
18293    if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
18294                 fi
18295 fi
18296
18297       fi
18298       if test $USE_NETTLE = "yes"; then
18299                 for ac_header in nettle/eddsa.h
18300 do :
18301   ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
18302 "
18303 if test "x$ac_cv_header_nettle_eddsa_h" = xyes; then :
18304   cat >>confdefs.h <<_ACEOF
18305 #define HAVE_NETTLE_EDDSA_H 1
18306 _ACEOF
18307  use_ed25519="yes"
18308 fi
18309
18310 done
18311
18312       fi
18313       if test $use_ed25519 = "yes"; then
18314
18315 cat >>confdefs.h <<_ACEOF
18316 #define USE_ED25519 1
18317 _ACEOF
18318
18319       fi
18320       ;;
18321 esac
18322
18323 # Check whether --enable-ed448 was given.
18324 if test "${enable_ed448+set}" = set; then :
18325   enableval=$enable_ed448;
18326 fi
18327
18328 use_ed448="no"
18329 case "$enable_ed448" in
18330     no)
18331       ;;
18332     *)
18333       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18334               ac_fn_c_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
18335 #include <openssl/evp.h>
18336
18337 "
18338 if test "x$ac_cv_have_decl_NID_ED448" = xyes; then :
18339   ac_have_decl=1
18340 else
18341   ac_have_decl=0
18342 fi
18343
18344 cat >>confdefs.h <<_ACEOF
18345 #define HAVE_DECL_NID_ED448 $ac_have_decl
18346 _ACEOF
18347 if test $ac_have_decl = 1; then :
18348
18349                 use_ed448="yes"
18350
18351 else
18352    if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
18353                 fi
18354 fi
18355
18356       fi
18357       if test $use_ed448 = "yes"; then
18358
18359 cat >>confdefs.h <<_ACEOF
18360 #define USE_ED448 1
18361 _ACEOF
18362
18363       fi
18364       ;;
18365 esac
18366
18367 # Check whether --enable-event-api was given.
18368 if test "${enable_event_api+set}" = set; then :
18369   enableval=$enable_event_api;
18370 fi
18371
18372 case "$enable_event_api" in
18373     yes)
18374       UNBOUND_EVENT_INSTALL=unbound-event-install
18375
18376       UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
18377
18378       ;;
18379     *)
18380       ;;
18381 esac
18382
18383 # Check whether --enable-tfo-client was given.
18384 if test "${enable_tfo_client+set}" = set; then :
18385   enableval=$enable_tfo_client;
18386 fi
18387
18388 case "$enable_tfo_client" in
18389         yes)
18390                 case `uname` in
18391                         Linux) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
18392 #include <netinet/tcp.h>
18393
18394 "
18395 if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then :
18396   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
18397 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
18398 else
18399   as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
18400 fi
18401
18402
18403 cat >>confdefs.h <<_ACEOF
18404 #define USE_MSG_FASTOPEN 1
18405 _ACEOF
18406
18407                           ;;
18408                         Darwin) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
18409 #include <sys/socket.h>
18410
18411 "
18412 if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then :
18413   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
18414 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
18415 else
18416   as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
18417 fi
18418
18419
18420 cat >>confdefs.h <<_ACEOF
18421 #define USE_OSX_MSG_FASTOPEN 1
18422 _ACEOF
18423
18424                           ;;
18425                 esac
18426         ;;
18427         no|*)
18428                 ;;
18429 esac
18430
18431 # Check whether --enable-tfo-server was given.
18432 if test "${enable_tfo_server+set}" = set; then :
18433   enableval=$enable_tfo_server;
18434 fi
18435
18436 case "$enable_tfo_server" in
18437         yes)
18438               ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
18439 #include <netinet/tcp.h>
18440
18441 "
18442 if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then :
18443   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
18444 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
18445 else
18446   as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
18447 fi
18448
18449
18450 cat >>confdefs.h <<_ACEOF
18451 #define USE_TCP_FASTOPEN 1
18452 _ACEOF
18453
18454                 ;;
18455         no|*)
18456                 ;;
18457 esac
18458
18459 # check for libevent
18460
18461 # Check whether --with-libevent was given.
18462 if test "${with_libevent+set}" = set; then :
18463   withval=$with_libevent;
18464 else
18465    withval="no"
18466 fi
18467
18468 if test x_$withval = x_yes -o x_$withval != x_no; then
18469         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
18470 $as_echo_n "checking for libevent... " >&6; }
18471         if test x_$withval = x_ -o x_$withval = x_yes; then
18472             withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18473         fi
18474         for dir in $withval; do
18475             thedir="$dir"
18476             if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
18477                 found_libevent="yes"
18478                                 if test "$thedir" != "/usr"; then
18479                     CPPFLAGS="$CPPFLAGS -I$thedir/include"
18480                 fi
18481                 break;
18482             fi
18483         done
18484         if test x_$found_libevent != x_yes; then
18485                 if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
18486                         # libevent source directory
18487                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
18488 $as_echo "found in $thedir" >&6; }
18489                         CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
18490                         BAK_LDFLAGS_SET="1"
18491                         BAK_LDFLAGS="$LDFLAGS"
18492                         # remove evdns from linking
18493                         mkdir build >/dev/null 2>&1
18494                         mkdir build/libevent >/dev/null 2>&1
18495                         mkdir build/libevent/.libs >/dev/null 2>&1
18496                         ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
18497                         ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
18498                         ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
18499                         cp $ev_files_o build/libevent
18500                         cp $ev_files_lo build/libevent
18501                         cp $ev_files_libso build/libevent/.libs
18502                         LATE_LDFLAGS="build/libevent/*.lo -lm"
18503                         LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
18504                 else
18505                         as_fn_error $? "Cannot find the libevent library in $withval
18506 You can restart ./configure --with-libevent=no to use a builtin alternative.
18507 Please note that this alternative is not as capable as libevent when using
18508 large outgoing port ranges.  " "$LINENO" 5
18509                 fi
18510         else
18511             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
18512 $as_echo "found in $thedir" >&6; }
18513                     if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
18514                     LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
18515
18516         if test "x$enable_rpath" = xyes; then
18517                 if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
18518                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
18519                 fi
18520         fi
18521
18522             else
18523                                     if test "$thedir" != "/usr" -a "$thedir" != ""; then
18524                         LDFLAGS="$LDFLAGS -L$thedir/lib"
18525
18526         if test "x$enable_rpath" = xyes; then
18527                 if echo "$thedir/lib" | grep "^/" >/dev/null; then
18528                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
18529                 fi
18530         fi
18531
18532                     fi
18533             fi
18534         fi
18535         # check for library used by libevent after 1.3c
18536         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18537 $as_echo_n "checking for library containing clock_gettime... " >&6; }
18538 if ${ac_cv_search_clock_gettime+:} false; then :
18539   $as_echo_n "(cached) " >&6
18540 else
18541   ac_func_search_save_LIBS=$LIBS
18542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18543 /* end confdefs.h.  */
18544
18545 /* Override any GCC internal prototype to avoid an error.
18546    Use char because int might match the return type of a GCC
18547    builtin and then its argument prototype would still apply.  */
18548 #ifdef __cplusplus
18549 extern "C"
18550 #endif
18551 char clock_gettime ();
18552 int
18553 main ()
18554 {
18555 return clock_gettime ();
18556   ;
18557   return 0;
18558 }
18559 _ACEOF
18560 for ac_lib in '' rt; do
18561   if test -z "$ac_lib"; then
18562     ac_res="none required"
18563   else
18564     ac_res=-l$ac_lib
18565     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18566   fi
18567   if ac_fn_c_try_link "$LINENO"; then :
18568   ac_cv_search_clock_gettime=$ac_res
18569 fi
18570 rm -f core conftest.err conftest.$ac_objext \
18571     conftest$ac_exeext
18572   if ${ac_cv_search_clock_gettime+:} false; then :
18573   break
18574 fi
18575 done
18576 if ${ac_cv_search_clock_gettime+:} false; then :
18577
18578 else
18579   ac_cv_search_clock_gettime=no
18580 fi
18581 rm conftest.$ac_ext
18582 LIBS=$ac_func_search_save_LIBS
18583 fi
18584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18585 $as_echo "$ac_cv_search_clock_gettime" >&6; }
18586 ac_res=$ac_cv_search_clock_gettime
18587 if test "$ac_res" != no; then :
18588   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18589
18590 fi
18591
18592
18593         # is the event.h header libev or libevent?
18594         for ac_header in event.h
18595 do :
18596   ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
18597 "
18598 if test "x$ac_cv_header_event_h" = xyes; then :
18599   cat >>confdefs.h <<_ACEOF
18600 #define HAVE_EVENT_H 1
18601 _ACEOF
18602
18603 fi
18604
18605 done
18606
18607         ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
18608 #include <event.h>
18609
18610 "
18611 if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
18612
18613                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
18614 $as_echo_n "checking for library containing event_set... " >&6; }
18615 if ${ac_cv_search_event_set+:} false; then :
18616   $as_echo_n "(cached) " >&6
18617 else
18618   ac_func_search_save_LIBS=$LIBS
18619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18620 /* end confdefs.h.  */
18621
18622 /* Override any GCC internal prototype to avoid an error.
18623    Use char because int might match the return type of a GCC
18624    builtin and then its argument prototype would still apply.  */
18625 #ifdef __cplusplus
18626 extern "C"
18627 #endif
18628 char event_set ();
18629 int
18630 main ()
18631 {
18632 return event_set ();
18633   ;
18634   return 0;
18635 }
18636 _ACEOF
18637 for ac_lib in '' ev; do
18638   if test -z "$ac_lib"; then
18639     ac_res="none required"
18640   else
18641     ac_res=-l$ac_lib
18642     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18643   fi
18644   if ac_fn_c_try_link "$LINENO"; then :
18645   ac_cv_search_event_set=$ac_res
18646 fi
18647 rm -f core conftest.err conftest.$ac_objext \
18648     conftest$ac_exeext
18649   if ${ac_cv_search_event_set+:} false; then :
18650   break
18651 fi
18652 done
18653 if ${ac_cv_search_event_set+:} false; then :
18654
18655 else
18656   ac_cv_search_event_set=no
18657 fi
18658 rm conftest.$ac_ext
18659 LIBS=$ac_func_search_save_LIBS
18660 fi
18661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
18662 $as_echo "$ac_cv_search_event_set" >&6; }
18663 ac_res=$ac_cv_search_event_set
18664 if test "$ac_res" != no; then :
18665   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18666
18667 fi
18668
18669
18670 else
18671
18672                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
18673 $as_echo_n "checking for library containing event_set... " >&6; }
18674 if ${ac_cv_search_event_set+:} false; then :
18675   $as_echo_n "(cached) " >&6
18676 else
18677   ac_func_search_save_LIBS=$LIBS
18678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18679 /* end confdefs.h.  */
18680
18681 /* Override any GCC internal prototype to avoid an error.
18682    Use char because int might match the return type of a GCC
18683    builtin and then its argument prototype would still apply.  */
18684 #ifdef __cplusplus
18685 extern "C"
18686 #endif
18687 char event_set ();
18688 int
18689 main ()
18690 {
18691 return event_set ();
18692   ;
18693   return 0;
18694 }
18695 _ACEOF
18696 for ac_lib in '' event; do
18697   if test -z "$ac_lib"; then
18698     ac_res="none required"
18699   else
18700     ac_res=-l$ac_lib
18701     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18702   fi
18703   if ac_fn_c_try_link "$LINENO"; then :
18704   ac_cv_search_event_set=$ac_res
18705 fi
18706 rm -f core conftest.err conftest.$ac_objext \
18707     conftest$ac_exeext
18708   if ${ac_cv_search_event_set+:} false; then :
18709   break
18710 fi
18711 done
18712 if ${ac_cv_search_event_set+:} false; then :
18713
18714 else
18715   ac_cv_search_event_set=no
18716 fi
18717 rm conftest.$ac_ext
18718 LIBS=$ac_func_search_save_LIBS
18719 fi
18720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
18721 $as_echo "$ac_cv_search_event_set" >&6; }
18722 ac_res=$ac_cv_search_event_set
18723 if test "$ac_res" != no; then :
18724   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18725
18726 fi
18727
18728
18729 fi
18730
18731         for ac_func in event_base_free
18732 do :
18733   ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
18734 if test "x$ac_cv_func_event_base_free" = xyes; then :
18735   cat >>confdefs.h <<_ACEOF
18736 #define HAVE_EVENT_BASE_FREE 1
18737 _ACEOF
18738
18739 fi
18740 done
18741  # only in libevent 1.2 and later
18742         for ac_func in event_base_once
18743 do :
18744   ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
18745 if test "x$ac_cv_func_event_base_once" = xyes; then :
18746   cat >>confdefs.h <<_ACEOF
18747 #define HAVE_EVENT_BASE_ONCE 1
18748 _ACEOF
18749
18750 fi
18751 done
18752  # only in libevent 1.4.1 and later
18753         for ac_func in event_base_new
18754 do :
18755   ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
18756 if test "x$ac_cv_func_event_base_new" = xyes; then :
18757   cat >>confdefs.h <<_ACEOF
18758 #define HAVE_EVENT_BASE_NEW 1
18759 _ACEOF
18760
18761 fi
18762 done
18763  # only in libevent 1.4.1 and later
18764         for ac_func in event_base_get_method
18765 do :
18766   ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
18767 if test "x$ac_cv_func_event_base_get_method" = xyes; then :
18768   cat >>confdefs.h <<_ACEOF
18769 #define HAVE_EVENT_BASE_GET_METHOD 1
18770 _ACEOF
18771
18772 fi
18773 done
18774  # only in libevent 1.4.3 and later
18775         for ac_func in ev_loop
18776 do :
18777   ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
18778 if test "x$ac_cv_func_ev_loop" = xyes; then :
18779   cat >>confdefs.h <<_ACEOF
18780 #define HAVE_EV_LOOP 1
18781 _ACEOF
18782
18783 fi
18784 done
18785  # only in libev. (tested on 3.51)
18786         for ac_func in ev_default_loop
18787 do :
18788   ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
18789 if test "x$ac_cv_func_ev_default_loop" = xyes; then :
18790   cat >>confdefs.h <<_ACEOF
18791 #define HAVE_EV_DEFAULT_LOOP 1
18792 _ACEOF
18793
18794 fi
18795 done
18796  # only in libev. (tested on 4.00)
18797         PC_LIBEVENT_DEPENDENCY="libevent"
18798
18799         if test -n "$BAK_LDFLAGS_SET"; then
18800                 LDFLAGS="$BAK_LDFLAGS"
18801         fi
18802 else
18803
18804 $as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
18805
18806 fi
18807
18808 # check for libexpat
18809
18810 # Check whether --with-libexpat was given.
18811 if test "${with_libexpat+set}" = set; then :
18812   withval=$with_libexpat;
18813 else
18814    withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18815 fi
18816
18817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
18818 $as_echo_n "checking for libexpat... " >&6; }
18819 found_libexpat="no"
18820 for dir in $withval ; do
18821             if test -f "$dir/include/expat.h"; then
18822                 found_libexpat="yes"
18823                                 if test "$dir" != "/usr"; then
18824                     CPPFLAGS="$CPPFLAGS -I$dir/include"
18825                     LDFLAGS="$LDFLAGS -L$dir/lib"
18826                 fi
18827                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
18828 $as_echo "found in $dir" >&6; }
18829                 break;
18830             fi
18831 done
18832 if test x_$found_libexpat != x_yes; then
18833         as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
18834 fi
18835 for ac_header in expat.h
18836 do :
18837   ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
18838 "
18839 if test "x$ac_cv_header_expat_h" = xyes; then :
18840   cat >>confdefs.h <<_ACEOF
18841 #define HAVE_EXPAT_H 1
18842 _ACEOF
18843
18844 fi
18845
18846 done
18847
18848 ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
18849 #include <expat.h>
18850
18851 "
18852 if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then :
18853   ac_have_decl=1
18854 else
18855   ac_have_decl=0
18856 fi
18857
18858 cat >>confdefs.h <<_ACEOF
18859 #define HAVE_DECL_XML_STOPPARSER $ac_have_decl
18860 _ACEOF
18861
18862
18863 # hiredis (redis C client for cachedb)
18864
18865 # Check whether --with-libhiredis was given.
18866 if test "${with_libhiredis+set}" = set; then :
18867   withval=$with_libhiredis;
18868 else
18869    withval="no"
18870 fi
18871
18872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
18873 $as_echo_n "checking for libhiredis... " >&6; }
18874 found_libhiredis="no"
18875 if test x_$withval = x_yes -o x_$withval != x_no; then
18876    if test x_$withval = x_ -o x_$withval = x_yes; then
18877             withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18878    fi
18879    for dir in $withval ; do
18880             if test -f "$dir/include/hiredis/hiredis.h"; then
18881                 found_libhiredis="yes"
18882                                 if test "$dir" != "/usr"; then
18883                     CPPFLAGS="$CPPFLAGS -I$dir/include"
18884                     LDFLAGS="$LDFLAGS -L$dir/lib"
18885                 fi
18886                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
18887 $as_echo "found in $dir" >&6; }
18888
18889 $as_echo "#define USE_REDIS 1" >>confdefs.h
18890
18891                 LIBS="$LIBS -lhiredis"
18892                 break;
18893             fi
18894     done
18895     if test x_$found_libhiredis != x_yes; then
18896         as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
18897     fi
18898     for ac_header in hiredis/hiredis.h
18899 do :
18900   ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
18901 "
18902 if test "x$ac_cv_header_hiredis_hiredis_h" = xyes; then :
18903   cat >>confdefs.h <<_ACEOF
18904 #define HAVE_HIREDIS_HIREDIS_H 1
18905 _ACEOF
18906
18907 fi
18908
18909 done
18910
18911     ac_fn_c_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
18912     #include <hiredis/hiredis.h>
18913
18914 "
18915 if test "x$ac_cv_have_decl_redisConnect" = xyes; then :
18916   ac_have_decl=1
18917 else
18918   ac_have_decl=0
18919 fi
18920
18921 cat >>confdefs.h <<_ACEOF
18922 #define HAVE_DECL_REDISCONNECT $ac_have_decl
18923 _ACEOF
18924
18925 fi
18926
18927 # set static linking if requested
18928
18929 staticexe=""
18930 # Check whether --enable-static-exe was given.
18931 if test "${enable_static_exe+set}" = set; then :
18932   enableval=$enable_static_exe;
18933 fi
18934
18935 if test x_$enable_static_exe = x_yes; then
18936         staticexe="-static"
18937         if test "$on_mingw" = yes; then
18938                 staticexe="-all-static"
18939                 # for static compile, include gdi32 and zlib here.
18940                 if echo $LIBS | grep 'lgdi32' >/dev/null; then
18941                         :
18942                 else
18943                         LIBS="$LIBS -lgdi32"
18944                 fi
18945                 LIBS="$LIBS -lz"
18946         fi
18947 fi
18948
18949 # Include systemd.m4 - begin
18950 #   macros for configuring systemd
18951 #   Copyright 2015, Sami Kerola, CloudFlare.
18952 #   BSD licensed.
18953 # Check whether --enable-systemd was given.
18954 if test "${enable_systemd+set}" = set; then :
18955   enableval=$enable_systemd;
18956 else
18957   enable_systemd=no
18958 fi
18959
18960 have_systemd=no
18961
18962
18963
18964
18965
18966
18967
18968 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
18969         if test -n "$ac_tool_prefix"; then
18970   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
18971 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
18972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18973 $as_echo_n "checking for $ac_word... " >&6; }
18974 if ${ac_cv_path_PKG_CONFIG+:} false; then :
18975   $as_echo_n "(cached) " >&6
18976 else
18977   case $PKG_CONFIG in
18978   [\\/]* | ?:[\\/]*)
18979   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
18980   ;;
18981   *)
18982   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18983 for as_dir in $PATH
18984 do
18985   IFS=$as_save_IFS
18986   test -z "$as_dir" && as_dir=.
18987     for ac_exec_ext in '' $ac_executable_extensions; do
18988   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18989     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18991     break 2
18992   fi
18993 done
18994   done
18995 IFS=$as_save_IFS
18996
18997   ;;
18998 esac
18999 fi
19000 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19001 if test -n "$PKG_CONFIG"; then
19002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19003 $as_echo "$PKG_CONFIG" >&6; }
19004 else
19005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19006 $as_echo "no" >&6; }
19007 fi
19008
19009
19010 fi
19011 if test -z "$ac_cv_path_PKG_CONFIG"; then
19012   ac_pt_PKG_CONFIG=$PKG_CONFIG
19013   # Extract the first word of "pkg-config", so it can be a program name with args.
19014 set dummy pkg-config; ac_word=$2
19015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19016 $as_echo_n "checking for $ac_word... " >&6; }
19017 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19018   $as_echo_n "(cached) " >&6
19019 else
19020   case $ac_pt_PKG_CONFIG in
19021   [\\/]* | ?:[\\/]*)
19022   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19023   ;;
19024   *)
19025   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19026 for as_dir in $PATH
19027 do
19028   IFS=$as_save_IFS
19029   test -z "$as_dir" && as_dir=.
19030     for ac_exec_ext in '' $ac_executable_extensions; do
19031   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19032     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19033     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19034     break 2
19035   fi
19036 done
19037   done
19038 IFS=$as_save_IFS
19039
19040   ;;
19041 esac
19042 fi
19043 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19044 if test -n "$ac_pt_PKG_CONFIG"; then
19045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19046 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
19047 else
19048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19049 $as_echo "no" >&6; }
19050 fi
19051
19052   if test "x$ac_pt_PKG_CONFIG" = x; then
19053     PKG_CONFIG=""
19054   else
19055     case $cross_compiling:$ac_tool_warned in
19056 yes:)
19057 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19058 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19059 ac_tool_warned=yes ;;
19060 esac
19061     PKG_CONFIG=$ac_pt_PKG_CONFIG
19062   fi
19063 else
19064   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19065 fi
19066
19067 fi
19068 if test -n "$PKG_CONFIG"; then
19069         _pkg_min_version=0.9.0
19070         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19071 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19072         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19073                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19074 $as_echo "yes" >&6; }
19075         else
19076                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19077 $as_echo "no" >&6; }
19078                 PKG_CONFIG=""
19079         fi
19080 fi
19081 if test "x$enable_systemd" != xno; then :
19082
19083
19084
19085 pkg_failed=no
19086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
19087 $as_echo_n "checking for SYSTEMD... " >&6; }
19088
19089 if test -n "$SYSTEMD_CFLAGS"; then
19090     pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
19091  elif test -n "$PKG_CONFIG"; then
19092     if test -n "$PKG_CONFIG" && \
19093     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
19094   ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
19095   ac_status=$?
19096   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19097   test $ac_status = 0; }; then
19098   pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
19099                       test "x$?" != "x0" && pkg_failed=yes
19100 else
19101   pkg_failed=yes
19102 fi
19103  else
19104     pkg_failed=untried
19105 fi
19106 if test -n "$SYSTEMD_LIBS"; then
19107     pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
19108  elif test -n "$PKG_CONFIG"; then
19109     if test -n "$PKG_CONFIG" && \
19110     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
19111   ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
19112   ac_status=$?
19113   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19114   test $ac_status = 0; }; then
19115   pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
19116                       test "x$?" != "x0" && pkg_failed=yes
19117 else
19118   pkg_failed=yes
19119 fi
19120  else
19121     pkg_failed=untried
19122 fi
19123
19124
19125
19126 if test $pkg_failed = yes; then
19127         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19128 $as_echo "no" >&6; }
19129
19130 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
19131         _pkg_short_errors_supported=yes
19132 else
19133         _pkg_short_errors_supported=no
19134 fi
19135         if test $_pkg_short_errors_supported = yes; then
19136                 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
19137         else
19138                 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
19139         fi
19140         # Put the nasty error message in config.log where it belongs
19141         echo "$SYSTEMD_PKG_ERRORS" >&5
19142
19143         have_systemd=no
19144 elif test $pkg_failed = untried; then
19145         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19146 $as_echo "no" >&6; }
19147         have_systemd=no
19148 else
19149         SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
19150         SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
19151         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19152 $as_echo "yes" >&6; }
19153         have_systemd=yes
19154 fi
19155                 if test "x$have_systemd" != "xyes"; then :
19156
19157
19158 pkg_failed=no
19159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
19160 $as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
19161
19162 if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
19163     pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
19164  elif test -n "$PKG_CONFIG"; then
19165     if test -n "$PKG_CONFIG" && \
19166     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
19167   ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
19168   ac_status=$?
19169   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19170   test $ac_status = 0; }; then
19171   pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
19172                       test "x$?" != "x0" && pkg_failed=yes
19173 else
19174   pkg_failed=yes
19175 fi
19176  else
19177     pkg_failed=untried
19178 fi
19179 if test -n "$SYSTEMD_DAEMON_LIBS"; then
19180     pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
19181  elif test -n "$PKG_CONFIG"; then
19182     if test -n "$PKG_CONFIG" && \
19183     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
19184   ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
19185   ac_status=$?
19186   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19187   test $ac_status = 0; }; then
19188   pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
19189                       test "x$?" != "x0" && pkg_failed=yes
19190 else
19191   pkg_failed=yes
19192 fi
19193  else
19194     pkg_failed=untried
19195 fi
19196
19197
19198
19199 if test $pkg_failed = yes; then
19200         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19201 $as_echo "no" >&6; }
19202
19203 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
19204         _pkg_short_errors_supported=yes
19205 else
19206         _pkg_short_errors_supported=no
19207 fi
19208         if test $_pkg_short_errors_supported = yes; then
19209                 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
19210         else
19211                 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
19212         fi
19213         # Put the nasty error message in config.log where it belongs
19214         echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
19215
19216         have_systemd_daemon=no
19217 elif test $pkg_failed = untried; then
19218         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19219 $as_echo "no" >&6; }
19220         have_systemd_daemon=no
19221 else
19222         SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
19223         SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
19224         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19225 $as_echo "yes" >&6; }
19226         have_systemd_daemon=yes
19227 fi
19228                 if test "x$have_systemd_daemon" = "xyes"; then :
19229   have_systemd=yes
19230 fi
19231
19232 fi
19233         case $enable_systemd:$have_systemd in #(
19234   yes:no) :
19235     as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
19236   *:yes) :
19237
19238 $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
19239
19240                 LIBS="$LIBS $SYSTEMD_LIBS"
19241
19242          ;; #(
19243   *) :
19244      ;;
19245 esac
19246
19247
19248 fi
19249  if test "x$have_systemd" = xyes; then
19250   USE_SYSTEMD_TRUE=
19251   USE_SYSTEMD_FALSE='#'
19252 else
19253   USE_SYSTEMD_TRUE='#'
19254   USE_SYSTEMD_FALSE=
19255 fi
19256
19257
19258 # Include systemd.m4 - end
19259
19260 # set lock checking if requested
19261 # Check whether --enable-lock_checks was given.
19262 if test "${enable_lock_checks+set}" = set; then :
19263   enableval=$enable_lock_checks;
19264 fi
19265
19266 if test x_$enable_lock_checks = x_yes; then
19267
19268 $as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
19269
19270         CHECKLOCK_OBJ="checklocks.lo"
19271
19272 fi
19273
19274
19275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
19276 $as_echo_n "checking for getaddrinfo... " >&6; }
19277 ac_cv_func_getaddrinfo=no
19278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19279 /* end confdefs.h.  */
19280
19281 #ifdef __cplusplus
19282 extern "C"
19283 {
19284 #endif
19285 char* getaddrinfo();
19286 char* (*f) () = getaddrinfo;
19287 #ifdef __cplusplus
19288 }
19289 #endif
19290 int main() {
19291         ;
19292         return 0;
19293 }
19294
19295 _ACEOF
19296 if ac_fn_c_try_link "$LINENO"; then :
19297   ac_cv_func_getaddrinfo="yes"
19298 if test "$ac_cv_header_windows_h" = "yes"; then
19299
19300 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
19301
19302         USE_WINSOCK="1"
19303         if echo $LIBS | grep 'lws2_32' >/dev/null; then
19304                 :
19305         else
19306                 LIBS="$LIBS -lws2_32"
19307         fi
19308 fi
19309
19310 else
19311   ORIGLIBS="$LIBS"
19312 LIBS="$LIBS -lws2_32"
19313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19314 /* end confdefs.h.  */
19315
19316 #ifdef HAVE_WS2TCPIP_H
19317 #include <ws2tcpip.h>
19318 #endif
19319
19320 int
19321 main ()
19322 {
19323
19324         (void)getaddrinfo(NULL, NULL, NULL, NULL);
19325
19326
19327   ;
19328   return 0;
19329 }
19330 _ACEOF
19331 if ac_fn_c_try_link "$LINENO"; then :
19332
19333 ac_cv_func_getaddrinfo="yes"
19334
19335 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
19336
19337 USE_WINSOCK="1"
19338
19339 else
19340
19341 ac_cv_func_getaddrinfo="no"
19342 LIBS="$ORIGLIBS"
19343
19344 fi
19345 rm -f core conftest.err conftest.$ac_objext \
19346     conftest$ac_exeext conftest.$ac_ext
19347
19348 fi
19349 rm -f core conftest.err conftest.$ac_objext \
19350     conftest$ac_exeext conftest.$ac_ext
19351
19352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
19353 $as_echo "$ac_cv_func_getaddrinfo" >&6; }
19354 if test $ac_cv_func_getaddrinfo = yes; then
19355
19356 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
19357
19358 fi
19359
19360 if test "$USE_WINSOCK" = 1; then
19361
19362 $as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
19363
19364         for ac_header in iphlpapi.h
19365 do :
19366   ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
19367 #include <windows.h>
19368
19369 "
19370 if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
19371   cat >>confdefs.h <<_ACEOF
19372 #define HAVE_IPHLPAPI_H 1
19373 _ACEOF
19374
19375 fi
19376
19377 done
19378
19379         if test -n "$ac_tool_prefix"; then
19380   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
19381 set dummy ${ac_tool_prefix}windres; ac_word=$2
19382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19383 $as_echo_n "checking for $ac_word... " >&6; }
19384 if ${ac_cv_prog_WINDRES+:} false; then :
19385   $as_echo_n "(cached) " >&6
19386 else
19387   if test -n "$WINDRES"; then
19388   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
19389 else
19390 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19391 for as_dir in $PATH
19392 do
19393   IFS=$as_save_IFS
19394   test -z "$as_dir" && as_dir=.
19395     for ac_exec_ext in '' $ac_executable_extensions; do
19396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19397     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
19398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19399     break 2
19400   fi
19401 done
19402   done
19403 IFS=$as_save_IFS
19404
19405 fi
19406 fi
19407 WINDRES=$ac_cv_prog_WINDRES
19408 if test -n "$WINDRES"; then
19409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
19410 $as_echo "$WINDRES" >&6; }
19411 else
19412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19413 $as_echo "no" >&6; }
19414 fi
19415
19416
19417 fi
19418 if test -z "$ac_cv_prog_WINDRES"; then
19419   ac_ct_WINDRES=$WINDRES
19420   # Extract the first word of "windres", so it can be a program name with args.
19421 set dummy windres; ac_word=$2
19422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19423 $as_echo_n "checking for $ac_word... " >&6; }
19424 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
19425   $as_echo_n "(cached) " >&6
19426 else
19427   if test -n "$ac_ct_WINDRES"; then
19428   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
19429 else
19430 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19431 for as_dir in $PATH
19432 do
19433   IFS=$as_save_IFS
19434   test -z "$as_dir" && as_dir=.
19435     for ac_exec_ext in '' $ac_executable_extensions; do
19436   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19437     ac_cv_prog_ac_ct_WINDRES="windres"
19438     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19439     break 2
19440   fi
19441 done
19442   done
19443 IFS=$as_save_IFS
19444
19445 fi
19446 fi
19447 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
19448 if test -n "$ac_ct_WINDRES"; then
19449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
19450 $as_echo "$ac_ct_WINDRES" >&6; }
19451 else
19452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19453 $as_echo "no" >&6; }
19454 fi
19455
19456   if test "x$ac_ct_WINDRES" = x; then
19457     WINDRES=""
19458   else
19459     case $cross_compiling:$ac_tool_warned in
19460 yes:)
19461 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19462 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19463 ac_tool_warned=yes ;;
19464 esac
19465     WINDRES=$ac_ct_WINDRES
19466   fi
19467 else
19468   WINDRES="$ac_cv_prog_WINDRES"
19469 fi
19470
19471         LIBS="$LIBS -liphlpapi -lcrypt32"
19472         WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
19473
19474         WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
19475
19476         WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
19477
19478         WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
19479
19480         WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
19481
19482         WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
19483
19484         WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
19485
19486         WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
19487
19488 fi
19489 if test $ac_cv_func_getaddrinfo = no; then
19490         case " $LIBOBJS " in
19491   *" fake-rfc2553.$ac_objext "* ) ;;
19492   *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
19493  ;;
19494 esac
19495
19496 fi
19497 # check after getaddrinfo for its libraries
19498
19499 # check ioctlsocket
19500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
19501 $as_echo_n "checking for ioctlsocket... " >&6; }
19502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19503 /* end confdefs.h.  */
19504
19505 #ifdef HAVE_WINSOCK2_H
19506 #include <winsock2.h>
19507 #endif
19508
19509 int
19510 main ()
19511 {
19512
19513         (void)ioctlsocket(0, 0, NULL);
19514
19515   ;
19516   return 0;
19517 }
19518 _ACEOF
19519 if ac_fn_c_try_link "$LINENO"; then :
19520
19521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19522 $as_echo "yes" >&6; }
19523
19524 $as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
19525
19526
19527 else
19528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19529 $as_echo "no" >&6; }
19530 fi
19531 rm -f core conftest.err conftest.$ac_objext \
19532     conftest$ac_exeext conftest.$ac_ext
19533
19534
19535 # see if daemon(3) exists, and if it is deprecated.
19536 for ac_func in daemon
19537 do :
19538   ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
19539 if test "x$ac_cv_func_daemon" = xyes; then :
19540   cat >>confdefs.h <<_ACEOF
19541 #define HAVE_DAEMON 1
19542 _ACEOF
19543
19544 fi
19545 done
19546
19547 if test $ac_cv_func_daemon = yes; then
19548
19549
19550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
19551 $as_echo_n "checking if daemon is deprecated... " >&6; }
19552 cache=`echo daemon | sed 'y%.=/+-%___p_%'`
19553 if eval \${cv_cc_deprecated_$cache+:} false; then :
19554   $as_echo_n "(cached) " >&6
19555 else
19556
19557 echo '
19558 #include <stdlib.h>
19559 ' >conftest.c
19560 echo 'void f(){ (void)daemon(0, 0); }' >>conftest.c
19561 if test -z "`$CC -c conftest.c 2>&1 | grep deprecated`"; then
19562 eval "cv_cc_deprecated_$cache=no"
19563 else
19564 eval "cv_cc_deprecated_$cache=yes"
19565 fi
19566 rm -f conftest conftest.o conftest.c
19567
19568 fi
19569
19570 if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
19571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19572 $as_echo "yes" >&6; }
19573
19574 cat >>confdefs.h <<_ACEOF
19575 #define DEPRECATED_DAEMON 1
19576 _ACEOF
19577
19578 :
19579
19580 else
19581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19582 $as_echo "no" >&6; }
19583 :
19584
19585 fi
19586
19587 fi
19588
19589 ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
19590 $ac_includes_default
19591 #ifdef HAVE_SYS_UN_H
19592 #include <sys/un.h>
19593 #endif
19594
19595 "
19596 if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
19597
19598 cat >>confdefs.h <<_ACEOF
19599 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
19600 _ACEOF
19601
19602
19603 fi
19604
19605 ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
19606 $ac_includes_default
19607 #if HAVE_SYS_PARAM_H
19608 #include <sys/param.h>
19609 #endif
19610
19611 #ifdef HAVE_SYS_SOCKET_H
19612 #include <sys/socket.h>
19613 #endif
19614
19615 #ifdef HAVE_SYS_UIO_H
19616 #include <sys/uio.h>
19617 #endif
19618
19619 #ifdef HAVE_NETINET_IN_H
19620 #include <netinet/in.h>
19621 #endif
19622
19623 #ifdef HAVE_NETINET_TCP_H
19624 #include <netinet/tcp.h>
19625 #endif
19626
19627 #ifdef HAVE_ARPA_INET_H
19628 #include <arpa/inet.h>
19629 #endif
19630
19631 #ifdef HAVE_WINSOCK2_H
19632 #include <winsock2.h>
19633 #endif
19634
19635 #ifdef HAVE_WS2TCPIP_H
19636 #include <ws2tcpip.h>
19637 #endif
19638
19639 "
19640 if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
19641
19642 cat >>confdefs.h <<_ACEOF
19643 #define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
19644 _ACEOF
19645
19646
19647 fi
19648
19649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
19650 $as_echo_n "checking for library containing setusercontext... " >&6; }
19651 if ${ac_cv_search_setusercontext+:} false; then :
19652   $as_echo_n "(cached) " >&6
19653 else
19654   ac_func_search_save_LIBS=$LIBS
19655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19656 /* end confdefs.h.  */
19657
19658 /* Override any GCC internal prototype to avoid an error.
19659    Use char because int might match the return type of a GCC
19660    builtin and then its argument prototype would still apply.  */
19661 #ifdef __cplusplus
19662 extern "C"
19663 #endif
19664 char setusercontext ();
19665 int
19666 main ()
19667 {
19668 return setusercontext ();
19669   ;
19670   return 0;
19671 }
19672 _ACEOF
19673 for ac_lib in '' util; do
19674   if test -z "$ac_lib"; then
19675     ac_res="none required"
19676   else
19677     ac_res=-l$ac_lib
19678     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19679   fi
19680   if ac_fn_c_try_link "$LINENO"; then :
19681   ac_cv_search_setusercontext=$ac_res
19682 fi
19683 rm -f core conftest.err conftest.$ac_objext \
19684     conftest$ac_exeext
19685   if ${ac_cv_search_setusercontext+:} false; then :
19686   break
19687 fi
19688 done
19689 if ${ac_cv_search_setusercontext+:} false; then :
19690
19691 else
19692   ac_cv_search_setusercontext=no
19693 fi
19694 rm conftest.$ac_ext
19695 LIBS=$ac_func_search_save_LIBS
19696 fi
19697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
19698 $as_echo "$ac_cv_search_setusercontext" >&6; }
19699 ac_res=$ac_cv_search_setusercontext
19700 if test "$ac_res" != no; then :
19701   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19702
19703 fi
19704
19705 for ac_func in tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync shmget accept4
19706 do :
19707   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19708 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19709 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19710   cat >>confdefs.h <<_ACEOF
19711 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19712 _ACEOF
19713
19714 fi
19715 done
19716
19717 for ac_func in setresuid
19718 do :
19719   ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
19720 if test "x$ac_cv_func_setresuid" = xyes; then :
19721   cat >>confdefs.h <<_ACEOF
19722 #define HAVE_SETRESUID 1
19723 _ACEOF
19724
19725 else
19726   for ac_func in setreuid
19727 do :
19728   ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
19729 if test "x$ac_cv_func_setreuid" = xyes; then :
19730   cat >>confdefs.h <<_ACEOF
19731 #define HAVE_SETREUID 1
19732 _ACEOF
19733
19734 fi
19735 done
19736
19737 fi
19738 done
19739
19740 for ac_func in setresgid
19741 do :
19742   ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
19743 if test "x$ac_cv_func_setresgid" = xyes; then :
19744   cat >>confdefs.h <<_ACEOF
19745 #define HAVE_SETRESGID 1
19746 _ACEOF
19747
19748 else
19749   for ac_func in setregid
19750 do :
19751   ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
19752 if test "x$ac_cv_func_setregid" = xyes; then :
19753   cat >>confdefs.h <<_ACEOF
19754 #define HAVE_SETREGID 1
19755 _ACEOF
19756
19757 fi
19758 done
19759
19760 fi
19761 done
19762
19763
19764 # check if setreuid en setregid fail, on MacOSX10.4(darwin8).
19765 if echo $build_os | grep darwin8 > /dev/null; then
19766
19767 $as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
19768
19769 fi
19770 ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
19771 $ac_includes_default
19772 #ifdef HAVE_NETINET_IN_H
19773 #include <netinet/in.h>
19774 #endif
19775
19776 #ifdef HAVE_NETINET_TCP_H
19777 #include <netinet/tcp.h>
19778 #endif
19779
19780 #ifdef HAVE_ARPA_INET_H
19781 #include <arpa/inet.h>
19782 #endif
19783
19784 #ifdef HAVE_WINSOCK2_H
19785 #include <winsock2.h>
19786 #endif
19787
19788 #ifdef HAVE_WS2TCPIP_H
19789 #include <ws2tcpip.h>
19790 #endif
19791
19792 "
19793 if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
19794   ac_have_decl=1
19795 else
19796   ac_have_decl=0
19797 fi
19798
19799 cat >>confdefs.h <<_ACEOF
19800 #define HAVE_DECL_INET_PTON $ac_have_decl
19801 _ACEOF
19802 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
19803 $ac_includes_default
19804 #ifdef HAVE_NETINET_IN_H
19805 #include <netinet/in.h>
19806 #endif
19807
19808 #ifdef HAVE_NETINET_TCP_H
19809 #include <netinet/tcp.h>
19810 #endif
19811
19812 #ifdef HAVE_ARPA_INET_H
19813 #include <arpa/inet.h>
19814 #endif
19815
19816 #ifdef HAVE_WINSOCK2_H
19817 #include <winsock2.h>
19818 #endif
19819
19820 #ifdef HAVE_WS2TCPIP_H
19821 #include <ws2tcpip.h>
19822 #endif
19823
19824 "
19825 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
19826   ac_have_decl=1
19827 else
19828   ac_have_decl=0
19829 fi
19830
19831 cat >>confdefs.h <<_ACEOF
19832 #define HAVE_DECL_INET_NTOP $ac_have_decl
19833 _ACEOF
19834
19835 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
19836 if test "x$ac_cv_func_inet_aton" = xyes; then :
19837   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
19838
19839 else
19840   case " $LIBOBJS " in
19841   *" inet_aton.$ac_objext "* ) ;;
19842   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
19843  ;;
19844 esac
19845
19846 fi
19847
19848
19849 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
19850 if test "x$ac_cv_func_inet_pton" = xyes; then :
19851   $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
19852
19853 else
19854   case " $LIBOBJS " in
19855   *" inet_pton.$ac_objext "* ) ;;
19856   *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
19857  ;;
19858 esac
19859
19860 fi
19861
19862
19863 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
19864 if test "x$ac_cv_func_inet_ntop" = xyes; then :
19865   $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
19866
19867 else
19868   case " $LIBOBJS " in
19869   *" inet_ntop.$ac_objext "* ) ;;
19870   *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
19871  ;;
19872 esac
19873
19874 fi
19875
19876
19877 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
19878 if test "x$ac_cv_func_snprintf" = xyes; then :
19879   $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
19880
19881 else
19882   case " $LIBOBJS " in
19883   *" snprintf.$ac_objext "* ) ;;
19884   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
19885  ;;
19886 esac
19887
19888 fi
19889
19890
19891 # test if snprintf return the proper length
19892 if test "x$ac_cv_func_snprintf" = xyes; then
19893     if test c${cross_compiling} = cno; then
19894         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
19895 $as_echo_n "checking for correct snprintf return value... " >&6; }
19896         if test "$cross_compiling" = yes; then :
19897   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19898 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19899 as_fn_error $? "cannot run test program while cross compiling
19900 See \`config.log' for more details" "$LINENO" 5; }
19901 else
19902   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19903 /* end confdefs.h.  */
19904 $ac_includes_default
19905
19906 int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
19907
19908 _ACEOF
19909 if ac_fn_c_try_run "$LINENO"; then :
19910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19911 $as_echo "yes" >&6; }
19912 else
19913
19914                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19915 $as_echo "no" >&6; }
19916
19917 $as_echo "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
19918
19919                 case " $LIBOBJS " in
19920   *" snprintf.$ac_objext "* ) ;;
19921   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
19922  ;;
19923 esac
19924
19925
19926 fi
19927 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19928   conftest.$ac_objext conftest.beam conftest.$ac_ext
19929 fi
19930
19931     fi
19932 fi
19933 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
19934 if test "x$ac_cv_func_strlcat" = xyes; then :
19935   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
19936
19937 else
19938   case " $LIBOBJS " in
19939   *" strlcat.$ac_objext "* ) ;;
19940   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
19941  ;;
19942 esac
19943
19944 fi
19945
19946
19947 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
19948 if test "x$ac_cv_func_strlcpy" = xyes; then :
19949   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
19950
19951 else
19952   case " $LIBOBJS " in
19953   *" strlcpy.$ac_objext "* ) ;;
19954   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
19955  ;;
19956 esac
19957
19958 fi
19959
19960
19961 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
19962 if test "x$ac_cv_func_memmove" = xyes; then :
19963   $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
19964
19965 else
19966   case " $LIBOBJS " in
19967   *" memmove.$ac_objext "* ) ;;
19968   *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
19969  ;;
19970 esac
19971
19972 fi
19973
19974
19975 ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
19976 if test "x$ac_cv_func_gmtime_r" = xyes; then :
19977   $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
19978
19979 else
19980   case " $LIBOBJS " in
19981   *" gmtime_r.$ac_objext "* ) ;;
19982   *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
19983  ;;
19984 esac
19985
19986 fi
19987
19988
19989 ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
19990 if test "x$ac_cv_func_isblank" = xyes; then :
19991   $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
19992
19993 else
19994   case " $LIBOBJS " in
19995   *" isblank.$ac_objext "* ) ;;
19996   *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
19997  ;;
19998 esac
19999
20000 fi
20001
20002
20003 LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
20004
20005 ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
20006 if test "x$ac_cv_func_reallocarray" = xyes; then :
20007   $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
20008
20009 else
20010   case " $LIBOBJS " in
20011   *" reallocarray.$ac_objext "* ) ;;
20012   *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
20013  ;;
20014 esac
20015
20016 fi
20017
20018
20019 if test "$USE_NSS" = "no"; then
20020         ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
20021 if test "x$ac_cv_func_arc4random" = xyes; then :
20022   $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
20023
20024 else
20025   case " $LIBOBJS " in
20026   *" arc4random.$ac_objext "* ) ;;
20027   *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
20028  ;;
20029 esac
20030
20031 fi
20032
20033
20034         ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
20035 if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
20036   $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
20037
20038 else
20039   case " $LIBOBJS " in
20040   *" arc4random_uniform.$ac_objext "* ) ;;
20041   *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
20042  ;;
20043 esac
20044
20045 fi
20046
20047
20048         if test "$ac_cv_func_arc4random" = "no"; then
20049                 case " $LIBOBJS " in
20050   *" explicit_bzero.$ac_objext "* ) ;;
20051   *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
20052  ;;
20053 esac
20054
20055                 case " $LIBOBJS " in
20056   *" arc4_lock.$ac_objext "* ) ;;
20057   *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
20058  ;;
20059 esac
20060
20061                 for ac_func in getentropy
20062 do :
20063   ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
20064 if test "x$ac_cv_func_getentropy" = xyes; then :
20065   cat >>confdefs.h <<_ACEOF
20066 #define HAVE_GETENTROPY 1
20067 _ACEOF
20068
20069 else
20070
20071                     if test "$USE_WINSOCK" = 1; then
20072                         case " $LIBOBJS " in
20073   *" getentropy_win.$ac_objext "* ) ;;
20074   *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
20075  ;;
20076 esac
20077
20078                     else
20079                         case "$host" in
20080                         Darwin|*darwin*)
20081                                 case " $LIBOBJS " in
20082   *" getentropy_osx.$ac_objext "* ) ;;
20083   *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
20084  ;;
20085 esac
20086
20087                         ;;
20088                         *solaris*|*sunos*|SunOS)
20089                                 case " $LIBOBJS " in
20090   *" getentropy_solaris.$ac_objext "* ) ;;
20091   *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
20092  ;;
20093 esac
20094
20095                                 for ac_header in sys/sha2.h
20096 do :
20097   ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
20098 "
20099 if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
20100   cat >>confdefs.h <<_ACEOF
20101 #define HAVE_SYS_SHA2_H 1
20102 _ACEOF
20103
20104 else
20105
20106                                         for ac_func in SHA512_Update
20107 do :
20108   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20109 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20110   cat >>confdefs.h <<_ACEOF
20111 #define HAVE_SHA512_UPDATE 1
20112 _ACEOF
20113
20114 else
20115
20116                                                 case " $LIBOBJS " in
20117   *" sha512.$ac_objext "* ) ;;
20118   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20119  ;;
20120 esac
20121
20122
20123 fi
20124 done
20125
20126
20127 fi
20128
20129 done
20130
20131                                 if test "$ac_cv_header_sys_sha2_h" = "yes"; then
20132                                         # this lib needed for sha2 on solaris
20133                                         LIBS="$LIBS -lmd"
20134                                 fi
20135                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20136 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20137 if ${ac_cv_search_clock_gettime+:} false; then :
20138   $as_echo_n "(cached) " >&6
20139 else
20140   ac_func_search_save_LIBS=$LIBS
20141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20142 /* end confdefs.h.  */
20143
20144 /* Override any GCC internal prototype to avoid an error.
20145    Use char because int might match the return type of a GCC
20146    builtin and then its argument prototype would still apply.  */
20147 #ifdef __cplusplus
20148 extern "C"
20149 #endif
20150 char clock_gettime ();
20151 int
20152 main ()
20153 {
20154 return clock_gettime ();
20155   ;
20156   return 0;
20157 }
20158 _ACEOF
20159 for ac_lib in '' rt; do
20160   if test -z "$ac_lib"; then
20161     ac_res="none required"
20162   else
20163     ac_res=-l$ac_lib
20164     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20165   fi
20166   if ac_fn_c_try_link "$LINENO"; then :
20167   ac_cv_search_clock_gettime=$ac_res
20168 fi
20169 rm -f core conftest.err conftest.$ac_objext \
20170     conftest$ac_exeext
20171   if ${ac_cv_search_clock_gettime+:} false; then :
20172   break
20173 fi
20174 done
20175 if ${ac_cv_search_clock_gettime+:} false; then :
20176
20177 else
20178   ac_cv_search_clock_gettime=no
20179 fi
20180 rm conftest.$ac_ext
20181 LIBS=$ac_func_search_save_LIBS
20182 fi
20183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20184 $as_echo "$ac_cv_search_clock_gettime" >&6; }
20185 ac_res=$ac_cv_search_clock_gettime
20186 if test "$ac_res" != no; then :
20187   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20188
20189 fi
20190
20191                         ;;
20192                         *linux*|Linux|*)
20193                                 case " $LIBOBJS " in
20194   *" getentropy_linux.$ac_objext "* ) ;;
20195   *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
20196  ;;
20197 esac
20198
20199                                 for ac_func in SHA512_Update
20200 do :
20201   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20202 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20203   cat >>confdefs.h <<_ACEOF
20204 #define HAVE_SHA512_UPDATE 1
20205 _ACEOF
20206
20207 else
20208
20209
20210 $as_echo "#define COMPAT_SHA512 1" >>confdefs.h
20211
20212                                         case " $LIBOBJS " in
20213   *" sha512.$ac_objext "* ) ;;
20214   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20215  ;;
20216 esac
20217
20218
20219 fi
20220 done
20221
20222                                 for ac_header in sys/sysctl.h
20223 do :
20224   ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
20225 "
20226 if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
20227   cat >>confdefs.h <<_ACEOF
20228 #define HAVE_SYS_SYSCTL_H 1
20229 _ACEOF
20230
20231 fi
20232
20233 done
20234
20235                                 for ac_func in getauxval
20236 do :
20237   ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
20238 if test "x$ac_cv_func_getauxval" = xyes; then :
20239   cat >>confdefs.h <<_ACEOF
20240 #define HAVE_GETAUXVAL 1
20241 _ACEOF
20242
20243 fi
20244 done
20245
20246                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20247 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20248 if ${ac_cv_search_clock_gettime+:} false; then :
20249   $as_echo_n "(cached) " >&6
20250 else
20251   ac_func_search_save_LIBS=$LIBS
20252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20253 /* end confdefs.h.  */
20254
20255 /* Override any GCC internal prototype to avoid an error.
20256    Use char because int might match the return type of a GCC
20257    builtin and then its argument prototype would still apply.  */
20258 #ifdef __cplusplus
20259 extern "C"
20260 #endif
20261 char clock_gettime ();
20262 int
20263 main ()
20264 {
20265 return clock_gettime ();
20266   ;
20267   return 0;
20268 }
20269 _ACEOF
20270 for ac_lib in '' rt; do
20271   if test -z "$ac_lib"; then
20272     ac_res="none required"
20273   else
20274     ac_res=-l$ac_lib
20275     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20276   fi
20277   if ac_fn_c_try_link "$LINENO"; then :
20278   ac_cv_search_clock_gettime=$ac_res
20279 fi
20280 rm -f core conftest.err conftest.$ac_objext \
20281     conftest$ac_exeext
20282   if ${ac_cv_search_clock_gettime+:} false; then :
20283   break
20284 fi
20285 done
20286 if ${ac_cv_search_clock_gettime+:} false; then :
20287
20288 else
20289   ac_cv_search_clock_gettime=no
20290 fi
20291 rm conftest.$ac_ext
20292 LIBS=$ac_func_search_save_LIBS
20293 fi
20294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20295 $as_echo "$ac_cv_search_clock_gettime" >&6; }
20296 ac_res=$ac_cv_search_clock_gettime
20297 if test "$ac_res" != no; then :
20298   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20299
20300 fi
20301
20302                         ;;
20303                         esac
20304                     fi
20305
20306 fi
20307 done
20308
20309         fi
20310 fi
20311 LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
20312
20313 ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
20314 if test "x$ac_cv_func_ctime_r" = xyes; then :
20315   $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
20316
20317 else
20318   case " $LIBOBJS " in
20319   *" ctime_r.$ac_objext "* ) ;;
20320   *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
20321  ;;
20322 esac
20323
20324 fi
20325
20326
20327 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
20328 if test "x$ac_cv_func_strsep" = xyes; then :
20329   $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
20330
20331 else
20332   case " $LIBOBJS " in
20333   *" strsep.$ac_objext "* ) ;;
20334   *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
20335  ;;
20336 esac
20337
20338 fi
20339
20340
20341
20342 # Check whether --enable-allsymbols was given.
20343 if test "${enable_allsymbols+set}" = set; then :
20344   enableval=$enable_allsymbols;
20345 fi
20346
20347 case "$enable_allsymbols" in
20348         yes)
20349         COMMON_OBJ_ALL_SYMBOLS=""
20350         UBSYMS=""
20351         EXTRALINK="-L. -L.libs -lunbound"
20352
20353 $as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
20354
20355         ;;
20356         no|*)
20357         COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
20358         UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
20359         EXTRALINK=""
20360         ;;
20361 esac
20362
20363
20364
20365 if test x_$enable_lock_checks = x_yes; then
20366         UBSYMS="-export-symbols clubsyms.def"
20367         cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
20368         echo lock_protect >> clubsyms.def
20369         echo lock_unprotect >> clubsyms.def
20370         echo lock_get_mem >> clubsyms.def
20371         echo checklock_start >> clubsyms.def
20372         echo checklock_stop >> clubsyms.def
20373         echo checklock_lock >> clubsyms.def
20374         echo checklock_unlock >> clubsyms.def
20375         echo checklock_init >> clubsyms.def
20376         echo checklock_thrcreate >> clubsyms.def
20377         echo checklock_thrjoin >> clubsyms.def
20378 fi
20379
20380 # check for dnstap if requested
20381
20382   # Check whether --enable-dnstap was given.
20383 if test "${enable_dnstap+set}" = set; then :
20384   enableval=$enable_dnstap; opt_dnstap=$enableval
20385 else
20386   opt_dnstap=no
20387 fi
20388
20389
20390
20391 # Check whether --with-dnstap-socket-path was given.
20392 if test "${with_dnstap_socket_path+set}" = set; then :
20393   withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
20394 else
20395   opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
20396 fi
20397
20398
20399   if test "x$opt_dnstap" != "xno"; then
20400     # Extract the first word of "protoc-c", so it can be a program name with args.
20401 set dummy protoc-c; ac_word=$2
20402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20403 $as_echo_n "checking for $ac_word... " >&6; }
20404 if ${ac_cv_path_PROTOC_C+:} false; then :
20405   $as_echo_n "(cached) " >&6
20406 else
20407   case $PROTOC_C in
20408   [\\/]* | ?:[\\/]*)
20409   ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
20410   ;;
20411   *)
20412   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20413 for as_dir in $PATH
20414 do
20415   IFS=$as_save_IFS
20416   test -z "$as_dir" && as_dir=.
20417     for ac_exec_ext in '' $ac_executable_extensions; do
20418   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20419     ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
20420     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20421     break 2
20422   fi
20423 done
20424   done
20425 IFS=$as_save_IFS
20426
20427   ;;
20428 esac
20429 fi
20430 PROTOC_C=$ac_cv_path_PROTOC_C
20431 if test -n "$PROTOC_C"; then
20432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
20433 $as_echo "$PROTOC_C" >&6; }
20434 else
20435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20436 $as_echo "no" >&6; }
20437 fi
20438
20439
20440     if test -z "$PROTOC_C"; then
20441       as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
20442     fi
20443
20444 # Check whether --with-protobuf-c was given.
20445 if test "${with_protobuf_c+set}" = set; then :
20446   withval=$with_protobuf_c;
20447           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
20448           if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
20449             CFLAGS="$CFLAGS -I$withval/include/google"
20450           else
20451             CFLAGS="$CFLAGS -I$withval/include"
20452           fi
20453           LDFLAGS="$LDFLAGS -L$withval/lib"
20454
20455 else
20456
20457           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
20458           if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
20459             CFLAGS="$CFLAGS -I/usr/include/google"
20460           else
20461             if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
20462               CFLAGS="$CFLAGS -I/usr/local/include/google"
20463               LDFLAGS="$LDFLAGS -L/usr/local/lib"
20464             fi
20465           fi
20466
20467 fi
20468
20469
20470 # Check whether --with-libfstrm was given.
20471 if test "${with_libfstrm+set}" = set; then :
20472   withval=$with_libfstrm;
20473         CFLAGS="$CFLAGS -I$withval/include"
20474         LDFLAGS="$LDFLAGS -L$withval/lib"
20475
20476 fi
20477
20478     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fstrm_iothr_init" >&5
20479 $as_echo_n "checking for library containing fstrm_iothr_init... " >&6; }
20480 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20481   $as_echo_n "(cached) " >&6
20482 else
20483   ac_func_search_save_LIBS=$LIBS
20484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20485 /* end confdefs.h.  */
20486
20487 /* Override any GCC internal prototype to avoid an error.
20488    Use char because int might match the return type of a GCC
20489    builtin and then its argument prototype would still apply.  */
20490 #ifdef __cplusplus
20491 extern "C"
20492 #endif
20493 char fstrm_iothr_init ();
20494 int
20495 main ()
20496 {
20497 return fstrm_iothr_init ();
20498   ;
20499   return 0;
20500 }
20501 _ACEOF
20502 for ac_lib in '' fstrm; do
20503   if test -z "$ac_lib"; then
20504     ac_res="none required"
20505   else
20506     ac_res=-l$ac_lib
20507     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20508   fi
20509   if ac_fn_c_try_link "$LINENO"; then :
20510   ac_cv_search_fstrm_iothr_init=$ac_res
20511 fi
20512 rm -f core conftest.err conftest.$ac_objext \
20513     conftest$ac_exeext
20514   if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20515   break
20516 fi
20517 done
20518 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20519
20520 else
20521   ac_cv_search_fstrm_iothr_init=no
20522 fi
20523 rm conftest.$ac_ext
20524 LIBS=$ac_func_search_save_LIBS
20525 fi
20526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fstrm_iothr_init" >&5
20527 $as_echo "$ac_cv_search_fstrm_iothr_init" >&6; }
20528 ac_res=$ac_cv_search_fstrm_iothr_init
20529 if test "$ac_res" != no; then :
20530   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20531
20532 else
20533   as_fn_error $? "The fstrm library was not found. Please install fstrm!" "$LINENO" 5
20534 fi
20535
20536     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
20537 $as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
20538 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20539   $as_echo_n "(cached) " >&6
20540 else
20541   ac_func_search_save_LIBS=$LIBS
20542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20543 /* end confdefs.h.  */
20544
20545 /* Override any GCC internal prototype to avoid an error.
20546    Use char because int might match the return type of a GCC
20547    builtin and then its argument prototype would still apply.  */
20548 #ifdef __cplusplus
20549 extern "C"
20550 #endif
20551 char protobuf_c_message_pack ();
20552 int
20553 main ()
20554 {
20555 return protobuf_c_message_pack ();
20556   ;
20557   return 0;
20558 }
20559 _ACEOF
20560 for ac_lib in '' protobuf-c; do
20561   if test -z "$ac_lib"; then
20562     ac_res="none required"
20563   else
20564     ac_res=-l$ac_lib
20565     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20566   fi
20567   if ac_fn_c_try_link "$LINENO"; then :
20568   ac_cv_search_protobuf_c_message_pack=$ac_res
20569 fi
20570 rm -f core conftest.err conftest.$ac_objext \
20571     conftest$ac_exeext
20572   if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20573   break
20574 fi
20575 done
20576 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20577
20578 else
20579   ac_cv_search_protobuf_c_message_pack=no
20580 fi
20581 rm conftest.$ac_ext
20582 LIBS=$ac_func_search_save_LIBS
20583 fi
20584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
20585 $as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
20586 ac_res=$ac_cv_search_protobuf_c_message_pack
20587 if test "$ac_res" != no; then :
20588   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20589
20590 else
20591   as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
20592 fi
20593
20594
20595
20596 $as_echo "#define USE_DNSTAP 1" >>confdefs.h
20597
20598         ENABLE_DNSTAP=1
20599
20600
20601
20602         hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
20603
20604
20605 cat >>confdefs.h <<_ACEOF
20606 #define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
20607 _ACEOF
20608
20609
20610         DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c"
20611
20612         DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo"
20613
20614
20615   else
20616
20617         ENABLE_DNSTAP=0
20618
20619
20620
20621   fi
20622
20623
20624 # check for dnscrypt if requested
20625
20626   # Check whether --enable-dnscrypt was given.
20627 if test "${enable_dnscrypt+set}" = set; then :
20628   enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
20629 else
20630   opt_dnscrypt=no
20631 fi
20632
20633
20634   if test "x$opt_dnscrypt" != "xno"; then
20635
20636 # Check whether --with-libsodium was given.
20637 if test "${with_libsodium+set}" = set; then :
20638   withval=$with_libsodium;
20639         CFLAGS="$CFLAGS -I$withval/include"
20640         LDFLAGS="$LDFLAGS -L$withval/lib"
20641
20642 fi
20643
20644     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
20645 $as_echo_n "checking for library containing sodium_init... " >&6; }
20646 if ${ac_cv_search_sodium_init+:} false; then :
20647   $as_echo_n "(cached) " >&6
20648 else
20649   ac_func_search_save_LIBS=$LIBS
20650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20651 /* end confdefs.h.  */
20652
20653 /* Override any GCC internal prototype to avoid an error.
20654    Use char because int might match the return type of a GCC
20655    builtin and then its argument prototype would still apply.  */
20656 #ifdef __cplusplus
20657 extern "C"
20658 #endif
20659 char sodium_init ();
20660 int
20661 main ()
20662 {
20663 return sodium_init ();
20664   ;
20665   return 0;
20666 }
20667 _ACEOF
20668 for ac_lib in '' sodium; do
20669   if test -z "$ac_lib"; then
20670     ac_res="none required"
20671   else
20672     ac_res=-l$ac_lib
20673     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20674   fi
20675   if ac_fn_c_try_link "$LINENO"; then :
20676   ac_cv_search_sodium_init=$ac_res
20677 fi
20678 rm -f core conftest.err conftest.$ac_objext \
20679     conftest$ac_exeext
20680   if ${ac_cv_search_sodium_init+:} false; then :
20681   break
20682 fi
20683 done
20684 if ${ac_cv_search_sodium_init+:} false; then :
20685
20686 else
20687   ac_cv_search_sodium_init=no
20688 fi
20689 rm conftest.$ac_ext
20690 LIBS=$ac_func_search_save_LIBS
20691 fi
20692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
20693 $as_echo "$ac_cv_search_sodium_init" >&6; }
20694 ac_res=$ac_cv_search_sodium_init
20695 if test "$ac_res" != no; then :
20696   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20697
20698 else
20699   as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
20700 fi
20701
20702     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
20703 $as_echo_n "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
20704 if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20705   $as_echo_n "(cached) " >&6
20706 else
20707   ac_func_search_save_LIBS=$LIBS
20708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20709 /* end confdefs.h.  */
20710
20711 /* Override any GCC internal prototype to avoid an error.
20712    Use char because int might match the return type of a GCC
20713    builtin and then its argument prototype would still apply.  */
20714 #ifdef __cplusplus
20715 extern "C"
20716 #endif
20717 char crypto_box_curve25519xchacha20poly1305_beforenm ();
20718 int
20719 main ()
20720 {
20721 return crypto_box_curve25519xchacha20poly1305_beforenm ();
20722   ;
20723   return 0;
20724 }
20725 _ACEOF
20726 for ac_lib in '' sodium; do
20727   if test -z "$ac_lib"; then
20728     ac_res="none required"
20729   else
20730     ac_res=-l$ac_lib
20731     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20732   fi
20733   if ac_fn_c_try_link "$LINENO"; then :
20734   ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
20735 fi
20736 rm -f core conftest.err conftest.$ac_objext \
20737     conftest$ac_exeext
20738   if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20739   break
20740 fi
20741 done
20742 if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20743
20744 else
20745   ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
20746 fi
20747 rm conftest.$ac_ext
20748 LIBS=$ac_func_search_save_LIBS
20749 fi
20750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
20751 $as_echo "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
20752 ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
20753 if test "$ac_res" != no; then :
20754   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20755
20756             ENABLE_DNSCRYPT_XCHACHA20=1
20757
20758
20759 $as_echo "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
20760
20761
20762 else
20763
20764             ENABLE_DNSCRYPT_XCHACHA20=0
20765
20766
20767 fi
20768
20769     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
20770 $as_echo_n "checking for library containing sodium_set_misuse_handler... " >&6; }
20771 if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20772   $as_echo_n "(cached) " >&6
20773 else
20774   ac_func_search_save_LIBS=$LIBS
20775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20776 /* end confdefs.h.  */
20777
20778 /* Override any GCC internal prototype to avoid an error.
20779    Use char because int might match the return type of a GCC
20780    builtin and then its argument prototype would still apply.  */
20781 #ifdef __cplusplus
20782 extern "C"
20783 #endif
20784 char sodium_set_misuse_handler ();
20785 int
20786 main ()
20787 {
20788 return sodium_set_misuse_handler ();
20789   ;
20790   return 0;
20791 }
20792 _ACEOF
20793 for ac_lib in '' sodium; do
20794   if test -z "$ac_lib"; then
20795     ac_res="none required"
20796   else
20797     ac_res=-l$ac_lib
20798     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20799   fi
20800   if ac_fn_c_try_link "$LINENO"; then :
20801   ac_cv_search_sodium_set_misuse_handler=$ac_res
20802 fi
20803 rm -f core conftest.err conftest.$ac_objext \
20804     conftest$ac_exeext
20805   if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20806   break
20807 fi
20808 done
20809 if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20810
20811 else
20812   ac_cv_search_sodium_set_misuse_handler=no
20813 fi
20814 rm conftest.$ac_ext
20815 LIBS=$ac_func_search_save_LIBS
20816 fi
20817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
20818 $as_echo "$ac_cv_search_sodium_set_misuse_handler" >&6; }
20819 ac_res=$ac_cv_search_sodium_set_misuse_handler
20820 if test "$ac_res" != no; then :
20821   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20822
20823
20824 $as_echo "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
20825
20826
20827 fi
20828
20829
20830
20831 $as_echo "#define USE_DNSCRYPT 1" >>confdefs.h
20832
20833         ENABLE_DNSCRYPT=1
20834
20835
20836         DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
20837
20838         DNSCRYPT_OBJ="dnscrypt.lo"
20839
20840
20841   else
20842     ENABLE_DNSCRYPT_XCHACHA20=0
20843
20844
20845         ENABLE_DNSCRYPT=0
20846
20847
20848
20849   fi
20850
20851
20852 # check for cachedb if requested
20853 # Check whether --enable-cachedb was given.
20854 if test "${enable_cachedb+set}" = set; then :
20855   enableval=$enable_cachedb;
20856 fi
20857
20858 # turn on cachedb when hiredis support is enabled.
20859 if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
20860 case "$enable_cachedb" in
20861     yes)
20862
20863 $as_echo "#define USE_CACHEDB 1" >>confdefs.h
20864
20865         ;;
20866     no|*)
20867         # nothing
20868         ;;
20869 esac
20870
20871 # check for ipsecmod if requested
20872 # Check whether --enable-ipsecmod was given.
20873 if test "${enable_ipsecmod+set}" = set; then :
20874   enableval=$enable_ipsecmod;
20875 fi
20876
20877 case "$enable_ipsecmod" in
20878         yes)
20879
20880 $as_echo "#define USE_IPSECMOD 1" >>confdefs.h
20881
20882                 IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
20883
20884                 IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
20885
20886                 ;;
20887         no|*)
20888                 # nothing
20889                 ;;
20890 esac
20891
20892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
20893 $as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
20894 # on openBSD, the implicit rule make $< work.
20895 # on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
20896 # gmake works.
20897 cat >conftest.make <<EOF
20898 all:    conftest.lo
20899
20900 conftest.lo foo.lo bla.lo:
20901         if test -f "\$<"; then touch \$@; fi
20902
20903 .SUFFIXES: .lo
20904 .c.lo:
20905         if test -f "\$<"; then touch \$@; fi
20906
20907 conftest.lo:        conftest.dir/conftest.c
20908 EOF
20909 mkdir conftest.dir
20910 touch conftest.dir/conftest.c
20911 rm -f conftest.lo conftest.c
20912 ${MAKE:-make} -f conftest.make >/dev/null
20913 rm -f conftest.make conftest.c conftest.dir/conftest.c
20914 rm -rf conftest.dir
20915 if test ! -f conftest.lo; then
20916         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20917 $as_echo "no" >&6; }
20918         SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
20919         SOURCEFILE='`cat .source`'
20920 else
20921         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20922 $as_echo "yes" >&6; }
20923         SOURCEDETERMINE=':'
20924         SOURCEFILE='$<'
20925 fi
20926 rm -f conftest.lo
20927
20928
20929
20930 # see if we want to build the library or everything
20931 ALLTARGET="alltargets"
20932 INSTALLTARGET="install-all"
20933
20934 # Check whether --with-libunbound-only was given.
20935 if test "${with_libunbound_only+set}" = set; then :
20936   withval=$with_libunbound_only;
20937         if test "$withval" = "yes"; then
20938                 ALLTARGET="lib"
20939                 INSTALLTARGET="install-lib"
20940         fi
20941
20942 fi
20943
20944 if test $ALLTARGET = "alltargets"; then
20945         if test $USE_NSS = "yes"; then
20946                 as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
20947         fi
20948         if test $USE_NETTLE = "yes"; then
20949                 as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
20950         fi
20951 fi
20952
20953
20954
20955
20956
20957   { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
20958 $as_echo "$as_me: Stripping extension flags..." >&6;}
20959
20960   if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
20961     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
20962
20963 $as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
20964
20965   fi
20966
20967
20968   if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
20969     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
20970
20971 $as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
20972
20973   fi
20974
20975
20976   if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
20977     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
20978
20979 $as_echo "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
20980
20981   fi
20982
20983
20984   if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
20985     CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
20986
20987 $as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
20988
20989   fi
20990
20991
20992   if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
20993     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
20994
20995 $as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
20996
20997   fi
20998
20999
21000   if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
21001     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
21002
21003 $as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
21004
21005   fi
21006
21007
21008   if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
21009     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
21010
21011 $as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
21012
21013   fi
21014
21015
21016   if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
21017     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
21018
21019 $as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
21020
21021   fi
21022
21023
21024   if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
21025     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
21026
21027 $as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
21028
21029   fi
21030
21031
21032 if test -n "$LATE_LDFLAGS"; then
21033   LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
21034 fi
21035 # remove start spaces
21036 LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
21037 LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
21038
21039
21040 cat >>confdefs.h <<_ACEOF
21041 #define MAXSYSLOGMSGLEN 10240
21042 _ACEOF
21043
21044
21045
21046
21047 version=1.7.2
21048
21049 date=`date +'%b %e, %Y'`
21050
21051
21052 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"
21053
21054 ac_config_headers="$ac_config_headers config.h"
21055
21056 cat >confcache <<\_ACEOF
21057 # This file is a shell script that caches the results of configure
21058 # tests run on this system so they can be shared between configure
21059 # scripts and configure runs, see configure's option --config-cache.
21060 # It is not useful on other systems.  If it contains results you don't
21061 # want to keep, you may remove or edit it.
21062 #
21063 # config.status only pays attention to the cache file if you give it
21064 # the --recheck option to rerun configure.
21065 #
21066 # `ac_cv_env_foo' variables (set or unset) will be overridden when
21067 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21068 # following values.
21069
21070 _ACEOF
21071
21072 # The following way of writing the cache mishandles newlines in values,
21073 # but we know of no workaround that is simple, portable, and efficient.
21074 # So, we kill variables containing newlines.
21075 # Ultrix sh set writes to stderr and can't be redirected directly,
21076 # and sets the high bit in the cache file unless we assign to the vars.
21077 (
21078   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21079     eval ac_val=\$$ac_var
21080     case $ac_val in #(
21081     *${as_nl}*)
21082       case $ac_var in #(
21083       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
21084 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
21085       esac
21086       case $ac_var in #(
21087       _ | IFS | as_nl) ;; #(
21088       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
21089       *) { eval $ac_var=; unset $ac_var;} ;;
21090       esac ;;
21091     esac
21092   done
21093
21094   (set) 2>&1 |
21095     case $as_nl`(ac_space=' '; set) 2>&1` in #(
21096     *${as_nl}ac_space=\ *)
21097       # `set' does not quote correctly, so add quotes: double-quote
21098       # substitution turns \\\\ into \\, and sed turns \\ into \.
21099       sed -n \
21100         "s/'/'\\\\''/g;
21101           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21102       ;; #(
21103     *)
21104       # `set' quotes correctly as required by POSIX, so do not add quotes.
21105       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
21106       ;;
21107     esac |
21108     sort
21109 ) |
21110   sed '
21111      /^ac_cv_env_/b end
21112      t clear
21113      :clear
21114      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21115      t end
21116      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21117      :end' >>confcache
21118 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21119   if test -w "$cache_file"; then
21120     if test "x$cache_file" != "x/dev/null"; then
21121       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
21122 $as_echo "$as_me: updating cache $cache_file" >&6;}
21123       if test ! -f "$cache_file" || test -h "$cache_file"; then
21124         cat confcache >"$cache_file"
21125       else
21126         case $cache_file in #(
21127         */* | ?:*)
21128           mv -f confcache "$cache_file"$$ &&
21129           mv -f "$cache_file"$$ "$cache_file" ;; #(
21130         *)
21131           mv -f confcache "$cache_file" ;;
21132         esac
21133       fi
21134     fi
21135   else
21136     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
21137 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21138   fi
21139 fi
21140 rm -f confcache
21141
21142 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21143 # Let make expand exec_prefix.
21144 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21145
21146 DEFS=-DHAVE_CONFIG_H
21147
21148 ac_libobjs=
21149 ac_ltlibobjs=
21150 U=
21151 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21152   # 1. Remove the extension, and $U if already installed.
21153   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21154   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21155   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
21156   #    will be set to the directory where LIBOBJS objects are built.
21157   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21158   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
21159 done
21160 LIBOBJS=$ac_libobjs
21161
21162 LTLIBOBJS=$ac_ltlibobjs
21163
21164
21165 if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
21166   as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
21167 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21168 fi
21169
21170 : "${CONFIG_STATUS=./config.status}"
21171 ac_write_fail=0
21172 ac_clean_files_save=$ac_clean_files
21173 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21174 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
21175 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
21176 as_write_fail=0
21177 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
21178 #! $SHELL
21179 # Generated by $as_me.
21180 # Run this file to recreate the current configuration.
21181 # Compiler output produced by configure, useful for debugging
21182 # configure, is in config.log if it exists.
21183
21184 debug=false
21185 ac_cs_recheck=false
21186 ac_cs_silent=false
21187
21188 SHELL=\${CONFIG_SHELL-$SHELL}
21189 export SHELL
21190 _ASEOF
21191 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
21192 ## -------------------- ##
21193 ## M4sh Initialization. ##
21194 ## -------------------- ##
21195
21196 # Be more Bourne compatible
21197 DUALCASE=1; export DUALCASE # for MKS sh
21198 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
21199   emulate sh
21200   NULLCMD=:
21201   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21202   # is contrary to our usage.  Disable this feature.
21203   alias -g '${1+"$@"}'='"$@"'
21204   setopt NO_GLOB_SUBST
21205 else
21206   case `(set -o) 2>/dev/null` in #(
21207   *posix*) :
21208     set -o posix ;; #(
21209   *) :
21210      ;;
21211 esac
21212 fi
21213
21214
21215 as_nl='
21216 '
21217 export as_nl
21218 # Printing a long string crashes Solaris 7 /usr/bin/printf.
21219 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
21220 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
21221 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
21222 # Prefer a ksh shell builtin over an external printf program on Solaris,
21223 # but without wasting forks for bash or zsh.
21224 if test -z "$BASH_VERSION$ZSH_VERSION" \
21225     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
21226   as_echo='print -r --'
21227   as_echo_n='print -rn --'
21228 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
21229   as_echo='printf %s\n'
21230   as_echo_n='printf %s'
21231 else
21232   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
21233     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
21234     as_echo_n='/usr/ucb/echo -n'
21235   else
21236     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
21237     as_echo_n_body='eval
21238       arg=$1;
21239       case $arg in #(
21240       *"$as_nl"*)
21241         expr "X$arg" : "X\\(.*\\)$as_nl";
21242         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
21243       esac;
21244       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
21245     '
21246     export as_echo_n_body
21247     as_echo_n='sh -c $as_echo_n_body as_echo'
21248   fi
21249   export as_echo_body
21250   as_echo='sh -c $as_echo_body as_echo'
21251 fi
21252
21253 # The user is always right.
21254 if test "${PATH_SEPARATOR+set}" != set; then
21255   PATH_SEPARATOR=:
21256   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
21257     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
21258       PATH_SEPARATOR=';'
21259   }
21260 fi
21261
21262
21263 # IFS
21264 # We need space, tab and new line, in precisely that order.  Quoting is
21265 # there to prevent editors from complaining about space-tab.
21266 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
21267 # splitting by setting IFS to empty value.)
21268 IFS=" ""        $as_nl"
21269
21270 # Find who we are.  Look in the path if we contain no directory separator.
21271 as_myself=
21272 case $0 in #((
21273   *[\\/]* ) as_myself=$0 ;;
21274   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21275 for as_dir in $PATH
21276 do
21277   IFS=$as_save_IFS
21278   test -z "$as_dir" && as_dir=.
21279     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21280   done
21281 IFS=$as_save_IFS
21282
21283      ;;
21284 esac
21285 # We did not find ourselves, most probably we were run as `sh COMMAND'
21286 # in which case we are not to be found in the path.
21287 if test "x$as_myself" = x; then
21288   as_myself=$0
21289 fi
21290 if test ! -f "$as_myself"; then
21291   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
21292   exit 1
21293 fi
21294
21295 # Unset variables that we do not need and which cause bugs (e.g. in
21296 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
21297 # suppresses any "Segmentation fault" message there.  '((' could
21298 # trigger a bug in pdksh 5.2.14.
21299 for as_var in BASH_ENV ENV MAIL MAILPATH
21300 do eval test x\${$as_var+set} = xset \
21301   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
21302 done
21303 PS1='$ '
21304 PS2='> '
21305 PS4='+ '
21306
21307 # NLS nuisances.
21308 LC_ALL=C
21309 export LC_ALL
21310 LANGUAGE=C
21311 export LANGUAGE
21312
21313 # CDPATH.
21314 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21315
21316
21317 # as_fn_error STATUS ERROR [LINENO LOG_FD]
21318 # ----------------------------------------
21319 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
21320 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
21321 # script with STATUS, using 1 if that was 0.
21322 as_fn_error ()
21323 {
21324   as_status=$1; test $as_status -eq 0 && as_status=1
21325   if test "$4"; then
21326     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
21327     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
21328   fi
21329   $as_echo "$as_me: error: $2" >&2
21330   as_fn_exit $as_status
21331 } # as_fn_error
21332
21333
21334 # as_fn_set_status STATUS
21335 # -----------------------
21336 # Set $? to STATUS, without forking.
21337 as_fn_set_status ()
21338 {
21339   return $1
21340 } # as_fn_set_status
21341
21342 # as_fn_exit STATUS
21343 # -----------------
21344 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
21345 as_fn_exit ()
21346 {
21347   set +e
21348   as_fn_set_status $1
21349   exit $1
21350 } # as_fn_exit
21351
21352 # as_fn_unset VAR
21353 # ---------------
21354 # Portably unset VAR.
21355 as_fn_unset ()
21356 {
21357   { eval $1=; unset $1;}
21358 }
21359 as_unset=as_fn_unset
21360 # as_fn_append VAR VALUE
21361 # ----------------------
21362 # Append the text in VALUE to the end of the definition contained in VAR. Take
21363 # advantage of any shell optimizations that allow amortized linear growth over
21364 # repeated appends, instead of the typical quadratic growth present in naive
21365 # implementations.
21366 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
21367   eval 'as_fn_append ()
21368   {
21369     eval $1+=\$2
21370   }'
21371 else
21372   as_fn_append ()
21373   {
21374     eval $1=\$$1\$2
21375   }
21376 fi # as_fn_append
21377
21378 # as_fn_arith ARG...
21379 # ------------------
21380 # Perform arithmetic evaluation on the ARGs, and store the result in the
21381 # global $as_val. Take advantage of shells that can avoid forks. The arguments
21382 # must be portable across $(()) and expr.
21383 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
21384   eval 'as_fn_arith ()
21385   {
21386     as_val=$(( $* ))
21387   }'
21388 else
21389   as_fn_arith ()
21390   {
21391     as_val=`expr "$@" || test $? -eq 1`
21392   }
21393 fi # as_fn_arith
21394
21395
21396 if expr a : '\(a\)' >/dev/null 2>&1 &&
21397    test "X`expr 00001 : '.*\(...\)'`" = X001; then
21398   as_expr=expr
21399 else
21400   as_expr=false
21401 fi
21402
21403 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
21404   as_basename=basename
21405 else
21406   as_basename=false
21407 fi
21408
21409 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
21410   as_dirname=dirname
21411 else
21412   as_dirname=false
21413 fi
21414
21415 as_me=`$as_basename -- "$0" ||
21416 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21417          X"$0" : 'X\(//\)$' \| \
21418          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
21419 $as_echo X/"$0" |
21420     sed '/^.*\/\([^/][^/]*\)\/*$/{
21421             s//\1/
21422             q
21423           }
21424           /^X\/\(\/\/\)$/{
21425             s//\1/
21426             q
21427           }
21428           /^X\/\(\/\).*/{
21429             s//\1/
21430             q
21431           }
21432           s/.*/./; q'`
21433
21434 # Avoid depending upon Character Ranges.
21435 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21436 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21437 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21438 as_cr_digits='0123456789'
21439 as_cr_alnum=$as_cr_Letters$as_cr_digits
21440
21441 ECHO_C= ECHO_N= ECHO_T=
21442 case `echo -n x` in #(((((
21443 -n*)
21444   case `echo 'xy\c'` in
21445   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
21446   xy)  ECHO_C='\c';;
21447   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
21448        ECHO_T=' ';;
21449   esac;;
21450 *)
21451   ECHO_N='-n';;
21452 esac
21453
21454 rm -f conf$$ conf$$.exe conf$$.file
21455 if test -d conf$$.dir; then
21456   rm -f conf$$.dir/conf$$.file
21457 else
21458   rm -f conf$$.dir
21459   mkdir conf$$.dir 2>/dev/null
21460 fi
21461 if (echo >conf$$.file) 2>/dev/null; then
21462   if ln -s conf$$.file conf$$ 2>/dev/null; then
21463     as_ln_s='ln -s'
21464     # ... but there are two gotchas:
21465     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
21466     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
21467     # In both cases, we have to default to `cp -pR'.
21468     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
21469       as_ln_s='cp -pR'
21470   elif ln conf$$.file conf$$ 2>/dev/null; then
21471     as_ln_s=ln
21472   else
21473     as_ln_s='cp -pR'
21474   fi
21475 else
21476   as_ln_s='cp -pR'
21477 fi
21478 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
21479 rmdir conf$$.dir 2>/dev/null
21480
21481
21482 # as_fn_mkdir_p
21483 # -------------
21484 # Create "$as_dir" as a directory, including parents if necessary.
21485 as_fn_mkdir_p ()
21486 {
21487
21488   case $as_dir in #(
21489   -*) as_dir=./$as_dir;;
21490   esac
21491   test -d "$as_dir" || eval $as_mkdir_p || {
21492     as_dirs=
21493     while :; do
21494       case $as_dir in #(
21495       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
21496       *) as_qdir=$as_dir;;
21497       esac
21498       as_dirs="'$as_qdir' $as_dirs"
21499       as_dir=`$as_dirname -- "$as_dir" ||
21500 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21501          X"$as_dir" : 'X\(//\)[^/]' \| \
21502          X"$as_dir" : 'X\(//\)$' \| \
21503          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21504 $as_echo X"$as_dir" |
21505     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21506             s//\1/
21507             q
21508           }
21509           /^X\(\/\/\)[^/].*/{
21510             s//\1/
21511             q
21512           }
21513           /^X\(\/\/\)$/{
21514             s//\1/
21515             q
21516           }
21517           /^X\(\/\).*/{
21518             s//\1/
21519             q
21520           }
21521           s/.*/./; q'`
21522       test -d "$as_dir" && break
21523     done
21524     test -z "$as_dirs" || eval "mkdir $as_dirs"
21525   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
21526
21527
21528 } # as_fn_mkdir_p
21529 if mkdir -p . 2>/dev/null; then
21530   as_mkdir_p='mkdir -p "$as_dir"'
21531 else
21532   test -d ./-p && rmdir ./-p
21533   as_mkdir_p=false
21534 fi
21535
21536
21537 # as_fn_executable_p FILE
21538 # -----------------------
21539 # Test if FILE is an executable regular file.
21540 as_fn_executable_p ()
21541 {
21542   test -f "$1" && test -x "$1"
21543 } # as_fn_executable_p
21544 as_test_x='test -x'
21545 as_executable_p=as_fn_executable_p
21546
21547 # Sed expression to map a string onto a valid CPP name.
21548 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21549
21550 # Sed expression to map a string onto a valid variable name.
21551 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21552
21553
21554 exec 6>&1
21555 ## ----------------------------------- ##
21556 ## Main body of $CONFIG_STATUS script. ##
21557 ## ----------------------------------- ##
21558 _ASEOF
21559 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
21560
21561 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21562 # Save the log message, to keep $0 and so on meaningful, and to
21563 # report actual input values of CONFIG_FILES etc. instead of their
21564 # values after options handling.
21565 ac_log="
21566 This file was extended by unbound $as_me 1.7.2, which was
21567 generated by GNU Autoconf 2.69.  Invocation command line was
21568
21569   CONFIG_FILES    = $CONFIG_FILES
21570   CONFIG_HEADERS  = $CONFIG_HEADERS
21571   CONFIG_LINKS    = $CONFIG_LINKS
21572   CONFIG_COMMANDS = $CONFIG_COMMANDS
21573   $ $0 $@
21574
21575 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21576 "
21577
21578 _ACEOF
21579
21580 case $ac_config_files in *"
21581 "*) set x $ac_config_files; shift; ac_config_files=$*;;
21582 esac
21583
21584 case $ac_config_headers in *"
21585 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
21586 esac
21587
21588
21589 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21590 # Files that config.status was made for.
21591 config_files="$ac_config_files"
21592 config_headers="$ac_config_headers"
21593 config_commands="$ac_config_commands"
21594
21595 _ACEOF
21596
21597 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21598 ac_cs_usage="\
21599 \`$as_me' instantiates files and other configuration actions
21600 from templates according to the current configuration.  Unless the files
21601 and actions are specified as TAGs, all are instantiated by default.
21602
21603 Usage: $0 [OPTION]... [TAG]...
21604
21605   -h, --help       print this help, then exit
21606   -V, --version    print version number and configuration settings, then exit
21607       --config     print configuration, then exit
21608   -q, --quiet, --silent
21609                    do not print progress messages
21610   -d, --debug      don't remove temporary files
21611       --recheck    update $as_me by reconfiguring in the same conditions
21612       --file=FILE[:TEMPLATE]
21613                    instantiate the configuration file FILE
21614       --header=FILE[:TEMPLATE]
21615                    instantiate the configuration header FILE
21616
21617 Configuration files:
21618 $config_files
21619
21620 Configuration headers:
21621 $config_headers
21622
21623 Configuration commands:
21624 $config_commands
21625
21626 Report bugs to <unbound-bugs@nlnetlabs.nl>."
21627
21628 _ACEOF
21629 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21630 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
21631 ac_cs_version="\\
21632 unbound config.status 1.7.2
21633 configured by $0, generated by GNU Autoconf 2.69,
21634   with options \\"\$ac_cs_config\\"
21635
21636 Copyright (C) 2012 Free Software Foundation, Inc.
21637 This config.status script is free software; the Free Software Foundation
21638 gives unlimited permission to copy, distribute and modify it."
21639
21640 ac_pwd='$ac_pwd'
21641 srcdir='$srcdir'
21642 AWK='$AWK'
21643 test -n "\$AWK" || AWK=awk
21644 _ACEOF
21645
21646 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21647 # The default lists apply if the user does not specify any file.
21648 ac_need_defaults=:
21649 while test $# != 0
21650 do
21651   case $1 in
21652   --*=?*)
21653     ac_option=`expr "X$1" : 'X\([^=]*\)='`
21654     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
21655     ac_shift=:
21656     ;;
21657   --*=)
21658     ac_option=`expr "X$1" : 'X\([^=]*\)='`
21659     ac_optarg=
21660     ac_shift=:
21661     ;;
21662   *)
21663     ac_option=$1
21664     ac_optarg=$2
21665     ac_shift=shift
21666     ;;
21667   esac
21668
21669   case $ac_option in
21670   # Handling of the options.
21671   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21672     ac_cs_recheck=: ;;
21673   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
21674     $as_echo "$ac_cs_version"; exit ;;
21675   --config | --confi | --conf | --con | --co | --c )
21676     $as_echo "$ac_cs_config"; exit ;;
21677   --debug | --debu | --deb | --de | --d | -d )
21678     debug=: ;;
21679   --file | --fil | --fi | --f )
21680     $ac_shift
21681     case $ac_optarg in
21682     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21683     '') as_fn_error $? "missing file argument" ;;
21684     esac
21685     as_fn_append CONFIG_FILES " '$ac_optarg'"
21686     ac_need_defaults=false;;
21687   --header | --heade | --head | --hea )
21688     $ac_shift
21689     case $ac_optarg in
21690     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21691     esac
21692     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
21693     ac_need_defaults=false;;
21694   --he | --h)
21695     # Conflict between --help and --header
21696     as_fn_error $? "ambiguous option: \`$1'
21697 Try \`$0 --help' for more information.";;
21698   --help | --hel | -h )
21699     $as_echo "$ac_cs_usage"; exit ;;
21700   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21701   | -silent | --silent | --silen | --sile | --sil | --si | --s)
21702     ac_cs_silent=: ;;
21703
21704   # This is an error.
21705   -*) as_fn_error $? "unrecognized option: \`$1'
21706 Try \`$0 --help' for more information." ;;
21707
21708   *) as_fn_append ac_config_targets " $1"
21709      ac_need_defaults=false ;;
21710
21711   esac
21712   shift
21713 done
21714
21715 ac_configure_extra_args=
21716
21717 if $ac_cs_silent; then
21718   exec 6>/dev/null
21719   ac_configure_extra_args="$ac_configure_extra_args --silent"
21720 fi
21721
21722 _ACEOF
21723 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21724 if \$ac_cs_recheck; then
21725   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21726   shift
21727   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
21728   CONFIG_SHELL='$SHELL'
21729   export CONFIG_SHELL
21730   exec "\$@"
21731 fi
21732
21733 _ACEOF
21734 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21735 exec 5>>config.log
21736 {
21737   echo
21738   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21739 ## Running $as_me. ##
21740 _ASBOX
21741   $as_echo "$ac_log"
21742 } >&5
21743
21744 _ACEOF
21745 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21746 #
21747 # INIT-COMMANDS
21748 #
21749
21750
21751 # The HP-UX ksh and POSIX shell print the target directory to stdout
21752 # if CDPATH is set.
21753 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21754
21755 sed_quote_subst='$sed_quote_subst'
21756 double_quote_subst='$double_quote_subst'
21757 delay_variable_subst='$delay_variable_subst'
21758 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
21759 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
21760 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
21761 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
21762 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
21763 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
21764 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
21765 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
21766 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
21767 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
21768 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
21769 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
21770 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
21771 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
21772 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
21773 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
21774 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
21775 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
21776 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
21777 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
21778 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
21779 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
21780 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
21781 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
21782 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
21783 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
21784 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
21785 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
21786 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
21787 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
21788 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
21789 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
21790 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
21791 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
21792 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
21793 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
21794 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
21795 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
21796 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
21797 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
21798 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
21799 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
21800 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
21801 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
21802 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
21803 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
21804 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
21805 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
21806 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
21807 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
21808 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
21809 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
21810 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
21811 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
21812 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
21813 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
21814 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
21815 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
21816 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"`'
21817 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
21818 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
21819 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
21820 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
21821 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
21822 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
21823 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
21824 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
21825 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
21826 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
21827 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
21828 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
21829 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
21830 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
21831 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
21832 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
21833 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
21834 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
21835 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
21836 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
21837 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
21838 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
21839 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
21840 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
21841 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
21842 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
21843 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
21844 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
21845 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
21846 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
21847 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
21848 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
21849 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
21850 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
21851 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
21852 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
21853 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
21854 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
21855 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
21856 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
21857 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
21858 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
21859 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
21860 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
21861 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
21862 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
21863 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
21864 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
21865 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
21866 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
21867 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
21868 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
21869 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
21870 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
21871 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
21872 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
21873 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
21874 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
21875 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
21876 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
21877 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
21878 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
21879 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
21880 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
21881 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
21882 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
21883 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
21884 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
21885 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
21886 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
21887 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
21888 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
21889 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
21890 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
21891 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
21892 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
21893
21894 LTCC='$LTCC'
21895 LTCFLAGS='$LTCFLAGS'
21896 compiler='$compiler_DEFAULT'
21897
21898 # A function that is used when there is no print builtin or printf.
21899 func_fallback_echo ()
21900 {
21901   eval 'cat <<_LTECHO_EOF
21902 \$1
21903 _LTECHO_EOF'
21904 }
21905
21906 # Quote evaled strings.
21907 for var in SHELL \
21908 ECHO \
21909 PATH_SEPARATOR \
21910 SED \
21911 GREP \
21912 EGREP \
21913 FGREP \
21914 LD \
21915 NM \
21916 LN_S \
21917 lt_SP2NL \
21918 lt_NL2SP \
21919 reload_flag \
21920 OBJDUMP \
21921 deplibs_check_method \
21922 file_magic_cmd \
21923 file_magic_glob \
21924 want_nocaseglob \
21925 DLLTOOL \
21926 sharedlib_from_linklib_cmd \
21927 AR \
21928 AR_FLAGS \
21929 archiver_list_spec \
21930 STRIP \
21931 RANLIB \
21932 CC \
21933 CFLAGS \
21934 compiler \
21935 lt_cv_sys_global_symbol_pipe \
21936 lt_cv_sys_global_symbol_to_cdecl \
21937 lt_cv_sys_global_symbol_to_import \
21938 lt_cv_sys_global_symbol_to_c_name_address \
21939 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
21940 lt_cv_nm_interface \
21941 nm_file_list_spec \
21942 lt_cv_truncate_bin \
21943 lt_prog_compiler_no_builtin_flag \
21944 lt_prog_compiler_pic \
21945 lt_prog_compiler_wl \
21946 lt_prog_compiler_static \
21947 lt_cv_prog_compiler_c_o \
21948 need_locks \
21949 MANIFEST_TOOL \
21950 DSYMUTIL \
21951 NMEDIT \
21952 LIPO \
21953 OTOOL \
21954 OTOOL64 \
21955 shrext_cmds \
21956 export_dynamic_flag_spec \
21957 whole_archive_flag_spec \
21958 compiler_needs_object \
21959 with_gnu_ld \
21960 allow_undefined_flag \
21961 no_undefined_flag \
21962 hardcode_libdir_flag_spec \
21963 hardcode_libdir_separator \
21964 exclude_expsyms \
21965 include_expsyms \
21966 file_list_spec \
21967 variables_saved_for_relink \
21968 libname_spec \
21969 library_names_spec \
21970 soname_spec \
21971 install_override_mode \
21972 finish_eval \
21973 old_striplib \
21974 striplib; do
21975     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
21976     *[\\\\\\\`\\"\\\$]*)
21977       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
21978       ;;
21979     *)
21980       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
21981       ;;
21982     esac
21983 done
21984
21985 # Double-quote double-evaled strings.
21986 for var in reload_cmds \
21987 old_postinstall_cmds \
21988 old_postuninstall_cmds \
21989 old_archive_cmds \
21990 extract_expsyms_cmds \
21991 old_archive_from_new_cmds \
21992 old_archive_from_expsyms_cmds \
21993 archive_cmds \
21994 archive_expsym_cmds \
21995 module_cmds \
21996 module_expsym_cmds \
21997 export_symbols_cmds \
21998 prelink_cmds \
21999 postlink_cmds \
22000 postinstall_cmds \
22001 postuninstall_cmds \
22002 finish_cmds \
22003 sys_lib_search_path_spec \
22004 configure_time_dlsearch_path \
22005 configure_time_lt_sys_library_path; do
22006     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22007     *[\\\\\\\`\\"\\\$]*)
22008       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22009       ;;
22010     *)
22011       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22012       ;;
22013     esac
22014 done
22015
22016 ac_aux_dir='$ac_aux_dir'
22017
22018 # See if we are running on zsh, and set the options that allow our
22019 # commands through without removal of \ escapes INIT.
22020 if test -n "\${ZSH_VERSION+set}"; then
22021    setopt NO_GLOB_SUBST
22022 fi
22023
22024
22025     PACKAGE='$PACKAGE'
22026     VERSION='$VERSION'
22027     RM='$RM'
22028     ofile='$ofile'
22029
22030
22031
22032
22033 _ACEOF
22034
22035 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22036
22037 # Handling of arguments.
22038 for ac_config_target in $ac_config_targets
22039 do
22040   case $ac_config_target in
22041     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
22042     "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
22043     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22044     "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
22045     "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
22046     "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
22047     "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
22048     "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
22049     "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
22050     "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
22051     "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
22052     "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
22053     "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
22054     "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
22055     "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
22056     "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
22057     "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
22058     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
22059
22060   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
22061   esac
22062 done
22063
22064
22065 # If the user did not use the arguments to specify the items to instantiate,
22066 # then the envvar interface is used.  Set only those that are not.
22067 # We use the long form for the default assignment because of an extremely
22068 # bizarre bug on SunOS 4.1.3.
22069 if $ac_need_defaults; then
22070   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22071   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22072   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22073 fi
22074
22075 # Have a temporary directory for convenience.  Make it in the build tree
22076 # simply because there is no reason against having it here, and in addition,
22077 # creating and moving files from /tmp can sometimes cause problems.
22078 # Hook for its removal unless debugging.
22079 # Note that there is a small window in which the directory will not be cleaned:
22080 # after its creation but before its name has been assigned to `$tmp'.
22081 $debug ||
22082 {
22083   tmp= ac_tmp=
22084   trap 'exit_status=$?
22085   : "${ac_tmp:=$tmp}"
22086   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
22087 ' 0
22088   trap 'as_fn_exit 1' 1 2 13 15
22089 }
22090 # Create a (secure) tmp directory for tmp files.
22091
22092 {
22093   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
22094   test -d "$tmp"
22095 }  ||
22096 {
22097   tmp=./conf$$-$RANDOM
22098   (umask 077 && mkdir "$tmp")
22099 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
22100 ac_tmp=$tmp
22101
22102 # Set up the scripts for CONFIG_FILES section.
22103 # No need to generate them if there are no CONFIG_FILES.
22104 # This happens for instance with `./config.status config.h'.
22105 if test -n "$CONFIG_FILES"; then
22106
22107
22108 ac_cr=`echo X | tr X '\015'`
22109 # On cygwin, bash can eat \r inside `` if the user requested igncr.
22110 # But we know of no other shell where ac_cr would be empty at this
22111 # point, so we can use a bashism as a fallback.
22112 if test "x$ac_cr" = x; then
22113   eval ac_cr=\$\'\\r\'
22114 fi
22115 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
22116 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
22117   ac_cs_awk_cr='\\r'
22118 else
22119   ac_cs_awk_cr=$ac_cr
22120 fi
22121
22122 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
22123 _ACEOF
22124
22125
22126 {
22127   echo "cat >conf$$subs.awk <<_ACEOF" &&
22128   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
22129   echo "_ACEOF"
22130 } >conf$$subs.sh ||
22131   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22132 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
22133 ac_delim='%!_!# '
22134 for ac_last_try in false false false false false :; do
22135   . ./conf$$subs.sh ||
22136     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22137
22138   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
22139   if test $ac_delim_n = $ac_delim_num; then
22140     break
22141   elif $ac_last_try; then
22142     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22143   else
22144     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22145   fi
22146 done
22147 rm -f conf$$subs.sh
22148
22149 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22150 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
22151 _ACEOF
22152 sed -n '
22153 h
22154 s/^/S["/; s/!.*/"]=/
22155 p
22156 g
22157 s/^[^!]*!//
22158 :repl
22159 t repl
22160 s/'"$ac_delim"'$//
22161 t delim
22162 :nl
22163 h
22164 s/\(.\{148\}\)..*/\1/
22165 t more1
22166 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
22167 p
22168 n
22169 b repl
22170 :more1
22171 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22172 p
22173 g
22174 s/.\{148\}//
22175 t nl
22176 :delim
22177 h
22178 s/\(.\{148\}\)..*/\1/
22179 t more2
22180 s/["\\]/\\&/g; s/^/"/; s/$/"/
22181 p
22182 b
22183 :more2
22184 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22185 p
22186 g
22187 s/.\{148\}//
22188 t delim
22189 ' <conf$$subs.awk | sed '
22190 /^[^""]/{
22191   N
22192   s/\n//
22193 }
22194 ' >>$CONFIG_STATUS || ac_write_fail=1
22195 rm -f conf$$subs.awk
22196 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22197 _ACAWK
22198 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
22199   for (key in S) S_is_set[key] = 1
22200   FS = "\a"
22201
22202 }
22203 {
22204   line = $ 0
22205   nfields = split(line, field, "@")
22206   substed = 0
22207   len = length(field[1])
22208   for (i = 2; i < nfields; i++) {
22209     key = field[i]
22210     keylen = length(key)
22211     if (S_is_set[key]) {
22212       value = S[key]
22213       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
22214       len += length(value) + length(field[++i])
22215       substed = 1
22216     } else
22217       len += 1 + keylen
22218   }
22219
22220   print line
22221 }
22222
22223 _ACAWK
22224 _ACEOF
22225 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22226 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22227   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
22228 else
22229   cat
22230 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
22231   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
22232 _ACEOF
22233
22234 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
22235 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
22236 # trailing colons and then remove the whole line if VPATH becomes empty
22237 # (actually we leave an empty line to preserve line numbers).
22238 if test "x$srcdir" = x.; then
22239   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
22240 h
22241 s///
22242 s/^/:/
22243 s/[      ]*$/:/
22244 s/:\$(srcdir):/:/g
22245 s/:\${srcdir}:/:/g
22246 s/:@srcdir@:/:/g
22247 s/^:*//
22248 s/:*$//
22249 x
22250 s/\(=[   ]*\).*/\1/
22251 G
22252 s/\n//
22253 s/^[^=]*=[       ]*$//
22254 }'
22255 fi
22256
22257 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22258 fi # test -n "$CONFIG_FILES"
22259
22260 # Set up the scripts for CONFIG_HEADERS section.
22261 # No need to generate them if there are no CONFIG_HEADERS.
22262 # This happens for instance with `./config.status Makefile'.
22263 if test -n "$CONFIG_HEADERS"; then
22264 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
22265 BEGIN {
22266 _ACEOF
22267
22268 # Transform confdefs.h into an awk script `defines.awk', embedded as
22269 # here-document in config.status, that substitutes the proper values into
22270 # config.h.in to produce config.h.
22271
22272 # Create a delimiter string that does not exist in confdefs.h, to ease
22273 # handling of long lines.
22274 ac_delim='%!_!# '
22275 for ac_last_try in false false :; do
22276   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
22277   if test -z "$ac_tt"; then
22278     break
22279   elif $ac_last_try; then
22280     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
22281   else
22282     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22283   fi
22284 done
22285
22286 # For the awk script, D is an array of macro values keyed by name,
22287 # likewise P contains macro parameters if any.  Preserve backslash
22288 # newline sequences.
22289
22290 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
22291 sed -n '
22292 s/.\{148\}/&'"$ac_delim"'/g
22293 t rset
22294 :rset
22295 s/^[     ]*#[    ]*define[       ][      ]*/ /
22296 t def
22297 d
22298 :def
22299 s/\\$//
22300 t bsnl
22301 s/["\\]/\\&/g
22302 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22303 D["\1"]=" \3"/p
22304 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
22305 d
22306 :bsnl
22307 s/["\\]/\\&/g
22308 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22309 D["\1"]=" \3\\\\\\n"\\/p
22310 t cont
22311 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
22312 t cont
22313 d
22314 :cont
22315 n
22316 s/.\{148\}/&'"$ac_delim"'/g
22317 t clear
22318 :clear
22319 s/\\$//
22320 t bsnlc
22321 s/["\\]/\\&/g; s/^/"/; s/$/"/p
22322 d
22323 :bsnlc
22324 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
22325 b cont
22326 ' <confdefs.h | sed '
22327 s/'"$ac_delim"'/"\\\
22328 "/g' >>$CONFIG_STATUS || ac_write_fail=1
22329
22330 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22331   for (key in D) D_is_set[key] = 1
22332   FS = "\a"
22333 }
22334 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
22335   line = \$ 0
22336   split(line, arg, " ")
22337   if (arg[1] == "#") {
22338     defundef = arg[2]
22339     mac1 = arg[3]
22340   } else {
22341     defundef = substr(arg[1], 2)
22342     mac1 = arg[2]
22343   }
22344   split(mac1, mac2, "(") #)
22345   macro = mac2[1]
22346   prefix = substr(line, 1, index(line, defundef) - 1)
22347   if (D_is_set[macro]) {
22348     # Preserve the white space surrounding the "#".
22349     print prefix "define", macro P[macro] D[macro]
22350     next
22351   } else {
22352     # Replace #undef with comments.  This is necessary, for example,
22353     # in the case of _POSIX_SOURCE, which is predefined and required
22354     # on some systems where configure will not decide to define it.
22355     if (defundef == "undef") {
22356       print "/*", prefix defundef, macro, "*/"
22357       next
22358     }
22359   }
22360 }
22361 { print }
22362 _ACAWK
22363 _ACEOF
22364 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22365   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
22366 fi # test -n "$CONFIG_HEADERS"
22367
22368
22369 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
22370 shift
22371 for ac_tag
22372 do
22373   case $ac_tag in
22374   :[FHLC]) ac_mode=$ac_tag; continue;;
22375   esac
22376   case $ac_mode$ac_tag in
22377   :[FHL]*:*);;
22378   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
22379   :[FH]-) ac_tag=-:-;;
22380   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22381   esac
22382   ac_save_IFS=$IFS
22383   IFS=:
22384   set x $ac_tag
22385   IFS=$ac_save_IFS
22386   shift
22387   ac_file=$1
22388   shift
22389
22390   case $ac_mode in
22391   :L) ac_source=$1;;
22392   :[FH])
22393     ac_file_inputs=
22394     for ac_f
22395     do
22396       case $ac_f in
22397       -) ac_f="$ac_tmp/stdin";;
22398       *) # Look for the file first in the build tree, then in the source tree
22399          # (if the path is not absolute).  The absolute path cannot be DOS-style,
22400          # because $ac_f cannot contain `:'.
22401          test -f "$ac_f" ||
22402            case $ac_f in
22403            [\\/$]*) false;;
22404            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22405            esac ||
22406            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
22407       esac
22408       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
22409       as_fn_append ac_file_inputs " '$ac_f'"
22410     done
22411
22412     # Let's still pretend it is `configure' which instantiates (i.e., don't
22413     # use $as_me), people would be surprised to read:
22414     #    /* config.h.  Generated by config.status.  */
22415     configure_input='Generated from '`
22416           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
22417         `' by configure.'
22418     if test x"$ac_file" != x-; then
22419       configure_input="$ac_file.  $configure_input"
22420       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
22421 $as_echo "$as_me: creating $ac_file" >&6;}
22422     fi
22423     # Neutralize special characters interpreted by sed in replacement strings.
22424     case $configure_input in #(
22425     *\&* | *\|* | *\\* )
22426        ac_sed_conf_input=`$as_echo "$configure_input" |
22427        sed 's/[\\\\&|]/\\\\&/g'`;; #(
22428     *) ac_sed_conf_input=$configure_input;;
22429     esac
22430
22431     case $ac_tag in
22432     *:-:* | *:-) cat >"$ac_tmp/stdin" \
22433       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
22434     esac
22435     ;;
22436   esac
22437
22438   ac_dir=`$as_dirname -- "$ac_file" ||
22439 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22440          X"$ac_file" : 'X\(//\)[^/]' \| \
22441          X"$ac_file" : 'X\(//\)$' \| \
22442          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
22443 $as_echo X"$ac_file" |
22444     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22445             s//\1/
22446             q
22447           }
22448           /^X\(\/\/\)[^/].*/{
22449             s//\1/
22450             q
22451           }
22452           /^X\(\/\/\)$/{
22453             s//\1/
22454             q
22455           }
22456           /^X\(\/\).*/{
22457             s//\1/
22458             q
22459           }
22460           s/.*/./; q'`
22461   as_dir="$ac_dir"; as_fn_mkdir_p
22462   ac_builddir=.
22463
22464 case "$ac_dir" in
22465 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
22466 *)
22467   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
22468   # A ".." for each directory in $ac_dir_suffix.
22469   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
22470   case $ac_top_builddir_sub in
22471   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
22472   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
22473   esac ;;
22474 esac
22475 ac_abs_top_builddir=$ac_pwd
22476 ac_abs_builddir=$ac_pwd$ac_dir_suffix
22477 # for backward compatibility:
22478 ac_top_builddir=$ac_top_build_prefix
22479
22480 case $srcdir in
22481   .)  # We are building in place.
22482     ac_srcdir=.
22483     ac_top_srcdir=$ac_top_builddir_sub
22484     ac_abs_top_srcdir=$ac_pwd ;;
22485   [\\/]* | ?:[\\/]* )  # Absolute name.
22486     ac_srcdir=$srcdir$ac_dir_suffix;
22487     ac_top_srcdir=$srcdir
22488     ac_abs_top_srcdir=$srcdir ;;
22489   *) # Relative name.
22490     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
22491     ac_top_srcdir=$ac_top_build_prefix$srcdir
22492     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
22493 esac
22494 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
22495
22496
22497   case $ac_mode in
22498   :F)
22499   #
22500   # CONFIG_FILE
22501   #
22502
22503 _ACEOF
22504
22505 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22506 # If the template does not know about datarootdir, expand it.
22507 # FIXME: This hack should be removed a few years after 2.60.
22508 ac_datarootdir_hack=; ac_datarootdir_seen=
22509 ac_sed_dataroot='
22510 /datarootdir/ {
22511   p
22512   q
22513 }
22514 /@datadir@/p
22515 /@docdir@/p
22516 /@infodir@/p
22517 /@localedir@/p
22518 /@mandir@/p'
22519 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
22520 *datarootdir*) ac_datarootdir_seen=yes;;
22521 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
22522   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
22523 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
22524 _ACEOF
22525 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22526   ac_datarootdir_hack='
22527   s&@datadir@&$datadir&g
22528   s&@docdir@&$docdir&g
22529   s&@infodir@&$infodir&g
22530   s&@localedir@&$localedir&g
22531   s&@mandir@&$mandir&g
22532   s&\\\${datarootdir}&$datarootdir&g' ;;
22533 esac
22534 _ACEOF
22535
22536 # Neutralize VPATH when `$srcdir' = `.'.
22537 # Shell code in configure.ac might set extrasub.
22538 # FIXME: do we really want to maintain this feature?
22539 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22540 ac_sed_extra="$ac_vpsub
22541 $extrasub
22542 _ACEOF
22543 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22544 :t
22545 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22546 s|@configure_input@|$ac_sed_conf_input|;t t
22547 s&@top_builddir@&$ac_top_builddir_sub&;t t
22548 s&@top_build_prefix@&$ac_top_build_prefix&;t t
22549 s&@srcdir@&$ac_srcdir&;t t
22550 s&@abs_srcdir@&$ac_abs_srcdir&;t t
22551 s&@top_srcdir@&$ac_top_srcdir&;t t
22552 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
22553 s&@builddir@&$ac_builddir&;t t
22554 s&@abs_builddir@&$ac_abs_builddir&;t t
22555 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
22556 $ac_datarootdir_hack
22557 "
22558 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
22559   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22560
22561 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
22562   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
22563   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
22564       "$ac_tmp/out"`; test -z "$ac_out"; } &&
22565   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22566 which seems to be undefined.  Please make sure it is defined" >&5
22567 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22568 which seems to be undefined.  Please make sure it is defined" >&2;}
22569
22570   rm -f "$ac_tmp/stdin"
22571   case $ac_file in
22572   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
22573   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
22574   esac \
22575   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22576  ;;
22577   :H)
22578   #
22579   # CONFIG_HEADER
22580   #
22581   if test x"$ac_file" != x-; then
22582     {
22583       $as_echo "/* $configure_input  */" \
22584       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
22585     } >"$ac_tmp/config.h" \
22586       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22587     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
22588       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
22589 $as_echo "$as_me: $ac_file is unchanged" >&6;}
22590     else
22591       rm -f "$ac_file"
22592       mv "$ac_tmp/config.h" "$ac_file" \
22593         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22594     fi
22595   else
22596     $as_echo "/* $configure_input  */" \
22597       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
22598       || as_fn_error $? "could not create -" "$LINENO" 5
22599   fi
22600  ;;
22601
22602   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
22603 $as_echo "$as_me: executing $ac_file commands" >&6;}
22604  ;;
22605   esac
22606
22607
22608   case $ac_file$ac_mode in
22609     "libtool":C)
22610
22611     # See if we are running on zsh, and set the options that allow our
22612     # commands through without removal of \ escapes.
22613     if test -n "${ZSH_VERSION+set}"; then
22614       setopt NO_GLOB_SUBST
22615     fi
22616
22617     cfgfile=${ofile}T
22618     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
22619     $RM "$cfgfile"
22620
22621     cat <<_LT_EOF >> "$cfgfile"
22622 #! $SHELL
22623 # Generated automatically by $as_me ($PACKAGE) $VERSION
22624 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22625 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
22626
22627 # Provide generalized library-building support services.
22628 # Written by Gordon Matzigkeit, 1996
22629
22630 # Copyright (C) 2014 Free Software Foundation, Inc.
22631 # This is free software; see the source for copying conditions.  There is NO
22632 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22633
22634 # GNU Libtool is free software; you can redistribute it and/or modify
22635 # it under the terms of the GNU General Public License as published by
22636 # the Free Software Foundation; either version 2 of of the License, or
22637 # (at your option) any later version.
22638 #
22639 # As a special exception to the GNU General Public License, if you
22640 # distribute this file as part of a program or library that is built
22641 # using GNU Libtool, you may include this file under the  same
22642 # distribution terms that you use for the rest of that program.
22643 #
22644 # GNU Libtool is distributed in the hope that it will be useful, but
22645 # WITHOUT ANY WARRANTY; without even the implied warranty of
22646 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22647 # GNU General Public License for more details.
22648 #
22649 # You should have received a copy of the GNU General Public License
22650 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22651
22652
22653 # The names of the tagged configurations supported by this script.
22654 available_tags=''
22655
22656 # Configured defaults for sys_lib_dlsearch_path munging.
22657 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
22658
22659 # ### BEGIN LIBTOOL CONFIG
22660
22661 # Which release of libtool.m4 was used?
22662 macro_version=$macro_version
22663 macro_revision=$macro_revision
22664
22665 # Whether or not to build shared libraries.
22666 build_libtool_libs=$enable_shared
22667
22668 # Whether or not to build static libraries.
22669 build_old_libs=$enable_static
22670
22671 # What type of objects to build.
22672 pic_mode=$pic_mode
22673
22674 # Whether or not to optimize for fast installation.
22675 fast_install=$enable_fast_install
22676
22677 # Shared archive member basename,for filename based shared library versioning on AIX.
22678 shared_archive_member_spec=$shared_archive_member_spec
22679
22680 # Shell to use when invoking shell scripts.
22681 SHELL=$lt_SHELL
22682
22683 # An echo program that protects backslashes.
22684 ECHO=$lt_ECHO
22685
22686 # The PATH separator for the build system.
22687 PATH_SEPARATOR=$lt_PATH_SEPARATOR
22688
22689 # The host system.
22690 host_alias=$host_alias
22691 host=$host
22692 host_os=$host_os
22693
22694 # The build system.
22695 build_alias=$build_alias
22696 build=$build
22697 build_os=$build_os
22698
22699 # A sed program that does not truncate output.
22700 SED=$lt_SED
22701
22702 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
22703 Xsed="\$SED -e 1s/^X//"
22704
22705 # A grep program that handles long lines.
22706 GREP=$lt_GREP
22707
22708 # An ERE matcher.
22709 EGREP=$lt_EGREP
22710
22711 # A literal string matcher.
22712 FGREP=$lt_FGREP
22713
22714 # A BSD- or MS-compatible name lister.
22715 NM=$lt_NM
22716
22717 # Whether we need soft or hard links.
22718 LN_S=$lt_LN_S
22719
22720 # What is the maximum length of a command?
22721 max_cmd_len=$max_cmd_len
22722
22723 # Object file suffix (normally "o").
22724 objext=$ac_objext
22725
22726 # Executable file suffix (normally "").
22727 exeext=$exeext
22728
22729 # whether the shell understands "unset".
22730 lt_unset=$lt_unset
22731
22732 # turn spaces into newlines.
22733 SP2NL=$lt_lt_SP2NL
22734
22735 # turn newlines into spaces.
22736 NL2SP=$lt_lt_NL2SP
22737
22738 # convert \$build file names to \$host format.
22739 to_host_file_cmd=$lt_cv_to_host_file_cmd
22740
22741 # convert \$build files to toolchain format.
22742 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
22743
22744 # An object symbol dumper.
22745 OBJDUMP=$lt_OBJDUMP
22746
22747 # Method to check whether dependent libraries are shared objects.
22748 deplibs_check_method=$lt_deplibs_check_method
22749
22750 # Command to use when deplibs_check_method = "file_magic".
22751 file_magic_cmd=$lt_file_magic_cmd
22752
22753 # How to find potential files when deplibs_check_method = "file_magic".
22754 file_magic_glob=$lt_file_magic_glob
22755
22756 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
22757 want_nocaseglob=$lt_want_nocaseglob
22758
22759 # DLL creation program.
22760 DLLTOOL=$lt_DLLTOOL
22761
22762 # Command to associate shared and link libraries.
22763 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
22764
22765 # The archiver.
22766 AR=$lt_AR
22767
22768 # Flags to create an archive.
22769 AR_FLAGS=$lt_AR_FLAGS
22770
22771 # How to feed a file listing to the archiver.
22772 archiver_list_spec=$lt_archiver_list_spec
22773
22774 # A symbol stripping program.
22775 STRIP=$lt_STRIP
22776
22777 # Commands used to install an old-style archive.
22778 RANLIB=$lt_RANLIB
22779 old_postinstall_cmds=$lt_old_postinstall_cmds
22780 old_postuninstall_cmds=$lt_old_postuninstall_cmds
22781
22782 # Whether to use a lock for old archive extraction.
22783 lock_old_archive_extraction=$lock_old_archive_extraction
22784
22785 # A C compiler.
22786 LTCC=$lt_CC
22787
22788 # LTCC compiler flags.
22789 LTCFLAGS=$lt_CFLAGS
22790
22791 # Take the output of nm and produce a listing of raw symbols and C names.
22792 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
22793
22794 # Transform the output of nm in a proper C declaration.
22795 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
22796
22797 # Transform the output of nm into a list of symbols to manually relocate.
22798 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
22799
22800 # Transform the output of nm in a C name address pair.
22801 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
22802
22803 # Transform the output of nm in a C name address pair when lib prefix is needed.
22804 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
22805
22806 # The name lister interface.
22807 nm_interface=$lt_lt_cv_nm_interface
22808
22809 # Specify filename containing input files for \$NM.
22810 nm_file_list_spec=$lt_nm_file_list_spec
22811
22812 # The root where to search for dependent libraries,and where our libraries should be installed.
22813 lt_sysroot=$lt_sysroot
22814
22815 # Command to truncate a binary pipe.
22816 lt_truncate_bin=$lt_lt_cv_truncate_bin
22817
22818 # The name of the directory that contains temporary libtool files.
22819 objdir=$objdir
22820
22821 # Used to examine libraries when file_magic_cmd begins with "file".
22822 MAGIC_CMD=$MAGIC_CMD
22823
22824 # Must we lock files when doing compilation?
22825 need_locks=$lt_need_locks
22826
22827 # Manifest tool.
22828 MANIFEST_TOOL=$lt_MANIFEST_TOOL
22829
22830 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
22831 DSYMUTIL=$lt_DSYMUTIL
22832
22833 # Tool to change global to local symbols on Mac OS X.
22834 NMEDIT=$lt_NMEDIT
22835
22836 # Tool to manipulate fat objects and archives on Mac OS X.
22837 LIPO=$lt_LIPO
22838
22839 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
22840 OTOOL=$lt_OTOOL
22841
22842 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
22843 OTOOL64=$lt_OTOOL64
22844
22845 # Old archive suffix (normally "a").
22846 libext=$libext
22847
22848 # Shared library suffix (normally ".so").
22849 shrext_cmds=$lt_shrext_cmds
22850
22851 # The commands to extract the exported symbol list from a shared archive.
22852 extract_expsyms_cmds=$lt_extract_expsyms_cmds
22853
22854 # Variables whose values should be saved in libtool wrapper scripts and
22855 # restored at link time.
22856 variables_saved_for_relink=$lt_variables_saved_for_relink
22857
22858 # Do we need the "lib" prefix for modules?
22859 need_lib_prefix=$need_lib_prefix
22860
22861 # Do we need a version for libraries?
22862 need_version=$need_version
22863
22864 # Library versioning type.
22865 version_type=$version_type
22866
22867 # Shared library runtime path variable.
22868 runpath_var=$runpath_var
22869
22870 # Shared library path variable.
22871 shlibpath_var=$shlibpath_var
22872
22873 # Is shlibpath searched before the hard-coded library search path?
22874 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
22875
22876 # Format of library name prefix.
22877 libname_spec=$lt_libname_spec
22878
22879 # List of archive names.  First name is the real one, the rest are links.
22880 # The last name is the one that the linker finds with -lNAME
22881 library_names_spec=$lt_library_names_spec
22882
22883 # The coded name of the library, if different from the real name.
22884 soname_spec=$lt_soname_spec
22885
22886 # Permission mode override for installation of shared libraries.
22887 install_override_mode=$lt_install_override_mode
22888
22889 # Command to use after installation of a shared archive.
22890 postinstall_cmds=$lt_postinstall_cmds
22891
22892 # Command to use after uninstallation of a shared archive.
22893 postuninstall_cmds=$lt_postuninstall_cmds
22894
22895 # Commands used to finish a libtool library installation in a directory.
22896 finish_cmds=$lt_finish_cmds
22897
22898 # As "finish_cmds", except a single script fragment to be evaled but
22899 # not shown.
22900 finish_eval=$lt_finish_eval
22901
22902 # Whether we should hardcode library paths into libraries.
22903 hardcode_into_libs=$hardcode_into_libs
22904
22905 # Compile-time system search path for libraries.
22906 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
22907
22908 # Detected run-time system search path for libraries.
22909 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
22910
22911 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
22912 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
22913
22914 # Whether dlopen is supported.
22915 dlopen_support=$enable_dlopen
22916
22917 # Whether dlopen of programs is supported.
22918 dlopen_self=$enable_dlopen_self
22919
22920 # Whether dlopen of statically linked programs is supported.
22921 dlopen_self_static=$enable_dlopen_self_static
22922
22923 # Commands to strip libraries.
22924 old_striplib=$lt_old_striplib
22925 striplib=$lt_striplib
22926
22927
22928 # The linker used to build libraries.
22929 LD=$lt_LD
22930
22931 # How to create reloadable object files.
22932 reload_flag=$lt_reload_flag
22933 reload_cmds=$lt_reload_cmds
22934
22935 # Commands used to build an old-style archive.
22936 old_archive_cmds=$lt_old_archive_cmds
22937
22938 # A language specific compiler.
22939 CC=$lt_compiler
22940
22941 # Is the compiler the GNU compiler?
22942 with_gcc=$GCC
22943
22944 # Compiler flag to turn off builtin functions.
22945 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
22946
22947 # Additional compiler flags for building library objects.
22948 pic_flag=$lt_lt_prog_compiler_pic
22949
22950 # How to pass a linker flag through the compiler.
22951 wl=$lt_lt_prog_compiler_wl
22952
22953 # Compiler flag to prevent dynamic linking.
22954 link_static_flag=$lt_lt_prog_compiler_static
22955
22956 # Does compiler simultaneously support -c and -o options?
22957 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
22958
22959 # Whether or not to add -lc for building shared libraries.
22960 build_libtool_need_lc=$archive_cmds_need_lc
22961
22962 # Whether or not to disallow shared libs when runtime libs are static.
22963 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
22964
22965 # Compiler flag to allow reflexive dlopens.
22966 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
22967
22968 # Compiler flag to generate shared objects directly from archives.
22969 whole_archive_flag_spec=$lt_whole_archive_flag_spec
22970
22971 # Whether the compiler copes with passing no objects directly.
22972 compiler_needs_object=$lt_compiler_needs_object
22973
22974 # Create an old-style archive from a shared archive.
22975 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
22976
22977 # Create a temporary old-style archive to link instead of a shared archive.
22978 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
22979
22980 # Commands used to build a shared archive.
22981 archive_cmds=$lt_archive_cmds
22982 archive_expsym_cmds=$lt_archive_expsym_cmds
22983
22984 # Commands used to build a loadable module if different from building
22985 # a shared archive.
22986 module_cmds=$lt_module_cmds
22987 module_expsym_cmds=$lt_module_expsym_cmds
22988
22989 # Whether we are building with GNU ld or not.
22990 with_gnu_ld=$lt_with_gnu_ld
22991
22992 # Flag that allows shared libraries with undefined symbols to be built.
22993 allow_undefined_flag=$lt_allow_undefined_flag
22994
22995 # Flag that enforces no undefined symbols.
22996 no_undefined_flag=$lt_no_undefined_flag
22997
22998 # Flag to hardcode \$libdir into a binary during linking.
22999 # This must work even if \$libdir does not exist
23000 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
23001
23002 # Whether we need a single "-rpath" flag with a separated argument.
23003 hardcode_libdir_separator=$lt_hardcode_libdir_separator
23004
23005 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23006 # DIR into the resulting binary.
23007 hardcode_direct=$hardcode_direct
23008
23009 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23010 # DIR into the resulting binary and the resulting library dependency is
23011 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
23012 # library is relocated.
23013 hardcode_direct_absolute=$hardcode_direct_absolute
23014
23015 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
23016 # into the resulting binary.
23017 hardcode_minus_L=$hardcode_minus_L
23018
23019 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
23020 # into the resulting binary.
23021 hardcode_shlibpath_var=$hardcode_shlibpath_var
23022
23023 # Set to "yes" if building a shared library automatically hardcodes DIR
23024 # into the library and all subsequent libraries and executables linked
23025 # against it.
23026 hardcode_automatic=$hardcode_automatic
23027
23028 # Set to yes if linker adds runtime paths of dependent libraries
23029 # to runtime path list.
23030 inherit_rpath=$inherit_rpath
23031
23032 # Whether libtool must link a program against all its dependency libraries.
23033 link_all_deplibs=$link_all_deplibs
23034
23035 # Set to "yes" if exported symbols are required.
23036 always_export_symbols=$always_export_symbols
23037
23038 # The commands to list exported symbols.
23039 export_symbols_cmds=$lt_export_symbols_cmds
23040
23041 # Symbols that should not be listed in the preloaded symbols.
23042 exclude_expsyms=$lt_exclude_expsyms
23043
23044 # Symbols that must always be exported.
23045 include_expsyms=$lt_include_expsyms
23046
23047 # Commands necessary for linking programs (against libraries) with templates.
23048 prelink_cmds=$lt_prelink_cmds
23049
23050 # Commands necessary for finishing linking programs.
23051 postlink_cmds=$lt_postlink_cmds
23052
23053 # Specify filename containing input files.
23054 file_list_spec=$lt_file_list_spec
23055
23056 # How to hardcode a shared library path into an executable.
23057 hardcode_action=$hardcode_action
23058
23059 # ### END LIBTOOL CONFIG
23060
23061 _LT_EOF
23062
23063     cat <<'_LT_EOF' >> "$cfgfile"
23064
23065 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
23066
23067 # func_munge_path_list VARIABLE PATH
23068 # -----------------------------------
23069 # VARIABLE is name of variable containing _space_ separated list of
23070 # directories to be munged by the contents of PATH, which is string
23071 # having a format:
23072 # "DIR[:DIR]:"
23073 #       string "DIR[ DIR]" will be prepended to VARIABLE
23074 # ":DIR[:DIR]"
23075 #       string "DIR[ DIR]" will be appended to VARIABLE
23076 # "DIRP[:DIRP]::[DIRA:]DIRA"
23077 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
23078 #       "DIRA[ DIRA]" will be appended to VARIABLE
23079 # "DIR[:DIR]"
23080 #       VARIABLE will be replaced by "DIR[ DIR]"
23081 func_munge_path_list ()
23082 {
23083     case x$2 in
23084     x)
23085         ;;
23086     *:)
23087         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
23088         ;;
23089     x:*)
23090         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
23091         ;;
23092     *::*)
23093         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
23094         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
23095         ;;
23096     *)
23097         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
23098         ;;
23099     esac
23100 }
23101
23102
23103 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
23104 func_cc_basename ()
23105 {
23106     for cc_temp in $*""; do
23107       case $cc_temp in
23108         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
23109         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
23110         \-*) ;;
23111         *) break;;
23112       esac
23113     done
23114     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
23115 }
23116
23117
23118 # ### END FUNCTIONS SHARED WITH CONFIGURE
23119
23120 _LT_EOF
23121
23122   case $host_os in
23123   aix3*)
23124     cat <<\_LT_EOF >> "$cfgfile"
23125 # AIX sometimes has problems with the GCC collect2 program.  For some
23126 # reason, if we set the COLLECT_NAMES environment variable, the problems
23127 # vanish in a puff of smoke.
23128 if test set != "${COLLECT_NAMES+set}"; then
23129   COLLECT_NAMES=
23130   export COLLECT_NAMES
23131 fi
23132 _LT_EOF
23133     ;;
23134   esac
23135
23136
23137 ltmain=$ac_aux_dir/ltmain.sh
23138
23139
23140   # We use sed instead of cat because bash on DJGPP gets confused if
23141   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
23142   # text mode, it properly converts lines to CR/LF.  This bash problem
23143   # is reportedly fixed, but why not run on old versions too?
23144   sed '$q' "$ltmain" >> "$cfgfile" \
23145      || (rm -f "$cfgfile"; exit 1)
23146
23147    mv -f "$cfgfile" "$ofile" ||
23148     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
23149   chmod +x "$ofile"
23150
23151  ;;
23152     "disable-rpath":C)
23153         sed < libtool > libtool-2 \
23154         's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
23155         mv libtool-2 libtool
23156         chmod 755 libtool
23157         libtool="./libtool"
23158          ;;
23159
23160   esac
23161 done # for ac_tag
23162
23163
23164 as_fn_exit 0
23165 _ACEOF
23166 ac_clean_files=$ac_clean_files_save
23167
23168 test $ac_write_fail = 0 ||
23169   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
23170
23171
23172 # configure is writing to config.log, and then calls config.status.
23173 # config.status does its own redirection, appending to config.log.
23174 # Unfortunately, on DOS this fails, as config.log is still kept open
23175 # by configure, so config.status won't be able to write to it; its
23176 # output is simply discarded.  So we exec the FD to /dev/null,
23177 # effectively closing config.log, so it can be properly (re)opened and
23178 # appended to by config.status.  When coming back to configure, we
23179 # need to make the FD available again.
23180 if test "$no_create" != yes; then
23181   ac_cs_success=:
23182   ac_config_status_args=
23183   test "$silent" = yes &&
23184     ac_config_status_args="$ac_config_status_args --quiet"
23185   exec 5>/dev/null
23186   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23187   exec 5>>config.log
23188   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23189   # would make configure fail if this is the last instruction.
23190   $ac_cs_success || as_fn_exit 1
23191 fi
23192 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
23193   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
23194 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
23195 fi
23196