]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/unbound/configure
readelf: add newline after dumping dynamic FLAGS / FLAGS_1
[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.8.1.
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.8.1'
594 PACKAGE_STRING='unbound 1.8.1'
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 staticexe
674 PC_LIBEVENT_DEPENDENCY
675 UNBOUND_EVENT_UNINSTALL
676 UNBOUND_EVENT_INSTALL
677 SUBNET_HEADER
678 SUBNET_OBJ
679 SSLLIB
680 HAVE_SSL
681 CONFIG_DATE
682 NETBSD_LINTFLAGS
683 PYUNBOUND_UNINSTALL
684 PYUNBOUND_INSTALL
685 PYUNBOUND_TARGET
686 PYUNBOUND_OBJ
687 WITH_PYUNBOUND
688 PYTHONMOD_UNINSTALL
689 PYTHONMOD_INSTALL
690 PYTHONMOD_HEADER
691 PYTHONMOD_OBJ
692 WITH_PYTHONMODULE
693 swig
694 SWIG_LIB
695 SWIG
696 PC_PY_DEPENDENCY
697 PKG_CONFIG_LIBDIR
698 PKG_CONFIG_PATH
699 PKG_CONFIG
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.8.1 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.8.1:";;
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.8.1
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.8.1, 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=8
2785
2786 UNBOUND_VERSION_MICRO=1
2787
2788
2789 LIBUNBOUND_CURRENT=8
2790 LIBUNBOUND_REVISION=1
2791 LIBUNBOUND_AGE=0
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 # 1.7.3 had 7:11:5
2853 # 1.8.0 had 8:0:0 # changes the event callback function signature
2854 # 1.8.1 had 8:1:0
2855
2856 #   Current  -- the number of the binary API that we're implementing
2857 #   Revision -- which iteration of the implementation of the binary
2858 #               API are we supplying?
2859 #   Age      -- How many previous binary API versions do we also
2860 #               support?
2861 #
2862 # If we release a new version that does not change the binary API,
2863 # increment Revision.
2864 #
2865 # If we release a new version that changes the binary API, but does
2866 # not break programs compiled against the old binary API, increment
2867 # Current and Age.  Set Revision to 0, since this is the first
2868 # implementation of the new API.
2869 #
2870 # Otherwise, we're changing the binary API and breaking backward
2871 # compatibility with old binaries.  Increment Current.  Set Age to 0,
2872 # since we're backward compatible with no previous APIs.  Set Revision
2873 # to 0 too.
2874
2875
2876
2877
2878 CFLAGS="$CFLAGS"
2879 ac_ext=c
2880 ac_cpp='$CPP $CPPFLAGS'
2881 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2882 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2883 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2884 if test -n "$ac_tool_prefix"; then
2885   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2886 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2888 $as_echo_n "checking for $ac_word... " >&6; }
2889 if ${ac_cv_prog_CC+:} false; then :
2890   $as_echo_n "(cached) " >&6
2891 else
2892   if test -n "$CC"; then
2893   ac_cv_prog_CC="$CC" # Let the user override the test.
2894 else
2895 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2896 for as_dir in $PATH
2897 do
2898   IFS=$as_save_IFS
2899   test -z "$as_dir" && as_dir=.
2900     for ac_exec_ext in '' $ac_executable_extensions; do
2901   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2902     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2903     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2904     break 2
2905   fi
2906 done
2907   done
2908 IFS=$as_save_IFS
2909
2910 fi
2911 fi
2912 CC=$ac_cv_prog_CC
2913 if test -n "$CC"; then
2914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2915 $as_echo "$CC" >&6; }
2916 else
2917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2918 $as_echo "no" >&6; }
2919 fi
2920
2921
2922 fi
2923 if test -z "$ac_cv_prog_CC"; then
2924   ac_ct_CC=$CC
2925   # Extract the first word of "gcc", so it can be a program name with args.
2926 set dummy gcc; ac_word=$2
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2928 $as_echo_n "checking for $ac_word... " >&6; }
2929 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2930   $as_echo_n "(cached) " >&6
2931 else
2932   if test -n "$ac_ct_CC"; then
2933   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2934 else
2935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2936 for as_dir in $PATH
2937 do
2938   IFS=$as_save_IFS
2939   test -z "$as_dir" && as_dir=.
2940     for ac_exec_ext in '' $ac_executable_extensions; do
2941   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2942     ac_cv_prog_ac_ct_CC="gcc"
2943     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2944     break 2
2945   fi
2946 done
2947   done
2948 IFS=$as_save_IFS
2949
2950 fi
2951 fi
2952 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2953 if test -n "$ac_ct_CC"; then
2954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2955 $as_echo "$ac_ct_CC" >&6; }
2956 else
2957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2958 $as_echo "no" >&6; }
2959 fi
2960
2961   if test "x$ac_ct_CC" = x; then
2962     CC=""
2963   else
2964     case $cross_compiling:$ac_tool_warned in
2965 yes:)
2966 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2967 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2968 ac_tool_warned=yes ;;
2969 esac
2970     CC=$ac_ct_CC
2971   fi
2972 else
2973   CC="$ac_cv_prog_CC"
2974 fi
2975
2976 if test -z "$CC"; then
2977           if test -n "$ac_tool_prefix"; then
2978     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2979 set dummy ${ac_tool_prefix}cc; ac_word=$2
2980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2981 $as_echo_n "checking for $ac_word... " >&6; }
2982 if ${ac_cv_prog_CC+:} false; then :
2983   $as_echo_n "(cached) " >&6
2984 else
2985   if test -n "$CC"; then
2986   ac_cv_prog_CC="$CC" # Let the user override the test.
2987 else
2988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2989 for as_dir in $PATH
2990 do
2991   IFS=$as_save_IFS
2992   test -z "$as_dir" && as_dir=.
2993     for ac_exec_ext in '' $ac_executable_extensions; do
2994   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2995     ac_cv_prog_CC="${ac_tool_prefix}cc"
2996     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2997     break 2
2998   fi
2999 done
3000   done
3001 IFS=$as_save_IFS
3002
3003 fi
3004 fi
3005 CC=$ac_cv_prog_CC
3006 if test -n "$CC"; then
3007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3008 $as_echo "$CC" >&6; }
3009 else
3010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3011 $as_echo "no" >&6; }
3012 fi
3013
3014
3015   fi
3016 fi
3017 if test -z "$CC"; then
3018   # Extract the first word of "cc", so it can be a program name with args.
3019 set dummy cc; ac_word=$2
3020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3021 $as_echo_n "checking for $ac_word... " >&6; }
3022 if ${ac_cv_prog_CC+:} false; then :
3023   $as_echo_n "(cached) " >&6
3024 else
3025   if test -n "$CC"; then
3026   ac_cv_prog_CC="$CC" # Let the user override the test.
3027 else
3028   ac_prog_rejected=no
3029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3030 for as_dir in $PATH
3031 do
3032   IFS=$as_save_IFS
3033   test -z "$as_dir" && as_dir=.
3034     for ac_exec_ext in '' $ac_executable_extensions; do
3035   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3036     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3037        ac_prog_rejected=yes
3038        continue
3039      fi
3040     ac_cv_prog_CC="cc"
3041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3042     break 2
3043   fi
3044 done
3045   done
3046 IFS=$as_save_IFS
3047
3048 if test $ac_prog_rejected = yes; then
3049   # We found a bogon in the path, so make sure we never use it.
3050   set dummy $ac_cv_prog_CC
3051   shift
3052   if test $# != 0; then
3053     # We chose a different compiler from the bogus one.
3054     # However, it has the same basename, so the bogon will be chosen
3055     # first if we set CC to just the basename; use the full file name.
3056     shift
3057     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3058   fi
3059 fi
3060 fi
3061 fi
3062 CC=$ac_cv_prog_CC
3063 if test -n "$CC"; then
3064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3065 $as_echo "$CC" >&6; }
3066 else
3067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3068 $as_echo "no" >&6; }
3069 fi
3070
3071
3072 fi
3073 if test -z "$CC"; then
3074   if test -n "$ac_tool_prefix"; then
3075   for ac_prog in cl.exe
3076   do
3077     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3078 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3080 $as_echo_n "checking for $ac_word... " >&6; }
3081 if ${ac_cv_prog_CC+:} false; then :
3082   $as_echo_n "(cached) " >&6
3083 else
3084   if test -n "$CC"; then
3085   ac_cv_prog_CC="$CC" # Let the user override the test.
3086 else
3087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3088 for as_dir in $PATH
3089 do
3090   IFS=$as_save_IFS
3091   test -z "$as_dir" && as_dir=.
3092     for ac_exec_ext in '' $ac_executable_extensions; do
3093   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3094     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3096     break 2
3097   fi
3098 done
3099   done
3100 IFS=$as_save_IFS
3101
3102 fi
3103 fi
3104 CC=$ac_cv_prog_CC
3105 if test -n "$CC"; then
3106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3107 $as_echo "$CC" >&6; }
3108 else
3109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3110 $as_echo "no" >&6; }
3111 fi
3112
3113
3114     test -n "$CC" && break
3115   done
3116 fi
3117 if test -z "$CC"; then
3118   ac_ct_CC=$CC
3119   for ac_prog in cl.exe
3120 do
3121   # Extract the first word of "$ac_prog", so it can be a program name with args.
3122 set dummy $ac_prog; ac_word=$2
3123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3124 $as_echo_n "checking for $ac_word... " >&6; }
3125 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3126   $as_echo_n "(cached) " >&6
3127 else
3128   if test -n "$ac_ct_CC"; then
3129   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3130 else
3131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3132 for as_dir in $PATH
3133 do
3134   IFS=$as_save_IFS
3135   test -z "$as_dir" && as_dir=.
3136     for ac_exec_ext in '' $ac_executable_extensions; do
3137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3138     ac_cv_prog_ac_ct_CC="$ac_prog"
3139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3140     break 2
3141   fi
3142 done
3143   done
3144 IFS=$as_save_IFS
3145
3146 fi
3147 fi
3148 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3149 if test -n "$ac_ct_CC"; then
3150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3151 $as_echo "$ac_ct_CC" >&6; }
3152 else
3153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3154 $as_echo "no" >&6; }
3155 fi
3156
3157
3158   test -n "$ac_ct_CC" && break
3159 done
3160
3161   if test "x$ac_ct_CC" = x; then
3162     CC=""
3163   else
3164     case $cross_compiling:$ac_tool_warned in
3165 yes:)
3166 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3167 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3168 ac_tool_warned=yes ;;
3169 esac
3170     CC=$ac_ct_CC
3171   fi
3172 fi
3173
3174 fi
3175
3176
3177 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3178 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3179 as_fn_error $? "no acceptable C compiler found in \$PATH
3180 See \`config.log' for more details" "$LINENO" 5; }
3181
3182 # Provide some information about the compiler.
3183 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3184 set X $ac_compile
3185 ac_compiler=$2
3186 for ac_option in --version -v -V -qversion; do
3187   { { ac_try="$ac_compiler $ac_option >&5"
3188 case "(($ac_try" in
3189   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3190   *) ac_try_echo=$ac_try;;
3191 esac
3192 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3193 $as_echo "$ac_try_echo"; } >&5
3194   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3195   ac_status=$?
3196   if test -s conftest.err; then
3197     sed '10a\
3198 ... rest of stderr output deleted ...
3199          10q' conftest.err >conftest.er1
3200     cat conftest.er1 >&5
3201   fi
3202   rm -f conftest.er1 conftest.err
3203   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3204   test $ac_status = 0; }
3205 done
3206
3207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3208 /* end confdefs.h.  */
3209
3210 int
3211 main ()
3212 {
3213
3214   ;
3215   return 0;
3216 }
3217 _ACEOF
3218 ac_clean_files_save=$ac_clean_files
3219 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3220 # Try to create an executable without -o first, disregard a.out.
3221 # It will help us diagnose broken compilers, and finding out an intuition
3222 # of exeext.
3223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3224 $as_echo_n "checking whether the C compiler works... " >&6; }
3225 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3226
3227 # The possible output files:
3228 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3229
3230 ac_rmfiles=
3231 for ac_file in $ac_files
3232 do
3233   case $ac_file in
3234     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3235     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3236   esac
3237 done
3238 rm -f $ac_rmfiles
3239
3240 if { { ac_try="$ac_link_default"
3241 case "(($ac_try" in
3242   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3243   *) ac_try_echo=$ac_try;;
3244 esac
3245 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3246 $as_echo "$ac_try_echo"; } >&5
3247   (eval "$ac_link_default") 2>&5
3248   ac_status=$?
3249   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3250   test $ac_status = 0; }; then :
3251   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3252 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3253 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3254 # so that the user can short-circuit this test for compilers unknown to
3255 # Autoconf.
3256 for ac_file in $ac_files ''
3257 do
3258   test -f "$ac_file" || continue
3259   case $ac_file in
3260     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3261         ;;
3262     [ab].out )
3263         # We found the default executable, but exeext='' is most
3264         # certainly right.
3265         break;;
3266     *.* )
3267         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3268         then :; else
3269            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3270         fi
3271         # We set ac_cv_exeext here because the later test for it is not
3272         # safe: cross compilers may not add the suffix if given an `-o'
3273         # argument, so we may need to know it at that point already.
3274         # Even if this section looks crufty: it has the advantage of
3275         # actually working.
3276         break;;
3277     * )
3278         break;;
3279   esac
3280 done
3281 test "$ac_cv_exeext" = no && ac_cv_exeext=
3282
3283 else
3284   ac_file=''
3285 fi
3286 if test -z "$ac_file"; then :
3287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3288 $as_echo "no" >&6; }
3289 $as_echo "$as_me: failed program was:" >&5
3290 sed 's/^/| /' conftest.$ac_ext >&5
3291
3292 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3293 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3294 as_fn_error 77 "C compiler cannot create executables
3295 See \`config.log' for more details" "$LINENO" 5; }
3296 else
3297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3298 $as_echo "yes" >&6; }
3299 fi
3300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3301 $as_echo_n "checking for C compiler default output file name... " >&6; }
3302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3303 $as_echo "$ac_file" >&6; }
3304 ac_exeext=$ac_cv_exeext
3305
3306 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3307 ac_clean_files=$ac_clean_files_save
3308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3309 $as_echo_n "checking for suffix of executables... " >&6; }
3310 if { { ac_try="$ac_link"
3311 case "(($ac_try" in
3312   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3313   *) ac_try_echo=$ac_try;;
3314 esac
3315 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3316 $as_echo "$ac_try_echo"; } >&5
3317   (eval "$ac_link") 2>&5
3318   ac_status=$?
3319   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3320   test $ac_status = 0; }; then :
3321   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3322 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3323 # work properly (i.e., refer to `conftest.exe'), while it won't with
3324 # `rm'.
3325 for ac_file in conftest.exe conftest conftest.*; do
3326   test -f "$ac_file" || continue
3327   case $ac_file in
3328     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3329     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3330           break;;
3331     * ) break;;
3332   esac
3333 done
3334 else
3335   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3336 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3337 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3338 See \`config.log' for more details" "$LINENO" 5; }
3339 fi
3340 rm -f conftest conftest$ac_cv_exeext
3341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3342 $as_echo "$ac_cv_exeext" >&6; }
3343
3344 rm -f conftest.$ac_ext
3345 EXEEXT=$ac_cv_exeext
3346 ac_exeext=$EXEEXT
3347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3348 /* end confdefs.h.  */
3349 #include <stdio.h>
3350 int
3351 main ()
3352 {
3353 FILE *f = fopen ("conftest.out", "w");
3354  return ferror (f) || fclose (f) != 0;
3355
3356   ;
3357   return 0;
3358 }
3359 _ACEOF
3360 ac_clean_files="$ac_clean_files conftest.out"
3361 # Check that the compiler produces executables we can run.  If not, either
3362 # the compiler is broken, or we cross compile.
3363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3364 $as_echo_n "checking whether we are cross compiling... " >&6; }
3365 if test "$cross_compiling" != yes; then
3366   { { ac_try="$ac_link"
3367 case "(($ac_try" in
3368   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3369   *) ac_try_echo=$ac_try;;
3370 esac
3371 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3372 $as_echo "$ac_try_echo"; } >&5
3373   (eval "$ac_link") 2>&5
3374   ac_status=$?
3375   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3376   test $ac_status = 0; }
3377   if { ac_try='./conftest$ac_cv_exeext'
3378   { { case "(($ac_try" in
3379   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3380   *) ac_try_echo=$ac_try;;
3381 esac
3382 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3383 $as_echo "$ac_try_echo"; } >&5
3384   (eval "$ac_try") 2>&5
3385   ac_status=$?
3386   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3387   test $ac_status = 0; }; }; then
3388     cross_compiling=no
3389   else
3390     if test "$cross_compiling" = maybe; then
3391         cross_compiling=yes
3392     else
3393         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3394 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3395 as_fn_error $? "cannot run C compiled programs.
3396 If you meant to cross compile, use \`--host'.
3397 See \`config.log' for more details" "$LINENO" 5; }
3398     fi
3399   fi
3400 fi
3401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3402 $as_echo "$cross_compiling" >&6; }
3403
3404 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3405 ac_clean_files=$ac_clean_files_save
3406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3407 $as_echo_n "checking for suffix of object files... " >&6; }
3408 if ${ac_cv_objext+:} false; then :
3409   $as_echo_n "(cached) " >&6
3410 else
3411   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3412 /* end confdefs.h.  */
3413
3414 int
3415 main ()
3416 {
3417
3418   ;
3419   return 0;
3420 }
3421 _ACEOF
3422 rm -f conftest.o conftest.obj
3423 if { { ac_try="$ac_compile"
3424 case "(($ac_try" in
3425   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3426   *) ac_try_echo=$ac_try;;
3427 esac
3428 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3429 $as_echo "$ac_try_echo"; } >&5
3430   (eval "$ac_compile") 2>&5
3431   ac_status=$?
3432   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3433   test $ac_status = 0; }; then :
3434   for ac_file in conftest.o conftest.obj conftest.*; do
3435   test -f "$ac_file" || continue;
3436   case $ac_file in
3437     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3438     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3439        break;;
3440   esac
3441 done
3442 else
3443   $as_echo "$as_me: failed program was:" >&5
3444 sed 's/^/| /' conftest.$ac_ext >&5
3445
3446 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3447 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3448 as_fn_error $? "cannot compute suffix of object files: cannot compile
3449 See \`config.log' for more details" "$LINENO" 5; }
3450 fi
3451 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3452 fi
3453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3454 $as_echo "$ac_cv_objext" >&6; }
3455 OBJEXT=$ac_cv_objext
3456 ac_objext=$OBJEXT
3457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3458 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3459 if ${ac_cv_c_compiler_gnu+:} false; then :
3460   $as_echo_n "(cached) " >&6
3461 else
3462   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3463 /* end confdefs.h.  */
3464
3465 int
3466 main ()
3467 {
3468 #ifndef __GNUC__
3469        choke me
3470 #endif
3471
3472   ;
3473   return 0;
3474 }
3475 _ACEOF
3476 if ac_fn_c_try_compile "$LINENO"; then :
3477   ac_compiler_gnu=yes
3478 else
3479   ac_compiler_gnu=no
3480 fi
3481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3482 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3483
3484 fi
3485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3486 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3487 if test $ac_compiler_gnu = yes; then
3488   GCC=yes
3489 else
3490   GCC=
3491 fi
3492 ac_test_CFLAGS=${CFLAGS+set}
3493 ac_save_CFLAGS=$CFLAGS
3494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3495 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3496 if ${ac_cv_prog_cc_g+:} false; then :
3497   $as_echo_n "(cached) " >&6
3498 else
3499   ac_save_c_werror_flag=$ac_c_werror_flag
3500    ac_c_werror_flag=yes
3501    ac_cv_prog_cc_g=no
3502    CFLAGS="-g"
3503    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3504 /* end confdefs.h.  */
3505
3506 int
3507 main ()
3508 {
3509
3510   ;
3511   return 0;
3512 }
3513 _ACEOF
3514 if ac_fn_c_try_compile "$LINENO"; then :
3515   ac_cv_prog_cc_g=yes
3516 else
3517   CFLAGS=""
3518       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3519 /* end confdefs.h.  */
3520
3521 int
3522 main ()
3523 {
3524
3525   ;
3526   return 0;
3527 }
3528 _ACEOF
3529 if ac_fn_c_try_compile "$LINENO"; then :
3530
3531 else
3532   ac_c_werror_flag=$ac_save_c_werror_flag
3533          CFLAGS="-g"
3534          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3535 /* end confdefs.h.  */
3536
3537 int
3538 main ()
3539 {
3540
3541   ;
3542   return 0;
3543 }
3544 _ACEOF
3545 if ac_fn_c_try_compile "$LINENO"; then :
3546   ac_cv_prog_cc_g=yes
3547 fi
3548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3549 fi
3550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3551 fi
3552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3553    ac_c_werror_flag=$ac_save_c_werror_flag
3554 fi
3555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3556 $as_echo "$ac_cv_prog_cc_g" >&6; }
3557 if test "$ac_test_CFLAGS" = set; then
3558   CFLAGS=$ac_save_CFLAGS
3559 elif test $ac_cv_prog_cc_g = yes; then
3560   if test "$GCC" = yes; then
3561     CFLAGS="-g -O2"
3562   else
3563     CFLAGS="-g"
3564   fi
3565 else
3566   if test "$GCC" = yes; then
3567     CFLAGS="-O2"
3568   else
3569     CFLAGS=
3570   fi
3571 fi
3572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3573 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3574 if ${ac_cv_prog_cc_c89+:} false; then :
3575   $as_echo_n "(cached) " >&6
3576 else
3577   ac_cv_prog_cc_c89=no
3578 ac_save_CC=$CC
3579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3580 /* end confdefs.h.  */
3581 #include <stdarg.h>
3582 #include <stdio.h>
3583 struct stat;
3584 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3585 struct buf { int x; };
3586 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3587 static char *e (p, i)
3588      char **p;
3589      int i;
3590 {
3591   return p[i];
3592 }
3593 static char *f (char * (*g) (char **, int), char **p, ...)
3594 {
3595   char *s;
3596   va_list v;
3597   va_start (v,p);
3598   s = g (p, va_arg (v,int));
3599   va_end (v);
3600   return s;
3601 }
3602
3603 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3604    function prototypes and stuff, but not '\xHH' hex character constants.
3605    These don't provoke an error unfortunately, instead are silently treated
3606    as 'x'.  The following induces an error, until -std is added to get
3607    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3608    array size at least.  It's necessary to write '\x00'==0 to get something
3609    that's true only with -std.  */
3610 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3611
3612 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3613    inside strings and character constants.  */
3614 #define FOO(x) 'x'
3615 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3616
3617 int test (int i, double x);
3618 struct s1 {int (*f) (int a);};
3619 struct s2 {int (*f) (double a);};
3620 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3621 int argc;
3622 char **argv;
3623 int
3624 main ()
3625 {
3626 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3627   ;
3628   return 0;
3629 }
3630 _ACEOF
3631 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3632         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3633 do
3634   CC="$ac_save_CC $ac_arg"
3635   if ac_fn_c_try_compile "$LINENO"; then :
3636   ac_cv_prog_cc_c89=$ac_arg
3637 fi
3638 rm -f core conftest.err conftest.$ac_objext
3639   test "x$ac_cv_prog_cc_c89" != "xno" && break
3640 done
3641 rm -f conftest.$ac_ext
3642 CC=$ac_save_CC
3643
3644 fi
3645 # AC_CACHE_VAL
3646 case "x$ac_cv_prog_cc_c89" in
3647   x)
3648     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3649 $as_echo "none needed" >&6; } ;;
3650   xno)
3651     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3652 $as_echo "unsupported" >&6; } ;;
3653   *)
3654     CC="$CC $ac_cv_prog_cc_c89"
3655     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3656 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3657 esac
3658 if test "x$ac_cv_prog_cc_c89" != xno; then :
3659
3660 fi
3661
3662 ac_ext=c
3663 ac_cpp='$CPP $CPPFLAGS'
3664 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3665 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3666 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3667
3668
3669 ac_ext=c
3670 ac_cpp='$CPP $CPPFLAGS'
3671 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3672 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3673 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3675 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3676 # On Suns, sometimes $CPP names a directory.
3677 if test -n "$CPP" && test -d "$CPP"; then
3678   CPP=
3679 fi
3680 if test -z "$CPP"; then
3681   if ${ac_cv_prog_CPP+:} false; then :
3682   $as_echo_n "(cached) " >&6
3683 else
3684       # Double quotes because CPP needs to be expanded
3685     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3686     do
3687       ac_preproc_ok=false
3688 for ac_c_preproc_warn_flag in '' yes
3689 do
3690   # Use a header file that comes with gcc, so configuring glibc
3691   # with a fresh cross-compiler works.
3692   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3693   # <limits.h> exists even on freestanding compilers.
3694   # On the NeXT, cc -E runs the code through the compiler's parser,
3695   # not just through cpp. "Syntax error" is here to catch this case.
3696   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3697 /* end confdefs.h.  */
3698 #ifdef __STDC__
3699 # include <limits.h>
3700 #else
3701 # include <assert.h>
3702 #endif
3703                      Syntax error
3704 _ACEOF
3705 if ac_fn_c_try_cpp "$LINENO"; then :
3706
3707 else
3708   # Broken: fails on valid input.
3709 continue
3710 fi
3711 rm -f conftest.err conftest.i conftest.$ac_ext
3712
3713   # OK, works on sane cases.  Now check whether nonexistent headers
3714   # can be detected and how.
3715   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3716 /* end confdefs.h.  */
3717 #include <ac_nonexistent.h>
3718 _ACEOF
3719 if ac_fn_c_try_cpp "$LINENO"; then :
3720   # Broken: success on invalid input.
3721 continue
3722 else
3723   # Passes both tests.
3724 ac_preproc_ok=:
3725 break
3726 fi
3727 rm -f conftest.err conftest.i conftest.$ac_ext
3728
3729 done
3730 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3731 rm -f conftest.i conftest.err conftest.$ac_ext
3732 if $ac_preproc_ok; then :
3733   break
3734 fi
3735
3736     done
3737     ac_cv_prog_CPP=$CPP
3738
3739 fi
3740   CPP=$ac_cv_prog_CPP
3741 else
3742   ac_cv_prog_CPP=$CPP
3743 fi
3744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3745 $as_echo "$CPP" >&6; }
3746 ac_preproc_ok=false
3747 for ac_c_preproc_warn_flag in '' yes
3748 do
3749   # Use a header file that comes with gcc, so configuring glibc
3750   # with a fresh cross-compiler works.
3751   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3752   # <limits.h> exists even on freestanding compilers.
3753   # On the NeXT, cc -E runs the code through the compiler's parser,
3754   # not just through cpp. "Syntax error" is here to catch this case.
3755   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3756 /* end confdefs.h.  */
3757 #ifdef __STDC__
3758 # include <limits.h>
3759 #else
3760 # include <assert.h>
3761 #endif
3762                      Syntax error
3763 _ACEOF
3764 if ac_fn_c_try_cpp "$LINENO"; then :
3765
3766 else
3767   # Broken: fails on valid input.
3768 continue
3769 fi
3770 rm -f conftest.err conftest.i conftest.$ac_ext
3771
3772   # OK, works on sane cases.  Now check whether nonexistent headers
3773   # can be detected and how.
3774   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3775 /* end confdefs.h.  */
3776 #include <ac_nonexistent.h>
3777 _ACEOF
3778 if ac_fn_c_try_cpp "$LINENO"; then :
3779   # Broken: success on invalid input.
3780 continue
3781 else
3782   # Passes both tests.
3783 ac_preproc_ok=:
3784 break
3785 fi
3786 rm -f conftest.err conftest.i conftest.$ac_ext
3787
3788 done
3789 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3790 rm -f conftest.i conftest.err conftest.$ac_ext
3791 if $ac_preproc_ok; then :
3792
3793 else
3794   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3795 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3796 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3797 See \`config.log' for more details" "$LINENO" 5; }
3798 fi
3799
3800 ac_ext=c
3801 ac_cpp='$CPP $CPPFLAGS'
3802 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3803 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3804 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3805
3806
3807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3808 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3809 if ${ac_cv_path_GREP+:} false; then :
3810   $as_echo_n "(cached) " >&6
3811 else
3812   if test -z "$GREP"; then
3813   ac_path_GREP_found=false
3814   # Loop through the user's path and test for each of PROGNAME-LIST
3815   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3816 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3817 do
3818   IFS=$as_save_IFS
3819   test -z "$as_dir" && as_dir=.
3820     for ac_prog in grep ggrep; do
3821     for ac_exec_ext in '' $ac_executable_extensions; do
3822       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3823       as_fn_executable_p "$ac_path_GREP" || continue
3824 # Check for GNU ac_path_GREP and select it if it is found.
3825   # Check for GNU $ac_path_GREP
3826 case `"$ac_path_GREP" --version 2>&1` in
3827 *GNU*)
3828   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3829 *)
3830   ac_count=0
3831   $as_echo_n 0123456789 >"conftest.in"
3832   while :
3833   do
3834     cat "conftest.in" "conftest.in" >"conftest.tmp"
3835     mv "conftest.tmp" "conftest.in"
3836     cp "conftest.in" "conftest.nl"
3837     $as_echo 'GREP' >> "conftest.nl"
3838     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3839     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3840     as_fn_arith $ac_count + 1 && ac_count=$as_val
3841     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3842       # Best one so far, save it but keep looking for a better one
3843       ac_cv_path_GREP="$ac_path_GREP"
3844       ac_path_GREP_max=$ac_count
3845     fi
3846     # 10*(2^10) chars as input seems more than enough
3847     test $ac_count -gt 10 && break
3848   done
3849   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3850 esac
3851
3852       $ac_path_GREP_found && break 3
3853     done
3854   done
3855   done
3856 IFS=$as_save_IFS
3857   if test -z "$ac_cv_path_GREP"; then
3858     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3859   fi
3860 else
3861   ac_cv_path_GREP=$GREP
3862 fi
3863
3864 fi
3865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3866 $as_echo "$ac_cv_path_GREP" >&6; }
3867  GREP="$ac_cv_path_GREP"
3868
3869
3870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3871 $as_echo_n "checking for egrep... " >&6; }
3872 if ${ac_cv_path_EGREP+:} false; then :
3873   $as_echo_n "(cached) " >&6
3874 else
3875   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3876    then ac_cv_path_EGREP="$GREP -E"
3877    else
3878      if test -z "$EGREP"; then
3879   ac_path_EGREP_found=false
3880   # Loop through the user's path and test for each of PROGNAME-LIST
3881   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3882 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3883 do
3884   IFS=$as_save_IFS
3885   test -z "$as_dir" && as_dir=.
3886     for ac_prog in egrep; do
3887     for ac_exec_ext in '' $ac_executable_extensions; do
3888       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3889       as_fn_executable_p "$ac_path_EGREP" || continue
3890 # Check for GNU ac_path_EGREP and select it if it is found.
3891   # Check for GNU $ac_path_EGREP
3892 case `"$ac_path_EGREP" --version 2>&1` in
3893 *GNU*)
3894   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3895 *)
3896   ac_count=0
3897   $as_echo_n 0123456789 >"conftest.in"
3898   while :
3899   do
3900     cat "conftest.in" "conftest.in" >"conftest.tmp"
3901     mv "conftest.tmp" "conftest.in"
3902     cp "conftest.in" "conftest.nl"
3903     $as_echo 'EGREP' >> "conftest.nl"
3904     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3905     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3906     as_fn_arith $ac_count + 1 && ac_count=$as_val
3907     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3908       # Best one so far, save it but keep looking for a better one
3909       ac_cv_path_EGREP="$ac_path_EGREP"
3910       ac_path_EGREP_max=$ac_count
3911     fi
3912     # 10*(2^10) chars as input seems more than enough
3913     test $ac_count -gt 10 && break
3914   done
3915   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3916 esac
3917
3918       $ac_path_EGREP_found && break 3
3919     done
3920   done
3921   done
3922 IFS=$as_save_IFS
3923   if test -z "$ac_cv_path_EGREP"; then
3924     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3925   fi
3926 else
3927   ac_cv_path_EGREP=$EGREP
3928 fi
3929
3930    fi
3931 fi
3932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3933 $as_echo "$ac_cv_path_EGREP" >&6; }
3934  EGREP="$ac_cv_path_EGREP"
3935
3936
3937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3938 $as_echo_n "checking for ANSI C header files... " >&6; }
3939 if ${ac_cv_header_stdc+:} false; then :
3940   $as_echo_n "(cached) " >&6
3941 else
3942   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3943 /* end confdefs.h.  */
3944 #include <stdlib.h>
3945 #include <stdarg.h>
3946 #include <string.h>
3947 #include <float.h>
3948
3949 int
3950 main ()
3951 {
3952
3953   ;
3954   return 0;
3955 }
3956 _ACEOF
3957 if ac_fn_c_try_compile "$LINENO"; then :
3958   ac_cv_header_stdc=yes
3959 else
3960   ac_cv_header_stdc=no
3961 fi
3962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3963
3964 if test $ac_cv_header_stdc = yes; then
3965   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3966   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3967 /* end confdefs.h.  */
3968 #include <string.h>
3969
3970 _ACEOF
3971 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3972   $EGREP "memchr" >/dev/null 2>&1; then :
3973
3974 else
3975   ac_cv_header_stdc=no
3976 fi
3977 rm -f conftest*
3978
3979 fi
3980
3981 if test $ac_cv_header_stdc = yes; then
3982   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3984 /* end confdefs.h.  */
3985 #include <stdlib.h>
3986
3987 _ACEOF
3988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3989   $EGREP "free" >/dev/null 2>&1; then :
3990
3991 else
3992   ac_cv_header_stdc=no
3993 fi
3994 rm -f conftest*
3995
3996 fi
3997
3998 if test $ac_cv_header_stdc = yes; then
3999   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4000   if test "$cross_compiling" = yes; then :
4001   :
4002 else
4003   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4004 /* end confdefs.h.  */
4005 #include <ctype.h>
4006 #include <stdlib.h>
4007 #if ((' ' & 0x0FF) == 0x020)
4008 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4009 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4010 #else
4011 # define ISLOWER(c) \
4012                    (('a' <= (c) && (c) <= 'i') \
4013                      || ('j' <= (c) && (c) <= 'r') \
4014                      || ('s' <= (c) && (c) <= 'z'))
4015 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4016 #endif
4017
4018 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4019 int
4020 main ()
4021 {
4022   int i;
4023   for (i = 0; i < 256; i++)
4024     if (XOR (islower (i), ISLOWER (i))
4025         || toupper (i) != TOUPPER (i))
4026       return 2;
4027   return 0;
4028 }
4029 _ACEOF
4030 if ac_fn_c_try_run "$LINENO"; then :
4031
4032 else
4033   ac_cv_header_stdc=no
4034 fi
4035 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4036   conftest.$ac_objext conftest.beam conftest.$ac_ext
4037 fi
4038
4039 fi
4040 fi
4041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4042 $as_echo "$ac_cv_header_stdc" >&6; }
4043 if test $ac_cv_header_stdc = yes; then
4044
4045 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4046
4047 fi
4048
4049 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4050 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4051                   inttypes.h stdint.h unistd.h
4052 do :
4053   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4054 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4055 "
4056 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4057   cat >>confdefs.h <<_ACEOF
4058 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4059 _ACEOF
4060
4061 fi
4062
4063 done
4064
4065
4066
4067   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4068 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4069   MINIX=yes
4070 else
4071   MINIX=
4072 fi
4073
4074
4075   if test "$MINIX" = yes; then
4076
4077 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4078
4079
4080 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4081
4082
4083 $as_echo "#define _MINIX 1" >>confdefs.h
4084
4085   fi
4086
4087
4088   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4089 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4090 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4091   $as_echo_n "(cached) " >&6
4092 else
4093   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4094 /* end confdefs.h.  */
4095
4096 #         define __EXTENSIONS__ 1
4097           $ac_includes_default
4098 int
4099 main ()
4100 {
4101
4102   ;
4103   return 0;
4104 }
4105 _ACEOF
4106 if ac_fn_c_try_compile "$LINENO"; then :
4107   ac_cv_safe_to_define___extensions__=yes
4108 else
4109   ac_cv_safe_to_define___extensions__=no
4110 fi
4111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4112 fi
4113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4114 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4115   test $ac_cv_safe_to_define___extensions__ = yes &&
4116     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4117
4118   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4119
4120   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4121
4122   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4123
4124   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4125
4126
4127
4128 if test "$ac_cv_header_minix_config_h" = "yes"; then
4129
4130 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4131
4132 fi
4133
4134 case "$prefix" in
4135         NONE)
4136                 prefix="/usr/local"
4137         ;;
4138 esac
4139 case "$exec_prefix" in
4140         NONE)
4141                 exec_prefix="$prefix"
4142         ;;
4143 esac
4144
4145 # are we on MinGW?
4146 if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
4147 else
4148         if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes"
4149         else on_mingw="no"; fi
4150 fi
4151
4152 #
4153 # Determine configuration file
4154 # the eval is to evaluate shell expansion twice
4155 UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4156
4157 UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4158
4159 UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4160
4161 if test $on_mingw = "no"; then
4162   ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4163 else
4164   ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4165 fi
4166
4167 # Check whether --with-conf_file was given.
4168 if test "${with_conf_file+set}" = set; then :
4169   withval=$with_conf_file; ub_conf_file="$withval"
4170 fi
4171
4172
4173 hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4174
4175
4176 cat >>confdefs.h <<_ACEOF
4177 #define CONFIGFILE "$hdr_config"
4178 _ACEOF
4179
4180 ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4181 $as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4182          X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4183          X"$ub_conf_file" : 'X\(//\)$' \| \
4184          X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4185 $as_echo X"$ub_conf_file" |
4186     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4187             s//\1/
4188             q
4189           }
4190           /^X\(\/\/\)[^/].*/{
4191             s//\1/
4192             q
4193           }
4194           /^X\(\/\/\)$/{
4195             s//\1/
4196             q
4197           }
4198           /^X\(\/\).*/{
4199             s//\1/
4200             q
4201           }
4202           s/.*/./; q'`
4203
4204
4205 # Determine run, chroot directory and pidfile locations
4206
4207 # Check whether --with-run-dir was given.
4208 if test "${with_run_dir+set}" = set; then :
4209   withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4210 else
4211   if test $on_mingw = no; then
4212     UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4213 else
4214     UNBOUND_RUN_DIR=""
4215 fi
4216
4217 fi
4218
4219
4220 hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4221
4222
4223 cat >>confdefs.h <<_ACEOF
4224 #define RUN_DIR "$hdr_run"
4225 _ACEOF
4226
4227
4228
4229 # Check whether --with-chroot-dir was given.
4230 if test "${with_chroot_dir+set}" = set; then :
4231   withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4232 else
4233   if test $on_mingw = no; then
4234     UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4235 else
4236     UNBOUND_CHROOT_DIR=""
4237 fi
4238
4239 fi
4240
4241
4242 hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4243
4244
4245 cat >>confdefs.h <<_ACEOF
4246 #define CHROOT_DIR "$hdr_chroot"
4247 _ACEOF
4248
4249
4250
4251 # Check whether --with-share-dir was given.
4252 if test "${with_share_dir+set}" = set; then :
4253   withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4254 else
4255   UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4256 fi
4257
4258
4259
4260 cat >>confdefs.h <<_ACEOF
4261 #define SHARE_DIR "$UNBOUND_SHARE_DIR"
4262 _ACEOF
4263
4264
4265
4266 # Check whether --with-pidfile was given.
4267 if test "${with_pidfile+set}" = set; then :
4268   withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4269 else
4270   if test $on_mingw = no; then
4271     UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4272 else
4273     UNBOUND_PIDFILE=""
4274 fi
4275
4276 fi
4277
4278
4279 hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4280
4281
4282 cat >>confdefs.h <<_ACEOF
4283 #define PIDFILE "$hdr_pid"
4284 _ACEOF
4285
4286
4287
4288 # Check whether --with-rootkey-file was given.
4289 if test "${with_rootkey_file+set}" = set; then :
4290   withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4291 else
4292   if test $on_mingw = no; then
4293     UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4294 else
4295     UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4296 fi
4297
4298 fi
4299
4300
4301 hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4302
4303
4304 cat >>confdefs.h <<_ACEOF
4305 #define ROOT_ANCHOR_FILE "$hdr_rkey"
4306 _ACEOF
4307
4308
4309
4310 # Check whether --with-rootcert-file was given.
4311 if test "${with_rootcert_file+set}" = set; then :
4312   withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4313 else
4314   if test $on_mingw = no; then
4315     UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4316 else
4317     UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4318 fi
4319
4320 fi
4321
4322
4323 hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4324
4325
4326 cat >>confdefs.h <<_ACEOF
4327 #define ROOT_CERT_FILE "$hdr_rpem"
4328 _ACEOF
4329
4330
4331
4332 # Check whether --with-username was given.
4333 if test "${with_username+set}" = set; then :
4334   withval=$with_username; UNBOUND_USERNAME="$withval"
4335 else
4336   UNBOUND_USERNAME="unbound"
4337 fi
4338
4339
4340
4341 cat >>confdefs.h <<_ACEOF
4342 #define UB_USERNAME "$UNBOUND_USERNAME"
4343 _ACEOF
4344
4345
4346
4347 $as_echo "#define WINVER 0x0502" >>confdefs.h
4348
4349 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/' `
4350
4351
4352 cat >>confdefs.h <<_ACEOF
4353 #define RSRC_PACKAGE_VERSION $wnvs
4354 _ACEOF
4355
4356
4357 # Checks for typedefs, structures, and compiler characteristics.
4358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4359 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4360 if ${ac_cv_c_const+:} false; then :
4361   $as_echo_n "(cached) " >&6
4362 else
4363   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4364 /* end confdefs.h.  */
4365
4366 int
4367 main ()
4368 {
4369
4370 #ifndef __cplusplus
4371   /* Ultrix mips cc rejects this sort of thing.  */
4372   typedef int charset[2];
4373   const charset cs = { 0, 0 };
4374   /* SunOS 4.1.1 cc rejects this.  */
4375   char const *const *pcpcc;
4376   char **ppc;
4377   /* NEC SVR4.0.2 mips cc rejects this.  */
4378   struct point {int x, y;};
4379   static struct point const zero = {0,0};
4380   /* AIX XL C 1.02.0.0 rejects this.
4381      It does not let you subtract one const X* pointer from another in
4382      an arm of an if-expression whose if-part is not a constant
4383      expression */
4384   const char *g = "string";
4385   pcpcc = &g + (g ? g-g : 0);
4386   /* HPUX 7.0 cc rejects these. */
4387   ++pcpcc;
4388   ppc = (char**) pcpcc;
4389   pcpcc = (char const *const *) ppc;
4390   { /* SCO 3.2v4 cc rejects this sort of thing.  */
4391     char tx;
4392     char *t = &tx;
4393     char const *s = 0 ? (char *) 0 : (char const *) 0;
4394
4395     *t++ = 0;
4396     if (s) return 0;
4397   }
4398   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4399     int x[] = {25, 17};
4400     const int *foo = &x[0];
4401     ++foo;
4402   }
4403   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4404     typedef const int *iptr;
4405     iptr p = 0;
4406     ++p;
4407   }
4408   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4409        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4410     struct s { int j; const int *ap[3]; } bx;
4411     struct s *b = &bx; b->j = 5;
4412   }
4413   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4414     const int foo = 10;
4415     if (!foo) return 0;
4416   }
4417   return !cs[0] && !zero.x;
4418 #endif
4419
4420   ;
4421   return 0;
4422 }
4423 _ACEOF
4424 if ac_fn_c_try_compile "$LINENO"; then :
4425   ac_cv_c_const=yes
4426 else
4427   ac_cv_c_const=no
4428 fi
4429 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4430 fi
4431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4432 $as_echo "$ac_cv_c_const" >&6; }
4433 if test $ac_cv_c_const = no; then
4434
4435 $as_echo "#define const /**/" >>confdefs.h
4436
4437 fi
4438
4439 ac_ext=c
4440 ac_cpp='$CPP $CPPFLAGS'
4441 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4442 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4443 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4444
4445 # allow user to override the -g -O2 flags.
4446 default_cflags=no
4447 if test "x$CFLAGS" = "x" ; then
4448
4449
4450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4451 $as_echo_n "checking whether $CC supports -g... " >&6; }
4452 cache=`echo g | sed 'y%.=/+-%___p_%'`
4453 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4454   $as_echo_n "(cached) " >&6
4455 else
4456
4457 echo 'void f(void){}' >conftest.c
4458 if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4459 eval "cv_prog_cc_flag_$cache=yes"
4460 else
4461 eval "cv_prog_cc_flag_$cache=no"
4462 fi
4463 rm -f conftest conftest.o conftest.c
4464
4465 fi
4466
4467 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4469 $as_echo "yes" >&6; }
4470 :
4471 CFLAGS="$CFLAGS -g"
4472 else
4473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4474 $as_echo "no" >&6; }
4475 :
4476
4477 fi
4478
4479
4480
4481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4482 $as_echo_n "checking whether $CC supports -O2... " >&6; }
4483 cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4484 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4485   $as_echo_n "(cached) " >&6
4486 else
4487
4488 echo 'void f(void){}' >conftest.c
4489 if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4490 eval "cv_prog_cc_flag_$cache=yes"
4491 else
4492 eval "cv_prog_cc_flag_$cache=no"
4493 fi
4494 rm -f conftest conftest.o conftest.c
4495
4496 fi
4497
4498 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4500 $as_echo "yes" >&6; }
4501 :
4502 CFLAGS="$CFLAGS -O2"
4503 else
4504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4505 $as_echo "no" >&6; }
4506 :
4507
4508 fi
4509
4510 default_cflags=yes
4511 fi
4512 ac_ext=c
4513 ac_cpp='$CPP $CPPFLAGS'
4514 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4515 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4516 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4517 if test -n "$ac_tool_prefix"; then
4518   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4519 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4521 $as_echo_n "checking for $ac_word... " >&6; }
4522 if ${ac_cv_prog_CC+:} false; then :
4523   $as_echo_n "(cached) " >&6
4524 else
4525   if test -n "$CC"; then
4526   ac_cv_prog_CC="$CC" # Let the user override the test.
4527 else
4528 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4529 for as_dir in $PATH
4530 do
4531   IFS=$as_save_IFS
4532   test -z "$as_dir" && as_dir=.
4533     for ac_exec_ext in '' $ac_executable_extensions; do
4534   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4535     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4536     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4537     break 2
4538   fi
4539 done
4540   done
4541 IFS=$as_save_IFS
4542
4543 fi
4544 fi
4545 CC=$ac_cv_prog_CC
4546 if test -n "$CC"; then
4547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4548 $as_echo "$CC" >&6; }
4549 else
4550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4551 $as_echo "no" >&6; }
4552 fi
4553
4554
4555 fi
4556 if test -z "$ac_cv_prog_CC"; then
4557   ac_ct_CC=$CC
4558   # Extract the first word of "gcc", so it can be a program name with args.
4559 set dummy gcc; ac_word=$2
4560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4561 $as_echo_n "checking for $ac_word... " >&6; }
4562 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4563   $as_echo_n "(cached) " >&6
4564 else
4565   if test -n "$ac_ct_CC"; then
4566   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4567 else
4568 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4569 for as_dir in $PATH
4570 do
4571   IFS=$as_save_IFS
4572   test -z "$as_dir" && as_dir=.
4573     for ac_exec_ext in '' $ac_executable_extensions; do
4574   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4575     ac_cv_prog_ac_ct_CC="gcc"
4576     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4577     break 2
4578   fi
4579 done
4580   done
4581 IFS=$as_save_IFS
4582
4583 fi
4584 fi
4585 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4586 if test -n "$ac_ct_CC"; then
4587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4588 $as_echo "$ac_ct_CC" >&6; }
4589 else
4590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4591 $as_echo "no" >&6; }
4592 fi
4593
4594   if test "x$ac_ct_CC" = x; then
4595     CC=""
4596   else
4597     case $cross_compiling:$ac_tool_warned in
4598 yes:)
4599 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4600 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4601 ac_tool_warned=yes ;;
4602 esac
4603     CC=$ac_ct_CC
4604   fi
4605 else
4606   CC="$ac_cv_prog_CC"
4607 fi
4608
4609 if test -z "$CC"; then
4610           if test -n "$ac_tool_prefix"; then
4611     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4612 set dummy ${ac_tool_prefix}cc; ac_word=$2
4613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4614 $as_echo_n "checking for $ac_word... " >&6; }
4615 if ${ac_cv_prog_CC+:} false; then :
4616   $as_echo_n "(cached) " >&6
4617 else
4618   if test -n "$CC"; then
4619   ac_cv_prog_CC="$CC" # Let the user override the test.
4620 else
4621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4622 for as_dir in $PATH
4623 do
4624   IFS=$as_save_IFS
4625   test -z "$as_dir" && as_dir=.
4626     for ac_exec_ext in '' $ac_executable_extensions; do
4627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4628     ac_cv_prog_CC="${ac_tool_prefix}cc"
4629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4630     break 2
4631   fi
4632 done
4633   done
4634 IFS=$as_save_IFS
4635
4636 fi
4637 fi
4638 CC=$ac_cv_prog_CC
4639 if test -n "$CC"; then
4640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4641 $as_echo "$CC" >&6; }
4642 else
4643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4644 $as_echo "no" >&6; }
4645 fi
4646
4647
4648   fi
4649 fi
4650 if test -z "$CC"; then
4651   # Extract the first word of "cc", so it can be a program name with args.
4652 set dummy cc; ac_word=$2
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4654 $as_echo_n "checking for $ac_word... " >&6; }
4655 if ${ac_cv_prog_CC+:} false; then :
4656   $as_echo_n "(cached) " >&6
4657 else
4658   if test -n "$CC"; then
4659   ac_cv_prog_CC="$CC" # Let the user override the test.
4660 else
4661   ac_prog_rejected=no
4662 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4663 for as_dir in $PATH
4664 do
4665   IFS=$as_save_IFS
4666   test -z "$as_dir" && as_dir=.
4667     for ac_exec_ext in '' $ac_executable_extensions; do
4668   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4669     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4670        ac_prog_rejected=yes
4671        continue
4672      fi
4673     ac_cv_prog_CC="cc"
4674     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4675     break 2
4676   fi
4677 done
4678   done
4679 IFS=$as_save_IFS
4680
4681 if test $ac_prog_rejected = yes; then
4682   # We found a bogon in the path, so make sure we never use it.
4683   set dummy $ac_cv_prog_CC
4684   shift
4685   if test $# != 0; then
4686     # We chose a different compiler from the bogus one.
4687     # However, it has the same basename, so the bogon will be chosen
4688     # first if we set CC to just the basename; use the full file name.
4689     shift
4690     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4691   fi
4692 fi
4693 fi
4694 fi
4695 CC=$ac_cv_prog_CC
4696 if test -n "$CC"; then
4697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4698 $as_echo "$CC" >&6; }
4699 else
4700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4701 $as_echo "no" >&6; }
4702 fi
4703
4704
4705 fi
4706 if test -z "$CC"; then
4707   if test -n "$ac_tool_prefix"; then
4708   for ac_prog in cl.exe
4709   do
4710     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4711 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4713 $as_echo_n "checking for $ac_word... " >&6; }
4714 if ${ac_cv_prog_CC+:} false; then :
4715   $as_echo_n "(cached) " >&6
4716 else
4717   if test -n "$CC"; then
4718   ac_cv_prog_CC="$CC" # Let the user override the test.
4719 else
4720 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4721 for as_dir in $PATH
4722 do
4723   IFS=$as_save_IFS
4724   test -z "$as_dir" && as_dir=.
4725     for ac_exec_ext in '' $ac_executable_extensions; do
4726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4727     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4729     break 2
4730   fi
4731 done
4732   done
4733 IFS=$as_save_IFS
4734
4735 fi
4736 fi
4737 CC=$ac_cv_prog_CC
4738 if test -n "$CC"; then
4739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4740 $as_echo "$CC" >&6; }
4741 else
4742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4743 $as_echo "no" >&6; }
4744 fi
4745
4746
4747     test -n "$CC" && break
4748   done
4749 fi
4750 if test -z "$CC"; then
4751   ac_ct_CC=$CC
4752   for ac_prog in cl.exe
4753 do
4754   # Extract the first word of "$ac_prog", so it can be a program name with args.
4755 set dummy $ac_prog; ac_word=$2
4756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4757 $as_echo_n "checking for $ac_word... " >&6; }
4758 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4759   $as_echo_n "(cached) " >&6
4760 else
4761   if test -n "$ac_ct_CC"; then
4762   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4763 else
4764 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4765 for as_dir in $PATH
4766 do
4767   IFS=$as_save_IFS
4768   test -z "$as_dir" && as_dir=.
4769     for ac_exec_ext in '' $ac_executable_extensions; do
4770   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4771     ac_cv_prog_ac_ct_CC="$ac_prog"
4772     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4773     break 2
4774   fi
4775 done
4776   done
4777 IFS=$as_save_IFS
4778
4779 fi
4780 fi
4781 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4782 if test -n "$ac_ct_CC"; then
4783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4784 $as_echo "$ac_ct_CC" >&6; }
4785 else
4786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4787 $as_echo "no" >&6; }
4788 fi
4789
4790
4791   test -n "$ac_ct_CC" && break
4792 done
4793
4794   if test "x$ac_ct_CC" = x; then
4795     CC=""
4796   else
4797     case $cross_compiling:$ac_tool_warned in
4798 yes:)
4799 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4800 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4801 ac_tool_warned=yes ;;
4802 esac
4803     CC=$ac_ct_CC
4804   fi
4805 fi
4806
4807 fi
4808
4809
4810 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4811 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4812 as_fn_error $? "no acceptable C compiler found in \$PATH
4813 See \`config.log' for more details" "$LINENO" 5; }
4814
4815 # Provide some information about the compiler.
4816 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4817 set X $ac_compile
4818 ac_compiler=$2
4819 for ac_option in --version -v -V -qversion; do
4820   { { ac_try="$ac_compiler $ac_option >&5"
4821 case "(($ac_try" in
4822   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4823   *) ac_try_echo=$ac_try;;
4824 esac
4825 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4826 $as_echo "$ac_try_echo"; } >&5
4827   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4828   ac_status=$?
4829   if test -s conftest.err; then
4830     sed '10a\
4831 ... rest of stderr output deleted ...
4832          10q' conftest.err >conftest.er1
4833     cat conftest.er1 >&5
4834   fi
4835   rm -f conftest.er1 conftest.err
4836   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4837   test $ac_status = 0; }
4838 done
4839
4840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4841 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4842 if ${ac_cv_c_compiler_gnu+:} false; then :
4843   $as_echo_n "(cached) " >&6
4844 else
4845   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4846 /* end confdefs.h.  */
4847
4848 int
4849 main ()
4850 {
4851 #ifndef __GNUC__
4852        choke me
4853 #endif
4854
4855   ;
4856   return 0;
4857 }
4858 _ACEOF
4859 if ac_fn_c_try_compile "$LINENO"; then :
4860   ac_compiler_gnu=yes
4861 else
4862   ac_compiler_gnu=no
4863 fi
4864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4865 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4866
4867 fi
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4869 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4870 if test $ac_compiler_gnu = yes; then
4871   GCC=yes
4872 else
4873   GCC=
4874 fi
4875 ac_test_CFLAGS=${CFLAGS+set}
4876 ac_save_CFLAGS=$CFLAGS
4877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4878 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4879 if ${ac_cv_prog_cc_g+:} false; then :
4880   $as_echo_n "(cached) " >&6
4881 else
4882   ac_save_c_werror_flag=$ac_c_werror_flag
4883    ac_c_werror_flag=yes
4884    ac_cv_prog_cc_g=no
4885    CFLAGS="-g"
4886    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4887 /* end confdefs.h.  */
4888
4889 int
4890 main ()
4891 {
4892
4893   ;
4894   return 0;
4895 }
4896 _ACEOF
4897 if ac_fn_c_try_compile "$LINENO"; then :
4898   ac_cv_prog_cc_g=yes
4899 else
4900   CFLAGS=""
4901       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4902 /* end confdefs.h.  */
4903
4904 int
4905 main ()
4906 {
4907
4908   ;
4909   return 0;
4910 }
4911 _ACEOF
4912 if ac_fn_c_try_compile "$LINENO"; then :
4913
4914 else
4915   ac_c_werror_flag=$ac_save_c_werror_flag
4916          CFLAGS="-g"
4917          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4918 /* end confdefs.h.  */
4919
4920 int
4921 main ()
4922 {
4923
4924   ;
4925   return 0;
4926 }
4927 _ACEOF
4928 if ac_fn_c_try_compile "$LINENO"; then :
4929   ac_cv_prog_cc_g=yes
4930 fi
4931 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4932 fi
4933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4934 fi
4935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4936    ac_c_werror_flag=$ac_save_c_werror_flag
4937 fi
4938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4939 $as_echo "$ac_cv_prog_cc_g" >&6; }
4940 if test "$ac_test_CFLAGS" = set; then
4941   CFLAGS=$ac_save_CFLAGS
4942 elif test $ac_cv_prog_cc_g = yes; then
4943   if test "$GCC" = yes; then
4944     CFLAGS="-g -O2"
4945   else
4946     CFLAGS="-g"
4947   fi
4948 else
4949   if test "$GCC" = yes; then
4950     CFLAGS="-O2"
4951   else
4952     CFLAGS=
4953   fi
4954 fi
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4956 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4957 if ${ac_cv_prog_cc_c89+:} false; then :
4958   $as_echo_n "(cached) " >&6
4959 else
4960   ac_cv_prog_cc_c89=no
4961 ac_save_CC=$CC
4962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4963 /* end confdefs.h.  */
4964 #include <stdarg.h>
4965 #include <stdio.h>
4966 struct stat;
4967 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4968 struct buf { int x; };
4969 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4970 static char *e (p, i)
4971      char **p;
4972      int i;
4973 {
4974   return p[i];
4975 }
4976 static char *f (char * (*g) (char **, int), char **p, ...)
4977 {
4978   char *s;
4979   va_list v;
4980   va_start (v,p);
4981   s = g (p, va_arg (v,int));
4982   va_end (v);
4983   return s;
4984 }
4985
4986 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4987    function prototypes and stuff, but not '\xHH' hex character constants.
4988    These don't provoke an error unfortunately, instead are silently treated
4989    as 'x'.  The following induces an error, until -std is added to get
4990    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4991    array size at least.  It's necessary to write '\x00'==0 to get something
4992    that's true only with -std.  */
4993 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4994
4995 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4996    inside strings and character constants.  */
4997 #define FOO(x) 'x'
4998 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4999
5000 int test (int i, double x);
5001 struct s1 {int (*f) (int a);};
5002 struct s2 {int (*f) (double a);};
5003 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5004 int argc;
5005 char **argv;
5006 int
5007 main ()
5008 {
5009 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5010   ;
5011   return 0;
5012 }
5013 _ACEOF
5014 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5015         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5016 do
5017   CC="$ac_save_CC $ac_arg"
5018   if ac_fn_c_try_compile "$LINENO"; then :
5019   ac_cv_prog_cc_c89=$ac_arg
5020 fi
5021 rm -f core conftest.err conftest.$ac_objext
5022   test "x$ac_cv_prog_cc_c89" != "xno" && break
5023 done
5024 rm -f conftest.$ac_ext
5025 CC=$ac_save_CC
5026
5027 fi
5028 # AC_CACHE_VAL
5029 case "x$ac_cv_prog_cc_c89" in
5030   x)
5031     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5032 $as_echo "none needed" >&6; } ;;
5033   xno)
5034     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5035 $as_echo "unsupported" >&6; } ;;
5036   *)
5037     CC="$CC $ac_cv_prog_cc_c89"
5038     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5039 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5040 esac
5041 if test "x$ac_cv_prog_cc_c89" != xno; then :
5042
5043 fi
5044
5045 ac_ext=c
5046 ac_cpp='$CPP $CPPFLAGS'
5047 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5048 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5049 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5050
5051
5052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5053 $as_echo_n "checking $CC dependency flag... " >&6; }
5054 echo 'void f(){}' >conftest.c
5055 if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5056         DEPFLAG="-MM"
5057 else
5058   if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5059         DEPFLAG="-xM1"
5060   else
5061         DEPFLAG="-MM"  # dunno do something
5062   fi
5063 fi
5064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5065 $as_echo "$DEPFLAG" >&6; }
5066 rm -f conftest.c
5067
5068
5069
5070
5071
5072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5073 $as_echo_n "checking whether $CC supports -Werror... " >&6; }
5074 cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5075 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5076   $as_echo_n "(cached) " >&6
5077 else
5078
5079 echo 'void f(void){}' >conftest.c
5080 if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5081 eval "cv_prog_cc_flag_$cache=yes"
5082 else
5083 eval "cv_prog_cc_flag_$cache=no"
5084 fi
5085 rm -f conftest conftest.o conftest.c
5086
5087 fi
5088
5089 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5091 $as_echo "yes" >&6; }
5092 :
5093 ERRFLAG="-Werror"
5094 else
5095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5096 $as_echo "no" >&6; }
5097 :
5098 ERRFLAG="-errwarn"
5099 fi
5100
5101
5102
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5104 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5105 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5106 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5107   $as_echo_n "(cached) " >&6
5108 else
5109
5110 echo 'void f(void){}' >conftest.c
5111 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5112 eval "cv_prog_cc_flag_$cache=yes"
5113 else
5114 eval "cv_prog_cc_flag_$cache=no"
5115 fi
5116 rm -f conftest conftest.o conftest.c
5117
5118 fi
5119
5120 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5122 $as_echo "yes" >&6; }
5123 :
5124 ERRFLAG="$ERRFLAG -Wall"
5125 else
5126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5127 $as_echo "no" >&6; }
5128 :
5129 ERRFLAG="$ERRFLAG -errfmt"
5130 fi
5131
5132
5133
5134
5135
5136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5137 $as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5138 cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5139 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5140   $as_echo_n "(cached) " >&6
5141 else
5142
5143 echo 'void f(void){}' >conftest.c
5144 if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5145 eval "cv_prog_cc_flag_$cache=yes"
5146 else
5147 eval "cv_prog_cc_flag_$cache=no"
5148 fi
5149 rm -f conftest conftest.o conftest.c
5150
5151 fi
5152
5153 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5155 $as_echo "yes" >&6; }
5156 :
5157 C99FLAG="-std=c99"
5158 else
5159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5160 $as_echo "no" >&6; }
5161 :
5162
5163 fi
5164
5165
5166
5167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5168 $as_echo_n "checking whether $CC supports -xc99... " >&6; }
5169 cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5170 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5171   $as_echo_n "(cached) " >&6
5172 else
5173
5174 echo 'void f(void){}' >conftest.c
5175 if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5176 eval "cv_prog_cc_flag_$cache=yes"
5177 else
5178 eval "cv_prog_cc_flag_$cache=no"
5179 fi
5180 rm -f conftest conftest.o conftest.c
5181
5182 fi
5183
5184 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5186 $as_echo "yes" >&6; }
5187 :
5188 C99FLAG="-xc99"
5189 else
5190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5191 $as_echo "no" >&6; }
5192 :
5193
5194 fi
5195
5196
5197 for ac_header in getopt.h time.h
5198 do :
5199   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5200 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5201 "
5202 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5203   cat >>confdefs.h <<_ACEOF
5204 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5205 _ACEOF
5206
5207 fi
5208
5209 done
5210
5211
5212
5213
5214
5215 { $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
5216 $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; }
5217 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`
5218 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5219   $as_echo_n "(cached) " >&6
5220 else
5221
5222 echo '
5223 #include "confdefs.h"
5224 #include <stdlib.h>
5225 #include <ctype.h>
5226 #include <sys/time.h>
5227 #ifdef HAVE_TIME_H
5228 #include <time.h>
5229 #endif
5230 #include <unistd.h>
5231 #include <netdb.h>
5232 #ifdef HAVE_GETOPT_H
5233 #include <getopt.h>
5234 #endif
5235
5236 int test() {
5237         int a;
5238         char **opts = NULL;
5239         struct timeval tv;
5240         char *t;
5241         time_t time = 0;
5242         char *buf = NULL;
5243         const char* str = NULL;
5244         struct msghdr msg;
5245         msg.msg_control = 0;
5246         t = ctime_r(&time, buf);
5247         tv.tv_usec = 10;
5248         srandom(32);
5249         a = getopt(2, opts, "a");
5250         a = isascii(32);
5251         str = gai_strerror(0);
5252         if(str && t && tv.tv_usec && msg.msg_control)
5253                 a = 0;
5254         return a;
5255 }
5256 ' > conftest.c
5257 echo 'void f(){}' >>conftest.c
5258 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5259 eval "cv_prog_cc_flag_needed_$cache=no"
5260 else
5261
5262 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
5263 eval "cv_prog_cc_flag_needed_$cache=yes"
5264 else
5265 eval "cv_prog_cc_flag_needed_$cache=fail"
5266 #echo 'Test with flag fails too!'
5267 #cat conftest.c
5268 #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"
5269 #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`
5270 #exit 1
5271 fi
5272
5273 fi
5274 rm -f conftest conftest.c conftest.o
5275
5276 fi
5277
5278 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5280 $as_echo "yes" >&6; }
5281 :
5282 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"
5283 else
5284 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5286 $as_echo "no" >&6; }
5287 #echo 'Test with flag is no!'
5288 #cat conftest.c
5289 #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"
5290 #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`
5291 #exit 1
5292 :
5293
5294 else
5295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5296 $as_echo "failed" >&6; }
5297 :
5298
5299 fi
5300 fi
5301
5302
5303
5304
5305
5306 { $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
5307 $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; }
5308 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`
5309 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5310   $as_echo_n "(cached) " >&6
5311 else
5312
5313 echo '
5314 #include "confdefs.h"
5315 #include <stdlib.h>
5316 #include <ctype.h>
5317 #include <sys/time.h>
5318 #ifdef HAVE_TIME_H
5319 #include <time.h>
5320 #endif
5321 #include <unistd.h>
5322 #include <netdb.h>
5323 #ifdef HAVE_GETOPT_H
5324 #include <getopt.h>
5325 #endif
5326
5327 int test() {
5328         int a;
5329         char **opts = NULL;
5330         struct timeval tv;
5331         char *t;
5332         time_t time = 0;
5333         char *buf = NULL;
5334         const char* str = NULL;
5335         struct msghdr msg;
5336         msg.msg_control = 0;
5337         t = ctime_r(&time, buf);
5338         tv.tv_usec = 10;
5339         srandom(32);
5340         a = getopt(2, opts, "a");
5341         a = isascii(32);
5342         str = gai_strerror(0);
5343         if(str && t && tv.tv_usec && msg.msg_control)
5344                 a = 0;
5345         return a;
5346 }
5347 ' > conftest.c
5348 echo 'void f(){}' >>conftest.c
5349 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5350 eval "cv_prog_cc_flag_needed_$cache=no"
5351 else
5352
5353 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
5354 eval "cv_prog_cc_flag_needed_$cache=yes"
5355 else
5356 eval "cv_prog_cc_flag_needed_$cache=fail"
5357 #echo 'Test with flag fails too!'
5358 #cat conftest.c
5359 #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"
5360 #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`
5361 #exit 1
5362 fi
5363
5364 fi
5365 rm -f conftest conftest.c conftest.o
5366
5367 fi
5368
5369 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5371 $as_echo "yes" >&6; }
5372 :
5373 CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5374 else
5375 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5377 $as_echo "no" >&6; }
5378 #echo 'Test with flag is no!'
5379 #cat conftest.c
5380 #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"
5381 #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`
5382 #exit 1
5383 :
5384
5385 else
5386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5387 $as_echo "failed" >&6; }
5388 :
5389
5390 fi
5391 fi
5392
5393
5394
5395
5396
5397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5398 $as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5399 cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5400 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5401   $as_echo_n "(cached) " >&6
5402 else
5403
5404 echo '
5405 #include <stdbool.h>
5406 #include <ctype.h>
5407 int test() {
5408         int a = 0;
5409         return a;
5410 }
5411 ' > conftest.c
5412 echo 'void f(){}' >>conftest.c
5413 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5414 eval "cv_prog_cc_flag_needed_$cache=no"
5415 else
5416
5417 if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5418 eval "cv_prog_cc_flag_needed_$cache=yes"
5419 else
5420 eval "cv_prog_cc_flag_needed_$cache=fail"
5421 #echo 'Test with flag fails too!'
5422 #cat conftest.c
5423 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5424 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5425 #exit 1
5426 fi
5427
5428 fi
5429 rm -f conftest conftest.c conftest.o
5430
5431 fi
5432
5433 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5435 $as_echo "yes" >&6; }
5436 :
5437 CFLAGS="$CFLAGS $C99FLAG"
5438 else
5439 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5441 $as_echo "no" >&6; }
5442 #echo 'Test with flag is no!'
5443 #cat conftest.c
5444 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5445 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5446 #exit 1
5447 :
5448
5449 else
5450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5451 $as_echo "failed" >&6; }
5452 :
5453
5454 fi
5455 fi
5456
5457
5458
5459
5460
5461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
5462 $as_echo_n "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
5463 cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
5464 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5465   $as_echo_n "(cached) " >&6
5466 else
5467
5468 echo '
5469 #include <ctype.h>
5470
5471 int test() {
5472         int a;
5473         a = isascii(32);
5474         return a;
5475 }
5476 ' > conftest.c
5477 echo 'void f(){}' >>conftest.c
5478 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5479 eval "cv_prog_cc_flag_needed_$cache=no"
5480 else
5481
5482 if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5483 eval "cv_prog_cc_flag_needed_$cache=yes"
5484 else
5485 eval "cv_prog_cc_flag_needed_$cache=fail"
5486 #echo 'Test with flag fails too!'
5487 #cat conftest.c
5488 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5489 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5490 #exit 1
5491 fi
5492
5493 fi
5494 rm -f conftest conftest.c conftest.o
5495
5496 fi
5497
5498 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5500 $as_echo "yes" >&6; }
5501 :
5502 CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
5503 else
5504 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5506 $as_echo "no" >&6; }
5507 #echo 'Test with flag is no!'
5508 #cat conftest.c
5509 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5510 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5511 #exit 1
5512 :
5513
5514 else
5515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5516 $as_echo "failed" >&6; }
5517 :
5518
5519 fi
5520 fi
5521
5522
5523
5524
5525
5526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5527 $as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5528 cache=_D_GNU_SOURCE
5529 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5530   $as_echo_n "(cached) " >&6
5531 else
5532
5533 echo '
5534 #include <netinet/in.h>
5535
5536 int test() {
5537         struct in6_pktinfo inf;
5538         int a = (int)sizeof(inf);
5539         return a;
5540 }
5541 ' > conftest.c
5542 echo 'void f(){}' >>conftest.c
5543 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5544 eval "cv_prog_cc_flag_needed_$cache=no"
5545 else
5546
5547 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5548 eval "cv_prog_cc_flag_needed_$cache=yes"
5549 else
5550 eval "cv_prog_cc_flag_needed_$cache=fail"
5551 #echo 'Test with flag fails too!'
5552 #cat conftest.c
5553 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5554 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5555 #exit 1
5556 fi
5557
5558 fi
5559 rm -f conftest conftest.c conftest.o
5560
5561 fi
5562
5563 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5565 $as_echo "yes" >&6; }
5566 :
5567 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5568 else
5569 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5571 $as_echo "no" >&6; }
5572 #echo 'Test with flag is no!'
5573 #cat conftest.c
5574 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5575 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5576 #exit 1
5577 :
5578
5579 else
5580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5581 $as_echo "failed" >&6; }
5582 :
5583
5584 fi
5585 fi
5586
5587
5588 # check again for GNU_SOURCE for setresgid. May fail if setresgid
5589 # is not available at all. -D_FRSRESGID is to make this check unique.
5590 # otherwise we would get the previous cached result.
5591
5592
5593
5594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5595 $as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5596 cache=_D_GNU_SOURCE__D_FRSRESGID
5597 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5598   $as_echo_n "(cached) " >&6
5599 else
5600
5601 echo '
5602 #include <unistd.h>
5603
5604 int test() {
5605         int a = setresgid(0,0,0);
5606         a = setresuid(0,0,0);
5607         return a;
5608 }
5609 ' > conftest.c
5610 echo 'void f(){}' >>conftest.c
5611 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5612 eval "cv_prog_cc_flag_needed_$cache=no"
5613 else
5614
5615 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5616 eval "cv_prog_cc_flag_needed_$cache=yes"
5617 else
5618 eval "cv_prog_cc_flag_needed_$cache=fail"
5619 #echo 'Test with flag fails too!'
5620 #cat conftest.c
5621 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5622 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5623 #exit 1
5624 fi
5625
5626 fi
5627 rm -f conftest conftest.c conftest.o
5628
5629 fi
5630
5631 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5633 $as_echo "yes" >&6; }
5634 :
5635 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5636 else
5637 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5639 $as_echo "no" >&6; }
5640 #echo 'Test with flag is no!'
5641 #cat conftest.c
5642 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5643 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5644 #exit 1
5645 :
5646
5647 else
5648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5649 $as_echo "failed" >&6; }
5650 :
5651
5652 fi
5653 fi
5654
5655
5656
5657
5658
5659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5660 $as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5661 cache=_D_POSIX_C_SOURCE_200112
5662 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5663   $as_echo_n "(cached) " >&6
5664 else
5665
5666 echo '
5667 #include "confdefs.h"
5668 #ifdef HAVE_TIME_H
5669 #include <time.h>
5670 #endif
5671 #include <netdb.h>
5672
5673 int test() {
5674         int a = 0;
5675         char *t;
5676         time_t time = 0;
5677         char *buf = NULL;
5678         const char* str = NULL;
5679         t = ctime_r(&time, buf);
5680         str = gai_strerror(0);
5681         if(t && str)
5682                 a = 0;
5683         return a;
5684 }
5685 ' > conftest.c
5686 echo 'void f(){}' >>conftest.c
5687 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5688 eval "cv_prog_cc_flag_needed_$cache=no"
5689 else
5690
5691 if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5692 eval "cv_prog_cc_flag_needed_$cache=yes"
5693 else
5694 eval "cv_prog_cc_flag_needed_$cache=fail"
5695 #echo 'Test with flag fails too!'
5696 #cat conftest.c
5697 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5698 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5699 #exit 1
5700 fi
5701
5702 fi
5703 rm -f conftest conftest.c conftest.o
5704
5705 fi
5706
5707 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5709 $as_echo "yes" >&6; }
5710 :
5711 CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5712 else
5713 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5715 $as_echo "no" >&6; }
5716 #echo 'Test with flag is no!'
5717 #cat conftest.c
5718 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5719 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5720 #exit 1
5721 :
5722
5723 else
5724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5725 $as_echo "failed" >&6; }
5726 :
5727
5728 fi
5729 fi
5730
5731
5732
5733
5734
5735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5736 $as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5737 cache=_D__EXTENSIONS__
5738 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5739   $as_echo_n "(cached) " >&6
5740 else
5741
5742 echo '
5743 #include "confdefs.h"
5744 #include <stdlib.h>
5745 #include <ctype.h>
5746 #include <sys/time.h>
5747 #ifdef HAVE_TIME_H
5748 #include <time.h>
5749 #endif
5750 #include <unistd.h>
5751 #ifdef HAVE_GETOPT_H
5752 #include <getopt.h>
5753 #endif
5754
5755 int test() {
5756         int a;
5757         char **opts = NULL;
5758         struct timeval tv;
5759         tv.tv_usec = 10;
5760         srandom(32);
5761         a = getopt(2, opts, "a");
5762         a = isascii(32);
5763         if(tv.tv_usec)
5764                 a = 0;
5765         return a;
5766 }
5767 ' > conftest.c
5768 echo 'void f(){}' >>conftest.c
5769 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5770 eval "cv_prog_cc_flag_needed_$cache=no"
5771 else
5772
5773 if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5774 eval "cv_prog_cc_flag_needed_$cache=yes"
5775 else
5776 eval "cv_prog_cc_flag_needed_$cache=fail"
5777 #echo 'Test with flag fails too!'
5778 #cat conftest.c
5779 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5780 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5781 #exit 1
5782 fi
5783
5784 fi
5785 rm -f conftest conftest.c conftest.o
5786
5787 fi
5788
5789 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5791 $as_echo "yes" >&6; }
5792 :
5793 CFLAGS="$CFLAGS -D__EXTENSIONS__"
5794 else
5795 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5797 $as_echo "no" >&6; }
5798 #echo 'Test with flag is no!'
5799 #cat conftest.c
5800 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5801 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5802 #exit 1
5803 :
5804
5805 else
5806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5807 $as_echo "failed" >&6; }
5808 :
5809
5810 fi
5811 fi
5812
5813
5814
5815
5816 # debug mode flags warnings
5817 # Check whether --enable-checking was given.
5818 if test "${enable_checking+set}" = set; then :
5819   enableval=$enable_checking;
5820 fi
5821
5822 # Check whether --enable-debug was given.
5823 if test "${enable_debug+set}" = set; then :
5824   enableval=$enable_debug;
5825 fi
5826
5827 if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5828 else debug_enabled="$enable_checking"; fi
5829
5830 case "$debug_enabled" in
5831         yes)
5832
5833
5834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5835 $as_echo_n "checking whether $CC supports -W... " >&6; }
5836 cache=`echo W | sed 'y%.=/+-%___p_%'`
5837 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5838   $as_echo_n "(cached) " >&6
5839 else
5840
5841 echo 'void f(void){}' >conftest.c
5842 if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5843 eval "cv_prog_cc_flag_$cache=yes"
5844 else
5845 eval "cv_prog_cc_flag_$cache=no"
5846 fi
5847 rm -f conftest conftest.o conftest.c
5848
5849 fi
5850
5851 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5853 $as_echo "yes" >&6; }
5854 :
5855 CFLAGS="$CFLAGS -W"
5856 else
5857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5858 $as_echo "no" >&6; }
5859 :
5860
5861 fi
5862
5863
5864
5865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5866 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5867 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5868 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5869   $as_echo_n "(cached) " >&6
5870 else
5871
5872 echo 'void f(void){}' >conftest.c
5873 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5874 eval "cv_prog_cc_flag_$cache=yes"
5875 else
5876 eval "cv_prog_cc_flag_$cache=no"
5877 fi
5878 rm -f conftest conftest.o conftest.c
5879
5880 fi
5881
5882 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5884 $as_echo "yes" >&6; }
5885 :
5886 CFLAGS="$CFLAGS -Wall"
5887 else
5888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5889 $as_echo "no" >&6; }
5890 :
5891
5892 fi
5893
5894
5895
5896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5897 $as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5898 cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5899 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5900   $as_echo_n "(cached) " >&6
5901 else
5902
5903 echo 'void f(void){}' >conftest.c
5904 if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5905 eval "cv_prog_cc_flag_$cache=yes"
5906 else
5907 eval "cv_prog_cc_flag_$cache=no"
5908 fi
5909 rm -f conftest conftest.o conftest.c
5910
5911 fi
5912
5913 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5915 $as_echo "yes" >&6; }
5916 :
5917 CFLAGS="$CFLAGS -Wextra"
5918 else
5919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920 $as_echo "no" >&6; }
5921 :
5922
5923 fi
5924
5925
5926
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
5928 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
5929 cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
5930 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5931   $as_echo_n "(cached) " >&6
5932 else
5933
5934 echo 'void f(void){}' >conftest.c
5935 if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
5936 eval "cv_prog_cc_flag_$cache=yes"
5937 else
5938 eval "cv_prog_cc_flag_$cache=no"
5939 fi
5940 rm -f conftest conftest.o conftest.c
5941
5942 fi
5943
5944 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5946 $as_echo "yes" >&6; }
5947 :
5948 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
5949 else
5950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5951 $as_echo "no" >&6; }
5952 :
5953
5954 fi
5955
5956
5957 $as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
5958
5959                 ;;
5960         no|*)
5961                 # nothing to do.
5962                 ;;
5963 esac
5964 if test "$default_cflags" = "yes"; then
5965         # only when CFLAGS was "" at the start, if the users wants to
5966         # override we shouldn't add default cflags, because they wouldn't
5967         # be able to turn off these options and set the CFLAGS wanted.
5968
5969     # Check whether --enable-flto was given.
5970 if test "${enable_flto+set}" = set; then :
5971   enableval=$enable_flto;
5972 fi
5973
5974     if test "x$enable_flto" != "xno"; then :
5975
5976         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
5977 $as_echo_n "checking if $CC supports -flto... " >&6; }
5978         BAKCFLAGS="$CFLAGS"
5979         CFLAGS="$CFLAGS -flto"
5980         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5981 /* end confdefs.h.  */
5982
5983 int
5984 main ()
5985 {
5986
5987   ;
5988   return 0;
5989 }
5990 _ACEOF
5991 if ac_fn_c_try_link "$LINENO"; then :
5992
5993             if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
5994                 CFLAGS="$BAKCFLAGS"
5995                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5996 $as_echo "no" >&6; }
5997             else
5998                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5999 $as_echo "yes" >&6; }
6000             fi
6001             rm -f conftest conftest.c conftest.o
6002
6003 else
6004   CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6005 $as_echo "no" >&6; }
6006 fi
6007 rm -f core conftest.err conftest.$ac_objext \
6008     conftest$ac_exeext conftest.$ac_ext
6009
6010 fi
6011
6012
6013     # Check whether --enable-pie was given.
6014 if test "${enable_pie+set}" = set; then :
6015   enableval=$enable_pie;
6016 fi
6017
6018     if test "x$enable_pie" = "xyes"; then :
6019
6020         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6021 $as_echo_n "checking if $CC supports PIE... " >&6; }
6022         BAKLDFLAGS="$LDFLAGS"
6023         BAKCFLAGS="$CFLAGS"
6024         LDFLAGS="$LDFLAGS -pie"
6025         CFLAGS="$CFLAGS -fPIE"
6026         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6027 /* end confdefs.h.  */
6028
6029 int
6030 main ()
6031 {
6032
6033   ;
6034   return 0;
6035 }
6036 _ACEOF
6037 if ac_fn_c_try_link "$LINENO"; then :
6038
6039             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6040                 LDFLAGS="$BAKLDFLAGS"
6041                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6042 $as_echo "no" >&6; }
6043             else
6044                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6045 $as_echo "yes" >&6; }
6046             fi
6047             rm -f conftest conftest.c conftest.o
6048
6049 else
6050   LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6051 $as_echo "no" >&6; }
6052 fi
6053 rm -f core conftest.err conftest.$ac_objext \
6054     conftest$ac_exeext conftest.$ac_ext
6055
6056 fi
6057
6058
6059     # Check whether --enable-relro_now was given.
6060 if test "${enable_relro_now+set}" = set; then :
6061   enableval=$enable_relro_now;
6062 fi
6063
6064     if test "x$enable_relro_now" = "xyes"; then :
6065
6066         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6067 $as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6068         BAKLDFLAGS="$LDFLAGS"
6069         LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6070         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6071 /* end confdefs.h.  */
6072
6073 int
6074 main ()
6075 {
6076
6077   ;
6078   return 0;
6079 }
6080 _ACEOF
6081 if ac_fn_c_try_link "$LINENO"; then :
6082
6083             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6084                 LDFLAGS="$BAKLDFLAGS"
6085                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6086 $as_echo "no" >&6; }
6087             else
6088                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6089 $as_echo "yes" >&6; }
6090             fi
6091             rm -f conftest conftest.c conftest.o
6092
6093 else
6094   LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6095 $as_echo "no" >&6; }
6096 fi
6097 rm -f core conftest.err conftest.$ac_objext \
6098     conftest$ac_exeext conftest.$ac_ext
6099
6100 fi
6101
6102 fi
6103
6104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6105 $as_echo_n "checking for inline... " >&6; }
6106 if ${ac_cv_c_inline+:} false; then :
6107   $as_echo_n "(cached) " >&6
6108 else
6109   ac_cv_c_inline=no
6110 for ac_kw in inline __inline__ __inline; do
6111   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6112 /* end confdefs.h.  */
6113 #ifndef __cplusplus
6114 typedef int foo_t;
6115 static $ac_kw foo_t static_foo () {return 0; }
6116 $ac_kw foo_t foo () {return 0; }
6117 #endif
6118
6119 _ACEOF
6120 if ac_fn_c_try_compile "$LINENO"; then :
6121   ac_cv_c_inline=$ac_kw
6122 fi
6123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6124   test "$ac_cv_c_inline" != no && break
6125 done
6126
6127 fi
6128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6129 $as_echo "$ac_cv_c_inline" >&6; }
6130
6131 case $ac_cv_c_inline in
6132   inline | yes) ;;
6133   *)
6134     case $ac_cv_c_inline in
6135       no) ac_val=;;
6136       *) ac_val=$ac_cv_c_inline;;
6137     esac
6138     cat >>confdefs.h <<_ACEOF
6139 #ifndef __cplusplus
6140 #define inline $ac_val
6141 #endif
6142 _ACEOF
6143     ;;
6144 esac
6145
6146
6147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6148 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6149 if ${ac_cv_c_format_attribute+:} false; then :
6150   $as_echo_n "(cached) " >&6
6151 else
6152   ac_cv_c_format_attribute=no
6153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6154 /* end confdefs.h.  */
6155 #include <stdio.h>
6156 void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6157 void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6158
6159 int
6160 main ()
6161 {
6162
6163    f ("%s", "str");
6164
6165   ;
6166   return 0;
6167 }
6168 _ACEOF
6169 if ac_fn_c_try_compile "$LINENO"; then :
6170   ac_cv_c_format_attribute="yes"
6171 else
6172   ac_cv_c_format_attribute="no"
6173 fi
6174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6175
6176 fi
6177
6178
6179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6180 $as_echo "$ac_cv_c_format_attribute" >&6; }
6181 if test $ac_cv_c_format_attribute = yes; then
6182
6183 $as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6184
6185 fi
6186
6187
6188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6189 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6190 if ${ac_cv_c_unused_attribute+:} false; then :
6191   $as_echo_n "(cached) " >&6
6192 else
6193   ac_cv_c_unused_attribute=no
6194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6195 /* end confdefs.h.  */
6196 #include <stdio.h>
6197 void f (char *u __attribute__((unused)));
6198
6199 int
6200 main ()
6201 {
6202
6203    f ("x");
6204
6205   ;
6206   return 0;
6207 }
6208 _ACEOF
6209 if ac_fn_c_try_compile "$LINENO"; then :
6210   ac_cv_c_unused_attribute="yes"
6211 else
6212   ac_cv_c_unused_attribute="no"
6213 fi
6214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6215
6216 fi
6217
6218
6219
6220
6221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6222 $as_echo "$ac_cv_c_unused_attribute" >&6; }
6223 if test $ac_cv_c_unused_attribute = yes; then
6224
6225 $as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6226
6227 fi
6228
6229
6230
6231
6232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6233 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6234 if ${ac_cv_c_weak_attribute+:} false; then :
6235   $as_echo_n "(cached) " >&6
6236 else
6237   ac_cv_c_weak_attribute=no
6238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6239 /* end confdefs.h.  */
6240  #include <stdio.h>
6241 __attribute__((weak)) void f(int x) { printf("%d", x); }
6242
6243 int
6244 main ()
6245 {
6246
6247    f(1);
6248
6249   ;
6250   return 0;
6251 }
6252 _ACEOF
6253 if ac_fn_c_try_compile "$LINENO"; then :
6254   ac_cv_c_weak_attribute="yes"
6255 else
6256   ac_cv_c_weak_attribute="no"
6257 fi
6258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6259
6260 fi
6261
6262
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6264 $as_echo "$ac_cv_c_weak_attribute" >&6; }
6265 if test $ac_cv_c_weak_attribute = yes; then
6266
6267 $as_echo "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6268
6269
6270 $as_echo "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
6271
6272 fi
6273
6274
6275
6276
6277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
6278 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
6279 if ${ac_cv_c_noreturn_attribute+:} false; then :
6280   $as_echo_n "(cached) " >&6
6281 else
6282   ac_cv_c_noreturn_attribute=no
6283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6284 /* end confdefs.h.  */
6285  #include <stdio.h>
6286 __attribute__((noreturn)) void f(int x) { printf("%d", x); }
6287
6288 int
6289 main ()
6290 {
6291
6292    f(1);
6293
6294   ;
6295   return 0;
6296 }
6297 _ACEOF
6298 if ac_fn_c_try_compile "$LINENO"; then :
6299   ac_cv_c_noreturn_attribute="yes"
6300 else
6301   ac_cv_c_noreturn_attribute="no"
6302 fi
6303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6304
6305 fi
6306
6307
6308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
6309 $as_echo "$ac_cv_c_noreturn_attribute" >&6; }
6310 if test $ac_cv_c_noreturn_attribute = yes; then
6311
6312 $as_echo "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
6313
6314
6315 $as_echo "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
6316
6317 fi
6318
6319
6320 if test "$srcdir" != "."; then
6321         CPPFLAGS="$CPPFLAGS -I$srcdir"
6322 fi
6323
6324
6325
6326
6327
6328 for ac_prog in flex lex
6329 do
6330   # Extract the first word of "$ac_prog", so it can be a program name with args.
6331 set dummy $ac_prog; ac_word=$2
6332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6333 $as_echo_n "checking for $ac_word... " >&6; }
6334 if ${ac_cv_prog_LEX+:} false; then :
6335   $as_echo_n "(cached) " >&6
6336 else
6337   if test -n "$LEX"; then
6338   ac_cv_prog_LEX="$LEX" # Let the user override the test.
6339 else
6340 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6341 for as_dir in $PATH
6342 do
6343   IFS=$as_save_IFS
6344   test -z "$as_dir" && as_dir=.
6345     for ac_exec_ext in '' $ac_executable_extensions; do
6346   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6347     ac_cv_prog_LEX="$ac_prog"
6348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6349     break 2
6350   fi
6351 done
6352   done
6353 IFS=$as_save_IFS
6354
6355 fi
6356 fi
6357 LEX=$ac_cv_prog_LEX
6358 if test -n "$LEX"; then
6359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6360 $as_echo "$LEX" >&6; }
6361 else
6362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6363 $as_echo "no" >&6; }
6364 fi
6365
6366
6367   test -n "$LEX" && break
6368 done
6369 test -n "$LEX" || LEX=":"
6370
6371 if test "x$LEX" != "x:"; then
6372   cat >conftest.l <<_ACEOF
6373 %%
6374 a { ECHO; }
6375 b { REJECT; }
6376 c { yymore (); }
6377 d { yyless (1); }
6378 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6379     yyless ((input () != 0)); }
6380 f { unput (yytext[0]); }
6381 . { BEGIN INITIAL; }
6382 %%
6383 #ifdef YYTEXT_POINTER
6384 extern char *yytext;
6385 #endif
6386 int
6387 main (void)
6388 {
6389   return ! yylex () + ! yywrap ();
6390 }
6391 _ACEOF
6392 { { ac_try="$LEX conftest.l"
6393 case "(($ac_try" in
6394   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6395   *) ac_try_echo=$ac_try;;
6396 esac
6397 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6398 $as_echo "$ac_try_echo"; } >&5
6399   (eval "$LEX conftest.l") 2>&5
6400   ac_status=$?
6401   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6402   test $ac_status = 0; }
6403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6404 $as_echo_n "checking lex output file root... " >&6; }
6405 if ${ac_cv_prog_lex_root+:} false; then :
6406   $as_echo_n "(cached) " >&6
6407 else
6408
6409 if test -f lex.yy.c; then
6410   ac_cv_prog_lex_root=lex.yy
6411 elif test -f lexyy.c; then
6412   ac_cv_prog_lex_root=lexyy
6413 else
6414   as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6415 fi
6416 fi
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6418 $as_echo "$ac_cv_prog_lex_root" >&6; }
6419 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6420
6421 if test -z "${LEXLIB+set}"; then
6422   { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6423 $as_echo_n "checking lex library... " >&6; }
6424 if ${ac_cv_lib_lex+:} false; then :
6425   $as_echo_n "(cached) " >&6
6426 else
6427
6428     ac_save_LIBS=$LIBS
6429     ac_cv_lib_lex='none needed'
6430     for ac_lib in '' -lfl -ll; do
6431       LIBS="$ac_lib $ac_save_LIBS"
6432       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6433 /* end confdefs.h.  */
6434 `cat $LEX_OUTPUT_ROOT.c`
6435 _ACEOF
6436 if ac_fn_c_try_link "$LINENO"; then :
6437   ac_cv_lib_lex=$ac_lib
6438 fi
6439 rm -f core conftest.err conftest.$ac_objext \
6440     conftest$ac_exeext conftest.$ac_ext
6441       test "$ac_cv_lib_lex" != 'none needed' && break
6442     done
6443     LIBS=$ac_save_LIBS
6444
6445 fi
6446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6447 $as_echo "$ac_cv_lib_lex" >&6; }
6448   test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6449 fi
6450
6451
6452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6453 $as_echo_n "checking whether yytext is a pointer... " >&6; }
6454 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6455   $as_echo_n "(cached) " >&6
6456 else
6457   # POSIX says lex can declare yytext either as a pointer or an array; the
6458 # default is implementation-dependent.  Figure out which it is, since
6459 # not all implementations provide the %pointer and %array declarations.
6460 ac_cv_prog_lex_yytext_pointer=no
6461 ac_save_LIBS=$LIBS
6462 LIBS="$LEXLIB $ac_save_LIBS"
6463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6464 /* end confdefs.h.  */
6465
6466   #define YYTEXT_POINTER 1
6467 `cat $LEX_OUTPUT_ROOT.c`
6468 _ACEOF
6469 if ac_fn_c_try_link "$LINENO"; then :
6470   ac_cv_prog_lex_yytext_pointer=yes
6471 fi
6472 rm -f core conftest.err conftest.$ac_objext \
6473     conftest$ac_exeext conftest.$ac_ext
6474 LIBS=$ac_save_LIBS
6475
6476 fi
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6478 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6479 if test $ac_cv_prog_lex_yytext_pointer = yes; then
6480
6481 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6482
6483 fi
6484 rm -f conftest.l $LEX_OUTPUT_ROOT.c
6485
6486 fi
6487 if test "$LEX" != "" -a "$LEX" != ":"; then
6488
6489         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6490 $as_echo_n "checking for yylex_destroy... " >&6; }
6491         if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6492
6493 $as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6494
6495                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6496 $as_echo "yes" >&6; }
6497         else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6498 $as_echo "no" >&6; };
6499                 LEX=":"
6500         fi
6501
6502 fi
6503 if test "$LEX" != "" -a "$LEX" != ":"; then
6504
6505         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
6506 $as_echo_n "checking for lex %option... " >&6; }
6507         if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
6508 %option nounput
6509 %%
6510 EOF
6511                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6512 $as_echo "yes" >&6; }
6513         else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6514 $as_echo "no" >&6; };
6515                 LEX=":"
6516         fi
6517
6518 fi
6519 for ac_prog in 'bison -y' byacc
6520 do
6521   # Extract the first word of "$ac_prog", so it can be a program name with args.
6522 set dummy $ac_prog; ac_word=$2
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6524 $as_echo_n "checking for $ac_word... " >&6; }
6525 if ${ac_cv_prog_YACC+:} false; then :
6526   $as_echo_n "(cached) " >&6
6527 else
6528   if test -n "$YACC"; then
6529   ac_cv_prog_YACC="$YACC" # Let the user override the test.
6530 else
6531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6532 for as_dir in $PATH
6533 do
6534   IFS=$as_save_IFS
6535   test -z "$as_dir" && as_dir=.
6536     for ac_exec_ext in '' $ac_executable_extensions; do
6537   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6538     ac_cv_prog_YACC="$ac_prog"
6539     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6540     break 2
6541   fi
6542 done
6543   done
6544 IFS=$as_save_IFS
6545
6546 fi
6547 fi
6548 YACC=$ac_cv_prog_YACC
6549 if test -n "$YACC"; then
6550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6551 $as_echo "$YACC" >&6; }
6552 else
6553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6554 $as_echo "no" >&6; }
6555 fi
6556
6557
6558   test -n "$YACC" && break
6559 done
6560 test -n "$YACC" || YACC="yacc"
6561
6562 # Extract the first word of "doxygen", so it can be a program name with args.
6563 set dummy doxygen; ac_word=$2
6564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6565 $as_echo_n "checking for $ac_word... " >&6; }
6566 if ${ac_cv_prog_doxygen+:} false; then :
6567   $as_echo_n "(cached) " >&6
6568 else
6569   if test -n "$doxygen"; then
6570   ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6571 else
6572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6573 for as_dir in $PATH
6574 do
6575   IFS=$as_save_IFS
6576   test -z "$as_dir" && as_dir=.
6577     for ac_exec_ext in '' $ac_executable_extensions; do
6578   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6579     ac_cv_prog_doxygen="doxygen"
6580     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6581     break 2
6582   fi
6583 done
6584   done
6585 IFS=$as_save_IFS
6586
6587 fi
6588 fi
6589 doxygen=$ac_cv_prog_doxygen
6590 if test -n "$doxygen"; then
6591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6592 $as_echo "$doxygen" >&6; }
6593 else
6594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6595 $as_echo "no" >&6; }
6596 fi
6597
6598
6599 if test -n "$ac_tool_prefix"; then
6600   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6601 set dummy ${ac_tool_prefix}strip; ac_word=$2
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6603 $as_echo_n "checking for $ac_word... " >&6; }
6604 if ${ac_cv_prog_STRIP+:} false; then :
6605   $as_echo_n "(cached) " >&6
6606 else
6607   if test -n "$STRIP"; then
6608   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6609 else
6610 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6611 for as_dir in $PATH
6612 do
6613   IFS=$as_save_IFS
6614   test -z "$as_dir" && as_dir=.
6615     for ac_exec_ext in '' $ac_executable_extensions; do
6616   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6617     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6618     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6619     break 2
6620   fi
6621 done
6622   done
6623 IFS=$as_save_IFS
6624
6625 fi
6626 fi
6627 STRIP=$ac_cv_prog_STRIP
6628 if test -n "$STRIP"; then
6629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6630 $as_echo "$STRIP" >&6; }
6631 else
6632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6633 $as_echo "no" >&6; }
6634 fi
6635
6636
6637 fi
6638 if test -z "$ac_cv_prog_STRIP"; then
6639   ac_ct_STRIP=$STRIP
6640   # Extract the first word of "strip", so it can be a program name with args.
6641 set dummy strip; ac_word=$2
6642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6643 $as_echo_n "checking for $ac_word... " >&6; }
6644 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6645   $as_echo_n "(cached) " >&6
6646 else
6647   if test -n "$ac_ct_STRIP"; then
6648   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6649 else
6650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6651 for as_dir in $PATH
6652 do
6653   IFS=$as_save_IFS
6654   test -z "$as_dir" && as_dir=.
6655     for ac_exec_ext in '' $ac_executable_extensions; do
6656   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6657     ac_cv_prog_ac_ct_STRIP="strip"
6658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6659     break 2
6660   fi
6661 done
6662   done
6663 IFS=$as_save_IFS
6664
6665 fi
6666 fi
6667 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6668 if test -n "$ac_ct_STRIP"; then
6669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6670 $as_echo "$ac_ct_STRIP" >&6; }
6671 else
6672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6673 $as_echo "no" >&6; }
6674 fi
6675
6676   if test "x$ac_ct_STRIP" = x; then
6677     STRIP=""
6678   else
6679     case $cross_compiling:$ac_tool_warned in
6680 yes:)
6681 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6682 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6683 ac_tool_warned=yes ;;
6684 esac
6685     STRIP=$ac_ct_STRIP
6686   fi
6687 else
6688   STRIP="$ac_cv_prog_STRIP"
6689 fi
6690
6691 ac_aux_dir=
6692 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6693   if test -f "$ac_dir/install-sh"; then
6694     ac_aux_dir=$ac_dir
6695     ac_install_sh="$ac_aux_dir/install-sh -c"
6696     break
6697   elif test -f "$ac_dir/install.sh"; then
6698     ac_aux_dir=$ac_dir
6699     ac_install_sh="$ac_aux_dir/install.sh -c"
6700     break
6701   elif test -f "$ac_dir/shtool"; then
6702     ac_aux_dir=$ac_dir
6703     ac_install_sh="$ac_aux_dir/shtool install -c"
6704     break
6705   fi
6706 done
6707 if test -z "$ac_aux_dir"; then
6708   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6709 fi
6710
6711 # These three variables are undocumented and unsupported,
6712 # and are intended to be withdrawn in a future Autoconf release.
6713 # They can cause serious problems if a builder's source tree is in a directory
6714 # whose full name contains unusual characters.
6715 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6716 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6717 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6718
6719
6720 # Make sure we can run config.sub.
6721 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6722   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6723
6724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6725 $as_echo_n "checking build system type... " >&6; }
6726 if ${ac_cv_build+:} false; then :
6727   $as_echo_n "(cached) " >&6
6728 else
6729   ac_build_alias=$build_alias
6730 test "x$ac_build_alias" = x &&
6731   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6732 test "x$ac_build_alias" = x &&
6733   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6734 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6735   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6736
6737 fi
6738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6739 $as_echo "$ac_cv_build" >&6; }
6740 case $ac_cv_build in
6741 *-*-*) ;;
6742 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6743 esac
6744 build=$ac_cv_build
6745 ac_save_IFS=$IFS; IFS='-'
6746 set x $ac_cv_build
6747 shift
6748 build_cpu=$1
6749 build_vendor=$2
6750 shift; shift
6751 # Remember, the first character of IFS is used to create $*,
6752 # except with old shells:
6753 build_os=$*
6754 IFS=$ac_save_IFS
6755 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6756
6757
6758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6759 $as_echo_n "checking host system type... " >&6; }
6760 if ${ac_cv_host+:} false; then :
6761   $as_echo_n "(cached) " >&6
6762 else
6763   if test "x$host_alias" = x; then
6764   ac_cv_host=$ac_cv_build
6765 else
6766   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6767     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6768 fi
6769
6770 fi
6771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6772 $as_echo "$ac_cv_host" >&6; }
6773 case $ac_cv_host in
6774 *-*-*) ;;
6775 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6776 esac
6777 host=$ac_cv_host
6778 ac_save_IFS=$IFS; IFS='-'
6779 set x $ac_cv_host
6780 shift
6781 host_cpu=$1
6782 host_vendor=$2
6783 shift; shift
6784 # Remember, the first character of IFS is used to create $*,
6785 # except with old shells:
6786 host_os=$*
6787 IFS=$ac_save_IFS
6788 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6789
6790
6791
6792 # skip these tests, we do not need them.
6793
6794
6795
6796
6797
6798
6799
6800
6801 # always use ./libtool unless override from commandline (libtool=mylibtool)
6802 if test -z "$libtool"; then
6803         libtool="./libtool"
6804 fi
6805
6806 # avoid libtool max commandline length test on systems that fork slowly.
6807
6808 if echo "$host_os" | grep "sunos4" >/dev/null; then
6809         lt_cv_sys_max_cmd_len=32750;
6810 fi
6811 if test -n "$ac_tool_prefix"; then
6812   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6813 set dummy ${ac_tool_prefix}ar; ac_word=$2
6814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6815 $as_echo_n "checking for $ac_word... " >&6; }
6816 if ${ac_cv_path_AR+:} false; then :
6817   $as_echo_n "(cached) " >&6
6818 else
6819   case $AR in
6820   [\\/]* | ?:[\\/]*)
6821   ac_cv_path_AR="$AR" # Let the user override the test with a path.
6822   ;;
6823   *)
6824   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6825 for as_dir in $PATH
6826 do
6827   IFS=$as_save_IFS
6828   test -z "$as_dir" && as_dir=.
6829     for ac_exec_ext in '' $ac_executable_extensions; do
6830   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6831     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6833     break 2
6834   fi
6835 done
6836   done
6837 IFS=$as_save_IFS
6838
6839   ;;
6840 esac
6841 fi
6842 AR=$ac_cv_path_AR
6843 if test -n "$AR"; then
6844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6845 $as_echo "$AR" >&6; }
6846 else
6847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6848 $as_echo "no" >&6; }
6849 fi
6850
6851
6852 fi
6853 if test -z "$ac_cv_path_AR"; then
6854   ac_pt_AR=$AR
6855   # Extract the first word of "ar", so it can be a program name with args.
6856 set dummy ar; ac_word=$2
6857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6858 $as_echo_n "checking for $ac_word... " >&6; }
6859 if ${ac_cv_path_ac_pt_AR+:} false; then :
6860   $as_echo_n "(cached) " >&6
6861 else
6862   case $ac_pt_AR in
6863   [\\/]* | ?:[\\/]*)
6864   ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6865   ;;
6866   *)
6867   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6868 for as_dir in $PATH
6869 do
6870   IFS=$as_save_IFS
6871   test -z "$as_dir" && as_dir=.
6872     for ac_exec_ext in '' $ac_executable_extensions; do
6873   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6874     ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6875     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6876     break 2
6877   fi
6878 done
6879   done
6880 IFS=$as_save_IFS
6881
6882   ;;
6883 esac
6884 fi
6885 ac_pt_AR=$ac_cv_path_ac_pt_AR
6886 if test -n "$ac_pt_AR"; then
6887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6888 $as_echo "$ac_pt_AR" >&6; }
6889 else
6890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6891 $as_echo "no" >&6; }
6892 fi
6893
6894   if test "x$ac_pt_AR" = x; then
6895     AR="false"
6896   else
6897     case $cross_compiling:$ac_tool_warned in
6898 yes:)
6899 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6900 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6901 ac_tool_warned=yes ;;
6902 esac
6903     AR=$ac_pt_AR
6904   fi
6905 else
6906   AR="$ac_cv_path_AR"
6907 fi
6908
6909 if test $AR = false; then
6910         as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
6911 fi
6912
6913 case `pwd` in
6914   *\ * | *\     *)
6915     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
6916 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
6917 esac
6918
6919
6920
6921 macro_version='2.4.6'
6922 macro_revision='2.4.6'
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936 ltmain=$ac_aux_dir/ltmain.sh
6937
6938 # Backslashify metacharacters that are still active within
6939 # double-quoted strings.
6940 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6941
6942 # Same as above, but do not quote variable references.
6943 double_quote_subst='s/\(["`\\]\)/\\\1/g'
6944
6945 # Sed substitution to delay expansion of an escaped shell variable in a
6946 # double_quote_subst'ed string.
6947 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6948
6949 # Sed substitution to delay expansion of an escaped single quote.
6950 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
6951
6952 # Sed substitution to avoid accidental globbing in evaled expressions
6953 no_glob_subst='s/\*/\\\*/g'
6954
6955 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6956 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
6957 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
6958
6959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
6960 $as_echo_n "checking how to print strings... " >&6; }
6961 # Test print first, because it will be a builtin if present.
6962 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6963    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6964   ECHO='print -r --'
6965 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6966   ECHO='printf %s\n'
6967 else
6968   # Use this function as a fallback that always works.
6969   func_fallback_echo ()
6970   {
6971     eval 'cat <<_LTECHO_EOF
6972 $1
6973 _LTECHO_EOF'
6974   }
6975   ECHO='func_fallback_echo'
6976 fi
6977
6978 # func_echo_all arg...
6979 # Invoke $ECHO with all args, space-separated.
6980 func_echo_all ()
6981 {
6982     $ECHO ""
6983 }
6984
6985 case $ECHO in
6986   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
6987 $as_echo "printf" >&6; } ;;
6988   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
6989 $as_echo "print -r" >&6; } ;;
6990   *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
6991 $as_echo "cat" >&6; } ;;
6992 esac
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7008 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
7009 if ${ac_cv_path_SED+:} false; then :
7010   $as_echo_n "(cached) " >&6
7011 else
7012             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7013      for ac_i in 1 2 3 4 5 6 7; do
7014        ac_script="$ac_script$as_nl$ac_script"
7015      done
7016      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7017      { ac_script=; unset ac_script;}
7018      if test -z "$SED"; then
7019   ac_path_SED_found=false
7020   # Loop through the user's path and test for each of PROGNAME-LIST
7021   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7022 for as_dir in $PATH
7023 do
7024   IFS=$as_save_IFS
7025   test -z "$as_dir" && as_dir=.
7026     for ac_prog in sed gsed; do
7027     for ac_exec_ext in '' $ac_executable_extensions; do
7028       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
7029       as_fn_executable_p "$ac_path_SED" || continue
7030 # Check for GNU ac_path_SED and select it if it is found.
7031   # Check for GNU $ac_path_SED
7032 case `"$ac_path_SED" --version 2>&1` in
7033 *GNU*)
7034   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7035 *)
7036   ac_count=0
7037   $as_echo_n 0123456789 >"conftest.in"
7038   while :
7039   do
7040     cat "conftest.in" "conftest.in" >"conftest.tmp"
7041     mv "conftest.tmp" "conftest.in"
7042     cp "conftest.in" "conftest.nl"
7043     $as_echo '' >> "conftest.nl"
7044     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7045     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7046     as_fn_arith $ac_count + 1 && ac_count=$as_val
7047     if test $ac_count -gt ${ac_path_SED_max-0}; then
7048       # Best one so far, save it but keep looking for a better one
7049       ac_cv_path_SED="$ac_path_SED"
7050       ac_path_SED_max=$ac_count
7051     fi
7052     # 10*(2^10) chars as input seems more than enough
7053     test $ac_count -gt 10 && break
7054   done
7055   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7056 esac
7057
7058       $ac_path_SED_found && break 3
7059     done
7060   done
7061   done
7062 IFS=$as_save_IFS
7063   if test -z "$ac_cv_path_SED"; then
7064     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7065   fi
7066 else
7067   ac_cv_path_SED=$SED
7068 fi
7069
7070 fi
7071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7072 $as_echo "$ac_cv_path_SED" >&6; }
7073  SED="$ac_cv_path_SED"
7074   rm -f conftest.sed
7075
7076 test -z "$SED" && SED=sed
7077 Xsed="$SED -e 1s/^X//"
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7090 $as_echo_n "checking for fgrep... " >&6; }
7091 if ${ac_cv_path_FGREP+:} false; then :
7092   $as_echo_n "(cached) " >&6
7093 else
7094   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7095    then ac_cv_path_FGREP="$GREP -F"
7096    else
7097      if test -z "$FGREP"; then
7098   ac_path_FGREP_found=false
7099   # Loop through the user's path and test for each of PROGNAME-LIST
7100   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7101 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7102 do
7103   IFS=$as_save_IFS
7104   test -z "$as_dir" && as_dir=.
7105     for ac_prog in fgrep; do
7106     for ac_exec_ext in '' $ac_executable_extensions; do
7107       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
7108       as_fn_executable_p "$ac_path_FGREP" || continue
7109 # Check for GNU ac_path_FGREP and select it if it is found.
7110   # Check for GNU $ac_path_FGREP
7111 case `"$ac_path_FGREP" --version 2>&1` in
7112 *GNU*)
7113   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7114 *)
7115   ac_count=0
7116   $as_echo_n 0123456789 >"conftest.in"
7117   while :
7118   do
7119     cat "conftest.in" "conftest.in" >"conftest.tmp"
7120     mv "conftest.tmp" "conftest.in"
7121     cp "conftest.in" "conftest.nl"
7122     $as_echo 'FGREP' >> "conftest.nl"
7123     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7124     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7125     as_fn_arith $ac_count + 1 && ac_count=$as_val
7126     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7127       # Best one so far, save it but keep looking for a better one
7128       ac_cv_path_FGREP="$ac_path_FGREP"
7129       ac_path_FGREP_max=$ac_count
7130     fi
7131     # 10*(2^10) chars as input seems more than enough
7132     test $ac_count -gt 10 && break
7133   done
7134   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7135 esac
7136
7137       $ac_path_FGREP_found && break 3
7138     done
7139   done
7140   done
7141 IFS=$as_save_IFS
7142   if test -z "$ac_cv_path_FGREP"; then
7143     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7144   fi
7145 else
7146   ac_cv_path_FGREP=$FGREP
7147 fi
7148
7149    fi
7150 fi
7151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7152 $as_echo "$ac_cv_path_FGREP" >&6; }
7153  FGREP="$ac_cv_path_FGREP"
7154
7155
7156 test -z "$GREP" && GREP=grep
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176 # Check whether --with-gnu-ld was given.
7177 if test "${with_gnu_ld+set}" = set; then :
7178   withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7179 else
7180   with_gnu_ld=no
7181 fi
7182
7183 ac_prog=ld
7184 if test yes = "$GCC"; then
7185   # Check if gcc -print-prog-name=ld gives a path.
7186   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7187 $as_echo_n "checking for ld used by $CC... " >&6; }
7188   case $host in
7189   *-*-mingw*)
7190     # gcc leaves a trailing carriage return, which upsets mingw
7191     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7192   *)
7193     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7194   esac
7195   case $ac_prog in
7196     # Accept absolute paths.
7197     [\\/]* | ?:[\\/]*)
7198       re_direlt='/[^/][^/]*/\.\./'
7199       # Canonicalize the pathname of ld
7200       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7201       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7202         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7203       done
7204       test -z "$LD" && LD=$ac_prog
7205       ;;
7206   "")
7207     # If it fails, then pretend we aren't using GCC.
7208     ac_prog=ld
7209     ;;
7210   *)
7211     # If it is relative, then search for the first ld in PATH.
7212     with_gnu_ld=unknown
7213     ;;
7214   esac
7215 elif test yes = "$with_gnu_ld"; then
7216   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7217 $as_echo_n "checking for GNU ld... " >&6; }
7218 else
7219   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7220 $as_echo_n "checking for non-GNU ld... " >&6; }
7221 fi
7222 if ${lt_cv_path_LD+:} false; then :
7223   $as_echo_n "(cached) " >&6
7224 else
7225   if test -z "$LD"; then
7226   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7227   for ac_dir in $PATH; do
7228     IFS=$lt_save_ifs
7229     test -z "$ac_dir" && ac_dir=.
7230     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7231       lt_cv_path_LD=$ac_dir/$ac_prog
7232       # Check to see if the program is GNU ld.  I'd rather use --version,
7233       # but apparently some variants of GNU ld only accept -v.
7234       # Break only if it was the GNU/non-GNU ld that we prefer.
7235       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7236       *GNU* | *'with BFD'*)
7237         test no != "$with_gnu_ld" && break
7238         ;;
7239       *)
7240         test yes != "$with_gnu_ld" && break
7241         ;;
7242       esac
7243     fi
7244   done
7245   IFS=$lt_save_ifs
7246 else
7247   lt_cv_path_LD=$LD # Let the user override the test with a path.
7248 fi
7249 fi
7250
7251 LD=$lt_cv_path_LD
7252 if test -n "$LD"; then
7253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7254 $as_echo "$LD" >&6; }
7255 else
7256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7257 $as_echo "no" >&6; }
7258 fi
7259 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7261 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7262 if ${lt_cv_prog_gnu_ld+:} false; then :
7263   $as_echo_n "(cached) " >&6
7264 else
7265   # I'd rather use --version here, but apparently some GNU lds only accept -v.
7266 case `$LD -v 2>&1 </dev/null` in
7267 *GNU* | *'with BFD'*)
7268   lt_cv_prog_gnu_ld=yes
7269   ;;
7270 *)
7271   lt_cv_prog_gnu_ld=no
7272   ;;
7273 esac
7274 fi
7275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7276 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
7277 with_gnu_ld=$lt_cv_prog_gnu_ld
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7288 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7289 if ${lt_cv_path_NM+:} false; then :
7290   $as_echo_n "(cached) " >&6
7291 else
7292   if test -n "$NM"; then
7293   # Let the user override the test.
7294   lt_cv_path_NM=$NM
7295 else
7296   lt_nm_to_check=${ac_tool_prefix}nm
7297   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7298     lt_nm_to_check="$lt_nm_to_check nm"
7299   fi
7300   for lt_tmp_nm in $lt_nm_to_check; do
7301     lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7302     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7303       IFS=$lt_save_ifs
7304       test -z "$ac_dir" && ac_dir=.
7305       tmp_nm=$ac_dir/$lt_tmp_nm
7306       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7307         # Check to see if the nm accepts a BSD-compat flag.
7308         # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7309         #   nm: unknown option "B" ignored
7310         # Tru64's nm complains that /dev/null is an invalid object file
7311         # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7312         case $build_os in
7313         mingw*) lt_bad_file=conftest.nm/nofile ;;
7314         *) lt_bad_file=/dev/null ;;
7315         esac
7316         case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7317         *$lt_bad_file* | *'Invalid file or object type'*)
7318           lt_cv_path_NM="$tmp_nm -B"
7319           break 2
7320           ;;
7321         *)
7322           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7323           */dev/null*)
7324             lt_cv_path_NM="$tmp_nm -p"
7325             break 2
7326             ;;
7327           *)
7328             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7329             continue # so that we can try to find one that supports BSD flags
7330             ;;
7331           esac
7332           ;;
7333         esac
7334       fi
7335     done
7336     IFS=$lt_save_ifs
7337   done
7338   : ${lt_cv_path_NM=no}
7339 fi
7340 fi
7341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7342 $as_echo "$lt_cv_path_NM" >&6; }
7343 if test no != "$lt_cv_path_NM"; then
7344   NM=$lt_cv_path_NM
7345 else
7346   # Didn't find any BSD compatible name lister, look for dumpbin.
7347   if test -n "$DUMPBIN"; then :
7348     # Let the user override the test.
7349   else
7350     if test -n "$ac_tool_prefix"; then
7351   for ac_prog in dumpbin "link -dump"
7352   do
7353     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7354 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7356 $as_echo_n "checking for $ac_word... " >&6; }
7357 if ${ac_cv_prog_DUMPBIN+:} false; then :
7358   $as_echo_n "(cached) " >&6
7359 else
7360   if test -n "$DUMPBIN"; then
7361   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7362 else
7363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7364 for as_dir in $PATH
7365 do
7366   IFS=$as_save_IFS
7367   test -z "$as_dir" && as_dir=.
7368     for ac_exec_ext in '' $ac_executable_extensions; do
7369   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7370     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7371     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7372     break 2
7373   fi
7374 done
7375   done
7376 IFS=$as_save_IFS
7377
7378 fi
7379 fi
7380 DUMPBIN=$ac_cv_prog_DUMPBIN
7381 if test -n "$DUMPBIN"; then
7382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7383 $as_echo "$DUMPBIN" >&6; }
7384 else
7385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7386 $as_echo "no" >&6; }
7387 fi
7388
7389
7390     test -n "$DUMPBIN" && break
7391   done
7392 fi
7393 if test -z "$DUMPBIN"; then
7394   ac_ct_DUMPBIN=$DUMPBIN
7395   for ac_prog in dumpbin "link -dump"
7396 do
7397   # Extract the first word of "$ac_prog", so it can be a program name with args.
7398 set dummy $ac_prog; ac_word=$2
7399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7400 $as_echo_n "checking for $ac_word... " >&6; }
7401 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7402   $as_echo_n "(cached) " >&6
7403 else
7404   if test -n "$ac_ct_DUMPBIN"; then
7405   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7406 else
7407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7408 for as_dir in $PATH
7409 do
7410   IFS=$as_save_IFS
7411   test -z "$as_dir" && as_dir=.
7412     for ac_exec_ext in '' $ac_executable_extensions; do
7413   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7414     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7415     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7416     break 2
7417   fi
7418 done
7419   done
7420 IFS=$as_save_IFS
7421
7422 fi
7423 fi
7424 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7425 if test -n "$ac_ct_DUMPBIN"; then
7426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7427 $as_echo "$ac_ct_DUMPBIN" >&6; }
7428 else
7429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7430 $as_echo "no" >&6; }
7431 fi
7432
7433
7434   test -n "$ac_ct_DUMPBIN" && break
7435 done
7436
7437   if test "x$ac_ct_DUMPBIN" = x; then
7438     DUMPBIN=":"
7439   else
7440     case $cross_compiling:$ac_tool_warned in
7441 yes:)
7442 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7443 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7444 ac_tool_warned=yes ;;
7445 esac
7446     DUMPBIN=$ac_ct_DUMPBIN
7447   fi
7448 fi
7449
7450     case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7451     *COFF*)
7452       DUMPBIN="$DUMPBIN -symbols -headers"
7453       ;;
7454     *)
7455       DUMPBIN=:
7456       ;;
7457     esac
7458   fi
7459
7460   if test : != "$DUMPBIN"; then
7461     NM=$DUMPBIN
7462   fi
7463 fi
7464 test -z "$NM" && NM=nm
7465
7466
7467
7468
7469
7470
7471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7472 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
7473 if ${lt_cv_nm_interface+:} false; then :
7474   $as_echo_n "(cached) " >&6
7475 else
7476   lt_cv_nm_interface="BSD nm"
7477   echo "int some_variable = 0;" > conftest.$ac_ext
7478   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7479   (eval "$ac_compile" 2>conftest.err)
7480   cat conftest.err >&5
7481   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7482   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7483   cat conftest.err >&5
7484   (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7485   cat conftest.out >&5
7486   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7487     lt_cv_nm_interface="MS dumpbin"
7488   fi
7489   rm -f conftest*
7490 fi
7491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7492 $as_echo "$lt_cv_nm_interface" >&6; }
7493
7494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7495 $as_echo_n "checking whether ln -s works... " >&6; }
7496 LN_S=$as_ln_s
7497 if test "$LN_S" = "ln -s"; then
7498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7499 $as_echo "yes" >&6; }
7500 else
7501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7502 $as_echo "no, using $LN_S" >&6; }
7503 fi
7504
7505 # find the maximum length of command line arguments
7506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7507 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7508 if ${lt_cv_sys_max_cmd_len+:} false; then :
7509   $as_echo_n "(cached) " >&6
7510 else
7511     i=0
7512   teststring=ABCD
7513
7514   case $build_os in
7515   msdosdjgpp*)
7516     # On DJGPP, this test can blow up pretty badly due to problems in libc
7517     # (any single argument exceeding 2000 bytes causes a buffer overrun
7518     # during glob expansion).  Even if it were fixed, the result of this
7519     # check would be larger than it should be.
7520     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7521     ;;
7522
7523   gnu*)
7524     # Under GNU Hurd, this test is not required because there is
7525     # no limit to the length of command line arguments.
7526     # Libtool will interpret -1 as no limit whatsoever
7527     lt_cv_sys_max_cmd_len=-1;
7528     ;;
7529
7530   cygwin* | mingw* | cegcc*)
7531     # On Win9x/ME, this test blows up -- it succeeds, but takes
7532     # about 5 minutes as the teststring grows exponentially.
7533     # Worse, since 9x/ME are not pre-emptively multitasking,
7534     # you end up with a "frozen" computer, even though with patience
7535     # the test eventually succeeds (with a max line length of 256k).
7536     # Instead, let's just punt: use the minimum linelength reported by
7537     # all of the supported platforms: 8192 (on NT/2K/XP).
7538     lt_cv_sys_max_cmd_len=8192;
7539     ;;
7540
7541   mint*)
7542     # On MiNT this can take a long time and run out of memory.
7543     lt_cv_sys_max_cmd_len=8192;
7544     ;;
7545
7546   amigaos*)
7547     # On AmigaOS with pdksh, this test takes hours, literally.
7548     # So we just punt and use a minimum line length of 8192.
7549     lt_cv_sys_max_cmd_len=8192;
7550     ;;
7551
7552   bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7553     # This has been around since 386BSD, at least.  Likely further.
7554     if test -x /sbin/sysctl; then
7555       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7556     elif test -x /usr/sbin/sysctl; then
7557       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7558     else
7559       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7560     fi
7561     # And add a safety zone
7562     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7563     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7564     ;;
7565
7566   interix*)
7567     # We know the value 262144 and hardcode it with a safety zone (like BSD)
7568     lt_cv_sys_max_cmd_len=196608
7569     ;;
7570
7571   os2*)
7572     # The test takes a long time on OS/2.
7573     lt_cv_sys_max_cmd_len=8192
7574     ;;
7575
7576   osf*)
7577     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7578     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7579     # nice to cause kernel panics so lets avoid the loop below.
7580     # First set a reasonable default.
7581     lt_cv_sys_max_cmd_len=16384
7582     #
7583     if test -x /sbin/sysconfig; then
7584       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7585         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7586       esac
7587     fi
7588     ;;
7589   sco3.2v5*)
7590     lt_cv_sys_max_cmd_len=102400
7591     ;;
7592   sysv5* | sco5v6* | sysv4.2uw2*)
7593     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7594     if test -n "$kargmax"; then
7595       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[  ]//'`
7596     else
7597       lt_cv_sys_max_cmd_len=32768
7598     fi
7599     ;;
7600   *)
7601     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7602     if test -n "$lt_cv_sys_max_cmd_len" && \
7603        test undefined != "$lt_cv_sys_max_cmd_len"; then
7604       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7605       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7606     else
7607       # Make teststring a little bigger before we do anything with it.
7608       # a 1K string should be a reasonable start.
7609       for i in 1 2 3 4 5 6 7 8; do
7610         teststring=$teststring$teststring
7611       done
7612       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7613       # If test is not a shell built-in, we'll probably end up computing a
7614       # maximum length that is only half of the actual maximum length, but
7615       # we can't tell.
7616       while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7617                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7618               test 17 != "$i" # 1/2 MB should be enough
7619       do
7620         i=`expr $i + 1`
7621         teststring=$teststring$teststring
7622       done
7623       # Only check the string length outside the loop.
7624       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7625       teststring=
7626       # Add a significant safety factor because C++ compilers can tack on
7627       # massive amounts of additional arguments before passing them to the
7628       # linker.  It appears as though 1/2 is a usable value.
7629       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7630     fi
7631     ;;
7632   esac
7633
7634 fi
7635
7636 if test -n "$lt_cv_sys_max_cmd_len"; then
7637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7638 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7639 else
7640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7641 $as_echo "none" >&6; }
7642 fi
7643 max_cmd_len=$lt_cv_sys_max_cmd_len
7644
7645
7646
7647
7648
7649
7650 : ${CP="cp -f"}
7651 : ${MV="mv -f"}
7652 : ${RM="rm -f"}
7653
7654 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7655   lt_unset=unset
7656 else
7657   lt_unset=false
7658 fi
7659
7660
7661
7662
7663
7664 # test EBCDIC or ASCII
7665 case `echo X|tr X '\101'` in
7666  A) # ASCII based system
7667     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7668   lt_SP2NL='tr \040 \012'
7669   lt_NL2SP='tr \015\012 \040\040'
7670   ;;
7671  *) # EBCDIC based system
7672   lt_SP2NL='tr \100 \n'
7673   lt_NL2SP='tr \r\n \100\100'
7674   ;;
7675 esac
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7686 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7687 if ${lt_cv_to_host_file_cmd+:} false; then :
7688   $as_echo_n "(cached) " >&6
7689 else
7690   case $host in
7691   *-*-mingw* )
7692     case $build in
7693       *-*-mingw* ) # actually msys
7694         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7695         ;;
7696       *-*-cygwin* )
7697         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7698         ;;
7699       * ) # otherwise, assume *nix
7700         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7701         ;;
7702     esac
7703     ;;
7704   *-*-cygwin* )
7705     case $build in
7706       *-*-mingw* ) # actually msys
7707         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7708         ;;
7709       *-*-cygwin* )
7710         lt_cv_to_host_file_cmd=func_convert_file_noop
7711         ;;
7712       * ) # otherwise, assume *nix
7713         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7714         ;;
7715     esac
7716     ;;
7717   * ) # unhandled hosts (and "normal" native builds)
7718     lt_cv_to_host_file_cmd=func_convert_file_noop
7719     ;;
7720 esac
7721
7722 fi
7723
7724 to_host_file_cmd=$lt_cv_to_host_file_cmd
7725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7726 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
7727
7728
7729
7730
7731
7732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7733 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7734 if ${lt_cv_to_tool_file_cmd+:} false; then :
7735   $as_echo_n "(cached) " >&6
7736 else
7737   #assume ordinary cross tools, or native build.
7738 lt_cv_to_tool_file_cmd=func_convert_file_noop
7739 case $host in
7740   *-*-mingw* )
7741     case $build in
7742       *-*-mingw* ) # actually msys
7743         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7744         ;;
7745     esac
7746     ;;
7747 esac
7748
7749 fi
7750
7751 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7753 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7754
7755
7756
7757
7758
7759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7760 $as_echo_n "checking for $LD option to reload object files... " >&6; }
7761 if ${lt_cv_ld_reload_flag+:} false; then :
7762   $as_echo_n "(cached) " >&6
7763 else
7764   lt_cv_ld_reload_flag='-r'
7765 fi
7766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7767 $as_echo "$lt_cv_ld_reload_flag" >&6; }
7768 reload_flag=$lt_cv_ld_reload_flag
7769 case $reload_flag in
7770 "" | " "*) ;;
7771 *) reload_flag=" $reload_flag" ;;
7772 esac
7773 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7774 case $host_os in
7775   cygwin* | mingw* | pw32* | cegcc*)
7776     if test yes != "$GCC"; then
7777       reload_cmds=false
7778     fi
7779     ;;
7780   darwin*)
7781     if test yes = "$GCC"; then
7782       reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7783     else
7784       reload_cmds='$LD$reload_flag -o $output$reload_objs'
7785     fi
7786     ;;
7787 esac
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797 if test -n "$ac_tool_prefix"; then
7798   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7799 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7801 $as_echo_n "checking for $ac_word... " >&6; }
7802 if ${ac_cv_prog_OBJDUMP+:} false; then :
7803   $as_echo_n "(cached) " >&6
7804 else
7805   if test -n "$OBJDUMP"; then
7806   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7807 else
7808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7809 for as_dir in $PATH
7810 do
7811   IFS=$as_save_IFS
7812   test -z "$as_dir" && as_dir=.
7813     for ac_exec_ext in '' $ac_executable_extensions; do
7814   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7815     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7816     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7817     break 2
7818   fi
7819 done
7820   done
7821 IFS=$as_save_IFS
7822
7823 fi
7824 fi
7825 OBJDUMP=$ac_cv_prog_OBJDUMP
7826 if test -n "$OBJDUMP"; then
7827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7828 $as_echo "$OBJDUMP" >&6; }
7829 else
7830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7831 $as_echo "no" >&6; }
7832 fi
7833
7834
7835 fi
7836 if test -z "$ac_cv_prog_OBJDUMP"; then
7837   ac_ct_OBJDUMP=$OBJDUMP
7838   # Extract the first word of "objdump", so it can be a program name with args.
7839 set dummy objdump; ac_word=$2
7840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7841 $as_echo_n "checking for $ac_word... " >&6; }
7842 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7843   $as_echo_n "(cached) " >&6
7844 else
7845   if test -n "$ac_ct_OBJDUMP"; then
7846   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7847 else
7848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7849 for as_dir in $PATH
7850 do
7851   IFS=$as_save_IFS
7852   test -z "$as_dir" && as_dir=.
7853     for ac_exec_ext in '' $ac_executable_extensions; do
7854   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7855     ac_cv_prog_ac_ct_OBJDUMP="objdump"
7856     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7857     break 2
7858   fi
7859 done
7860   done
7861 IFS=$as_save_IFS
7862
7863 fi
7864 fi
7865 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7866 if test -n "$ac_ct_OBJDUMP"; then
7867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7868 $as_echo "$ac_ct_OBJDUMP" >&6; }
7869 else
7870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7871 $as_echo "no" >&6; }
7872 fi
7873
7874   if test "x$ac_ct_OBJDUMP" = x; then
7875     OBJDUMP="false"
7876   else
7877     case $cross_compiling:$ac_tool_warned in
7878 yes:)
7879 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7880 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7881 ac_tool_warned=yes ;;
7882 esac
7883     OBJDUMP=$ac_ct_OBJDUMP
7884   fi
7885 else
7886   OBJDUMP="$ac_cv_prog_OBJDUMP"
7887 fi
7888
7889 test -z "$OBJDUMP" && OBJDUMP=objdump
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7900 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
7901 if ${lt_cv_deplibs_check_method+:} false; then :
7902   $as_echo_n "(cached) " >&6
7903 else
7904   lt_cv_file_magic_cmd='$MAGIC_CMD'
7905 lt_cv_file_magic_test_file=
7906 lt_cv_deplibs_check_method='unknown'
7907 # Need to set the preceding variable on all platforms that support
7908 # interlibrary dependencies.
7909 # 'none' -- dependencies not supported.
7910 # 'unknown' -- same as none, but documents that we really don't know.
7911 # 'pass_all' -- all dependencies passed with no checks.
7912 # 'test_compile' -- check by making test program.
7913 # 'file_magic [[regex]]' -- check by looking for files in library path
7914 # that responds to the $file_magic_cmd with a given extended regex.
7915 # If you have 'file' or equivalent on your system and you're not sure
7916 # whether 'pass_all' will *always* work, you probably want this one.
7917
7918 case $host_os in
7919 aix[4-9]*)
7920   lt_cv_deplibs_check_method=pass_all
7921   ;;
7922
7923 beos*)
7924   lt_cv_deplibs_check_method=pass_all
7925   ;;
7926
7927 bsdi[45]*)
7928   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
7929   lt_cv_file_magic_cmd='/usr/bin/file -L'
7930   lt_cv_file_magic_test_file=/shlib/libc.so
7931   ;;
7932
7933 cygwin*)
7934   # func_win32_libid is a shell function defined in ltmain.sh
7935   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7936   lt_cv_file_magic_cmd='func_win32_libid'
7937   ;;
7938
7939 mingw* | pw32*)
7940   # Base MSYS/MinGW do not provide the 'file' command needed by
7941   # func_win32_libid shell function, so use a weaker test based on 'objdump',
7942   # unless we find 'file', for example because we are cross-compiling.
7943   if ( file / ) >/dev/null 2>&1; then
7944     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7945     lt_cv_file_magic_cmd='func_win32_libid'
7946   else
7947     # Keep this pattern in sync with the one in func_win32_libid.
7948     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
7949     lt_cv_file_magic_cmd='$OBJDUMP -f'
7950   fi
7951   ;;
7952
7953 cegcc*)
7954   # use the weaker test based on 'objdump'. See mingw*.
7955   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
7956   lt_cv_file_magic_cmd='$OBJDUMP -f'
7957   ;;
7958
7959 darwin* | rhapsody*)
7960   lt_cv_deplibs_check_method=pass_all
7961   ;;
7962
7963 freebsd* | dragonfly*)
7964   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7965     case $host_cpu in
7966     i*86 )
7967       # Not sure whether the presence of OpenBSD here was a mistake.
7968       # Let's accept both of them until this is cleared up.
7969       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
7970       lt_cv_file_magic_cmd=/usr/bin/file
7971       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7972       ;;
7973     esac
7974   else
7975     lt_cv_deplibs_check_method=pass_all
7976   fi
7977   ;;
7978
7979 haiku*)
7980   lt_cv_deplibs_check_method=pass_all
7981   ;;
7982
7983 hpux10.20* | hpux11*)
7984   lt_cv_file_magic_cmd=/usr/bin/file
7985   case $host_cpu in
7986   ia64*)
7987     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
7988     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7989     ;;
7990   hppa*64*)
7991     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]'
7992     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7993     ;;
7994   *)
7995     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
7996     lt_cv_file_magic_test_file=/usr/lib/libc.sl
7997     ;;
7998   esac
7999   ;;
8000
8001 interix[3-9]*)
8002   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8003   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
8004   ;;
8005
8006 irix5* | irix6* | nonstopux*)
8007   case $LD in
8008   *-32|*"-32 ") libmagic=32-bit;;
8009   *-n32|*"-n32 ") libmagic=N32;;
8010   *-64|*"-64 ") libmagic=64-bit;;
8011   *) libmagic=never-match;;
8012   esac
8013   lt_cv_deplibs_check_method=pass_all
8014   ;;
8015
8016 # This must be glibc/ELF.
8017 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8018   lt_cv_deplibs_check_method=pass_all
8019   ;;
8020
8021 netbsd*)
8022   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8023     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8024   else
8025     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
8026   fi
8027   ;;
8028
8029 newos6*)
8030   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
8031   lt_cv_file_magic_cmd=/usr/bin/file
8032   lt_cv_file_magic_test_file=/usr/lib/libnls.so
8033   ;;
8034
8035 *nto* | *qnx*)
8036   lt_cv_deplibs_check_method=pass_all
8037   ;;
8038
8039 openbsd* | bitrig*)
8040   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
8041     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
8042   else
8043     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8044   fi
8045   ;;
8046
8047 osf3* | osf4* | osf5*)
8048   lt_cv_deplibs_check_method=pass_all
8049   ;;
8050
8051 rdos*)
8052   lt_cv_deplibs_check_method=pass_all
8053   ;;
8054
8055 solaris*)
8056   lt_cv_deplibs_check_method=pass_all
8057   ;;
8058
8059 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8060   lt_cv_deplibs_check_method=pass_all
8061   ;;
8062
8063 sysv4 | sysv4.3*)
8064   case $host_vendor in
8065   motorola)
8066     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]'
8067     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8068     ;;
8069   ncr)
8070     lt_cv_deplibs_check_method=pass_all
8071     ;;
8072   sequent)
8073     lt_cv_file_magic_cmd='/bin/file'
8074     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
8075     ;;
8076   sni)
8077     lt_cv_file_magic_cmd='/bin/file'
8078     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
8079     lt_cv_file_magic_test_file=/lib/libc.so
8080     ;;
8081   siemens)
8082     lt_cv_deplibs_check_method=pass_all
8083     ;;
8084   pc)
8085     lt_cv_deplibs_check_method=pass_all
8086     ;;
8087   esac
8088   ;;
8089
8090 tpf*)
8091   lt_cv_deplibs_check_method=pass_all
8092   ;;
8093 os2*)
8094   lt_cv_deplibs_check_method=pass_all
8095   ;;
8096 esac
8097
8098 fi
8099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
8100 $as_echo "$lt_cv_deplibs_check_method" >&6; }
8101
8102 file_magic_glob=
8103 want_nocaseglob=no
8104 if test "$build" = "$host"; then
8105   case $host_os in
8106   mingw* | pw32*)
8107     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
8108       want_nocaseglob=yes
8109     else
8110       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
8111     fi
8112     ;;
8113   esac
8114 fi
8115
8116 file_magic_cmd=$lt_cv_file_magic_cmd
8117 deplibs_check_method=$lt_cv_deplibs_check_method
8118 test -z "$deplibs_check_method" && deplibs_check_method=unknown
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141 if test -n "$ac_tool_prefix"; then
8142   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8143 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8145 $as_echo_n "checking for $ac_word... " >&6; }
8146 if ${ac_cv_prog_DLLTOOL+:} false; then :
8147   $as_echo_n "(cached) " >&6
8148 else
8149   if test -n "$DLLTOOL"; then
8150   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8151 else
8152 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8153 for as_dir in $PATH
8154 do
8155   IFS=$as_save_IFS
8156   test -z "$as_dir" && as_dir=.
8157     for ac_exec_ext in '' $ac_executable_extensions; do
8158   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8159     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8160     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8161     break 2
8162   fi
8163 done
8164   done
8165 IFS=$as_save_IFS
8166
8167 fi
8168 fi
8169 DLLTOOL=$ac_cv_prog_DLLTOOL
8170 if test -n "$DLLTOOL"; then
8171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8172 $as_echo "$DLLTOOL" >&6; }
8173 else
8174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8175 $as_echo "no" >&6; }
8176 fi
8177
8178
8179 fi
8180 if test -z "$ac_cv_prog_DLLTOOL"; then
8181   ac_ct_DLLTOOL=$DLLTOOL
8182   # Extract the first word of "dlltool", so it can be a program name with args.
8183 set dummy dlltool; ac_word=$2
8184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8185 $as_echo_n "checking for $ac_word... " >&6; }
8186 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8187   $as_echo_n "(cached) " >&6
8188 else
8189   if test -n "$ac_ct_DLLTOOL"; then
8190   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8191 else
8192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8193 for as_dir in $PATH
8194 do
8195   IFS=$as_save_IFS
8196   test -z "$as_dir" && as_dir=.
8197     for ac_exec_ext in '' $ac_executable_extensions; do
8198   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8199     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8200     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8201     break 2
8202   fi
8203 done
8204   done
8205 IFS=$as_save_IFS
8206
8207 fi
8208 fi
8209 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8210 if test -n "$ac_ct_DLLTOOL"; then
8211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8212 $as_echo "$ac_ct_DLLTOOL" >&6; }
8213 else
8214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8215 $as_echo "no" >&6; }
8216 fi
8217
8218   if test "x$ac_ct_DLLTOOL" = x; then
8219     DLLTOOL="false"
8220   else
8221     case $cross_compiling:$ac_tool_warned in
8222 yes:)
8223 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8224 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8225 ac_tool_warned=yes ;;
8226 esac
8227     DLLTOOL=$ac_ct_DLLTOOL
8228   fi
8229 else
8230   DLLTOOL="$ac_cv_prog_DLLTOOL"
8231 fi
8232
8233 test -z "$DLLTOOL" && DLLTOOL=dlltool
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8245 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8246 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8247   $as_echo_n "(cached) " >&6
8248 else
8249   lt_cv_sharedlib_from_linklib_cmd='unknown'
8250
8251 case $host_os in
8252 cygwin* | mingw* | pw32* | cegcc*)
8253   # two different shell functions defined in ltmain.sh;
8254   # decide which one to use based on capabilities of $DLLTOOL
8255   case `$DLLTOOL --help 2>&1` in
8256   *--identify-strict*)
8257     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8258     ;;
8259   *)
8260     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8261     ;;
8262   esac
8263   ;;
8264 *)
8265   # fallback: assume linklib IS sharedlib
8266   lt_cv_sharedlib_from_linklib_cmd=$ECHO
8267   ;;
8268 esac
8269
8270 fi
8271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8272 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8273 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8274 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8275
8276
8277
8278
8279
8280
8281
8282 if test -n "$ac_tool_prefix"; then
8283   for ac_prog in ar
8284   do
8285     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8286 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8288 $as_echo_n "checking for $ac_word... " >&6; }
8289 if ${ac_cv_prog_AR+:} false; then :
8290   $as_echo_n "(cached) " >&6
8291 else
8292   if test -n "$AR"; then
8293   ac_cv_prog_AR="$AR" # Let the user override the test.
8294 else
8295 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8296 for as_dir in $PATH
8297 do
8298   IFS=$as_save_IFS
8299   test -z "$as_dir" && as_dir=.
8300     for ac_exec_ext in '' $ac_executable_extensions; do
8301   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8302     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8303     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8304     break 2
8305   fi
8306 done
8307   done
8308 IFS=$as_save_IFS
8309
8310 fi
8311 fi
8312 AR=$ac_cv_prog_AR
8313 if test -n "$AR"; then
8314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8315 $as_echo "$AR" >&6; }
8316 else
8317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8318 $as_echo "no" >&6; }
8319 fi
8320
8321
8322     test -n "$AR" && break
8323   done
8324 fi
8325 if test -z "$AR"; then
8326   ac_ct_AR=$AR
8327   for ac_prog in ar
8328 do
8329   # Extract the first word of "$ac_prog", so it can be a program name with args.
8330 set dummy $ac_prog; ac_word=$2
8331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8332 $as_echo_n "checking for $ac_word... " >&6; }
8333 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8334   $as_echo_n "(cached) " >&6
8335 else
8336   if test -n "$ac_ct_AR"; then
8337   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8338 else
8339 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8340 for as_dir in $PATH
8341 do
8342   IFS=$as_save_IFS
8343   test -z "$as_dir" && as_dir=.
8344     for ac_exec_ext in '' $ac_executable_extensions; do
8345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8346     ac_cv_prog_ac_ct_AR="$ac_prog"
8347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8348     break 2
8349   fi
8350 done
8351   done
8352 IFS=$as_save_IFS
8353
8354 fi
8355 fi
8356 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8357 if test -n "$ac_ct_AR"; then
8358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8359 $as_echo "$ac_ct_AR" >&6; }
8360 else
8361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8362 $as_echo "no" >&6; }
8363 fi
8364
8365
8366   test -n "$ac_ct_AR" && break
8367 done
8368
8369   if test "x$ac_ct_AR" = x; then
8370     AR="false"
8371   else
8372     case $cross_compiling:$ac_tool_warned in
8373 yes:)
8374 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8375 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8376 ac_tool_warned=yes ;;
8377 esac
8378     AR=$ac_ct_AR
8379   fi
8380 fi
8381
8382 : ${AR=ar}
8383 : ${AR_FLAGS=cru}
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8396 $as_echo_n "checking for archiver @FILE support... " >&6; }
8397 if ${lt_cv_ar_at_file+:} false; then :
8398   $as_echo_n "(cached) " >&6
8399 else
8400   lt_cv_ar_at_file=no
8401    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8402 /* end confdefs.h.  */
8403
8404 int
8405 main ()
8406 {
8407
8408   ;
8409   return 0;
8410 }
8411 _ACEOF
8412 if ac_fn_c_try_compile "$LINENO"; then :
8413   echo conftest.$ac_objext > conftest.lst
8414       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8415       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8416   (eval $lt_ar_try) 2>&5
8417   ac_status=$?
8418   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8419   test $ac_status = 0; }
8420       if test 0 -eq "$ac_status"; then
8421         # Ensure the archiver fails upon bogus file names.
8422         rm -f conftest.$ac_objext libconftest.a
8423         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8424   (eval $lt_ar_try) 2>&5
8425   ac_status=$?
8426   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8427   test $ac_status = 0; }
8428         if test 0 -ne "$ac_status"; then
8429           lt_cv_ar_at_file=@
8430         fi
8431       fi
8432       rm -f conftest.* libconftest.a
8433
8434 fi
8435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8436
8437 fi
8438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8439 $as_echo "$lt_cv_ar_at_file" >&6; }
8440
8441 if test no = "$lt_cv_ar_at_file"; then
8442   archiver_list_spec=
8443 else
8444   archiver_list_spec=$lt_cv_ar_at_file
8445 fi
8446
8447
8448
8449
8450
8451
8452
8453 if test -n "$ac_tool_prefix"; then
8454   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8455 set dummy ${ac_tool_prefix}strip; ac_word=$2
8456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8457 $as_echo_n "checking for $ac_word... " >&6; }
8458 if ${ac_cv_prog_STRIP+:} false; then :
8459   $as_echo_n "(cached) " >&6
8460 else
8461   if test -n "$STRIP"; then
8462   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8463 else
8464 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8465 for as_dir in $PATH
8466 do
8467   IFS=$as_save_IFS
8468   test -z "$as_dir" && as_dir=.
8469     for ac_exec_ext in '' $ac_executable_extensions; do
8470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8471     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8473     break 2
8474   fi
8475 done
8476   done
8477 IFS=$as_save_IFS
8478
8479 fi
8480 fi
8481 STRIP=$ac_cv_prog_STRIP
8482 if test -n "$STRIP"; then
8483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8484 $as_echo "$STRIP" >&6; }
8485 else
8486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8487 $as_echo "no" >&6; }
8488 fi
8489
8490
8491 fi
8492 if test -z "$ac_cv_prog_STRIP"; then
8493   ac_ct_STRIP=$STRIP
8494   # Extract the first word of "strip", so it can be a program name with args.
8495 set dummy strip; ac_word=$2
8496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8497 $as_echo_n "checking for $ac_word... " >&6; }
8498 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8499   $as_echo_n "(cached) " >&6
8500 else
8501   if test -n "$ac_ct_STRIP"; then
8502   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8503 else
8504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8505 for as_dir in $PATH
8506 do
8507   IFS=$as_save_IFS
8508   test -z "$as_dir" && as_dir=.
8509     for ac_exec_ext in '' $ac_executable_extensions; do
8510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8511     ac_cv_prog_ac_ct_STRIP="strip"
8512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8513     break 2
8514   fi
8515 done
8516   done
8517 IFS=$as_save_IFS
8518
8519 fi
8520 fi
8521 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8522 if test -n "$ac_ct_STRIP"; then
8523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8524 $as_echo "$ac_ct_STRIP" >&6; }
8525 else
8526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8527 $as_echo "no" >&6; }
8528 fi
8529
8530   if test "x$ac_ct_STRIP" = x; then
8531     STRIP=":"
8532   else
8533     case $cross_compiling:$ac_tool_warned in
8534 yes:)
8535 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8536 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8537 ac_tool_warned=yes ;;
8538 esac
8539     STRIP=$ac_ct_STRIP
8540   fi
8541 else
8542   STRIP="$ac_cv_prog_STRIP"
8543 fi
8544
8545 test -z "$STRIP" && STRIP=:
8546
8547
8548
8549
8550
8551
8552 if test -n "$ac_tool_prefix"; then
8553   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8554 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8556 $as_echo_n "checking for $ac_word... " >&6; }
8557 if ${ac_cv_prog_RANLIB+:} false; then :
8558   $as_echo_n "(cached) " >&6
8559 else
8560   if test -n "$RANLIB"; then
8561   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8562 else
8563 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8564 for as_dir in $PATH
8565 do
8566   IFS=$as_save_IFS
8567   test -z "$as_dir" && as_dir=.
8568     for ac_exec_ext in '' $ac_executable_extensions; do
8569   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8570     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8571     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8572     break 2
8573   fi
8574 done
8575   done
8576 IFS=$as_save_IFS
8577
8578 fi
8579 fi
8580 RANLIB=$ac_cv_prog_RANLIB
8581 if test -n "$RANLIB"; then
8582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8583 $as_echo "$RANLIB" >&6; }
8584 else
8585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8586 $as_echo "no" >&6; }
8587 fi
8588
8589
8590 fi
8591 if test -z "$ac_cv_prog_RANLIB"; then
8592   ac_ct_RANLIB=$RANLIB
8593   # Extract the first word of "ranlib", so it can be a program name with args.
8594 set dummy ranlib; ac_word=$2
8595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8596 $as_echo_n "checking for $ac_word... " >&6; }
8597 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8598   $as_echo_n "(cached) " >&6
8599 else
8600   if test -n "$ac_ct_RANLIB"; then
8601   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8602 else
8603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8604 for as_dir in $PATH
8605 do
8606   IFS=$as_save_IFS
8607   test -z "$as_dir" && as_dir=.
8608     for ac_exec_ext in '' $ac_executable_extensions; do
8609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8610     ac_cv_prog_ac_ct_RANLIB="ranlib"
8611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8612     break 2
8613   fi
8614 done
8615   done
8616 IFS=$as_save_IFS
8617
8618 fi
8619 fi
8620 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8621 if test -n "$ac_ct_RANLIB"; then
8622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8623 $as_echo "$ac_ct_RANLIB" >&6; }
8624 else
8625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8626 $as_echo "no" >&6; }
8627 fi
8628
8629   if test "x$ac_ct_RANLIB" = x; then
8630     RANLIB=":"
8631   else
8632     case $cross_compiling:$ac_tool_warned in
8633 yes:)
8634 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8635 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8636 ac_tool_warned=yes ;;
8637 esac
8638     RANLIB=$ac_ct_RANLIB
8639   fi
8640 else
8641   RANLIB="$ac_cv_prog_RANLIB"
8642 fi
8643
8644 test -z "$RANLIB" && RANLIB=:
8645
8646
8647
8648
8649
8650
8651 # Determine commands to create old-style static archives.
8652 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8653 old_postinstall_cmds='chmod 644 $oldlib'
8654 old_postuninstall_cmds=
8655
8656 if test -n "$RANLIB"; then
8657   case $host_os in
8658   bitrig* | openbsd*)
8659     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8660     ;;
8661   *)
8662     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8663     ;;
8664   esac
8665   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8666 fi
8667
8668 case $host_os in
8669   darwin*)
8670     lock_old_archive_extraction=yes ;;
8671   *)
8672     lock_old_archive_extraction=no ;;
8673 esac
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695 for ac_prog in gawk mawk nawk awk
8696 do
8697   # Extract the first word of "$ac_prog", so it can be a program name with args.
8698 set dummy $ac_prog; ac_word=$2
8699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8700 $as_echo_n "checking for $ac_word... " >&6; }
8701 if ${ac_cv_prog_AWK+:} false; then :
8702   $as_echo_n "(cached) " >&6
8703 else
8704   if test -n "$AWK"; then
8705   ac_cv_prog_AWK="$AWK" # Let the user override the test.
8706 else
8707 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8708 for as_dir in $PATH
8709 do
8710   IFS=$as_save_IFS
8711   test -z "$as_dir" && as_dir=.
8712     for ac_exec_ext in '' $ac_executable_extensions; do
8713   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8714     ac_cv_prog_AWK="$ac_prog"
8715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8716     break 2
8717   fi
8718 done
8719   done
8720 IFS=$as_save_IFS
8721
8722 fi
8723 fi
8724 AWK=$ac_cv_prog_AWK
8725 if test -n "$AWK"; then
8726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8727 $as_echo "$AWK" >&6; }
8728 else
8729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8730 $as_echo "no" >&6; }
8731 fi
8732
8733
8734   test -n "$AWK" && break
8735 done
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755 # If no C compiler was specified, use CC.
8756 LTCC=${LTCC-"$CC"}
8757
8758 # If no C compiler flags were specified, use CFLAGS.
8759 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8760
8761 # Allow CC to be a program name with arguments.
8762 compiler=$CC
8763
8764
8765 # Check for command to grab the raw symbol name followed by C symbol from nm.
8766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8767 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8768 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8769   $as_echo_n "(cached) " >&6
8770 else
8771
8772 # These are sane defaults that work on at least a few old systems.
8773 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8774
8775 # Character class describing NM global symbol codes.
8776 symcode='[BCDEGRST]'
8777
8778 # Regexp to match symbols that can be accessed directly from C.
8779 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8780
8781 # Define system-specific variables.
8782 case $host_os in
8783 aix*)
8784   symcode='[BCDT]'
8785   ;;
8786 cygwin* | mingw* | pw32* | cegcc*)
8787   symcode='[ABCDGISTW]'
8788   ;;
8789 hpux*)
8790   if test ia64 = "$host_cpu"; then
8791     symcode='[ABCDEGRST]'
8792   fi
8793   ;;
8794 irix* | nonstopux*)
8795   symcode='[BCDEGRST]'
8796   ;;
8797 osf*)
8798   symcode='[BCDEGQRST]'
8799   ;;
8800 solaris*)
8801   symcode='[BDRT]'
8802   ;;
8803 sco3.2v5*)
8804   symcode='[DT]'
8805   ;;
8806 sysv4.2uw2*)
8807   symcode='[DT]'
8808   ;;
8809 sysv5* | sco5v6* | unixware* | OpenUNIX*)
8810   symcode='[ABDT]'
8811   ;;
8812 sysv4)
8813   symcode='[DFNSTU]'
8814   ;;
8815 esac
8816
8817 # If we're using GNU nm, then use its standard symbol codes.
8818 case `$NM -V 2>&1` in
8819 *GNU* | *'with BFD'*)
8820   symcode='[ABCDGIRSTW]' ;;
8821 esac
8822
8823 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8824   # Gets list of data symbols to import.
8825   lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8826   # Adjust the below global symbol transforms to fixup imported variables.
8827   lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8828   lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
8829   lt_c_name_lib_hook="\
8830   -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
8831   -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
8832 else
8833   # Disable hooks by default.
8834   lt_cv_sys_global_symbol_to_import=
8835   lt_cdecl_hook=
8836   lt_c_name_hook=
8837   lt_c_name_lib_hook=
8838 fi
8839
8840 # Transform an extracted symbol line into a proper C declaration.
8841 # Some systems (esp. on ia64) link data and code symbols differently,
8842 # so use this general approach.
8843 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8844 $lt_cdecl_hook\
8845 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8846 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8847
8848 # Transform an extracted symbol line into symbol name and symbol address
8849 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8850 $lt_c_name_hook\
8851 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8852 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8853
8854 # Transform an extracted symbol line into symbol name with lib prefix and
8855 # symbol address.
8856 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8857 $lt_c_name_lib_hook\
8858 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8859 " -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8860 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8861
8862 # Handle CRLF in mingw tool chain
8863 opt_cr=
8864 case $build_os in
8865 mingw*)
8866   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8867   ;;
8868 esac
8869
8870 # Try without a prefix underscore, then with it.
8871 for ac_symprfx in "" "_"; do
8872
8873   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8874   symxfrm="\\1 $ac_symprfx\\2 \\2"
8875
8876   # Write the raw and C identifiers.
8877   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8878     # Fake it for dumpbin and say T for any non-static function,
8879     # D for any global variable and I for any imported variable.
8880     # Also find C++ and __fastcall symbols from MSVC++,
8881     # which start with @ or ?.
8882     lt_cv_sys_global_symbol_pipe="$AWK '"\
8883 "     {last_section=section; section=\$ 3};"\
8884 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8885 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8886 "     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8887 "     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8888 "     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8889 "     \$ 0!~/External *\|/{next};"\
8890 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8891 "     {if(hide[section]) next};"\
8892 "     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8893 "     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8894 "     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8895 "     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8896 "     ' prfx=^$ac_symprfx"
8897   else
8898     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8899   fi
8900   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8901
8902   # Check to see that the pipe works correctly.
8903   pipe_works=no
8904
8905   rm -f conftest*
8906   cat > conftest.$ac_ext <<_LT_EOF
8907 #ifdef __cplusplus
8908 extern "C" {
8909 #endif
8910 char nm_test_var;
8911 void nm_test_func(void);
8912 void nm_test_func(void){}
8913 #ifdef __cplusplus
8914 }
8915 #endif
8916 int main(){nm_test_var='a';nm_test_func();return(0);}
8917 _LT_EOF
8918
8919   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8920   (eval $ac_compile) 2>&5
8921   ac_status=$?
8922   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8923   test $ac_status = 0; }; then
8924     # Now try to grab the symbols.
8925     nlist=conftest.nm
8926     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
8927   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
8928   ac_status=$?
8929   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8930   test $ac_status = 0; } && test -s "$nlist"; then
8931       # Try sorting and uniquifying the output.
8932       if sort "$nlist" | uniq > "$nlist"T; then
8933         mv -f "$nlist"T "$nlist"
8934       else
8935         rm -f "$nlist"T
8936       fi
8937
8938       # Make sure that we snagged all the symbols we need.
8939       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
8940         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
8941           cat <<_LT_EOF > conftest.$ac_ext
8942 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
8943 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
8944 /* DATA imports from DLLs on WIN32 can't be const, because runtime
8945    relocations are performed -- see ld's documentation on pseudo-relocs.  */
8946 # define LT_DLSYM_CONST
8947 #elif defined __osf__
8948 /* This system does not cope well with relocations in const data.  */
8949 # define LT_DLSYM_CONST
8950 #else
8951 # define LT_DLSYM_CONST const
8952 #endif
8953
8954 #ifdef __cplusplus
8955 extern "C" {
8956 #endif
8957
8958 _LT_EOF
8959           # Now generate the symbol file.
8960           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
8961
8962           cat <<_LT_EOF >> conftest.$ac_ext
8963
8964 /* The mapping between symbol names and symbols.  */
8965 LT_DLSYM_CONST struct {
8966   const char *name;
8967   void       *address;
8968 }
8969 lt__PROGRAM__LTX_preloaded_symbols[] =
8970 {
8971   { "@PROGRAM@", (void *) 0 },
8972 _LT_EOF
8973           $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
8974           cat <<\_LT_EOF >> conftest.$ac_ext
8975   {0, (void *) 0}
8976 };
8977
8978 /* This works around a problem in FreeBSD linker */
8979 #ifdef FREEBSD_WORKAROUND
8980 static const void *lt_preloaded_setup() {
8981   return lt__PROGRAM__LTX_preloaded_symbols;
8982 }
8983 #endif
8984
8985 #ifdef __cplusplus
8986 }
8987 #endif
8988 _LT_EOF
8989           # Now try linking the two files.
8990           mv conftest.$ac_objext conftstm.$ac_objext
8991           lt_globsym_save_LIBS=$LIBS
8992           lt_globsym_save_CFLAGS=$CFLAGS
8993           LIBS=conftstm.$ac_objext
8994           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
8995           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8996   (eval $ac_link) 2>&5
8997   ac_status=$?
8998   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8999   test $ac_status = 0; } && test -s conftest$ac_exeext; then
9000             pipe_works=yes
9001           fi
9002           LIBS=$lt_globsym_save_LIBS
9003           CFLAGS=$lt_globsym_save_CFLAGS
9004         else
9005           echo "cannot find nm_test_func in $nlist" >&5
9006         fi
9007       else
9008         echo "cannot find nm_test_var in $nlist" >&5
9009       fi
9010     else
9011       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
9012     fi
9013   else
9014     echo "$progname: failed program was:" >&5
9015     cat conftest.$ac_ext >&5
9016   fi
9017   rm -rf conftest* conftst*
9018
9019   # Do not use the global_symbol_pipe unless it works.
9020   if test yes = "$pipe_works"; then
9021     break
9022   else
9023     lt_cv_sys_global_symbol_pipe=
9024   fi
9025 done
9026
9027 fi
9028
9029 if test -z "$lt_cv_sys_global_symbol_pipe"; then
9030   lt_cv_sys_global_symbol_to_cdecl=
9031 fi
9032 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
9034 $as_echo "failed" >&6; }
9035 else
9036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9037 $as_echo "ok" >&6; }
9038 fi
9039
9040 # Response file support.
9041 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9042   nm_file_list_spec='@'
9043 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
9044   nm_file_list_spec='@'
9045 fi
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
9084 $as_echo_n "checking for sysroot... " >&6; }
9085
9086 # Check whether --with-sysroot was given.
9087 if test "${with_sysroot+set}" = set; then :
9088   withval=$with_sysroot;
9089 else
9090   with_sysroot=no
9091 fi
9092
9093
9094 lt_sysroot=
9095 case $with_sysroot in #(
9096  yes)
9097    if test yes = "$GCC"; then
9098      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
9099    fi
9100    ;; #(
9101  /*)
9102    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
9103    ;; #(
9104  no|'')
9105    ;; #(
9106  *)
9107    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
9108 $as_echo "$with_sysroot" >&6; }
9109    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
9110    ;;
9111 esac
9112
9113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
9114 $as_echo "${lt_sysroot:-no}" >&6; }
9115
9116
9117
9118
9119
9120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
9121 $as_echo_n "checking for a working dd... " >&6; }
9122 if ${ac_cv_path_lt_DD+:} false; then :
9123   $as_echo_n "(cached) " >&6
9124 else
9125   printf 0123456789abcdef0123456789abcdef >conftest.i
9126 cat conftest.i conftest.i >conftest2.i
9127 : ${lt_DD:=$DD}
9128 if test -z "$lt_DD"; then
9129   ac_path_lt_DD_found=false
9130   # Loop through the user's path and test for each of PROGNAME-LIST
9131   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9132 for as_dir in $PATH
9133 do
9134   IFS=$as_save_IFS
9135   test -z "$as_dir" && as_dir=.
9136     for ac_prog in dd; do
9137     for ac_exec_ext in '' $ac_executable_extensions; do
9138       ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
9139       as_fn_executable_p "$ac_path_lt_DD" || continue
9140 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9141   cmp -s conftest.i conftest.out \
9142   && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
9143 fi
9144       $ac_path_lt_DD_found && break 3
9145     done
9146   done
9147   done
9148 IFS=$as_save_IFS
9149   if test -z "$ac_cv_path_lt_DD"; then
9150     :
9151   fi
9152 else
9153   ac_cv_path_lt_DD=$lt_DD
9154 fi
9155
9156 rm -f conftest.i conftest2.i conftest.out
9157 fi
9158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
9159 $as_echo "$ac_cv_path_lt_DD" >&6; }
9160
9161
9162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
9163 $as_echo_n "checking how to truncate binary pipes... " >&6; }
9164 if ${lt_cv_truncate_bin+:} false; then :
9165   $as_echo_n "(cached) " >&6
9166 else
9167   printf 0123456789abcdef0123456789abcdef >conftest.i
9168 cat conftest.i conftest.i >conftest2.i
9169 lt_cv_truncate_bin=
9170 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9171   cmp -s conftest.i conftest.out \
9172   && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
9173 fi
9174 rm -f conftest.i conftest2.i conftest.out
9175 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
9176 fi
9177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
9178 $as_echo "$lt_cv_truncate_bin" >&6; }
9179
9180
9181
9182
9183
9184
9185
9186 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
9187 func_cc_basename ()
9188 {
9189     for cc_temp in $*""; do
9190       case $cc_temp in
9191         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9192         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9193         \-*) ;;
9194         *) break;;
9195       esac
9196     done
9197     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9198 }
9199
9200 # Check whether --enable-libtool-lock was given.
9201 if test "${enable_libtool_lock+set}" = set; then :
9202   enableval=$enable_libtool_lock;
9203 fi
9204
9205 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
9206
9207 # Some flags need to be propagated to the compiler or linker for good
9208 # libtool support.
9209 case $host in
9210 ia64-*-hpux*)
9211   # Find out what ABI is being produced by ac_compile, and set mode
9212   # options accordingly.
9213   echo 'int i;' > conftest.$ac_ext
9214   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9215   (eval $ac_compile) 2>&5
9216   ac_status=$?
9217   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9218   test $ac_status = 0; }; then
9219     case `/usr/bin/file conftest.$ac_objext` in
9220       *ELF-32*)
9221         HPUX_IA64_MODE=32
9222         ;;
9223       *ELF-64*)
9224         HPUX_IA64_MODE=64
9225         ;;
9226     esac
9227   fi
9228   rm -rf conftest*
9229   ;;
9230 *-*-irix6*)
9231   # Find out what ABI is being produced by ac_compile, and set linker
9232   # options accordingly.
9233   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9234   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9235   (eval $ac_compile) 2>&5
9236   ac_status=$?
9237   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9238   test $ac_status = 0; }; then
9239     if test yes = "$lt_cv_prog_gnu_ld"; then
9240       case `/usr/bin/file conftest.$ac_objext` in
9241         *32-bit*)
9242           LD="${LD-ld} -melf32bsmip"
9243           ;;
9244         *N32*)
9245           LD="${LD-ld} -melf32bmipn32"
9246           ;;
9247         *64-bit*)
9248           LD="${LD-ld} -melf64bmip"
9249         ;;
9250       esac
9251     else
9252       case `/usr/bin/file conftest.$ac_objext` in
9253         *32-bit*)
9254           LD="${LD-ld} -32"
9255           ;;
9256         *N32*)
9257           LD="${LD-ld} -n32"
9258           ;;
9259         *64-bit*)
9260           LD="${LD-ld} -64"
9261           ;;
9262       esac
9263     fi
9264   fi
9265   rm -rf conftest*
9266   ;;
9267
9268 mips64*-*linux*)
9269   # Find out what ABI is being produced by ac_compile, and set linker
9270   # options accordingly.
9271   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9272   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9273   (eval $ac_compile) 2>&5
9274   ac_status=$?
9275   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9276   test $ac_status = 0; }; then
9277     emul=elf
9278     case `/usr/bin/file conftest.$ac_objext` in
9279       *32-bit*)
9280         emul="${emul}32"
9281         ;;
9282       *64-bit*)
9283         emul="${emul}64"
9284         ;;
9285     esac
9286     case `/usr/bin/file conftest.$ac_objext` in
9287       *MSB*)
9288         emul="${emul}btsmip"
9289         ;;
9290       *LSB*)
9291         emul="${emul}ltsmip"
9292         ;;
9293     esac
9294     case `/usr/bin/file conftest.$ac_objext` in
9295       *N32*)
9296         emul="${emul}n32"
9297         ;;
9298     esac
9299     LD="${LD-ld} -m $emul"
9300   fi
9301   rm -rf conftest*
9302   ;;
9303
9304 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9305 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9306   # Find out what ABI is being produced by ac_compile, and set linker
9307   # options accordingly.  Note that the listed cases only cover the
9308   # situations where additional linker options are needed (such as when
9309   # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9310   # vice versa); the common cases where no linker options are needed do
9311   # not appear in the list.
9312   echo 'int i;' > conftest.$ac_ext
9313   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9314   (eval $ac_compile) 2>&5
9315   ac_status=$?
9316   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9317   test $ac_status = 0; }; then
9318     case `/usr/bin/file conftest.o` in
9319       *32-bit*)
9320         case $host in
9321           x86_64-*kfreebsd*-gnu)
9322             LD="${LD-ld} -m elf_i386_fbsd"
9323             ;;
9324           x86_64-*linux*)
9325             case `/usr/bin/file conftest.o` in
9326               *x86-64*)
9327                 LD="${LD-ld} -m elf32_x86_64"
9328                 ;;
9329               *)
9330                 LD="${LD-ld} -m elf_i386"
9331                 ;;
9332             esac
9333             ;;
9334           powerpc64le-*linux*)
9335             LD="${LD-ld} -m elf32lppclinux"
9336             ;;
9337           powerpc64-*linux*)
9338             LD="${LD-ld} -m elf32ppclinux"
9339             ;;
9340           s390x-*linux*)
9341             LD="${LD-ld} -m elf_s390"
9342             ;;
9343           sparc64-*linux*)
9344             LD="${LD-ld} -m elf32_sparc"
9345             ;;
9346         esac
9347         ;;
9348       *64-bit*)
9349         case $host in
9350           x86_64-*kfreebsd*-gnu)
9351             LD="${LD-ld} -m elf_x86_64_fbsd"
9352             ;;
9353           x86_64-*linux*)
9354             LD="${LD-ld} -m elf_x86_64"
9355             ;;
9356           powerpcle-*linux*)
9357             LD="${LD-ld} -m elf64lppc"
9358             ;;
9359           powerpc-*linux*)
9360             LD="${LD-ld} -m elf64ppc"
9361             ;;
9362           s390*-*linux*|s390*-*tpf*)
9363             LD="${LD-ld} -m elf64_s390"
9364             ;;
9365           sparc*-*linux*)
9366             LD="${LD-ld} -m elf64_sparc"
9367             ;;
9368         esac
9369         ;;
9370     esac
9371   fi
9372   rm -rf conftest*
9373   ;;
9374
9375 *-*-sco3.2v5*)
9376   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9377   SAVE_CFLAGS=$CFLAGS
9378   CFLAGS="$CFLAGS -belf"
9379   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9380 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
9381 if ${lt_cv_cc_needs_belf+:} false; then :
9382   $as_echo_n "(cached) " >&6
9383 else
9384   ac_ext=c
9385 ac_cpp='$CPP $CPPFLAGS'
9386 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9387 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9388 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9389
9390      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9391 /* end confdefs.h.  */
9392
9393 int
9394 main ()
9395 {
9396
9397   ;
9398   return 0;
9399 }
9400 _ACEOF
9401 if ac_fn_c_try_link "$LINENO"; then :
9402   lt_cv_cc_needs_belf=yes
9403 else
9404   lt_cv_cc_needs_belf=no
9405 fi
9406 rm -f core conftest.err conftest.$ac_objext \
9407     conftest$ac_exeext conftest.$ac_ext
9408      ac_ext=c
9409 ac_cpp='$CPP $CPPFLAGS'
9410 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9411 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9412 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9413
9414 fi
9415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9416 $as_echo "$lt_cv_cc_needs_belf" >&6; }
9417   if test yes != "$lt_cv_cc_needs_belf"; then
9418     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9419     CFLAGS=$SAVE_CFLAGS
9420   fi
9421   ;;
9422 *-*solaris*)
9423   # Find out what ABI is being produced by ac_compile, and set linker
9424   # options accordingly.
9425   echo 'int i;' > conftest.$ac_ext
9426   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9427   (eval $ac_compile) 2>&5
9428   ac_status=$?
9429   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9430   test $ac_status = 0; }; then
9431     case `/usr/bin/file conftest.o` in
9432     *64-bit*)
9433       case $lt_cv_prog_gnu_ld in
9434       yes*)
9435         case $host in
9436         i?86-*-solaris*|x86_64-*-solaris*)
9437           LD="${LD-ld} -m elf_x86_64"
9438           ;;
9439         sparc*-*-solaris*)
9440           LD="${LD-ld} -m elf64_sparc"
9441           ;;
9442         esac
9443         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9444         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9445           LD=${LD-ld}_sol2
9446         fi
9447         ;;
9448       *)
9449         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9450           LD="${LD-ld} -64"
9451         fi
9452         ;;
9453       esac
9454       ;;
9455     esac
9456   fi
9457   rm -rf conftest*
9458   ;;
9459 esac
9460
9461 need_locks=$enable_libtool_lock
9462
9463 if test -n "$ac_tool_prefix"; then
9464   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9465 set dummy ${ac_tool_prefix}mt; ac_word=$2
9466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9467 $as_echo_n "checking for $ac_word... " >&6; }
9468 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9469   $as_echo_n "(cached) " >&6
9470 else
9471   if test -n "$MANIFEST_TOOL"; then
9472   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9473 else
9474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9475 for as_dir in $PATH
9476 do
9477   IFS=$as_save_IFS
9478   test -z "$as_dir" && as_dir=.
9479     for ac_exec_ext in '' $ac_executable_extensions; do
9480   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9481     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9483     break 2
9484   fi
9485 done
9486   done
9487 IFS=$as_save_IFS
9488
9489 fi
9490 fi
9491 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9492 if test -n "$MANIFEST_TOOL"; then
9493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9494 $as_echo "$MANIFEST_TOOL" >&6; }
9495 else
9496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9497 $as_echo "no" >&6; }
9498 fi
9499
9500
9501 fi
9502 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9503   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9504   # Extract the first word of "mt", so it can be a program name with args.
9505 set dummy mt; ac_word=$2
9506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9507 $as_echo_n "checking for $ac_word... " >&6; }
9508 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9509   $as_echo_n "(cached) " >&6
9510 else
9511   if test -n "$ac_ct_MANIFEST_TOOL"; then
9512   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9513 else
9514 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9515 for as_dir in $PATH
9516 do
9517   IFS=$as_save_IFS
9518   test -z "$as_dir" && as_dir=.
9519     for ac_exec_ext in '' $ac_executable_extensions; do
9520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9521     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9523     break 2
9524   fi
9525 done
9526   done
9527 IFS=$as_save_IFS
9528
9529 fi
9530 fi
9531 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9532 if test -n "$ac_ct_MANIFEST_TOOL"; then
9533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9534 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9535 else
9536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9537 $as_echo "no" >&6; }
9538 fi
9539
9540   if test "x$ac_ct_MANIFEST_TOOL" = x; then
9541     MANIFEST_TOOL=":"
9542   else
9543     case $cross_compiling:$ac_tool_warned in
9544 yes:)
9545 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9546 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9547 ac_tool_warned=yes ;;
9548 esac
9549     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9550   fi
9551 else
9552   MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9553 fi
9554
9555 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9557 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9558 if ${lt_cv_path_mainfest_tool+:} false; then :
9559   $as_echo_n "(cached) " >&6
9560 else
9561   lt_cv_path_mainfest_tool=no
9562   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9563   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9564   cat conftest.err >&5
9565   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9566     lt_cv_path_mainfest_tool=yes
9567   fi
9568   rm -f conftest*
9569 fi
9570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9571 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
9572 if test yes != "$lt_cv_path_mainfest_tool"; then
9573   MANIFEST_TOOL=:
9574 fi
9575
9576
9577
9578
9579
9580
9581   case $host_os in
9582     rhapsody* | darwin*)
9583     if test -n "$ac_tool_prefix"; then
9584   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9585 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9587 $as_echo_n "checking for $ac_word... " >&6; }
9588 if ${ac_cv_prog_DSYMUTIL+:} false; then :
9589   $as_echo_n "(cached) " >&6
9590 else
9591   if test -n "$DSYMUTIL"; then
9592   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9593 else
9594 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9595 for as_dir in $PATH
9596 do
9597   IFS=$as_save_IFS
9598   test -z "$as_dir" && as_dir=.
9599     for ac_exec_ext in '' $ac_executable_extensions; do
9600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9601     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9603     break 2
9604   fi
9605 done
9606   done
9607 IFS=$as_save_IFS
9608
9609 fi
9610 fi
9611 DSYMUTIL=$ac_cv_prog_DSYMUTIL
9612 if test -n "$DSYMUTIL"; then
9613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9614 $as_echo "$DSYMUTIL" >&6; }
9615 else
9616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9617 $as_echo "no" >&6; }
9618 fi
9619
9620
9621 fi
9622 if test -z "$ac_cv_prog_DSYMUTIL"; then
9623   ac_ct_DSYMUTIL=$DSYMUTIL
9624   # Extract the first word of "dsymutil", so it can be a program name with args.
9625 set dummy dsymutil; ac_word=$2
9626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9627 $as_echo_n "checking for $ac_word... " >&6; }
9628 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9629   $as_echo_n "(cached) " >&6
9630 else
9631   if test -n "$ac_ct_DSYMUTIL"; then
9632   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9633 else
9634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9635 for as_dir in $PATH
9636 do
9637   IFS=$as_save_IFS
9638   test -z "$as_dir" && as_dir=.
9639     for ac_exec_ext in '' $ac_executable_extensions; do
9640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9641     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9643     break 2
9644   fi
9645 done
9646   done
9647 IFS=$as_save_IFS
9648
9649 fi
9650 fi
9651 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9652 if test -n "$ac_ct_DSYMUTIL"; then
9653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9654 $as_echo "$ac_ct_DSYMUTIL" >&6; }
9655 else
9656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9657 $as_echo "no" >&6; }
9658 fi
9659
9660   if test "x$ac_ct_DSYMUTIL" = x; then
9661     DSYMUTIL=":"
9662   else
9663     case $cross_compiling:$ac_tool_warned in
9664 yes:)
9665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9666 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9667 ac_tool_warned=yes ;;
9668 esac
9669     DSYMUTIL=$ac_ct_DSYMUTIL
9670   fi
9671 else
9672   DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9673 fi
9674
9675     if test -n "$ac_tool_prefix"; then
9676   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9677 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9679 $as_echo_n "checking for $ac_word... " >&6; }
9680 if ${ac_cv_prog_NMEDIT+:} false; then :
9681   $as_echo_n "(cached) " >&6
9682 else
9683   if test -n "$NMEDIT"; then
9684   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9685 else
9686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9687 for as_dir in $PATH
9688 do
9689   IFS=$as_save_IFS
9690   test -z "$as_dir" && as_dir=.
9691     for ac_exec_ext in '' $ac_executable_extensions; do
9692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9693     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9695     break 2
9696   fi
9697 done
9698   done
9699 IFS=$as_save_IFS
9700
9701 fi
9702 fi
9703 NMEDIT=$ac_cv_prog_NMEDIT
9704 if test -n "$NMEDIT"; then
9705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9706 $as_echo "$NMEDIT" >&6; }
9707 else
9708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9709 $as_echo "no" >&6; }
9710 fi
9711
9712
9713 fi
9714 if test -z "$ac_cv_prog_NMEDIT"; then
9715   ac_ct_NMEDIT=$NMEDIT
9716   # Extract the first word of "nmedit", so it can be a program name with args.
9717 set dummy nmedit; ac_word=$2
9718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9719 $as_echo_n "checking for $ac_word... " >&6; }
9720 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9721   $as_echo_n "(cached) " >&6
9722 else
9723   if test -n "$ac_ct_NMEDIT"; then
9724   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9725 else
9726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9727 for as_dir in $PATH
9728 do
9729   IFS=$as_save_IFS
9730   test -z "$as_dir" && as_dir=.
9731     for ac_exec_ext in '' $ac_executable_extensions; do
9732   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9733     ac_cv_prog_ac_ct_NMEDIT="nmedit"
9734     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9735     break 2
9736   fi
9737 done
9738   done
9739 IFS=$as_save_IFS
9740
9741 fi
9742 fi
9743 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9744 if test -n "$ac_ct_NMEDIT"; then
9745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9746 $as_echo "$ac_ct_NMEDIT" >&6; }
9747 else
9748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9749 $as_echo "no" >&6; }
9750 fi
9751
9752   if test "x$ac_ct_NMEDIT" = x; then
9753     NMEDIT=":"
9754   else
9755     case $cross_compiling:$ac_tool_warned in
9756 yes:)
9757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9758 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9759 ac_tool_warned=yes ;;
9760 esac
9761     NMEDIT=$ac_ct_NMEDIT
9762   fi
9763 else
9764   NMEDIT="$ac_cv_prog_NMEDIT"
9765 fi
9766
9767     if test -n "$ac_tool_prefix"; then
9768   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9769 set dummy ${ac_tool_prefix}lipo; ac_word=$2
9770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9771 $as_echo_n "checking for $ac_word... " >&6; }
9772 if ${ac_cv_prog_LIPO+:} false; then :
9773   $as_echo_n "(cached) " >&6
9774 else
9775   if test -n "$LIPO"; then
9776   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9777 else
9778 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9779 for as_dir in $PATH
9780 do
9781   IFS=$as_save_IFS
9782   test -z "$as_dir" && as_dir=.
9783     for ac_exec_ext in '' $ac_executable_extensions; do
9784   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9785     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9787     break 2
9788   fi
9789 done
9790   done
9791 IFS=$as_save_IFS
9792
9793 fi
9794 fi
9795 LIPO=$ac_cv_prog_LIPO
9796 if test -n "$LIPO"; then
9797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9798 $as_echo "$LIPO" >&6; }
9799 else
9800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9801 $as_echo "no" >&6; }
9802 fi
9803
9804
9805 fi
9806 if test -z "$ac_cv_prog_LIPO"; then
9807   ac_ct_LIPO=$LIPO
9808   # Extract the first word of "lipo", so it can be a program name with args.
9809 set dummy lipo; ac_word=$2
9810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9811 $as_echo_n "checking for $ac_word... " >&6; }
9812 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9813   $as_echo_n "(cached) " >&6
9814 else
9815   if test -n "$ac_ct_LIPO"; then
9816   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9817 else
9818 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9819 for as_dir in $PATH
9820 do
9821   IFS=$as_save_IFS
9822   test -z "$as_dir" && as_dir=.
9823     for ac_exec_ext in '' $ac_executable_extensions; do
9824   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9825     ac_cv_prog_ac_ct_LIPO="lipo"
9826     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9827     break 2
9828   fi
9829 done
9830   done
9831 IFS=$as_save_IFS
9832
9833 fi
9834 fi
9835 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9836 if test -n "$ac_ct_LIPO"; then
9837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9838 $as_echo "$ac_ct_LIPO" >&6; }
9839 else
9840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9841 $as_echo "no" >&6; }
9842 fi
9843
9844   if test "x$ac_ct_LIPO" = x; then
9845     LIPO=":"
9846   else
9847     case $cross_compiling:$ac_tool_warned in
9848 yes:)
9849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9850 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9851 ac_tool_warned=yes ;;
9852 esac
9853     LIPO=$ac_ct_LIPO
9854   fi
9855 else
9856   LIPO="$ac_cv_prog_LIPO"
9857 fi
9858
9859     if test -n "$ac_tool_prefix"; then
9860   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9861 set dummy ${ac_tool_prefix}otool; ac_word=$2
9862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9863 $as_echo_n "checking for $ac_word... " >&6; }
9864 if ${ac_cv_prog_OTOOL+:} false; then :
9865   $as_echo_n "(cached) " >&6
9866 else
9867   if test -n "$OTOOL"; then
9868   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9869 else
9870 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9871 for as_dir in $PATH
9872 do
9873   IFS=$as_save_IFS
9874   test -z "$as_dir" && as_dir=.
9875     for ac_exec_ext in '' $ac_executable_extensions; do
9876   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9877     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9878     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9879     break 2
9880   fi
9881 done
9882   done
9883 IFS=$as_save_IFS
9884
9885 fi
9886 fi
9887 OTOOL=$ac_cv_prog_OTOOL
9888 if test -n "$OTOOL"; then
9889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9890 $as_echo "$OTOOL" >&6; }
9891 else
9892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9893 $as_echo "no" >&6; }
9894 fi
9895
9896
9897 fi
9898 if test -z "$ac_cv_prog_OTOOL"; then
9899   ac_ct_OTOOL=$OTOOL
9900   # Extract the first word of "otool", so it can be a program name with args.
9901 set dummy otool; ac_word=$2
9902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9903 $as_echo_n "checking for $ac_word... " >&6; }
9904 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9905   $as_echo_n "(cached) " >&6
9906 else
9907   if test -n "$ac_ct_OTOOL"; then
9908   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
9909 else
9910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9911 for as_dir in $PATH
9912 do
9913   IFS=$as_save_IFS
9914   test -z "$as_dir" && as_dir=.
9915     for ac_exec_ext in '' $ac_executable_extensions; do
9916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9917     ac_cv_prog_ac_ct_OTOOL="otool"
9918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9919     break 2
9920   fi
9921 done
9922   done
9923 IFS=$as_save_IFS
9924
9925 fi
9926 fi
9927 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
9928 if test -n "$ac_ct_OTOOL"; then
9929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
9930 $as_echo "$ac_ct_OTOOL" >&6; }
9931 else
9932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9933 $as_echo "no" >&6; }
9934 fi
9935
9936   if test "x$ac_ct_OTOOL" = x; then
9937     OTOOL=":"
9938   else
9939     case $cross_compiling:$ac_tool_warned in
9940 yes:)
9941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9942 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9943 ac_tool_warned=yes ;;
9944 esac
9945     OTOOL=$ac_ct_OTOOL
9946   fi
9947 else
9948   OTOOL="$ac_cv_prog_OTOOL"
9949 fi
9950
9951     if test -n "$ac_tool_prefix"; then
9952   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
9953 set dummy ${ac_tool_prefix}otool64; ac_word=$2
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9955 $as_echo_n "checking for $ac_word... " >&6; }
9956 if ${ac_cv_prog_OTOOL64+:} false; then :
9957   $as_echo_n "(cached) " >&6
9958 else
9959   if test -n "$OTOOL64"; then
9960   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
9961 else
9962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9963 for as_dir in $PATH
9964 do
9965   IFS=$as_save_IFS
9966   test -z "$as_dir" && as_dir=.
9967     for ac_exec_ext in '' $ac_executable_extensions; do
9968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9969     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
9970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9971     break 2
9972   fi
9973 done
9974   done
9975 IFS=$as_save_IFS
9976
9977 fi
9978 fi
9979 OTOOL64=$ac_cv_prog_OTOOL64
9980 if test -n "$OTOOL64"; then
9981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
9982 $as_echo "$OTOOL64" >&6; }
9983 else
9984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9985 $as_echo "no" >&6; }
9986 fi
9987
9988
9989 fi
9990 if test -z "$ac_cv_prog_OTOOL64"; then
9991   ac_ct_OTOOL64=$OTOOL64
9992   # Extract the first word of "otool64", so it can be a program name with args.
9993 set dummy otool64; ac_word=$2
9994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9995 $as_echo_n "checking for $ac_word... " >&6; }
9996 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
9997   $as_echo_n "(cached) " >&6
9998 else
9999   if test -n "$ac_ct_OTOOL64"; then
10000   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
10001 else
10002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10003 for as_dir in $PATH
10004 do
10005   IFS=$as_save_IFS
10006   test -z "$as_dir" && as_dir=.
10007     for ac_exec_ext in '' $ac_executable_extensions; do
10008   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10009     ac_cv_prog_ac_ct_OTOOL64="otool64"
10010     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10011     break 2
10012   fi
10013 done
10014   done
10015 IFS=$as_save_IFS
10016
10017 fi
10018 fi
10019 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
10020 if test -n "$ac_ct_OTOOL64"; then
10021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
10022 $as_echo "$ac_ct_OTOOL64" >&6; }
10023 else
10024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10025 $as_echo "no" >&6; }
10026 fi
10027
10028   if test "x$ac_ct_OTOOL64" = x; then
10029     OTOOL64=":"
10030   else
10031     case $cross_compiling:$ac_tool_warned in
10032 yes:)
10033 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10034 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10035 ac_tool_warned=yes ;;
10036 esac
10037     OTOOL64=$ac_ct_OTOOL64
10038   fi
10039 else
10040   OTOOL64="$ac_cv_prog_OTOOL64"
10041 fi
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
10070 $as_echo_n "checking for -single_module linker flag... " >&6; }
10071 if ${lt_cv_apple_cc_single_mod+:} false; then :
10072   $as_echo_n "(cached) " >&6
10073 else
10074   lt_cv_apple_cc_single_mod=no
10075       if test -z "$LT_MULTI_MODULE"; then
10076         # By default we will add the -single_module flag. You can override
10077         # by either setting the environment variable LT_MULTI_MODULE
10078         # non-empty at configure time, or by adding -multi_module to the
10079         # link flags.
10080         rm -rf libconftest.dylib*
10081         echo "int foo(void){return 1;}" > conftest.c
10082         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10083 -dynamiclib -Wl,-single_module conftest.c" >&5
10084         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10085           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10086         _lt_result=$?
10087         # If there is a non-empty error log, and "single_module"
10088         # appears in it, assume the flag caused a linker warning
10089         if test -s conftest.err && $GREP single_module conftest.err; then
10090           cat conftest.err >&5
10091         # Otherwise, if the output was created with a 0 exit code from
10092         # the compiler, it worked.
10093         elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10094           lt_cv_apple_cc_single_mod=yes
10095         else
10096           cat conftest.err >&5
10097         fi
10098         rm -rf libconftest.dylib*
10099         rm -f conftest.*
10100       fi
10101 fi
10102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
10103 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
10104
10105     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
10106 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
10107 if ${lt_cv_ld_exported_symbols_list+:} false; then :
10108   $as_echo_n "(cached) " >&6
10109 else
10110   lt_cv_ld_exported_symbols_list=no
10111       save_LDFLAGS=$LDFLAGS
10112       echo "_main" > conftest.sym
10113       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10114       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10115 /* end confdefs.h.  */
10116
10117 int
10118 main ()
10119 {
10120
10121   ;
10122   return 0;
10123 }
10124 _ACEOF
10125 if ac_fn_c_try_link "$LINENO"; then :
10126   lt_cv_ld_exported_symbols_list=yes
10127 else
10128   lt_cv_ld_exported_symbols_list=no
10129 fi
10130 rm -f core conftest.err conftest.$ac_objext \
10131     conftest$ac_exeext conftest.$ac_ext
10132         LDFLAGS=$save_LDFLAGS
10133
10134 fi
10135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
10136 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
10137
10138     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
10139 $as_echo_n "checking for -force_load linker flag... " >&6; }
10140 if ${lt_cv_ld_force_load+:} false; then :
10141   $as_echo_n "(cached) " >&6
10142 else
10143   lt_cv_ld_force_load=no
10144       cat > conftest.c << _LT_EOF
10145 int forced_loaded() { return 2;}
10146 _LT_EOF
10147       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
10148       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
10149       echo "$AR cru libconftest.a conftest.o" >&5
10150       $AR cru libconftest.a conftest.o 2>&5
10151       echo "$RANLIB libconftest.a" >&5
10152       $RANLIB libconftest.a 2>&5
10153       cat > conftest.c << _LT_EOF
10154 int main() { return 0;}
10155 _LT_EOF
10156       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
10157       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10158       _lt_result=$?
10159       if test -s conftest.err && $GREP force_load conftest.err; then
10160         cat conftest.err >&5
10161       elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10162         lt_cv_ld_force_load=yes
10163       else
10164         cat conftest.err >&5
10165       fi
10166         rm -f conftest.err libconftest.a conftest conftest.c
10167         rm -rf conftest.dSYM
10168
10169 fi
10170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
10171 $as_echo "$lt_cv_ld_force_load" >&6; }
10172     case $host_os in
10173     rhapsody* | darwin1.[012])
10174       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10175     darwin1.*)
10176       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10177     darwin*) # darwin 5.x on
10178       # if running on 10.5 or later, the deployment target defaults
10179       # to the OS version, if on x86, and 10.4, the deployment
10180       # target defaults to 10.4. Don't you love it?
10181       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10182         10.0,*86*-darwin8*|10.0,*-darwin[91]*)
10183           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10184         10.[012][,.]*)
10185           _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10186         10.*)
10187           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10188       esac
10189     ;;
10190   esac
10191     if test yes = "$lt_cv_apple_cc_single_mod"; then
10192       _lt_dar_single_mod='$single_module'
10193     fi
10194     if test yes = "$lt_cv_ld_exported_symbols_list"; then
10195       _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10196     else
10197       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10198     fi
10199     if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10200       _lt_dsymutil='~$DSYMUTIL $lib || :'
10201     else
10202       _lt_dsymutil=
10203     fi
10204     ;;
10205   esac
10206
10207 # func_munge_path_list VARIABLE PATH
10208 # -----------------------------------
10209 # VARIABLE is name of variable containing _space_ separated list of
10210 # directories to be munged by the contents of PATH, which is string
10211 # having a format:
10212 # "DIR[:DIR]:"
10213 #       string "DIR[ DIR]" will be prepended to VARIABLE
10214 # ":DIR[:DIR]"
10215 #       string "DIR[ DIR]" will be appended to VARIABLE
10216 # "DIRP[:DIRP]::[DIRA:]DIRA"
10217 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
10218 #       "DIRA[ DIRA]" will be appended to VARIABLE
10219 # "DIR[:DIR]"
10220 #       VARIABLE will be replaced by "DIR[ DIR]"
10221 func_munge_path_list ()
10222 {
10223     case x$2 in
10224     x)
10225         ;;
10226     *:)
10227         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10228         ;;
10229     x:*)
10230         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10231         ;;
10232     *::*)
10233         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10234         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10235         ;;
10236     *)
10237         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10238         ;;
10239     esac
10240 }
10241
10242 for ac_header in dlfcn.h
10243 do :
10244   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10245 "
10246 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
10247   cat >>confdefs.h <<_ACEOF
10248 #define HAVE_DLFCN_H 1
10249 _ACEOF
10250
10251 fi
10252
10253 done
10254
10255
10256
10257
10258
10259
10260
10261 # Set options
10262
10263
10264
10265         enable_dlopen=no
10266
10267
10268   enable_win32_dll=no
10269
10270
10271             # Check whether --enable-shared was given.
10272 if test "${enable_shared+set}" = set; then :
10273   enableval=$enable_shared; p=${PACKAGE-default}
10274     case $enableval in
10275     yes) enable_shared=yes ;;
10276     no) enable_shared=no ;;
10277     *)
10278       enable_shared=no
10279       # Look at the argument we got.  We use all the common list separators.
10280       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10281       for pkg in $enableval; do
10282         IFS=$lt_save_ifs
10283         if test "X$pkg" = "X$p"; then
10284           enable_shared=yes
10285         fi
10286       done
10287       IFS=$lt_save_ifs
10288       ;;
10289     esac
10290 else
10291   enable_shared=yes
10292 fi
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302   # Check whether --enable-static was given.
10303 if test "${enable_static+set}" = set; then :
10304   enableval=$enable_static; p=${PACKAGE-default}
10305     case $enableval in
10306     yes) enable_static=yes ;;
10307     no) enable_static=no ;;
10308     *)
10309      enable_static=no
10310       # Look at the argument we got.  We use all the common list separators.
10311       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10312       for pkg in $enableval; do
10313         IFS=$lt_save_ifs
10314         if test "X$pkg" = "X$p"; then
10315           enable_static=yes
10316         fi
10317       done
10318       IFS=$lt_save_ifs
10319       ;;
10320     esac
10321 else
10322   enable_static=yes
10323 fi
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334 # Check whether --with-pic was given.
10335 if test "${with_pic+set}" = set; then :
10336   withval=$with_pic; lt_p=${PACKAGE-default}
10337     case $withval in
10338     yes|no) pic_mode=$withval ;;
10339     *)
10340       pic_mode=default
10341       # Look at the argument we got.  We use all the common list separators.
10342       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10343       for lt_pkg in $withval; do
10344         IFS=$lt_save_ifs
10345         if test "X$lt_pkg" = "X$lt_p"; then
10346           pic_mode=yes
10347         fi
10348       done
10349       IFS=$lt_save_ifs
10350       ;;
10351     esac
10352 else
10353   pic_mode=default
10354 fi
10355
10356
10357
10358
10359
10360
10361
10362
10363   # Check whether --enable-fast-install was given.
10364 if test "${enable_fast_install+set}" = set; then :
10365   enableval=$enable_fast_install; p=${PACKAGE-default}
10366     case $enableval in
10367     yes) enable_fast_install=yes ;;
10368     no) enable_fast_install=no ;;
10369     *)
10370       enable_fast_install=no
10371       # Look at the argument we got.  We use all the common list separators.
10372       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10373       for pkg in $enableval; do
10374         IFS=$lt_save_ifs
10375         if test "X$pkg" = "X$p"; then
10376           enable_fast_install=yes
10377         fi
10378       done
10379       IFS=$lt_save_ifs
10380       ;;
10381     esac
10382 else
10383   enable_fast_install=yes
10384 fi
10385
10386
10387
10388
10389
10390
10391
10392
10393   shared_archive_member_spec=
10394 case $host,$enable_shared in
10395 power*-*-aix[5-9]*,yes)
10396   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10397 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
10398
10399 # Check whether --with-aix-soname was given.
10400 if test "${with_aix_soname+set}" = set; then :
10401   withval=$with_aix_soname; case $withval in
10402     aix|svr4|both)
10403       ;;
10404     *)
10405       as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10406       ;;
10407     esac
10408     lt_cv_with_aix_soname=$with_aix_soname
10409 else
10410   if ${lt_cv_with_aix_soname+:} false; then :
10411   $as_echo_n "(cached) " >&6
10412 else
10413   lt_cv_with_aix_soname=aix
10414 fi
10415
10416     with_aix_soname=$lt_cv_with_aix_soname
10417 fi
10418
10419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10420 $as_echo "$with_aix_soname" >&6; }
10421   if test aix != "$with_aix_soname"; then
10422     # For the AIX way of multilib, we name the shared archive member
10423     # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10424     # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10425     # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10426     # the AIX toolchain works better with OBJECT_MODE set (default 32).
10427     if test 64 = "${OBJECT_MODE-32}"; then
10428       shared_archive_member_spec=shr_64
10429     else
10430       shared_archive_member_spec=shr
10431     fi
10432   fi
10433   ;;
10434 *)
10435   with_aix_soname=aix
10436   ;;
10437 esac
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448 # This can be used to rebuild libtool when needed
10449 LIBTOOL_DEPS=$ltmain
10450
10451 # Always use our own libtool.
10452 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483 test -z "$LN_S" && LN_S="ln -s"
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498 if test -n "${ZSH_VERSION+set}"; then
10499    setopt NO_GLOB_SUBST
10500 fi
10501
10502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10503 $as_echo_n "checking for objdir... " >&6; }
10504 if ${lt_cv_objdir+:} false; then :
10505   $as_echo_n "(cached) " >&6
10506 else
10507   rm -f .libs 2>/dev/null
10508 mkdir .libs 2>/dev/null
10509 if test -d .libs; then
10510   lt_cv_objdir=.libs
10511 else
10512   # MS-DOS does not allow filenames that begin with a dot.
10513   lt_cv_objdir=_libs
10514 fi
10515 rmdir .libs 2>/dev/null
10516 fi
10517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10518 $as_echo "$lt_cv_objdir" >&6; }
10519 objdir=$lt_cv_objdir
10520
10521
10522
10523
10524
10525 cat >>confdefs.h <<_ACEOF
10526 #define LT_OBJDIR "$lt_cv_objdir/"
10527 _ACEOF
10528
10529
10530
10531
10532 case $host_os in
10533 aix3*)
10534   # AIX sometimes has problems with the GCC collect2 program.  For some
10535   # reason, if we set the COLLECT_NAMES environment variable, the problems
10536   # vanish in a puff of smoke.
10537   if test set != "${COLLECT_NAMES+set}"; then
10538     COLLECT_NAMES=
10539     export COLLECT_NAMES
10540   fi
10541   ;;
10542 esac
10543
10544 # Global variables:
10545 ofile=libtool
10546 can_build_shared=yes
10547
10548 # All known linkers require a '.a' archive for static linking (except MSVC,
10549 # which needs '.lib').
10550 libext=a
10551
10552 with_gnu_ld=$lt_cv_prog_gnu_ld
10553
10554 old_CC=$CC
10555 old_CFLAGS=$CFLAGS
10556
10557 # Set sane defaults for various variables
10558 test -z "$CC" && CC=cc
10559 test -z "$LTCC" && LTCC=$CC
10560 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10561 test -z "$LD" && LD=ld
10562 test -z "$ac_objext" && ac_objext=o
10563
10564 func_cc_basename $compiler
10565 cc_basename=$func_cc_basename_result
10566
10567
10568 # Only perform the check for file, if the check method requires it
10569 test -z "$MAGIC_CMD" && MAGIC_CMD=file
10570 case $deplibs_check_method in
10571 file_magic*)
10572   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10573     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10574 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10575 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10576   $as_echo_n "(cached) " >&6
10577 else
10578   case $MAGIC_CMD in
10579 [\\/*] |  ?:[\\/]*)
10580   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10581   ;;
10582 *)
10583   lt_save_MAGIC_CMD=$MAGIC_CMD
10584   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10585   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10586   for ac_dir in $ac_dummy; do
10587     IFS=$lt_save_ifs
10588     test -z "$ac_dir" && ac_dir=.
10589     if test -f "$ac_dir/${ac_tool_prefix}file"; then
10590       lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10591       if test -n "$file_magic_test_file"; then
10592         case $deplibs_check_method in
10593         "file_magic "*)
10594           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10595           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10596           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10597             $EGREP "$file_magic_regex" > /dev/null; then
10598             :
10599           else
10600             cat <<_LT_EOF 1>&2
10601
10602 *** Warning: the command libtool uses to detect shared libraries,
10603 *** $file_magic_cmd, produces output that libtool cannot recognize.
10604 *** The result is that libtool may fail to recognize shared libraries
10605 *** as such.  This will affect the creation of libtool libraries that
10606 *** depend on shared libraries, but programs linked with such libtool
10607 *** libraries will work regardless of this problem.  Nevertheless, you
10608 *** may want to report the problem to your system manager and/or to
10609 *** bug-libtool@gnu.org
10610
10611 _LT_EOF
10612           fi ;;
10613         esac
10614       fi
10615       break
10616     fi
10617   done
10618   IFS=$lt_save_ifs
10619   MAGIC_CMD=$lt_save_MAGIC_CMD
10620   ;;
10621 esac
10622 fi
10623
10624 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10625 if test -n "$MAGIC_CMD"; then
10626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10627 $as_echo "$MAGIC_CMD" >&6; }
10628 else
10629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10630 $as_echo "no" >&6; }
10631 fi
10632
10633
10634
10635
10636
10637 if test -z "$lt_cv_path_MAGIC_CMD"; then
10638   if test -n "$ac_tool_prefix"; then
10639     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10640 $as_echo_n "checking for file... " >&6; }
10641 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10642   $as_echo_n "(cached) " >&6
10643 else
10644   case $MAGIC_CMD in
10645 [\\/*] |  ?:[\\/]*)
10646   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10647   ;;
10648 *)
10649   lt_save_MAGIC_CMD=$MAGIC_CMD
10650   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10651   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10652   for ac_dir in $ac_dummy; do
10653     IFS=$lt_save_ifs
10654     test -z "$ac_dir" && ac_dir=.
10655     if test -f "$ac_dir/file"; then
10656       lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10657       if test -n "$file_magic_test_file"; then
10658         case $deplibs_check_method in
10659         "file_magic "*)
10660           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10661           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10662           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10663             $EGREP "$file_magic_regex" > /dev/null; then
10664             :
10665           else
10666             cat <<_LT_EOF 1>&2
10667
10668 *** Warning: the command libtool uses to detect shared libraries,
10669 *** $file_magic_cmd, produces output that libtool cannot recognize.
10670 *** The result is that libtool may fail to recognize shared libraries
10671 *** as such.  This will affect the creation of libtool libraries that
10672 *** depend on shared libraries, but programs linked with such libtool
10673 *** libraries will work regardless of this problem.  Nevertheless, you
10674 *** may want to report the problem to your system manager and/or to
10675 *** bug-libtool@gnu.org
10676
10677 _LT_EOF
10678           fi ;;
10679         esac
10680       fi
10681       break
10682     fi
10683   done
10684   IFS=$lt_save_ifs
10685   MAGIC_CMD=$lt_save_MAGIC_CMD
10686   ;;
10687 esac
10688 fi
10689
10690 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10691 if test -n "$MAGIC_CMD"; then
10692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10693 $as_echo "$MAGIC_CMD" >&6; }
10694 else
10695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10696 $as_echo "no" >&6; }
10697 fi
10698
10699
10700   else
10701     MAGIC_CMD=:
10702   fi
10703 fi
10704
10705   fi
10706   ;;
10707 esac
10708
10709 # Use C for the default configuration in the libtool script
10710
10711 lt_save_CC=$CC
10712 ac_ext=c
10713 ac_cpp='$CPP $CPPFLAGS'
10714 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10715 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10716 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10717
10718
10719 # Source file extension for C test sources.
10720 ac_ext=c
10721
10722 # Object file extension for compiled C test sources.
10723 objext=o
10724 objext=$objext
10725
10726 # Code to be used in simple compile tests
10727 lt_simple_compile_test_code="int some_variable = 0;"
10728
10729 # Code to be used in simple link tests
10730 lt_simple_link_test_code='int main(){return(0);}'
10731
10732
10733
10734
10735
10736
10737
10738 # If no C compiler was specified, use CC.
10739 LTCC=${LTCC-"$CC"}
10740
10741 # If no C compiler flags were specified, use CFLAGS.
10742 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10743
10744 # Allow CC to be a program name with arguments.
10745 compiler=$CC
10746
10747 # Save the default compiler, since it gets overwritten when the other
10748 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10749 compiler_DEFAULT=$CC
10750
10751 # save warnings/boilerplate of simple test code
10752 ac_outfile=conftest.$ac_objext
10753 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10754 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10755 _lt_compiler_boilerplate=`cat conftest.err`
10756 $RM conftest*
10757
10758 ac_outfile=conftest.$ac_objext
10759 echo "$lt_simple_link_test_code" >conftest.$ac_ext
10760 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10761 _lt_linker_boilerplate=`cat conftest.err`
10762 $RM -r conftest*
10763
10764
10765 if test -n "$compiler"; then
10766
10767 lt_prog_compiler_no_builtin_flag=
10768
10769 if test yes = "$GCC"; then
10770   case $cc_basename in
10771   nvcc*)
10772     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10773   *)
10774     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10775   esac
10776
10777   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10778 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10779 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10780   $as_echo_n "(cached) " >&6
10781 else
10782   lt_cv_prog_compiler_rtti_exceptions=no
10783    ac_outfile=conftest.$ac_objext
10784    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10785    lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
10786    # Insert the option either (1) after the last *FLAGS variable, or
10787    # (2) before a word containing "conftest.", or (3) at the end.
10788    # Note that $ac_compile itself does not contain backslashes and begins
10789    # with a dollar sign (not a hyphen), so the echo should work correctly.
10790    # The option is referenced via a variable to avoid confusing sed.
10791    lt_compile=`echo "$ac_compile" | $SED \
10792    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10793    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10794    -e 's:$: $lt_compiler_flag:'`
10795    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10796    (eval "$lt_compile" 2>conftest.err)
10797    ac_status=$?
10798    cat conftest.err >&5
10799    echo "$as_me:$LINENO: \$? = $ac_status" >&5
10800    if (exit $ac_status) && test -s "$ac_outfile"; then
10801      # The compiler can only warn and ignore the option if not recognized
10802      # So say no if there are warnings other than the usual output.
10803      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10804      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10805      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10806        lt_cv_prog_compiler_rtti_exceptions=yes
10807      fi
10808    fi
10809    $RM conftest*
10810
10811 fi
10812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10813 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10814
10815 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10816     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10817 else
10818     :
10819 fi
10820
10821 fi
10822
10823
10824
10825
10826
10827
10828   lt_prog_compiler_wl=
10829 lt_prog_compiler_pic=
10830 lt_prog_compiler_static=
10831
10832
10833   if test yes = "$GCC"; then
10834     lt_prog_compiler_wl='-Wl,'
10835     lt_prog_compiler_static='-static'
10836
10837     case $host_os in
10838       aix*)
10839       # All AIX code is PIC.
10840       if test ia64 = "$host_cpu"; then
10841         # AIX 5 now supports IA64 processor
10842         lt_prog_compiler_static='-Bstatic'
10843       fi
10844       lt_prog_compiler_pic='-fPIC'
10845       ;;
10846
10847     amigaos*)
10848       case $host_cpu in
10849       powerpc)
10850             # see comment about AmigaOS4 .so support
10851             lt_prog_compiler_pic='-fPIC'
10852         ;;
10853       m68k)
10854             # FIXME: we need at least 68020 code to build shared libraries, but
10855             # adding the '-m68020' flag to GCC prevents building anything better,
10856             # like '-m68040'.
10857             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10858         ;;
10859       esac
10860       ;;
10861
10862     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10863       # PIC is the default for these OSes.
10864       ;;
10865
10866     mingw* | cygwin* | pw32* | os2* | cegcc*)
10867       # This hack is so that the source file can tell whether it is being
10868       # built for inclusion in a dll (and should export symbols for example).
10869       # Although the cygwin gcc ignores -fPIC, still need this for old-style
10870       # (--disable-auto-import) libraries
10871       lt_prog_compiler_pic='-DDLL_EXPORT'
10872       case $host_os in
10873       os2*)
10874         lt_prog_compiler_static='$wl-static'
10875         ;;
10876       esac
10877       ;;
10878
10879     darwin* | rhapsody*)
10880       # PIC is the default on this platform
10881       # Common symbols not allowed in MH_DYLIB files
10882       lt_prog_compiler_pic='-fno-common'
10883       ;;
10884
10885     haiku*)
10886       # PIC is the default for Haiku.
10887       # The "-static" flag exists, but is broken.
10888       lt_prog_compiler_static=
10889       ;;
10890
10891     hpux*)
10892       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10893       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10894       # sets the default TLS model and affects inlining.
10895       case $host_cpu in
10896       hppa*64*)
10897         # +Z the default
10898         ;;
10899       *)
10900         lt_prog_compiler_pic='-fPIC'
10901         ;;
10902       esac
10903       ;;
10904
10905     interix[3-9]*)
10906       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10907       # Instead, we relocate shared libraries at runtime.
10908       ;;
10909
10910     msdosdjgpp*)
10911       # Just because we use GCC doesn't mean we suddenly get shared libraries
10912       # on systems that don't support them.
10913       lt_prog_compiler_can_build_shared=no
10914       enable_shared=no
10915       ;;
10916
10917     *nto* | *qnx*)
10918       # QNX uses GNU C++, but need to define -shared option too, otherwise
10919       # it will coredump.
10920       lt_prog_compiler_pic='-fPIC -shared'
10921       ;;
10922
10923     sysv4*MP*)
10924       if test -d /usr/nec; then
10925         lt_prog_compiler_pic=-Kconform_pic
10926       fi
10927       ;;
10928
10929     *)
10930       lt_prog_compiler_pic='-fPIC'
10931       ;;
10932     esac
10933
10934     case $cc_basename in
10935     nvcc*) # Cuda Compiler Driver 2.2
10936       lt_prog_compiler_wl='-Xlinker '
10937       if test -n "$lt_prog_compiler_pic"; then
10938         lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
10939       fi
10940       ;;
10941     esac
10942   else
10943     # PORTME Check for flag to pass linker flags through the system compiler.
10944     case $host_os in
10945     aix*)
10946       lt_prog_compiler_wl='-Wl,'
10947       if test ia64 = "$host_cpu"; then
10948         # AIX 5 now supports IA64 processor
10949         lt_prog_compiler_static='-Bstatic'
10950       else
10951         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
10952       fi
10953       ;;
10954
10955     darwin* | rhapsody*)
10956       # PIC is the default on this platform
10957       # Common symbols not allowed in MH_DYLIB files
10958       lt_prog_compiler_pic='-fno-common'
10959       case $cc_basename in
10960       nagfor*)
10961         # NAG Fortran compiler
10962         lt_prog_compiler_wl='-Wl,-Wl,,'
10963         lt_prog_compiler_pic='-PIC'
10964         lt_prog_compiler_static='-Bstatic'
10965         ;;
10966       esac
10967       ;;
10968
10969     mingw* | cygwin* | pw32* | os2* | cegcc*)
10970       # This hack is so that the source file can tell whether it is being
10971       # built for inclusion in a dll (and should export symbols for example).
10972       lt_prog_compiler_pic='-DDLL_EXPORT'
10973       case $host_os in
10974       os2*)
10975         lt_prog_compiler_static='$wl-static'
10976         ;;
10977       esac
10978       ;;
10979
10980     hpux9* | hpux10* | hpux11*)
10981       lt_prog_compiler_wl='-Wl,'
10982       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10983       # not for PA HP-UX.
10984       case $host_cpu in
10985       hppa*64*|ia64*)
10986         # +Z the default
10987         ;;
10988       *)
10989         lt_prog_compiler_pic='+Z'
10990         ;;
10991       esac
10992       # Is there a better lt_prog_compiler_static that works with the bundled CC?
10993       lt_prog_compiler_static='$wl-a ${wl}archive'
10994       ;;
10995
10996     irix5* | irix6* | nonstopux*)
10997       lt_prog_compiler_wl='-Wl,'
10998       # PIC (with -KPIC) is the default.
10999       lt_prog_compiler_static='-non_shared'
11000       ;;
11001
11002     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11003       case $cc_basename in
11004       # old Intel for x86_64, which still supported -KPIC.
11005       ecc*)
11006         lt_prog_compiler_wl='-Wl,'
11007         lt_prog_compiler_pic='-KPIC'
11008         lt_prog_compiler_static='-static'
11009         ;;
11010       # icc used to be incompatible with GCC.
11011       # ICC 10 doesn't accept -KPIC any more.
11012       icc* | ifort*)
11013         lt_prog_compiler_wl='-Wl,'
11014         lt_prog_compiler_pic='-fPIC'
11015         lt_prog_compiler_static='-static'
11016         ;;
11017       # Lahey Fortran 8.1.
11018       lf95*)
11019         lt_prog_compiler_wl='-Wl,'
11020         lt_prog_compiler_pic='--shared'
11021         lt_prog_compiler_static='--static'
11022         ;;
11023       nagfor*)
11024         # NAG Fortran compiler
11025         lt_prog_compiler_wl='-Wl,-Wl,,'
11026         lt_prog_compiler_pic='-PIC'
11027         lt_prog_compiler_static='-Bstatic'
11028         ;;
11029       tcc*)
11030         # Fabrice Bellard et al's Tiny C Compiler
11031         lt_prog_compiler_wl='-Wl,'
11032         lt_prog_compiler_pic='-fPIC'
11033         lt_prog_compiler_static='-static'
11034         ;;
11035       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
11036         # Portland Group compilers (*not* the Pentium gcc compiler,
11037         # which looks to be a dead project)
11038         lt_prog_compiler_wl='-Wl,'
11039         lt_prog_compiler_pic='-fpic'
11040         lt_prog_compiler_static='-Bstatic'
11041         ;;
11042       ccc*)
11043         lt_prog_compiler_wl='-Wl,'
11044         # All Alpha code is PIC.
11045         lt_prog_compiler_static='-non_shared'
11046         ;;
11047       xl* | bgxl* | bgf* | mpixl*)
11048         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
11049         lt_prog_compiler_wl='-Wl,'
11050         lt_prog_compiler_pic='-qpic'
11051         lt_prog_compiler_static='-qstaticlink'
11052         ;;
11053       *)
11054         case `$CC -V 2>&1 | sed 5q` in
11055         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
11056           # Sun Fortran 8.3 passes all unrecognized flags to the linker
11057           lt_prog_compiler_pic='-KPIC'
11058           lt_prog_compiler_static='-Bstatic'
11059           lt_prog_compiler_wl=''
11060           ;;
11061         *Sun\ F* | *Sun*Fortran*)
11062           lt_prog_compiler_pic='-KPIC'
11063           lt_prog_compiler_static='-Bstatic'
11064           lt_prog_compiler_wl='-Qoption ld '
11065           ;;
11066         *Sun\ C*)
11067           # Sun C 5.9
11068           lt_prog_compiler_pic='-KPIC'
11069           lt_prog_compiler_static='-Bstatic'
11070           lt_prog_compiler_wl='-Wl,'
11071           ;;
11072         *Intel*\ [CF]*Compiler*)
11073           lt_prog_compiler_wl='-Wl,'
11074           lt_prog_compiler_pic='-fPIC'
11075           lt_prog_compiler_static='-static'
11076           ;;
11077         *Portland\ Group*)
11078           lt_prog_compiler_wl='-Wl,'
11079           lt_prog_compiler_pic='-fpic'
11080           lt_prog_compiler_static='-Bstatic'
11081           ;;
11082         esac
11083         ;;
11084       esac
11085       ;;
11086
11087     newsos6)
11088       lt_prog_compiler_pic='-KPIC'
11089       lt_prog_compiler_static='-Bstatic'
11090       ;;
11091
11092     *nto* | *qnx*)
11093       # QNX uses GNU C++, but need to define -shared option too, otherwise
11094       # it will coredump.
11095       lt_prog_compiler_pic='-fPIC -shared'
11096       ;;
11097
11098     osf3* | osf4* | osf5*)
11099       lt_prog_compiler_wl='-Wl,'
11100       # All OSF/1 code is PIC.
11101       lt_prog_compiler_static='-non_shared'
11102       ;;
11103
11104     rdos*)
11105       lt_prog_compiler_static='-non_shared'
11106       ;;
11107
11108     solaris*)
11109       lt_prog_compiler_pic='-KPIC'
11110       lt_prog_compiler_static='-Bstatic'
11111       case $cc_basename in
11112       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
11113         lt_prog_compiler_wl='-Qoption ld ';;
11114       *)
11115         lt_prog_compiler_wl='-Wl,';;
11116       esac
11117       ;;
11118
11119     sunos4*)
11120       lt_prog_compiler_wl='-Qoption ld '
11121       lt_prog_compiler_pic='-PIC'
11122       lt_prog_compiler_static='-Bstatic'
11123       ;;
11124
11125     sysv4 | sysv4.2uw2* | sysv4.3*)
11126       lt_prog_compiler_wl='-Wl,'
11127       lt_prog_compiler_pic='-KPIC'
11128       lt_prog_compiler_static='-Bstatic'
11129       ;;
11130
11131     sysv4*MP*)
11132       if test -d /usr/nec; then
11133         lt_prog_compiler_pic='-Kconform_pic'
11134         lt_prog_compiler_static='-Bstatic'
11135       fi
11136       ;;
11137
11138     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11139       lt_prog_compiler_wl='-Wl,'
11140       lt_prog_compiler_pic='-KPIC'
11141       lt_prog_compiler_static='-Bstatic'
11142       ;;
11143
11144     unicos*)
11145       lt_prog_compiler_wl='-Wl,'
11146       lt_prog_compiler_can_build_shared=no
11147       ;;
11148
11149     uts4*)
11150       lt_prog_compiler_pic='-pic'
11151       lt_prog_compiler_static='-Bstatic'
11152       ;;
11153
11154     *)
11155       lt_prog_compiler_can_build_shared=no
11156       ;;
11157     esac
11158   fi
11159
11160 case $host_os in
11161   # For platforms that do not support PIC, -DPIC is meaningless:
11162   *djgpp*)
11163     lt_prog_compiler_pic=
11164     ;;
11165   *)
11166     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11167     ;;
11168 esac
11169
11170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11171 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
11172 if ${lt_cv_prog_compiler_pic+:} false; then :
11173   $as_echo_n "(cached) " >&6
11174 else
11175   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11176 fi
11177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11178 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
11179 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11180
11181 #
11182 # Check to make sure the PIC flag actually works.
11183 #
11184 if test -n "$lt_prog_compiler_pic"; then
11185   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
11186 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
11187 if ${lt_cv_prog_compiler_pic_works+:} false; then :
11188   $as_echo_n "(cached) " >&6
11189 else
11190   lt_cv_prog_compiler_pic_works=no
11191    ac_outfile=conftest.$ac_objext
11192    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11193    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
11194    # Insert the option either (1) after the last *FLAGS variable, or
11195    # (2) before a word containing "conftest.", or (3) at the end.
11196    # Note that $ac_compile itself does not contain backslashes and begins
11197    # with a dollar sign (not a hyphen), so the echo should work correctly.
11198    # The option is referenced via a variable to avoid confusing sed.
11199    lt_compile=`echo "$ac_compile" | $SED \
11200    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11201    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11202    -e 's:$: $lt_compiler_flag:'`
11203    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11204    (eval "$lt_compile" 2>conftest.err)
11205    ac_status=$?
11206    cat conftest.err >&5
11207    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11208    if (exit $ac_status) && test -s "$ac_outfile"; then
11209      # The compiler can only warn and ignore the option if not recognized
11210      # So say no if there are warnings other than the usual output.
11211      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11212      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11213      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11214        lt_cv_prog_compiler_pic_works=yes
11215      fi
11216    fi
11217    $RM conftest*
11218
11219 fi
11220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
11221 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
11222
11223 if test yes = "$lt_cv_prog_compiler_pic_works"; then
11224     case $lt_prog_compiler_pic in
11225      "" | " "*) ;;
11226      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11227      esac
11228 else
11229     lt_prog_compiler_pic=
11230      lt_prog_compiler_can_build_shared=no
11231 fi
11232
11233 fi
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245 #
11246 # Check to make sure the static flag actually works.
11247 #
11248 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11250 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11251 if ${lt_cv_prog_compiler_static_works+:} false; then :
11252   $as_echo_n "(cached) " >&6
11253 else
11254   lt_cv_prog_compiler_static_works=no
11255    save_LDFLAGS=$LDFLAGS
11256    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11257    echo "$lt_simple_link_test_code" > conftest.$ac_ext
11258    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11259      # The linker can only warn and ignore the option if not recognized
11260      # So say no if there are warnings
11261      if test -s conftest.err; then
11262        # Append any errors to the config.log.
11263        cat conftest.err 1>&5
11264        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11265        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11266        if diff conftest.exp conftest.er2 >/dev/null; then
11267          lt_cv_prog_compiler_static_works=yes
11268        fi
11269      else
11270        lt_cv_prog_compiler_static_works=yes
11271      fi
11272    fi
11273    $RM -r conftest*
11274    LDFLAGS=$save_LDFLAGS
11275
11276 fi
11277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11278 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
11279
11280 if test yes = "$lt_cv_prog_compiler_static_works"; then
11281     :
11282 else
11283     lt_prog_compiler_static=
11284 fi
11285
11286
11287
11288
11289
11290
11291
11292   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11293 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11294 if ${lt_cv_prog_compiler_c_o+:} false; then :
11295   $as_echo_n "(cached) " >&6
11296 else
11297   lt_cv_prog_compiler_c_o=no
11298    $RM -r conftest 2>/dev/null
11299    mkdir conftest
11300    cd conftest
11301    mkdir out
11302    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11303
11304    lt_compiler_flag="-o out/conftest2.$ac_objext"
11305    # Insert the option either (1) after the last *FLAGS variable, or
11306    # (2) before a word containing "conftest.", or (3) at the end.
11307    # Note that $ac_compile itself does not contain backslashes and begins
11308    # with a dollar sign (not a hyphen), so the echo should work correctly.
11309    lt_compile=`echo "$ac_compile" | $SED \
11310    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11311    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11312    -e 's:$: $lt_compiler_flag:'`
11313    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11314    (eval "$lt_compile" 2>out/conftest.err)
11315    ac_status=$?
11316    cat out/conftest.err >&5
11317    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11318    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11319    then
11320      # The compiler can only warn and ignore the option if not recognized
11321      # So say no if there are warnings
11322      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11323      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11324      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11325        lt_cv_prog_compiler_c_o=yes
11326      fi
11327    fi
11328    chmod u+w . 2>&5
11329    $RM conftest*
11330    # SGI C++ compiler will create directory out/ii_files/ for
11331    # template instantiation
11332    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11333    $RM out/* && rmdir out
11334    cd ..
11335    $RM -r conftest
11336    $RM conftest*
11337
11338 fi
11339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11340 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11341
11342
11343
11344
11345
11346
11347   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11348 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11349 if ${lt_cv_prog_compiler_c_o+:} false; then :
11350   $as_echo_n "(cached) " >&6
11351 else
11352   lt_cv_prog_compiler_c_o=no
11353    $RM -r conftest 2>/dev/null
11354    mkdir conftest
11355    cd conftest
11356    mkdir out
11357    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11358
11359    lt_compiler_flag="-o out/conftest2.$ac_objext"
11360    # Insert the option either (1) after the last *FLAGS variable, or
11361    # (2) before a word containing "conftest.", or (3) at the end.
11362    # Note that $ac_compile itself does not contain backslashes and begins
11363    # with a dollar sign (not a hyphen), so the echo should work correctly.
11364    lt_compile=`echo "$ac_compile" | $SED \
11365    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11366    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11367    -e 's:$: $lt_compiler_flag:'`
11368    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11369    (eval "$lt_compile" 2>out/conftest.err)
11370    ac_status=$?
11371    cat out/conftest.err >&5
11372    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11373    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11374    then
11375      # The compiler can only warn and ignore the option if not recognized
11376      # So say no if there are warnings
11377      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11378      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11379      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11380        lt_cv_prog_compiler_c_o=yes
11381      fi
11382    fi
11383    chmod u+w . 2>&5
11384    $RM conftest*
11385    # SGI C++ compiler will create directory out/ii_files/ for
11386    # template instantiation
11387    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11388    $RM out/* && rmdir out
11389    cd ..
11390    $RM -r conftest
11391    $RM conftest*
11392
11393 fi
11394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11395 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11396
11397
11398
11399
11400 hard_links=nottested
11401 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11402   # do not overwrite the value of need_locks provided by the user
11403   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11404 $as_echo_n "checking if we can lock with hard links... " >&6; }
11405   hard_links=yes
11406   $RM conftest*
11407   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11408   touch conftest.a
11409   ln conftest.a conftest.b 2>&5 || hard_links=no
11410   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11412 $as_echo "$hard_links" >&6; }
11413   if test no = "$hard_links"; then
11414     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11415 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11416     need_locks=warn
11417   fi
11418 else
11419   need_locks=no
11420 fi
11421
11422
11423
11424
11425
11426
11427   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11428 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11429
11430   runpath_var=
11431   allow_undefined_flag=
11432   always_export_symbols=no
11433   archive_cmds=
11434   archive_expsym_cmds=
11435   compiler_needs_object=no
11436   enable_shared_with_static_runtimes=no
11437   export_dynamic_flag_spec=
11438   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11439   hardcode_automatic=no
11440   hardcode_direct=no
11441   hardcode_direct_absolute=no
11442   hardcode_libdir_flag_spec=
11443   hardcode_libdir_separator=
11444   hardcode_minus_L=no
11445   hardcode_shlibpath_var=unsupported
11446   inherit_rpath=no
11447   link_all_deplibs=unknown
11448   module_cmds=
11449   module_expsym_cmds=
11450   old_archive_from_new_cmds=
11451   old_archive_from_expsyms_cmds=
11452   thread_safe_flag_spec=
11453   whole_archive_flag_spec=
11454   # include_expsyms should be a list of space-separated symbols to be *always*
11455   # included in the symbol list
11456   include_expsyms=
11457   # exclude_expsyms can be an extended regexp of symbols to exclude
11458   # it will be wrapped by ' (' and ')$', so one must not match beginning or
11459   # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11460   # as well as any symbol that contains 'd'.
11461   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11462   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11463   # platforms (ab)use it in PIC code, but their linkers get confused if
11464   # the symbol is explicitly referenced.  Since portable code cannot
11465   # rely on this symbol name, it's probably fine to never include it in
11466   # preloaded symbol tables.
11467   # Exclude shared library initialization/finalization symbols.
11468   extract_expsyms_cmds=
11469
11470   case $host_os in
11471   cygwin* | mingw* | pw32* | cegcc*)
11472     # FIXME: the MSVC++ port hasn't been tested in a loooong time
11473     # When not using gcc, we currently assume that we are using
11474     # Microsoft Visual C++.
11475     if test yes != "$GCC"; then
11476       with_gnu_ld=no
11477     fi
11478     ;;
11479   interix*)
11480     # we just hope/assume this is gcc and not c89 (= MSVC++)
11481     with_gnu_ld=yes
11482     ;;
11483   openbsd* | bitrig*)
11484     with_gnu_ld=no
11485     ;;
11486   esac
11487
11488   ld_shlibs=yes
11489
11490   # On some targets, GNU ld is compatible enough with the native linker
11491   # that we're better off using the native interface for both.
11492   lt_use_gnu_ld_interface=no
11493   if test yes = "$with_gnu_ld"; then
11494     case $host_os in
11495       aix*)
11496         # The AIX port of GNU ld has always aspired to compatibility
11497         # with the native linker.  However, as the warning in the GNU ld
11498         # block says, versions before 2.19.5* couldn't really create working
11499         # shared libraries, regardless of the interface used.
11500         case `$LD -v 2>&1` in
11501           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11502           *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11503           *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11504           *)
11505             lt_use_gnu_ld_interface=yes
11506             ;;
11507         esac
11508         ;;
11509       *)
11510         lt_use_gnu_ld_interface=yes
11511         ;;
11512     esac
11513   fi
11514
11515   if test yes = "$lt_use_gnu_ld_interface"; then
11516     # If archive_cmds runs LD, not CC, wlarc should be empty
11517     wlarc='$wl'
11518
11519     # Set some defaults for GNU ld with shared library support. These
11520     # are reset later if shared libraries are not supported. Putting them
11521     # here allows them to be overridden if necessary.
11522     runpath_var=LD_RUN_PATH
11523     hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11524     export_dynamic_flag_spec='$wl--export-dynamic'
11525     # ancient GNU ld didn't support --whole-archive et. al.
11526     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11527       whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11528     else
11529       whole_archive_flag_spec=
11530     fi
11531     supports_anon_versioning=no
11532     case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11533       *GNU\ gold*) supports_anon_versioning=yes ;;
11534       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11535       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11536       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11537       *\ 2.11.*) ;; # other 2.11 versions
11538       *) supports_anon_versioning=yes ;;
11539     esac
11540
11541     # See if GNU ld supports shared libraries.
11542     case $host_os in
11543     aix[3-9]*)
11544       # On AIX/PPC, the GNU linker is very broken
11545       if test ia64 != "$host_cpu"; then
11546         ld_shlibs=no
11547         cat <<_LT_EOF 1>&2
11548
11549 *** Warning: the GNU linker, at least up to release 2.19, is reported
11550 *** to be unable to reliably create shared libraries on AIX.
11551 *** Therefore, libtool is disabling shared libraries support.  If you
11552 *** really care for shared libraries, you may want to install binutils
11553 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11554 *** You will then need to restart the configuration process.
11555
11556 _LT_EOF
11557       fi
11558       ;;
11559
11560     amigaos*)
11561       case $host_cpu in
11562       powerpc)
11563             # see comment about AmigaOS4 .so support
11564             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11565             archive_expsym_cmds=''
11566         ;;
11567       m68k)
11568             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)'
11569             hardcode_libdir_flag_spec='-L$libdir'
11570             hardcode_minus_L=yes
11571         ;;
11572       esac
11573       ;;
11574
11575     beos*)
11576       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11577         allow_undefined_flag=unsupported
11578         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11579         # support --undefined.  This deserves some investigation.  FIXME
11580         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11581       else
11582         ld_shlibs=no
11583       fi
11584       ;;
11585
11586     cygwin* | mingw* | pw32* | cegcc*)
11587       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11588       # as there is no search path for DLLs.
11589       hardcode_libdir_flag_spec='-L$libdir'
11590       export_dynamic_flag_spec='$wl--export-all-symbols'
11591       allow_undefined_flag=unsupported
11592       always_export_symbols=no
11593       enable_shared_with_static_runtimes=yes
11594       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'
11595       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11596
11597       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11598         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11599         # If the export-symbols file already is a .def file, use it as
11600         # is; otherwise, prepend EXPORTS...
11601         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11602           cp $export_symbols $output_objdir/$soname.def;
11603         else
11604           echo EXPORTS > $output_objdir/$soname.def;
11605           cat $export_symbols >> $output_objdir/$soname.def;
11606         fi~
11607         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11608       else
11609         ld_shlibs=no
11610       fi
11611       ;;
11612
11613     haiku*)
11614       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11615       link_all_deplibs=yes
11616       ;;
11617
11618     os2*)
11619       hardcode_libdir_flag_spec='-L$libdir'
11620       hardcode_minus_L=yes
11621       allow_undefined_flag=unsupported
11622       shrext_cmds=.dll
11623       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11624         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11625         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11626         $ECHO EXPORTS >> $output_objdir/$libname.def~
11627         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11628         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11629         emximp -o $lib $output_objdir/$libname.def'
11630       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11631         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11632         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11633         $ECHO EXPORTS >> $output_objdir/$libname.def~
11634         prefix_cmds="$SED"~
11635         if test EXPORTS = "`$SED 1q $export_symbols`"; then
11636           prefix_cmds="$prefix_cmds -e 1d";
11637         fi~
11638         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11639         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11640         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11641         emximp -o $lib $output_objdir/$libname.def'
11642       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11643       enable_shared_with_static_runtimes=yes
11644       ;;
11645
11646     interix[3-9]*)
11647       hardcode_direct=no
11648       hardcode_shlibpath_var=no
11649       hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11650       export_dynamic_flag_spec='$wl-E'
11651       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11652       # Instead, shared libraries are loaded at an image base (0x10000000 by
11653       # default) and relocated if they conflict, which is a slow very memory
11654       # consuming and fragmenting process.  To avoid this, we pick a random,
11655       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11656       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11657       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11658       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'
11659       ;;
11660
11661     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11662       tmp_diet=no
11663       if test linux-dietlibc = "$host_os"; then
11664         case $cc_basename in
11665           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
11666         esac
11667       fi
11668       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11669          && test no = "$tmp_diet"
11670       then
11671         tmp_addflag=' $pic_flag'
11672         tmp_sharedflag='-shared'
11673         case $cc_basename,$host_cpu in
11674         pgcc*)                          # Portland Group C compiler
11675           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'
11676           tmp_addflag=' $pic_flag'
11677           ;;
11678         pgf77* | pgf90* | pgf95* | pgfortran*)
11679                                         # Portland Group f77 and f90 compilers
11680           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'
11681           tmp_addflag=' $pic_flag -Mnomain' ;;
11682         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
11683           tmp_addflag=' -i_dynamic' ;;
11684         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
11685           tmp_addflag=' -i_dynamic -nofor_main' ;;
11686         ifc* | ifort*)                  # Intel Fortran compiler
11687           tmp_addflag=' -nofor_main' ;;
11688         lf95*)                          # Lahey Fortran 8.1
11689           whole_archive_flag_spec=
11690           tmp_sharedflag='--shared' ;;
11691         nagfor*)                        # NAGFOR 5.3
11692           tmp_sharedflag='-Wl,-shared' ;;
11693         xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11694           tmp_sharedflag='-qmkshrobj'
11695           tmp_addflag= ;;
11696         nvcc*)  # Cuda Compiler Driver 2.2
11697           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'
11698           compiler_needs_object=yes
11699           ;;
11700         esac
11701         case `$CC -V 2>&1 | sed 5q` in
11702         *Sun\ C*)                       # Sun C 5.9
11703           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'
11704           compiler_needs_object=yes
11705           tmp_sharedflag='-G' ;;
11706         *Sun\ F*)                       # Sun Fortran 8.3
11707           tmp_sharedflag='-G' ;;
11708         esac
11709         archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11710
11711         if test yes = "$supports_anon_versioning"; then
11712           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11713             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11714             echo "local: *; };" >> $output_objdir/$libname.ver~
11715             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11716         fi
11717
11718         case $cc_basename in
11719         tcc*)
11720           export_dynamic_flag_spec='-rdynamic'
11721           ;;
11722         xlf* | bgf* | bgxlf* | mpixlf*)
11723           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11724           whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11725           hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11726           archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11727           if test yes = "$supports_anon_versioning"; then
11728             archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11729               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11730               echo "local: *; };" >> $output_objdir/$libname.ver~
11731               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11732           fi
11733           ;;
11734         esac
11735       else
11736         ld_shlibs=no
11737       fi
11738       ;;
11739
11740     netbsd*)
11741       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11742         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11743         wlarc=
11744       else
11745         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11746         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11747       fi
11748       ;;
11749
11750     solaris*)
11751       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11752         ld_shlibs=no
11753         cat <<_LT_EOF 1>&2
11754
11755 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
11756 *** create shared libraries on Solaris systems.  Therefore, libtool
11757 *** is disabling shared libraries support.  We urge you to upgrade GNU
11758 *** binutils to release 2.9.1 or newer.  Another option is to modify
11759 *** your PATH or compiler configuration so that the native linker is
11760 *** used, and then restart.
11761
11762 _LT_EOF
11763       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11764         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11765         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11766       else
11767         ld_shlibs=no
11768       fi
11769       ;;
11770
11771     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11772       case `$LD -v 2>&1` in
11773         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11774         ld_shlibs=no
11775         cat <<_LT_EOF 1>&2
11776
11777 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11778 *** reliably create shared libraries on SCO systems.  Therefore, libtool
11779 *** is disabling shared libraries support.  We urge you to upgrade GNU
11780 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11781 *** your PATH or compiler configuration so that the native linker is
11782 *** used, and then restart.
11783
11784 _LT_EOF
11785         ;;
11786         *)
11787           # For security reasons, it is highly recommended that you always
11788           # use absolute paths for naming shared libraries, and exclude the
11789           # DT_RUNPATH tag from executables and libraries.  But doing so
11790           # requires that you compile everything twice, which is a pain.
11791           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11792             hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11793             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11794             archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11795           else
11796             ld_shlibs=no
11797           fi
11798         ;;
11799       esac
11800       ;;
11801
11802     sunos4*)
11803       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11804       wlarc=
11805       hardcode_direct=yes
11806       hardcode_shlibpath_var=no
11807       ;;
11808
11809     *)
11810       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11811         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11812         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11813       else
11814         ld_shlibs=no
11815       fi
11816       ;;
11817     esac
11818
11819     if test no = "$ld_shlibs"; then
11820       runpath_var=
11821       hardcode_libdir_flag_spec=
11822       export_dynamic_flag_spec=
11823       whole_archive_flag_spec=
11824     fi
11825   else
11826     # PORTME fill in a description of your system's linker (not GNU ld)
11827     case $host_os in
11828     aix3*)
11829       allow_undefined_flag=unsupported
11830       always_export_symbols=yes
11831       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'
11832       # Note: this linker hardcodes the directories in LIBPATH if there
11833       # are no directories specified by -L.
11834       hardcode_minus_L=yes
11835       if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11836         # Neither direct hardcoding nor static linking is supported with a
11837         # broken collect2.
11838         hardcode_direct=unsupported
11839       fi
11840       ;;
11841
11842     aix[4-9]*)
11843       if test ia64 = "$host_cpu"; then
11844         # On IA64, the linker does run time linking by default, so we don't
11845         # have to do anything special.
11846         aix_use_runtimelinking=no
11847         exp_sym_flag='-Bexport'
11848         no_entry_flag=
11849       else
11850         # If we're using GNU nm, then we don't want the "-C" option.
11851         # -C means demangle to GNU nm, but means don't demangle to AIX nm.
11852         # Without the "-l" option, or with the "-B" option, AIX nm treats
11853         # weak defined symbols like other global defined symbols, whereas
11854         # GNU nm marks them as "W".
11855         # While the 'weak' keyword is ignored in the Export File, we need
11856         # it in the Import File for the 'aix-soname' feature, so we have
11857         # to replace the "-B" option with "-P" for AIX nm.
11858         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11859           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'
11860         else
11861           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'
11862         fi
11863         aix_use_runtimelinking=no
11864
11865         # Test if we are trying to use run time linking or normal
11866         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
11867         # have runtime linking enabled, and use it for executables.
11868         # For shared libraries, we enable/disable runtime linking
11869         # depending on the kind of the shared library created -
11870         # when "with_aix_soname,aix_use_runtimelinking" is:
11871         # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
11872         # "aix,yes"  lib.so          shared, rtl:yes, for executables
11873         #            lib.a           static archive
11874         # "both,no"  lib.so.V(shr.o) shared, rtl:yes
11875         #            lib.a(lib.so.V) shared, rtl:no,  for executables
11876         # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11877         #            lib.a(lib.so.V) shared, rtl:no
11878         # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
11879         #            lib.a           static archive
11880         case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11881           for ld_flag in $LDFLAGS; do
11882           if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11883             aix_use_runtimelinking=yes
11884             break
11885           fi
11886           done
11887           if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11888             # With aix-soname=svr4, we create the lib.so.V shared archives only,
11889             # so we don't have lib.a shared libs to link our executables.
11890             # We have to force runtime linking in this case.
11891             aix_use_runtimelinking=yes
11892             LDFLAGS="$LDFLAGS -Wl,-brtl"
11893           fi
11894           ;;
11895         esac
11896
11897         exp_sym_flag='-bexport'
11898         no_entry_flag='-bnoentry'
11899       fi
11900
11901       # When large executables or shared objects are built, AIX ld can
11902       # have problems creating the table of contents.  If linking a library
11903       # or program results in "error TOC overflow" add -mminimal-toc to
11904       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11905       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11906
11907       archive_cmds=''
11908       hardcode_direct=yes
11909       hardcode_direct_absolute=yes
11910       hardcode_libdir_separator=':'
11911       link_all_deplibs=yes
11912       file_list_spec='$wl-f,'
11913       case $with_aix_soname,$aix_use_runtimelinking in
11914       aix,*) ;; # traditional, no import file
11915       svr4,* | *,yes) # use import file
11916         # The Import File defines what to hardcode.
11917         hardcode_direct=no
11918         hardcode_direct_absolute=no
11919         ;;
11920       esac
11921
11922       if test yes = "$GCC"; then
11923         case $host_os in aix4.[012]|aix4.[012].*)
11924         # We only want to do this on AIX 4.2 and lower, the check
11925         # below for broken collect2 doesn't work under 4.3+
11926           collect2name=`$CC -print-prog-name=collect2`
11927           if test -f "$collect2name" &&
11928            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
11929           then
11930           # We have reworked collect2
11931           :
11932           else
11933           # We have old collect2
11934           hardcode_direct=unsupported
11935           # It fails to find uninstalled libraries when the uninstalled
11936           # path is not listed in the libpath.  Setting hardcode_minus_L
11937           # to unsupported forces relinking
11938           hardcode_minus_L=yes
11939           hardcode_libdir_flag_spec='-L$libdir'
11940           hardcode_libdir_separator=
11941           fi
11942           ;;
11943         esac
11944         shared_flag='-shared'
11945         if test yes = "$aix_use_runtimelinking"; then
11946           shared_flag="$shared_flag "'$wl-G'
11947         fi
11948         # Need to ensure runtime linking is disabled for the traditional
11949         # shared library, or the linker may eventually find shared libraries
11950         # /with/ Import File - we do not want to mix them.
11951         shared_flag_aix='-shared'
11952         shared_flag_svr4='-shared $wl-G'
11953       else
11954         # not using gcc
11955         if test ia64 = "$host_cpu"; then
11956         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11957         # chokes on -Wl,-G. The following line is correct:
11958           shared_flag='-G'
11959         else
11960           if test yes = "$aix_use_runtimelinking"; then
11961             shared_flag='$wl-G'
11962           else
11963             shared_flag='$wl-bM:SRE'
11964           fi
11965           shared_flag_aix='$wl-bM:SRE'
11966           shared_flag_svr4='$wl-G'
11967         fi
11968       fi
11969
11970       export_dynamic_flag_spec='$wl-bexpall'
11971       # It seems that -bexpall does not export symbols beginning with
11972       # underscore (_), so it is better to generate a list of symbols to export.
11973       always_export_symbols=yes
11974       if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
11975         # Warning - without using the other runtime loading flags (-brtl),
11976         # -berok will link without error, but may produce a broken library.
11977         allow_undefined_flag='-berok'
11978         # Determine the default libpath from the value encoded in an
11979         # empty executable.
11980         if test set = "${lt_cv_aix_libpath+set}"; then
11981   aix_libpath=$lt_cv_aix_libpath
11982 else
11983   if ${lt_cv_aix_libpath_+:} false; then :
11984   $as_echo_n "(cached) " >&6
11985 else
11986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11987 /* end confdefs.h.  */
11988
11989 int
11990 main ()
11991 {
11992
11993   ;
11994   return 0;
11995 }
11996 _ACEOF
11997 if ac_fn_c_try_link "$LINENO"; then :
11998
11999   lt_aix_libpath_sed='
12000       /Import File Strings/,/^$/ {
12001           /^0/ {
12002               s/^0  *\([^ ]*\) *$/\1/
12003               p
12004           }
12005       }'
12006   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12007   # Check for a 64-bit object if we didn't find anything.
12008   if test -z "$lt_cv_aix_libpath_"; then
12009     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12010   fi
12011 fi
12012 rm -f core conftest.err conftest.$ac_objext \
12013     conftest$ac_exeext conftest.$ac_ext
12014   if test -z "$lt_cv_aix_libpath_"; then
12015     lt_cv_aix_libpath_=/usr/lib:/lib
12016   fi
12017
12018 fi
12019
12020   aix_libpath=$lt_cv_aix_libpath_
12021 fi
12022
12023         hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12024         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
12025       else
12026         if test ia64 = "$host_cpu"; then
12027           hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
12028           allow_undefined_flag="-z nodefs"
12029           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"
12030         else
12031          # Determine the default libpath from the value encoded in an
12032          # empty executable.
12033          if test set = "${lt_cv_aix_libpath+set}"; then
12034   aix_libpath=$lt_cv_aix_libpath
12035 else
12036   if ${lt_cv_aix_libpath_+:} false; then :
12037   $as_echo_n "(cached) " >&6
12038 else
12039   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12040 /* end confdefs.h.  */
12041
12042 int
12043 main ()
12044 {
12045
12046   ;
12047   return 0;
12048 }
12049 _ACEOF
12050 if ac_fn_c_try_link "$LINENO"; then :
12051
12052   lt_aix_libpath_sed='
12053       /Import File Strings/,/^$/ {
12054           /^0/ {
12055               s/^0  *\([^ ]*\) *$/\1/
12056               p
12057           }
12058       }'
12059   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12060   # Check for a 64-bit object if we didn't find anything.
12061   if test -z "$lt_cv_aix_libpath_"; then
12062     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12063   fi
12064 fi
12065 rm -f core conftest.err conftest.$ac_objext \
12066     conftest$ac_exeext conftest.$ac_ext
12067   if test -z "$lt_cv_aix_libpath_"; then
12068     lt_cv_aix_libpath_=/usr/lib:/lib
12069   fi
12070
12071 fi
12072
12073   aix_libpath=$lt_cv_aix_libpath_
12074 fi
12075
12076          hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12077           # Warning - without using the other run time loading flags,
12078           # -berok will link without error, but may produce a broken library.
12079           no_undefined_flag=' $wl-bernotok'
12080           allow_undefined_flag=' $wl-berok'
12081           if test yes = "$with_gnu_ld"; then
12082             # We only use this code for GNU lds that support --whole-archive.
12083             whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
12084           else
12085             # Exported symbols can be pulled into shared objects from archives
12086             whole_archive_flag_spec='$convenience'
12087           fi
12088           archive_cmds_need_lc=yes
12089           archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
12090           # -brtl affects multiple linker settings, -berok does not and is overridden later
12091           compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
12092           if test svr4 != "$with_aix_soname"; then
12093             # This is similar to how AIX traditionally builds its shared libraries.
12094             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'
12095           fi
12096           if test aix != "$with_aix_soname"; then
12097             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'
12098           else
12099             # used by -dlpreopen to get the symbols
12100             archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
12101           fi
12102           archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
12103         fi
12104       fi
12105       ;;
12106
12107     amigaos*)
12108       case $host_cpu in
12109       powerpc)
12110             # see comment about AmigaOS4 .so support
12111             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12112             archive_expsym_cmds=''
12113         ;;
12114       m68k)
12115             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)'
12116             hardcode_libdir_flag_spec='-L$libdir'
12117             hardcode_minus_L=yes
12118         ;;
12119       esac
12120       ;;
12121
12122     bsdi[45]*)
12123       export_dynamic_flag_spec=-rdynamic
12124       ;;
12125
12126     cygwin* | mingw* | pw32* | cegcc*)
12127       # When not using gcc, we currently assume that we are using
12128       # Microsoft Visual C++.
12129       # hardcode_libdir_flag_spec is actually meaningless, as there is
12130       # no search path for DLLs.
12131       case $cc_basename in
12132       cl*)
12133         # Native MSVC
12134         hardcode_libdir_flag_spec=' '
12135         allow_undefined_flag=unsupported
12136         always_export_symbols=yes
12137         file_list_spec='@'
12138         # Tell ltmain to make .lib files, not .a files.
12139         libext=lib
12140         # Tell ltmain to make .dll files, not .so files.
12141         shrext_cmds=.dll
12142         # FIXME: Setting linknames here is a bad hack.
12143         archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
12144         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12145             cp "$export_symbols" "$output_objdir/$soname.def";
12146             echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
12147           else
12148             $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
12149           fi~
12150           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12151           linknames='
12152         # The linker will not automatically build a static lib if we build a DLL.
12153         # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12154         enable_shared_with_static_runtimes=yes
12155         exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
12156         export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12157         # Don't use ranlib
12158         old_postinstall_cmds='chmod 644 $oldlib'
12159         postlink_cmds='lt_outputfile="@OUTPUT@"~
12160           lt_tool_outputfile="@TOOL_OUTPUT@"~
12161           case $lt_outputfile in
12162             *.exe|*.EXE) ;;
12163             *)
12164               lt_outputfile=$lt_outputfile.exe
12165               lt_tool_outputfile=$lt_tool_outputfile.exe
12166               ;;
12167           esac~
12168           if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
12169             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12170             $RM "$lt_outputfile.manifest";
12171           fi'
12172         ;;
12173       *)
12174         # Assume MSVC wrapper
12175         hardcode_libdir_flag_spec=' '
12176         allow_undefined_flag=unsupported
12177         # Tell ltmain to make .lib files, not .a files.
12178         libext=lib
12179         # Tell ltmain to make .dll files, not .so files.
12180         shrext_cmds=.dll
12181         # FIXME: Setting linknames here is a bad hack.
12182         archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12183         # The linker will automatically build a .lib file if we build a DLL.
12184         old_archive_from_new_cmds='true'
12185         # FIXME: Should let the user specify the lib program.
12186         old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12187         enable_shared_with_static_runtimes=yes
12188         ;;
12189       esac
12190       ;;
12191
12192     darwin* | rhapsody*)
12193
12194
12195   archive_cmds_need_lc=no
12196   hardcode_direct=no
12197   hardcode_automatic=yes
12198   hardcode_shlibpath_var=unsupported
12199   if test yes = "$lt_cv_ld_force_load"; then
12200     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\"`'
12201
12202   else
12203     whole_archive_flag_spec=''
12204   fi
12205   link_all_deplibs=yes
12206   allow_undefined_flag=$_lt_dar_allow_undefined
12207   case $cc_basename in
12208      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
12209      *) _lt_dar_can_shared=$GCC ;;
12210   esac
12211   if test yes = "$_lt_dar_can_shared"; then
12212     output_verbose_link_cmd=func_echo_all
12213     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
12214     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
12215     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"
12216     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"
12217
12218   else
12219   ld_shlibs=no
12220   fi
12221
12222       ;;
12223
12224     dgux*)
12225       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12226       hardcode_libdir_flag_spec='-L$libdir'
12227       hardcode_shlibpath_var=no
12228       ;;
12229
12230     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12231     # support.  Future versions do this automatically, but an explicit c++rt0.o
12232     # does not break anything, and helps significantly (at the cost of a little
12233     # extra space).
12234     freebsd2.2*)
12235       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12236       hardcode_libdir_flag_spec='-R$libdir'
12237       hardcode_direct=yes
12238       hardcode_shlibpath_var=no
12239       ;;
12240
12241     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12242     freebsd2.*)
12243       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12244       hardcode_direct=yes
12245       hardcode_minus_L=yes
12246       hardcode_shlibpath_var=no
12247       ;;
12248
12249     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12250     freebsd* | dragonfly*)
12251       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12252       hardcode_libdir_flag_spec='-R$libdir'
12253       hardcode_direct=yes
12254       hardcode_shlibpath_var=no
12255       ;;
12256
12257     hpux9*)
12258       if test yes = "$GCC"; then
12259         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'
12260       else
12261         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'
12262       fi
12263       hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12264       hardcode_libdir_separator=:
12265       hardcode_direct=yes
12266
12267       # hardcode_minus_L: Not really in the search PATH,
12268       # but as the default location of the library.
12269       hardcode_minus_L=yes
12270       export_dynamic_flag_spec='$wl-E'
12271       ;;
12272
12273     hpux10*)
12274       if test yes,no = "$GCC,$with_gnu_ld"; then
12275         archive_cmds='$CC -shared $pic_flag $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       if test no = "$with_gnu_ld"; then
12280         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12281         hardcode_libdir_separator=:
12282         hardcode_direct=yes
12283         hardcode_direct_absolute=yes
12284         export_dynamic_flag_spec='$wl-E'
12285         # hardcode_minus_L: Not really in the search PATH,
12286         # but as the default location of the library.
12287         hardcode_minus_L=yes
12288       fi
12289       ;;
12290
12291     hpux11*)
12292       if test yes,no = "$GCC,$with_gnu_ld"; then
12293         case $host_cpu in
12294         hppa*64*)
12295           archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12296           ;;
12297         ia64*)
12298           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12299           ;;
12300         *)
12301           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12302           ;;
12303         esac
12304       else
12305         case $host_cpu in
12306         hppa*64*)
12307           archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12308           ;;
12309         ia64*)
12310           archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12311           ;;
12312         *)
12313
12314           # Older versions of the 11.00 compiler do not understand -b yet
12315           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12316           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12317 $as_echo_n "checking if $CC understands -b... " >&6; }
12318 if ${lt_cv_prog_compiler__b+:} false; then :
12319   $as_echo_n "(cached) " >&6
12320 else
12321   lt_cv_prog_compiler__b=no
12322    save_LDFLAGS=$LDFLAGS
12323    LDFLAGS="$LDFLAGS -b"
12324    echo "$lt_simple_link_test_code" > conftest.$ac_ext
12325    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12326      # The linker can only warn and ignore the option if not recognized
12327      # So say no if there are warnings
12328      if test -s conftest.err; then
12329        # Append any errors to the config.log.
12330        cat conftest.err 1>&5
12331        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12332        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12333        if diff conftest.exp conftest.er2 >/dev/null; then
12334          lt_cv_prog_compiler__b=yes
12335        fi
12336      else
12337        lt_cv_prog_compiler__b=yes
12338      fi
12339    fi
12340    $RM -r conftest*
12341    LDFLAGS=$save_LDFLAGS
12342
12343 fi
12344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12345 $as_echo "$lt_cv_prog_compiler__b" >&6; }
12346
12347 if test yes = "$lt_cv_prog_compiler__b"; then
12348     archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12349 else
12350     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12351 fi
12352
12353           ;;
12354         esac
12355       fi
12356       if test no = "$with_gnu_ld"; then
12357         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12358         hardcode_libdir_separator=:
12359
12360         case $host_cpu in
12361         hppa*64*|ia64*)
12362           hardcode_direct=no
12363           hardcode_shlibpath_var=no
12364           ;;
12365         *)
12366           hardcode_direct=yes
12367           hardcode_direct_absolute=yes
12368           export_dynamic_flag_spec='$wl-E'
12369
12370           # hardcode_minus_L: Not really in the search PATH,
12371           # but as the default location of the library.
12372           hardcode_minus_L=yes
12373           ;;
12374         esac
12375       fi
12376       ;;
12377
12378     irix5* | irix6* | nonstopux*)
12379       if test yes = "$GCC"; then
12380         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'
12381         # Try to use the -exported_symbol ld option, if it does not
12382         # work, assume that -exports_file does not work either and
12383         # implicitly export all symbols.
12384         # This should be the same for all languages, so no per-tag cache variable.
12385         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12386 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12387 if ${lt_cv_irix_exported_symbol+:} false; then :
12388   $as_echo_n "(cached) " >&6
12389 else
12390   save_LDFLAGS=$LDFLAGS
12391            LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12392            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12393 /* end confdefs.h.  */
12394 int foo (void) { return 0; }
12395 _ACEOF
12396 if ac_fn_c_try_link "$LINENO"; then :
12397   lt_cv_irix_exported_symbol=yes
12398 else
12399   lt_cv_irix_exported_symbol=no
12400 fi
12401 rm -f core conftest.err conftest.$ac_objext \
12402     conftest$ac_exeext conftest.$ac_ext
12403            LDFLAGS=$save_LDFLAGS
12404 fi
12405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12406 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
12407         if test yes = "$lt_cv_irix_exported_symbol"; then
12408           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'
12409         fi
12410       else
12411         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'
12412         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'
12413       fi
12414       archive_cmds_need_lc='no'
12415       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12416       hardcode_libdir_separator=:
12417       inherit_rpath=yes
12418       link_all_deplibs=yes
12419       ;;
12420
12421     linux*)
12422       case $cc_basename in
12423       tcc*)
12424         # Fabrice Bellard et al's Tiny C Compiler
12425         ld_shlibs=yes
12426         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12427         ;;
12428       esac
12429       ;;
12430
12431     netbsd*)
12432       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12433         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12434       else
12435         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12436       fi
12437       hardcode_libdir_flag_spec='-R$libdir'
12438       hardcode_direct=yes
12439       hardcode_shlibpath_var=no
12440       ;;
12441
12442     newsos6)
12443       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12444       hardcode_direct=yes
12445       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12446       hardcode_libdir_separator=:
12447       hardcode_shlibpath_var=no
12448       ;;
12449
12450     *nto* | *qnx*)
12451       ;;
12452
12453     openbsd* | bitrig*)
12454       if test -f /usr/libexec/ld.so; then
12455         hardcode_direct=yes
12456         hardcode_shlibpath_var=no
12457         hardcode_direct_absolute=yes
12458         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12459           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12460           archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12461           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12462           export_dynamic_flag_spec='$wl-E'
12463         else
12464           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12465           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12466         fi
12467       else
12468         ld_shlibs=no
12469       fi
12470       ;;
12471
12472     os2*)
12473       hardcode_libdir_flag_spec='-L$libdir'
12474       hardcode_minus_L=yes
12475       allow_undefined_flag=unsupported
12476       shrext_cmds=.dll
12477       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12478         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12479         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12480         $ECHO EXPORTS >> $output_objdir/$libname.def~
12481         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12482         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12483         emximp -o $lib $output_objdir/$libname.def'
12484       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12485         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12486         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12487         $ECHO EXPORTS >> $output_objdir/$libname.def~
12488         prefix_cmds="$SED"~
12489         if test EXPORTS = "`$SED 1q $export_symbols`"; then
12490           prefix_cmds="$prefix_cmds -e 1d";
12491         fi~
12492         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12493         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12494         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12495         emximp -o $lib $output_objdir/$libname.def'
12496       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12497       enable_shared_with_static_runtimes=yes
12498       ;;
12499
12500     osf3*)
12501       if test yes = "$GCC"; then
12502         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12503         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'
12504       else
12505         allow_undefined_flag=' -expect_unresolved \*'
12506         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'
12507       fi
12508       archive_cmds_need_lc='no'
12509       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12510       hardcode_libdir_separator=:
12511       ;;
12512
12513     osf4* | osf5*)      # as osf3* with the addition of -msym flag
12514       if test yes = "$GCC"; then
12515         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12516         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'
12517         hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12518       else
12519         allow_undefined_flag=' -expect_unresolved \*'
12520         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'
12521         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~
12522           $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'
12523
12524         # Both c and cxx compiler support -rpath directly
12525         hardcode_libdir_flag_spec='-rpath $libdir'
12526       fi
12527       archive_cmds_need_lc='no'
12528       hardcode_libdir_separator=:
12529       ;;
12530
12531     solaris*)
12532       no_undefined_flag=' -z defs'
12533       if test yes = "$GCC"; then
12534         wlarc='$wl'
12535         archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12536         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12537           $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'
12538       else
12539         case `$CC -V 2>&1` in
12540         *"Compilers 5.0"*)
12541           wlarc=''
12542           archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12543           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12544             $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12545           ;;
12546         *)
12547           wlarc='$wl'
12548           archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12549           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12550             $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12551           ;;
12552         esac
12553       fi
12554       hardcode_libdir_flag_spec='-R$libdir'
12555       hardcode_shlibpath_var=no
12556       case $host_os in
12557       solaris2.[0-5] | solaris2.[0-5].*) ;;
12558       *)
12559         # The compiler driver will combine and reorder linker options,
12560         # but understands '-z linker_flag'.  GCC discards it without '$wl',
12561         # but is careful enough not to reorder.
12562         # Supported since Solaris 2.6 (maybe 2.5.1?)
12563         if test yes = "$GCC"; then
12564           whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12565         else
12566           whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12567         fi
12568         ;;
12569       esac
12570       link_all_deplibs=yes
12571       ;;
12572
12573     sunos4*)
12574       if test sequent = "$host_vendor"; then
12575         # Use $CC to link under sequent, because it throws in some extra .o
12576         # files that make .init and .fini sections work.
12577         archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12578       else
12579         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12580       fi
12581       hardcode_libdir_flag_spec='-L$libdir'
12582       hardcode_direct=yes
12583       hardcode_minus_L=yes
12584       hardcode_shlibpath_var=no
12585       ;;
12586
12587     sysv4)
12588       case $host_vendor in
12589         sni)
12590           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12591           hardcode_direct=yes # is this really true???
12592         ;;
12593         siemens)
12594           ## LD is ld it makes a PLAMLIB
12595           ## CC just makes a GrossModule.
12596           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12597           reload_cmds='$CC -r -o $output$reload_objs'
12598           hardcode_direct=no
12599         ;;
12600         motorola)
12601           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12602           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12603         ;;
12604       esac
12605       runpath_var='LD_RUN_PATH'
12606       hardcode_shlibpath_var=no
12607       ;;
12608
12609     sysv4.3*)
12610       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12611       hardcode_shlibpath_var=no
12612       export_dynamic_flag_spec='-Bexport'
12613       ;;
12614
12615     sysv4*MP*)
12616       if test -d /usr/nec; then
12617         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12618         hardcode_shlibpath_var=no
12619         runpath_var=LD_RUN_PATH
12620         hardcode_runpath_var=yes
12621         ld_shlibs=yes
12622       fi
12623       ;;
12624
12625     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12626       no_undefined_flag='$wl-z,text'
12627       archive_cmds_need_lc=no
12628       hardcode_shlibpath_var=no
12629       runpath_var='LD_RUN_PATH'
12630
12631       if test yes = "$GCC"; then
12632         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12633         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12634       else
12635         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12636         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12637       fi
12638       ;;
12639
12640     sysv5* | sco3.2v5* | sco5v6*)
12641       # Note: We CANNOT use -z defs as we might desire, because we do not
12642       # link with -lc, and that would cause any symbols used from libc to
12643       # always be unresolved, which means just about no library would
12644       # ever link correctly.  If we're not using GNU ld we use -z text
12645       # though, which does catch some bad symbols but isn't as heavy-handed
12646       # as -z defs.
12647       no_undefined_flag='$wl-z,text'
12648       allow_undefined_flag='$wl-z,nodefs'
12649       archive_cmds_need_lc=no
12650       hardcode_shlibpath_var=no
12651       hardcode_libdir_flag_spec='$wl-R,$libdir'
12652       hardcode_libdir_separator=':'
12653       link_all_deplibs=yes
12654       export_dynamic_flag_spec='$wl-Bexport'
12655       runpath_var='LD_RUN_PATH'
12656
12657       if test yes = "$GCC"; then
12658         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12659         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12660       else
12661         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12662         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12663       fi
12664       ;;
12665
12666     uts4*)
12667       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12668       hardcode_libdir_flag_spec='-L$libdir'
12669       hardcode_shlibpath_var=no
12670       ;;
12671
12672     *)
12673       ld_shlibs=no
12674       ;;
12675     esac
12676
12677     if test sni = "$host_vendor"; then
12678       case $host in
12679       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12680         export_dynamic_flag_spec='$wl-Blargedynsym'
12681         ;;
12682       esac
12683     fi
12684   fi
12685
12686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12687 $as_echo "$ld_shlibs" >&6; }
12688 test no = "$ld_shlibs" && can_build_shared=no
12689
12690 with_gnu_ld=$with_gnu_ld
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706 #
12707 # Do we need to explicitly link libc?
12708 #
12709 case "x$archive_cmds_need_lc" in
12710 x|xyes)
12711   # Assume -lc should be added
12712   archive_cmds_need_lc=yes
12713
12714   if test yes,yes = "$GCC,$enable_shared"; then
12715     case $archive_cmds in
12716     *'~'*)
12717       # FIXME: we may have to deal with multi-command sequences.
12718       ;;
12719     '$CC '*)
12720       # Test whether the compiler implicitly links with -lc since on some
12721       # systems, -lgcc has to come before -lc. If gcc already passes -lc
12722       # to ld, don't add -lc before -lgcc.
12723       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12724 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12725 if ${lt_cv_archive_cmds_need_lc+:} false; then :
12726   $as_echo_n "(cached) " >&6
12727 else
12728   $RM conftest*
12729         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12730
12731         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12732   (eval $ac_compile) 2>&5
12733   ac_status=$?
12734   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12735   test $ac_status = 0; } 2>conftest.err; then
12736           soname=conftest
12737           lib=conftest
12738           libobjs=conftest.$ac_objext
12739           deplibs=
12740           wl=$lt_prog_compiler_wl
12741           pic_flag=$lt_prog_compiler_pic
12742           compiler_flags=-v
12743           linker_flags=-v
12744           verstring=
12745           output_objdir=.
12746           libname=conftest
12747           lt_save_allow_undefined_flag=$allow_undefined_flag
12748           allow_undefined_flag=
12749           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12750   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12751   ac_status=$?
12752   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12753   test $ac_status = 0; }
12754           then
12755             lt_cv_archive_cmds_need_lc=no
12756           else
12757             lt_cv_archive_cmds_need_lc=yes
12758           fi
12759           allow_undefined_flag=$lt_save_allow_undefined_flag
12760         else
12761           cat conftest.err 1>&5
12762         fi
12763         $RM conftest*
12764
12765 fi
12766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12767 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12768       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12769       ;;
12770     esac
12771   fi
12772   ;;
12773 esac
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
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12927 $as_echo_n "checking dynamic linker characteristics... " >&6; }
12928
12929 if test yes = "$GCC"; then
12930   case $host_os in
12931     darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
12932     *) lt_awk_arg='/^libraries:/' ;;
12933   esac
12934   case $host_os in
12935     mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
12936     *) lt_sed_strip_eq='s|=/|/|g' ;;
12937   esac
12938   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
12939   case $lt_search_path_spec in
12940   *\;*)
12941     # if the path contains ";" then we assume it to be the separator
12942     # otherwise default to the standard path separator (i.e. ":") - it is
12943     # assumed that no part of a normal pathname contains ";" but that should
12944     # okay in the real world where ";" in dirpaths is itself problematic.
12945     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
12946     ;;
12947   *)
12948     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
12949     ;;
12950   esac
12951   # Ok, now we have the path, separated by spaces, we can step through it
12952   # and add multilib dir if necessary...
12953   lt_tmp_lt_search_path_spec=
12954   lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
12955   # ...but if some path component already ends with the multilib dir we assume
12956   # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
12957   case "$lt_multi_os_dir; $lt_search_path_spec " in
12958   "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
12959     lt_multi_os_dir=
12960     ;;
12961   esac
12962   for lt_sys_path in $lt_search_path_spec; do
12963     if test -d "$lt_sys_path$lt_multi_os_dir"; then
12964       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
12965     elif test -n "$lt_multi_os_dir"; then
12966       test -d "$lt_sys_path" && \
12967         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
12968     fi
12969   done
12970   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
12971 BEGIN {RS = " "; FS = "/|\n";} {
12972   lt_foo = "";
12973   lt_count = 0;
12974   for (lt_i = NF; lt_i > 0; lt_i--) {
12975     if ($lt_i != "" && $lt_i != ".") {
12976       if ($lt_i == "..") {
12977         lt_count++;
12978       } else {
12979         if (lt_count == 0) {
12980           lt_foo = "/" $lt_i lt_foo;
12981         } else {
12982           lt_count--;
12983         }
12984       }
12985     }
12986   }
12987   if (lt_foo != "") { lt_freq[lt_foo]++; }
12988   if (lt_freq[lt_foo] == 1) { print lt_foo; }
12989 }'`
12990   # AWK program above erroneously prepends '/' to C:/dos/paths
12991   # for these hosts.
12992   case $host_os in
12993     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
12994       $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
12995   esac
12996   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
12997 else
12998   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12999 fi
13000 library_names_spec=
13001 libname_spec='lib$name'
13002 soname_spec=
13003 shrext_cmds=.so
13004 postinstall_cmds=
13005 postuninstall_cmds=
13006 finish_cmds=
13007 finish_eval=
13008 shlibpath_var=
13009 shlibpath_overrides_runpath=unknown
13010 version_type=none
13011 dynamic_linker="$host_os ld.so"
13012 sys_lib_dlsearch_path_spec="/lib /usr/lib"
13013 need_lib_prefix=unknown
13014 hardcode_into_libs=no
13015
13016 # when you set need_version to no, make sure it does not cause -set_version
13017 # flags to be left without arguments
13018 need_version=unknown
13019
13020
13021
13022 case $host_os in
13023 aix3*)
13024   version_type=linux # correct to gnu/linux during the next big refactor
13025   library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
13026   shlibpath_var=LIBPATH
13027
13028   # AIX 3 has no versioning support, so we append a major version to the name.
13029   soname_spec='$libname$release$shared_ext$major'
13030   ;;
13031
13032 aix[4-9]*)
13033   version_type=linux # correct to gnu/linux during the next big refactor
13034   need_lib_prefix=no
13035   need_version=no
13036   hardcode_into_libs=yes
13037   if test ia64 = "$host_cpu"; then
13038     # AIX 5 supports IA64
13039     library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
13040     shlibpath_var=LD_LIBRARY_PATH
13041   else
13042     # With GCC up to 2.95.x, collect2 would create an import file
13043     # for dependence libraries.  The import file would start with
13044     # the line '#! .'.  This would cause the generated library to
13045     # depend on '.', always an invalid library.  This was fixed in
13046     # development snapshots of GCC prior to 3.0.
13047     case $host_os in
13048       aix4 | aix4.[01] | aix4.[01].*)
13049       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
13050            echo ' yes '
13051            echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
13052         :
13053       else
13054         can_build_shared=no
13055       fi
13056       ;;
13057     esac
13058     # Using Import Files as archive members, it is possible to support
13059     # filename-based versioning of shared library archives on AIX. While
13060     # this would work for both with and without runtime linking, it will
13061     # prevent static linking of such archives. So we do filename-based
13062     # shared library versioning with .so extension only, which is used
13063     # when both runtime linking and shared linking is enabled.
13064     # Unfortunately, runtime linking may impact performance, so we do
13065     # not want this to be the default eventually. Also, we use the
13066     # versioned .so libs for executables only if there is the -brtl
13067     # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
13068     # To allow for filename-based versioning support, we need to create
13069     # libNAME.so.V as an archive file, containing:
13070     # *) an Import File, referring to the versioned filename of the
13071     #    archive as well as the shared archive member, telling the
13072     #    bitwidth (32 or 64) of that shared object, and providing the
13073     #    list of exported symbols of that shared object, eventually
13074     #    decorated with the 'weak' keyword
13075     # *) the shared object with the F_LOADONLY flag set, to really avoid
13076     #    it being seen by the linker.
13077     # At run time we better use the real file rather than another symlink,
13078     # but for link time we create the symlink libNAME.so -> libNAME.so.V
13079
13080     case $with_aix_soname,$aix_use_runtimelinking in
13081     # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
13082     # soname into executable. Probably we can add versioning support to
13083     # collect2, so additional links can be useful in future.
13084     aix,yes) # traditional libtool
13085       dynamic_linker='AIX unversionable lib.so'
13086       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
13087       # instead of lib<name>.a to let people know that these are not
13088       # typical AIX shared libraries.
13089       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13090       ;;
13091     aix,no) # traditional AIX only
13092       dynamic_linker='AIX lib.a(lib.so.V)'
13093       # We preserve .a as extension for shared libraries through AIX4.2
13094       # and later when we are not doing run time linking.
13095       library_names_spec='$libname$release.a $libname.a'
13096       soname_spec='$libname$release$shared_ext$major'
13097       ;;
13098     svr4,*) # full svr4 only
13099       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
13100       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13101       # We do not specify a path in Import Files, so LIBPATH fires.
13102       shlibpath_overrides_runpath=yes
13103       ;;
13104     *,yes) # both, prefer svr4
13105       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
13106       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13107       # unpreferred sharedlib libNAME.a needs extra handling
13108       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"'
13109       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"'
13110       # We do not specify a path in Import Files, so LIBPATH fires.
13111       shlibpath_overrides_runpath=yes
13112       ;;
13113     *,no) # both, prefer aix
13114       dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
13115       library_names_spec='$libname$release.a $libname.a'
13116       soname_spec='$libname$release$shared_ext$major'
13117       # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
13118       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)'
13119       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"'
13120       ;;
13121     esac
13122     shlibpath_var=LIBPATH
13123   fi
13124   ;;
13125
13126 amigaos*)
13127   case $host_cpu in
13128   powerpc)
13129     # Since July 2007 AmigaOS4 officially supports .so libraries.
13130     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
13131     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13132     ;;
13133   m68k)
13134     library_names_spec='$libname.ixlibrary $libname.a'
13135     # Create ${libname}_ixlibrary.a entries in /sys/libs.
13136     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'
13137     ;;
13138   esac
13139   ;;
13140
13141 beos*)
13142   library_names_spec='$libname$shared_ext'
13143   dynamic_linker="$host_os ld.so"
13144   shlibpath_var=LIBRARY_PATH
13145   ;;
13146
13147 bsdi[45]*)
13148   version_type=linux # correct to gnu/linux during the next big refactor
13149   need_version=no
13150   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13151   soname_spec='$libname$release$shared_ext$major'
13152   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13153   shlibpath_var=LD_LIBRARY_PATH
13154   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13155   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13156   # the default ld.so.conf also contains /usr/contrib/lib and
13157   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13158   # libtool to hard-code these into programs
13159   ;;
13160
13161 cygwin* | mingw* | pw32* | cegcc*)
13162   version_type=windows
13163   shrext_cmds=.dll
13164   need_version=no
13165   need_lib_prefix=no
13166
13167   case $GCC,$cc_basename in
13168   yes,*)
13169     # gcc
13170     library_names_spec='$libname.dll.a'
13171     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13172     postinstall_cmds='base_file=`basename \$file`~
13173       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13174       dldir=$destdir/`dirname \$dlpath`~
13175       test -d \$dldir || mkdir -p \$dldir~
13176       $install_prog $dir/$dlname \$dldir/$dlname~
13177       chmod a+x \$dldir/$dlname~
13178       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13179         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13180       fi'
13181     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13182       dlpath=$dir/\$dldll~
13183        $RM \$dlpath'
13184     shlibpath_overrides_runpath=yes
13185
13186     case $host_os in
13187     cygwin*)
13188       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13189       soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13190
13191       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
13192       ;;
13193     mingw* | cegcc*)
13194       # MinGW DLLs use traditional 'lib' prefix
13195       soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13196       ;;
13197     pw32*)
13198       # pw32 DLLs use 'pw' prefix rather than 'lib'
13199       library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13200       ;;
13201     esac
13202     dynamic_linker='Win32 ld.exe'
13203     ;;
13204
13205   *,cl*)
13206     # Native MSVC
13207     libname_spec='$name'
13208     soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13209     library_names_spec='$libname.dll.lib'
13210
13211     case $build_os in
13212     mingw*)
13213       sys_lib_search_path_spec=
13214       lt_save_ifs=$IFS
13215       IFS=';'
13216       for lt_path in $LIB
13217       do
13218         IFS=$lt_save_ifs
13219         # Let DOS variable expansion print the short 8.3 style file name.
13220         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
13221         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13222       done
13223       IFS=$lt_save_ifs
13224       # Convert to MSYS style.
13225       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13226       ;;
13227     cygwin*)
13228       # Convert to unix form, then to dos form, then back to unix form
13229       # but this time dos style (no spaces!) so that the unix form looks
13230       # like /cygdrive/c/PROGRA~1:/cygdr...
13231       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13232       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13233       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13234       ;;
13235     *)
13236       sys_lib_search_path_spec=$LIB
13237       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13238         # It is most probably a Windows format PATH.
13239         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13240       else
13241         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13242       fi
13243       # FIXME: find the short name or the path components, as spaces are
13244       # common. (e.g. "Program Files" -> "PROGRA~1")
13245       ;;
13246     esac
13247
13248     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13249     postinstall_cmds='base_file=`basename \$file`~
13250       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13251       dldir=$destdir/`dirname \$dlpath`~
13252       test -d \$dldir || mkdir -p \$dldir~
13253       $install_prog $dir/$dlname \$dldir/$dlname'
13254     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13255       dlpath=$dir/\$dldll~
13256        $RM \$dlpath'
13257     shlibpath_overrides_runpath=yes
13258     dynamic_linker='Win32 link.exe'
13259     ;;
13260
13261   *)
13262     # Assume MSVC wrapper
13263     library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13264     dynamic_linker='Win32 ld.exe'
13265     ;;
13266   esac
13267   # FIXME: first we should search . and the directory the executable is in
13268   shlibpath_var=PATH
13269   ;;
13270
13271 darwin* | rhapsody*)
13272   dynamic_linker="$host_os dyld"
13273   version_type=darwin
13274   need_lib_prefix=no
13275   need_version=no
13276   library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13277   soname_spec='$libname$release$major$shared_ext'
13278   shlibpath_overrides_runpath=yes
13279   shlibpath_var=DYLD_LIBRARY_PATH
13280   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13281
13282   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13283   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13284   ;;
13285
13286 dgux*)
13287   version_type=linux # correct to gnu/linux during the next big refactor
13288   need_lib_prefix=no
13289   need_version=no
13290   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13291   soname_spec='$libname$release$shared_ext$major'
13292   shlibpath_var=LD_LIBRARY_PATH
13293   ;;
13294
13295 freebsd* | dragonfly*)
13296   # DragonFly does not have aout.  When/if they implement a new
13297   # versioning mechanism, adjust this.
13298   if test -x /usr/bin/objformat; then
13299     objformat=`/usr/bin/objformat`
13300   else
13301     case $host_os in
13302     freebsd[23].*) objformat=aout ;;
13303     *) objformat=elf ;;
13304     esac
13305   fi
13306   version_type=freebsd-$objformat
13307   case $version_type in
13308     freebsd-elf*)
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       need_version=no
13312       need_lib_prefix=no
13313       ;;
13314     freebsd-*)
13315       library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13316       need_version=yes
13317       ;;
13318   esac
13319   shlibpath_var=LD_LIBRARY_PATH
13320   case $host_os in
13321   freebsd2.*)
13322     shlibpath_overrides_runpath=yes
13323     ;;
13324   freebsd3.[01]* | freebsdelf3.[01]*)
13325     shlibpath_overrides_runpath=yes
13326     hardcode_into_libs=yes
13327     ;;
13328   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13329   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13330     shlibpath_overrides_runpath=no
13331     hardcode_into_libs=yes
13332     ;;
13333   *) # from 4.6 on, and DragonFly
13334     shlibpath_overrides_runpath=yes
13335     hardcode_into_libs=yes
13336     ;;
13337   esac
13338   ;;
13339
13340 haiku*)
13341   version_type=linux # correct to gnu/linux during the next big refactor
13342   need_lib_prefix=no
13343   need_version=no
13344   dynamic_linker="$host_os runtime_loader"
13345   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13346   soname_spec='$libname$release$shared_ext$major'
13347   shlibpath_var=LIBRARY_PATH
13348   shlibpath_overrides_runpath=no
13349   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13350   hardcode_into_libs=yes
13351   ;;
13352
13353 hpux9* | hpux10* | hpux11*)
13354   # Give a soname corresponding to the major version so that dld.sl refuses to
13355   # link against other versions.
13356   version_type=sunos
13357   need_lib_prefix=no
13358   need_version=no
13359   case $host_cpu in
13360   ia64*)
13361     shrext_cmds='.so'
13362     hardcode_into_libs=yes
13363     dynamic_linker="$host_os dld.so"
13364     shlibpath_var=LD_LIBRARY_PATH
13365     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13366     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13367     soname_spec='$libname$release$shared_ext$major'
13368     if test 32 = "$HPUX_IA64_MODE"; then
13369       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13370       sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13371     else
13372       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13373       sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13374     fi
13375     ;;
13376   hppa*64*)
13377     shrext_cmds='.sl'
13378     hardcode_into_libs=yes
13379     dynamic_linker="$host_os dld.sl"
13380     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13381     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13382     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13383     soname_spec='$libname$release$shared_ext$major'
13384     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13385     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13386     ;;
13387   *)
13388     shrext_cmds='.sl'
13389     dynamic_linker="$host_os dld.sl"
13390     shlibpath_var=SHLIB_PATH
13391     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13392     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13393     soname_spec='$libname$release$shared_ext$major'
13394     ;;
13395   esac
13396   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13397   postinstall_cmds='chmod 555 $lib'
13398   # or fails outright, so override atomically:
13399   install_override_mode=555
13400   ;;
13401
13402 interix[3-9]*)
13403   version_type=linux # correct to gnu/linux during the next big refactor
13404   need_lib_prefix=no
13405   need_version=no
13406   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13407   soname_spec='$libname$release$shared_ext$major'
13408   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13409   shlibpath_var=LD_LIBRARY_PATH
13410   shlibpath_overrides_runpath=no
13411   hardcode_into_libs=yes
13412   ;;
13413
13414 irix5* | irix6* | nonstopux*)
13415   case $host_os in
13416     nonstopux*) version_type=nonstopux ;;
13417     *)
13418         if test yes = "$lt_cv_prog_gnu_ld"; then
13419                 version_type=linux # correct to gnu/linux during the next big refactor
13420         else
13421                 version_type=irix
13422         fi ;;
13423   esac
13424   need_lib_prefix=no
13425   need_version=no
13426   soname_spec='$libname$release$shared_ext$major'
13427   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13428   case $host_os in
13429   irix5* | nonstopux*)
13430     libsuff= shlibsuff=
13431     ;;
13432   *)
13433     case $LD in # libtool.m4 will add one of these switches to LD
13434     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13435       libsuff= shlibsuff= libmagic=32-bit;;
13436     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13437       libsuff=32 shlibsuff=N32 libmagic=N32;;
13438     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13439       libsuff=64 shlibsuff=64 libmagic=64-bit;;
13440     *) libsuff= shlibsuff= libmagic=never-match;;
13441     esac
13442     ;;
13443   esac
13444   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13445   shlibpath_overrides_runpath=no
13446   sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13447   sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13448   hardcode_into_libs=yes
13449   ;;
13450
13451 # No shared lib support for Linux oldld, aout, or coff.
13452 linux*oldld* | linux*aout* | linux*coff*)
13453   dynamic_linker=no
13454   ;;
13455
13456 linux*android*)
13457   version_type=none # Android doesn't support versioned libraries.
13458   need_lib_prefix=no
13459   need_version=no
13460   library_names_spec='$libname$release$shared_ext'
13461   soname_spec='$libname$release$shared_ext'
13462   finish_cmds=
13463   shlibpath_var=LD_LIBRARY_PATH
13464   shlibpath_overrides_runpath=yes
13465
13466   # This implies no fast_install, which is unacceptable.
13467   # Some rework will be needed to allow for fast_install
13468   # before this can be enabled.
13469   hardcode_into_libs=yes
13470
13471   dynamic_linker='Android linker'
13472   # Don't embed -rpath directories since the linker doesn't support them.
13473   hardcode_libdir_flag_spec='-L$libdir'
13474   ;;
13475
13476 # This must be glibc/ELF.
13477 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13478   version_type=linux # correct to gnu/linux during the next big refactor
13479   need_lib_prefix=no
13480   need_version=no
13481   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13482   soname_spec='$libname$release$shared_ext$major'
13483   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13484   shlibpath_var=LD_LIBRARY_PATH
13485   shlibpath_overrides_runpath=no
13486
13487   # Some binutils ld are patched to set DT_RUNPATH
13488   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
13489   $as_echo_n "(cached) " >&6
13490 else
13491   lt_cv_shlibpath_overrides_runpath=no
13492     save_LDFLAGS=$LDFLAGS
13493     save_libdir=$libdir
13494     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13495          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13496     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13497 /* end confdefs.h.  */
13498
13499 int
13500 main ()
13501 {
13502
13503   ;
13504   return 0;
13505 }
13506 _ACEOF
13507 if ac_fn_c_try_link "$LINENO"; then :
13508   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
13509   lt_cv_shlibpath_overrides_runpath=yes
13510 fi
13511 fi
13512 rm -f core conftest.err conftest.$ac_objext \
13513     conftest$ac_exeext conftest.$ac_ext
13514     LDFLAGS=$save_LDFLAGS
13515     libdir=$save_libdir
13516
13517 fi
13518
13519   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13520
13521   # This implies no fast_install, which is unacceptable.
13522   # Some rework will be needed to allow for fast_install
13523   # before this can be enabled.
13524   hardcode_into_libs=yes
13525
13526   # Add ABI-specific directories to the system library path.
13527   sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
13528
13529   # Ideally, we could use ldconfig to report *all* directores which are
13530   # searched for libraries, however this is still not possible.  Aside from not
13531   # being certain /sbin/ldconfig is available, command
13532   # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13533   # even though it is searched at run-time.  Try to do the best guess by
13534   # appending ld.so.conf contents (and includes) to the search path.
13535   if test -f /etc/ld.so.conf; then
13536     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' ' '`
13537     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
13538   fi
13539
13540   # We used to test for /lib/ld.so.1 and disable shared libraries on
13541   # powerpc, because MkLinux only supported shared libraries with the
13542   # GNU dynamic linker.  Since this was broken with cross compilers,
13543   # most powerpc-linux boxes support dynamic linking these days and
13544   # people can always --disable-shared, the test was removed, and we
13545   # assume the GNU/Linux dynamic linker is in use.
13546   dynamic_linker='GNU/Linux ld.so'
13547   ;;
13548
13549 netbsd*)
13550   version_type=sunos
13551   need_lib_prefix=no
13552   need_version=no
13553   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13554     library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13555     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13556     dynamic_linker='NetBSD (a.out) ld.so'
13557   else
13558     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13559     soname_spec='$libname$release$shared_ext$major'
13560     dynamic_linker='NetBSD ld.elf_so'
13561   fi
13562   shlibpath_var=LD_LIBRARY_PATH
13563   shlibpath_overrides_runpath=yes
13564   hardcode_into_libs=yes
13565   ;;
13566
13567 newsos6)
13568   version_type=linux # correct to gnu/linux during the next big refactor
13569   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13570   shlibpath_var=LD_LIBRARY_PATH
13571   shlibpath_overrides_runpath=yes
13572   ;;
13573
13574 *nto* | *qnx*)
13575   version_type=qnx
13576   need_lib_prefix=no
13577   need_version=no
13578   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13579   soname_spec='$libname$release$shared_ext$major'
13580   shlibpath_var=LD_LIBRARY_PATH
13581   shlibpath_overrides_runpath=no
13582   hardcode_into_libs=yes
13583   dynamic_linker='ldqnx.so'
13584   ;;
13585
13586 openbsd* | bitrig*)
13587   version_type=sunos
13588   sys_lib_dlsearch_path_spec=/usr/lib
13589   need_lib_prefix=no
13590   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13591     need_version=no
13592   else
13593     need_version=yes
13594   fi
13595   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13596   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13597   shlibpath_var=LD_LIBRARY_PATH
13598   shlibpath_overrides_runpath=yes
13599   ;;
13600
13601 os2*)
13602   libname_spec='$name'
13603   version_type=windows
13604   shrext_cmds=.dll
13605   need_version=no
13606   need_lib_prefix=no
13607   # OS/2 can only load a DLL with a base name of 8 characters or less.
13608   soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13609     v=$($ECHO $release$versuffix | tr -d .-);
13610     n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13611     $ECHO $n$v`$shared_ext'
13612   library_names_spec='${libname}_dll.$libext'
13613   dynamic_linker='OS/2 ld.exe'
13614   shlibpath_var=BEGINLIBPATH
13615   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13616   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13617   postinstall_cmds='base_file=`basename \$file`~
13618     dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13619     dldir=$destdir/`dirname \$dlpath`~
13620     test -d \$dldir || mkdir -p \$dldir~
13621     $install_prog $dir/$dlname \$dldir/$dlname~
13622     chmod a+x \$dldir/$dlname~
13623     if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13624       eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13625     fi'
13626   postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13627     dlpath=$dir/\$dldll~
13628     $RM \$dlpath'
13629   ;;
13630
13631 osf3* | osf4* | osf5*)
13632   version_type=osf
13633   need_lib_prefix=no
13634   need_version=no
13635   soname_spec='$libname$release$shared_ext$major'
13636   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13637   shlibpath_var=LD_LIBRARY_PATH
13638   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13639   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13640   ;;
13641
13642 rdos*)
13643   dynamic_linker=no
13644   ;;
13645
13646 solaris*)
13647   version_type=linux # correct to gnu/linux during the next big refactor
13648   need_lib_prefix=no
13649   need_version=no
13650   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13651   soname_spec='$libname$release$shared_ext$major'
13652   shlibpath_var=LD_LIBRARY_PATH
13653   shlibpath_overrides_runpath=yes
13654   hardcode_into_libs=yes
13655   # ldd complains unless libraries are executable
13656   postinstall_cmds='chmod +x $lib'
13657   ;;
13658
13659 sunos4*)
13660   version_type=sunos
13661   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13662   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13663   shlibpath_var=LD_LIBRARY_PATH
13664   shlibpath_overrides_runpath=yes
13665   if test yes = "$with_gnu_ld"; then
13666     need_lib_prefix=no
13667   fi
13668   need_version=yes
13669   ;;
13670
13671 sysv4 | sysv4.3*)
13672   version_type=linux # correct to gnu/linux during the next big refactor
13673   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13674   soname_spec='$libname$release$shared_ext$major'
13675   shlibpath_var=LD_LIBRARY_PATH
13676   case $host_vendor in
13677     sni)
13678       shlibpath_overrides_runpath=no
13679       need_lib_prefix=no
13680       runpath_var=LD_RUN_PATH
13681       ;;
13682     siemens)
13683       need_lib_prefix=no
13684       ;;
13685     motorola)
13686       need_lib_prefix=no
13687       need_version=no
13688       shlibpath_overrides_runpath=no
13689       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13690       ;;
13691   esac
13692   ;;
13693
13694 sysv4*MP*)
13695   if test -d /usr/nec; then
13696     version_type=linux # correct to gnu/linux during the next big refactor
13697     library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13698     soname_spec='$libname$shared_ext.$major'
13699     shlibpath_var=LD_LIBRARY_PATH
13700   fi
13701   ;;
13702
13703 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13704   version_type=sco
13705   need_lib_prefix=no
13706   need_version=no
13707   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13708   soname_spec='$libname$release$shared_ext$major'
13709   shlibpath_var=LD_LIBRARY_PATH
13710   shlibpath_overrides_runpath=yes
13711   hardcode_into_libs=yes
13712   if test yes = "$with_gnu_ld"; then
13713     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13714   else
13715     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13716     case $host_os in
13717       sco3.2v5*)
13718         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13719         ;;
13720     esac
13721   fi
13722   sys_lib_dlsearch_path_spec='/usr/lib'
13723   ;;
13724
13725 tpf*)
13726   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13727   version_type=linux # correct to gnu/linux during the next big refactor
13728   need_lib_prefix=no
13729   need_version=no
13730   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13731   shlibpath_var=LD_LIBRARY_PATH
13732   shlibpath_overrides_runpath=no
13733   hardcode_into_libs=yes
13734   ;;
13735
13736 uts4*)
13737   version_type=linux # correct to gnu/linux during the next big refactor
13738   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13739   soname_spec='$libname$release$shared_ext$major'
13740   shlibpath_var=LD_LIBRARY_PATH
13741   ;;
13742
13743 *)
13744   dynamic_linker=no
13745   ;;
13746 esac
13747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13748 $as_echo "$dynamic_linker" >&6; }
13749 test no = "$dynamic_linker" && can_build_shared=no
13750
13751 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13752 if test yes = "$GCC"; then
13753   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13754 fi
13755
13756 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13757   sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13758 fi
13759
13760 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13761   sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13762 fi
13763
13764 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13765 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13766
13767 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13768 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13769
13770 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13771 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
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
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13870 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13871 hardcode_action=
13872 if test -n "$hardcode_libdir_flag_spec" ||
13873    test -n "$runpath_var" ||
13874    test yes = "$hardcode_automatic"; then
13875
13876   # We can hardcode non-existent directories.
13877   if test no != "$hardcode_direct" &&
13878      # If the only mechanism to avoid hardcoding is shlibpath_var, we
13879      # have to relink, otherwise we might link with an installed library
13880      # when we should be linking with a yet-to-be-installed one
13881      ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13882      test no != "$hardcode_minus_L"; then
13883     # Linking always hardcodes the temporary library directory.
13884     hardcode_action=relink
13885   else
13886     # We can link without hardcoding, and we can hardcode nonexisting dirs.
13887     hardcode_action=immediate
13888   fi
13889 else
13890   # We cannot hardcode anything, or else we can only hardcode existing
13891   # directories.
13892   hardcode_action=unsupported
13893 fi
13894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13895 $as_echo "$hardcode_action" >&6; }
13896
13897 if test relink = "$hardcode_action" ||
13898    test yes = "$inherit_rpath"; then
13899   # Fast installation is not supported
13900   enable_fast_install=no
13901 elif test yes = "$shlibpath_overrides_runpath" ||
13902      test no = "$enable_shared"; then
13903   # Fast installation is not necessary
13904   enable_fast_install=needless
13905 fi
13906
13907
13908
13909
13910
13911
13912   if test yes != "$enable_dlopen"; then
13913   enable_dlopen=unknown
13914   enable_dlopen_self=unknown
13915   enable_dlopen_self_static=unknown
13916 else
13917   lt_cv_dlopen=no
13918   lt_cv_dlopen_libs=
13919
13920   case $host_os in
13921   beos*)
13922     lt_cv_dlopen=load_add_on
13923     lt_cv_dlopen_libs=
13924     lt_cv_dlopen_self=yes
13925     ;;
13926
13927   mingw* | pw32* | cegcc*)
13928     lt_cv_dlopen=LoadLibrary
13929     lt_cv_dlopen_libs=
13930     ;;
13931
13932   cygwin*)
13933     lt_cv_dlopen=dlopen
13934     lt_cv_dlopen_libs=
13935     ;;
13936
13937   darwin*)
13938     # if libdl is installed we need to link against it
13939     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13940 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13941 if ${ac_cv_lib_dl_dlopen+:} false; then :
13942   $as_echo_n "(cached) " >&6
13943 else
13944   ac_check_lib_save_LIBS=$LIBS
13945 LIBS="-ldl  $LIBS"
13946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13947 /* end confdefs.h.  */
13948
13949 /* Override any GCC internal prototype to avoid an error.
13950    Use char because int might match the return type of a GCC
13951    builtin and then its argument prototype would still apply.  */
13952 #ifdef __cplusplus
13953 extern "C"
13954 #endif
13955 char dlopen ();
13956 int
13957 main ()
13958 {
13959 return dlopen ();
13960   ;
13961   return 0;
13962 }
13963 _ACEOF
13964 if ac_fn_c_try_link "$LINENO"; then :
13965   ac_cv_lib_dl_dlopen=yes
13966 else
13967   ac_cv_lib_dl_dlopen=no
13968 fi
13969 rm -f core conftest.err conftest.$ac_objext \
13970     conftest$ac_exeext conftest.$ac_ext
13971 LIBS=$ac_check_lib_save_LIBS
13972 fi
13973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13974 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13975 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13976   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13977 else
13978
13979     lt_cv_dlopen=dyld
13980     lt_cv_dlopen_libs=
13981     lt_cv_dlopen_self=yes
13982
13983 fi
13984
13985     ;;
13986
13987   tpf*)
13988     # Don't try to run any link tests for TPF.  We know it's impossible
13989     # because TPF is a cross-compiler, and we know how we open DSOs.
13990     lt_cv_dlopen=dlopen
13991     lt_cv_dlopen_libs=
13992     lt_cv_dlopen_self=no
13993     ;;
13994
13995   *)
13996     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
13997 if test "x$ac_cv_func_shl_load" = xyes; then :
13998   lt_cv_dlopen=shl_load
13999 else
14000   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
14001 $as_echo_n "checking for shl_load in -ldld... " >&6; }
14002 if ${ac_cv_lib_dld_shl_load+:} false; then :
14003   $as_echo_n "(cached) " >&6
14004 else
14005   ac_check_lib_save_LIBS=$LIBS
14006 LIBS="-ldld  $LIBS"
14007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14008 /* end confdefs.h.  */
14009
14010 /* Override any GCC internal prototype to avoid an error.
14011    Use char because int might match the return type of a GCC
14012    builtin and then its argument prototype would still apply.  */
14013 #ifdef __cplusplus
14014 extern "C"
14015 #endif
14016 char shl_load ();
14017 int
14018 main ()
14019 {
14020 return shl_load ();
14021   ;
14022   return 0;
14023 }
14024 _ACEOF
14025 if ac_fn_c_try_link "$LINENO"; then :
14026   ac_cv_lib_dld_shl_load=yes
14027 else
14028   ac_cv_lib_dld_shl_load=no
14029 fi
14030 rm -f core conftest.err conftest.$ac_objext \
14031     conftest$ac_exeext conftest.$ac_ext
14032 LIBS=$ac_check_lib_save_LIBS
14033 fi
14034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
14035 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
14036 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
14037   lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
14038 else
14039   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
14040 if test "x$ac_cv_func_dlopen" = xyes; then :
14041   lt_cv_dlopen=dlopen
14042 else
14043   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14044 $as_echo_n "checking for dlopen in -ldl... " >&6; }
14045 if ${ac_cv_lib_dl_dlopen+:} false; then :
14046   $as_echo_n "(cached) " >&6
14047 else
14048   ac_check_lib_save_LIBS=$LIBS
14049 LIBS="-ldl  $LIBS"
14050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14051 /* end confdefs.h.  */
14052
14053 /* Override any GCC internal prototype to avoid an error.
14054    Use char because int might match the return type of a GCC
14055    builtin and then its argument prototype would still apply.  */
14056 #ifdef __cplusplus
14057 extern "C"
14058 #endif
14059 char dlopen ();
14060 int
14061 main ()
14062 {
14063 return dlopen ();
14064   ;
14065   return 0;
14066 }
14067 _ACEOF
14068 if ac_fn_c_try_link "$LINENO"; then :
14069   ac_cv_lib_dl_dlopen=yes
14070 else
14071   ac_cv_lib_dl_dlopen=no
14072 fi
14073 rm -f core conftest.err conftest.$ac_objext \
14074     conftest$ac_exeext conftest.$ac_ext
14075 LIBS=$ac_check_lib_save_LIBS
14076 fi
14077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14078 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14079 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14080   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14081 else
14082   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
14083 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
14084 if ${ac_cv_lib_svld_dlopen+:} false; then :
14085   $as_echo_n "(cached) " >&6
14086 else
14087   ac_check_lib_save_LIBS=$LIBS
14088 LIBS="-lsvld  $LIBS"
14089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14090 /* end confdefs.h.  */
14091
14092 /* Override any GCC internal prototype to avoid an error.
14093    Use char because int might match the return type of a GCC
14094    builtin and then its argument prototype would still apply.  */
14095 #ifdef __cplusplus
14096 extern "C"
14097 #endif
14098 char dlopen ();
14099 int
14100 main ()
14101 {
14102 return dlopen ();
14103   ;
14104   return 0;
14105 }
14106 _ACEOF
14107 if ac_fn_c_try_link "$LINENO"; then :
14108   ac_cv_lib_svld_dlopen=yes
14109 else
14110   ac_cv_lib_svld_dlopen=no
14111 fi
14112 rm -f core conftest.err conftest.$ac_objext \
14113     conftest$ac_exeext conftest.$ac_ext
14114 LIBS=$ac_check_lib_save_LIBS
14115 fi
14116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
14117 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
14118 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
14119   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
14120 else
14121   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
14122 $as_echo_n "checking for dld_link in -ldld... " >&6; }
14123 if ${ac_cv_lib_dld_dld_link+:} false; then :
14124   $as_echo_n "(cached) " >&6
14125 else
14126   ac_check_lib_save_LIBS=$LIBS
14127 LIBS="-ldld  $LIBS"
14128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14129 /* end confdefs.h.  */
14130
14131 /* Override any GCC internal prototype to avoid an error.
14132    Use char because int might match the return type of a GCC
14133    builtin and then its argument prototype would still apply.  */
14134 #ifdef __cplusplus
14135 extern "C"
14136 #endif
14137 char dld_link ();
14138 int
14139 main ()
14140 {
14141 return dld_link ();
14142   ;
14143   return 0;
14144 }
14145 _ACEOF
14146 if ac_fn_c_try_link "$LINENO"; then :
14147   ac_cv_lib_dld_dld_link=yes
14148 else
14149   ac_cv_lib_dld_dld_link=no
14150 fi
14151 rm -f core conftest.err conftest.$ac_objext \
14152     conftest$ac_exeext conftest.$ac_ext
14153 LIBS=$ac_check_lib_save_LIBS
14154 fi
14155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
14156 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
14157 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
14158   lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
14159 fi
14160
14161
14162 fi
14163
14164
14165 fi
14166
14167
14168 fi
14169
14170
14171 fi
14172
14173
14174 fi
14175
14176     ;;
14177   esac
14178
14179   if test no = "$lt_cv_dlopen"; then
14180     enable_dlopen=no
14181   else
14182     enable_dlopen=yes
14183   fi
14184
14185   case $lt_cv_dlopen in
14186   dlopen)
14187     save_CPPFLAGS=$CPPFLAGS
14188     test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14189
14190     save_LDFLAGS=$LDFLAGS
14191     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14192
14193     save_LIBS=$LIBS
14194     LIBS="$lt_cv_dlopen_libs $LIBS"
14195
14196     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
14197 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
14198 if ${lt_cv_dlopen_self+:} false; then :
14199   $as_echo_n "(cached) " >&6
14200 else
14201           if test yes = "$cross_compiling"; then :
14202   lt_cv_dlopen_self=cross
14203 else
14204   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14205   lt_status=$lt_dlunknown
14206   cat > conftest.$ac_ext <<_LT_EOF
14207 #line $LINENO "configure"
14208 #include "confdefs.h"
14209
14210 #if HAVE_DLFCN_H
14211 #include <dlfcn.h>
14212 #endif
14213
14214 #include <stdio.h>
14215
14216 #ifdef RTLD_GLOBAL
14217 #  define LT_DLGLOBAL           RTLD_GLOBAL
14218 #else
14219 #  ifdef DL_GLOBAL
14220 #    define LT_DLGLOBAL         DL_GLOBAL
14221 #  else
14222 #    define LT_DLGLOBAL         0
14223 #  endif
14224 #endif
14225
14226 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14227    find out it does not work in some platform. */
14228 #ifndef LT_DLLAZY_OR_NOW
14229 #  ifdef RTLD_LAZY
14230 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14231 #  else
14232 #    ifdef DL_LAZY
14233 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14234 #    else
14235 #      ifdef RTLD_NOW
14236 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14237 #      else
14238 #        ifdef DL_NOW
14239 #          define LT_DLLAZY_OR_NOW      DL_NOW
14240 #        else
14241 #          define LT_DLLAZY_OR_NOW      0
14242 #        endif
14243 #      endif
14244 #    endif
14245 #  endif
14246 #endif
14247
14248 /* When -fvisibility=hidden is used, assume the code has been annotated
14249    correspondingly for the symbols needed.  */
14250 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14251 int fnord () __attribute__((visibility("default")));
14252 #endif
14253
14254 int fnord () { return 42; }
14255 int main ()
14256 {
14257   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14258   int status = $lt_dlunknown;
14259
14260   if (self)
14261     {
14262       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14263       else
14264         {
14265           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14266           else puts (dlerror ());
14267         }
14268       /* dlclose (self); */
14269     }
14270   else
14271     puts (dlerror ());
14272
14273   return status;
14274 }
14275 _LT_EOF
14276   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14277   (eval $ac_link) 2>&5
14278   ac_status=$?
14279   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14280   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14281     (./conftest; exit; ) >&5 2>/dev/null
14282     lt_status=$?
14283     case x$lt_status in
14284       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14285       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14286       x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14287     esac
14288   else :
14289     # compilation failed
14290     lt_cv_dlopen_self=no
14291   fi
14292 fi
14293 rm -fr conftest*
14294
14295
14296 fi
14297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14298 $as_echo "$lt_cv_dlopen_self" >&6; }
14299
14300     if test yes = "$lt_cv_dlopen_self"; then
14301       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14302       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14303 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
14304 if ${lt_cv_dlopen_self_static+:} false; then :
14305   $as_echo_n "(cached) " >&6
14306 else
14307           if test yes = "$cross_compiling"; then :
14308   lt_cv_dlopen_self_static=cross
14309 else
14310   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14311   lt_status=$lt_dlunknown
14312   cat > conftest.$ac_ext <<_LT_EOF
14313 #line $LINENO "configure"
14314 #include "confdefs.h"
14315
14316 #if HAVE_DLFCN_H
14317 #include <dlfcn.h>
14318 #endif
14319
14320 #include <stdio.h>
14321
14322 #ifdef RTLD_GLOBAL
14323 #  define LT_DLGLOBAL           RTLD_GLOBAL
14324 #else
14325 #  ifdef DL_GLOBAL
14326 #    define LT_DLGLOBAL         DL_GLOBAL
14327 #  else
14328 #    define LT_DLGLOBAL         0
14329 #  endif
14330 #endif
14331
14332 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14333    find out it does not work in some platform. */
14334 #ifndef LT_DLLAZY_OR_NOW
14335 #  ifdef RTLD_LAZY
14336 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14337 #  else
14338 #    ifdef DL_LAZY
14339 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14340 #    else
14341 #      ifdef RTLD_NOW
14342 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14343 #      else
14344 #        ifdef DL_NOW
14345 #          define LT_DLLAZY_OR_NOW      DL_NOW
14346 #        else
14347 #          define LT_DLLAZY_OR_NOW      0
14348 #        endif
14349 #      endif
14350 #    endif
14351 #  endif
14352 #endif
14353
14354 /* When -fvisibility=hidden is used, assume the code has been annotated
14355    correspondingly for the symbols needed.  */
14356 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14357 int fnord () __attribute__((visibility("default")));
14358 #endif
14359
14360 int fnord () { return 42; }
14361 int main ()
14362 {
14363   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14364   int status = $lt_dlunknown;
14365
14366   if (self)
14367     {
14368       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14369       else
14370         {
14371           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14372           else puts (dlerror ());
14373         }
14374       /* dlclose (self); */
14375     }
14376   else
14377     puts (dlerror ());
14378
14379   return status;
14380 }
14381 _LT_EOF
14382   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14383   (eval $ac_link) 2>&5
14384   ac_status=$?
14385   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14386   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14387     (./conftest; exit; ) >&5 2>/dev/null
14388     lt_status=$?
14389     case x$lt_status in
14390       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14391       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14392       x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14393     esac
14394   else :
14395     # compilation failed
14396     lt_cv_dlopen_self_static=no
14397   fi
14398 fi
14399 rm -fr conftest*
14400
14401
14402 fi
14403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14404 $as_echo "$lt_cv_dlopen_self_static" >&6; }
14405     fi
14406
14407     CPPFLAGS=$save_CPPFLAGS
14408     LDFLAGS=$save_LDFLAGS
14409     LIBS=$save_LIBS
14410     ;;
14411   esac
14412
14413   case $lt_cv_dlopen_self in
14414   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14415   *) enable_dlopen_self=unknown ;;
14416   esac
14417
14418   case $lt_cv_dlopen_self_static in
14419   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14420   *) enable_dlopen_self_static=unknown ;;
14421   esac
14422 fi
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440 striplib=
14441 old_striplib=
14442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14443 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
14444 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14445   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14446   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14448 $as_echo "yes" >&6; }
14449 else
14450 # FIXME - insert some real tests, host_os isn't really good enough
14451   case $host_os in
14452   darwin*)
14453     if test -n "$STRIP"; then
14454       striplib="$STRIP -x"
14455       old_striplib="$STRIP -S"
14456       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14457 $as_echo "yes" >&6; }
14458     else
14459       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14460 $as_echo "no" >&6; }
14461     fi
14462     ;;
14463   *)
14464     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14465 $as_echo "no" >&6; }
14466     ;;
14467   esac
14468 fi
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481   # Report what library types will actually be built
14482   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14483 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
14484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14485 $as_echo "$can_build_shared" >&6; }
14486
14487   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14488 $as_echo_n "checking whether to build shared libraries... " >&6; }
14489   test no = "$can_build_shared" && enable_shared=no
14490
14491   # On AIX, shared libraries and static libraries use the same namespace, and
14492   # are all built from PIC.
14493   case $host_os in
14494   aix3*)
14495     test yes = "$enable_shared" && enable_static=no
14496     if test -n "$RANLIB"; then
14497       archive_cmds="$archive_cmds~\$RANLIB \$lib"
14498       postinstall_cmds='$RANLIB $lib'
14499     fi
14500     ;;
14501
14502   aix[4-9]*)
14503     if test ia64 != "$host_cpu"; then
14504       case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14505       yes,aix,yes) ;;                   # shared object as lib.so file only
14506       yes,svr4,*) ;;                    # shared object as lib.so archive member only
14507       yes,*) enable_static=no ;;        # shared object in lib.a archive as well
14508       esac
14509     fi
14510     ;;
14511   esac
14512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14513 $as_echo "$enable_shared" >&6; }
14514
14515   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14516 $as_echo_n "checking whether to build static libraries... " >&6; }
14517   # Make sure either enable_shared or enable_static is yes.
14518   test yes = "$enable_shared" || enable_static=yes
14519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14520 $as_echo "$enable_static" >&6; }
14521
14522
14523
14524
14525 fi
14526 ac_ext=c
14527 ac_cpp='$CPP $CPPFLAGS'
14528 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14529 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14530 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14531
14532 CC=$lt_save_CC
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548         ac_config_commands="$ac_config_commands libtool"
14549
14550
14551
14552
14553 # Only expand once:
14554
14555
14556
14557
14558 # Checks for header files.
14559 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
14560 do :
14561   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14562 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
14563 "
14564 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14565   cat >>confdefs.h <<_ACEOF
14566 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14567 _ACEOF
14568
14569 fi
14570
14571 done
14572
14573
14574 # check for types.
14575 # Using own tests for int64* because autoconf builtin only give 32bit.
14576 ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
14577 if test "x$ac_cv_type_int8_t" = xyes; then :
14578
14579 else
14580
14581 cat >>confdefs.h <<_ACEOF
14582 #define int8_t signed char
14583 _ACEOF
14584
14585 fi
14586
14587 ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
14588 if test "x$ac_cv_type_int16_t" = xyes; then :
14589
14590 else
14591
14592 cat >>confdefs.h <<_ACEOF
14593 #define int16_t short
14594 _ACEOF
14595
14596 fi
14597
14598 ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
14599 if test "x$ac_cv_type_int32_t" = xyes; then :
14600
14601 else
14602
14603 cat >>confdefs.h <<_ACEOF
14604 #define int32_t int
14605 _ACEOF
14606
14607 fi
14608
14609 ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
14610 if test "x$ac_cv_type_int64_t" = xyes; then :
14611
14612 else
14613
14614 cat >>confdefs.h <<_ACEOF
14615 #define int64_t long long
14616 _ACEOF
14617
14618 fi
14619
14620 ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
14621 if test "x$ac_cv_type_uint8_t" = xyes; then :
14622
14623 else
14624
14625 cat >>confdefs.h <<_ACEOF
14626 #define uint8_t unsigned char
14627 _ACEOF
14628
14629 fi
14630
14631 ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
14632 if test "x$ac_cv_type_uint16_t" = xyes; then :
14633
14634 else
14635
14636 cat >>confdefs.h <<_ACEOF
14637 #define uint16_t unsigned short
14638 _ACEOF
14639
14640 fi
14641
14642 ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
14643 if test "x$ac_cv_type_uint32_t" = xyes; then :
14644
14645 else
14646
14647 cat >>confdefs.h <<_ACEOF
14648 #define uint32_t unsigned int
14649 _ACEOF
14650
14651 fi
14652
14653 ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
14654 if test "x$ac_cv_type_uint64_t" = xyes; then :
14655
14656 else
14657
14658 cat >>confdefs.h <<_ACEOF
14659 #define uint64_t unsigned long long
14660 _ACEOF
14661
14662 fi
14663
14664 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14665 if test "x$ac_cv_type_size_t" = xyes; then :
14666
14667 else
14668
14669 cat >>confdefs.h <<_ACEOF
14670 #define size_t unsigned int
14671 _ACEOF
14672
14673 fi
14674
14675 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
14676 if test "x$ac_cv_type_ssize_t" = xyes; then :
14677
14678 else
14679
14680 cat >>confdefs.h <<_ACEOF
14681 #define ssize_t int
14682 _ACEOF
14683
14684 fi
14685
14686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
14687 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
14688 if ${ac_cv_type_uid_t+:} false; then :
14689   $as_echo_n "(cached) " >&6
14690 else
14691   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14692 /* end confdefs.h.  */
14693 #include <sys/types.h>
14694
14695 _ACEOF
14696 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14697   $EGREP "uid_t" >/dev/null 2>&1; then :
14698   ac_cv_type_uid_t=yes
14699 else
14700   ac_cv_type_uid_t=no
14701 fi
14702 rm -f conftest*
14703
14704 fi
14705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
14706 $as_echo "$ac_cv_type_uid_t" >&6; }
14707 if test $ac_cv_type_uid_t = no; then
14708
14709 $as_echo "#define uid_t int" >>confdefs.h
14710
14711
14712 $as_echo "#define gid_t int" >>confdefs.h
14713
14714 fi
14715
14716 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14717 if test "x$ac_cv_type_pid_t" = xyes; then :
14718
14719 else
14720
14721 cat >>confdefs.h <<_ACEOF
14722 #define pid_t int
14723 _ACEOF
14724
14725 fi
14726
14727 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
14728 if test "x$ac_cv_type_off_t" = xyes; then :
14729
14730 else
14731
14732 cat >>confdefs.h <<_ACEOF
14733 #define off_t long int
14734 _ACEOF
14735
14736 fi
14737
14738 ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
14739 $ac_includes_default
14740 #ifdef HAVE_WINSOCK2_H
14741 #  include <winsock2.h>
14742 #endif
14743
14744 "
14745 if test "x$ac_cv_type_u_char" = xyes; then :
14746
14747 else
14748
14749 $as_echo "#define u_char unsigned char" >>confdefs.h
14750
14751 fi
14752
14753 ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
14754 $ac_includes_default
14755 #ifdef HAVE_SYS_RESOURCE_H
14756 #  include <sys/resource.h>
14757 #endif
14758
14759 "
14760 if test "x$ac_cv_type_rlim_t" = xyes; then :
14761
14762 else
14763
14764 $as_echo "#define rlim_t unsigned long" >>confdefs.h
14765
14766 fi
14767
14768
14769 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
14770 $ac_includes_default
14771 #ifdef HAVE_SYS_SOCKET_H
14772 #  include <sys/socket.h>
14773 #endif
14774 #ifdef HAVE_WS2TCPIP_H
14775 #  include <ws2tcpip.h>
14776 #endif
14777
14778 "
14779 if test "x$ac_cv_type_socklen_t" = xyes; then :
14780
14781 else
14782
14783 $as_echo "#define socklen_t int" >>confdefs.h
14784
14785 fi
14786
14787  ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
14788 $ac_includes_default
14789 #ifdef HAVE_SYS_TYPES_H
14790 # include <sys/types.h>
14791 #endif
14792 #ifdef HAVE_NETINET_IN_H
14793 # include <netinet/in.h>
14794 #endif
14795
14796 "
14797 if test "x$ac_cv_type_in_addr_t" = xyes; then :
14798
14799 else
14800
14801 $as_echo "#define in_addr_t uint32_t" >>confdefs.h
14802
14803 fi
14804
14805  ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
14806 $ac_includes_default
14807 #ifdef HAVE_SYS_TYPES_H
14808 # include <sys/types.h>
14809 #endif
14810 #ifdef HAVE_NETINET_IN_H
14811 # include <netinet/in.h>
14812 #endif
14813
14814 "
14815 if test "x$ac_cv_type_in_port_t" = xyes; then :
14816
14817 else
14818
14819 $as_echo "#define in_port_t uint16_t" >>confdefs.h
14820
14821 fi
14822
14823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
14824 $as_echo_n "checking if memcmp compares unsigned... " >&6; }
14825 if test "$cross_compiling" = yes; then :
14826    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
14827 $as_echo "cross-compile no" >&6; }
14828
14829 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14830
14831   case " $LIBOBJS " in
14832   *" memcmp.$ac_objext "* ) ;;
14833   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14834  ;;
14835 esac
14836
14837
14838 else
14839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14840 /* end confdefs.h.  */
14841
14842 #include <stdio.h>
14843 #include <stdlib.h>
14844 #include <string.h>
14845 int main(void)
14846 {
14847         char a = 255, b = 0;
14848         if(memcmp(&a, &b, 1) < 0)
14849                 return 1;
14850         return 0;
14851 }
14852
14853 _ACEOF
14854 if ac_fn_c_try_run "$LINENO"; then :
14855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14856 $as_echo "yes" >&6; }
14857 else
14858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14859 $as_echo "no" >&6; }
14860
14861 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14862
14863   case " $LIBOBJS " in
14864   *" memcmp.$ac_objext "* ) ;;
14865   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14866  ;;
14867 esac
14868
14869
14870 fi
14871 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14872   conftest.$ac_objext conftest.beam conftest.$ac_ext
14873 fi
14874
14875
14876 # The cast to long int works around a bug in the HP C Compiler
14877 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14878 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14879 # This bug is HP SR number 8606223364.
14880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
14881 $as_echo_n "checking size of time_t... " >&6; }
14882 if ${ac_cv_sizeof_time_t+:} false; then :
14883   $as_echo_n "(cached) " >&6
14884 else
14885   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
14886 $ac_includes_default
14887 #ifdef TIME_WITH_SYS_TIME
14888 # include <sys/time.h>
14889 # include <time.h>
14890 #else
14891 # ifdef HAVE_SYS_TIME_H
14892 #  include <sys/time.h>
14893 # else
14894 #  include <time.h>
14895 # endif
14896 #endif
14897
14898 "; then :
14899
14900 else
14901   if test "$ac_cv_type_time_t" = yes; then
14902      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14903 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14904 as_fn_error 77 "cannot compute sizeof (time_t)
14905 See \`config.log' for more details" "$LINENO" 5; }
14906    else
14907      ac_cv_sizeof_time_t=0
14908    fi
14909 fi
14910
14911 fi
14912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
14913 $as_echo "$ac_cv_sizeof_time_t" >&6; }
14914
14915
14916
14917 cat >>confdefs.h <<_ACEOF
14918 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
14919 _ACEOF
14920
14921
14922
14923 # add option to disable the evil rpath
14924
14925 # Check whether --enable-rpath was given.
14926 if test "${enable_rpath+set}" = set; then :
14927   enableval=$enable_rpath; enable_rpath=$enableval
14928 else
14929   enable_rpath=yes
14930 fi
14931
14932 if test "x$enable_rpath" = xno; then
14933                 ac_config_commands="$ac_config_commands disable-rpath"
14934
14935 fi
14936
14937
14938
14939 # check to see if libraries are needed for these functions.
14940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
14941 $as_echo_n "checking for library containing inet_pton... " >&6; }
14942 if ${ac_cv_search_inet_pton+:} false; then :
14943   $as_echo_n "(cached) " >&6
14944 else
14945   ac_func_search_save_LIBS=$LIBS
14946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14947 /* end confdefs.h.  */
14948
14949 /* Override any GCC internal prototype to avoid an error.
14950    Use char because int might match the return type of a GCC
14951    builtin and then its argument prototype would still apply.  */
14952 #ifdef __cplusplus
14953 extern "C"
14954 #endif
14955 char inet_pton ();
14956 int
14957 main ()
14958 {
14959 return inet_pton ();
14960   ;
14961   return 0;
14962 }
14963 _ACEOF
14964 for ac_lib in '' nsl; do
14965   if test -z "$ac_lib"; then
14966     ac_res="none required"
14967   else
14968     ac_res=-l$ac_lib
14969     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14970   fi
14971   if ac_fn_c_try_link "$LINENO"; then :
14972   ac_cv_search_inet_pton=$ac_res
14973 fi
14974 rm -f core conftest.err conftest.$ac_objext \
14975     conftest$ac_exeext
14976   if ${ac_cv_search_inet_pton+:} false; then :
14977   break
14978 fi
14979 done
14980 if ${ac_cv_search_inet_pton+:} false; then :
14981
14982 else
14983   ac_cv_search_inet_pton=no
14984 fi
14985 rm conftest.$ac_ext
14986 LIBS=$ac_func_search_save_LIBS
14987 fi
14988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
14989 $as_echo "$ac_cv_search_inet_pton" >&6; }
14990 ac_res=$ac_cv_search_inet_pton
14991 if test "$ac_res" != no; then :
14992   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14993
14994 fi
14995
14996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
14997 $as_echo_n "checking for library containing socket... " >&6; }
14998 if ${ac_cv_search_socket+:} false; then :
14999   $as_echo_n "(cached) " >&6
15000 else
15001   ac_func_search_save_LIBS=$LIBS
15002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15003 /* end confdefs.h.  */
15004
15005 /* Override any GCC internal prototype to avoid an error.
15006    Use char because int might match the return type of a GCC
15007    builtin and then its argument prototype would still apply.  */
15008 #ifdef __cplusplus
15009 extern "C"
15010 #endif
15011 char socket ();
15012 int
15013 main ()
15014 {
15015 return socket ();
15016   ;
15017   return 0;
15018 }
15019 _ACEOF
15020 for ac_lib in '' socket; do
15021   if test -z "$ac_lib"; then
15022     ac_res="none required"
15023   else
15024     ac_res=-l$ac_lib
15025     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15026   fi
15027   if ac_fn_c_try_link "$LINENO"; then :
15028   ac_cv_search_socket=$ac_res
15029 fi
15030 rm -f core conftest.err conftest.$ac_objext \
15031     conftest$ac_exeext
15032   if ${ac_cv_search_socket+:} false; then :
15033   break
15034 fi
15035 done
15036 if ${ac_cv_search_socket+:} false; then :
15037
15038 else
15039   ac_cv_search_socket=no
15040 fi
15041 rm conftest.$ac_ext
15042 LIBS=$ac_func_search_save_LIBS
15043 fi
15044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
15045 $as_echo "$ac_cv_search_socket" >&6; }
15046 ac_res=$ac_cv_search_socket
15047 if test "$ac_res" != no; then :
15048   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15049
15050 fi
15051
15052
15053 # check wether strptime also works
15054
15055 # check some functions of the OS before linking libs (while still runnable).
15056 for ac_header in unistd.h
15057 do :
15058   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
15059 if test "x$ac_cv_header_unistd_h" = xyes; then :
15060   cat >>confdefs.h <<_ACEOF
15061 #define HAVE_UNISTD_H 1
15062 _ACEOF
15063
15064 fi
15065
15066 done
15067
15068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
15069 $as_echo_n "checking for working chown... " >&6; }
15070 if ${ac_cv_func_chown_works+:} false; then :
15071   $as_echo_n "(cached) " >&6
15072 else
15073   if test "$cross_compiling" = yes; then :
15074   ac_cv_func_chown_works=no
15075 else
15076   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15077 /* end confdefs.h.  */
15078 $ac_includes_default
15079 #include <fcntl.h>
15080
15081 int
15082 main ()
15083 {
15084   char *f = "conftest.chown";
15085   struct stat before, after;
15086
15087   if (creat (f, 0600) < 0)
15088     return 1;
15089   if (stat (f, &before) < 0)
15090     return 1;
15091   if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
15092     return 1;
15093   if (stat (f, &after) < 0)
15094     return 1;
15095   return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
15096
15097   ;
15098   return 0;
15099 }
15100 _ACEOF
15101 if ac_fn_c_try_run "$LINENO"; then :
15102   ac_cv_func_chown_works=yes
15103 else
15104   ac_cv_func_chown_works=no
15105 fi
15106 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15107   conftest.$ac_objext conftest.beam conftest.$ac_ext
15108 fi
15109
15110 rm -f conftest.chown
15111
15112 fi
15113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
15114 $as_echo "$ac_cv_func_chown_works" >&6; }
15115 if test $ac_cv_func_chown_works = yes; then
15116
15117 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
15118
15119 fi
15120
15121 for ac_header in vfork.h
15122 do :
15123   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15124 if test "x$ac_cv_header_vfork_h" = xyes; then :
15125   cat >>confdefs.h <<_ACEOF
15126 #define HAVE_VFORK_H 1
15127 _ACEOF
15128
15129 fi
15130
15131 done
15132
15133 for ac_func in fork vfork
15134 do :
15135   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15136 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15137 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15138   cat >>confdefs.h <<_ACEOF
15139 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15140 _ACEOF
15141
15142 fi
15143 done
15144
15145 if test "x$ac_cv_func_fork" = xyes; then
15146   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15147 $as_echo_n "checking for working fork... " >&6; }
15148 if ${ac_cv_func_fork_works+:} false; then :
15149   $as_echo_n "(cached) " >&6
15150 else
15151   if test "$cross_compiling" = yes; then :
15152   ac_cv_func_fork_works=cross
15153 else
15154   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15155 /* end confdefs.h.  */
15156 $ac_includes_default
15157 int
15158 main ()
15159 {
15160
15161           /* By Ruediger Kuhlmann. */
15162           return fork () < 0;
15163
15164   ;
15165   return 0;
15166 }
15167 _ACEOF
15168 if ac_fn_c_try_run "$LINENO"; then :
15169   ac_cv_func_fork_works=yes
15170 else
15171   ac_cv_func_fork_works=no
15172 fi
15173 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15174   conftest.$ac_objext conftest.beam conftest.$ac_ext
15175 fi
15176
15177 fi
15178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15179 $as_echo "$ac_cv_func_fork_works" >&6; }
15180
15181 else
15182   ac_cv_func_fork_works=$ac_cv_func_fork
15183 fi
15184 if test "x$ac_cv_func_fork_works" = xcross; then
15185   case $host in
15186     *-*-amigaos* | *-*-msdosdjgpp*)
15187       # Override, as these systems have only a dummy fork() stub
15188       ac_cv_func_fork_works=no
15189       ;;
15190     *)
15191       ac_cv_func_fork_works=yes
15192       ;;
15193   esac
15194   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15195 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15196 fi
15197 ac_cv_func_vfork_works=$ac_cv_func_vfork
15198 if test "x$ac_cv_func_vfork" = xyes; then
15199   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15200 $as_echo_n "checking for working vfork... " >&6; }
15201 if ${ac_cv_func_vfork_works+:} false; then :
15202   $as_echo_n "(cached) " >&6
15203 else
15204   if test "$cross_compiling" = yes; then :
15205   ac_cv_func_vfork_works=cross
15206 else
15207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15208 /* end confdefs.h.  */
15209 /* Thanks to Paul Eggert for this test.  */
15210 $ac_includes_default
15211 #include <sys/wait.h>
15212 #ifdef HAVE_VFORK_H
15213 # include <vfork.h>
15214 #endif
15215 /* On some sparc systems, changes by the child to local and incoming
15216    argument registers are propagated back to the parent.  The compiler
15217    is told about this with #include <vfork.h>, but some compilers
15218    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15219    static variable whose address is put into a register that is
15220    clobbered by the vfork.  */
15221 static void
15222 #ifdef __cplusplus
15223 sparc_address_test (int arg)
15224 # else
15225 sparc_address_test (arg) int arg;
15226 #endif
15227 {
15228   static pid_t child;
15229   if (!child) {
15230     child = vfork ();
15231     if (child < 0) {
15232       perror ("vfork");
15233       _exit(2);
15234     }
15235     if (!child) {
15236       arg = getpid();
15237       write(-1, "", 0);
15238       _exit (arg);
15239     }
15240   }
15241 }
15242
15243 int
15244 main ()
15245 {
15246   pid_t parent = getpid ();
15247   pid_t child;
15248
15249   sparc_address_test (0);
15250
15251   child = vfork ();
15252
15253   if (child == 0) {
15254     /* Here is another test for sparc vfork register problems.  This
15255        test uses lots of local variables, at least as many local
15256        variables as main has allocated so far including compiler
15257        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15258        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15259        reuse the register of parent for one of the local variables,
15260        since it will think that parent can't possibly be used any more
15261        in this routine.  Assigning to the local variable will thus
15262        munge parent in the parent process.  */
15263     pid_t
15264       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15265       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15266     /* Convince the compiler that p..p7 are live; otherwise, it might
15267        use the same hardware register for all 8 local variables.  */
15268     if (p != p1 || p != p2 || p != p3 || p != p4
15269         || p != p5 || p != p6 || p != p7)
15270       _exit(1);
15271
15272     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15273        from child file descriptors.  If the child closes a descriptor
15274        before it execs or exits, this munges the parent's descriptor
15275        as well.  Test for this by closing stdout in the child.  */
15276     _exit(close(fileno(stdout)) != 0);
15277   } else {
15278     int status;
15279     struct stat st;
15280
15281     while (wait(&status) != child)
15282       ;
15283     return (
15284          /* Was there some problem with vforking?  */
15285          child < 0
15286
15287          /* Did the child fail?  (This shouldn't happen.)  */
15288          || status
15289
15290          /* Did the vfork/compiler bug occur?  */
15291          || parent != getpid()
15292
15293          /* Did the file descriptor bug occur?  */
15294          || fstat(fileno(stdout), &st) != 0
15295          );
15296   }
15297 }
15298 _ACEOF
15299 if ac_fn_c_try_run "$LINENO"; then :
15300   ac_cv_func_vfork_works=yes
15301 else
15302   ac_cv_func_vfork_works=no
15303 fi
15304 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15305   conftest.$ac_objext conftest.beam conftest.$ac_ext
15306 fi
15307
15308 fi
15309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15310 $as_echo "$ac_cv_func_vfork_works" >&6; }
15311
15312 fi;
15313 if test "x$ac_cv_func_fork_works" = xcross; then
15314   ac_cv_func_vfork_works=$ac_cv_func_vfork
15315   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15316 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15317 fi
15318
15319 if test "x$ac_cv_func_vfork_works" = xyes; then
15320
15321 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15322
15323 else
15324
15325 $as_echo "#define vfork fork" >>confdefs.h
15326
15327 fi
15328 if test "x$ac_cv_func_fork_works" = xyes; then
15329
15330 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15331
15332 fi
15333
15334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
15335 $as_echo_n "checking return type of signal handlers... " >&6; }
15336 if ${ac_cv_type_signal+:} false; then :
15337   $as_echo_n "(cached) " >&6
15338 else
15339   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15340 /* end confdefs.h.  */
15341 #include <sys/types.h>
15342 #include <signal.h>
15343
15344 int
15345 main ()
15346 {
15347 return *(signal (0, 0)) (0) == 1;
15348   ;
15349   return 0;
15350 }
15351 _ACEOF
15352 if ac_fn_c_try_compile "$LINENO"; then :
15353   ac_cv_type_signal=int
15354 else
15355   ac_cv_type_signal=void
15356 fi
15357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15358 fi
15359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
15360 $as_echo "$ac_cv_type_signal" >&6; }
15361
15362 cat >>confdefs.h <<_ACEOF
15363 #define RETSIGTYPE $ac_cv_type_signal
15364 _ACEOF
15365
15366
15367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15368 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15369 if ${ac_cv_sys_largefile_source+:} false; then :
15370   $as_echo_n "(cached) " >&6
15371 else
15372   while :; do
15373   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15374 /* end confdefs.h.  */
15375 #include <sys/types.h> /* for off_t */
15376      #include <stdio.h>
15377 int
15378 main ()
15379 {
15380 int (*fp) (FILE *, off_t, int) = fseeko;
15381      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15382   ;
15383   return 0;
15384 }
15385 _ACEOF
15386 if ac_fn_c_try_link "$LINENO"; then :
15387   ac_cv_sys_largefile_source=no; break
15388 fi
15389 rm -f core conftest.err conftest.$ac_objext \
15390     conftest$ac_exeext conftest.$ac_ext
15391   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15392 /* end confdefs.h.  */
15393 #define _LARGEFILE_SOURCE 1
15394 #include <sys/types.h> /* for off_t */
15395      #include <stdio.h>
15396 int
15397 main ()
15398 {
15399 int (*fp) (FILE *, off_t, int) = fseeko;
15400      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15401   ;
15402   return 0;
15403 }
15404 _ACEOF
15405 if ac_fn_c_try_link "$LINENO"; then :
15406   ac_cv_sys_largefile_source=1; break
15407 fi
15408 rm -f core conftest.err conftest.$ac_objext \
15409     conftest$ac_exeext conftest.$ac_ext
15410   ac_cv_sys_largefile_source=unknown
15411   break
15412 done
15413 fi
15414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15415 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15416 case $ac_cv_sys_largefile_source in #(
15417   no | unknown) ;;
15418   *)
15419 cat >>confdefs.h <<_ACEOF
15420 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15421 _ACEOF
15422 ;;
15423 esac
15424 rm -rf conftest*
15425
15426 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15427 # in glibc 2.1.3, but that breaks too many other things.
15428 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15429 if test $ac_cv_sys_largefile_source != unknown; then
15430
15431 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15432
15433 fi
15434
15435
15436 # Check whether --enable-largefile was given.
15437 if test "${enable_largefile+set}" = set; then :
15438   enableval=$enable_largefile;
15439 fi
15440
15441 if test "$enable_largefile" != no; then
15442
15443   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15444 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15445 if ${ac_cv_sys_largefile_CC+:} false; then :
15446   $as_echo_n "(cached) " >&6
15447 else
15448   ac_cv_sys_largefile_CC=no
15449      if test "$GCC" != yes; then
15450        ac_save_CC=$CC
15451        while :; do
15452          # IRIX 6.2 and later do not support large files by default,
15453          # so use the C compiler's -n32 option if that helps.
15454          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15455 /* end confdefs.h.  */
15456 #include <sys/types.h>
15457  /* Check that off_t can represent 2**63 - 1 correctly.
15458     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15459     since some C++ compilers masquerading as C compilers
15460     incorrectly reject 9223372036854775807.  */
15461 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15462   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15463                        && LARGE_OFF_T % 2147483647 == 1)
15464                       ? 1 : -1];
15465 int
15466 main ()
15467 {
15468
15469   ;
15470   return 0;
15471 }
15472 _ACEOF
15473          if ac_fn_c_try_compile "$LINENO"; then :
15474   break
15475 fi
15476 rm -f core conftest.err conftest.$ac_objext
15477          CC="$CC -n32"
15478          if ac_fn_c_try_compile "$LINENO"; then :
15479   ac_cv_sys_largefile_CC=' -n32'; break
15480 fi
15481 rm -f core conftest.err conftest.$ac_objext
15482          break
15483        done
15484        CC=$ac_save_CC
15485        rm -f conftest.$ac_ext
15486     fi
15487 fi
15488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15489 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15490   if test "$ac_cv_sys_largefile_CC" != no; then
15491     CC=$CC$ac_cv_sys_largefile_CC
15492   fi
15493
15494   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15495 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15496 if ${ac_cv_sys_file_offset_bits+:} false; then :
15497   $as_echo_n "(cached) " >&6
15498 else
15499   while :; do
15500   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15501 /* end confdefs.h.  */
15502 #include <sys/types.h>
15503  /* Check that off_t can represent 2**63 - 1 correctly.
15504     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15505     since some C++ compilers masquerading as C compilers
15506     incorrectly reject 9223372036854775807.  */
15507 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15508   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15509                        && LARGE_OFF_T % 2147483647 == 1)
15510                       ? 1 : -1];
15511 int
15512 main ()
15513 {
15514
15515   ;
15516   return 0;
15517 }
15518 _ACEOF
15519 if ac_fn_c_try_compile "$LINENO"; then :
15520   ac_cv_sys_file_offset_bits=no; break
15521 fi
15522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15523   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15524 /* end confdefs.h.  */
15525 #define _FILE_OFFSET_BITS 64
15526 #include <sys/types.h>
15527  /* Check that off_t can represent 2**63 - 1 correctly.
15528     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15529     since some C++ compilers masquerading as C compilers
15530     incorrectly reject 9223372036854775807.  */
15531 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15532   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15533                        && LARGE_OFF_T % 2147483647 == 1)
15534                       ? 1 : -1];
15535 int
15536 main ()
15537 {
15538
15539   ;
15540   return 0;
15541 }
15542 _ACEOF
15543 if ac_fn_c_try_compile "$LINENO"; then :
15544   ac_cv_sys_file_offset_bits=64; break
15545 fi
15546 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15547   ac_cv_sys_file_offset_bits=unknown
15548   break
15549 done
15550 fi
15551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15552 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15553 case $ac_cv_sys_file_offset_bits in #(
15554   no | unknown) ;;
15555   *)
15556 cat >>confdefs.h <<_ACEOF
15557 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15558 _ACEOF
15559 ;;
15560 esac
15561 rm -rf conftest*
15562   if test $ac_cv_sys_file_offset_bits = unknown; then
15563     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15564 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15565 if ${ac_cv_sys_large_files+:} false; then :
15566   $as_echo_n "(cached) " >&6
15567 else
15568   while :; do
15569   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15570 /* end confdefs.h.  */
15571 #include <sys/types.h>
15572  /* Check that off_t can represent 2**63 - 1 correctly.
15573     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15574     since some C++ compilers masquerading as C compilers
15575     incorrectly reject 9223372036854775807.  */
15576 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15577   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15578                        && LARGE_OFF_T % 2147483647 == 1)
15579                       ? 1 : -1];
15580 int
15581 main ()
15582 {
15583
15584   ;
15585   return 0;
15586 }
15587 _ACEOF
15588 if ac_fn_c_try_compile "$LINENO"; then :
15589   ac_cv_sys_large_files=no; break
15590 fi
15591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15592   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15593 /* end confdefs.h.  */
15594 #define _LARGE_FILES 1
15595 #include <sys/types.h>
15596  /* Check that off_t can represent 2**63 - 1 correctly.
15597     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15598     since some C++ compilers masquerading as C compilers
15599     incorrectly reject 9223372036854775807.  */
15600 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15601   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15602                        && LARGE_OFF_T % 2147483647 == 1)
15603                       ? 1 : -1];
15604 int
15605 main ()
15606 {
15607
15608   ;
15609   return 0;
15610 }
15611 _ACEOF
15612 if ac_fn_c_try_compile "$LINENO"; then :
15613   ac_cv_sys_large_files=1; break
15614 fi
15615 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15616   ac_cv_sys_large_files=unknown
15617   break
15618 done
15619 fi
15620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15621 $as_echo "$ac_cv_sys_large_files" >&6; }
15622 case $ac_cv_sys_large_files in #(
15623   no | unknown) ;;
15624   *)
15625 cat >>confdefs.h <<_ACEOF
15626 #define _LARGE_FILES $ac_cv_sys_large_files
15627 _ACEOF
15628 ;;
15629 esac
15630 rm -rf conftest*
15631   fi
15632
15633
15634 fi
15635
15636
15637
15638
15639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
15640 $as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
15641 cache=_D_LARGEFILE_SOURCE_1
15642 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
15643   $as_echo_n "(cached) " >&6
15644 else
15645
15646 echo '
15647 #include <stdio.h>
15648 int test() {
15649         int a = fseeko(stdin, 0, 0);
15650         return a;
15651 }
15652 ' > conftest.c
15653 echo 'void f(){}' >>conftest.c
15654 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
15655 eval "cv_prog_cc_flag_needed_$cache=no"
15656 else
15657
15658 if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
15659 eval "cv_prog_cc_flag_needed_$cache=yes"
15660 else
15661 eval "cv_prog_cc_flag_needed_$cache=fail"
15662 #echo 'Test with flag fails too!'
15663 #cat conftest.c
15664 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15665 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15666 #exit 1
15667 fi
15668
15669 fi
15670 rm -f conftest conftest.c conftest.o
15671
15672 fi
15673
15674 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
15675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15676 $as_echo "yes" >&6; }
15677 :
15678 CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
15679 else
15680 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
15681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15682 $as_echo "no" >&6; }
15683 #echo 'Test with flag is no!'
15684 #cat conftest.c
15685 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15686 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15687 #exit 1
15688 :
15689
15690 else
15691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15692 $as_echo "failed" >&6; }
15693 :
15694
15695 fi
15696 fi
15697
15698
15699
15700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
15701 $as_echo_n "checking if nonblocking sockets work... " >&6; }
15702 if echo $target | grep mingw32 >/dev/null; then
15703         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
15704 $as_echo "no (windows)" >&6; }
15705
15706 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15707
15708 else
15709 if test "$cross_compiling" = yes; then :
15710
15711         { $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
15712 $as_echo "crosscompile(yes)" >&6; }
15713
15714 else
15715   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15716 /* end confdefs.h.  */
15717
15718
15719 #include <stdio.h>
15720 #include <string.h>
15721 #include <stdlib.h>
15722 #include <fcntl.h>
15723 #include <errno.h>
15724 #ifdef HAVE_SYS_TYPES_H
15725 #include <sys/types.h>
15726 #endif
15727 #ifdef HAVE_SYS_SOCKET_H
15728 #include <sys/socket.h>
15729 #endif
15730 #ifdef HAVE_NETINET_IN_H
15731 #include <netinet/in.h>
15732 #endif
15733 #ifdef HAVE_ARPA_INET_H
15734 #include <arpa/inet.h>
15735 #endif
15736 #ifdef HAVE_UNISTD_H
15737 #include <unistd.h>
15738 #endif
15739 #ifdef HAVE_TIME_H
15740 #include <time.h>
15741 #endif
15742
15743 int main(void)
15744 {
15745         int port;
15746         int sfd, cfd;
15747         int num = 10;
15748         int i, p;
15749         struct sockaddr_in a;
15750         /* test if select and nonblocking reads work well together */
15751         /* open port.
15752            fork child to send 10 messages.
15753            select to read.
15754            then try to nonblocking read the 10 messages
15755            then, nonblocking read must give EAGAIN
15756         */
15757
15758         port = 12345 + (time(0)%32);
15759         sfd = socket(PF_INET, SOCK_DGRAM, 0);
15760         if(sfd == -1) {
15761                 perror("socket");
15762                 return 1;
15763         }
15764         memset(&a, 0, sizeof(a));
15765         a.sin_family = AF_INET;
15766         a.sin_port = htons(port);
15767         a.sin_addr.s_addr = inet_addr("127.0.0.1");
15768         if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15769                 perror("bind");
15770                 return 1;
15771         }
15772         if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
15773                 perror("fcntl");
15774                 return 1;
15775         }
15776
15777         cfd = socket(PF_INET, SOCK_DGRAM, 0);
15778         if(cfd == -1) {
15779                 perror("client socket");
15780                 return 1;
15781         }
15782         a.sin_port = 0;
15783         if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15784                 perror("client bind");
15785                 return 1;
15786         }
15787         a.sin_port = htons(port);
15788
15789         /* no handler, causes exit in 10 seconds */
15790         alarm(10);
15791
15792         /* send and receive on the socket */
15793         if((p=fork()) == 0) {
15794                 for(i=0; i<num; i++) {
15795                         if(sendto(cfd, &i, sizeof(i), 0,
15796                                 (struct sockaddr*)&a, sizeof(a)) < 0) {
15797                                 perror("sendto");
15798                                 return 1;
15799                         }
15800                 }
15801         } else {
15802                 /* parent */
15803                 fd_set rset;
15804                 int x;
15805                 if(p == -1) {
15806                         perror("fork");
15807                         return 1;
15808                 }
15809                 FD_ZERO(&rset);
15810                 FD_SET(sfd, &rset);
15811                 if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
15812                         perror("select");
15813                         return 1;
15814                 }
15815                 i = 0;
15816                 while(i < num) {
15817                         if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
15818                                 if(errno == EAGAIN)
15819                                         continue;
15820                                 perror("recv");
15821                                 return 1;
15822                         }
15823                         i++;
15824                 }
15825                 /* now we want to get EAGAIN: nonblocking goodness */
15826                 errno = 0;
15827                 recv(sfd, &x, sizeof(x), 0);
15828                 if(errno != EAGAIN) {
15829                         perror("trying to recv again");
15830                         return 1;
15831                 }
15832                 /* EAGAIN encountered */
15833         }
15834
15835         close(sfd);
15836         close(cfd);
15837         return 0;
15838 }
15839
15840 _ACEOF
15841 if ac_fn_c_try_run "$LINENO"; then :
15842
15843         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15844 $as_echo "yes" >&6; }
15845
15846 else
15847
15848         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15849 $as_echo "no" >&6; }
15850
15851 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15852
15853
15854 fi
15855 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15856   conftest.$ac_objext conftest.beam conftest.$ac_ext
15857 fi
15858
15859 fi
15860
15861
15862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
15863 $as_echo_n "checking whether mkdir has one arg... " >&6; }
15864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15865 /* end confdefs.h.  */
15866
15867 #include <stdio.h>
15868 #include <unistd.h>
15869 #ifdef HAVE_WINSOCK2_H
15870 #include <winsock2.h>
15871 #endif
15872 #ifdef HAVE_SYS_STAT_H
15873 #include <sys/stat.h>
15874 #endif
15875
15876 int
15877 main ()
15878 {
15879
15880         (void)mkdir("directory");
15881
15882   ;
15883   return 0;
15884 }
15885 _ACEOF
15886 if ac_fn_c_try_compile "$LINENO"; then :
15887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15888 $as_echo "yes" >&6; }
15889
15890 $as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
15891
15892
15893 else
15894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15895 $as_echo "no" >&6; }
15896
15897 fi
15898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15899
15900 for ac_func in strptime
15901 do :
15902   ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
15903 if test "x$ac_cv_func_strptime" = xyes; then :
15904   cat >>confdefs.h <<_ACEOF
15905 #define HAVE_STRPTIME 1
15906 _ACEOF
15907
15908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
15909 $as_echo_n "checking whether strptime works... " >&6; }
15910 if test c${cross_compiling} = cno; then
15911 if test "$cross_compiling" = yes; then :
15912   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15913 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15914 as_fn_error $? "cannot run test program while cross compiling
15915 See \`config.log' for more details" "$LINENO" 5; }
15916 else
15917   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15918 /* end confdefs.h.  */
15919
15920 #define _XOPEN_SOURCE 600
15921 #include <time.h>
15922 int main(void) { struct tm tm; char *res;
15923 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);
15924 if (!res) return 2;
15925 res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
15926 if (!res) return 1; return 0; }
15927
15928 _ACEOF
15929 if ac_fn_c_try_run "$LINENO"; then :
15930   eval "ac_cv_c_strptime_works=yes"
15931 else
15932   eval "ac_cv_c_strptime_works=no"
15933 fi
15934 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15935   conftest.$ac_objext conftest.beam conftest.$ac_ext
15936 fi
15937
15938 else
15939 eval "ac_cv_c_strptime_works=maybe"
15940 fi
15941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
15942 $as_echo "$ac_cv_c_strptime_works" >&6; }
15943 if test $ac_cv_c_strptime_works = no; then
15944 case " $LIBOBJS " in
15945   *" strptime.$ac_objext "* ) ;;
15946   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15947  ;;
15948 esac
15949
15950 else
15951
15952 cat >>confdefs.h <<_ACEOF
15953 #define STRPTIME_WORKS 1
15954 _ACEOF
15955
15956 fi
15957
15958 else
15959   case " $LIBOBJS " in
15960   *" strptime.$ac_objext "* ) ;;
15961   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15962  ;;
15963 esac
15964
15965 fi
15966 done
15967
15968
15969 # check if we can use SO_REUSEPORT
15970 if echo "$host" | grep -i -e linux -e dragonfly >/dev/null; then
15971
15972 $as_echo "#define REUSEPORT_DEFAULT 1" >>confdefs.h
15973
15974 else
15975
15976 $as_echo "#define REUSEPORT_DEFAULT 0" >>confdefs.h
15977
15978 fi
15979
15980 # set memory allocation checking if requested
15981 # Check whether --enable-alloc-checks was given.
15982 if test "${enable_alloc_checks+set}" = set; then :
15983   enableval=$enable_alloc_checks;
15984 fi
15985
15986 # Check whether --enable-alloc-lite was given.
15987 if test "${enable_alloc_lite+set}" = set; then :
15988   enableval=$enable_alloc_lite;
15989 fi
15990
15991 # Check whether --enable-alloc-nonregional was given.
15992 if test "${enable_alloc_nonregional+set}" = set; then :
15993   enableval=$enable_alloc_nonregional;
15994 fi
15995
15996 if test x_$enable_alloc_nonregional = x_yes; then
15997
15998 $as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
15999
16000 fi
16001 if test x_$enable_alloc_checks = x_yes; then
16002
16003 $as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
16004
16005 else
16006         if test x_$enable_alloc_lite = x_yes; then
16007
16008 $as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
16009
16010         else
16011
16012         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
16013 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
16014         if test "$cross_compiling" = yes; then :
16015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
16016 $as_echo "no (crosscompile)" >&6; }
16017         case " $LIBOBJS " in
16018   *" malloc.$ac_objext "* ) ;;
16019   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
16020  ;;
16021 esac
16022
16023
16024 cat >>confdefs.h <<_ACEOF
16025 #define malloc rpl_malloc_unbound
16026 _ACEOF
16027
16028 else
16029   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16030 /* end confdefs.h.  */
16031 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
16032 #include <stdlib.h>
16033 #else
16034 char *malloc ();
16035 #endif
16036
16037 int
16038 main ()
16039 {
16040  if(malloc(0) != 0) return 1;
16041   ;
16042   return 0;
16043 }
16044
16045 _ACEOF
16046 if ac_fn_c_try_run "$LINENO"; then :
16047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16048 $as_echo "no" >&6; }
16049         case " $LIBOBJS " in
16050   *" malloc.$ac_objext "* ) ;;
16051   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
16052  ;;
16053 esac
16054
16055
16056 cat >>confdefs.h <<_ACEOF
16057 #define malloc rpl_malloc_unbound
16058 _ACEOF
16059
16060 else
16061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16062 $as_echo "yes" >&6; }
16063
16064 $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
16065
16066 fi
16067 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16068   conftest.$ac_objext conftest.beam conftest.$ac_ext
16069 fi
16070
16071
16072         fi
16073 fi
16074
16075 # check windows threads (we use them, not pthreads, on windows).
16076 if test "$on_mingw" = "yes"; then
16077 # check windows threads
16078         for ac_header in windows.h
16079 do :
16080   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
16081 "
16082 if test "x$ac_cv_header_windows_h" = xyes; then :
16083   cat >>confdefs.h <<_ACEOF
16084 #define HAVE_WINDOWS_H 1
16085 _ACEOF
16086
16087 fi
16088
16089 done
16090
16091         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
16092 $as_echo_n "checking for CreateThread... " >&6; }
16093         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16094 /* end confdefs.h.  */
16095
16096 #ifdef HAVE_WINDOWS_H
16097 #include <windows.h>
16098 #endif
16099
16100 int
16101 main ()
16102 {
16103
16104         HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
16105
16106   ;
16107   return 0;
16108 }
16109 _ACEOF
16110 if ac_fn_c_try_compile "$LINENO"; then :
16111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16112 $as_echo "yes" >&6; }
16113
16114 $as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
16115
16116
16117 else
16118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16119 $as_echo "no" >&6; }
16120
16121 fi
16122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16123
16124 else
16125 # not on mingw, check thread libraries.
16126
16127 # check for thread library.
16128 # check this first, so that the pthread lib does not get linked in via
16129 # libssl or libpython, and thus distorts the tests, and we end up using
16130 # the non-threadsafe C libraries.
16131
16132 # Check whether --with-pthreads was given.
16133 if test "${with_pthreads+set}" = set; then :
16134   withval=$with_pthreads;
16135 else
16136    withval="yes"
16137 fi
16138
16139 ub_have_pthreads=no
16140 if test x_$withval != x_no; then
16141
16142
16143 ac_ext=c
16144 ac_cpp='$CPP $CPPFLAGS'
16145 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16146 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16147 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16148
16149 ax_pthread_ok=no
16150
16151 # We used to check for pthread.h first, but this fails if pthread.h
16152 # requires special compiler flags (e.g. on True64 or Sequent).
16153 # It gets checked for in the link test anyway.
16154
16155 # First of all, check if the user has set any of the PTHREAD_LIBS,
16156 # etcetera environment variables, and if threads linking works using
16157 # them:
16158 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16159         save_CFLAGS="$CFLAGS"
16160         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16161         save_LIBS="$LIBS"
16162         LIBS="$PTHREAD_LIBS $LIBS"
16163         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16164 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
16165         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16166 /* end confdefs.h.  */
16167
16168 /* Override any GCC internal prototype to avoid an error.
16169    Use char because int might match the return type of a GCC
16170    builtin and then its argument prototype would still apply.  */
16171 #ifdef __cplusplus
16172 extern "C"
16173 #endif
16174 char pthread_join ();
16175 int
16176 main ()
16177 {
16178 return pthread_join ();
16179   ;
16180   return 0;
16181 }
16182 _ACEOF
16183 if ac_fn_c_try_link "$LINENO"; then :
16184   ax_pthread_ok=yes
16185 fi
16186 rm -f core conftest.err conftest.$ac_objext \
16187     conftest$ac_exeext conftest.$ac_ext
16188         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16189 $as_echo "$ax_pthread_ok" >&6; }
16190         if test x"$ax_pthread_ok" = xno; then
16191                 PTHREAD_LIBS=""
16192                 PTHREAD_CFLAGS=""
16193         fi
16194         LIBS="$save_LIBS"
16195         CFLAGS="$save_CFLAGS"
16196 fi
16197
16198 # We must check for the threads library under a number of different
16199 # names; the ordering is very important because some systems
16200 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16201 # libraries is broken (non-POSIX).
16202
16203 # Create a list of thread flags to try.  Items starting with a "-" are
16204 # C compiler flags, and other items are library names, except for "none"
16205 # which indicates that we try without any flags at all, and "pthread-config"
16206 # which is a program returning the flags for the Pth emulation library.
16207
16208 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
16209
16210 # The ordering *is* (sometimes) important.  Some notes on the
16211 # individual items follow:
16212
16213 # pthreads: AIX (must check this before -lpthread)
16214 # none: in case threads are in libc; should be tried before -Kthread and
16215 #       other compiler flags to prevent continual compiler warnings
16216 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16217 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16218 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16219 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16220 # -pthreads: Solaris/gcc
16221 # -mthreads: Mingw32/gcc, Lynx/gcc
16222 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16223 #      doesn't hurt to check since this sometimes defines pthreads too;
16224 #      also defines -D_REENTRANT)
16225 #      ... -mt is also the pthreads flag for HP/aCC
16226 # pthread: Linux, etcetera
16227 # --thread-safe: KAI C++
16228 # pthread-config: use pthread-config program (for GNU Pth library)
16229
16230 case ${host_os} in
16231         solaris*)
16232
16233         # On Solaris (at least, for some versions), libc contains stubbed
16234         # (non-functional) versions of the pthreads routines, so link-based
16235         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
16236         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16237         # a function called by this macro, so we could check for that, but
16238         # who knows whether they'll stub that too in a future libc.)  So,
16239         # we'll just look for -pthreads and -lpthread first:
16240
16241         ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
16242         ;;
16243
16244         darwin*)
16245         ax_pthread_flags="-pthread $ax_pthread_flags"
16246         ;;
16247 esac
16248
16249 # Clang doesn't consider unrecognized options an error unless we specify
16250 # -Werror. We throw in some extra Clang-specific options to ensure that
16251 # this doesn't happen for GCC, which also accepts -Werror.
16252
16253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
16254 $as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
16255 save_CFLAGS="$CFLAGS"
16256 ax_pthread_extra_flags="-Werror"
16257 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
16258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16259 /* end confdefs.h.  */
16260 int foo(void);
16261 int
16262 main ()
16263 {
16264 foo()
16265   ;
16266   return 0;
16267 }
16268 _ACEOF
16269 if ac_fn_c_try_compile "$LINENO"; then :
16270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16271 $as_echo "yes" >&6; }
16272 else
16273   ax_pthread_extra_flags=
16274                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16275 $as_echo "no" >&6; }
16276 fi
16277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16278 CFLAGS="$save_CFLAGS"
16279
16280 if test x"$ax_pthread_ok" = xno; then
16281 for flag in $ax_pthread_flags; do
16282
16283         case $flag in
16284                 none)
16285                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
16286 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
16287                 ;;
16288
16289                 -*)
16290                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
16291 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
16292                 PTHREAD_CFLAGS="$flag"
16293                 ;;
16294
16295                 pthread-config)
16296                 # Extract the first word of "pthread-config", so it can be a program name with args.
16297 set dummy pthread-config; ac_word=$2
16298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16299 $as_echo_n "checking for $ac_word... " >&6; }
16300 if ${ac_cv_prog_ax_pthread_config+:} false; then :
16301   $as_echo_n "(cached) " >&6
16302 else
16303   if test -n "$ax_pthread_config"; then
16304   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
16305 else
16306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16307 for as_dir in $PATH
16308 do
16309   IFS=$as_save_IFS
16310   test -z "$as_dir" && as_dir=.
16311     for ac_exec_ext in '' $ac_executable_extensions; do
16312   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16313     ac_cv_prog_ax_pthread_config="yes"
16314     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16315     break 2
16316   fi
16317 done
16318   done
16319 IFS=$as_save_IFS
16320
16321   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
16322 fi
16323 fi
16324 ax_pthread_config=$ac_cv_prog_ax_pthread_config
16325 if test -n "$ax_pthread_config"; then
16326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
16327 $as_echo "$ax_pthread_config" >&6; }
16328 else
16329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16330 $as_echo "no" >&6; }
16331 fi
16332
16333
16334                 if test x"$ax_pthread_config" = xno; then continue; fi
16335                 PTHREAD_CFLAGS="`pthread-config --cflags`"
16336                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16337                 ;;
16338
16339                 *)
16340                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
16341 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
16342                 PTHREAD_LIBS="-l$flag"
16343                 ;;
16344         esac
16345
16346         save_LIBS="$LIBS"
16347         save_CFLAGS="$CFLAGS"
16348         LIBS="$PTHREAD_LIBS $LIBS"
16349         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
16350
16351         # Check for various functions.  We must include pthread.h,
16352         # since some functions may be macros.  (On the Sequent, we
16353         # need a special flag -Kthread to make this header compile.)
16354         # We check for pthread_join because it is in -lpthread on IRIX
16355         # while pthread_create is in libc.  We check for pthread_attr_init
16356         # due to DEC craziness with -lpthreads.  We check for
16357         # pthread_cleanup_push because it is one of the few pthread
16358         # functions on Solaris that doesn't have a non-functional libc stub.
16359         # We try pthread_create on general principles.
16360         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16361 /* end confdefs.h.  */
16362 #include <pthread.h>
16363                         static void routine(void *a) { *((int*)a) = 0; }
16364                         static void *start_routine(void *a) { return a; }
16365 int
16366 main ()
16367 {
16368 pthread_t th; pthread_attr_t attr;
16369                         pthread_create(&th, 0, start_routine, 0);
16370                         pthread_join(th, 0);
16371                         pthread_attr_init(&attr);
16372                         pthread_cleanup_push(routine, 0);
16373                         pthread_cleanup_pop(0) /* ; */
16374   ;
16375   return 0;
16376 }
16377 _ACEOF
16378 if ac_fn_c_try_link "$LINENO"; then :
16379   ax_pthread_ok=yes
16380 fi
16381 rm -f core conftest.err conftest.$ac_objext \
16382     conftest$ac_exeext conftest.$ac_ext
16383
16384         LIBS="$save_LIBS"
16385         CFLAGS="$save_CFLAGS"
16386
16387         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16388 $as_echo "$ax_pthread_ok" >&6; }
16389         if test "x$ax_pthread_ok" = xyes; then
16390                 break;
16391         fi
16392
16393         PTHREAD_LIBS=""
16394         PTHREAD_CFLAGS=""
16395 done
16396 fi
16397
16398 # Various other checks:
16399 if test "x$ax_pthread_ok" = xyes; then
16400         save_LIBS="$LIBS"
16401         LIBS="$PTHREAD_LIBS $LIBS"
16402         save_CFLAGS="$CFLAGS"
16403         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16404
16405         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
16406         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
16407 $as_echo_n "checking for joinable pthread attribute... " >&6; }
16408         attr_name=unknown
16409         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
16410             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16411 /* end confdefs.h.  */
16412 #include <pthread.h>
16413 int
16414 main ()
16415 {
16416 int attr = $attr; return attr /* ; */
16417   ;
16418   return 0;
16419 }
16420 _ACEOF
16421 if ac_fn_c_try_link "$LINENO"; then :
16422   attr_name=$attr; break
16423 fi
16424 rm -f core conftest.err conftest.$ac_objext \
16425     conftest$ac_exeext conftest.$ac_ext
16426         done
16427         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
16428 $as_echo "$attr_name" >&6; }
16429         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
16430
16431 cat >>confdefs.h <<_ACEOF
16432 #define PTHREAD_CREATE_JOINABLE $attr_name
16433 _ACEOF
16434
16435         fi
16436
16437         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
16438 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
16439         flag=no
16440         case ${host_os} in
16441             aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
16442             osf* | hpux*) flag="-D_REENTRANT";;
16443             solaris*)
16444             if test "$GCC" = "yes"; then
16445                 flag="-D_REENTRANT"
16446             else
16447                 # TODO: What about Clang on Solaris?
16448                 flag="-mt -D_REENTRANT"
16449             fi
16450             ;;
16451         esac
16452         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
16453 $as_echo "$flag" >&6; }
16454         if test "x$flag" != xno; then
16455             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16456         fi
16457
16458         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
16459 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
16460 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
16461   $as_echo_n "(cached) " >&6
16462 else
16463
16464                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16465 /* end confdefs.h.  */
16466 #include <pthread.h>
16467 int
16468 main ()
16469 {
16470 int i = PTHREAD_PRIO_INHERIT;
16471   ;
16472   return 0;
16473 }
16474 _ACEOF
16475 if ac_fn_c_try_link "$LINENO"; then :
16476   ax_cv_PTHREAD_PRIO_INHERIT=yes
16477 else
16478   ax_cv_PTHREAD_PRIO_INHERIT=no
16479 fi
16480 rm -f core conftest.err conftest.$ac_objext \
16481     conftest$ac_exeext conftest.$ac_ext
16482
16483 fi
16484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
16485 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
16486         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
16487
16488 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
16489
16490 fi
16491
16492         LIBS="$save_LIBS"
16493         CFLAGS="$save_CFLAGS"
16494
16495         # More AIX lossage: compile with *_r variant
16496         if test "x$GCC" != xyes; then
16497             case $host_os in
16498                 aix*)
16499                 case "x/$CC" in #(
16500   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
16501     #handle absolute path differently from PATH based program lookup
16502                    case "x$CC" in #(
16503   x/*) :
16504     if as_fn_executable_p ${CC}_r; then :
16505   PTHREAD_CC="${CC}_r"
16506 fi ;; #(
16507   *) :
16508     for ac_prog in ${CC}_r
16509 do
16510   # Extract the first word of "$ac_prog", so it can be a program name with args.
16511 set dummy $ac_prog; ac_word=$2
16512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16513 $as_echo_n "checking for $ac_word... " >&6; }
16514 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
16515   $as_echo_n "(cached) " >&6
16516 else
16517   if test -n "$PTHREAD_CC"; then
16518   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16519 else
16520 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16521 for as_dir in $PATH
16522 do
16523   IFS=$as_save_IFS
16524   test -z "$as_dir" && as_dir=.
16525     for ac_exec_ext in '' $ac_executable_extensions; do
16526   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16527     ac_cv_prog_PTHREAD_CC="$ac_prog"
16528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16529     break 2
16530   fi
16531 done
16532   done
16533 IFS=$as_save_IFS
16534
16535 fi
16536 fi
16537 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16538 if test -n "$PTHREAD_CC"; then
16539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
16540 $as_echo "$PTHREAD_CC" >&6; }
16541 else
16542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16543 $as_echo "no" >&6; }
16544 fi
16545
16546
16547   test -n "$PTHREAD_CC" && break
16548 done
16549 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16550  ;;
16551 esac ;; #(
16552   *) :
16553      ;;
16554 esac
16555                 ;;
16556             esac
16557         fi
16558 fi
16559
16560 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16561
16562
16563
16564
16565
16566 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16567 if test x"$ax_pthread_ok" = xyes; then
16568
16569
16570 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
16571
16572                 if test -n "$PTHREAD_LIBS"; then
16573                   LIBS="$PTHREAD_LIBS $LIBS"
16574                 fi
16575                 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16576                 CC="$PTHREAD_CC"
16577                 ub_have_pthreads=yes
16578                 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
16579 "
16580 if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
16581
16582 cat >>confdefs.h <<_ACEOF
16583 #define HAVE_PTHREAD_SPINLOCK_T 1
16584 _ACEOF
16585
16586
16587 fi
16588 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
16589 "
16590 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
16591
16592 cat >>confdefs.h <<_ACEOF
16593 #define HAVE_PTHREAD_RWLOCK_T 1
16594 _ACEOF
16595
16596
16597 fi
16598
16599
16600                 if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
16601                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
16602 $as_echo_n "checking if -pthread unused during linking... " >&6; }
16603                 # catch clang warning 'argument unused during compilation'
16604                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16605 /* end confdefs.h.  */
16606 $ac_includes_default
16607
16608 int main(void) {return 0;}
16609
16610 _ACEOF
16611                 pthread_unused="yes"
16612                 # first compile
16613                 echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
16614                 $CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
16615                 if test $? = 0; then
16616                         # then link
16617                         echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
16618                         $CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
16619                         if test $? -ne 0; then
16620                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16621 $as_echo "yes" >&6; }
16622                                 CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
16623                                 PTHREAD_CFLAGS_ONLY="-pthread"
16624
16625                         else
16626                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16627 $as_echo "no" >&6; }
16628                         fi
16629                 else
16630                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16631 $as_echo "no" >&6; }
16632                 fi # endif cc successful
16633                 rm -f conftest conftest.c conftest.o
16634                 fi # endif -pthread in CFLAGS
16635
16636
16637         :
16638 else
16639         ax_pthread_ok=no
16640
16641 fi
16642 ac_ext=c
16643 ac_cpp='$CPP $CPPFLAGS'
16644 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16645 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16646 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16647
16648
16649 fi
16650
16651 # check solaris thread library
16652
16653 # Check whether --with-solaris-threads was given.
16654 if test "${with_solaris_threads+set}" = set; then :
16655   withval=$with_solaris_threads;
16656 else
16657    withval="no"
16658 fi
16659
16660 ub_have_sol_threads=no
16661 if test x_$withval != x_no; then
16662         if test x_$ub_have_pthreads != x_no; then
16663             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
16664 $as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
16665         else
16666         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
16667 $as_echo_n "checking for library containing thr_create... " >&6; }
16668 if ${ac_cv_search_thr_create+:} false; then :
16669   $as_echo_n "(cached) " >&6
16670 else
16671   ac_func_search_save_LIBS=$LIBS
16672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16673 /* end confdefs.h.  */
16674
16675 /* Override any GCC internal prototype to avoid an error.
16676    Use char because int might match the return type of a GCC
16677    builtin and then its argument prototype would still apply.  */
16678 #ifdef __cplusplus
16679 extern "C"
16680 #endif
16681 char thr_create ();
16682 int
16683 main ()
16684 {
16685 return thr_create ();
16686   ;
16687   return 0;
16688 }
16689 _ACEOF
16690 for ac_lib in '' thread; do
16691   if test -z "$ac_lib"; then
16692     ac_res="none required"
16693   else
16694     ac_res=-l$ac_lib
16695     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16696   fi
16697   if ac_fn_c_try_link "$LINENO"; then :
16698   ac_cv_search_thr_create=$ac_res
16699 fi
16700 rm -f core conftest.err conftest.$ac_objext \
16701     conftest$ac_exeext
16702   if ${ac_cv_search_thr_create+:} false; then :
16703   break
16704 fi
16705 done
16706 if ${ac_cv_search_thr_create+:} false; then :
16707
16708 else
16709   ac_cv_search_thr_create=no
16710 fi
16711 rm conftest.$ac_ext
16712 LIBS=$ac_func_search_save_LIBS
16713 fi
16714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
16715 $as_echo "$ac_cv_search_thr_create" >&6; }
16716 ac_res=$ac_cv_search_thr_create
16717 if test "$ac_res" != no; then :
16718   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16719
16720
16721 $as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
16722
16723
16724
16725
16726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
16727 $as_echo_n "checking whether $CC supports -mt... " >&6; }
16728 cache=`echo mt | sed 'y%.=/+-%___p_%'`
16729 if eval \${cv_prog_cc_flag_$cache+:} false; then :
16730   $as_echo_n "(cached) " >&6
16731 else
16732
16733 echo 'void f(void){}' >conftest.c
16734 if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
16735 eval "cv_prog_cc_flag_$cache=yes"
16736 else
16737 eval "cv_prog_cc_flag_$cache=no"
16738 fi
16739 rm -f conftest conftest.o conftest.c
16740
16741 fi
16742
16743 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
16744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16745 $as_echo "yes" >&6; }
16746 :
16747 CFLAGS="$CFLAGS -mt"
16748 else
16749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16750 $as_echo "no" >&6; }
16751 :
16752 CFLAGS="$CFLAGS -D_REENTRANT"
16753 fi
16754
16755                 ub_have_sol_threads=yes
16756
16757 else
16758
16759                 as_fn_error $? "no solaris threads found." "$LINENO" 5
16760
16761 fi
16762
16763         fi
16764 fi
16765
16766 fi # end of non-mingw check of thread libraries
16767
16768 # Check for PyUnbound
16769
16770 # Check whether --with-pyunbound was given.
16771 if test "${with_pyunbound+set}" = set; then :
16772   withval=$with_pyunbound;
16773 else
16774    withval="no"
16775 fi
16776
16777
16778 ub_test_python=no
16779 ub_with_pyunbound=no
16780 if test x_$withval != x_no; then
16781    ub_with_pyunbound=yes
16782    ub_test_python=yes
16783 fi
16784
16785 # Check for Python module
16786
16787 # Check whether --with-pythonmodule was given.
16788 if test "${with_pythonmodule+set}" = set; then :
16789   withval=$with_pythonmodule;
16790 else
16791    withval="no"
16792 fi
16793
16794
16795 ub_with_pythonmod=no
16796 if test x_$withval != x_no; then
16797    ub_with_pythonmod=yes
16798    ub_test_python=yes
16799 fi
16800
16801 # Check for Python & SWIG only on PyUnbound or PyModule
16802 if test x_$ub_test_python != x_no; then
16803
16804    # Check for Python
16805    ub_have_python=no
16806    ac_save_LIBS="$LIBS"
16807         #
16808         # Allow the use of a (user set) custom python version
16809         #
16810
16811
16812         # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
16813 set dummy python$PYTHON_VERSION; ac_word=$2
16814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16815 $as_echo_n "checking for $ac_word... " >&6; }
16816 if ${ac_cv_path_PYTHON+:} false; then :
16817   $as_echo_n "(cached) " >&6
16818 else
16819   case $PYTHON in
16820   [\\/]* | ?:[\\/]*)
16821   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
16822   ;;
16823   *)
16824   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16825 for as_dir in $PATH
16826 do
16827   IFS=$as_save_IFS
16828   test -z "$as_dir" && as_dir=.
16829     for ac_exec_ext in '' $ac_executable_extensions; do
16830   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16831     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
16832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16833     break 2
16834   fi
16835 done
16836   done
16837 IFS=$as_save_IFS
16838
16839   ;;
16840 esac
16841 fi
16842 PYTHON=$ac_cv_path_PYTHON
16843 if test -n "$PYTHON"; then
16844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
16845 $as_echo "$PYTHON" >&6; }
16846 else
16847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16848 $as_echo "no" >&6; }
16849 fi
16850
16851
16852         if test -z "$PYTHON"; then
16853            as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
16854            PYTHON_VERSION=""
16855         fi
16856
16857         if test -z "$PYTHON_VERSION"; then
16858                 PYTHON_VERSION=`$PYTHON -c "import sys; \
16859                         print(sys.version.split()[0])"`
16860         fi
16861
16862         #
16863         # Check if you have distutils, else fail
16864         #
16865         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
16866 $as_echo_n "checking for the distutils Python package... " >&6; }
16867         if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then
16868                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16869 $as_echo "yes" >&6; }
16870         else
16871                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16872 $as_echo "no" >&6; }
16873                 as_fn_error $? "cannot import Python module \"distutils\".
16874 Please check your Python installation. The error was:
16875 $ac_distutils_result" "$LINENO" 5
16876                 PYTHON_VERSION=""
16877         fi
16878
16879         #
16880         # Check for Python include path
16881         #
16882         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
16883 $as_echo_n "checking for Python include path... " >&6; }
16884         if test -z "$PYTHON_CPPFLAGS"; then
16885                 python_path=`$PYTHON -c "import distutils.sysconfig; \
16886                         print(distutils.sysconfig.get_python_inc());"`
16887                 if test -n "${python_path}"; then
16888                         python_path="-I$python_path"
16889                 fi
16890                 PYTHON_CPPFLAGS=$python_path
16891         fi
16892         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
16893 $as_echo "$PYTHON_CPPFLAGS" >&6; }
16894
16895
16896         #
16897         # Check for Python library path
16898         #
16899         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
16900 $as_echo_n "checking for Python library path... " >&6; }
16901         if test -z "$PYTHON_LDFLAGS"; then
16902                 PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
16903                         print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
16904         fi
16905         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
16906 $as_echo "$PYTHON_LDFLAGS" >&6; }
16907
16908
16909         #
16910         # Check for site packages
16911         #
16912         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
16913 $as_echo_n "checking for Python site-packages path... " >&6; }
16914         if test -z "$PYTHON_SITE_PKG"; then
16915                 PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
16916                         print(distutils.sysconfig.get_python_lib(1,0));"`
16917         fi
16918         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
16919 $as_echo "$PYTHON_SITE_PKG" >&6; }
16920
16921
16922         #
16923         # final check to see if everything compiles alright
16924         #
16925         { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
16926 $as_echo_n "checking consistency of all components of python development environment... " >&6; }
16927         ac_ext=c
16928 ac_cpp='$CPP $CPPFLAGS'
16929 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16930 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16931 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16932
16933         # save current global flags
16934         ac_save_LIBS="$LIBS"
16935         ac_save_CPPFLAGS="$CPPFLAGS"
16936
16937         LIBS="$LIBS $PYTHON_LDFLAGS"
16938         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16939         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16940 /* end confdefs.h.  */
16941
16942                 #include <Python.h>
16943
16944 int
16945 main ()
16946 {
16947
16948                 Py_Initialize();
16949
16950   ;
16951   return 0;
16952 }
16953 _ACEOF
16954 if ac_fn_c_try_link "$LINENO"; then :
16955   pythonexists=yes
16956 else
16957   pythonexists=no
16958 fi
16959 rm -f core conftest.err conftest.$ac_objext \
16960     conftest$ac_exeext conftest.$ac_ext
16961
16962         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
16963 $as_echo "$pythonexists" >&6; }
16964
16965         if test ! "$pythonexists" = "yes"; then
16966            as_fn_error $? "
16967   Could not link test program to Python. Maybe the main Python library has been
16968   installed in some non-standard library path. If so, pass it to configure,
16969   via the LDFLAGS environment variable.
16970   Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
16971   ============================================================================
16972    ERROR!
16973    You probably have to install the development version of the Python package
16974    for your distribution.  The exact name of this package varies among them.
16975   ============================================================================
16976            " "$LINENO" 5
16977           PYTHON_VERSION=""
16978         fi
16979         ac_ext=c
16980 ac_cpp='$CPP $CPPFLAGS'
16981 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16982 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16983 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16984
16985         # turn back to default flags
16986         CPPFLAGS="$ac_save_CPPFLAGS"
16987         LIBS="$ac_save_LIBS"
16988
16989         #
16990         # all done!
16991         #
16992
16993    if test ! -z "$PYTHON_VERSION"; then
16994         if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
16995                 as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
16996         fi
16997
16998       PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
16999
17000       # Have Python
17001
17002 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
17003
17004       if test -n "$LIBS"; then
17005         LIBS="$PYTHON_LDFLAGS $LIBS"
17006       else
17007         LIBS="$PYTHON_LDFLAGS"
17008       fi
17009       if test -n "$CPPFLAGS"; then
17010         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
17011       else
17012         CPPFLAGS="$PYTHON_CPPFLAGS"
17013       fi
17014       ub_have_python=yes
17015
17016
17017
17018
17019
17020
17021
17022 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
17023         if test -n "$ac_tool_prefix"; then
17024   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17025 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17027 $as_echo_n "checking for $ac_word... " >&6; }
17028 if ${ac_cv_path_PKG_CONFIG+:} false; then :
17029   $as_echo_n "(cached) " >&6
17030 else
17031   case $PKG_CONFIG in
17032   [\\/]* | ?:[\\/]*)
17033   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
17034   ;;
17035   *)
17036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17037 for as_dir in $PATH
17038 do
17039   IFS=$as_save_IFS
17040   test -z "$as_dir" && as_dir=.
17041     for ac_exec_ext in '' $ac_executable_extensions; do
17042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17043     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
17044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17045     break 2
17046   fi
17047 done
17048   done
17049 IFS=$as_save_IFS
17050
17051   ;;
17052 esac
17053 fi
17054 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
17055 if test -n "$PKG_CONFIG"; then
17056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17057 $as_echo "$PKG_CONFIG" >&6; }
17058 else
17059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17060 $as_echo "no" >&6; }
17061 fi
17062
17063
17064 fi
17065 if test -z "$ac_cv_path_PKG_CONFIG"; then
17066   ac_pt_PKG_CONFIG=$PKG_CONFIG
17067   # Extract the first word of "pkg-config", so it can be a program name with args.
17068 set dummy pkg-config; ac_word=$2
17069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17070 $as_echo_n "checking for $ac_word... " >&6; }
17071 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
17072   $as_echo_n "(cached) " >&6
17073 else
17074   case $ac_pt_PKG_CONFIG in
17075   [\\/]* | ?:[\\/]*)
17076   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
17077   ;;
17078   *)
17079   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17080 for as_dir in $PATH
17081 do
17082   IFS=$as_save_IFS
17083   test -z "$as_dir" && as_dir=.
17084     for ac_exec_ext in '' $ac_executable_extensions; do
17085   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17086     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
17087     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17088     break 2
17089   fi
17090 done
17091   done
17092 IFS=$as_save_IFS
17093
17094   ;;
17095 esac
17096 fi
17097 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
17098 if test -n "$ac_pt_PKG_CONFIG"; then
17099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
17100 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
17101 else
17102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17103 $as_echo "no" >&6; }
17104 fi
17105
17106   if test "x$ac_pt_PKG_CONFIG" = x; then
17107     PKG_CONFIG=""
17108   else
17109     case $cross_compiling:$ac_tool_warned in
17110 yes:)
17111 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17112 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17113 ac_tool_warned=yes ;;
17114 esac
17115     PKG_CONFIG=$ac_pt_PKG_CONFIG
17116   fi
17117 else
17118   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
17119 fi
17120
17121 fi
17122 if test -n "$PKG_CONFIG"; then
17123         _pkg_min_version=0.9.0
17124         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
17125 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
17126         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
17127                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17128 $as_echo "yes" >&6; }
17129         else
17130                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17131 $as_echo "no" >&6; }
17132                 PKG_CONFIG=""
17133         fi
17134 fi
17135       if test -n "$PKG_CONFIG" && \
17136     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
17137   ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
17138   ac_status=$?
17139   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17140   test $ac_status = 0; }; then
17141   PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
17142 else
17143   PC_PY_DEPENDENCY="python"
17144 fi
17145
17146
17147       # Check for SWIG
17148       ub_have_swig=no
17149       # Check whether --enable-swig-version-check was given.
17150 if test "${enable_swig_version_check+set}" = set; then :
17151   enableval=$enable_swig_version_check;
17152 fi
17153
17154       if test "$enable_swig_version_check" = "yes"; then
17155
17156         # Extract the first word of "swig", so it can be a program name with args.
17157 set dummy swig; ac_word=$2
17158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17159 $as_echo_n "checking for $ac_word... " >&6; }
17160 if ${ac_cv_path_SWIG+:} false; then :
17161   $as_echo_n "(cached) " >&6
17162 else
17163   case $SWIG in
17164   [\\/]* | ?:[\\/]*)
17165   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17166   ;;
17167   *)
17168   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17169 for as_dir in $PATH
17170 do
17171   IFS=$as_save_IFS
17172   test -z "$as_dir" && as_dir=.
17173     for ac_exec_ext in '' $ac_executable_extensions; do
17174   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17175     ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17177     break 2
17178   fi
17179 done
17180   done
17181 IFS=$as_save_IFS
17182
17183   ;;
17184 esac
17185 fi
17186 SWIG=$ac_cv_path_SWIG
17187 if test -n "$SWIG"; then
17188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17189 $as_echo "$SWIG" >&6; }
17190 else
17191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17192 $as_echo "no" >&6; }
17193 fi
17194
17195
17196         if test -z "$SWIG" ; then
17197                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17198 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17199                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17200         elif test -n "2.0.1" ; then
17201                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17202 $as_echo_n "checking for SWIG version... " >&6; }
17203                 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'`
17204                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17205 $as_echo "$swig_version" >&6; }
17206                 if test -n "$swig_version" ; then
17207                         # Calculate the required version number components
17208                         required=2.0.1
17209                         required_major=`echo $required | sed 's/[^0-9].*//'`
17210                         if test -z "$required_major" ; then
17211                                 required_major=0
17212                         fi
17213                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17214                         required_minor=`echo $required | sed 's/[^0-9].*//'`
17215                         if test -z "$required_minor" ; then
17216                                 required_minor=0
17217                         fi
17218                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17219                         required_patch=`echo $required | sed 's/[^0-9].*//'`
17220                         if test -z "$required_patch" ; then
17221                                 required_patch=0
17222                         fi
17223                         # Calculate the available version number components
17224                         available=$swig_version
17225                         available_major=`echo $available | sed 's/[^0-9].*//'`
17226                         if test -z "$available_major" ; then
17227                                 available_major=0
17228                         fi
17229                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17230                         available_minor=`echo $available | sed 's/[^0-9].*//'`
17231                         if test -z "$available_minor" ; then
17232                                 available_minor=0
17233                         fi
17234                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17235                         available_patch=`echo $available | sed 's/[^0-9].*//'`
17236                         if test -z "$available_patch" ; then
17237                                 available_patch=0
17238                         fi
17239                         badversion=0
17240                         if test $available_major -lt $required_major ; then
17241                                 badversion=1
17242                         fi
17243                         if test $available_major -eq $required_major \
17244                                 -a $available_minor -lt $required_minor ; then
17245                                 badversion=1
17246                         fi
17247                         if test $available_major -eq $required_major \
17248                                 -a $available_minor -eq $required_minor \
17249                                 -a $available_patch -lt $required_patch ; then
17250                                 badversion=1
17251                         fi
17252                         if test $badversion -eq 1 ; then
17253                                 { $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
17254 $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;}
17255                                 SWIG='echo "Error: SWIG version >= 2.0.1 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17256                         else
17257                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17258 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17259                                 SWIG_LIB=`$SWIG -swiglib`
17260                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17261 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17262                         fi
17263                 else
17264                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17265 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17266                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17267                 fi
17268         fi
17269
17270
17271       else
17272
17273         # Extract the first word of "swig", so it can be a program name with args.
17274 set dummy swig; ac_word=$2
17275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17276 $as_echo_n "checking for $ac_word... " >&6; }
17277 if ${ac_cv_path_SWIG+:} false; then :
17278   $as_echo_n "(cached) " >&6
17279 else
17280   case $SWIG in
17281   [\\/]* | ?:[\\/]*)
17282   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17283   ;;
17284   *)
17285   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17286 for as_dir in $PATH
17287 do
17288   IFS=$as_save_IFS
17289   test -z "$as_dir" && as_dir=.
17290     for ac_exec_ext in '' $ac_executable_extensions; do
17291   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17292     ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17293     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17294     break 2
17295   fi
17296 done
17297   done
17298 IFS=$as_save_IFS
17299
17300   ;;
17301 esac
17302 fi
17303 SWIG=$ac_cv_path_SWIG
17304 if test -n "$SWIG"; then
17305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17306 $as_echo "$SWIG" >&6; }
17307 else
17308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17309 $as_echo "no" >&6; }
17310 fi
17311
17312
17313         if test -z "$SWIG" ; then
17314                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17315 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17316                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17317         elif test -n "" ; then
17318                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17319 $as_echo_n "checking for SWIG version... " >&6; }
17320                 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'`
17321                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17322 $as_echo "$swig_version" >&6; }
17323                 if test -n "$swig_version" ; then
17324                         # Calculate the required version number components
17325                         required=
17326                         required_major=`echo $required | sed 's/[^0-9].*//'`
17327                         if test -z "$required_major" ; then
17328                                 required_major=0
17329                         fi
17330                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17331                         required_minor=`echo $required | sed 's/[^0-9].*//'`
17332                         if test -z "$required_minor" ; then
17333                                 required_minor=0
17334                         fi
17335                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17336                         required_patch=`echo $required | sed 's/[^0-9].*//'`
17337                         if test -z "$required_patch" ; then
17338                                 required_patch=0
17339                         fi
17340                         # Calculate the available version number components
17341                         available=$swig_version
17342                         available_major=`echo $available | sed 's/[^0-9].*//'`
17343                         if test -z "$available_major" ; then
17344                                 available_major=0
17345                         fi
17346                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17347                         available_minor=`echo $available | sed 's/[^0-9].*//'`
17348                         if test -z "$available_minor" ; then
17349                                 available_minor=0
17350                         fi
17351                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17352                         available_patch=`echo $available | sed 's/[^0-9].*//'`
17353                         if test -z "$available_patch" ; then
17354                                 available_patch=0
17355                         fi
17356                         badversion=0
17357                         if test $available_major -lt $required_major ; then
17358                                 badversion=1
17359                         fi
17360                         if test $available_major -eq $required_major \
17361                                 -a $available_minor -lt $required_minor ; then
17362                                 badversion=1
17363                         fi
17364                         if test $available_major -eq $required_major \
17365                                 -a $available_minor -eq $required_minor \
17366                                 -a $available_patch -lt $required_patch ; then
17367                                 badversion=1
17368                         fi
17369                         if test $badversion -eq 1 ; then
17370                                 { $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
17371 $as_echo "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
17372                                 SWIG='echo "Error: SWIG version >=  is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17373                         else
17374                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17375 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17376                                 SWIG_LIB=`$SWIG -swiglib`
17377                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17378 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17379                         fi
17380                 else
17381                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17382 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17383                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17384                 fi
17385         fi
17386
17387
17388       fi
17389       { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
17390 $as_echo_n "checking SWIG... " >&6; }
17391       if test ! -x "$SWIG"; then
17392          as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
17393       else
17394
17395 $as_echo "#define HAVE_SWIG 1" >>confdefs.h
17396
17397          swig="$SWIG"
17398
17399          { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
17400 $as_echo "present" >&6; }
17401
17402          # If have Python & SWIG
17403          # Declare PythonMod
17404          if test x_$ub_with_pythonmod != x_no; then
17405
17406 $as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
17407
17408             WITH_PYTHONMODULE=yes
17409
17410             PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
17411
17412             PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
17413
17414             PYTHONMOD_INSTALL=pythonmod-install
17415
17416             PYTHONMOD_UNINSTALL=pythonmod-uninstall
17417
17418          fi
17419
17420          # Declare PyUnbound
17421          if test x_$ub_with_pyunbound != x_no; then
17422
17423 $as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
17424
17425             WITH_PYUNBOUND=yes
17426
17427             PYUNBOUND_OBJ="libunbound_wrap.lo"
17428
17429             PYUNBOUND_TARGET="_unbound.la"
17430
17431             PYUNBOUND_INSTALL=pyunbound-install
17432
17433             PYUNBOUND_UNINSTALL=pyunbound-uninstall
17434
17435          fi
17436       fi
17437    else
17438       { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
17439 $as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
17440       ub_with_pyunbound=no
17441       ub_with_pythonmod=no
17442    fi
17443 fi
17444
17445 if test "`uname`" = "NetBSD"; then
17446         NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
17447
17448 fi
17449 CONFIG_DATE=`date +%Y%m%d`
17450
17451
17452 # Checks for libraries.
17453
17454 # libnss
17455 USE_NSS="no"
17456
17457 # Check whether --with-nss was given.
17458 if test "${with_nss+set}" = set; then :
17459   withval=$with_nss;
17460         USE_NSS="yes"
17461
17462 $as_echo "#define HAVE_NSS 1" >>confdefs.h
17463
17464         if test "$withval" != "" -a "$withval" != "yes"; then
17465                 CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
17466                 LDFLAGS="$LDFLAGS -L$withval/lib"
17467
17468         if test "x$enable_rpath" = xyes; then
17469                 if echo "$withval/lib" | grep "^/" >/dev/null; then
17470                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17471                 fi
17472         fi
17473
17474                 CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
17475         else
17476                 CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
17477                 CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
17478         fi
17479         LIBS="$LIBS -lnss3 -lnspr4"
17480         SSLLIB=""
17481
17482
17483 fi
17484
17485
17486 # libnettle
17487 USE_NETTLE="no"
17488
17489 # Check whether --with-nettle was given.
17490 if test "${with_nettle+set}" = set; then :
17491   withval=$with_nettle;
17492         USE_NETTLE="yes"
17493
17494 $as_echo "#define HAVE_NETTLE 1" >>confdefs.h
17495
17496         for ac_header in nettle/dsa-compat.h
17497 do :
17498   ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
17499 "
17500 if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then :
17501   cat >>confdefs.h <<_ACEOF
17502 #define HAVE_NETTLE_DSA_COMPAT_H 1
17503 _ACEOF
17504
17505 fi
17506
17507 done
17508
17509         if test "$withval" != "" -a "$withval" != "yes"; then
17510                 CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
17511                 LDFLAGS="$LDFLAGS -L$withval/lib"
17512
17513         if test "x$enable_rpath" = xyes; then
17514                 if echo "$withval/lib" | grep "^/" >/dev/null; then
17515                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17516                 fi
17517         fi
17518
17519         else
17520                 CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
17521         fi
17522         LIBS="$LIBS -lhogweed -lnettle -lgmp"
17523         SSLLIB=""
17524
17525
17526 fi
17527
17528
17529 # openssl
17530 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17531
17532
17533 # Check whether --with-ssl was given.
17534 if test "${with_ssl+set}" = set; then :
17535   withval=$with_ssl;
17536
17537 else
17538
17539             withval="yes"
17540
17541 fi
17542
17543     if test x_$withval = x_no; then
17544         as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
17545     fi
17546
17547     withval=$withval
17548     if test x_$withval != x_no; then
17549         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
17550 $as_echo_n "checking for SSL... " >&6; }
17551         if test x_$withval = x_ -o x_$withval = x_yes; then
17552             withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
17553         fi
17554         for dir in $withval; do
17555             ssldir="$dir"
17556             if test -f "$dir/include/openssl/ssl.h"; then
17557                 found_ssl="yes"
17558
17559 cat >>confdefs.h <<_ACEOF
17560 #define HAVE_SSL /**/
17561 _ACEOF
17562
17563                                 if test "$ssldir" != "/usr"; then
17564                         CPPFLAGS="$CPPFLAGS -I$ssldir/include"
17565                         LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
17566                 fi
17567                 break;
17568             fi
17569         done
17570         if test x_$found_ssl != x_yes; then
17571             as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
17572         else
17573             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
17574 $as_echo "found in $ssldir" >&6; }
17575             HAVE_SSL=yes
17576                         if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
17577                 LDFLAGS="$LDFLAGS -L$ssldir/lib"
17578                 LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
17579
17580         if test "x$enable_rpath" = xyes; then
17581                 if echo "$ssldir/lib" | grep "^/" >/dev/null; then
17582                         RUNTIME_PATH="$RUNTIME_PATH -R$ssldir/lib"
17583                 fi
17584         fi
17585
17586             fi
17587
17588             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_Update in -lcrypto" >&5
17589 $as_echo_n "checking for HMAC_Update in -lcrypto... " >&6; }
17590             LIBS="$LIBS -lcrypto"
17591             LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
17592             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17593 /* end confdefs.h.  */
17594
17595 int
17596 main ()
17597 {
17598
17599                 int HMAC_Update(void);
17600                 (void)HMAC_Update();
17601
17602   ;
17603   return 0;
17604 }
17605 _ACEOF
17606 if ac_fn_c_try_link "$LINENO"; then :
17607
17608                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17609 $as_echo "yes" >&6; }
17610
17611 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17612
17613
17614 else
17615
17616                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17617 $as_echo "no" >&6; }
17618                 # check if -lwsock32 or -lgdi32 are needed.
17619                 BAKLIBS="$LIBS"
17620                 BAKSSLLIBS="$LIBSSL_LIBS"
17621                 LIBS="$LIBS -lgdi32 -lws2_32"
17622                 LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
17623                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
17624 $as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
17625                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17626 /* end confdefs.h.  */
17627
17628 int
17629 main ()
17630 {
17631
17632                     int HMAC_Update(void);
17633                     (void)HMAC_Update();
17634
17635   ;
17636   return 0;
17637 }
17638 _ACEOF
17639 if ac_fn_c_try_link "$LINENO"; then :
17640
17641
17642 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17643
17644                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17645 $as_echo "yes" >&6; }
17646
17647 else
17648
17649                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17650 $as_echo "no" >&6; }
17651                     LIBS="$BAKLIBS"
17652                     LIBSSL_LIBS="$BAKSSLLIBS"
17653                     LIBS="$LIBS -ldl"
17654                     LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
17655                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
17656 $as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
17657                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17658 /* end confdefs.h.  */
17659
17660 int
17661 main ()
17662 {
17663
17664                         int HMAC_Update(void);
17665                         (void)HMAC_Update();
17666
17667   ;
17668   return 0;
17669 }
17670 _ACEOF
17671 if ac_fn_c_try_link "$LINENO"; then :
17672
17673
17674 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17675
17676                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17677 $as_echo "yes" >&6; }
17678
17679 else
17680
17681                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17682 $as_echo "no" >&6; }
17683                         LIBS="$BAKLIBS"
17684                         LIBSSL_LIBS="$BAKSSLLIBS"
17685                         LIBS="$LIBS -ldl -pthread"
17686                         LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
17687                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
17688 $as_echo_n "checking if -lcrypto needs -ldl -pthread... " >&6; }
17689                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17690 /* end confdefs.h.  */
17691
17692 int
17693 main ()
17694 {
17695
17696                             int HMAC_Update(void);
17697                             (void)HMAC_Update();
17698
17699   ;
17700   return 0;
17701 }
17702 _ACEOF
17703 if ac_fn_c_try_link "$LINENO"; then :
17704
17705
17706 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17707
17708                             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17709 $as_echo "yes" >&6; }
17710
17711 else
17712
17713                             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17714 $as_echo "no" >&6; }
17715                             as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
17716
17717 fi
17718 rm -f core conftest.err conftest.$ac_objext \
17719     conftest$ac_exeext conftest.$ac_ext
17720
17721 fi
17722 rm -f core conftest.err conftest.$ac_objext \
17723     conftest$ac_exeext conftest.$ac_ext
17724
17725 fi
17726 rm -f core conftest.err conftest.$ac_objext \
17727     conftest$ac_exeext conftest.$ac_ext
17728
17729 fi
17730 rm -f core conftest.err conftest.$ac_objext \
17731     conftest$ac_exeext conftest.$ac_ext
17732         fi
17733
17734
17735     fi
17736 for ac_header in openssl/ssl.h
17737 do :
17738   ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
17739 "
17740 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
17741   cat >>confdefs.h <<_ACEOF
17742 #define HAVE_OPENSSL_SSL_H 1
17743 _ACEOF
17744
17745 fi
17746
17747 done
17748
17749 for ac_header in openssl/err.h
17750 do :
17751   ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
17752 "
17753 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
17754   cat >>confdefs.h <<_ACEOF
17755 #define HAVE_OPENSSL_ERR_H 1
17756 _ACEOF
17757
17758 fi
17759
17760 done
17761
17762 for ac_header in openssl/rand.h
17763 do :
17764   ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
17765 "
17766 if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
17767   cat >>confdefs.h <<_ACEOF
17768 #define HAVE_OPENSSL_RAND_H 1
17769 _ACEOF
17770
17771 fi
17772
17773 done
17774
17775
17776
17777
17778 # check if libssl needs libdl
17779 BAKLIBS="$LIBS"
17780 LIBS="-lssl $LIBS"
17781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
17782 $as_echo_n "checking if libssl needs libdl... " >&6; }
17783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17784 /* end confdefs.h.  */
17785
17786 /* Override any GCC internal prototype to avoid an error.
17787    Use char because int might match the return type of a GCC
17788    builtin and then its argument prototype would still apply.  */
17789 #ifdef __cplusplus
17790 extern "C"
17791 #endif
17792 char SSL_CTX_new ();
17793 int
17794 main ()
17795 {
17796 return SSL_CTX_new ();
17797   ;
17798   return 0;
17799 }
17800 _ACEOF
17801 if ac_fn_c_try_link "$LINENO"; then :
17802
17803         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17804 $as_echo "no" >&6; }
17805         LIBS="$BAKLIBS"
17806
17807 else
17808
17809         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17810 $as_echo "yes" >&6; }
17811         LIBS="$BAKLIBS"
17812         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17813 $as_echo_n "checking for library containing dlopen... " >&6; }
17814 if ${ac_cv_search_dlopen+:} false; then :
17815   $as_echo_n "(cached) " >&6
17816 else
17817   ac_func_search_save_LIBS=$LIBS
17818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17819 /* end confdefs.h.  */
17820
17821 /* Override any GCC internal prototype to avoid an error.
17822    Use char because int might match the return type of a GCC
17823    builtin and then its argument prototype would still apply.  */
17824 #ifdef __cplusplus
17825 extern "C"
17826 #endif
17827 char dlopen ();
17828 int
17829 main ()
17830 {
17831 return dlopen ();
17832   ;
17833   return 0;
17834 }
17835 _ACEOF
17836 for ac_lib in '' dl; do
17837   if test -z "$ac_lib"; then
17838     ac_res="none required"
17839   else
17840     ac_res=-l$ac_lib
17841     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17842   fi
17843   if ac_fn_c_try_link "$LINENO"; then :
17844   ac_cv_search_dlopen=$ac_res
17845 fi
17846 rm -f core conftest.err conftest.$ac_objext \
17847     conftest$ac_exeext
17848   if ${ac_cv_search_dlopen+:} false; then :
17849   break
17850 fi
17851 done
17852 if ${ac_cv_search_dlopen+:} false; then :
17853
17854 else
17855   ac_cv_search_dlopen=no
17856 fi
17857 rm conftest.$ac_ext
17858 LIBS=$ac_func_search_save_LIBS
17859 fi
17860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17861 $as_echo "$ac_cv_search_dlopen" >&6; }
17862 ac_res=$ac_cv_search_dlopen
17863 if test "$ac_res" != no; then :
17864   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17865
17866 fi
17867
17868
17869 fi
17870 rm -f core conftest.err conftest.$ac_objext \
17871     conftest$ac_exeext conftest.$ac_ext
17872 SSLLIB="-lssl"
17873
17874 # check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
17875 BAKLIBS="$LIBS"
17876 LIBS="-lssl $LIBS"
17877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
17878 $as_echo_n "checking if libssl needs -lcrypt32... " >&6; }
17879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17880 /* end confdefs.h.  */
17881
17882 /* Override any GCC internal prototype to avoid an error.
17883    Use char because int might match the return type of a GCC
17884    builtin and then its argument prototype would still apply.  */
17885 #ifdef __cplusplus
17886 extern "C"
17887 #endif
17888 char HMAC_Update ();
17889 int
17890 main ()
17891 {
17892 return HMAC_Update ();
17893   ;
17894   return 0;
17895 }
17896 _ACEOF
17897 if ac_fn_c_try_link "$LINENO"; then :
17898
17899         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17900 $as_echo "no" >&6; }
17901         LIBS="$BAKLIBS"
17902
17903 else
17904
17905         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17906 $as_echo "yes" >&6; }
17907         LIBS="$BAKLIBS"
17908         LIBS="$LIBS -lcrypt32"
17909
17910 fi
17911 rm -f core conftest.err conftest.$ac_objext \
17912     conftest$ac_exeext conftest.$ac_ext
17913
17914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
17915 $as_echo_n "checking for LibreSSL... " >&6; }
17916 if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
17917         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17918 $as_echo "yes" >&6; }
17919
17920 $as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
17921
17922         # libressl provides these compat functions, but they may also be
17923         # declared by the OS in libc.  See if they have been declared.
17924         ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
17925 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
17926   ac_have_decl=1
17927 else
17928   ac_have_decl=0
17929 fi
17930
17931 cat >>confdefs.h <<_ACEOF
17932 #define HAVE_DECL_STRLCPY $ac_have_decl
17933 _ACEOF
17934 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
17935 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
17936   ac_have_decl=1
17937 else
17938   ac_have_decl=0
17939 fi
17940
17941 cat >>confdefs.h <<_ACEOF
17942 #define HAVE_DECL_STRLCAT $ac_have_decl
17943 _ACEOF
17944 ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
17945 if test "x$ac_cv_have_decl_arc4random" = xyes; then :
17946   ac_have_decl=1
17947 else
17948   ac_have_decl=0
17949 fi
17950
17951 cat >>confdefs.h <<_ACEOF
17952 #define HAVE_DECL_ARC4RANDOM $ac_have_decl
17953 _ACEOF
17954 ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
17955 if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
17956   ac_have_decl=1
17957 else
17958   ac_have_decl=0
17959 fi
17960
17961 cat >>confdefs.h <<_ACEOF
17962 #define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
17963 _ACEOF
17964 ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
17965 if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
17966   ac_have_decl=1
17967 else
17968   ac_have_decl=0
17969 fi
17970
17971 cat >>confdefs.h <<_ACEOF
17972 #define HAVE_DECL_REALLOCARRAY $ac_have_decl
17973 _ACEOF
17974
17975 else
17976         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17977 $as_echo "no" >&6; }
17978 fi
17979 for ac_header in openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h
17980 do :
17981   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17982 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
17983 "
17984 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17985   cat >>confdefs.h <<_ACEOF
17986 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17987 _ACEOF
17988
17989 fi
17990
17991 done
17992
17993 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
17994 do :
17995   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17996 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17997 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17998   cat >>confdefs.h <<_ACEOF
17999 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18000 _ACEOF
18001
18002 fi
18003 done
18004
18005
18006 # these check_funcs need -lssl
18007 BAKLIBS="$LIBS"
18008 LIBS="-lssl $LIBS"
18009 for ac_func in OPENSSL_init_ssl SSL_CTX_set_security_level SSL_set1_host SSL_get0_peername
18010 do :
18011   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18012 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18013 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18014   cat >>confdefs.h <<_ACEOF
18015 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18016 _ACEOF
18017
18018 fi
18019 done
18020
18021 LIBS="$BAKLIBS"
18022
18023 ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
18024 $ac_includes_default
18025 #ifdef HAVE_OPENSSL_ERR_H
18026 #include <openssl/err.h>
18027 #endif
18028
18029 #ifdef HAVE_OPENSSL_RAND_H
18030 #include <openssl/rand.h>
18031 #endif
18032
18033 #ifdef HAVE_OPENSSL_CONF_H
18034 #include <openssl/conf.h>
18035 #endif
18036
18037 #ifdef HAVE_OPENSSL_ENGINE_H
18038 #include <openssl/engine.h>
18039 #endif
18040 #include <openssl/ssl.h>
18041 #include <openssl/evp.h>
18042
18043 "
18044 if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
18045   ac_have_decl=1
18046 else
18047   ac_have_decl=0
18048 fi
18049
18050 cat >>confdefs.h <<_ACEOF
18051 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
18052 _ACEOF
18053 ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
18054 $ac_includes_default
18055 #ifdef HAVE_OPENSSL_ERR_H
18056 #include <openssl/err.h>
18057 #endif
18058
18059 #ifdef HAVE_OPENSSL_RAND_H
18060 #include <openssl/rand.h>
18061 #endif
18062
18063 #ifdef HAVE_OPENSSL_CONF_H
18064 #include <openssl/conf.h>
18065 #endif
18066
18067 #ifdef HAVE_OPENSSL_ENGINE_H
18068 #include <openssl/engine.h>
18069 #endif
18070 #include <openssl/ssl.h>
18071 #include <openssl/evp.h>
18072
18073 "
18074 if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
18075   ac_have_decl=1
18076 else
18077   ac_have_decl=0
18078 fi
18079
18080 cat >>confdefs.h <<_ACEOF
18081 #define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
18082 _ACEOF
18083 ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
18084 $ac_includes_default
18085 #ifdef HAVE_OPENSSL_ERR_H
18086 #include <openssl/err.h>
18087 #endif
18088
18089 #ifdef HAVE_OPENSSL_RAND_H
18090 #include <openssl/rand.h>
18091 #endif
18092
18093 #ifdef HAVE_OPENSSL_CONF_H
18094 #include <openssl/conf.h>
18095 #endif
18096
18097 #ifdef HAVE_OPENSSL_ENGINE_H
18098 #include <openssl/engine.h>
18099 #endif
18100 #include <openssl/ssl.h>
18101 #include <openssl/evp.h>
18102
18103 "
18104 if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
18105   ac_have_decl=1
18106 else
18107   ac_have_decl=0
18108 fi
18109
18110 cat >>confdefs.h <<_ACEOF
18111 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
18112 _ACEOF
18113
18114 fi
18115
18116
18117
18118 # Check whether --enable-sha1 was given.
18119 if test "${enable_sha1+set}" = set; then :
18120   enableval=$enable_sha1;
18121 fi
18122
18123 case "$enable_sha1" in
18124         no)
18125         ;;
18126         yes|*)
18127
18128 $as_echo "#define USE_SHA1 1" >>confdefs.h
18129
18130         ;;
18131 esac
18132
18133
18134 # Check whether --enable-sha2 was given.
18135 if test "${enable_sha2+set}" = set; then :
18136   enableval=$enable_sha2;
18137 fi
18138
18139 case "$enable_sha2" in
18140         no)
18141         ;;
18142         yes|*)
18143
18144 $as_echo "#define USE_SHA2 1" >>confdefs.h
18145
18146         ;;
18147 esac
18148
18149 # Check whether --enable-subnet was given.
18150 if test "${enable_subnet+set}" = set; then :
18151   enableval=$enable_subnet;
18152 fi
18153
18154 case "$enable_subnet" in
18155         yes)
18156
18157 $as_echo "#define CLIENT_SUBNET 1" >>confdefs.h
18158
18159         SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
18160
18161         SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
18162
18163         ;;
18164         no|*)
18165         ;;
18166 esac
18167
18168 # check wether gost also works
18169
18170 # Check whether --enable-gost was given.
18171 if test "${enable_gost+set}" = set; then :
18172   enableval=$enable_gost;
18173 fi
18174
18175 use_gost="no"
18176 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18177 case "$enable_gost" in
18178         no)
18179         ;;
18180         *)
18181         ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
18182 if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
18183   :
18184 else
18185   as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
18186 fi
18187
18188         ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
18189 if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
18190
18191 else
18192   as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
18193 fi
18194
18195
18196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
18197 $as_echo_n "checking if GOST works... " >&6; }
18198 if test c${cross_compiling} = cno; then
18199 BAKCFLAGS="$CFLAGS"
18200 if test -n "$ssldir"; then
18201         CFLAGS="$CFLAGS -Wl,-rpath,$ssldir/lib"
18202 fi
18203 if test "$cross_compiling" = yes; then :
18204   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18205 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18206 as_fn_error $? "cannot run test program while cross compiling
18207 See \`config.log' for more details" "$LINENO" 5; }
18208 else
18209   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18210 /* end confdefs.h.  */
18211
18212 #include <string.h>
18213 #include <openssl/ssl.h>
18214 #include <openssl/evp.h>
18215 #include <openssl/engine.h>
18216 #include <openssl/conf.h>
18217 /* routine to load gost (from sldns) */
18218 int load_gost_id(void)
18219 {
18220         static int gost_id = 0;
18221         const EVP_PKEY_ASN1_METHOD* meth;
18222         ENGINE* e;
18223
18224         if(gost_id) return gost_id;
18225
18226         /* see if configuration loaded gost implementation from other engine*/
18227         meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
18228         if(meth) {
18229                 EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18230                 return gost_id;
18231         }
18232
18233         /* see if engine can be loaded already */
18234         e = ENGINE_by_id("gost");
18235         if(!e) {
18236                 /* load it ourself, in case statically linked */
18237                 ENGINE_load_builtin_engines();
18238                 ENGINE_load_dynamic();
18239                 e = ENGINE_by_id("gost");
18240         }
18241         if(!e) {
18242                 /* no gost engine in openssl */
18243                 return 0;
18244         }
18245         if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
18246                 ENGINE_finish(e);
18247                 ENGINE_free(e);
18248                 return 0;
18249         }
18250
18251         meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
18252         if(!meth) {
18253                 /* algo not found */
18254                 ENGINE_finish(e);
18255                 ENGINE_free(e);
18256                 return 0;
18257         }
18258         EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18259         return gost_id;
18260 }
18261 int main(void) {
18262         EVP_MD_CTX* ctx;
18263         const EVP_MD* md;
18264         unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
18265         const char* str = "Hello world";
18266         const unsigned char check[] = {
18267                 0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
18268                 0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
18269                 0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
18270                 0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
18271         };
18272         OPENSSL_config(NULL);
18273         (void)load_gost_id();
18274         md = EVP_get_digestbyname("md_gost94");
18275         if(!md) return 1;
18276         memset(digest, 0, sizeof(digest));
18277         ctx = EVP_MD_CTX_create();
18278         if(!ctx) return 2;
18279         if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
18280         if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
18281         if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
18282         /* uncomment to see the hash calculated.
18283                 {int i;
18284                 for(i=0; i<32; i++)
18285                         printf(" %2.2x", (int)digest[i]);
18286                 printf("\n");}
18287         */
18288         if(memcmp(digest, check, sizeof(check)) != 0)
18289                 return 6;
18290         return 0;
18291 }
18292
18293 _ACEOF
18294 if ac_fn_c_try_run "$LINENO"; then :
18295   eval "ac_cv_c_gost_works=yes"
18296 else
18297   eval "ac_cv_c_gost_works=no"
18298 fi
18299 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18300   conftest.$ac_objext conftest.beam conftest.$ac_ext
18301 fi
18302
18303 CFLAGS="$BAKCFLAGS"
18304 else
18305 eval "ac_cv_c_gost_works=maybe"
18306 fi
18307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
18308 $as_echo "$ac_cv_c_gost_works" >&6; }
18309
18310         if test "$ac_cv_c_gost_works" != no; then
18311                 use_gost="yes"
18312
18313 $as_echo "#define USE_GOST 1" >>confdefs.h
18314
18315         fi
18316         ;;
18317 esac
18318 fi
18319 # Check whether --enable-ecdsa was given.
18320 if test "${enable_ecdsa+set}" = set; then :
18321   enableval=$enable_ecdsa;
18322 fi
18323
18324 use_ecdsa="no"
18325 case "$enable_ecdsa" in
18326     no)
18327       ;;
18328     *)
18329       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18330               ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
18331 if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
18332
18333 else
18334   as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18335 fi
18336
18337               ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
18338 if test "x$ac_cv_func_SHA384_Init" = xyes; then :
18339
18340 else
18341   as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18342 fi
18343
18344               ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
18345 #include <openssl/evp.h>
18346
18347 "
18348 if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
18349   ac_have_decl=1
18350 else
18351   ac_have_decl=0
18352 fi
18353
18354 cat >>confdefs.h <<_ACEOF
18355 #define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
18356 _ACEOF
18357 if test $ac_have_decl = 1; then :
18358
18359 else
18360   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18361 fi
18362 ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
18363 #include <openssl/evp.h>
18364
18365 "
18366 if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
18367   ac_have_decl=1
18368 else
18369   ac_have_decl=0
18370 fi
18371
18372 cat >>confdefs.h <<_ACEOF
18373 #define HAVE_DECL_NID_SECP384R1 $ac_have_decl
18374 _ACEOF
18375 if test $ac_have_decl = 1; then :
18376
18377 else
18378   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18379 fi
18380
18381               # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
18382               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
18383 $as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
18384               if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
18385                 if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
18386                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18387 $as_echo "no" >&6; }
18388
18389 cat >>confdefs.h <<_ACEOF
18390 #define USE_ECDSA_EVP_WORKAROUND 1
18391 _ACEOF
18392
18393                 else
18394                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18395 $as_echo "yes" >&6; }
18396                 fi
18397               else
18398                 # not OpenSSL, thus likely LibreSSL, which supports it
18399                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18400 $as_echo "yes" >&6; }
18401               fi
18402       fi
18403       # we now know we have ECDSA and the required curves.
18404
18405 cat >>confdefs.h <<_ACEOF
18406 #define USE_ECDSA 1
18407 _ACEOF
18408
18409       use_ecdsa="yes"
18410       ;;
18411 esac
18412
18413 # Check whether --enable-dsa was given.
18414 if test "${enable_dsa+set}" = set; then :
18415   enableval=$enable_dsa;
18416 fi
18417
18418 use_dsa="no"
18419 case "$enable_dsa" in
18420     no)
18421       ;;
18422     *)
18423       # detect if DSA is supported, and turn it off if not.
18424       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18425       ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
18426 if test "x$ac_cv_func_DSA_SIG_new" = xyes; then :
18427
18428       as_ac_Type=`$as_echo "ac_cv_type_DSA_SIG*" | $as_tr_sh`
18429 ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
18430 $ac_includes_default
18431 #ifdef HAVE_OPENSSL_ERR_H
18432 #include <openssl/err.h>
18433 #endif
18434
18435 #ifdef HAVE_OPENSSL_RAND_H
18436 #include <openssl/rand.h>
18437 #endif
18438
18439 #ifdef HAVE_OPENSSL_CONF_H
18440 #include <openssl/conf.h>
18441 #endif
18442
18443 #ifdef HAVE_OPENSSL_ENGINE_H
18444 #include <openssl/engine.h>
18445 #endif
18446
18447 "
18448 if eval test \"x\$"$as_ac_Type"\" = x"yes"; then :
18449
18450
18451 cat >>confdefs.h <<_ACEOF
18452 #define USE_DSA 1
18453 _ACEOF
18454
18455
18456 else
18457   if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
18458                fi
18459 fi
18460
18461
18462 else
18463   if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
18464                fi
18465 fi
18466
18467       else
18468
18469 cat >>confdefs.h <<_ACEOF
18470 #define USE_DSA 1
18471 _ACEOF
18472
18473       fi
18474       ;;
18475 esac
18476
18477 # Check whether --enable-ed25519 was given.
18478 if test "${enable_ed25519+set}" = set; then :
18479   enableval=$enable_ed25519;
18480 fi
18481
18482 use_ed25519="no"
18483 case "$enable_ed25519" in
18484     no)
18485       ;;
18486     *)
18487       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18488               ac_fn_c_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
18489 #include <openssl/evp.h>
18490
18491 "
18492 if test "x$ac_cv_have_decl_NID_ED25519" = xyes; then :
18493   ac_have_decl=1
18494 else
18495   ac_have_decl=0
18496 fi
18497
18498 cat >>confdefs.h <<_ACEOF
18499 #define HAVE_DECL_NID_ED25519 $ac_have_decl
18500 _ACEOF
18501 if test $ac_have_decl = 1; then :
18502
18503                 use_ed25519="yes"
18504
18505 else
18506    if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
18507                 fi
18508 fi
18509
18510       fi
18511       if test $USE_NETTLE = "yes"; then
18512                 for ac_header in nettle/eddsa.h
18513 do :
18514   ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
18515 "
18516 if test "x$ac_cv_header_nettle_eddsa_h" = xyes; then :
18517   cat >>confdefs.h <<_ACEOF
18518 #define HAVE_NETTLE_EDDSA_H 1
18519 _ACEOF
18520  use_ed25519="yes"
18521 fi
18522
18523 done
18524
18525       fi
18526       if test $use_ed25519 = "yes"; then
18527
18528 cat >>confdefs.h <<_ACEOF
18529 #define USE_ED25519 1
18530 _ACEOF
18531
18532       fi
18533       ;;
18534 esac
18535
18536 # Check whether --enable-ed448 was given.
18537 if test "${enable_ed448+set}" = set; then :
18538   enableval=$enable_ed448;
18539 fi
18540
18541 use_ed448="no"
18542 case "$enable_ed448" in
18543     no)
18544       ;;
18545     *)
18546       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18547               ac_fn_c_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
18548 #include <openssl/evp.h>
18549
18550 "
18551 if test "x$ac_cv_have_decl_NID_ED448" = xyes; then :
18552   ac_have_decl=1
18553 else
18554   ac_have_decl=0
18555 fi
18556
18557 cat >>confdefs.h <<_ACEOF
18558 #define HAVE_DECL_NID_ED448 $ac_have_decl
18559 _ACEOF
18560 if test $ac_have_decl = 1; then :
18561
18562                 use_ed448="yes"
18563
18564 else
18565    if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
18566                 fi
18567 fi
18568
18569       fi
18570       if test $use_ed448 = "yes"; then
18571
18572 cat >>confdefs.h <<_ACEOF
18573 #define USE_ED448 1
18574 _ACEOF
18575
18576       fi
18577       ;;
18578 esac
18579
18580 # Check whether --enable-event-api was given.
18581 if test "${enable_event_api+set}" = set; then :
18582   enableval=$enable_event_api;
18583 fi
18584
18585 case "$enable_event_api" in
18586     yes)
18587       UNBOUND_EVENT_INSTALL=unbound-event-install
18588
18589       UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
18590
18591       ;;
18592     *)
18593       ;;
18594 esac
18595
18596 # Check whether --enable-tfo-client was given.
18597 if test "${enable_tfo_client+set}" = set; then :
18598   enableval=$enable_tfo_client;
18599 fi
18600
18601 case "$enable_tfo_client" in
18602         yes)
18603                 case `uname` in
18604                         Linux) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
18605 #include <netinet/tcp.h>
18606
18607 "
18608 if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then :
18609   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
18610 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
18611 else
18612   as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
18613 fi
18614
18615
18616 cat >>confdefs.h <<_ACEOF
18617 #define USE_MSG_FASTOPEN 1
18618 _ACEOF
18619
18620                           ;;
18621                         Darwin) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
18622 #include <sys/socket.h>
18623
18624 "
18625 if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then :
18626   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
18627 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
18628 else
18629   as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
18630 fi
18631
18632
18633 cat >>confdefs.h <<_ACEOF
18634 #define USE_OSX_MSG_FASTOPEN 1
18635 _ACEOF
18636
18637                           ;;
18638                 esac
18639         ;;
18640         no|*)
18641                 ;;
18642 esac
18643
18644 # Check whether --enable-tfo-server was given.
18645 if test "${enable_tfo_server+set}" = set; then :
18646   enableval=$enable_tfo_server;
18647 fi
18648
18649 case "$enable_tfo_server" in
18650         yes)
18651               ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
18652 #include <netinet/tcp.h>
18653
18654 "
18655 if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then :
18656   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
18657 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
18658 else
18659   as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
18660 fi
18661
18662
18663 cat >>confdefs.h <<_ACEOF
18664 #define USE_TCP_FASTOPEN 1
18665 _ACEOF
18666
18667                 ;;
18668         no|*)
18669                 ;;
18670 esac
18671
18672 # check for libevent
18673
18674 # Check whether --with-libevent was given.
18675 if test "${with_libevent+set}" = set; then :
18676   withval=$with_libevent;
18677 else
18678    withval="no"
18679 fi
18680
18681 if test x_$withval = x_yes -o x_$withval != x_no; then
18682         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
18683 $as_echo_n "checking for libevent... " >&6; }
18684         if test x_$withval = x_ -o x_$withval = x_yes; then
18685             withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18686         fi
18687         for dir in $withval; do
18688             thedir="$dir"
18689             if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
18690                 found_libevent="yes"
18691                                 if test "$thedir" != "/usr"; then
18692                     CPPFLAGS="$CPPFLAGS -I$thedir/include"
18693                 fi
18694                 break;
18695             fi
18696         done
18697         if test x_$found_libevent != x_yes; then
18698                 if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
18699                         # libevent source directory
18700                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
18701 $as_echo "found in $thedir" >&6; }
18702                         CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
18703                         BAK_LDFLAGS_SET="1"
18704                         BAK_LDFLAGS="$LDFLAGS"
18705                         # remove evdns from linking
18706                         mkdir build >/dev/null 2>&1
18707                         mkdir build/libevent >/dev/null 2>&1
18708                         mkdir build/libevent/.libs >/dev/null 2>&1
18709                         ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
18710                         ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
18711                         ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
18712                         cp $ev_files_o build/libevent
18713                         cp $ev_files_lo build/libevent
18714                         cp $ev_files_libso build/libevent/.libs
18715                         LATE_LDFLAGS="build/libevent/*.lo -lm"
18716                         LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
18717                 else
18718                         as_fn_error $? "Cannot find the libevent library in $withval
18719 You can restart ./configure --with-libevent=no to use a builtin alternative.
18720 Please note that this alternative is not as capable as libevent when using
18721 large outgoing port ranges.  " "$LINENO" 5
18722                 fi
18723         else
18724             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
18725 $as_echo "found in $thedir" >&6; }
18726                     if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
18727                     LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
18728
18729         if test "x$enable_rpath" = xyes; then
18730                 if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
18731                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
18732                 fi
18733         fi
18734
18735             else
18736                                     if test "$thedir" != "/usr" -a "$thedir" != ""; then
18737                         LDFLAGS="$LDFLAGS -L$thedir/lib"
18738
18739         if test "x$enable_rpath" = xyes; then
18740                 if echo "$thedir/lib" | grep "^/" >/dev/null; then
18741                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
18742                 fi
18743         fi
18744
18745                     fi
18746             fi
18747         fi
18748         # check for library used by libevent after 1.3c
18749         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18750 $as_echo_n "checking for library containing clock_gettime... " >&6; }
18751 if ${ac_cv_search_clock_gettime+:} false; then :
18752   $as_echo_n "(cached) " >&6
18753 else
18754   ac_func_search_save_LIBS=$LIBS
18755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18756 /* end confdefs.h.  */
18757
18758 /* Override any GCC internal prototype to avoid an error.
18759    Use char because int might match the return type of a GCC
18760    builtin and then its argument prototype would still apply.  */
18761 #ifdef __cplusplus
18762 extern "C"
18763 #endif
18764 char clock_gettime ();
18765 int
18766 main ()
18767 {
18768 return clock_gettime ();
18769   ;
18770   return 0;
18771 }
18772 _ACEOF
18773 for ac_lib in '' rt; do
18774   if test -z "$ac_lib"; then
18775     ac_res="none required"
18776   else
18777     ac_res=-l$ac_lib
18778     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18779   fi
18780   if ac_fn_c_try_link "$LINENO"; then :
18781   ac_cv_search_clock_gettime=$ac_res
18782 fi
18783 rm -f core conftest.err conftest.$ac_objext \
18784     conftest$ac_exeext
18785   if ${ac_cv_search_clock_gettime+:} false; then :
18786   break
18787 fi
18788 done
18789 if ${ac_cv_search_clock_gettime+:} false; then :
18790
18791 else
18792   ac_cv_search_clock_gettime=no
18793 fi
18794 rm conftest.$ac_ext
18795 LIBS=$ac_func_search_save_LIBS
18796 fi
18797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18798 $as_echo "$ac_cv_search_clock_gettime" >&6; }
18799 ac_res=$ac_cv_search_clock_gettime
18800 if test "$ac_res" != no; then :
18801   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18802
18803 fi
18804
18805
18806         # is the event.h header libev or libevent?
18807         for ac_header in event.h
18808 do :
18809   ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
18810 "
18811 if test "x$ac_cv_header_event_h" = xyes; then :
18812   cat >>confdefs.h <<_ACEOF
18813 #define HAVE_EVENT_H 1
18814 _ACEOF
18815
18816 fi
18817
18818 done
18819
18820         ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
18821 #include <event.h>
18822
18823 "
18824 if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
18825
18826                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
18827 $as_echo_n "checking for library containing event_set... " >&6; }
18828 if ${ac_cv_search_event_set+:} false; then :
18829   $as_echo_n "(cached) " >&6
18830 else
18831   ac_func_search_save_LIBS=$LIBS
18832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18833 /* end confdefs.h.  */
18834
18835 /* Override any GCC internal prototype to avoid an error.
18836    Use char because int might match the return type of a GCC
18837    builtin and then its argument prototype would still apply.  */
18838 #ifdef __cplusplus
18839 extern "C"
18840 #endif
18841 char event_set ();
18842 int
18843 main ()
18844 {
18845 return event_set ();
18846   ;
18847   return 0;
18848 }
18849 _ACEOF
18850 for ac_lib in '' ev; do
18851   if test -z "$ac_lib"; then
18852     ac_res="none required"
18853   else
18854     ac_res=-l$ac_lib
18855     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18856   fi
18857   if ac_fn_c_try_link "$LINENO"; then :
18858   ac_cv_search_event_set=$ac_res
18859 fi
18860 rm -f core conftest.err conftest.$ac_objext \
18861     conftest$ac_exeext
18862   if ${ac_cv_search_event_set+:} false; then :
18863   break
18864 fi
18865 done
18866 if ${ac_cv_search_event_set+:} false; then :
18867
18868 else
18869   ac_cv_search_event_set=no
18870 fi
18871 rm conftest.$ac_ext
18872 LIBS=$ac_func_search_save_LIBS
18873 fi
18874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
18875 $as_echo "$ac_cv_search_event_set" >&6; }
18876 ac_res=$ac_cv_search_event_set
18877 if test "$ac_res" != no; then :
18878   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18879
18880 fi
18881
18882
18883 else
18884
18885                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
18886 $as_echo_n "checking for library containing event_set... " >&6; }
18887 if ${ac_cv_search_event_set+:} false; then :
18888   $as_echo_n "(cached) " >&6
18889 else
18890   ac_func_search_save_LIBS=$LIBS
18891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18892 /* end confdefs.h.  */
18893
18894 /* Override any GCC internal prototype to avoid an error.
18895    Use char because int might match the return type of a GCC
18896    builtin and then its argument prototype would still apply.  */
18897 #ifdef __cplusplus
18898 extern "C"
18899 #endif
18900 char event_set ();
18901 int
18902 main ()
18903 {
18904 return event_set ();
18905   ;
18906   return 0;
18907 }
18908 _ACEOF
18909 for ac_lib in '' event; do
18910   if test -z "$ac_lib"; then
18911     ac_res="none required"
18912   else
18913     ac_res=-l$ac_lib
18914     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18915   fi
18916   if ac_fn_c_try_link "$LINENO"; then :
18917   ac_cv_search_event_set=$ac_res
18918 fi
18919 rm -f core conftest.err conftest.$ac_objext \
18920     conftest$ac_exeext
18921   if ${ac_cv_search_event_set+:} false; then :
18922   break
18923 fi
18924 done
18925 if ${ac_cv_search_event_set+:} false; then :
18926
18927 else
18928   ac_cv_search_event_set=no
18929 fi
18930 rm conftest.$ac_ext
18931 LIBS=$ac_func_search_save_LIBS
18932 fi
18933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
18934 $as_echo "$ac_cv_search_event_set" >&6; }
18935 ac_res=$ac_cv_search_event_set
18936 if test "$ac_res" != no; then :
18937   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18938
18939 fi
18940
18941
18942 fi
18943
18944         for ac_func in event_base_free
18945 do :
18946   ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
18947 if test "x$ac_cv_func_event_base_free" = xyes; then :
18948   cat >>confdefs.h <<_ACEOF
18949 #define HAVE_EVENT_BASE_FREE 1
18950 _ACEOF
18951
18952 fi
18953 done
18954  # only in libevent 1.2 and later
18955         for ac_func in event_base_once
18956 do :
18957   ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
18958 if test "x$ac_cv_func_event_base_once" = xyes; then :
18959   cat >>confdefs.h <<_ACEOF
18960 #define HAVE_EVENT_BASE_ONCE 1
18961 _ACEOF
18962
18963 fi
18964 done
18965  # only in libevent 1.4.1 and later
18966         for ac_func in event_base_new
18967 do :
18968   ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
18969 if test "x$ac_cv_func_event_base_new" = xyes; then :
18970   cat >>confdefs.h <<_ACEOF
18971 #define HAVE_EVENT_BASE_NEW 1
18972 _ACEOF
18973
18974 fi
18975 done
18976  # only in libevent 1.4.1 and later
18977         for ac_func in event_base_get_method
18978 do :
18979   ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
18980 if test "x$ac_cv_func_event_base_get_method" = xyes; then :
18981   cat >>confdefs.h <<_ACEOF
18982 #define HAVE_EVENT_BASE_GET_METHOD 1
18983 _ACEOF
18984
18985 fi
18986 done
18987  # only in libevent 1.4.3 and later
18988         for ac_func in ev_loop
18989 do :
18990   ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
18991 if test "x$ac_cv_func_ev_loop" = xyes; then :
18992   cat >>confdefs.h <<_ACEOF
18993 #define HAVE_EV_LOOP 1
18994 _ACEOF
18995
18996 fi
18997 done
18998  # only in libev. (tested on 3.51)
18999         for ac_func in ev_default_loop
19000 do :
19001   ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
19002 if test "x$ac_cv_func_ev_default_loop" = xyes; then :
19003   cat >>confdefs.h <<_ACEOF
19004 #define HAVE_EV_DEFAULT_LOOP 1
19005 _ACEOF
19006
19007 fi
19008 done
19009  # only in libev. (tested on 4.00)
19010         PC_LIBEVENT_DEPENDENCY="libevent"
19011
19012         if test -n "$BAK_LDFLAGS_SET"; then
19013                 LDFLAGS="$BAK_LDFLAGS"
19014         fi
19015 else
19016
19017 $as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
19018
19019 fi
19020
19021 # check for libexpat
19022
19023 # Check whether --with-libexpat was given.
19024 if test "${with_libexpat+set}" = set; then :
19025   withval=$with_libexpat;
19026 else
19027    withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19028 fi
19029
19030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
19031 $as_echo_n "checking for libexpat... " >&6; }
19032 found_libexpat="no"
19033 for dir in $withval ; do
19034             if test -f "$dir/include/expat.h"; then
19035                 found_libexpat="yes"
19036                                 if test "$dir" != "/usr"; then
19037                     CPPFLAGS="$CPPFLAGS -I$dir/include"
19038                     LDFLAGS="$LDFLAGS -L$dir/lib"
19039                 fi
19040                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19041 $as_echo "found in $dir" >&6; }
19042                 break;
19043             fi
19044 done
19045 if test x_$found_libexpat != x_yes; then
19046         as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
19047 fi
19048 for ac_header in expat.h
19049 do :
19050   ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
19051 "
19052 if test "x$ac_cv_header_expat_h" = xyes; then :
19053   cat >>confdefs.h <<_ACEOF
19054 #define HAVE_EXPAT_H 1
19055 _ACEOF
19056
19057 fi
19058
19059 done
19060
19061 ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
19062 #include <expat.h>
19063
19064 "
19065 if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then :
19066   ac_have_decl=1
19067 else
19068   ac_have_decl=0
19069 fi
19070
19071 cat >>confdefs.h <<_ACEOF
19072 #define HAVE_DECL_XML_STOPPARSER $ac_have_decl
19073 _ACEOF
19074
19075
19076 # hiredis (redis C client for cachedb)
19077
19078 # Check whether --with-libhiredis was given.
19079 if test "${with_libhiredis+set}" = set; then :
19080   withval=$with_libhiredis;
19081 else
19082    withval="no"
19083 fi
19084
19085 found_libhiredis="no"
19086 if test x_$withval = x_yes -o x_$withval != x_no; then
19087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
19088 $as_echo_n "checking for libhiredis... " >&6; }
19089    if test x_$withval = x_ -o x_$withval = x_yes; then
19090             withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19091    fi
19092    for dir in $withval ; do
19093             if test -f "$dir/include/hiredis/hiredis.h"; then
19094                 found_libhiredis="yes"
19095                                 if test "$dir" != "/usr"; then
19096                     CPPFLAGS="$CPPFLAGS -I$dir/include"
19097                     LDFLAGS="$LDFLAGS -L$dir/lib"
19098                 fi
19099                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19100 $as_echo "found in $dir" >&6; }
19101
19102 $as_echo "#define USE_REDIS 1" >>confdefs.h
19103
19104                 LIBS="$LIBS -lhiredis"
19105                 break;
19106             fi
19107     done
19108     if test x_$found_libhiredis != x_yes; then
19109         as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
19110     fi
19111     for ac_header in hiredis/hiredis.h
19112 do :
19113   ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
19114 "
19115 if test "x$ac_cv_header_hiredis_hiredis_h" = xyes; then :
19116   cat >>confdefs.h <<_ACEOF
19117 #define HAVE_HIREDIS_HIREDIS_H 1
19118 _ACEOF
19119
19120 fi
19121
19122 done
19123
19124     ac_fn_c_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
19125     #include <hiredis/hiredis.h>
19126
19127 "
19128 if test "x$ac_cv_have_decl_redisConnect" = xyes; then :
19129   ac_have_decl=1
19130 else
19131   ac_have_decl=0
19132 fi
19133
19134 cat >>confdefs.h <<_ACEOF
19135 #define HAVE_DECL_REDISCONNECT $ac_have_decl
19136 _ACEOF
19137
19138 fi
19139
19140 # set static linking if requested
19141
19142 staticexe=""
19143 # Check whether --enable-static-exe was given.
19144 if test "${enable_static_exe+set}" = set; then :
19145   enableval=$enable_static_exe;
19146 fi
19147
19148 if test x_$enable_static_exe = x_yes; then
19149         staticexe="-static"
19150         if test "$on_mingw" = yes; then
19151                 staticexe="-all-static"
19152                 # for static compile, include gdi32 and zlib here.
19153                 if echo $LIBS | grep 'lgdi32' >/dev/null; then
19154                         :
19155                 else
19156                         LIBS="$LIBS -lgdi32"
19157                 fi
19158                 LIBS="$LIBS -lz"
19159         fi
19160 fi
19161
19162 # Include systemd.m4 - begin
19163 #   macros for configuring systemd
19164 #   Copyright 2015, Sami Kerola, CloudFlare.
19165 #   BSD licensed.
19166 # Check whether --enable-systemd was given.
19167 if test "${enable_systemd+set}" = set; then :
19168   enableval=$enable_systemd;
19169 else
19170   enable_systemd=no
19171 fi
19172
19173 have_systemd=no
19174 if test "x$enable_systemd" != xno; then :
19175
19176
19177
19178 pkg_failed=no
19179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
19180 $as_echo_n "checking for SYSTEMD... " >&6; }
19181
19182 if test -n "$SYSTEMD_CFLAGS"; then
19183     pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
19184  elif test -n "$PKG_CONFIG"; then
19185     if test -n "$PKG_CONFIG" && \
19186     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
19187   ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
19188   ac_status=$?
19189   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19190   test $ac_status = 0; }; then
19191   pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
19192                       test "x$?" != "x0" && pkg_failed=yes
19193 else
19194   pkg_failed=yes
19195 fi
19196  else
19197     pkg_failed=untried
19198 fi
19199 if test -n "$SYSTEMD_LIBS"; then
19200     pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
19201  elif test -n "$PKG_CONFIG"; then
19202     if test -n "$PKG_CONFIG" && \
19203     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
19204   ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
19205   ac_status=$?
19206   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19207   test $ac_status = 0; }; then
19208   pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
19209                       test "x$?" != "x0" && pkg_failed=yes
19210 else
19211   pkg_failed=yes
19212 fi
19213  else
19214     pkg_failed=untried
19215 fi
19216
19217
19218
19219 if test $pkg_failed = yes; then
19220         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19221 $as_echo "no" >&6; }
19222
19223 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
19224         _pkg_short_errors_supported=yes
19225 else
19226         _pkg_short_errors_supported=no
19227 fi
19228         if test $_pkg_short_errors_supported = yes; then
19229                 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
19230         else
19231                 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
19232         fi
19233         # Put the nasty error message in config.log where it belongs
19234         echo "$SYSTEMD_PKG_ERRORS" >&5
19235
19236         have_systemd=no
19237 elif test $pkg_failed = untried; then
19238         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19239 $as_echo "no" >&6; }
19240         have_systemd=no
19241 else
19242         SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
19243         SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
19244         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19245 $as_echo "yes" >&6; }
19246         have_systemd=yes
19247 fi
19248                 if test "x$have_systemd" != "xyes"; then :
19249
19250
19251 pkg_failed=no
19252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
19253 $as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
19254
19255 if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
19256     pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
19257  elif test -n "$PKG_CONFIG"; then
19258     if test -n "$PKG_CONFIG" && \
19259     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
19260   ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
19261   ac_status=$?
19262   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19263   test $ac_status = 0; }; then
19264   pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
19265                       test "x$?" != "x0" && pkg_failed=yes
19266 else
19267   pkg_failed=yes
19268 fi
19269  else
19270     pkg_failed=untried
19271 fi
19272 if test -n "$SYSTEMD_DAEMON_LIBS"; then
19273     pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
19274  elif test -n "$PKG_CONFIG"; then
19275     if test -n "$PKG_CONFIG" && \
19276     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
19277   ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
19278   ac_status=$?
19279   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19280   test $ac_status = 0; }; then
19281   pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
19282                       test "x$?" != "x0" && pkg_failed=yes
19283 else
19284   pkg_failed=yes
19285 fi
19286  else
19287     pkg_failed=untried
19288 fi
19289
19290
19291
19292 if test $pkg_failed = yes; then
19293         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19294 $as_echo "no" >&6; }
19295
19296 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
19297         _pkg_short_errors_supported=yes
19298 else
19299         _pkg_short_errors_supported=no
19300 fi
19301         if test $_pkg_short_errors_supported = yes; then
19302                 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
19303         else
19304                 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
19305         fi
19306         # Put the nasty error message in config.log where it belongs
19307         echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
19308
19309         have_systemd_daemon=no
19310 elif test $pkg_failed = untried; then
19311         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19312 $as_echo "no" >&6; }
19313         have_systemd_daemon=no
19314 else
19315         SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
19316         SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
19317         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19318 $as_echo "yes" >&6; }
19319         have_systemd_daemon=yes
19320 fi
19321                 if test "x$have_systemd_daemon" = "xyes"; then :
19322   have_systemd=yes
19323 fi
19324
19325 fi
19326         case $enable_systemd:$have_systemd in #(
19327   yes:no) :
19328     as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
19329   *:yes) :
19330
19331 $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
19332
19333                 LIBS="$LIBS $SYSTEMD_LIBS"
19334
19335          ;; #(
19336   *) :
19337      ;;
19338 esac
19339
19340
19341 fi
19342  if test "x$have_systemd" = xyes; then
19343   USE_SYSTEMD_TRUE=
19344   USE_SYSTEMD_FALSE='#'
19345 else
19346   USE_SYSTEMD_TRUE='#'
19347   USE_SYSTEMD_FALSE=
19348 fi
19349
19350
19351 # Include systemd.m4 - end
19352
19353 # set lock checking if requested
19354 # Check whether --enable-lock_checks was given.
19355 if test "${enable_lock_checks+set}" = set; then :
19356   enableval=$enable_lock_checks;
19357 fi
19358
19359 if test x_$enable_lock_checks = x_yes; then
19360
19361 $as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
19362
19363         CHECKLOCK_OBJ="checklocks.lo"
19364
19365 fi
19366
19367
19368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
19369 $as_echo_n "checking for getaddrinfo... " >&6; }
19370 ac_cv_func_getaddrinfo=no
19371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19372 /* end confdefs.h.  */
19373
19374 #ifdef __cplusplus
19375 extern "C"
19376 {
19377 #endif
19378 char* getaddrinfo();
19379 char* (*f) () = getaddrinfo;
19380 #ifdef __cplusplus
19381 }
19382 #endif
19383 int main() {
19384         ;
19385         return 0;
19386 }
19387
19388 _ACEOF
19389 if ac_fn_c_try_link "$LINENO"; then :
19390   ac_cv_func_getaddrinfo="yes"
19391 if test "$ac_cv_header_windows_h" = "yes"; then
19392
19393 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
19394
19395         USE_WINSOCK="1"
19396         if echo $LIBS | grep 'lws2_32' >/dev/null; then
19397                 :
19398         else
19399                 LIBS="$LIBS -lws2_32"
19400         fi
19401 fi
19402
19403 else
19404   ORIGLIBS="$LIBS"
19405 LIBS="$LIBS -lws2_32"
19406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19407 /* end confdefs.h.  */
19408
19409 #ifdef HAVE_WS2TCPIP_H
19410 #include <ws2tcpip.h>
19411 #endif
19412
19413 int
19414 main ()
19415 {
19416
19417         (void)getaddrinfo(NULL, NULL, NULL, NULL);
19418
19419
19420   ;
19421   return 0;
19422 }
19423 _ACEOF
19424 if ac_fn_c_try_link "$LINENO"; then :
19425
19426 ac_cv_func_getaddrinfo="yes"
19427
19428 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
19429
19430 USE_WINSOCK="1"
19431
19432 else
19433
19434 ac_cv_func_getaddrinfo="no"
19435 LIBS="$ORIGLIBS"
19436
19437 fi
19438 rm -f core conftest.err conftest.$ac_objext \
19439     conftest$ac_exeext conftest.$ac_ext
19440
19441 fi
19442 rm -f core conftest.err conftest.$ac_objext \
19443     conftest$ac_exeext conftest.$ac_ext
19444
19445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
19446 $as_echo "$ac_cv_func_getaddrinfo" >&6; }
19447 if test $ac_cv_func_getaddrinfo = yes; then
19448
19449 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
19450
19451 fi
19452
19453 if test "$USE_WINSOCK" = 1; then
19454
19455 $as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
19456
19457         for ac_header in iphlpapi.h
19458 do :
19459   ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
19460 #include <windows.h>
19461
19462 "
19463 if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
19464   cat >>confdefs.h <<_ACEOF
19465 #define HAVE_IPHLPAPI_H 1
19466 _ACEOF
19467
19468 fi
19469
19470 done
19471
19472         if test -n "$ac_tool_prefix"; then
19473   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
19474 set dummy ${ac_tool_prefix}windres; ac_word=$2
19475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19476 $as_echo_n "checking for $ac_word... " >&6; }
19477 if ${ac_cv_prog_WINDRES+:} false; then :
19478   $as_echo_n "(cached) " >&6
19479 else
19480   if test -n "$WINDRES"; then
19481   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
19482 else
19483 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19484 for as_dir in $PATH
19485 do
19486   IFS=$as_save_IFS
19487   test -z "$as_dir" && as_dir=.
19488     for ac_exec_ext in '' $ac_executable_extensions; do
19489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19490     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
19491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19492     break 2
19493   fi
19494 done
19495   done
19496 IFS=$as_save_IFS
19497
19498 fi
19499 fi
19500 WINDRES=$ac_cv_prog_WINDRES
19501 if test -n "$WINDRES"; then
19502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
19503 $as_echo "$WINDRES" >&6; }
19504 else
19505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19506 $as_echo "no" >&6; }
19507 fi
19508
19509
19510 fi
19511 if test -z "$ac_cv_prog_WINDRES"; then
19512   ac_ct_WINDRES=$WINDRES
19513   # Extract the first word of "windres", so it can be a program name with args.
19514 set dummy windres; ac_word=$2
19515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19516 $as_echo_n "checking for $ac_word... " >&6; }
19517 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
19518   $as_echo_n "(cached) " >&6
19519 else
19520   if test -n "$ac_ct_WINDRES"; then
19521   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
19522 else
19523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19524 for as_dir in $PATH
19525 do
19526   IFS=$as_save_IFS
19527   test -z "$as_dir" && as_dir=.
19528     for ac_exec_ext in '' $ac_executable_extensions; do
19529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19530     ac_cv_prog_ac_ct_WINDRES="windres"
19531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19532     break 2
19533   fi
19534 done
19535   done
19536 IFS=$as_save_IFS
19537
19538 fi
19539 fi
19540 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
19541 if test -n "$ac_ct_WINDRES"; then
19542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
19543 $as_echo "$ac_ct_WINDRES" >&6; }
19544 else
19545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19546 $as_echo "no" >&6; }
19547 fi
19548
19549   if test "x$ac_ct_WINDRES" = x; then
19550     WINDRES=""
19551   else
19552     case $cross_compiling:$ac_tool_warned in
19553 yes:)
19554 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19555 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19556 ac_tool_warned=yes ;;
19557 esac
19558     WINDRES=$ac_ct_WINDRES
19559   fi
19560 else
19561   WINDRES="$ac_cv_prog_WINDRES"
19562 fi
19563
19564         LIBS="$LIBS -liphlpapi -lcrypt32"
19565         WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
19566
19567         WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
19568
19569         WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
19570
19571         WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
19572
19573         WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
19574
19575         WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
19576
19577         WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
19578
19579         WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
19580
19581 fi
19582 if test $ac_cv_func_getaddrinfo = no; then
19583         case " $LIBOBJS " in
19584   *" fake-rfc2553.$ac_objext "* ) ;;
19585   *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
19586  ;;
19587 esac
19588
19589 fi
19590 # check after getaddrinfo for its libraries
19591
19592 # check ioctlsocket
19593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
19594 $as_echo_n "checking for ioctlsocket... " >&6; }
19595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19596 /* end confdefs.h.  */
19597
19598 #ifdef HAVE_WINSOCK2_H
19599 #include <winsock2.h>
19600 #endif
19601
19602 int
19603 main ()
19604 {
19605
19606         (void)ioctlsocket(0, 0, NULL);
19607
19608   ;
19609   return 0;
19610 }
19611 _ACEOF
19612 if ac_fn_c_try_link "$LINENO"; then :
19613
19614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19615 $as_echo "yes" >&6; }
19616
19617 $as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
19618
19619
19620 else
19621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19622 $as_echo "no" >&6; }
19623 fi
19624 rm -f core conftest.err conftest.$ac_objext \
19625     conftest$ac_exeext conftest.$ac_ext
19626
19627
19628 # see if daemon(3) exists, and if it is deprecated.
19629 for ac_func in daemon
19630 do :
19631   ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
19632 if test "x$ac_cv_func_daemon" = xyes; then :
19633   cat >>confdefs.h <<_ACEOF
19634 #define HAVE_DAEMON 1
19635 _ACEOF
19636
19637 fi
19638 done
19639
19640 if test $ac_cv_func_daemon = yes; then
19641
19642
19643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
19644 $as_echo_n "checking if daemon is deprecated... " >&6; }
19645 cache=`echo daemon | sed 'y%.=/+-%___p_%'`
19646 if eval \${cv_cc_deprecated_$cache+:} false; then :
19647   $as_echo_n "(cached) " >&6
19648 else
19649
19650 echo '
19651 #include <stdlib.h>
19652 ' >conftest.c
19653 echo 'void f(){ (void)daemon(0, 0); }' >>conftest.c
19654 if test -z "`$CC -c conftest.c 2>&1 | grep deprecated`"; then
19655 eval "cv_cc_deprecated_$cache=no"
19656 else
19657 eval "cv_cc_deprecated_$cache=yes"
19658 fi
19659 rm -f conftest conftest.o conftest.c
19660
19661 fi
19662
19663 if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
19664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19665 $as_echo "yes" >&6; }
19666
19667 cat >>confdefs.h <<_ACEOF
19668 #define DEPRECATED_DAEMON 1
19669 _ACEOF
19670
19671 :
19672
19673 else
19674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19675 $as_echo "no" >&6; }
19676 :
19677
19678 fi
19679
19680 fi
19681
19682 ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
19683 $ac_includes_default
19684 #ifdef HAVE_SYS_UN_H
19685 #include <sys/un.h>
19686 #endif
19687
19688 "
19689 if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
19690
19691 cat >>confdefs.h <<_ACEOF
19692 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
19693 _ACEOF
19694
19695
19696 fi
19697
19698 ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
19699 $ac_includes_default
19700 #if HAVE_SYS_PARAM_H
19701 #include <sys/param.h>
19702 #endif
19703
19704 #ifdef HAVE_SYS_SOCKET_H
19705 #include <sys/socket.h>
19706 #endif
19707
19708 #ifdef HAVE_SYS_UIO_H
19709 #include <sys/uio.h>
19710 #endif
19711
19712 #ifdef HAVE_NETINET_IN_H
19713 #include <netinet/in.h>
19714 #endif
19715
19716 #ifdef HAVE_NETINET_TCP_H
19717 #include <netinet/tcp.h>
19718 #endif
19719
19720 #ifdef HAVE_ARPA_INET_H
19721 #include <arpa/inet.h>
19722 #endif
19723
19724 #ifdef HAVE_WINSOCK2_H
19725 #include <winsock2.h>
19726 #endif
19727
19728 #ifdef HAVE_WS2TCPIP_H
19729 #include <ws2tcpip.h>
19730 #endif
19731
19732 "
19733 if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
19734
19735 cat >>confdefs.h <<_ACEOF
19736 #define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
19737 _ACEOF
19738
19739
19740 fi
19741
19742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
19743 $as_echo_n "checking for library containing setusercontext... " >&6; }
19744 if ${ac_cv_search_setusercontext+:} false; then :
19745   $as_echo_n "(cached) " >&6
19746 else
19747   ac_func_search_save_LIBS=$LIBS
19748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19749 /* end confdefs.h.  */
19750
19751 /* Override any GCC internal prototype to avoid an error.
19752    Use char because int might match the return type of a GCC
19753    builtin and then its argument prototype would still apply.  */
19754 #ifdef __cplusplus
19755 extern "C"
19756 #endif
19757 char setusercontext ();
19758 int
19759 main ()
19760 {
19761 return setusercontext ();
19762   ;
19763   return 0;
19764 }
19765 _ACEOF
19766 for ac_lib in '' util; do
19767   if test -z "$ac_lib"; then
19768     ac_res="none required"
19769   else
19770     ac_res=-l$ac_lib
19771     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19772   fi
19773   if ac_fn_c_try_link "$LINENO"; then :
19774   ac_cv_search_setusercontext=$ac_res
19775 fi
19776 rm -f core conftest.err conftest.$ac_objext \
19777     conftest$ac_exeext
19778   if ${ac_cv_search_setusercontext+:} false; then :
19779   break
19780 fi
19781 done
19782 if ${ac_cv_search_setusercontext+:} false; then :
19783
19784 else
19785   ac_cv_search_setusercontext=no
19786 fi
19787 rm conftest.$ac_ext
19788 LIBS=$ac_func_search_save_LIBS
19789 fi
19790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
19791 $as_echo "$ac_cv_search_setusercontext" >&6; }
19792 ac_res=$ac_cv_search_setusercontext
19793 if test "$ac_res" != no; then :
19794   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19795
19796 fi
19797
19798 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
19799 do :
19800   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19801 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19802 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19803   cat >>confdefs.h <<_ACEOF
19804 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19805 _ACEOF
19806
19807 fi
19808 done
19809
19810 for ac_func in setresuid
19811 do :
19812   ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
19813 if test "x$ac_cv_func_setresuid" = xyes; then :
19814   cat >>confdefs.h <<_ACEOF
19815 #define HAVE_SETRESUID 1
19816 _ACEOF
19817
19818 else
19819   for ac_func in setreuid
19820 do :
19821   ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
19822 if test "x$ac_cv_func_setreuid" = xyes; then :
19823   cat >>confdefs.h <<_ACEOF
19824 #define HAVE_SETREUID 1
19825 _ACEOF
19826
19827 fi
19828 done
19829
19830 fi
19831 done
19832
19833 for ac_func in setresgid
19834 do :
19835   ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
19836 if test "x$ac_cv_func_setresgid" = xyes; then :
19837   cat >>confdefs.h <<_ACEOF
19838 #define HAVE_SETRESGID 1
19839 _ACEOF
19840
19841 else
19842   for ac_func in setregid
19843 do :
19844   ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
19845 if test "x$ac_cv_func_setregid" = xyes; then :
19846   cat >>confdefs.h <<_ACEOF
19847 #define HAVE_SETREGID 1
19848 _ACEOF
19849
19850 fi
19851 done
19852
19853 fi
19854 done
19855
19856
19857 # check if setreuid en setregid fail, on MacOSX10.4(darwin8).
19858 if echo $target_os | grep darwin8 > /dev/null; then
19859
19860 $as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
19861
19862 fi
19863 ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
19864 $ac_includes_default
19865 #ifdef HAVE_NETINET_IN_H
19866 #include <netinet/in.h>
19867 #endif
19868
19869 #ifdef HAVE_NETINET_TCP_H
19870 #include <netinet/tcp.h>
19871 #endif
19872
19873 #ifdef HAVE_ARPA_INET_H
19874 #include <arpa/inet.h>
19875 #endif
19876
19877 #ifdef HAVE_WINSOCK2_H
19878 #include <winsock2.h>
19879 #endif
19880
19881 #ifdef HAVE_WS2TCPIP_H
19882 #include <ws2tcpip.h>
19883 #endif
19884
19885 "
19886 if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
19887   ac_have_decl=1
19888 else
19889   ac_have_decl=0
19890 fi
19891
19892 cat >>confdefs.h <<_ACEOF
19893 #define HAVE_DECL_INET_PTON $ac_have_decl
19894 _ACEOF
19895 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
19896 $ac_includes_default
19897 #ifdef HAVE_NETINET_IN_H
19898 #include <netinet/in.h>
19899 #endif
19900
19901 #ifdef HAVE_NETINET_TCP_H
19902 #include <netinet/tcp.h>
19903 #endif
19904
19905 #ifdef HAVE_ARPA_INET_H
19906 #include <arpa/inet.h>
19907 #endif
19908
19909 #ifdef HAVE_WINSOCK2_H
19910 #include <winsock2.h>
19911 #endif
19912
19913 #ifdef HAVE_WS2TCPIP_H
19914 #include <ws2tcpip.h>
19915 #endif
19916
19917 "
19918 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
19919   ac_have_decl=1
19920 else
19921   ac_have_decl=0
19922 fi
19923
19924 cat >>confdefs.h <<_ACEOF
19925 #define HAVE_DECL_INET_NTOP $ac_have_decl
19926 _ACEOF
19927
19928 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
19929 if test "x$ac_cv_func_inet_aton" = xyes; then :
19930   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
19931
19932 else
19933   case " $LIBOBJS " in
19934   *" inet_aton.$ac_objext "* ) ;;
19935   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
19936  ;;
19937 esac
19938
19939 fi
19940
19941
19942 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
19943 if test "x$ac_cv_func_inet_pton" = xyes; then :
19944   $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
19945
19946 else
19947   case " $LIBOBJS " in
19948   *" inet_pton.$ac_objext "* ) ;;
19949   *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
19950  ;;
19951 esac
19952
19953 fi
19954
19955
19956 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
19957 if test "x$ac_cv_func_inet_ntop" = xyes; then :
19958   $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
19959
19960 else
19961   case " $LIBOBJS " in
19962   *" inet_ntop.$ac_objext "* ) ;;
19963   *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
19964  ;;
19965 esac
19966
19967 fi
19968
19969
19970 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
19971 if test "x$ac_cv_func_snprintf" = xyes; then :
19972   $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
19973
19974 else
19975   case " $LIBOBJS " in
19976   *" snprintf.$ac_objext "* ) ;;
19977   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
19978  ;;
19979 esac
19980
19981 fi
19982
19983
19984 # test if snprintf return the proper length
19985 if test "x$ac_cv_func_snprintf" = xyes; then
19986     if test c${cross_compiling} = cno; then
19987         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
19988 $as_echo_n "checking for correct snprintf return value... " >&6; }
19989         if test "$cross_compiling" = yes; then :
19990   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19991 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19992 as_fn_error $? "cannot run test program while cross compiling
19993 See \`config.log' for more details" "$LINENO" 5; }
19994 else
19995   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19996 /* end confdefs.h.  */
19997 $ac_includes_default
19998
19999 int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
20000
20001 _ACEOF
20002 if ac_fn_c_try_run "$LINENO"; then :
20003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20004 $as_echo "yes" >&6; }
20005 else
20006
20007                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20008 $as_echo "no" >&6; }
20009
20010 $as_echo "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
20011
20012                 case " $LIBOBJS " in
20013   *" snprintf.$ac_objext "* ) ;;
20014   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
20015  ;;
20016 esac
20017
20018
20019 fi
20020 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20021   conftest.$ac_objext conftest.beam conftest.$ac_ext
20022 fi
20023
20024     fi
20025 fi
20026 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
20027 if test "x$ac_cv_func_strlcat" = xyes; then :
20028   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
20029
20030 else
20031   case " $LIBOBJS " in
20032   *" strlcat.$ac_objext "* ) ;;
20033   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
20034  ;;
20035 esac
20036
20037 fi
20038
20039
20040 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
20041 if test "x$ac_cv_func_strlcpy" = xyes; then :
20042   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
20043
20044 else
20045   case " $LIBOBJS " in
20046   *" strlcpy.$ac_objext "* ) ;;
20047   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
20048  ;;
20049 esac
20050
20051 fi
20052
20053
20054 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
20055 if test "x$ac_cv_func_memmove" = xyes; then :
20056   $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
20057
20058 else
20059   case " $LIBOBJS " in
20060   *" memmove.$ac_objext "* ) ;;
20061   *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
20062  ;;
20063 esac
20064
20065 fi
20066
20067
20068 ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
20069 if test "x$ac_cv_func_gmtime_r" = xyes; then :
20070   $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
20071
20072 else
20073   case " $LIBOBJS " in
20074   *" gmtime_r.$ac_objext "* ) ;;
20075   *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
20076  ;;
20077 esac
20078
20079 fi
20080
20081
20082 ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
20083 if test "x$ac_cv_func_isblank" = xyes; then :
20084   $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
20085
20086 else
20087   case " $LIBOBJS " in
20088   *" isblank.$ac_objext "* ) ;;
20089   *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
20090  ;;
20091 esac
20092
20093 fi
20094
20095
20096 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
20097 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
20098   $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
20099
20100 else
20101   case " $LIBOBJS " in
20102   *" explicit_bzero.$ac_objext "* ) ;;
20103   *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
20104  ;;
20105 esac
20106
20107 fi
20108
20109
20110 LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
20111
20112 ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
20113 if test "x$ac_cv_func_reallocarray" = xyes; then :
20114   $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
20115
20116 else
20117   case " $LIBOBJS " in
20118   *" reallocarray.$ac_objext "* ) ;;
20119   *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
20120  ;;
20121 esac
20122
20123 fi
20124
20125
20126 if test "$USE_NSS" = "no"; then
20127         ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
20128 if test "x$ac_cv_func_arc4random" = xyes; then :
20129   $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
20130
20131 else
20132   case " $LIBOBJS " in
20133   *" arc4random.$ac_objext "* ) ;;
20134   *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
20135  ;;
20136 esac
20137
20138 fi
20139
20140
20141         ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
20142 if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
20143   $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
20144
20145 else
20146   case " $LIBOBJS " in
20147   *" arc4random_uniform.$ac_objext "* ) ;;
20148   *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
20149  ;;
20150 esac
20151
20152 fi
20153
20154
20155         if test "$ac_cv_func_arc4random" = "no"; then
20156                 case " $LIBOBJS " in
20157   *" arc4_lock.$ac_objext "* ) ;;
20158   *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
20159  ;;
20160 esac
20161
20162                 for ac_func in getentropy
20163 do :
20164   ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
20165 if test "x$ac_cv_func_getentropy" = xyes; then :
20166   cat >>confdefs.h <<_ACEOF
20167 #define HAVE_GETENTROPY 1
20168 _ACEOF
20169
20170 else
20171
20172                     if test "$USE_WINSOCK" = 1; then
20173                         case " $LIBOBJS " in
20174   *" getentropy_win.$ac_objext "* ) ;;
20175   *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
20176  ;;
20177 esac
20178
20179                     else
20180                         case "$host" in
20181                         Darwin|*darwin*)
20182                                 case " $LIBOBJS " in
20183   *" getentropy_osx.$ac_objext "* ) ;;
20184   *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
20185  ;;
20186 esac
20187
20188                         ;;
20189                         *solaris*|*sunos*|SunOS)
20190                                 case " $LIBOBJS " in
20191   *" getentropy_solaris.$ac_objext "* ) ;;
20192   *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
20193  ;;
20194 esac
20195
20196                                 for ac_header in sys/sha2.h
20197 do :
20198   ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
20199 "
20200 if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
20201   cat >>confdefs.h <<_ACEOF
20202 #define HAVE_SYS_SHA2_H 1
20203 _ACEOF
20204
20205 else
20206
20207                                         for ac_func in SHA512_Update
20208 do :
20209   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20210 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20211   cat >>confdefs.h <<_ACEOF
20212 #define HAVE_SHA512_UPDATE 1
20213 _ACEOF
20214
20215 else
20216
20217                                                 case " $LIBOBJS " in
20218   *" sha512.$ac_objext "* ) ;;
20219   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20220  ;;
20221 esac
20222
20223
20224 fi
20225 done
20226
20227
20228 fi
20229
20230 done
20231
20232                                 if test "$ac_cv_header_sys_sha2_h" = "yes"; then
20233                                         # this lib needed for sha2 on solaris
20234                                         LIBS="$LIBS -lmd"
20235                                 fi
20236                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20237 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20238 if ${ac_cv_search_clock_gettime+:} false; then :
20239   $as_echo_n "(cached) " >&6
20240 else
20241   ac_func_search_save_LIBS=$LIBS
20242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20243 /* end confdefs.h.  */
20244
20245 /* Override any GCC internal prototype to avoid an error.
20246    Use char because int might match the return type of a GCC
20247    builtin and then its argument prototype would still apply.  */
20248 #ifdef __cplusplus
20249 extern "C"
20250 #endif
20251 char clock_gettime ();
20252 int
20253 main ()
20254 {
20255 return clock_gettime ();
20256   ;
20257   return 0;
20258 }
20259 _ACEOF
20260 for ac_lib in '' rt; do
20261   if test -z "$ac_lib"; then
20262     ac_res="none required"
20263   else
20264     ac_res=-l$ac_lib
20265     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20266   fi
20267   if ac_fn_c_try_link "$LINENO"; then :
20268   ac_cv_search_clock_gettime=$ac_res
20269 fi
20270 rm -f core conftest.err conftest.$ac_objext \
20271     conftest$ac_exeext
20272   if ${ac_cv_search_clock_gettime+:} false; then :
20273   break
20274 fi
20275 done
20276 if ${ac_cv_search_clock_gettime+:} false; then :
20277
20278 else
20279   ac_cv_search_clock_gettime=no
20280 fi
20281 rm conftest.$ac_ext
20282 LIBS=$ac_func_search_save_LIBS
20283 fi
20284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20285 $as_echo "$ac_cv_search_clock_gettime" >&6; }
20286 ac_res=$ac_cv_search_clock_gettime
20287 if test "$ac_res" != no; then :
20288   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20289
20290 fi
20291
20292                         ;;
20293                         *linux*|Linux|*)
20294                                 case " $LIBOBJS " in
20295   *" getentropy_linux.$ac_objext "* ) ;;
20296   *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
20297  ;;
20298 esac
20299
20300                                 for ac_func in SHA512_Update
20301 do :
20302   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20303 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20304   cat >>confdefs.h <<_ACEOF
20305 #define HAVE_SHA512_UPDATE 1
20306 _ACEOF
20307
20308 else
20309
20310
20311 $as_echo "#define COMPAT_SHA512 1" >>confdefs.h
20312
20313                                         case " $LIBOBJS " in
20314   *" sha512.$ac_objext "* ) ;;
20315   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20316  ;;
20317 esac
20318
20319
20320 fi
20321 done
20322
20323                                 for ac_header in sys/sysctl.h
20324 do :
20325   ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
20326 "
20327 if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
20328   cat >>confdefs.h <<_ACEOF
20329 #define HAVE_SYS_SYSCTL_H 1
20330 _ACEOF
20331
20332 fi
20333
20334 done
20335
20336                                 for ac_func in getauxval
20337 do :
20338   ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
20339 if test "x$ac_cv_func_getauxval" = xyes; then :
20340   cat >>confdefs.h <<_ACEOF
20341 #define HAVE_GETAUXVAL 1
20342 _ACEOF
20343
20344 fi
20345 done
20346
20347                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20348 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20349 if ${ac_cv_search_clock_gettime+:} false; then :
20350   $as_echo_n "(cached) " >&6
20351 else
20352   ac_func_search_save_LIBS=$LIBS
20353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20354 /* end confdefs.h.  */
20355
20356 /* Override any GCC internal prototype to avoid an error.
20357    Use char because int might match the return type of a GCC
20358    builtin and then its argument prototype would still apply.  */
20359 #ifdef __cplusplus
20360 extern "C"
20361 #endif
20362 char clock_gettime ();
20363 int
20364 main ()
20365 {
20366 return clock_gettime ();
20367   ;
20368   return 0;
20369 }
20370 _ACEOF
20371 for ac_lib in '' rt; do
20372   if test -z "$ac_lib"; then
20373     ac_res="none required"
20374   else
20375     ac_res=-l$ac_lib
20376     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20377   fi
20378   if ac_fn_c_try_link "$LINENO"; then :
20379   ac_cv_search_clock_gettime=$ac_res
20380 fi
20381 rm -f core conftest.err conftest.$ac_objext \
20382     conftest$ac_exeext
20383   if ${ac_cv_search_clock_gettime+:} false; then :
20384   break
20385 fi
20386 done
20387 if ${ac_cv_search_clock_gettime+:} false; then :
20388
20389 else
20390   ac_cv_search_clock_gettime=no
20391 fi
20392 rm conftest.$ac_ext
20393 LIBS=$ac_func_search_save_LIBS
20394 fi
20395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20396 $as_echo "$ac_cv_search_clock_gettime" >&6; }
20397 ac_res=$ac_cv_search_clock_gettime
20398 if test "$ac_res" != no; then :
20399   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20400
20401 fi
20402
20403                         ;;
20404                         esac
20405                     fi
20406
20407 fi
20408 done
20409
20410         fi
20411 fi
20412 LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
20413
20414 ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
20415 if test "x$ac_cv_func_ctime_r" = xyes; then :
20416   $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
20417
20418 else
20419   case " $LIBOBJS " in
20420   *" ctime_r.$ac_objext "* ) ;;
20421   *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
20422  ;;
20423 esac
20424
20425 fi
20426
20427
20428 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
20429 if test "x$ac_cv_func_strsep" = xyes; then :
20430   $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
20431
20432 else
20433   case " $LIBOBJS " in
20434   *" strsep.$ac_objext "* ) ;;
20435   *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
20436  ;;
20437 esac
20438
20439 fi
20440
20441
20442
20443 # Check whether --enable-allsymbols was given.
20444 if test "${enable_allsymbols+set}" = set; then :
20445   enableval=$enable_allsymbols;
20446 fi
20447
20448 case "$enable_allsymbols" in
20449         yes)
20450         COMMON_OBJ_ALL_SYMBOLS=""
20451         UBSYMS=""
20452         EXTRALINK="-L. -L.libs -lunbound"
20453
20454 $as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
20455
20456         ;;
20457         no|*)
20458         COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
20459         UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
20460         EXTRALINK=""
20461         ;;
20462 esac
20463
20464
20465
20466 if test x_$enable_lock_checks = x_yes; then
20467         UBSYMS="-export-symbols clubsyms.def"
20468         cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
20469         echo lock_protect >> clubsyms.def
20470         echo lock_unprotect >> clubsyms.def
20471         echo lock_get_mem >> clubsyms.def
20472         echo checklock_start >> clubsyms.def
20473         echo checklock_stop >> clubsyms.def
20474         echo checklock_lock >> clubsyms.def
20475         echo checklock_unlock >> clubsyms.def
20476         echo checklock_init >> clubsyms.def
20477         echo checklock_thrcreate >> clubsyms.def
20478         echo checklock_thrjoin >> clubsyms.def
20479 fi
20480
20481 # check for dnstap if requested
20482
20483   # Check whether --enable-dnstap was given.
20484 if test "${enable_dnstap+set}" = set; then :
20485   enableval=$enable_dnstap; opt_dnstap=$enableval
20486 else
20487   opt_dnstap=no
20488 fi
20489
20490
20491
20492 # Check whether --with-dnstap-socket-path was given.
20493 if test "${with_dnstap_socket_path+set}" = set; then :
20494   withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
20495 else
20496   opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
20497 fi
20498
20499
20500   if test "x$opt_dnstap" != "xno"; then
20501     # Extract the first word of "protoc-c", so it can be a program name with args.
20502 set dummy protoc-c; ac_word=$2
20503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20504 $as_echo_n "checking for $ac_word... " >&6; }
20505 if ${ac_cv_path_PROTOC_C+:} false; then :
20506   $as_echo_n "(cached) " >&6
20507 else
20508   case $PROTOC_C in
20509   [\\/]* | ?:[\\/]*)
20510   ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
20511   ;;
20512   *)
20513   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20514 for as_dir in $PATH
20515 do
20516   IFS=$as_save_IFS
20517   test -z "$as_dir" && as_dir=.
20518     for ac_exec_ext in '' $ac_executable_extensions; do
20519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20520     ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
20521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20522     break 2
20523   fi
20524 done
20525   done
20526 IFS=$as_save_IFS
20527
20528   ;;
20529 esac
20530 fi
20531 PROTOC_C=$ac_cv_path_PROTOC_C
20532 if test -n "$PROTOC_C"; then
20533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
20534 $as_echo "$PROTOC_C" >&6; }
20535 else
20536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20537 $as_echo "no" >&6; }
20538 fi
20539
20540
20541     if test -z "$PROTOC_C"; then
20542       as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
20543     fi
20544
20545 # Check whether --with-protobuf-c was given.
20546 if test "${with_protobuf_c+set}" = set; then :
20547   withval=$with_protobuf_c;
20548           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
20549           if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
20550             CFLAGS="$CFLAGS -I$withval/include/google"
20551           else
20552             CFLAGS="$CFLAGS -I$withval/include"
20553           fi
20554           LDFLAGS="$LDFLAGS -L$withval/lib"
20555
20556 else
20557
20558           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
20559           if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
20560             CFLAGS="$CFLAGS -I/usr/include/google"
20561           else
20562             if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
20563               CFLAGS="$CFLAGS -I/usr/local/include/google"
20564               LDFLAGS="$LDFLAGS -L/usr/local/lib"
20565             fi
20566           fi
20567
20568 fi
20569
20570
20571 # Check whether --with-libfstrm was given.
20572 if test "${with_libfstrm+set}" = set; then :
20573   withval=$with_libfstrm;
20574         CFLAGS="$CFLAGS -I$withval/include"
20575         LDFLAGS="$LDFLAGS -L$withval/lib"
20576
20577 fi
20578
20579     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fstrm_iothr_init" >&5
20580 $as_echo_n "checking for library containing fstrm_iothr_init... " >&6; }
20581 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20582   $as_echo_n "(cached) " >&6
20583 else
20584   ac_func_search_save_LIBS=$LIBS
20585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20586 /* end confdefs.h.  */
20587
20588 /* Override any GCC internal prototype to avoid an error.
20589    Use char because int might match the return type of a GCC
20590    builtin and then its argument prototype would still apply.  */
20591 #ifdef __cplusplus
20592 extern "C"
20593 #endif
20594 char fstrm_iothr_init ();
20595 int
20596 main ()
20597 {
20598 return fstrm_iothr_init ();
20599   ;
20600   return 0;
20601 }
20602 _ACEOF
20603 for ac_lib in '' fstrm; do
20604   if test -z "$ac_lib"; then
20605     ac_res="none required"
20606   else
20607     ac_res=-l$ac_lib
20608     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20609   fi
20610   if ac_fn_c_try_link "$LINENO"; then :
20611   ac_cv_search_fstrm_iothr_init=$ac_res
20612 fi
20613 rm -f core conftest.err conftest.$ac_objext \
20614     conftest$ac_exeext
20615   if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20616   break
20617 fi
20618 done
20619 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20620
20621 else
20622   ac_cv_search_fstrm_iothr_init=no
20623 fi
20624 rm conftest.$ac_ext
20625 LIBS=$ac_func_search_save_LIBS
20626 fi
20627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fstrm_iothr_init" >&5
20628 $as_echo "$ac_cv_search_fstrm_iothr_init" >&6; }
20629 ac_res=$ac_cv_search_fstrm_iothr_init
20630 if test "$ac_res" != no; then :
20631   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20632
20633 else
20634   as_fn_error $? "The fstrm library was not found. Please install fstrm!" "$LINENO" 5
20635 fi
20636
20637     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
20638 $as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
20639 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20640   $as_echo_n "(cached) " >&6
20641 else
20642   ac_func_search_save_LIBS=$LIBS
20643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20644 /* end confdefs.h.  */
20645
20646 /* Override any GCC internal prototype to avoid an error.
20647    Use char because int might match the return type of a GCC
20648    builtin and then its argument prototype would still apply.  */
20649 #ifdef __cplusplus
20650 extern "C"
20651 #endif
20652 char protobuf_c_message_pack ();
20653 int
20654 main ()
20655 {
20656 return protobuf_c_message_pack ();
20657   ;
20658   return 0;
20659 }
20660 _ACEOF
20661 for ac_lib in '' protobuf-c; do
20662   if test -z "$ac_lib"; then
20663     ac_res="none required"
20664   else
20665     ac_res=-l$ac_lib
20666     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20667   fi
20668   if ac_fn_c_try_link "$LINENO"; then :
20669   ac_cv_search_protobuf_c_message_pack=$ac_res
20670 fi
20671 rm -f core conftest.err conftest.$ac_objext \
20672     conftest$ac_exeext
20673   if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20674   break
20675 fi
20676 done
20677 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20678
20679 else
20680   ac_cv_search_protobuf_c_message_pack=no
20681 fi
20682 rm conftest.$ac_ext
20683 LIBS=$ac_func_search_save_LIBS
20684 fi
20685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
20686 $as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
20687 ac_res=$ac_cv_search_protobuf_c_message_pack
20688 if test "$ac_res" != no; then :
20689   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20690
20691 else
20692   as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
20693 fi
20694
20695
20696
20697 $as_echo "#define USE_DNSTAP 1" >>confdefs.h
20698
20699         ENABLE_DNSTAP=1
20700
20701
20702
20703         hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
20704
20705
20706 cat >>confdefs.h <<_ACEOF
20707 #define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
20708 _ACEOF
20709
20710
20711         DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c"
20712
20713         DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo"
20714
20715
20716   else
20717
20718         ENABLE_DNSTAP=0
20719
20720
20721
20722   fi
20723
20724
20725 # check for dnscrypt if requested
20726
20727   # Check whether --enable-dnscrypt was given.
20728 if test "${enable_dnscrypt+set}" = set; then :
20729   enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
20730 else
20731   opt_dnscrypt=no
20732 fi
20733
20734
20735   if test "x$opt_dnscrypt" != "xno"; then
20736
20737 # Check whether --with-libsodium was given.
20738 if test "${with_libsodium+set}" = set; then :
20739   withval=$with_libsodium;
20740         CFLAGS="$CFLAGS -I$withval/include"
20741         LDFLAGS="$LDFLAGS -L$withval/lib"
20742
20743 fi
20744
20745     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
20746 $as_echo_n "checking for library containing sodium_init... " >&6; }
20747 if ${ac_cv_search_sodium_init+:} false; then :
20748   $as_echo_n "(cached) " >&6
20749 else
20750   ac_func_search_save_LIBS=$LIBS
20751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20752 /* end confdefs.h.  */
20753
20754 /* Override any GCC internal prototype to avoid an error.
20755    Use char because int might match the return type of a GCC
20756    builtin and then its argument prototype would still apply.  */
20757 #ifdef __cplusplus
20758 extern "C"
20759 #endif
20760 char sodium_init ();
20761 int
20762 main ()
20763 {
20764 return sodium_init ();
20765   ;
20766   return 0;
20767 }
20768 _ACEOF
20769 for ac_lib in '' sodium; do
20770   if test -z "$ac_lib"; then
20771     ac_res="none required"
20772   else
20773     ac_res=-l$ac_lib
20774     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20775   fi
20776   if ac_fn_c_try_link "$LINENO"; then :
20777   ac_cv_search_sodium_init=$ac_res
20778 fi
20779 rm -f core conftest.err conftest.$ac_objext \
20780     conftest$ac_exeext
20781   if ${ac_cv_search_sodium_init+:} false; then :
20782   break
20783 fi
20784 done
20785 if ${ac_cv_search_sodium_init+:} false; then :
20786
20787 else
20788   ac_cv_search_sodium_init=no
20789 fi
20790 rm conftest.$ac_ext
20791 LIBS=$ac_func_search_save_LIBS
20792 fi
20793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
20794 $as_echo "$ac_cv_search_sodium_init" >&6; }
20795 ac_res=$ac_cv_search_sodium_init
20796 if test "$ac_res" != no; then :
20797   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20798
20799 else
20800   as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
20801 fi
20802
20803     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
20804 $as_echo_n "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
20805 if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20806   $as_echo_n "(cached) " >&6
20807 else
20808   ac_func_search_save_LIBS=$LIBS
20809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20810 /* end confdefs.h.  */
20811
20812 /* Override any GCC internal prototype to avoid an error.
20813    Use char because int might match the return type of a GCC
20814    builtin and then its argument prototype would still apply.  */
20815 #ifdef __cplusplus
20816 extern "C"
20817 #endif
20818 char crypto_box_curve25519xchacha20poly1305_beforenm ();
20819 int
20820 main ()
20821 {
20822 return crypto_box_curve25519xchacha20poly1305_beforenm ();
20823   ;
20824   return 0;
20825 }
20826 _ACEOF
20827 for ac_lib in '' sodium; do
20828   if test -z "$ac_lib"; then
20829     ac_res="none required"
20830   else
20831     ac_res=-l$ac_lib
20832     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20833   fi
20834   if ac_fn_c_try_link "$LINENO"; then :
20835   ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
20836 fi
20837 rm -f core conftest.err conftest.$ac_objext \
20838     conftest$ac_exeext
20839   if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20840   break
20841 fi
20842 done
20843 if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20844
20845 else
20846   ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
20847 fi
20848 rm conftest.$ac_ext
20849 LIBS=$ac_func_search_save_LIBS
20850 fi
20851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
20852 $as_echo "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
20853 ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
20854 if test "$ac_res" != no; then :
20855   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20856
20857             ENABLE_DNSCRYPT_XCHACHA20=1
20858
20859
20860 $as_echo "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
20861
20862
20863 else
20864
20865             ENABLE_DNSCRYPT_XCHACHA20=0
20866
20867
20868 fi
20869
20870     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
20871 $as_echo_n "checking for library containing sodium_set_misuse_handler... " >&6; }
20872 if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20873   $as_echo_n "(cached) " >&6
20874 else
20875   ac_func_search_save_LIBS=$LIBS
20876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20877 /* end confdefs.h.  */
20878
20879 /* Override any GCC internal prototype to avoid an error.
20880    Use char because int might match the return type of a GCC
20881    builtin and then its argument prototype would still apply.  */
20882 #ifdef __cplusplus
20883 extern "C"
20884 #endif
20885 char sodium_set_misuse_handler ();
20886 int
20887 main ()
20888 {
20889 return sodium_set_misuse_handler ();
20890   ;
20891   return 0;
20892 }
20893 _ACEOF
20894 for ac_lib in '' sodium; do
20895   if test -z "$ac_lib"; then
20896     ac_res="none required"
20897   else
20898     ac_res=-l$ac_lib
20899     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20900   fi
20901   if ac_fn_c_try_link "$LINENO"; then :
20902   ac_cv_search_sodium_set_misuse_handler=$ac_res
20903 fi
20904 rm -f core conftest.err conftest.$ac_objext \
20905     conftest$ac_exeext
20906   if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20907   break
20908 fi
20909 done
20910 if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20911
20912 else
20913   ac_cv_search_sodium_set_misuse_handler=no
20914 fi
20915 rm conftest.$ac_ext
20916 LIBS=$ac_func_search_save_LIBS
20917 fi
20918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
20919 $as_echo "$ac_cv_search_sodium_set_misuse_handler" >&6; }
20920 ac_res=$ac_cv_search_sodium_set_misuse_handler
20921 if test "$ac_res" != no; then :
20922   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20923
20924
20925 $as_echo "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
20926
20927
20928 fi
20929
20930
20931
20932 $as_echo "#define USE_DNSCRYPT 1" >>confdefs.h
20933
20934         ENABLE_DNSCRYPT=1
20935
20936
20937         DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
20938
20939         DNSCRYPT_OBJ="dnscrypt.lo"
20940
20941
20942   else
20943     ENABLE_DNSCRYPT_XCHACHA20=0
20944
20945
20946         ENABLE_DNSCRYPT=0
20947
20948
20949
20950   fi
20951
20952
20953 # check for cachedb if requested
20954 # Check whether --enable-cachedb was given.
20955 if test "${enable_cachedb+set}" = set; then :
20956   enableval=$enable_cachedb;
20957 fi
20958
20959 # turn on cachedb when hiredis support is enabled.
20960 if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
20961 case "$enable_cachedb" in
20962     yes)
20963
20964 $as_echo "#define USE_CACHEDB 1" >>confdefs.h
20965
20966         ;;
20967     no|*)
20968         # nothing
20969         ;;
20970 esac
20971
20972 # check for ipsecmod if requested
20973 # Check whether --enable-ipsecmod was given.
20974 if test "${enable_ipsecmod+set}" = set; then :
20975   enableval=$enable_ipsecmod;
20976 fi
20977
20978 case "$enable_ipsecmod" in
20979         yes)
20980
20981 $as_echo "#define USE_IPSECMOD 1" >>confdefs.h
20982
20983                 IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
20984
20985                 IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
20986
20987                 ;;
20988         no|*)
20989                 # nothing
20990                 ;;
20991 esac
20992
20993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
20994 $as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
20995 # on openBSD, the implicit rule make $< work.
20996 # on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
20997 # gmake works.
20998 cat >conftest.make <<EOF
20999 all:    conftest.lo
21000
21001 conftest.lo foo.lo bla.lo:
21002         if test -f "\$<"; then touch \$@; fi
21003
21004 .SUFFIXES: .lo
21005 .c.lo:
21006         if test -f "\$<"; then touch \$@; fi
21007
21008 conftest.lo:        conftest.dir/conftest.c
21009 EOF
21010 mkdir conftest.dir
21011 touch conftest.dir/conftest.c
21012 rm -f conftest.lo conftest.c
21013 ${MAKE:-make} -f conftest.make >/dev/null
21014 rm -f conftest.make conftest.c conftest.dir/conftest.c
21015 rm -rf conftest.dir
21016 if test ! -f conftest.lo; then
21017         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21018 $as_echo "no" >&6; }
21019         SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
21020         SOURCEFILE='`cat .source`'
21021 else
21022         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21023 $as_echo "yes" >&6; }
21024         SOURCEDETERMINE=':'
21025         SOURCEFILE='$<'
21026 fi
21027 rm -f conftest.lo
21028
21029
21030
21031 # see if we want to build the library or everything
21032 ALLTARGET="alltargets"
21033 INSTALLTARGET="install-all"
21034
21035 # Check whether --with-libunbound-only was given.
21036 if test "${with_libunbound_only+set}" = set; then :
21037   withval=$with_libunbound_only;
21038         if test "$withval" = "yes"; then
21039                 ALLTARGET="lib"
21040                 INSTALLTARGET="install-lib"
21041         fi
21042
21043 fi
21044
21045 if test $ALLTARGET = "alltargets"; then
21046         if test $USE_NSS = "yes"; then
21047                 as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
21048         fi
21049         if test $USE_NETTLE = "yes"; then
21050                 as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
21051         fi
21052 fi
21053
21054
21055
21056
21057
21058   { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
21059 $as_echo "$as_me: Stripping extension flags..." >&6;}
21060
21061   if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
21062     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
21063
21064 $as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
21065
21066   fi
21067
21068
21069   if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
21070     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
21071
21072 $as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
21073
21074   fi
21075
21076
21077   if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
21078     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
21079
21080 $as_echo "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
21081
21082   fi
21083
21084
21085   if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
21086     CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
21087
21088 $as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
21089
21090   fi
21091
21092
21093   if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
21094     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
21095
21096 $as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
21097
21098   fi
21099
21100
21101   if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
21102     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
21103
21104 $as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
21105
21106   fi
21107
21108
21109   if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
21110     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
21111
21112 $as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
21113
21114   fi
21115
21116
21117   if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
21118     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
21119
21120 $as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
21121
21122   fi
21123
21124
21125   if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
21126     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
21127
21128 $as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
21129
21130   fi
21131
21132
21133 if test -n "$LATE_LDFLAGS"; then
21134   LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
21135 fi
21136 # remove start spaces
21137 LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
21138 LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
21139
21140
21141 cat >>confdefs.h <<_ACEOF
21142 #define MAXSYSLOGMSGLEN 10240
21143 _ACEOF
21144
21145
21146
21147
21148 version=1.8.1
21149
21150 date=`date +'%b %e, %Y'`
21151
21152
21153 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"
21154
21155 ac_config_headers="$ac_config_headers config.h"
21156
21157 cat >confcache <<\_ACEOF
21158 # This file is a shell script that caches the results of configure
21159 # tests run on this system so they can be shared between configure
21160 # scripts and configure runs, see configure's option --config-cache.
21161 # It is not useful on other systems.  If it contains results you don't
21162 # want to keep, you may remove or edit it.
21163 #
21164 # config.status only pays attention to the cache file if you give it
21165 # the --recheck option to rerun configure.
21166 #
21167 # `ac_cv_env_foo' variables (set or unset) will be overridden when
21168 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21169 # following values.
21170
21171 _ACEOF
21172
21173 # The following way of writing the cache mishandles newlines in values,
21174 # but we know of no workaround that is simple, portable, and efficient.
21175 # So, we kill variables containing newlines.
21176 # Ultrix sh set writes to stderr and can't be redirected directly,
21177 # and sets the high bit in the cache file unless we assign to the vars.
21178 (
21179   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21180     eval ac_val=\$$ac_var
21181     case $ac_val in #(
21182     *${as_nl}*)
21183       case $ac_var in #(
21184       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
21185 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
21186       esac
21187       case $ac_var in #(
21188       _ | IFS | as_nl) ;; #(
21189       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
21190       *) { eval $ac_var=; unset $ac_var;} ;;
21191       esac ;;
21192     esac
21193   done
21194
21195   (set) 2>&1 |
21196     case $as_nl`(ac_space=' '; set) 2>&1` in #(
21197     *${as_nl}ac_space=\ *)
21198       # `set' does not quote correctly, so add quotes: double-quote
21199       # substitution turns \\\\ into \\, and sed turns \\ into \.
21200       sed -n \
21201         "s/'/'\\\\''/g;
21202           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21203       ;; #(
21204     *)
21205       # `set' quotes correctly as required by POSIX, so do not add quotes.
21206       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
21207       ;;
21208     esac |
21209     sort
21210 ) |
21211   sed '
21212      /^ac_cv_env_/b end
21213      t clear
21214      :clear
21215      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21216      t end
21217      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21218      :end' >>confcache
21219 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21220   if test -w "$cache_file"; then
21221     if test "x$cache_file" != "x/dev/null"; then
21222       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
21223 $as_echo "$as_me: updating cache $cache_file" >&6;}
21224       if test ! -f "$cache_file" || test -h "$cache_file"; then
21225         cat confcache >"$cache_file"
21226       else
21227         case $cache_file in #(
21228         */* | ?:*)
21229           mv -f confcache "$cache_file"$$ &&
21230           mv -f "$cache_file"$$ "$cache_file" ;; #(
21231         *)
21232           mv -f confcache "$cache_file" ;;
21233         esac
21234       fi
21235     fi
21236   else
21237     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
21238 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21239   fi
21240 fi
21241 rm -f confcache
21242
21243 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21244 # Let make expand exec_prefix.
21245 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21246
21247 DEFS=-DHAVE_CONFIG_H
21248
21249 ac_libobjs=
21250 ac_ltlibobjs=
21251 U=
21252 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21253   # 1. Remove the extension, and $U if already installed.
21254   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21255   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21256   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
21257   #    will be set to the directory where LIBOBJS objects are built.
21258   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21259   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
21260 done
21261 LIBOBJS=$ac_libobjs
21262
21263 LTLIBOBJS=$ac_ltlibobjs
21264
21265
21266 if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
21267   as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
21268 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21269 fi
21270
21271 : "${CONFIG_STATUS=./config.status}"
21272 ac_write_fail=0
21273 ac_clean_files_save=$ac_clean_files
21274 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21275 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
21276 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
21277 as_write_fail=0
21278 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
21279 #! $SHELL
21280 # Generated by $as_me.
21281 # Run this file to recreate the current configuration.
21282 # Compiler output produced by configure, useful for debugging
21283 # configure, is in config.log if it exists.
21284
21285 debug=false
21286 ac_cs_recheck=false
21287 ac_cs_silent=false
21288
21289 SHELL=\${CONFIG_SHELL-$SHELL}
21290 export SHELL
21291 _ASEOF
21292 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
21293 ## -------------------- ##
21294 ## M4sh Initialization. ##
21295 ## -------------------- ##
21296
21297 # Be more Bourne compatible
21298 DUALCASE=1; export DUALCASE # for MKS sh
21299 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
21300   emulate sh
21301   NULLCMD=:
21302   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21303   # is contrary to our usage.  Disable this feature.
21304   alias -g '${1+"$@"}'='"$@"'
21305   setopt NO_GLOB_SUBST
21306 else
21307   case `(set -o) 2>/dev/null` in #(
21308   *posix*) :
21309     set -o posix ;; #(
21310   *) :
21311      ;;
21312 esac
21313 fi
21314
21315
21316 as_nl='
21317 '
21318 export as_nl
21319 # Printing a long string crashes Solaris 7 /usr/bin/printf.
21320 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
21321 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
21322 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
21323 # Prefer a ksh shell builtin over an external printf program on Solaris,
21324 # but without wasting forks for bash or zsh.
21325 if test -z "$BASH_VERSION$ZSH_VERSION" \
21326     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
21327   as_echo='print -r --'
21328   as_echo_n='print -rn --'
21329 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
21330   as_echo='printf %s\n'
21331   as_echo_n='printf %s'
21332 else
21333   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
21334     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
21335     as_echo_n='/usr/ucb/echo -n'
21336   else
21337     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
21338     as_echo_n_body='eval
21339       arg=$1;
21340       case $arg in #(
21341       *"$as_nl"*)
21342         expr "X$arg" : "X\\(.*\\)$as_nl";
21343         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
21344       esac;
21345       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
21346     '
21347     export as_echo_n_body
21348     as_echo_n='sh -c $as_echo_n_body as_echo'
21349   fi
21350   export as_echo_body
21351   as_echo='sh -c $as_echo_body as_echo'
21352 fi
21353
21354 # The user is always right.
21355 if test "${PATH_SEPARATOR+set}" != set; then
21356   PATH_SEPARATOR=:
21357   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
21358     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
21359       PATH_SEPARATOR=';'
21360   }
21361 fi
21362
21363
21364 # IFS
21365 # We need space, tab and new line, in precisely that order.  Quoting is
21366 # there to prevent editors from complaining about space-tab.
21367 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
21368 # splitting by setting IFS to empty value.)
21369 IFS=" ""        $as_nl"
21370
21371 # Find who we are.  Look in the path if we contain no directory separator.
21372 as_myself=
21373 case $0 in #((
21374   *[\\/]* ) as_myself=$0 ;;
21375   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21376 for as_dir in $PATH
21377 do
21378   IFS=$as_save_IFS
21379   test -z "$as_dir" && as_dir=.
21380     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21381   done
21382 IFS=$as_save_IFS
21383
21384      ;;
21385 esac
21386 # We did not find ourselves, most probably we were run as `sh COMMAND'
21387 # in which case we are not to be found in the path.
21388 if test "x$as_myself" = x; then
21389   as_myself=$0
21390 fi
21391 if test ! -f "$as_myself"; then
21392   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
21393   exit 1
21394 fi
21395
21396 # Unset variables that we do not need and which cause bugs (e.g. in
21397 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
21398 # suppresses any "Segmentation fault" message there.  '((' could
21399 # trigger a bug in pdksh 5.2.14.
21400 for as_var in BASH_ENV ENV MAIL MAILPATH
21401 do eval test x\${$as_var+set} = xset \
21402   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
21403 done
21404 PS1='$ '
21405 PS2='> '
21406 PS4='+ '
21407
21408 # NLS nuisances.
21409 LC_ALL=C
21410 export LC_ALL
21411 LANGUAGE=C
21412 export LANGUAGE
21413
21414 # CDPATH.
21415 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21416
21417
21418 # as_fn_error STATUS ERROR [LINENO LOG_FD]
21419 # ----------------------------------------
21420 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
21421 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
21422 # script with STATUS, using 1 if that was 0.
21423 as_fn_error ()
21424 {
21425   as_status=$1; test $as_status -eq 0 && as_status=1
21426   if test "$4"; then
21427     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
21428     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
21429   fi
21430   $as_echo "$as_me: error: $2" >&2
21431   as_fn_exit $as_status
21432 } # as_fn_error
21433
21434
21435 # as_fn_set_status STATUS
21436 # -----------------------
21437 # Set $? to STATUS, without forking.
21438 as_fn_set_status ()
21439 {
21440   return $1
21441 } # as_fn_set_status
21442
21443 # as_fn_exit STATUS
21444 # -----------------
21445 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
21446 as_fn_exit ()
21447 {
21448   set +e
21449   as_fn_set_status $1
21450   exit $1
21451 } # as_fn_exit
21452
21453 # as_fn_unset VAR
21454 # ---------------
21455 # Portably unset VAR.
21456 as_fn_unset ()
21457 {
21458   { eval $1=; unset $1;}
21459 }
21460 as_unset=as_fn_unset
21461 # as_fn_append VAR VALUE
21462 # ----------------------
21463 # Append the text in VALUE to the end of the definition contained in VAR. Take
21464 # advantage of any shell optimizations that allow amortized linear growth over
21465 # repeated appends, instead of the typical quadratic growth present in naive
21466 # implementations.
21467 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
21468   eval 'as_fn_append ()
21469   {
21470     eval $1+=\$2
21471   }'
21472 else
21473   as_fn_append ()
21474   {
21475     eval $1=\$$1\$2
21476   }
21477 fi # as_fn_append
21478
21479 # as_fn_arith ARG...
21480 # ------------------
21481 # Perform arithmetic evaluation on the ARGs, and store the result in the
21482 # global $as_val. Take advantage of shells that can avoid forks. The arguments
21483 # must be portable across $(()) and expr.
21484 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
21485   eval 'as_fn_arith ()
21486   {
21487     as_val=$(( $* ))
21488   }'
21489 else
21490   as_fn_arith ()
21491   {
21492     as_val=`expr "$@" || test $? -eq 1`
21493   }
21494 fi # as_fn_arith
21495
21496
21497 if expr a : '\(a\)' >/dev/null 2>&1 &&
21498    test "X`expr 00001 : '.*\(...\)'`" = X001; then
21499   as_expr=expr
21500 else
21501   as_expr=false
21502 fi
21503
21504 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
21505   as_basename=basename
21506 else
21507   as_basename=false
21508 fi
21509
21510 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
21511   as_dirname=dirname
21512 else
21513   as_dirname=false
21514 fi
21515
21516 as_me=`$as_basename -- "$0" ||
21517 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21518          X"$0" : 'X\(//\)$' \| \
21519          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
21520 $as_echo X/"$0" |
21521     sed '/^.*\/\([^/][^/]*\)\/*$/{
21522             s//\1/
21523             q
21524           }
21525           /^X\/\(\/\/\)$/{
21526             s//\1/
21527             q
21528           }
21529           /^X\/\(\/\).*/{
21530             s//\1/
21531             q
21532           }
21533           s/.*/./; q'`
21534
21535 # Avoid depending upon Character Ranges.
21536 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21537 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21538 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21539 as_cr_digits='0123456789'
21540 as_cr_alnum=$as_cr_Letters$as_cr_digits
21541
21542 ECHO_C= ECHO_N= ECHO_T=
21543 case `echo -n x` in #(((((
21544 -n*)
21545   case `echo 'xy\c'` in
21546   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
21547   xy)  ECHO_C='\c';;
21548   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
21549        ECHO_T=' ';;
21550   esac;;
21551 *)
21552   ECHO_N='-n';;
21553 esac
21554
21555 rm -f conf$$ conf$$.exe conf$$.file
21556 if test -d conf$$.dir; then
21557   rm -f conf$$.dir/conf$$.file
21558 else
21559   rm -f conf$$.dir
21560   mkdir conf$$.dir 2>/dev/null
21561 fi
21562 if (echo >conf$$.file) 2>/dev/null; then
21563   if ln -s conf$$.file conf$$ 2>/dev/null; then
21564     as_ln_s='ln -s'
21565     # ... but there are two gotchas:
21566     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
21567     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
21568     # In both cases, we have to default to `cp -pR'.
21569     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
21570       as_ln_s='cp -pR'
21571   elif ln conf$$.file conf$$ 2>/dev/null; then
21572     as_ln_s=ln
21573   else
21574     as_ln_s='cp -pR'
21575   fi
21576 else
21577   as_ln_s='cp -pR'
21578 fi
21579 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
21580 rmdir conf$$.dir 2>/dev/null
21581
21582
21583 # as_fn_mkdir_p
21584 # -------------
21585 # Create "$as_dir" as a directory, including parents if necessary.
21586 as_fn_mkdir_p ()
21587 {
21588
21589   case $as_dir in #(
21590   -*) as_dir=./$as_dir;;
21591   esac
21592   test -d "$as_dir" || eval $as_mkdir_p || {
21593     as_dirs=
21594     while :; do
21595       case $as_dir in #(
21596       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
21597       *) as_qdir=$as_dir;;
21598       esac
21599       as_dirs="'$as_qdir' $as_dirs"
21600       as_dir=`$as_dirname -- "$as_dir" ||
21601 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21602          X"$as_dir" : 'X\(//\)[^/]' \| \
21603          X"$as_dir" : 'X\(//\)$' \| \
21604          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21605 $as_echo X"$as_dir" |
21606     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21607             s//\1/
21608             q
21609           }
21610           /^X\(\/\/\)[^/].*/{
21611             s//\1/
21612             q
21613           }
21614           /^X\(\/\/\)$/{
21615             s//\1/
21616             q
21617           }
21618           /^X\(\/\).*/{
21619             s//\1/
21620             q
21621           }
21622           s/.*/./; q'`
21623       test -d "$as_dir" && break
21624     done
21625     test -z "$as_dirs" || eval "mkdir $as_dirs"
21626   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
21627
21628
21629 } # as_fn_mkdir_p
21630 if mkdir -p . 2>/dev/null; then
21631   as_mkdir_p='mkdir -p "$as_dir"'
21632 else
21633   test -d ./-p && rmdir ./-p
21634   as_mkdir_p=false
21635 fi
21636
21637
21638 # as_fn_executable_p FILE
21639 # -----------------------
21640 # Test if FILE is an executable regular file.
21641 as_fn_executable_p ()
21642 {
21643   test -f "$1" && test -x "$1"
21644 } # as_fn_executable_p
21645 as_test_x='test -x'
21646 as_executable_p=as_fn_executable_p
21647
21648 # Sed expression to map a string onto a valid CPP name.
21649 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21650
21651 # Sed expression to map a string onto a valid variable name.
21652 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21653
21654
21655 exec 6>&1
21656 ## ----------------------------------- ##
21657 ## Main body of $CONFIG_STATUS script. ##
21658 ## ----------------------------------- ##
21659 _ASEOF
21660 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
21661
21662 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21663 # Save the log message, to keep $0 and so on meaningful, and to
21664 # report actual input values of CONFIG_FILES etc. instead of their
21665 # values after options handling.
21666 ac_log="
21667 This file was extended by unbound $as_me 1.8.1, which was
21668 generated by GNU Autoconf 2.69.  Invocation command line was
21669
21670   CONFIG_FILES    = $CONFIG_FILES
21671   CONFIG_HEADERS  = $CONFIG_HEADERS
21672   CONFIG_LINKS    = $CONFIG_LINKS
21673   CONFIG_COMMANDS = $CONFIG_COMMANDS
21674   $ $0 $@
21675
21676 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21677 "
21678
21679 _ACEOF
21680
21681 case $ac_config_files in *"
21682 "*) set x $ac_config_files; shift; ac_config_files=$*;;
21683 esac
21684
21685 case $ac_config_headers in *"
21686 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
21687 esac
21688
21689
21690 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21691 # Files that config.status was made for.
21692 config_files="$ac_config_files"
21693 config_headers="$ac_config_headers"
21694 config_commands="$ac_config_commands"
21695
21696 _ACEOF
21697
21698 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21699 ac_cs_usage="\
21700 \`$as_me' instantiates files and other configuration actions
21701 from templates according to the current configuration.  Unless the files
21702 and actions are specified as TAGs, all are instantiated by default.
21703
21704 Usage: $0 [OPTION]... [TAG]...
21705
21706   -h, --help       print this help, then exit
21707   -V, --version    print version number and configuration settings, then exit
21708       --config     print configuration, then exit
21709   -q, --quiet, --silent
21710                    do not print progress messages
21711   -d, --debug      don't remove temporary files
21712       --recheck    update $as_me by reconfiguring in the same conditions
21713       --file=FILE[:TEMPLATE]
21714                    instantiate the configuration file FILE
21715       --header=FILE[:TEMPLATE]
21716                    instantiate the configuration header FILE
21717
21718 Configuration files:
21719 $config_files
21720
21721 Configuration headers:
21722 $config_headers
21723
21724 Configuration commands:
21725 $config_commands
21726
21727 Report bugs to <unbound-bugs@nlnetlabs.nl>."
21728
21729 _ACEOF
21730 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21731 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
21732 ac_cs_version="\\
21733 unbound config.status 1.8.1
21734 configured by $0, generated by GNU Autoconf 2.69,
21735   with options \\"\$ac_cs_config\\"
21736
21737 Copyright (C) 2012 Free Software Foundation, Inc.
21738 This config.status script is free software; the Free Software Foundation
21739 gives unlimited permission to copy, distribute and modify it."
21740
21741 ac_pwd='$ac_pwd'
21742 srcdir='$srcdir'
21743 AWK='$AWK'
21744 test -n "\$AWK" || AWK=awk
21745 _ACEOF
21746
21747 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21748 # The default lists apply if the user does not specify any file.
21749 ac_need_defaults=:
21750 while test $# != 0
21751 do
21752   case $1 in
21753   --*=?*)
21754     ac_option=`expr "X$1" : 'X\([^=]*\)='`
21755     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
21756     ac_shift=:
21757     ;;
21758   --*=)
21759     ac_option=`expr "X$1" : 'X\([^=]*\)='`
21760     ac_optarg=
21761     ac_shift=:
21762     ;;
21763   *)
21764     ac_option=$1
21765     ac_optarg=$2
21766     ac_shift=shift
21767     ;;
21768   esac
21769
21770   case $ac_option in
21771   # Handling of the options.
21772   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21773     ac_cs_recheck=: ;;
21774   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
21775     $as_echo "$ac_cs_version"; exit ;;
21776   --config | --confi | --conf | --con | --co | --c )
21777     $as_echo "$ac_cs_config"; exit ;;
21778   --debug | --debu | --deb | --de | --d | -d )
21779     debug=: ;;
21780   --file | --fil | --fi | --f )
21781     $ac_shift
21782     case $ac_optarg in
21783     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21784     '') as_fn_error $? "missing file argument" ;;
21785     esac
21786     as_fn_append CONFIG_FILES " '$ac_optarg'"
21787     ac_need_defaults=false;;
21788   --header | --heade | --head | --hea )
21789     $ac_shift
21790     case $ac_optarg in
21791     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21792     esac
21793     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
21794     ac_need_defaults=false;;
21795   --he | --h)
21796     # Conflict between --help and --header
21797     as_fn_error $? "ambiguous option: \`$1'
21798 Try \`$0 --help' for more information.";;
21799   --help | --hel | -h )
21800     $as_echo "$ac_cs_usage"; exit ;;
21801   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21802   | -silent | --silent | --silen | --sile | --sil | --si | --s)
21803     ac_cs_silent=: ;;
21804
21805   # This is an error.
21806   -*) as_fn_error $? "unrecognized option: \`$1'
21807 Try \`$0 --help' for more information." ;;
21808
21809   *) as_fn_append ac_config_targets " $1"
21810      ac_need_defaults=false ;;
21811
21812   esac
21813   shift
21814 done
21815
21816 ac_configure_extra_args=
21817
21818 if $ac_cs_silent; then
21819   exec 6>/dev/null
21820   ac_configure_extra_args="$ac_configure_extra_args --silent"
21821 fi
21822
21823 _ACEOF
21824 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21825 if \$ac_cs_recheck; then
21826   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21827   shift
21828   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
21829   CONFIG_SHELL='$SHELL'
21830   export CONFIG_SHELL
21831   exec "\$@"
21832 fi
21833
21834 _ACEOF
21835 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21836 exec 5>>config.log
21837 {
21838   echo
21839   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21840 ## Running $as_me. ##
21841 _ASBOX
21842   $as_echo "$ac_log"
21843 } >&5
21844
21845 _ACEOF
21846 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21847 #
21848 # INIT-COMMANDS
21849 #
21850
21851
21852 # The HP-UX ksh and POSIX shell print the target directory to stdout
21853 # if CDPATH is set.
21854 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21855
21856 sed_quote_subst='$sed_quote_subst'
21857 double_quote_subst='$double_quote_subst'
21858 delay_variable_subst='$delay_variable_subst'
21859 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
21860 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
21861 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
21862 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
21863 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
21864 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
21865 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
21866 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
21867 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
21868 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
21869 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
21870 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
21871 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
21872 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
21873 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
21874 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
21875 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
21876 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
21877 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
21878 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
21879 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
21880 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
21881 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
21882 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
21883 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
21884 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
21885 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
21886 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
21887 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
21888 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
21889 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
21890 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
21891 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
21892 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
21893 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
21894 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
21895 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
21896 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
21897 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
21898 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
21899 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
21900 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
21901 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
21902 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
21903 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
21904 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
21905 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
21906 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
21907 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
21908 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
21909 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
21910 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
21911 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
21912 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
21913 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
21914 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
21915 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
21916 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
21917 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"`'
21918 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
21919 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
21920 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
21921 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
21922 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
21923 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
21924 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
21925 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
21926 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
21927 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
21928 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
21929 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
21930 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
21931 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
21932 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
21933 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
21934 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
21935 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
21936 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
21937 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
21938 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
21939 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
21940 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
21941 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
21942 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
21943 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
21944 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
21945 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
21946 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
21947 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
21948 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
21949 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
21950 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
21951 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
21952 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
21953 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
21954 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
21955 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
21956 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
21957 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
21958 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
21959 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
21960 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
21961 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
21962 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
21963 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
21964 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
21965 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
21966 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
21967 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
21968 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
21969 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
21970 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
21971 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
21972 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
21973 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
21974 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
21975 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
21976 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
21977 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
21978 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
21979 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
21980 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
21981 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
21982 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
21983 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
21984 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
21985 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
21986 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
21987 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
21988 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
21989 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
21990 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
21991 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
21992 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
21993 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
21994
21995 LTCC='$LTCC'
21996 LTCFLAGS='$LTCFLAGS'
21997 compiler='$compiler_DEFAULT'
21998
21999 # A function that is used when there is no print builtin or printf.
22000 func_fallback_echo ()
22001 {
22002   eval 'cat <<_LTECHO_EOF
22003 \$1
22004 _LTECHO_EOF'
22005 }
22006
22007 # Quote evaled strings.
22008 for var in SHELL \
22009 ECHO \
22010 PATH_SEPARATOR \
22011 SED \
22012 GREP \
22013 EGREP \
22014 FGREP \
22015 LD \
22016 NM \
22017 LN_S \
22018 lt_SP2NL \
22019 lt_NL2SP \
22020 reload_flag \
22021 OBJDUMP \
22022 deplibs_check_method \
22023 file_magic_cmd \
22024 file_magic_glob \
22025 want_nocaseglob \
22026 DLLTOOL \
22027 sharedlib_from_linklib_cmd \
22028 AR \
22029 AR_FLAGS \
22030 archiver_list_spec \
22031 STRIP \
22032 RANLIB \
22033 CC \
22034 CFLAGS \
22035 compiler \
22036 lt_cv_sys_global_symbol_pipe \
22037 lt_cv_sys_global_symbol_to_cdecl \
22038 lt_cv_sys_global_symbol_to_import \
22039 lt_cv_sys_global_symbol_to_c_name_address \
22040 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
22041 lt_cv_nm_interface \
22042 nm_file_list_spec \
22043 lt_cv_truncate_bin \
22044 lt_prog_compiler_no_builtin_flag \
22045 lt_prog_compiler_pic \
22046 lt_prog_compiler_wl \
22047 lt_prog_compiler_static \
22048 lt_cv_prog_compiler_c_o \
22049 need_locks \
22050 MANIFEST_TOOL \
22051 DSYMUTIL \
22052 NMEDIT \
22053 LIPO \
22054 OTOOL \
22055 OTOOL64 \
22056 shrext_cmds \
22057 export_dynamic_flag_spec \
22058 whole_archive_flag_spec \
22059 compiler_needs_object \
22060 with_gnu_ld \
22061 allow_undefined_flag \
22062 no_undefined_flag \
22063 hardcode_libdir_flag_spec \
22064 hardcode_libdir_separator \
22065 exclude_expsyms \
22066 include_expsyms \
22067 file_list_spec \
22068 variables_saved_for_relink \
22069 libname_spec \
22070 library_names_spec \
22071 soname_spec \
22072 install_override_mode \
22073 finish_eval \
22074 old_striplib \
22075 striplib; do
22076     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22077     *[\\\\\\\`\\"\\\$]*)
22078       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22079       ;;
22080     *)
22081       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22082       ;;
22083     esac
22084 done
22085
22086 # Double-quote double-evaled strings.
22087 for var in reload_cmds \
22088 old_postinstall_cmds \
22089 old_postuninstall_cmds \
22090 old_archive_cmds \
22091 extract_expsyms_cmds \
22092 old_archive_from_new_cmds \
22093 old_archive_from_expsyms_cmds \
22094 archive_cmds \
22095 archive_expsym_cmds \
22096 module_cmds \
22097 module_expsym_cmds \
22098 export_symbols_cmds \
22099 prelink_cmds \
22100 postlink_cmds \
22101 postinstall_cmds \
22102 postuninstall_cmds \
22103 finish_cmds \
22104 sys_lib_search_path_spec \
22105 configure_time_dlsearch_path \
22106 configure_time_lt_sys_library_path; do
22107     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22108     *[\\\\\\\`\\"\\\$]*)
22109       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22110       ;;
22111     *)
22112       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22113       ;;
22114     esac
22115 done
22116
22117 ac_aux_dir='$ac_aux_dir'
22118
22119 # See if we are running on zsh, and set the options that allow our
22120 # commands through without removal of \ escapes INIT.
22121 if test -n "\${ZSH_VERSION+set}"; then
22122    setopt NO_GLOB_SUBST
22123 fi
22124
22125
22126     PACKAGE='$PACKAGE'
22127     VERSION='$VERSION'
22128     RM='$RM'
22129     ofile='$ofile'
22130
22131
22132
22133
22134 _ACEOF
22135
22136 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22137
22138 # Handling of arguments.
22139 for ac_config_target in $ac_config_targets
22140 do
22141   case $ac_config_target in
22142     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
22143     "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
22144     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22145     "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
22146     "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
22147     "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
22148     "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
22149     "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
22150     "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
22151     "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
22152     "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
22153     "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
22154     "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
22155     "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
22156     "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
22157     "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
22158     "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
22159     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
22160
22161   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
22162   esac
22163 done
22164
22165
22166 # If the user did not use the arguments to specify the items to instantiate,
22167 # then the envvar interface is used.  Set only those that are not.
22168 # We use the long form for the default assignment because of an extremely
22169 # bizarre bug on SunOS 4.1.3.
22170 if $ac_need_defaults; then
22171   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22172   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22173   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22174 fi
22175
22176 # Have a temporary directory for convenience.  Make it in the build tree
22177 # simply because there is no reason against having it here, and in addition,
22178 # creating and moving files from /tmp can sometimes cause problems.
22179 # Hook for its removal unless debugging.
22180 # Note that there is a small window in which the directory will not be cleaned:
22181 # after its creation but before its name has been assigned to `$tmp'.
22182 $debug ||
22183 {
22184   tmp= ac_tmp=
22185   trap 'exit_status=$?
22186   : "${ac_tmp:=$tmp}"
22187   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
22188 ' 0
22189   trap 'as_fn_exit 1' 1 2 13 15
22190 }
22191 # Create a (secure) tmp directory for tmp files.
22192
22193 {
22194   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
22195   test -d "$tmp"
22196 }  ||
22197 {
22198   tmp=./conf$$-$RANDOM
22199   (umask 077 && mkdir "$tmp")
22200 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
22201 ac_tmp=$tmp
22202
22203 # Set up the scripts for CONFIG_FILES section.
22204 # No need to generate them if there are no CONFIG_FILES.
22205 # This happens for instance with `./config.status config.h'.
22206 if test -n "$CONFIG_FILES"; then
22207
22208
22209 ac_cr=`echo X | tr X '\015'`
22210 # On cygwin, bash can eat \r inside `` if the user requested igncr.
22211 # But we know of no other shell where ac_cr would be empty at this
22212 # point, so we can use a bashism as a fallback.
22213 if test "x$ac_cr" = x; then
22214   eval ac_cr=\$\'\\r\'
22215 fi
22216 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
22217 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
22218   ac_cs_awk_cr='\\r'
22219 else
22220   ac_cs_awk_cr=$ac_cr
22221 fi
22222
22223 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
22224 _ACEOF
22225
22226
22227 {
22228   echo "cat >conf$$subs.awk <<_ACEOF" &&
22229   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
22230   echo "_ACEOF"
22231 } >conf$$subs.sh ||
22232   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22233 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
22234 ac_delim='%!_!# '
22235 for ac_last_try in false false false false false :; do
22236   . ./conf$$subs.sh ||
22237     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22238
22239   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
22240   if test $ac_delim_n = $ac_delim_num; then
22241     break
22242   elif $ac_last_try; then
22243     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22244   else
22245     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22246   fi
22247 done
22248 rm -f conf$$subs.sh
22249
22250 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22251 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
22252 _ACEOF
22253 sed -n '
22254 h
22255 s/^/S["/; s/!.*/"]=/
22256 p
22257 g
22258 s/^[^!]*!//
22259 :repl
22260 t repl
22261 s/'"$ac_delim"'$//
22262 t delim
22263 :nl
22264 h
22265 s/\(.\{148\}\)..*/\1/
22266 t more1
22267 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
22268 p
22269 n
22270 b repl
22271 :more1
22272 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22273 p
22274 g
22275 s/.\{148\}//
22276 t nl
22277 :delim
22278 h
22279 s/\(.\{148\}\)..*/\1/
22280 t more2
22281 s/["\\]/\\&/g; s/^/"/; s/$/"/
22282 p
22283 b
22284 :more2
22285 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22286 p
22287 g
22288 s/.\{148\}//
22289 t delim
22290 ' <conf$$subs.awk | sed '
22291 /^[^""]/{
22292   N
22293   s/\n//
22294 }
22295 ' >>$CONFIG_STATUS || ac_write_fail=1
22296 rm -f conf$$subs.awk
22297 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22298 _ACAWK
22299 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
22300   for (key in S) S_is_set[key] = 1
22301   FS = "\a"
22302
22303 }
22304 {
22305   line = $ 0
22306   nfields = split(line, field, "@")
22307   substed = 0
22308   len = length(field[1])
22309   for (i = 2; i < nfields; i++) {
22310     key = field[i]
22311     keylen = length(key)
22312     if (S_is_set[key]) {
22313       value = S[key]
22314       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
22315       len += length(value) + length(field[++i])
22316       substed = 1
22317     } else
22318       len += 1 + keylen
22319   }
22320
22321   print line
22322 }
22323
22324 _ACAWK
22325 _ACEOF
22326 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22327 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22328   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
22329 else
22330   cat
22331 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
22332   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
22333 _ACEOF
22334
22335 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
22336 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
22337 # trailing colons and then remove the whole line if VPATH becomes empty
22338 # (actually we leave an empty line to preserve line numbers).
22339 if test "x$srcdir" = x.; then
22340   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
22341 h
22342 s///
22343 s/^/:/
22344 s/[      ]*$/:/
22345 s/:\$(srcdir):/:/g
22346 s/:\${srcdir}:/:/g
22347 s/:@srcdir@:/:/g
22348 s/^:*//
22349 s/:*$//
22350 x
22351 s/\(=[   ]*\).*/\1/
22352 G
22353 s/\n//
22354 s/^[^=]*=[       ]*$//
22355 }'
22356 fi
22357
22358 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22359 fi # test -n "$CONFIG_FILES"
22360
22361 # Set up the scripts for CONFIG_HEADERS section.
22362 # No need to generate them if there are no CONFIG_HEADERS.
22363 # This happens for instance with `./config.status Makefile'.
22364 if test -n "$CONFIG_HEADERS"; then
22365 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
22366 BEGIN {
22367 _ACEOF
22368
22369 # Transform confdefs.h into an awk script `defines.awk', embedded as
22370 # here-document in config.status, that substitutes the proper values into
22371 # config.h.in to produce config.h.
22372
22373 # Create a delimiter string that does not exist in confdefs.h, to ease
22374 # handling of long lines.
22375 ac_delim='%!_!# '
22376 for ac_last_try in false false :; do
22377   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
22378   if test -z "$ac_tt"; then
22379     break
22380   elif $ac_last_try; then
22381     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
22382   else
22383     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22384   fi
22385 done
22386
22387 # For the awk script, D is an array of macro values keyed by name,
22388 # likewise P contains macro parameters if any.  Preserve backslash
22389 # newline sequences.
22390
22391 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
22392 sed -n '
22393 s/.\{148\}/&'"$ac_delim"'/g
22394 t rset
22395 :rset
22396 s/^[     ]*#[    ]*define[       ][      ]*/ /
22397 t def
22398 d
22399 :def
22400 s/\\$//
22401 t bsnl
22402 s/["\\]/\\&/g
22403 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22404 D["\1"]=" \3"/p
22405 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
22406 d
22407 :bsnl
22408 s/["\\]/\\&/g
22409 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22410 D["\1"]=" \3\\\\\\n"\\/p
22411 t cont
22412 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
22413 t cont
22414 d
22415 :cont
22416 n
22417 s/.\{148\}/&'"$ac_delim"'/g
22418 t clear
22419 :clear
22420 s/\\$//
22421 t bsnlc
22422 s/["\\]/\\&/g; s/^/"/; s/$/"/p
22423 d
22424 :bsnlc
22425 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
22426 b cont
22427 ' <confdefs.h | sed '
22428 s/'"$ac_delim"'/"\\\
22429 "/g' >>$CONFIG_STATUS || ac_write_fail=1
22430
22431 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22432   for (key in D) D_is_set[key] = 1
22433   FS = "\a"
22434 }
22435 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
22436   line = \$ 0
22437   split(line, arg, " ")
22438   if (arg[1] == "#") {
22439     defundef = arg[2]
22440     mac1 = arg[3]
22441   } else {
22442     defundef = substr(arg[1], 2)
22443     mac1 = arg[2]
22444   }
22445   split(mac1, mac2, "(") #)
22446   macro = mac2[1]
22447   prefix = substr(line, 1, index(line, defundef) - 1)
22448   if (D_is_set[macro]) {
22449     # Preserve the white space surrounding the "#".
22450     print prefix "define", macro P[macro] D[macro]
22451     next
22452   } else {
22453     # Replace #undef with comments.  This is necessary, for example,
22454     # in the case of _POSIX_SOURCE, which is predefined and required
22455     # on some systems where configure will not decide to define it.
22456     if (defundef == "undef") {
22457       print "/*", prefix defundef, macro, "*/"
22458       next
22459     }
22460   }
22461 }
22462 { print }
22463 _ACAWK
22464 _ACEOF
22465 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22466   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
22467 fi # test -n "$CONFIG_HEADERS"
22468
22469
22470 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
22471 shift
22472 for ac_tag
22473 do
22474   case $ac_tag in
22475   :[FHLC]) ac_mode=$ac_tag; continue;;
22476   esac
22477   case $ac_mode$ac_tag in
22478   :[FHL]*:*);;
22479   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
22480   :[FH]-) ac_tag=-:-;;
22481   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22482   esac
22483   ac_save_IFS=$IFS
22484   IFS=:
22485   set x $ac_tag
22486   IFS=$ac_save_IFS
22487   shift
22488   ac_file=$1
22489   shift
22490
22491   case $ac_mode in
22492   :L) ac_source=$1;;
22493   :[FH])
22494     ac_file_inputs=
22495     for ac_f
22496     do
22497       case $ac_f in
22498       -) ac_f="$ac_tmp/stdin";;
22499       *) # Look for the file first in the build tree, then in the source tree
22500          # (if the path is not absolute).  The absolute path cannot be DOS-style,
22501          # because $ac_f cannot contain `:'.
22502          test -f "$ac_f" ||
22503            case $ac_f in
22504            [\\/$]*) false;;
22505            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22506            esac ||
22507            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
22508       esac
22509       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
22510       as_fn_append ac_file_inputs " '$ac_f'"
22511     done
22512
22513     # Let's still pretend it is `configure' which instantiates (i.e., don't
22514     # use $as_me), people would be surprised to read:
22515     #    /* config.h.  Generated by config.status.  */
22516     configure_input='Generated from '`
22517           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
22518         `' by configure.'
22519     if test x"$ac_file" != x-; then
22520       configure_input="$ac_file.  $configure_input"
22521       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
22522 $as_echo "$as_me: creating $ac_file" >&6;}
22523     fi
22524     # Neutralize special characters interpreted by sed in replacement strings.
22525     case $configure_input in #(
22526     *\&* | *\|* | *\\* )
22527        ac_sed_conf_input=`$as_echo "$configure_input" |
22528        sed 's/[\\\\&|]/\\\\&/g'`;; #(
22529     *) ac_sed_conf_input=$configure_input;;
22530     esac
22531
22532     case $ac_tag in
22533     *:-:* | *:-) cat >"$ac_tmp/stdin" \
22534       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
22535     esac
22536     ;;
22537   esac
22538
22539   ac_dir=`$as_dirname -- "$ac_file" ||
22540 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22541          X"$ac_file" : 'X\(//\)[^/]' \| \
22542          X"$ac_file" : 'X\(//\)$' \| \
22543          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
22544 $as_echo X"$ac_file" |
22545     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22546             s//\1/
22547             q
22548           }
22549           /^X\(\/\/\)[^/].*/{
22550             s//\1/
22551             q
22552           }
22553           /^X\(\/\/\)$/{
22554             s//\1/
22555             q
22556           }
22557           /^X\(\/\).*/{
22558             s//\1/
22559             q
22560           }
22561           s/.*/./; q'`
22562   as_dir="$ac_dir"; as_fn_mkdir_p
22563   ac_builddir=.
22564
22565 case "$ac_dir" in
22566 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
22567 *)
22568   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
22569   # A ".." for each directory in $ac_dir_suffix.
22570   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
22571   case $ac_top_builddir_sub in
22572   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
22573   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
22574   esac ;;
22575 esac
22576 ac_abs_top_builddir=$ac_pwd
22577 ac_abs_builddir=$ac_pwd$ac_dir_suffix
22578 # for backward compatibility:
22579 ac_top_builddir=$ac_top_build_prefix
22580
22581 case $srcdir in
22582   .)  # We are building in place.
22583     ac_srcdir=.
22584     ac_top_srcdir=$ac_top_builddir_sub
22585     ac_abs_top_srcdir=$ac_pwd ;;
22586   [\\/]* | ?:[\\/]* )  # Absolute name.
22587     ac_srcdir=$srcdir$ac_dir_suffix;
22588     ac_top_srcdir=$srcdir
22589     ac_abs_top_srcdir=$srcdir ;;
22590   *) # Relative name.
22591     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
22592     ac_top_srcdir=$ac_top_build_prefix$srcdir
22593     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
22594 esac
22595 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
22596
22597
22598   case $ac_mode in
22599   :F)
22600   #
22601   # CONFIG_FILE
22602   #
22603
22604 _ACEOF
22605
22606 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22607 # If the template does not know about datarootdir, expand it.
22608 # FIXME: This hack should be removed a few years after 2.60.
22609 ac_datarootdir_hack=; ac_datarootdir_seen=
22610 ac_sed_dataroot='
22611 /datarootdir/ {
22612   p
22613   q
22614 }
22615 /@datadir@/p
22616 /@docdir@/p
22617 /@infodir@/p
22618 /@localedir@/p
22619 /@mandir@/p'
22620 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
22621 *datarootdir*) ac_datarootdir_seen=yes;;
22622 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
22623   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
22624 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
22625 _ACEOF
22626 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22627   ac_datarootdir_hack='
22628   s&@datadir@&$datadir&g
22629   s&@docdir@&$docdir&g
22630   s&@infodir@&$infodir&g
22631   s&@localedir@&$localedir&g
22632   s&@mandir@&$mandir&g
22633   s&\\\${datarootdir}&$datarootdir&g' ;;
22634 esac
22635 _ACEOF
22636
22637 # Neutralize VPATH when `$srcdir' = `.'.
22638 # Shell code in configure.ac might set extrasub.
22639 # FIXME: do we really want to maintain this feature?
22640 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22641 ac_sed_extra="$ac_vpsub
22642 $extrasub
22643 _ACEOF
22644 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22645 :t
22646 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22647 s|@configure_input@|$ac_sed_conf_input|;t t
22648 s&@top_builddir@&$ac_top_builddir_sub&;t t
22649 s&@top_build_prefix@&$ac_top_build_prefix&;t t
22650 s&@srcdir@&$ac_srcdir&;t t
22651 s&@abs_srcdir@&$ac_abs_srcdir&;t t
22652 s&@top_srcdir@&$ac_top_srcdir&;t t
22653 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
22654 s&@builddir@&$ac_builddir&;t t
22655 s&@abs_builddir@&$ac_abs_builddir&;t t
22656 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
22657 $ac_datarootdir_hack
22658 "
22659 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
22660   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22661
22662 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
22663   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
22664   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
22665       "$ac_tmp/out"`; test -z "$ac_out"; } &&
22666   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22667 which seems to be undefined.  Please make sure it is defined" >&5
22668 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22669 which seems to be undefined.  Please make sure it is defined" >&2;}
22670
22671   rm -f "$ac_tmp/stdin"
22672   case $ac_file in
22673   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
22674   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
22675   esac \
22676   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22677  ;;
22678   :H)
22679   #
22680   # CONFIG_HEADER
22681   #
22682   if test x"$ac_file" != x-; then
22683     {
22684       $as_echo "/* $configure_input  */" \
22685       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
22686     } >"$ac_tmp/config.h" \
22687       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22688     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
22689       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
22690 $as_echo "$as_me: $ac_file is unchanged" >&6;}
22691     else
22692       rm -f "$ac_file"
22693       mv "$ac_tmp/config.h" "$ac_file" \
22694         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22695     fi
22696   else
22697     $as_echo "/* $configure_input  */" \
22698       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
22699       || as_fn_error $? "could not create -" "$LINENO" 5
22700   fi
22701  ;;
22702
22703   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
22704 $as_echo "$as_me: executing $ac_file commands" >&6;}
22705  ;;
22706   esac
22707
22708
22709   case $ac_file$ac_mode in
22710     "libtool":C)
22711
22712     # See if we are running on zsh, and set the options that allow our
22713     # commands through without removal of \ escapes.
22714     if test -n "${ZSH_VERSION+set}"; then
22715       setopt NO_GLOB_SUBST
22716     fi
22717
22718     cfgfile=${ofile}T
22719     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
22720     $RM "$cfgfile"
22721
22722     cat <<_LT_EOF >> "$cfgfile"
22723 #! $SHELL
22724 # Generated automatically by $as_me ($PACKAGE) $VERSION
22725 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22726 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
22727
22728 # Provide generalized library-building support services.
22729 # Written by Gordon Matzigkeit, 1996
22730
22731 # Copyright (C) 2014 Free Software Foundation, Inc.
22732 # This is free software; see the source for copying conditions.  There is NO
22733 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22734
22735 # GNU Libtool is free software; you can redistribute it and/or modify
22736 # it under the terms of the GNU General Public License as published by
22737 # the Free Software Foundation; either version 2 of of the License, or
22738 # (at your option) any later version.
22739 #
22740 # As a special exception to the GNU General Public License, if you
22741 # distribute this file as part of a program or library that is built
22742 # using GNU Libtool, you may include this file under the  same
22743 # distribution terms that you use for the rest of that program.
22744 #
22745 # GNU Libtool is distributed in the hope that it will be useful, but
22746 # WITHOUT ANY WARRANTY; without even the implied warranty of
22747 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22748 # GNU General Public License for more details.
22749 #
22750 # You should have received a copy of the GNU General Public License
22751 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22752
22753
22754 # The names of the tagged configurations supported by this script.
22755 available_tags=''
22756
22757 # Configured defaults for sys_lib_dlsearch_path munging.
22758 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
22759
22760 # ### BEGIN LIBTOOL CONFIG
22761
22762 # Which release of libtool.m4 was used?
22763 macro_version=$macro_version
22764 macro_revision=$macro_revision
22765
22766 # Whether or not to build shared libraries.
22767 build_libtool_libs=$enable_shared
22768
22769 # Whether or not to build static libraries.
22770 build_old_libs=$enable_static
22771
22772 # What type of objects to build.
22773 pic_mode=$pic_mode
22774
22775 # Whether or not to optimize for fast installation.
22776 fast_install=$enable_fast_install
22777
22778 # Shared archive member basename,for filename based shared library versioning on AIX.
22779 shared_archive_member_spec=$shared_archive_member_spec
22780
22781 # Shell to use when invoking shell scripts.
22782 SHELL=$lt_SHELL
22783
22784 # An echo program that protects backslashes.
22785 ECHO=$lt_ECHO
22786
22787 # The PATH separator for the build system.
22788 PATH_SEPARATOR=$lt_PATH_SEPARATOR
22789
22790 # The host system.
22791 host_alias=$host_alias
22792 host=$host
22793 host_os=$host_os
22794
22795 # The build system.
22796 build_alias=$build_alias
22797 build=$build
22798 build_os=$build_os
22799
22800 # A sed program that does not truncate output.
22801 SED=$lt_SED
22802
22803 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
22804 Xsed="\$SED -e 1s/^X//"
22805
22806 # A grep program that handles long lines.
22807 GREP=$lt_GREP
22808
22809 # An ERE matcher.
22810 EGREP=$lt_EGREP
22811
22812 # A literal string matcher.
22813 FGREP=$lt_FGREP
22814
22815 # A BSD- or MS-compatible name lister.
22816 NM=$lt_NM
22817
22818 # Whether we need soft or hard links.
22819 LN_S=$lt_LN_S
22820
22821 # What is the maximum length of a command?
22822 max_cmd_len=$max_cmd_len
22823
22824 # Object file suffix (normally "o").
22825 objext=$ac_objext
22826
22827 # Executable file suffix (normally "").
22828 exeext=$exeext
22829
22830 # whether the shell understands "unset".
22831 lt_unset=$lt_unset
22832
22833 # turn spaces into newlines.
22834 SP2NL=$lt_lt_SP2NL
22835
22836 # turn newlines into spaces.
22837 NL2SP=$lt_lt_NL2SP
22838
22839 # convert \$build file names to \$host format.
22840 to_host_file_cmd=$lt_cv_to_host_file_cmd
22841
22842 # convert \$build files to toolchain format.
22843 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
22844
22845 # An object symbol dumper.
22846 OBJDUMP=$lt_OBJDUMP
22847
22848 # Method to check whether dependent libraries are shared objects.
22849 deplibs_check_method=$lt_deplibs_check_method
22850
22851 # Command to use when deplibs_check_method = "file_magic".
22852 file_magic_cmd=$lt_file_magic_cmd
22853
22854 # How to find potential files when deplibs_check_method = "file_magic".
22855 file_magic_glob=$lt_file_magic_glob
22856
22857 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
22858 want_nocaseglob=$lt_want_nocaseglob
22859
22860 # DLL creation program.
22861 DLLTOOL=$lt_DLLTOOL
22862
22863 # Command to associate shared and link libraries.
22864 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
22865
22866 # The archiver.
22867 AR=$lt_AR
22868
22869 # Flags to create an archive.
22870 AR_FLAGS=$lt_AR_FLAGS
22871
22872 # How to feed a file listing to the archiver.
22873 archiver_list_spec=$lt_archiver_list_spec
22874
22875 # A symbol stripping program.
22876 STRIP=$lt_STRIP
22877
22878 # Commands used to install an old-style archive.
22879 RANLIB=$lt_RANLIB
22880 old_postinstall_cmds=$lt_old_postinstall_cmds
22881 old_postuninstall_cmds=$lt_old_postuninstall_cmds
22882
22883 # Whether to use a lock for old archive extraction.
22884 lock_old_archive_extraction=$lock_old_archive_extraction
22885
22886 # A C compiler.
22887 LTCC=$lt_CC
22888
22889 # LTCC compiler flags.
22890 LTCFLAGS=$lt_CFLAGS
22891
22892 # Take the output of nm and produce a listing of raw symbols and C names.
22893 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
22894
22895 # Transform the output of nm in a proper C declaration.
22896 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
22897
22898 # Transform the output of nm into a list of symbols to manually relocate.
22899 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
22900
22901 # Transform the output of nm in a C name address pair.
22902 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
22903
22904 # Transform the output of nm in a C name address pair when lib prefix is needed.
22905 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
22906
22907 # The name lister interface.
22908 nm_interface=$lt_lt_cv_nm_interface
22909
22910 # Specify filename containing input files for \$NM.
22911 nm_file_list_spec=$lt_nm_file_list_spec
22912
22913 # The root where to search for dependent libraries,and where our libraries should be installed.
22914 lt_sysroot=$lt_sysroot
22915
22916 # Command to truncate a binary pipe.
22917 lt_truncate_bin=$lt_lt_cv_truncate_bin
22918
22919 # The name of the directory that contains temporary libtool files.
22920 objdir=$objdir
22921
22922 # Used to examine libraries when file_magic_cmd begins with "file".
22923 MAGIC_CMD=$MAGIC_CMD
22924
22925 # Must we lock files when doing compilation?
22926 need_locks=$lt_need_locks
22927
22928 # Manifest tool.
22929 MANIFEST_TOOL=$lt_MANIFEST_TOOL
22930
22931 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
22932 DSYMUTIL=$lt_DSYMUTIL
22933
22934 # Tool to change global to local symbols on Mac OS X.
22935 NMEDIT=$lt_NMEDIT
22936
22937 # Tool to manipulate fat objects and archives on Mac OS X.
22938 LIPO=$lt_LIPO
22939
22940 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
22941 OTOOL=$lt_OTOOL
22942
22943 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
22944 OTOOL64=$lt_OTOOL64
22945
22946 # Old archive suffix (normally "a").
22947 libext=$libext
22948
22949 # Shared library suffix (normally ".so").
22950 shrext_cmds=$lt_shrext_cmds
22951
22952 # The commands to extract the exported symbol list from a shared archive.
22953 extract_expsyms_cmds=$lt_extract_expsyms_cmds
22954
22955 # Variables whose values should be saved in libtool wrapper scripts and
22956 # restored at link time.
22957 variables_saved_for_relink=$lt_variables_saved_for_relink
22958
22959 # Do we need the "lib" prefix for modules?
22960 need_lib_prefix=$need_lib_prefix
22961
22962 # Do we need a version for libraries?
22963 need_version=$need_version
22964
22965 # Library versioning type.
22966 version_type=$version_type
22967
22968 # Shared library runtime path variable.
22969 runpath_var=$runpath_var
22970
22971 # Shared library path variable.
22972 shlibpath_var=$shlibpath_var
22973
22974 # Is shlibpath searched before the hard-coded library search path?
22975 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
22976
22977 # Format of library name prefix.
22978 libname_spec=$lt_libname_spec
22979
22980 # List of archive names.  First name is the real one, the rest are links.
22981 # The last name is the one that the linker finds with -lNAME
22982 library_names_spec=$lt_library_names_spec
22983
22984 # The coded name of the library, if different from the real name.
22985 soname_spec=$lt_soname_spec
22986
22987 # Permission mode override for installation of shared libraries.
22988 install_override_mode=$lt_install_override_mode
22989
22990 # Command to use after installation of a shared archive.
22991 postinstall_cmds=$lt_postinstall_cmds
22992
22993 # Command to use after uninstallation of a shared archive.
22994 postuninstall_cmds=$lt_postuninstall_cmds
22995
22996 # Commands used to finish a libtool library installation in a directory.
22997 finish_cmds=$lt_finish_cmds
22998
22999 # As "finish_cmds", except a single script fragment to be evaled but
23000 # not shown.
23001 finish_eval=$lt_finish_eval
23002
23003 # Whether we should hardcode library paths into libraries.
23004 hardcode_into_libs=$hardcode_into_libs
23005
23006 # Compile-time system search path for libraries.
23007 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
23008
23009 # Detected run-time system search path for libraries.
23010 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
23011
23012 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
23013 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
23014
23015 # Whether dlopen is supported.
23016 dlopen_support=$enable_dlopen
23017
23018 # Whether dlopen of programs is supported.
23019 dlopen_self=$enable_dlopen_self
23020
23021 # Whether dlopen of statically linked programs is supported.
23022 dlopen_self_static=$enable_dlopen_self_static
23023
23024 # Commands to strip libraries.
23025 old_striplib=$lt_old_striplib
23026 striplib=$lt_striplib
23027
23028
23029 # The linker used to build libraries.
23030 LD=$lt_LD
23031
23032 # How to create reloadable object files.
23033 reload_flag=$lt_reload_flag
23034 reload_cmds=$lt_reload_cmds
23035
23036 # Commands used to build an old-style archive.
23037 old_archive_cmds=$lt_old_archive_cmds
23038
23039 # A language specific compiler.
23040 CC=$lt_compiler
23041
23042 # Is the compiler the GNU compiler?
23043 with_gcc=$GCC
23044
23045 # Compiler flag to turn off builtin functions.
23046 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
23047
23048 # Additional compiler flags for building library objects.
23049 pic_flag=$lt_lt_prog_compiler_pic
23050
23051 # How to pass a linker flag through the compiler.
23052 wl=$lt_lt_prog_compiler_wl
23053
23054 # Compiler flag to prevent dynamic linking.
23055 link_static_flag=$lt_lt_prog_compiler_static
23056
23057 # Does compiler simultaneously support -c and -o options?
23058 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
23059
23060 # Whether or not to add -lc for building shared libraries.
23061 build_libtool_need_lc=$archive_cmds_need_lc
23062
23063 # Whether or not to disallow shared libs when runtime libs are static.
23064 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
23065
23066 # Compiler flag to allow reflexive dlopens.
23067 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
23068
23069 # Compiler flag to generate shared objects directly from archives.
23070 whole_archive_flag_spec=$lt_whole_archive_flag_spec
23071
23072 # Whether the compiler copes with passing no objects directly.
23073 compiler_needs_object=$lt_compiler_needs_object
23074
23075 # Create an old-style archive from a shared archive.
23076 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
23077
23078 # Create a temporary old-style archive to link instead of a shared archive.
23079 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
23080
23081 # Commands used to build a shared archive.
23082 archive_cmds=$lt_archive_cmds
23083 archive_expsym_cmds=$lt_archive_expsym_cmds
23084
23085 # Commands used to build a loadable module if different from building
23086 # a shared archive.
23087 module_cmds=$lt_module_cmds
23088 module_expsym_cmds=$lt_module_expsym_cmds
23089
23090 # Whether we are building with GNU ld or not.
23091 with_gnu_ld=$lt_with_gnu_ld
23092
23093 # Flag that allows shared libraries with undefined symbols to be built.
23094 allow_undefined_flag=$lt_allow_undefined_flag
23095
23096 # Flag that enforces no undefined symbols.
23097 no_undefined_flag=$lt_no_undefined_flag
23098
23099 # Flag to hardcode \$libdir into a binary during linking.
23100 # This must work even if \$libdir does not exist
23101 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
23102
23103 # Whether we need a single "-rpath" flag with a separated argument.
23104 hardcode_libdir_separator=$lt_hardcode_libdir_separator
23105
23106 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23107 # DIR into the resulting binary.
23108 hardcode_direct=$hardcode_direct
23109
23110 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23111 # DIR into the resulting binary and the resulting library dependency is
23112 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
23113 # library is relocated.
23114 hardcode_direct_absolute=$hardcode_direct_absolute
23115
23116 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
23117 # into the resulting binary.
23118 hardcode_minus_L=$hardcode_minus_L
23119
23120 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
23121 # into the resulting binary.
23122 hardcode_shlibpath_var=$hardcode_shlibpath_var
23123
23124 # Set to "yes" if building a shared library automatically hardcodes DIR
23125 # into the library and all subsequent libraries and executables linked
23126 # against it.
23127 hardcode_automatic=$hardcode_automatic
23128
23129 # Set to yes if linker adds runtime paths of dependent libraries
23130 # to runtime path list.
23131 inherit_rpath=$inherit_rpath
23132
23133 # Whether libtool must link a program against all its dependency libraries.
23134 link_all_deplibs=$link_all_deplibs
23135
23136 # Set to "yes" if exported symbols are required.
23137 always_export_symbols=$always_export_symbols
23138
23139 # The commands to list exported symbols.
23140 export_symbols_cmds=$lt_export_symbols_cmds
23141
23142 # Symbols that should not be listed in the preloaded symbols.
23143 exclude_expsyms=$lt_exclude_expsyms
23144
23145 # Symbols that must always be exported.
23146 include_expsyms=$lt_include_expsyms
23147
23148 # Commands necessary for linking programs (against libraries) with templates.
23149 prelink_cmds=$lt_prelink_cmds
23150
23151 # Commands necessary for finishing linking programs.
23152 postlink_cmds=$lt_postlink_cmds
23153
23154 # Specify filename containing input files.
23155 file_list_spec=$lt_file_list_spec
23156
23157 # How to hardcode a shared library path into an executable.
23158 hardcode_action=$hardcode_action
23159
23160 # ### END LIBTOOL CONFIG
23161
23162 _LT_EOF
23163
23164     cat <<'_LT_EOF' >> "$cfgfile"
23165
23166 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
23167
23168 # func_munge_path_list VARIABLE PATH
23169 # -----------------------------------
23170 # VARIABLE is name of variable containing _space_ separated list of
23171 # directories to be munged by the contents of PATH, which is string
23172 # having a format:
23173 # "DIR[:DIR]:"
23174 #       string "DIR[ DIR]" will be prepended to VARIABLE
23175 # ":DIR[:DIR]"
23176 #       string "DIR[ DIR]" will be appended to VARIABLE
23177 # "DIRP[:DIRP]::[DIRA:]DIRA"
23178 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
23179 #       "DIRA[ DIRA]" will be appended to VARIABLE
23180 # "DIR[:DIR]"
23181 #       VARIABLE will be replaced by "DIR[ DIR]"
23182 func_munge_path_list ()
23183 {
23184     case x$2 in
23185     x)
23186         ;;
23187     *:)
23188         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
23189         ;;
23190     x:*)
23191         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
23192         ;;
23193     *::*)
23194         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
23195         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
23196         ;;
23197     *)
23198         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
23199         ;;
23200     esac
23201 }
23202
23203
23204 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
23205 func_cc_basename ()
23206 {
23207     for cc_temp in $*""; do
23208       case $cc_temp in
23209         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
23210         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
23211         \-*) ;;
23212         *) break;;
23213       esac
23214     done
23215     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
23216 }
23217
23218
23219 # ### END FUNCTIONS SHARED WITH CONFIGURE
23220
23221 _LT_EOF
23222
23223   case $host_os in
23224   aix3*)
23225     cat <<\_LT_EOF >> "$cfgfile"
23226 # AIX sometimes has problems with the GCC collect2 program.  For some
23227 # reason, if we set the COLLECT_NAMES environment variable, the problems
23228 # vanish in a puff of smoke.
23229 if test set != "${COLLECT_NAMES+set}"; then
23230   COLLECT_NAMES=
23231   export COLLECT_NAMES
23232 fi
23233 _LT_EOF
23234     ;;
23235   esac
23236
23237
23238 ltmain=$ac_aux_dir/ltmain.sh
23239
23240
23241   # We use sed instead of cat because bash on DJGPP gets confused if
23242   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
23243   # text mode, it properly converts lines to CR/LF.  This bash problem
23244   # is reportedly fixed, but why not run on old versions too?
23245   sed '$q' "$ltmain" >> "$cfgfile" \
23246      || (rm -f "$cfgfile"; exit 1)
23247
23248    mv -f "$cfgfile" "$ofile" ||
23249     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
23250   chmod +x "$ofile"
23251
23252  ;;
23253     "disable-rpath":C)
23254         sed < libtool > libtool-2 \
23255         's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
23256         mv libtool-2 libtool
23257         chmod 755 libtool
23258         libtool="./libtool"
23259          ;;
23260
23261   esac
23262 done # for ac_tag
23263
23264
23265 as_fn_exit 0
23266 _ACEOF
23267 ac_clean_files=$ac_clean_files_save
23268
23269 test $ac_write_fail = 0 ||
23270   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
23271
23272
23273 # configure is writing to config.log, and then calls config.status.
23274 # config.status does its own redirection, appending to config.log.
23275 # Unfortunately, on DOS this fails, as config.log is still kept open
23276 # by configure, so config.status won't be able to write to it; its
23277 # output is simply discarded.  So we exec the FD to /dev/null,
23278 # effectively closing config.log, so it can be properly (re)opened and
23279 # appended to by config.status.  When coming back to configure, we
23280 # need to make the FD available again.
23281 if test "$no_create" != yes; then
23282   ac_cs_success=:
23283   ac_config_status_args=
23284   test "$silent" = yes &&
23285     ac_config_status_args="$ac_config_status_args --quiet"
23286   exec 5>/dev/null
23287   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23288   exec 5>>config.log
23289   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23290   # would make configure fail if this is the last instruction.
23291   $ac_cs_success || as_fn_exit 1
23292 fi
23293 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
23294   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
23295 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
23296 fi
23297