]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - configure
Vendor import of Unbound 1.6.2.
[FreeBSD/FreeBSD.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for unbound 1.6.2.
4 #
5 # Report bugs to <unbound-bugs@nlnetlabs.nl>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
16
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20   emulate sh
21   NULLCMD=:
22   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23   # is contrary to our usage.  Disable this feature.
24   alias -g '${1+"$@"}'='"$@"'
25   setopt NO_GLOB_SUBST
26 else
27   case `(set -o) 2>/dev/null` in #(
28   *posix*) :
29     set -o posix ;; #(
30   *) :
31      ;;
32 esac
33 fi
34
35
36 as_nl='
37 '
38 export as_nl
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47   as_echo='print -r --'
48   as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50   as_echo='printf %s\n'
51   as_echo_n='printf %s'
52 else
53   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55     as_echo_n='/usr/ucb/echo -n'
56   else
57     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58     as_echo_n_body='eval
59       arg=$1;
60       case $arg in #(
61       *"$as_nl"*)
62         expr "X$arg" : "X\\(.*\\)$as_nl";
63         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64       esac;
65       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66     '
67     export as_echo_n_body
68     as_echo_n='sh -c $as_echo_n_body as_echo'
69   fi
70   export as_echo_body
71   as_echo='sh -c $as_echo_body as_echo'
72 fi
73
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
76   PATH_SEPARATOR=:
77   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79       PATH_SEPARATOR=';'
80   }
81 fi
82
83
84 # IFS
85 # We need space, tab and new line, in precisely that order.  Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
89 IFS=" ""        $as_nl"
90
91 # Find who we are.  Look in the path if we contain no directory separator.
92 as_myself=
93 case $0 in #((
94   *[\\/]* ) as_myself=$0 ;;
95   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96 for as_dir in $PATH
97 do
98   IFS=$as_save_IFS
99   test -z "$as_dir" && as_dir=.
100     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101   done
102 IFS=$as_save_IFS
103
104      ;;
105 esac
106 # We did not find ourselves, most probably we were run as `sh COMMAND'
107 # in which case we are not to be found in the path.
108 if test "x$as_myself" = x; then
109   as_myself=$0
110 fi
111 if test ! -f "$as_myself"; then
112   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113   exit 1
114 fi
115
116 # Unset variables that we do not need and which cause bugs (e.g. in
117 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118 # suppresses any "Segmentation fault" message there.  '((' could
119 # trigger a bug in pdksh 5.2.14.
120 for as_var in BASH_ENV ENV MAIL MAILPATH
121 do eval test x\${$as_var+set} = xset \
122   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123 done
124 PS1='$ '
125 PS2='> '
126 PS4='+ '
127
128 # NLS nuisances.
129 LC_ALL=C
130 export LC_ALL
131 LANGUAGE=C
132 export LANGUAGE
133
134 # CDPATH.
135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137 # Use a proper internal environment variable to ensure we don't fall
138   # into an infinite loop, continuously re-executing ourselves.
139   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140     _as_can_reexec=no; export _as_can_reexec;
141     # We cannot yet assume a decent shell, so we have to provide a
142 # neutralization value for shells without unset; and this also
143 # works around shells that cannot unset nonexistent variables.
144 # Preserve -v and -x to the replacement shell.
145 BASH_ENV=/dev/null
146 ENV=/dev/null
147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148 case $- in # ((((
149   *v*x* | *x*v* ) as_opts=-vx ;;
150   *v* ) as_opts=-v ;;
151   *x* ) as_opts=-x ;;
152   * ) as_opts= ;;
153 esac
154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155 # Admittedly, this is quite paranoid, since all the known shells bail
156 # out after a failed `exec'.
157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158 as_fn_exit 255
159   fi
160   # We don't want this to propagate to other subprocesses.
161           { _as_can_reexec=; unset _as_can_reexec;}
162 if test "x$CONFIG_SHELL" = x; then
163   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164   emulate sh
165   NULLCMD=:
166   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167   # is contrary to our usage.  Disable this feature.
168   alias -g '\${1+\"\$@\"}'='\"\$@\"'
169   setopt NO_GLOB_SUBST
170 else
171   case \`(set -o) 2>/dev/null\` in #(
172   *posix*) :
173     set -o posix ;; #(
174   *) :
175      ;;
176 esac
177 fi
178 "
179   as_required="as_fn_return () { (exit \$1); }
180 as_fn_success () { as_fn_return 0; }
181 as_fn_failure () { as_fn_return 1; }
182 as_fn_ret_success () { return 0; }
183 as_fn_ret_failure () { return 1; }
184
185 exitcode=0
186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192 else
193   exitcode=1; echo positional parameters were not saved.
194 fi
195 test x\$exitcode = x0 || exit 1
196 test -x / || exit 1"
197   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201 test \$(( 1 + 1 )) = 2 || exit 1
202
203   test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
204     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
205     ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
206     ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
207     PATH=/empty FPATH=/empty; export PATH FPATH
208     test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
209       || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
210   if (eval "$as_required") 2>/dev/null; then :
211   as_have_required=yes
212 else
213   as_have_required=no
214 fi
215   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
216
217 else
218   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
219 as_found=false
220 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
221 do
222   IFS=$as_save_IFS
223   test -z "$as_dir" && as_dir=.
224   as_found=:
225   case $as_dir in #(
226          /*)
227            for as_base in sh bash ksh sh5; do
228              # Try only shells that exist, to save several forks.
229              as_shell=$as_dir/$as_base
230              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
231                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
232   CONFIG_SHELL=$as_shell as_have_required=yes
233                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
234   break 2
235 fi
236 fi
237            done;;
238        esac
239   as_found=false
240 done
241 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
242               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
243   CONFIG_SHELL=$SHELL as_have_required=yes
244 fi; }
245 IFS=$as_save_IFS
246
247
248       if test "x$CONFIG_SHELL" != x; then :
249   export CONFIG_SHELL
250              # We cannot yet assume a decent shell, so we have to provide a
251 # neutralization value for shells without unset; and this also
252 # works around shells that cannot unset nonexistent variables.
253 # Preserve -v and -x to the replacement shell.
254 BASH_ENV=/dev/null
255 ENV=/dev/null
256 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
257 case $- in # ((((
258   *v*x* | *x*v* ) as_opts=-vx ;;
259   *v* ) as_opts=-v ;;
260   *x* ) as_opts=-x ;;
261   * ) as_opts= ;;
262 esac
263 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
264 # Admittedly, this is quite paranoid, since all the known shells bail
265 # out after a failed `exec'.
266 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
267 exit 255
268 fi
269
270     if test x$as_have_required = xno; then :
271   $as_echo "$0: This script requires a shell more modern than all"
272   $as_echo "$0: the shells that I found on your system."
273   if test x${ZSH_VERSION+set} = xset ; then
274     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
275     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
276   else
277     $as_echo "$0: Please tell bug-autoconf@gnu.org and
278 $0: unbound-bugs@nlnetlabs.nl about your system, including
279 $0: any error possibly output before this message. Then
280 $0: install a modern shell, or manually run the script
281 $0: under such a shell if you do have one."
282   fi
283   exit 1
284 fi
285 fi
286 fi
287 SHELL=${CONFIG_SHELL-/bin/sh}
288 export SHELL
289 # Unset more variables known to interfere with behavior of common tools.
290 CLICOLOR_FORCE= GREP_OPTIONS=
291 unset CLICOLOR_FORCE GREP_OPTIONS
292
293 ## --------------------- ##
294 ## M4sh Shell Functions. ##
295 ## --------------------- ##
296 # as_fn_unset VAR
297 # ---------------
298 # Portably unset VAR.
299 as_fn_unset ()
300 {
301   { eval $1=; unset $1;}
302 }
303 as_unset=as_fn_unset
304
305 # as_fn_set_status STATUS
306 # -----------------------
307 # Set $? to STATUS, without forking.
308 as_fn_set_status ()
309 {
310   return $1
311 } # as_fn_set_status
312
313 # as_fn_exit STATUS
314 # -----------------
315 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
316 as_fn_exit ()
317 {
318   set +e
319   as_fn_set_status $1
320   exit $1
321 } # as_fn_exit
322
323 # as_fn_mkdir_p
324 # -------------
325 # Create "$as_dir" as a directory, including parents if necessary.
326 as_fn_mkdir_p ()
327 {
328
329   case $as_dir in #(
330   -*) as_dir=./$as_dir;;
331   esac
332   test -d "$as_dir" || eval $as_mkdir_p || {
333     as_dirs=
334     while :; do
335       case $as_dir in #(
336       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
337       *) as_qdir=$as_dir;;
338       esac
339       as_dirs="'$as_qdir' $as_dirs"
340       as_dir=`$as_dirname -- "$as_dir" ||
341 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
342          X"$as_dir" : 'X\(//\)[^/]' \| \
343          X"$as_dir" : 'X\(//\)$' \| \
344          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
345 $as_echo X"$as_dir" |
346     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
347             s//\1/
348             q
349           }
350           /^X\(\/\/\)[^/].*/{
351             s//\1/
352             q
353           }
354           /^X\(\/\/\)$/{
355             s//\1/
356             q
357           }
358           /^X\(\/\).*/{
359             s//\1/
360             q
361           }
362           s/.*/./; q'`
363       test -d "$as_dir" && break
364     done
365     test -z "$as_dirs" || eval "mkdir $as_dirs"
366   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
367
368
369 } # as_fn_mkdir_p
370
371 # as_fn_executable_p FILE
372 # -----------------------
373 # Test if FILE is an executable regular file.
374 as_fn_executable_p ()
375 {
376   test -f "$1" && test -x "$1"
377 } # as_fn_executable_p
378 # as_fn_append VAR VALUE
379 # ----------------------
380 # Append the text in VALUE to the end of the definition contained in VAR. Take
381 # advantage of any shell optimizations that allow amortized linear growth over
382 # repeated appends, instead of the typical quadratic growth present in naive
383 # implementations.
384 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
385   eval 'as_fn_append ()
386   {
387     eval $1+=\$2
388   }'
389 else
390   as_fn_append ()
391   {
392     eval $1=\$$1\$2
393   }
394 fi # as_fn_append
395
396 # as_fn_arith ARG...
397 # ------------------
398 # Perform arithmetic evaluation on the ARGs, and store the result in the
399 # global $as_val. Take advantage of shells that can avoid forks. The arguments
400 # must be portable across $(()) and expr.
401 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
402   eval 'as_fn_arith ()
403   {
404     as_val=$(( $* ))
405   }'
406 else
407   as_fn_arith ()
408   {
409     as_val=`expr "$@" || test $? -eq 1`
410   }
411 fi # as_fn_arith
412
413
414 # as_fn_error STATUS ERROR [LINENO LOG_FD]
415 # ----------------------------------------
416 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
417 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
418 # script with STATUS, using 1 if that was 0.
419 as_fn_error ()
420 {
421   as_status=$1; test $as_status -eq 0 && as_status=1
422   if test "$4"; then
423     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
424     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
425   fi
426   $as_echo "$as_me: error: $2" >&2
427   as_fn_exit $as_status
428 } # as_fn_error
429
430 if expr a : '\(a\)' >/dev/null 2>&1 &&
431    test "X`expr 00001 : '.*\(...\)'`" = X001; then
432   as_expr=expr
433 else
434   as_expr=false
435 fi
436
437 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
438   as_basename=basename
439 else
440   as_basename=false
441 fi
442
443 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
444   as_dirname=dirname
445 else
446   as_dirname=false
447 fi
448
449 as_me=`$as_basename -- "$0" ||
450 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
451          X"$0" : 'X\(//\)$' \| \
452          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
453 $as_echo X/"$0" |
454     sed '/^.*\/\([^/][^/]*\)\/*$/{
455             s//\1/
456             q
457           }
458           /^X\/\(\/\/\)$/{
459             s//\1/
460             q
461           }
462           /^X\/\(\/\).*/{
463             s//\1/
464             q
465           }
466           s/.*/./; q'`
467
468 # Avoid depending upon Character Ranges.
469 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
470 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
471 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
472 as_cr_digits='0123456789'
473 as_cr_alnum=$as_cr_Letters$as_cr_digits
474
475
476   as_lineno_1=$LINENO as_lineno_1a=$LINENO
477   as_lineno_2=$LINENO as_lineno_2a=$LINENO
478   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
479   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
480   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
481   sed -n '
482     p
483     /[$]LINENO/=
484   ' <$as_myself |
485     sed '
486       s/[$]LINENO.*/&-/
487       t lineno
488       b
489       :lineno
490       N
491       :loop
492       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
493       t loop
494       s/-\n.*//
495     ' >$as_me.lineno &&
496   chmod +x "$as_me.lineno" ||
497     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
498
499   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
500   # already done that, so ensure we don't try to do so again and fall
501   # in an infinite loop.  This has already happened in practice.
502   _as_can_reexec=no; export _as_can_reexec
503   # Don't try to exec as it changes $[0], causing all sort of problems
504   # (the dirname of $[0] is not the place where we might find the
505   # original and so on.  Autoconf is especially sensitive to this).
506   . "./$as_me.lineno"
507   # Exit status is that of the last command.
508   exit
509 }
510
511 ECHO_C= ECHO_N= ECHO_T=
512 case `echo -n x` in #(((((
513 -n*)
514   case `echo 'xy\c'` in
515   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
516   xy)  ECHO_C='\c';;
517   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
518        ECHO_T=' ';;
519   esac;;
520 *)
521   ECHO_N='-n';;
522 esac
523
524 rm -f conf$$ conf$$.exe conf$$.file
525 if test -d conf$$.dir; then
526   rm -f conf$$.dir/conf$$.file
527 else
528   rm -f conf$$.dir
529   mkdir conf$$.dir 2>/dev/null
530 fi
531 if (echo >conf$$.file) 2>/dev/null; then
532   if ln -s conf$$.file conf$$ 2>/dev/null; then
533     as_ln_s='ln -s'
534     # ... but there are two gotchas:
535     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
536     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
537     # In both cases, we have to default to `cp -pR'.
538     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
539       as_ln_s='cp -pR'
540   elif ln conf$$.file conf$$ 2>/dev/null; then
541     as_ln_s=ln
542   else
543     as_ln_s='cp -pR'
544   fi
545 else
546   as_ln_s='cp -pR'
547 fi
548 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
549 rmdir conf$$.dir 2>/dev/null
550
551 if mkdir -p . 2>/dev/null; then
552   as_mkdir_p='mkdir -p "$as_dir"'
553 else
554   test -d ./-p && rmdir ./-p
555   as_mkdir_p=false
556 fi
557
558 as_test_x='test -x'
559 as_executable_p=as_fn_executable_p
560
561 # Sed expression to map a string onto a valid CPP name.
562 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
563
564 # Sed expression to map a string onto a valid variable name.
565 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
566
567 SHELL=${CONFIG_SHELL-/bin/sh}
568
569
570 test -n "$DJDIR" || exec 7<&0 </dev/null
571 exec 6>&1
572
573 # Name of the host.
574 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
575 # so uname gets run too.
576 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
577
578 #
579 # Initializations.
580 #
581 ac_default_prefix=/usr/local
582 ac_clean_files=
583 ac_config_libobj_dir=.
584 LIBOBJS=
585 cross_compiling=no
586 subdirs=
587 MFLAGS=
588 MAKEFLAGS=
589
590 # Identity of this package.
591 PACKAGE_NAME='unbound'
592 PACKAGE_TARNAME='unbound'
593 PACKAGE_VERSION='1.6.2'
594 PACKAGE_STRING='unbound 1.6.2'
595 PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl'
596 PACKAGE_URL=''
597
598 # Factoring default headers for most tests.
599 ac_includes_default="\
600 #include <stdio.h>
601 #ifdef HAVE_SYS_TYPES_H
602 # include <sys/types.h>
603 #endif
604 #ifdef HAVE_SYS_STAT_H
605 # include <sys/stat.h>
606 #endif
607 #ifdef STDC_HEADERS
608 # include <stdlib.h>
609 # include <stddef.h>
610 #else
611 # ifdef HAVE_STDLIB_H
612 #  include <stdlib.h>
613 # endif
614 #endif
615 #ifdef HAVE_STRING_H
616 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
617 #  include <memory.h>
618 # endif
619 # include <string.h>
620 #endif
621 #ifdef HAVE_STRINGS_H
622 # include <strings.h>
623 #endif
624 #ifdef HAVE_INTTYPES_H
625 # include <inttypes.h>
626 #endif
627 #ifdef HAVE_STDINT_H
628 # include <stdint.h>
629 #endif
630 #ifdef HAVE_UNISTD_H
631 # include <unistd.h>
632 #endif"
633
634 ac_subst_vars='LTLIBOBJS
635 date
636 version
637 INSTALLTARGET
638 ALLTARGET
639 SOURCEFILE
640 SOURCEDETERMINE
641 DNSCRYPT_OBJ
642 DNSCRYPT_SRC
643 ENABLE_DNSCRYPT
644 DNSTAP_OBJ
645 DNSTAP_SRC
646 opt_dnstap_socket_path
647 ENABLE_DNSTAP
648 PROTOC_C
649 UBSYMS
650 EXTRALINK
651 COMMON_OBJ_ALL_SYMBOLS
652 LIBOBJ_WITHOUT_CTIME
653 LIBOBJ_WITHOUT_CTIMEARC4
654 WIN_CHECKCONF_OBJ_LINK
655 WIN_CONTROL_OBJ_LINK
656 WIN_UBANCHOR_OBJ_LINK
657 WIN_HOST_OBJ_LINK
658 WIN_DAEMON_OBJ_LINK
659 WIN_DAEMON_OBJ
660 WIN_DAEMON_SRC
661 WINAPPS
662 WINDRES
663 CHECKLOCK_OBJ
664 USE_SYSTEMD_FALSE
665 USE_SYSTEMD_TRUE
666 SYSTEMD_DAEMON_LIBS
667 SYSTEMD_DAEMON_CFLAGS
668 SYSTEMD_LIBS
669 SYSTEMD_CFLAGS
670 PKG_CONFIG_LIBDIR
671 PKG_CONFIG_PATH
672 PKG_CONFIG
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 PY_MAJOR_VERSION
698 PYTHON_SITE_PKG
699 PYTHON_LDFLAGS
700 PYTHON_CPPFLAGS
701 PYTHON
702 PYTHON_VERSION
703 PTHREAD_CFLAGS_ONLY
704 PTHREAD_CFLAGS
705 PTHREAD_LIBS
706 PTHREAD_CC
707 ax_pthread_config
708 RUNTIME_PATH
709 LIBOBJS
710 LT_SYS_LIBRARY_PATH
711 OTOOL64
712 OTOOL
713 LIPO
714 NMEDIT
715 DSYMUTIL
716 MANIFEST_TOOL
717 AWK
718 RANLIB
719 ac_ct_AR
720 DLLTOOL
721 OBJDUMP
722 LN_S
723 NM
724 ac_ct_DUMPBIN
725 DUMPBIN
726 LD
727 FGREP
728 SED
729 LIBTOOL
730 AR
731 host_os
732 host_vendor
733 host_cpu
734 host
735 build_os
736 build_vendor
737 build_cpu
738 build
739 libtool
740 STRIP
741 doxygen
742 YFLAGS
743 YACC
744 LEXLIB
745 LEX_OUTPUT_ROOT
746 LEX
747 debug_enabled
748 DEPFLAG
749 UNBOUND_USERNAME
750 UNBOUND_ROOTCERT_FILE
751 UNBOUND_ROOTKEY_FILE
752 UNBOUND_PIDFILE
753 UNBOUND_SHARE_DIR
754 UNBOUND_CHROOT_DIR
755 UNBOUND_RUN_DIR
756 ub_conf_dir
757 ub_conf_file
758 EGREP
759 GREP
760 CPP
761 OBJEXT
762 EXEEXT
763 ac_ct_CC
764 CPPFLAGS
765 LDFLAGS
766 CFLAGS
767 CC
768 LIBUNBOUND_AGE
769 LIBUNBOUND_REVISION
770 LIBUNBOUND_CURRENT
771 UNBOUND_VERSION_MICRO
772 UNBOUND_VERSION_MINOR
773 UNBOUND_VERSION_MAJOR
774 target_alias
775 host_alias
776 build_alias
777 LIBS
778 ECHO_T
779 ECHO_N
780 ECHO_C
781 DEFS
782 mandir
783 localedir
784 libdir
785 psdir
786 pdfdir
787 dvidir
788 htmldir
789 infodir
790 docdir
791 oldincludedir
792 includedir
793 localstatedir
794 sharedstatedir
795 sysconfdir
796 datadir
797 datarootdir
798 libexecdir
799 sbindir
800 bindir
801 program_transform_name
802 prefix
803 exec_prefix
804 PACKAGE_URL
805 PACKAGE_BUGREPORT
806 PACKAGE_STRING
807 PACKAGE_VERSION
808 PACKAGE_TARNAME
809 PACKAGE_NAME
810 PATH_SEPARATOR
811 SHELL'
812 ac_subst_files=''
813 ac_user_opts='
814 enable_option_checking
815 with_conf_file
816 with_run_dir
817 with_chroot_dir
818 with_share_dir
819 with_pidfile
820 with_rootkey_file
821 with_rootcert_file
822 with_username
823 enable_checking
824 enable_debug
825 enable_flto
826 enable_pie
827 enable_relro_now
828 enable_shared
829 enable_static
830 with_pic
831 enable_fast_install
832 with_aix_soname
833 with_gnu_ld
834 with_sysroot
835 enable_libtool_lock
836 enable_rpath
837 enable_largefile
838 enable_alloc_checks
839 enable_alloc_lite
840 enable_alloc_nonregional
841 with_pthreads
842 with_solaris_threads
843 with_pyunbound
844 with_pythonmodule
845 with_nss
846 with_nettle
847 with_ssl
848 enable_sha1
849 enable_sha2
850 enable_subnet
851 enable_gost
852 enable_ecdsa
853 enable_dsa
854 enable_event_api
855 enable_tfo_client
856 enable_tfo_server
857 with_libevent
858 with_libexpat
859 enable_static_exe
860 enable_systemd
861 enable_lock_checks
862 enable_allsymbols
863 enable_dnstap
864 with_dnstap_socket_path
865 with_protobuf_c
866 with_libfstrm
867 enable_dnscrypt
868 with_libsodium
869 enable_cachedb
870 with_libunbound_only
871 '
872       ac_precious_vars='build_alias
873 host_alias
874 target_alias
875 CC
876 CFLAGS
877 LDFLAGS
878 LIBS
879 CPPFLAGS
880 CPP
881 YACC
882 YFLAGS
883 LT_SYS_LIBRARY_PATH
884 PYTHON_VERSION
885 PKG_CONFIG
886 PKG_CONFIG_PATH
887 PKG_CONFIG_LIBDIR
888 SYSTEMD_CFLAGS
889 SYSTEMD_LIBS
890 SYSTEMD_DAEMON_CFLAGS
891 SYSTEMD_DAEMON_LIBS'
892
893
894 # Initialize some variables set by options.
895 ac_init_help=
896 ac_init_version=false
897 ac_unrecognized_opts=
898 ac_unrecognized_sep=
899 # The variables have the same names as the options, with
900 # dashes changed to underlines.
901 cache_file=/dev/null
902 exec_prefix=NONE
903 no_create=
904 no_recursion=
905 prefix=NONE
906 program_prefix=NONE
907 program_suffix=NONE
908 program_transform_name=s,x,x,
909 silent=
910 site=
911 srcdir=
912 verbose=
913 x_includes=NONE
914 x_libraries=NONE
915
916 # Installation directory options.
917 # These are left unexpanded so users can "make install exec_prefix=/foo"
918 # and all the variables that are supposed to be based on exec_prefix
919 # by default will actually change.
920 # Use braces instead of parens because sh, perl, etc. also accept them.
921 # (The list follows the same order as the GNU Coding Standards.)
922 bindir='${exec_prefix}/bin'
923 sbindir='${exec_prefix}/sbin'
924 libexecdir='${exec_prefix}/libexec'
925 datarootdir='${prefix}/share'
926 datadir='${datarootdir}'
927 sysconfdir='${prefix}/etc'
928 sharedstatedir='${prefix}/com'
929 localstatedir='${prefix}/var'
930 includedir='${prefix}/include'
931 oldincludedir='/usr/include'
932 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
933 infodir='${datarootdir}/info'
934 htmldir='${docdir}'
935 dvidir='${docdir}'
936 pdfdir='${docdir}'
937 psdir='${docdir}'
938 libdir='${exec_prefix}/lib'
939 localedir='${datarootdir}/locale'
940 mandir='${datarootdir}/man'
941
942 ac_prev=
943 ac_dashdash=
944 for ac_option
945 do
946   # If the previous option needs an argument, assign it.
947   if test -n "$ac_prev"; then
948     eval $ac_prev=\$ac_option
949     ac_prev=
950     continue
951   fi
952
953   case $ac_option in
954   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
955   *=)   ac_optarg= ;;
956   *)    ac_optarg=yes ;;
957   esac
958
959   # Accept the important Cygnus configure options, so we can diagnose typos.
960
961   case $ac_dashdash$ac_option in
962   --)
963     ac_dashdash=yes ;;
964
965   -bindir | --bindir | --bindi | --bind | --bin | --bi)
966     ac_prev=bindir ;;
967   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
968     bindir=$ac_optarg ;;
969
970   -build | --build | --buil | --bui | --bu)
971     ac_prev=build_alias ;;
972   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
973     build_alias=$ac_optarg ;;
974
975   -cache-file | --cache-file | --cache-fil | --cache-fi \
976   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
977     ac_prev=cache_file ;;
978   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
979   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
980     cache_file=$ac_optarg ;;
981
982   --config-cache | -C)
983     cache_file=config.cache ;;
984
985   -datadir | --datadir | --datadi | --datad)
986     ac_prev=datadir ;;
987   -datadir=* | --datadir=* | --datadi=* | --datad=*)
988     datadir=$ac_optarg ;;
989
990   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
991   | --dataroo | --dataro | --datar)
992     ac_prev=datarootdir ;;
993   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
994   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
995     datarootdir=$ac_optarg ;;
996
997   -disable-* | --disable-*)
998     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
999     # Reject names that are not valid shell variable names.
1000     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1001       as_fn_error $? "invalid feature name: $ac_useropt"
1002     ac_useropt_orig=$ac_useropt
1003     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1004     case $ac_user_opts in
1005       *"
1006 "enable_$ac_useropt"
1007 "*) ;;
1008       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1009          ac_unrecognized_sep=', ';;
1010     esac
1011     eval enable_$ac_useropt=no ;;
1012
1013   -docdir | --docdir | --docdi | --doc | --do)
1014     ac_prev=docdir ;;
1015   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1016     docdir=$ac_optarg ;;
1017
1018   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1019     ac_prev=dvidir ;;
1020   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1021     dvidir=$ac_optarg ;;
1022
1023   -enable-* | --enable-*)
1024     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1025     # Reject names that are not valid shell variable names.
1026     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1027       as_fn_error $? "invalid feature name: $ac_useropt"
1028     ac_useropt_orig=$ac_useropt
1029     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1030     case $ac_user_opts in
1031       *"
1032 "enable_$ac_useropt"
1033 "*) ;;
1034       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1035          ac_unrecognized_sep=', ';;
1036     esac
1037     eval enable_$ac_useropt=\$ac_optarg ;;
1038
1039   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1040   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1041   | --exec | --exe | --ex)
1042     ac_prev=exec_prefix ;;
1043   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1044   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1045   | --exec=* | --exe=* | --ex=*)
1046     exec_prefix=$ac_optarg ;;
1047
1048   -gas | --gas | --ga | --g)
1049     # Obsolete; use --with-gas.
1050     with_gas=yes ;;
1051
1052   -help | --help | --hel | --he | -h)
1053     ac_init_help=long ;;
1054   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1055     ac_init_help=recursive ;;
1056   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1057     ac_init_help=short ;;
1058
1059   -host | --host | --hos | --ho)
1060     ac_prev=host_alias ;;
1061   -host=* | --host=* | --hos=* | --ho=*)
1062     host_alias=$ac_optarg ;;
1063
1064   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1065     ac_prev=htmldir ;;
1066   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1067   | --ht=*)
1068     htmldir=$ac_optarg ;;
1069
1070   -includedir | --includedir | --includedi | --included | --include \
1071   | --includ | --inclu | --incl | --inc)
1072     ac_prev=includedir ;;
1073   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1074   | --includ=* | --inclu=* | --incl=* | --inc=*)
1075     includedir=$ac_optarg ;;
1076
1077   -infodir | --infodir | --infodi | --infod | --info | --inf)
1078     ac_prev=infodir ;;
1079   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1080     infodir=$ac_optarg ;;
1081
1082   -libdir | --libdir | --libdi | --libd)
1083     ac_prev=libdir ;;
1084   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1085     libdir=$ac_optarg ;;
1086
1087   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1088   | --libexe | --libex | --libe)
1089     ac_prev=libexecdir ;;
1090   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1091   | --libexe=* | --libex=* | --libe=*)
1092     libexecdir=$ac_optarg ;;
1093
1094   -localedir | --localedir | --localedi | --localed | --locale)
1095     ac_prev=localedir ;;
1096   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1097     localedir=$ac_optarg ;;
1098
1099   -localstatedir | --localstatedir | --localstatedi | --localstated \
1100   | --localstate | --localstat | --localsta | --localst | --locals)
1101     ac_prev=localstatedir ;;
1102   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1103   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1104     localstatedir=$ac_optarg ;;
1105
1106   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1107     ac_prev=mandir ;;
1108   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1109     mandir=$ac_optarg ;;
1110
1111   -nfp | --nfp | --nf)
1112     # Obsolete; use --without-fp.
1113     with_fp=no ;;
1114
1115   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1116   | --no-cr | --no-c | -n)
1117     no_create=yes ;;
1118
1119   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1120   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1121     no_recursion=yes ;;
1122
1123   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1124   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1125   | --oldin | --oldi | --old | --ol | --o)
1126     ac_prev=oldincludedir ;;
1127   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1128   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1129   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1130     oldincludedir=$ac_optarg ;;
1131
1132   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1133     ac_prev=prefix ;;
1134   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1135     prefix=$ac_optarg ;;
1136
1137   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1138   | --program-pre | --program-pr | --program-p)
1139     ac_prev=program_prefix ;;
1140   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1141   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1142     program_prefix=$ac_optarg ;;
1143
1144   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1145   | --program-suf | --program-su | --program-s)
1146     ac_prev=program_suffix ;;
1147   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1148   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1149     program_suffix=$ac_optarg ;;
1150
1151   -program-transform-name | --program-transform-name \
1152   | --program-transform-nam | --program-transform-na \
1153   | --program-transform-n | --program-transform- \
1154   | --program-transform | --program-transfor \
1155   | --program-transfo | --program-transf \
1156   | --program-trans | --program-tran \
1157   | --progr-tra | --program-tr | --program-t)
1158     ac_prev=program_transform_name ;;
1159   -program-transform-name=* | --program-transform-name=* \
1160   | --program-transform-nam=* | --program-transform-na=* \
1161   | --program-transform-n=* | --program-transform-=* \
1162   | --program-transform=* | --program-transfor=* \
1163   | --program-transfo=* | --program-transf=* \
1164   | --program-trans=* | --program-tran=* \
1165   | --progr-tra=* | --program-tr=* | --program-t=*)
1166     program_transform_name=$ac_optarg ;;
1167
1168   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1169     ac_prev=pdfdir ;;
1170   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1171     pdfdir=$ac_optarg ;;
1172
1173   -psdir | --psdir | --psdi | --psd | --ps)
1174     ac_prev=psdir ;;
1175   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1176     psdir=$ac_optarg ;;
1177
1178   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1179   | -silent | --silent | --silen | --sile | --sil)
1180     silent=yes ;;
1181
1182   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1183     ac_prev=sbindir ;;
1184   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1185   | --sbi=* | --sb=*)
1186     sbindir=$ac_optarg ;;
1187
1188   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1189   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1190   | --sharedst | --shareds | --shared | --share | --shar \
1191   | --sha | --sh)
1192     ac_prev=sharedstatedir ;;
1193   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1194   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1195   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1196   | --sha=* | --sh=*)
1197     sharedstatedir=$ac_optarg ;;
1198
1199   -site | --site | --sit)
1200     ac_prev=site ;;
1201   -site=* | --site=* | --sit=*)
1202     site=$ac_optarg ;;
1203
1204   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1205     ac_prev=srcdir ;;
1206   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1207     srcdir=$ac_optarg ;;
1208
1209   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1210   | --syscon | --sysco | --sysc | --sys | --sy)
1211     ac_prev=sysconfdir ;;
1212   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1213   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1214     sysconfdir=$ac_optarg ;;
1215
1216   -target | --target | --targe | --targ | --tar | --ta | --t)
1217     ac_prev=target_alias ;;
1218   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1219     target_alias=$ac_optarg ;;
1220
1221   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1222     verbose=yes ;;
1223
1224   -version | --version | --versio | --versi | --vers | -V)
1225     ac_init_version=: ;;
1226
1227   -with-* | --with-*)
1228     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1229     # Reject names that are not valid shell variable names.
1230     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1231       as_fn_error $? "invalid package name: $ac_useropt"
1232     ac_useropt_orig=$ac_useropt
1233     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1234     case $ac_user_opts in
1235       *"
1236 "with_$ac_useropt"
1237 "*) ;;
1238       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1239          ac_unrecognized_sep=', ';;
1240     esac
1241     eval with_$ac_useropt=\$ac_optarg ;;
1242
1243   -without-* | --without-*)
1244     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1245     # Reject names that are not valid shell variable names.
1246     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1247       as_fn_error $? "invalid package name: $ac_useropt"
1248     ac_useropt_orig=$ac_useropt
1249     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1250     case $ac_user_opts in
1251       *"
1252 "with_$ac_useropt"
1253 "*) ;;
1254       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1255          ac_unrecognized_sep=', ';;
1256     esac
1257     eval with_$ac_useropt=no ;;
1258
1259   --x)
1260     # Obsolete; use --with-x.
1261     with_x=yes ;;
1262
1263   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1264   | --x-incl | --x-inc | --x-in | --x-i)
1265     ac_prev=x_includes ;;
1266   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1267   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1268     x_includes=$ac_optarg ;;
1269
1270   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1271   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1272     ac_prev=x_libraries ;;
1273   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1274   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1275     x_libraries=$ac_optarg ;;
1276
1277   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1278 Try \`$0 --help' for more information"
1279     ;;
1280
1281   *=*)
1282     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1283     # Reject names that are not valid shell variable names.
1284     case $ac_envvar in #(
1285       '' | [0-9]* | *[!_$as_cr_alnum]* )
1286       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1287     esac
1288     eval $ac_envvar=\$ac_optarg
1289     export $ac_envvar ;;
1290
1291   *)
1292     # FIXME: should be removed in autoconf 3.0.
1293     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1294     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1295       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1296     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1297     ;;
1298
1299   esac
1300 done
1301
1302 if test -n "$ac_prev"; then
1303   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1304   as_fn_error $? "missing argument to $ac_option"
1305 fi
1306
1307 if test -n "$ac_unrecognized_opts"; then
1308   case $enable_option_checking in
1309     no) ;;
1310     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1311     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1312   esac
1313 fi
1314
1315 # Check all directory arguments for consistency.
1316 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1317                 datadir sysconfdir sharedstatedir localstatedir includedir \
1318                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1319                 libdir localedir mandir
1320 do
1321   eval ac_val=\$$ac_var
1322   # Remove trailing slashes.
1323   case $ac_val in
1324     */ )
1325       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1326       eval $ac_var=\$ac_val;;
1327   esac
1328   # Be sure to have absolute directory names.
1329   case $ac_val in
1330     [\\/$]* | ?:[\\/]* )  continue;;
1331     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1332   esac
1333   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1334 done
1335
1336 # There might be people who depend on the old broken behavior: `$host'
1337 # used to hold the argument of --host etc.
1338 # FIXME: To remove some day.
1339 build=$build_alias
1340 host=$host_alias
1341 target=$target_alias
1342
1343 # FIXME: To remove some day.
1344 if test "x$host_alias" != x; then
1345   if test "x$build_alias" = x; then
1346     cross_compiling=maybe
1347   elif test "x$build_alias" != "x$host_alias"; then
1348     cross_compiling=yes
1349   fi
1350 fi
1351
1352 ac_tool_prefix=
1353 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1354
1355 test "$silent" = yes && exec 6>/dev/null
1356
1357
1358 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1359 ac_ls_di=`ls -di .` &&
1360 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1361   as_fn_error $? "working directory cannot be determined"
1362 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1363   as_fn_error $? "pwd does not report name of working directory"
1364
1365
1366 # Find the source files, if location was not specified.
1367 if test -z "$srcdir"; then
1368   ac_srcdir_defaulted=yes
1369   # Try the directory containing this script, then the parent directory.
1370   ac_confdir=`$as_dirname -- "$as_myself" ||
1371 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1372          X"$as_myself" : 'X\(//\)[^/]' \| \
1373          X"$as_myself" : 'X\(//\)$' \| \
1374          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1375 $as_echo X"$as_myself" |
1376     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1377             s//\1/
1378             q
1379           }
1380           /^X\(\/\/\)[^/].*/{
1381             s//\1/
1382             q
1383           }
1384           /^X\(\/\/\)$/{
1385             s//\1/
1386             q
1387           }
1388           /^X\(\/\).*/{
1389             s//\1/
1390             q
1391           }
1392           s/.*/./; q'`
1393   srcdir=$ac_confdir
1394   if test ! -r "$srcdir/$ac_unique_file"; then
1395     srcdir=..
1396   fi
1397 else
1398   ac_srcdir_defaulted=no
1399 fi
1400 if test ! -r "$srcdir/$ac_unique_file"; then
1401   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1402   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1403 fi
1404 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1405 ac_abs_confdir=`(
1406         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1407         pwd)`
1408 # When building in place, set srcdir=.
1409 if test "$ac_abs_confdir" = "$ac_pwd"; then
1410   srcdir=.
1411 fi
1412 # Remove unnecessary trailing slashes from srcdir.
1413 # Double slashes in file names in object file debugging info
1414 # mess up M-x gdb in Emacs.
1415 case $srcdir in
1416 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1417 esac
1418 for ac_var in $ac_precious_vars; do
1419   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1420   eval ac_env_${ac_var}_value=\$${ac_var}
1421   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1422   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1423 done
1424
1425 #
1426 # Report the --help message.
1427 #
1428 if test "$ac_init_help" = "long"; then
1429   # Omit some internal or obsolete options to make the list less imposing.
1430   # This message is too long to be a string in the A/UX 3.1 sh.
1431   cat <<_ACEOF
1432 \`configure' configures unbound 1.6.2 to adapt to many kinds of systems.
1433
1434 Usage: $0 [OPTION]... [VAR=VALUE]...
1435
1436 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1437 VAR=VALUE.  See below for descriptions of some of the useful variables.
1438
1439 Defaults for the options are specified in brackets.
1440
1441 Configuration:
1442   -h, --help              display this help and exit
1443       --help=short        display options specific to this package
1444       --help=recursive    display the short help of all the included packages
1445   -V, --version           display version information and exit
1446   -q, --quiet, --silent   do not print \`checking ...' messages
1447       --cache-file=FILE   cache test results in FILE [disabled]
1448   -C, --config-cache      alias for \`--cache-file=config.cache'
1449   -n, --no-create         do not create output files
1450       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1451
1452 Installation directories:
1453   --prefix=PREFIX         install architecture-independent files in PREFIX
1454                           [$ac_default_prefix]
1455   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1456                           [PREFIX]
1457
1458 By default, \`make install' will install all the files in
1459 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1460 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1461 for instance \`--prefix=\$HOME'.
1462
1463 For better control, use the options below.
1464
1465 Fine tuning of the installation directories:
1466   --bindir=DIR            user executables [EPREFIX/bin]
1467   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1468   --libexecdir=DIR        program executables [EPREFIX/libexec]
1469   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1470   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1471   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1472   --libdir=DIR            object code libraries [EPREFIX/lib]
1473   --includedir=DIR        C header files [PREFIX/include]
1474   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1475   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1476   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1477   --infodir=DIR           info documentation [DATAROOTDIR/info]
1478   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1479   --mandir=DIR            man documentation [DATAROOTDIR/man]
1480   --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1481   --htmldir=DIR           html documentation [DOCDIR]
1482   --dvidir=DIR            dvi documentation [DOCDIR]
1483   --pdfdir=DIR            pdf documentation [DOCDIR]
1484   --psdir=DIR             ps documentation [DOCDIR]
1485 _ACEOF
1486
1487   cat <<\_ACEOF
1488
1489 System types:
1490   --build=BUILD     configure for building on BUILD [guessed]
1491   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1492 _ACEOF
1493 fi
1494
1495 if test -n "$ac_init_help"; then
1496   case $ac_init_help in
1497      short | recursive ) echo "Configuration of unbound 1.6.2:";;
1498    esac
1499   cat <<\_ACEOF
1500
1501 Optional Features:
1502   --disable-option-checking  ignore unrecognized --enable/--with options
1503   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1504   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1505   --enable-checking       Enable warnings, asserts, makefile-dependencies
1506   --enable-debug          same as enable-checking
1507   --disable-flto          Disable link-time optimization (gcc specific option)
1508   --enable-pie            Enable Position-Independent Executable (eg. to fully
1509                           benefit from ASLR, small performance penalty)
1510   --enable-relro-now      Enable full relocation binding at load-time (RELRO
1511                           NOW, to protect GOT and .dtor areas)
1512   --enable-shared[=PKGS]  build shared libraries [default=yes]
1513   --enable-static[=PKGS]  build static libraries [default=yes]
1514   --enable-fast-install[=PKGS]
1515                           optimize for fast installation [default=yes]
1516   --disable-libtool-lock  avoid locking (might break parallel builds)
1517   --disable-rpath         disable hardcoded rpath (default=enabled)
1518   --disable-largefile     omit support for large files
1519   --enable-alloc-checks   enable to memory allocation statistics, for debug
1520                           purposes
1521   --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1522                           purposes
1523   --enable-alloc-nonregional
1524                           enable nonregional allocs, slow but exposes regional
1525                           allocations to other memory purifiers, for debug
1526                           purposes
1527   --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1528                           support
1529   --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1530   --enable-subnet         Enable client subnet
1531   --disable-gost          Disable GOST support
1532   --disable-ecdsa         Disable ECDSA support
1533   --disable-dsa           Disable DSA support
1534   --enable-event-api      Enable (experimental) pluggable event base
1535                           libunbound API installed to unbound-event.h
1536   --enable-tfo-client     Enable TCP Fast Open for client mode
1537   --enable-tfo-server     Enable TCP Fast Open for server mode
1538   --enable-static-exe     enable to compile executables statically against
1539                           (event) libs, for debug purposes
1540   --enable-systemd        compile with systemd support
1541   --enable-lock-checks    enable to check lock and unlock calls, for debug
1542                           purposes
1543   --enable-allsymbols     export all symbols from libunbound and link binaries
1544                           to it, smaller install size but libunbound export
1545                           table is polluted by internal symbols
1546   --enable-dnstap         Enable dnstap support (requires fstrm, protobuf-c)
1547   --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1548   --enable-cachedb        enable cachedb module that can use external cache
1549                           storage
1550
1551 Optional Packages:
1552   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1553   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1554   --with-conf-file=path   Pathname to the Unbound configuration file
1555   --with-run-dir=path     set default directory to chdir to (by default dir
1556                           part of cfg file)
1557   --with-chroot-dir=path  set default directory to chroot to (by default same
1558                           as run-dir)
1559   --with-share-dir=path   set default directory with shared data (by default
1560                           same as share/unbound)
1561   --with-pidfile=filename set default pathname to unbound pidfile (default
1562                           run-dir/unbound.pid)
1563   --with-rootkey-file=filename
1564                           set default pathname to root key file (default
1565                           run-dir/root.key). This file is read and written.
1566   --with-rootcert-file=filename
1567                           set default pathname to root update certificate file
1568                           (default run-dir/icannbundle.pem). This file need
1569                           not exist if you are content with the builtin.
1570   --with-username=user    set default user that unbound changes to (default
1571                           user is unbound)
1572   --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1573                           both]
1574   --with-aix-soname=aix|svr4|both
1575                           shared library versioning (aka "SONAME") variant to
1576                           provide on AIX, [default=aix].
1577   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1578   --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1579                           compiler's sysroot if not specified).
1580   --with-pthreads         use pthreads library, or --without-pthreads to
1581                           disable threading support.
1582   --with-solaris-threads  use solaris native thread library.
1583   --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1584                           (default=no)
1585   --with-pythonmodule     build Python module, or --without-pythonmodule to
1586                           disable script engine. (default=no)
1587   --with-nss=path         use libnss instead of openssl, installed at path.
1588   --with-nettle=path      use libnettle as crypto library, installed at path.
1589   --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1590                           /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1591                           /usr)
1592   --with-libevent=pathname
1593                           use libevent (will check /usr/local /opt/local
1594                           /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1595                           an explicit path). Slower, but allows use of large
1596                           outgoing port ranges.
1597   --with-libexpat=path    specify explicit path for libexpat.
1598   --with-dnstap-socket-path=pathname
1599                           set default dnstap socket path
1600   --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1601   --with-libfstrm=path    Path where libfstrm is installed, for dnstap
1602   --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1603   --with-libunbound-only  do not build daemon and tool programs
1604
1605 Some influential environment variables:
1606   CC          C compiler command
1607   CFLAGS      C compiler flags
1608   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1609               nonstandard directory <lib dir>
1610   LIBS        libraries to pass to the linker, e.g. -l<library>
1611   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1612               you have headers in a nonstandard directory <include dir>
1613   CPP         C preprocessor
1614   YACC        The `Yet Another Compiler Compiler' implementation to use.
1615               Defaults to the first program found out of: `bison -y', `byacc',
1616               `yacc'.
1617   YFLAGS      The list of arguments that will be passed by default to $YACC.
1618               This script will default YFLAGS to the empty string to avoid a
1619               default value of `-d' given by some make applications.
1620   LT_SYS_LIBRARY_PATH
1621               User-defined run-time library search path.
1622   PYTHON_VERSION
1623               The installed Python version to use, for example '2.3'. This
1624               string will be appended to the Python interpreter canonical
1625               name.
1626   PKG_CONFIG  path to pkg-config utility
1627   PKG_CONFIG_PATH
1628               directories to add to pkg-config's search path
1629   PKG_CONFIG_LIBDIR
1630               path overriding pkg-config's built-in search path
1631   SYSTEMD_CFLAGS
1632               C compiler flags for SYSTEMD, overriding pkg-config
1633   SYSTEMD_LIBS
1634               linker flags for SYSTEMD, overriding pkg-config
1635   SYSTEMD_DAEMON_CFLAGS
1636               C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1637   SYSTEMD_DAEMON_LIBS
1638               linker flags for SYSTEMD_DAEMON, overriding pkg-config
1639
1640 Use these variables to override the choices made by `configure' or to help
1641 it to find libraries and programs with nonstandard names/locations.
1642
1643 Report bugs to <unbound-bugs@nlnetlabs.nl>.
1644 _ACEOF
1645 ac_status=$?
1646 fi
1647
1648 if test "$ac_init_help" = "recursive"; then
1649   # If there are subdirs, report their specific --help.
1650   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1651     test -d "$ac_dir" ||
1652       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1653       continue
1654     ac_builddir=.
1655
1656 case "$ac_dir" in
1657 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1658 *)
1659   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1660   # A ".." for each directory in $ac_dir_suffix.
1661   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1662   case $ac_top_builddir_sub in
1663   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1664   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1665   esac ;;
1666 esac
1667 ac_abs_top_builddir=$ac_pwd
1668 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1669 # for backward compatibility:
1670 ac_top_builddir=$ac_top_build_prefix
1671
1672 case $srcdir in
1673   .)  # We are building in place.
1674     ac_srcdir=.
1675     ac_top_srcdir=$ac_top_builddir_sub
1676     ac_abs_top_srcdir=$ac_pwd ;;
1677   [\\/]* | ?:[\\/]* )  # Absolute name.
1678     ac_srcdir=$srcdir$ac_dir_suffix;
1679     ac_top_srcdir=$srcdir
1680     ac_abs_top_srcdir=$srcdir ;;
1681   *) # Relative name.
1682     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1683     ac_top_srcdir=$ac_top_build_prefix$srcdir
1684     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1685 esac
1686 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1687
1688     cd "$ac_dir" || { ac_status=$?; continue; }
1689     # Check for guested configure.
1690     if test -f "$ac_srcdir/configure.gnu"; then
1691       echo &&
1692       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1693     elif test -f "$ac_srcdir/configure"; then
1694       echo &&
1695       $SHELL "$ac_srcdir/configure" --help=recursive
1696     else
1697       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1698     fi || ac_status=$?
1699     cd "$ac_pwd" || { ac_status=$?; break; }
1700   done
1701 fi
1702
1703 test -n "$ac_init_help" && exit $ac_status
1704 if $ac_init_version; then
1705   cat <<\_ACEOF
1706 unbound configure 1.6.2
1707 generated by GNU Autoconf 2.69
1708
1709 Copyright (C) 2012 Free Software Foundation, Inc.
1710 This configure script is free software; the Free Software Foundation
1711 gives unlimited permission to copy, distribute and modify it.
1712 _ACEOF
1713   exit
1714 fi
1715
1716 ## ------------------------ ##
1717 ## Autoconf initialization. ##
1718 ## ------------------------ ##
1719
1720 # ac_fn_c_try_compile LINENO
1721 # --------------------------
1722 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1723 ac_fn_c_try_compile ()
1724 {
1725   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1726   rm -f conftest.$ac_objext
1727   if { { ac_try="$ac_compile"
1728 case "(($ac_try" in
1729   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1730   *) ac_try_echo=$ac_try;;
1731 esac
1732 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1733 $as_echo "$ac_try_echo"; } >&5
1734   (eval "$ac_compile") 2>conftest.err
1735   ac_status=$?
1736   if test -s conftest.err; then
1737     grep -v '^ *+' conftest.err >conftest.er1
1738     cat conftest.er1 >&5
1739     mv -f conftest.er1 conftest.err
1740   fi
1741   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1742   test $ac_status = 0; } && {
1743          test -z "$ac_c_werror_flag" ||
1744          test ! -s conftest.err
1745        } && test -s conftest.$ac_objext; then :
1746   ac_retval=0
1747 else
1748   $as_echo "$as_me: failed program was:" >&5
1749 sed 's/^/| /' conftest.$ac_ext >&5
1750
1751         ac_retval=1
1752 fi
1753   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1754   as_fn_set_status $ac_retval
1755
1756 } # ac_fn_c_try_compile
1757
1758 # ac_fn_c_try_cpp LINENO
1759 # ----------------------
1760 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1761 ac_fn_c_try_cpp ()
1762 {
1763   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1764   if { { ac_try="$ac_cpp conftest.$ac_ext"
1765 case "(($ac_try" in
1766   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1767   *) ac_try_echo=$ac_try;;
1768 esac
1769 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1770 $as_echo "$ac_try_echo"; } >&5
1771   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1772   ac_status=$?
1773   if test -s conftest.err; then
1774     grep -v '^ *+' conftest.err >conftest.er1
1775     cat conftest.er1 >&5
1776     mv -f conftest.er1 conftest.err
1777   fi
1778   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1779   test $ac_status = 0; } > conftest.i && {
1780          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1781          test ! -s conftest.err
1782        }; then :
1783   ac_retval=0
1784 else
1785   $as_echo "$as_me: failed program was:" >&5
1786 sed 's/^/| /' conftest.$ac_ext >&5
1787
1788     ac_retval=1
1789 fi
1790   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1791   as_fn_set_status $ac_retval
1792
1793 } # ac_fn_c_try_cpp
1794
1795 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1796 # -------------------------------------------------------
1797 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1798 # the include files in INCLUDES and setting the cache variable VAR
1799 # accordingly.
1800 ac_fn_c_check_header_mongrel ()
1801 {
1802   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1803   if eval \${$3+:} false; then :
1804   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1805 $as_echo_n "checking for $2... " >&6; }
1806 if eval \${$3+:} false; then :
1807   $as_echo_n "(cached) " >&6
1808 fi
1809 eval ac_res=\$$3
1810                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1811 $as_echo "$ac_res" >&6; }
1812 else
1813   # Is the header compilable?
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1815 $as_echo_n "checking $2 usability... " >&6; }
1816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1817 /* end confdefs.h.  */
1818 $4
1819 #include <$2>
1820 _ACEOF
1821 if ac_fn_c_try_compile "$LINENO"; then :
1822   ac_header_compiler=yes
1823 else
1824   ac_header_compiler=no
1825 fi
1826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1828 $as_echo "$ac_header_compiler" >&6; }
1829
1830 # Is the header present?
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1832 $as_echo_n "checking $2 presence... " >&6; }
1833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1834 /* end confdefs.h.  */
1835 #include <$2>
1836 _ACEOF
1837 if ac_fn_c_try_cpp "$LINENO"; then :
1838   ac_header_preproc=yes
1839 else
1840   ac_header_preproc=no
1841 fi
1842 rm -f conftest.err conftest.i conftest.$ac_ext
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1844 $as_echo "$ac_header_preproc" >&6; }
1845
1846 # So?  What about this header?
1847 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1848   yes:no: )
1849     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1850 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1851     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1852 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1853     ;;
1854   no:yes:* )
1855     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1856 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1857     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1858 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1859     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1860 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1861     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1862 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1863     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1864 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1865 ( $as_echo "## ---------------------------------------- ##
1866 ## Report this to unbound-bugs@nlnetlabs.nl ##
1867 ## ---------------------------------------- ##"
1868      ) | sed "s/^/$as_me: WARNING:     /" >&2
1869     ;;
1870 esac
1871   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1872 $as_echo_n "checking for $2... " >&6; }
1873 if eval \${$3+:} false; then :
1874   $as_echo_n "(cached) " >&6
1875 else
1876   eval "$3=\$ac_header_compiler"
1877 fi
1878 eval ac_res=\$$3
1879                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1880 $as_echo "$ac_res" >&6; }
1881 fi
1882   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1883
1884 } # ac_fn_c_check_header_mongrel
1885
1886 # ac_fn_c_try_run LINENO
1887 # ----------------------
1888 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1889 # that executables *can* be run.
1890 ac_fn_c_try_run ()
1891 {
1892   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1893   if { { ac_try="$ac_link"
1894 case "(($ac_try" in
1895   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1896   *) ac_try_echo=$ac_try;;
1897 esac
1898 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1899 $as_echo "$ac_try_echo"; } >&5
1900   (eval "$ac_link") 2>&5
1901   ac_status=$?
1902   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1903   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1904   { { case "(($ac_try" in
1905   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1906   *) ac_try_echo=$ac_try;;
1907 esac
1908 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1909 $as_echo "$ac_try_echo"; } >&5
1910   (eval "$ac_try") 2>&5
1911   ac_status=$?
1912   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1913   test $ac_status = 0; }; }; then :
1914   ac_retval=0
1915 else
1916   $as_echo "$as_me: program exited with status $ac_status" >&5
1917        $as_echo "$as_me: failed program was:" >&5
1918 sed 's/^/| /' conftest.$ac_ext >&5
1919
1920        ac_retval=$ac_status
1921 fi
1922   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1923   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1924   as_fn_set_status $ac_retval
1925
1926 } # ac_fn_c_try_run
1927
1928 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1929 # -------------------------------------------------------
1930 # Tests whether HEADER exists and can be compiled using the include files in
1931 # INCLUDES, setting the cache variable VAR accordingly.
1932 ac_fn_c_check_header_compile ()
1933 {
1934   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1936 $as_echo_n "checking for $2... " >&6; }
1937 if eval \${$3+:} false; then :
1938   $as_echo_n "(cached) " >&6
1939 else
1940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1941 /* end confdefs.h.  */
1942 $4
1943 #include <$2>
1944 _ACEOF
1945 if ac_fn_c_try_compile "$LINENO"; then :
1946   eval "$3=yes"
1947 else
1948   eval "$3=no"
1949 fi
1950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1951 fi
1952 eval ac_res=\$$3
1953                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1954 $as_echo "$ac_res" >&6; }
1955   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1956
1957 } # ac_fn_c_check_header_compile
1958
1959 # ac_fn_c_try_link LINENO
1960 # -----------------------
1961 # Try to link conftest.$ac_ext, and return whether this succeeded.
1962 ac_fn_c_try_link ()
1963 {
1964   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1965   rm -f conftest.$ac_objext conftest$ac_exeext
1966   if { { ac_try="$ac_link"
1967 case "(($ac_try" in
1968   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1969   *) ac_try_echo=$ac_try;;
1970 esac
1971 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1972 $as_echo "$ac_try_echo"; } >&5
1973   (eval "$ac_link") 2>conftest.err
1974   ac_status=$?
1975   if test -s conftest.err; then
1976     grep -v '^ *+' conftest.err >conftest.er1
1977     cat conftest.er1 >&5
1978     mv -f conftest.er1 conftest.err
1979   fi
1980   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1981   test $ac_status = 0; } && {
1982          test -z "$ac_c_werror_flag" ||
1983          test ! -s conftest.err
1984        } && test -s conftest$ac_exeext && {
1985          test "$cross_compiling" = yes ||
1986          test -x conftest$ac_exeext
1987        }; then :
1988   ac_retval=0
1989 else
1990   $as_echo "$as_me: failed program was:" >&5
1991 sed 's/^/| /' conftest.$ac_ext >&5
1992
1993         ac_retval=1
1994 fi
1995   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1996   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1997   # interfere with the next link command; also delete a directory that is
1998   # left behind by Apple's compiler.  We do this before executing the actions.
1999   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2000   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2001   as_fn_set_status $ac_retval
2002
2003 } # ac_fn_c_try_link
2004
2005 # ac_fn_c_check_func LINENO FUNC VAR
2006 # ----------------------------------
2007 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2008 ac_fn_c_check_func ()
2009 {
2010   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2011   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2012 $as_echo_n "checking for $2... " >&6; }
2013 if eval \${$3+:} false; then :
2014   $as_echo_n "(cached) " >&6
2015 else
2016   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2017 /* end confdefs.h.  */
2018 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2019    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2020 #define $2 innocuous_$2
2021
2022 /* System header to define __stub macros and hopefully few prototypes,
2023     which can conflict with char $2 (); below.
2024     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2025     <limits.h> exists even on freestanding compilers.  */
2026
2027 #ifdef __STDC__
2028 # include <limits.h>
2029 #else
2030 # include <assert.h>
2031 #endif
2032
2033 #undef $2
2034
2035 /* Override any GCC internal prototype to avoid an error.
2036    Use char because int might match the return type of a GCC
2037    builtin and then its argument prototype would still apply.  */
2038 #ifdef __cplusplus
2039 extern "C"
2040 #endif
2041 char $2 ();
2042 /* The GNU C library defines this for functions which it implements
2043     to always fail with ENOSYS.  Some functions are actually named
2044     something starting with __ and the normal name is an alias.  */
2045 #if defined __stub_$2 || defined __stub___$2
2046 choke me
2047 #endif
2048
2049 int
2050 main ()
2051 {
2052 return $2 ();
2053   ;
2054   return 0;
2055 }
2056 _ACEOF
2057 if ac_fn_c_try_link "$LINENO"; then :
2058   eval "$3=yes"
2059 else
2060   eval "$3=no"
2061 fi
2062 rm -f core conftest.err conftest.$ac_objext \
2063     conftest$ac_exeext conftest.$ac_ext
2064 fi
2065 eval ac_res=\$$3
2066                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2067 $as_echo "$ac_res" >&6; }
2068   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2069
2070 } # ac_fn_c_check_func
2071
2072 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2073 # -------------------------------------------
2074 # Tests whether TYPE exists after having included INCLUDES, setting cache
2075 # variable VAR accordingly.
2076 ac_fn_c_check_type ()
2077 {
2078   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2079   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2080 $as_echo_n "checking for $2... " >&6; }
2081 if eval \${$3+:} false; then :
2082   $as_echo_n "(cached) " >&6
2083 else
2084   eval "$3=no"
2085   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2086 /* end confdefs.h.  */
2087 $4
2088 int
2089 main ()
2090 {
2091 if (sizeof ($2))
2092          return 0;
2093   ;
2094   return 0;
2095 }
2096 _ACEOF
2097 if ac_fn_c_try_compile "$LINENO"; then :
2098   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2099 /* end confdefs.h.  */
2100 $4
2101 int
2102 main ()
2103 {
2104 if (sizeof (($2)))
2105             return 0;
2106   ;
2107   return 0;
2108 }
2109 _ACEOF
2110 if ac_fn_c_try_compile "$LINENO"; then :
2111
2112 else
2113   eval "$3=yes"
2114 fi
2115 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2116 fi
2117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2118 fi
2119 eval ac_res=\$$3
2120                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2121 $as_echo "$ac_res" >&6; }
2122   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2123
2124 } # ac_fn_c_check_type
2125
2126 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2127 # --------------------------------------------
2128 # Tries to find the compile-time value of EXPR in a program that includes
2129 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2130 # computed
2131 ac_fn_c_compute_int ()
2132 {
2133   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2134   if test "$cross_compiling" = yes; then
2135     # Depending upon the size, compute the lo and hi bounds.
2136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2137 /* end confdefs.h.  */
2138 $4
2139 int
2140 main ()
2141 {
2142 static int test_array [1 - 2 * !(($2) >= 0)];
2143 test_array [0] = 0;
2144 return test_array [0];
2145
2146   ;
2147   return 0;
2148 }
2149 _ACEOF
2150 if ac_fn_c_try_compile "$LINENO"; then :
2151   ac_lo=0 ac_mid=0
2152   while :; do
2153     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2154 /* end confdefs.h.  */
2155 $4
2156 int
2157 main ()
2158 {
2159 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2160 test_array [0] = 0;
2161 return test_array [0];
2162
2163   ;
2164   return 0;
2165 }
2166 _ACEOF
2167 if ac_fn_c_try_compile "$LINENO"; then :
2168   ac_hi=$ac_mid; break
2169 else
2170   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2171                         if test $ac_lo -le $ac_mid; then
2172                           ac_lo= ac_hi=
2173                           break
2174                         fi
2175                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2176 fi
2177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2178   done
2179 else
2180   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181 /* end confdefs.h.  */
2182 $4
2183 int
2184 main ()
2185 {
2186 static int test_array [1 - 2 * !(($2) < 0)];
2187 test_array [0] = 0;
2188 return test_array [0];
2189
2190   ;
2191   return 0;
2192 }
2193 _ACEOF
2194 if ac_fn_c_try_compile "$LINENO"; then :
2195   ac_hi=-1 ac_mid=-1
2196   while :; do
2197     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198 /* end confdefs.h.  */
2199 $4
2200 int
2201 main ()
2202 {
2203 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2204 test_array [0] = 0;
2205 return test_array [0];
2206
2207   ;
2208   return 0;
2209 }
2210 _ACEOF
2211 if ac_fn_c_try_compile "$LINENO"; then :
2212   ac_lo=$ac_mid; break
2213 else
2214   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2215                         if test $ac_mid -le $ac_hi; then
2216                           ac_lo= ac_hi=
2217                           break
2218                         fi
2219                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2220 fi
2221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2222   done
2223 else
2224   ac_lo= ac_hi=
2225 fi
2226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2227 fi
2228 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2229 # Binary search between lo and hi bounds.
2230 while test "x$ac_lo" != "x$ac_hi"; do
2231   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2232   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2233 /* end confdefs.h.  */
2234 $4
2235 int
2236 main ()
2237 {
2238 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2239 test_array [0] = 0;
2240 return test_array [0];
2241
2242   ;
2243   return 0;
2244 }
2245 _ACEOF
2246 if ac_fn_c_try_compile "$LINENO"; then :
2247   ac_hi=$ac_mid
2248 else
2249   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2250 fi
2251 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2252 done
2253 case $ac_lo in #((
2254 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2255 '') ac_retval=1 ;;
2256 esac
2257   else
2258     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2259 /* end confdefs.h.  */
2260 $4
2261 static long int longval () { return $2; }
2262 static unsigned long int ulongval () { return $2; }
2263 #include <stdio.h>
2264 #include <stdlib.h>
2265 int
2266 main ()
2267 {
2268
2269   FILE *f = fopen ("conftest.val", "w");
2270   if (! f)
2271     return 1;
2272   if (($2) < 0)
2273     {
2274       long int i = longval ();
2275       if (i != ($2))
2276         return 1;
2277       fprintf (f, "%ld", i);
2278     }
2279   else
2280     {
2281       unsigned long int i = ulongval ();
2282       if (i != ($2))
2283         return 1;
2284       fprintf (f, "%lu", i);
2285     }
2286   /* Do not output a trailing newline, as this causes \r\n confusion
2287      on some platforms.  */
2288   return ferror (f) || fclose (f) != 0;
2289
2290   ;
2291   return 0;
2292 }
2293 _ACEOF
2294 if ac_fn_c_try_run "$LINENO"; then :
2295   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2296 else
2297   ac_retval=1
2298 fi
2299 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2300   conftest.$ac_objext conftest.beam conftest.$ac_ext
2301 rm -f conftest.val
2302
2303   fi
2304   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2305   as_fn_set_status $ac_retval
2306
2307 } # ac_fn_c_compute_int
2308
2309 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2310 # ---------------------------------------------
2311 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2312 # accordingly.
2313 ac_fn_c_check_decl ()
2314 {
2315   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2316   as_decl_name=`echo $2|sed 's/ *(.*//'`
2317   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2318   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2319 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2320 if eval \${$3+:} false; then :
2321   $as_echo_n "(cached) " >&6
2322 else
2323   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2324 /* end confdefs.h.  */
2325 $4
2326 int
2327 main ()
2328 {
2329 #ifndef $as_decl_name
2330 #ifdef __cplusplus
2331   (void) $as_decl_use;
2332 #else
2333   (void) $as_decl_name;
2334 #endif
2335 #endif
2336
2337   ;
2338   return 0;
2339 }
2340 _ACEOF
2341 if ac_fn_c_try_compile "$LINENO"; then :
2342   eval "$3=yes"
2343 else
2344   eval "$3=no"
2345 fi
2346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2347 fi
2348 eval ac_res=\$$3
2349                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2350 $as_echo "$ac_res" >&6; }
2351   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2352
2353 } # ac_fn_c_check_decl
2354
2355 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2356 # ----------------------------------------------------
2357 # Tries to find if the field MEMBER exists in type AGGR, after including
2358 # INCLUDES, setting cache variable VAR accordingly.
2359 ac_fn_c_check_member ()
2360 {
2361   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2362   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2363 $as_echo_n "checking for $2.$3... " >&6; }
2364 if eval \${$4+:} false; then :
2365   $as_echo_n "(cached) " >&6
2366 else
2367   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2368 /* end confdefs.h.  */
2369 $5
2370 int
2371 main ()
2372 {
2373 static $2 ac_aggr;
2374 if (ac_aggr.$3)
2375 return 0;
2376   ;
2377   return 0;
2378 }
2379 _ACEOF
2380 if ac_fn_c_try_compile "$LINENO"; then :
2381   eval "$4=yes"
2382 else
2383   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2384 /* end confdefs.h.  */
2385 $5
2386 int
2387 main ()
2388 {
2389 static $2 ac_aggr;
2390 if (sizeof ac_aggr.$3)
2391 return 0;
2392   ;
2393   return 0;
2394 }
2395 _ACEOF
2396 if ac_fn_c_try_compile "$LINENO"; then :
2397   eval "$4=yes"
2398 else
2399   eval "$4=no"
2400 fi
2401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2402 fi
2403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2404 fi
2405 eval ac_res=\$$4
2406                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2407 $as_echo "$ac_res" >&6; }
2408   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2409
2410 } # ac_fn_c_check_member
2411 cat >config.log <<_ACEOF
2412 This file contains any messages produced by compilers while
2413 running configure, to aid debugging if configure makes a mistake.
2414
2415 It was created by unbound $as_me 1.6.2, which was
2416 generated by GNU Autoconf 2.69.  Invocation command line was
2417
2418   $ $0 $@
2419
2420 _ACEOF
2421 exec 5>>config.log
2422 {
2423 cat <<_ASUNAME
2424 ## --------- ##
2425 ## Platform. ##
2426 ## --------- ##
2427
2428 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2429 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2430 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2431 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2432 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2433
2434 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2435 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2436
2437 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2438 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2439 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2440 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2441 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2442 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2443 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2444
2445 _ASUNAME
2446
2447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2448 for as_dir in $PATH
2449 do
2450   IFS=$as_save_IFS
2451   test -z "$as_dir" && as_dir=.
2452     $as_echo "PATH: $as_dir"
2453   done
2454 IFS=$as_save_IFS
2455
2456 } >&5
2457
2458 cat >&5 <<_ACEOF
2459
2460
2461 ## ----------- ##
2462 ## Core tests. ##
2463 ## ----------- ##
2464
2465 _ACEOF
2466
2467
2468 # Keep a trace of the command line.
2469 # Strip out --no-create and --no-recursion so they do not pile up.
2470 # Strip out --silent because we don't want to record it for future runs.
2471 # Also quote any args containing shell meta-characters.
2472 # Make two passes to allow for proper duplicate-argument suppression.
2473 ac_configure_args=
2474 ac_configure_args0=
2475 ac_configure_args1=
2476 ac_must_keep_next=false
2477 for ac_pass in 1 2
2478 do
2479   for ac_arg
2480   do
2481     case $ac_arg in
2482     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2483     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2484     | -silent | --silent | --silen | --sile | --sil)
2485       continue ;;
2486     *\'*)
2487       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2488     esac
2489     case $ac_pass in
2490     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2491     2)
2492       as_fn_append ac_configure_args1 " '$ac_arg'"
2493       if test $ac_must_keep_next = true; then
2494         ac_must_keep_next=false # Got value, back to normal.
2495       else
2496         case $ac_arg in
2497           *=* | --config-cache | -C | -disable-* | --disable-* \
2498           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2499           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2500           | -with-* | --with-* | -without-* | --without-* | --x)
2501             case "$ac_configure_args0 " in
2502               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2503             esac
2504             ;;
2505           -* ) ac_must_keep_next=true ;;
2506         esac
2507       fi
2508       as_fn_append ac_configure_args " '$ac_arg'"
2509       ;;
2510     esac
2511   done
2512 done
2513 { ac_configure_args0=; unset ac_configure_args0;}
2514 { ac_configure_args1=; unset ac_configure_args1;}
2515
2516 # When interrupted or exit'd, cleanup temporary files, and complete
2517 # config.log.  We remove comments because anyway the quotes in there
2518 # would cause problems or look ugly.
2519 # WARNING: Use '\'' to represent an apostrophe within the trap.
2520 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2521 trap 'exit_status=$?
2522   # Save into config.log some information that might help in debugging.
2523   {
2524     echo
2525
2526     $as_echo "## ---------------- ##
2527 ## Cache variables. ##
2528 ## ---------------- ##"
2529     echo
2530     # The following way of writing the cache mishandles newlines in values,
2531 (
2532   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2533     eval ac_val=\$$ac_var
2534     case $ac_val in #(
2535     *${as_nl}*)
2536       case $ac_var in #(
2537       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2538 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2539       esac
2540       case $ac_var in #(
2541       _ | IFS | as_nl) ;; #(
2542       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2543       *) { eval $ac_var=; unset $ac_var;} ;;
2544       esac ;;
2545     esac
2546   done
2547   (set) 2>&1 |
2548     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2549     *${as_nl}ac_space=\ *)
2550       sed -n \
2551         "s/'\''/'\''\\\\'\'''\''/g;
2552           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2553       ;; #(
2554     *)
2555       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2556       ;;
2557     esac |
2558     sort
2559 )
2560     echo
2561
2562     $as_echo "## ----------------- ##
2563 ## Output variables. ##
2564 ## ----------------- ##"
2565     echo
2566     for ac_var in $ac_subst_vars
2567     do
2568       eval ac_val=\$$ac_var
2569       case $ac_val in
2570       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2571       esac
2572       $as_echo "$ac_var='\''$ac_val'\''"
2573     done | sort
2574     echo
2575
2576     if test -n "$ac_subst_files"; then
2577       $as_echo "## ------------------- ##
2578 ## File substitutions. ##
2579 ## ------------------- ##"
2580       echo
2581       for ac_var in $ac_subst_files
2582       do
2583         eval ac_val=\$$ac_var
2584         case $ac_val in
2585         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2586         esac
2587         $as_echo "$ac_var='\''$ac_val'\''"
2588       done | sort
2589       echo
2590     fi
2591
2592     if test -s confdefs.h; then
2593       $as_echo "## ----------- ##
2594 ## confdefs.h. ##
2595 ## ----------- ##"
2596       echo
2597       cat confdefs.h
2598       echo
2599     fi
2600     test "$ac_signal" != 0 &&
2601       $as_echo "$as_me: caught signal $ac_signal"
2602     $as_echo "$as_me: exit $exit_status"
2603   } >&5
2604   rm -f core *.core core.conftest.* &&
2605     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2606     exit $exit_status
2607 ' 0
2608 for ac_signal in 1 2 13 15; do
2609   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2610 done
2611 ac_signal=0
2612
2613 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2614 rm -f -r conftest* confdefs.h
2615
2616 $as_echo "/* confdefs.h */" > confdefs.h
2617
2618 # Predefined preprocessor variables.
2619
2620 cat >>confdefs.h <<_ACEOF
2621 #define PACKAGE_NAME "$PACKAGE_NAME"
2622 _ACEOF
2623
2624 cat >>confdefs.h <<_ACEOF
2625 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2626 _ACEOF
2627
2628 cat >>confdefs.h <<_ACEOF
2629 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2630 _ACEOF
2631
2632 cat >>confdefs.h <<_ACEOF
2633 #define PACKAGE_STRING "$PACKAGE_STRING"
2634 _ACEOF
2635
2636 cat >>confdefs.h <<_ACEOF
2637 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2638 _ACEOF
2639
2640 cat >>confdefs.h <<_ACEOF
2641 #define PACKAGE_URL "$PACKAGE_URL"
2642 _ACEOF
2643
2644
2645 # Let the site file select an alternate cache file if it wants to.
2646 # Prefer an explicitly selected file to automatically selected ones.
2647 ac_site_file1=NONE
2648 ac_site_file2=NONE
2649 if test -n "$CONFIG_SITE"; then
2650   # We do not want a PATH search for config.site.
2651   case $CONFIG_SITE in #((
2652     -*)  ac_site_file1=./$CONFIG_SITE;;
2653     */*) ac_site_file1=$CONFIG_SITE;;
2654     *)   ac_site_file1=./$CONFIG_SITE;;
2655   esac
2656 elif test "x$prefix" != xNONE; then
2657   ac_site_file1=$prefix/share/config.site
2658   ac_site_file2=$prefix/etc/config.site
2659 else
2660   ac_site_file1=$ac_default_prefix/share/config.site
2661   ac_site_file2=$ac_default_prefix/etc/config.site
2662 fi
2663 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2664 do
2665   test "x$ac_site_file" = xNONE && continue
2666   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2667     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2668 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2669     sed 's/^/| /' "$ac_site_file" >&5
2670     . "$ac_site_file" \
2671       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2672 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2673 as_fn_error $? "failed to load site script $ac_site_file
2674 See \`config.log' for more details" "$LINENO" 5; }
2675   fi
2676 done
2677
2678 if test -r "$cache_file"; then
2679   # Some versions of bash will fail to source /dev/null (special files
2680   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2681   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2682     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2683 $as_echo "$as_me: loading cache $cache_file" >&6;}
2684     case $cache_file in
2685       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2686       *)                      . "./$cache_file";;
2687     esac
2688   fi
2689 else
2690   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2691 $as_echo "$as_me: creating cache $cache_file" >&6;}
2692   >$cache_file
2693 fi
2694
2695 # Check that the precious variables saved in the cache have kept the same
2696 # value.
2697 ac_cache_corrupted=false
2698 for ac_var in $ac_precious_vars; do
2699   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2700   eval ac_new_set=\$ac_env_${ac_var}_set
2701   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2702   eval ac_new_val=\$ac_env_${ac_var}_value
2703   case $ac_old_set,$ac_new_set in
2704     set,)
2705       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2706 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2707       ac_cache_corrupted=: ;;
2708     ,set)
2709       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2710 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2711       ac_cache_corrupted=: ;;
2712     ,);;
2713     *)
2714       if test "x$ac_old_val" != "x$ac_new_val"; then
2715         # differences in whitespace do not lead to failure.
2716         ac_old_val_w=`echo x $ac_old_val`
2717         ac_new_val_w=`echo x $ac_new_val`
2718         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2719           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2720 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2721           ac_cache_corrupted=:
2722         else
2723           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2724 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2725           eval $ac_var=\$ac_old_val
2726         fi
2727         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2728 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2729         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2730 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2731       fi;;
2732   esac
2733   # Pass precious variables to config.status.
2734   if test "$ac_new_set" = set; then
2735     case $ac_new_val in
2736     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2737     *) ac_arg=$ac_var=$ac_new_val ;;
2738     esac
2739     case " $ac_configure_args " in
2740       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2741       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2742     esac
2743   fi
2744 done
2745 if $ac_cache_corrupted; then
2746   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2747 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2748   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2749 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2750   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2751 fi
2752 ## -------------------- ##
2753 ## Main body of script. ##
2754 ## -------------------- ##
2755
2756 ac_ext=c
2757 ac_cpp='$CPP $CPPFLAGS'
2758 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2759 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2760 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2761
2762
2763 UNBOUND_VERSION_MAJOR=1
2764
2765 UNBOUND_VERSION_MINOR=6
2766
2767 UNBOUND_VERSION_MICRO=2
2768
2769
2770 LIBUNBOUND_CURRENT=7
2771 LIBUNBOUND_REVISION=1
2772 LIBUNBOUND_AGE=5
2773 # 1.0.0 had 0:12:0
2774 # 1.0.1 had 0:13:0
2775 # 1.0.2 had 0:14:0
2776 # 1.1.0 had 0:15:0
2777 # 1.1.1 had 0:16:0
2778 # 1.2.0 had 0:17:0
2779 # 1.2.1 had 0:18:0
2780 # 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
2781 # 1.3.1 had 1:1:0
2782 # 1.3.2 had 1:2:0
2783 # 1.3.3 had 1:3:0
2784 # 1.3.4 had 1:4:0
2785 # 1.4.0-snapshots had 1:5:0
2786 # 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
2787 # 1.4.1 had 2:1:0
2788 # 1.4.2 had 2:2:0
2789 # 1.4.3 had 2:3:0
2790 # 1.4.4 had 2:4:0
2791 # 1.4.5 had 2:5:0
2792 # 1.4.6 had 2:6:0
2793 # 1.4.7 had 2:7:0
2794 # 1.4.8 had 2:8:0
2795 # 1.4.9 had 2:9:0
2796 # 1.4.10 had 2:10:0
2797 # 1.4.11 had 2:11:0
2798 # 1.4.12 had 2:12:0
2799 # 1.4.13 had 2:13:0
2800 # and 1.4.13p1 and 1.4.13.p2
2801 # 1.4.14 had 2:14:0
2802 # 1.4.15 had 3:0:1 # adds ub_version()
2803 # 1.4.16 had 3:1:1
2804 # 1.4.17 had 3:2:1
2805 # 1.4.18 had 3:3:1
2806 # 1.4.19 had 3:4:1
2807 # 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
2808 # 1.4.21 had 4:1:2
2809 # 1.4.22 had 4:1:2
2810 # 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2811 # 1.5.1 had 5:3:3
2812 # 1.5.2 had 5:5:3
2813 # 1.5.3 had 5:6:3
2814 # 1.5.4 had 5:7:3
2815 # 1.5.5 had 5:8:3
2816 # 1.5.6 had 5:9:3
2817 # 1.5.7 had 5:10:3
2818 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
2819 # 1.5.9 had 6:1:4
2820 # 1.5.10 had 6:2:4
2821 # 1.6.0 had 6:3:4
2822 # 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
2823 # 1.6.2 had 7:1:5
2824
2825 #   Current  -- the number of the binary API that we're implementing
2826 #   Revision -- which iteration of the implementation of the binary
2827 #               API are we supplying?
2828 #   Age      -- How many previous binary API versions do we also
2829 #               support?
2830 #
2831 # If we release a new version that does not change the binary API,
2832 # increment Revision.
2833 #
2834 # If we release a new version that changes the binary API, but does
2835 # not break programs compiled against the old binary API, increment
2836 # Current and Age.  Set Revision to 0, since this is the first
2837 # implementation of the new API.
2838 #
2839 # Otherwise, we're changing the binary API and breaking bakward
2840 # compatibility with old binaries.  Increment Current.  Set Age to 0,
2841 # since we're backward compatible with no previous APIs.  Set Revision
2842 # to 0 too.
2843
2844
2845
2846
2847 CFLAGS="$CFLAGS"
2848 ac_ext=c
2849 ac_cpp='$CPP $CPPFLAGS'
2850 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2851 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2852 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2853 if test -n "$ac_tool_prefix"; then
2854   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2855 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2857 $as_echo_n "checking for $ac_word... " >&6; }
2858 if ${ac_cv_prog_CC+:} false; then :
2859   $as_echo_n "(cached) " >&6
2860 else
2861   if test -n "$CC"; then
2862   ac_cv_prog_CC="$CC" # Let the user override the test.
2863 else
2864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2865 for as_dir in $PATH
2866 do
2867   IFS=$as_save_IFS
2868   test -z "$as_dir" && as_dir=.
2869     for ac_exec_ext in '' $ac_executable_extensions; do
2870   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2871     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2872     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2873     break 2
2874   fi
2875 done
2876   done
2877 IFS=$as_save_IFS
2878
2879 fi
2880 fi
2881 CC=$ac_cv_prog_CC
2882 if test -n "$CC"; then
2883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2884 $as_echo "$CC" >&6; }
2885 else
2886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2887 $as_echo "no" >&6; }
2888 fi
2889
2890
2891 fi
2892 if test -z "$ac_cv_prog_CC"; then
2893   ac_ct_CC=$CC
2894   # Extract the first word of "gcc", so it can be a program name with args.
2895 set dummy gcc; ac_word=$2
2896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2897 $as_echo_n "checking for $ac_word... " >&6; }
2898 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2899   $as_echo_n "(cached) " >&6
2900 else
2901   if test -n "$ac_ct_CC"; then
2902   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2903 else
2904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2905 for as_dir in $PATH
2906 do
2907   IFS=$as_save_IFS
2908   test -z "$as_dir" && as_dir=.
2909     for ac_exec_ext in '' $ac_executable_extensions; do
2910   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2911     ac_cv_prog_ac_ct_CC="gcc"
2912     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2913     break 2
2914   fi
2915 done
2916   done
2917 IFS=$as_save_IFS
2918
2919 fi
2920 fi
2921 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2922 if test -n "$ac_ct_CC"; then
2923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2924 $as_echo "$ac_ct_CC" >&6; }
2925 else
2926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2927 $as_echo "no" >&6; }
2928 fi
2929
2930   if test "x$ac_ct_CC" = x; then
2931     CC=""
2932   else
2933     case $cross_compiling:$ac_tool_warned in
2934 yes:)
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2936 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2937 ac_tool_warned=yes ;;
2938 esac
2939     CC=$ac_ct_CC
2940   fi
2941 else
2942   CC="$ac_cv_prog_CC"
2943 fi
2944
2945 if test -z "$CC"; then
2946           if test -n "$ac_tool_prefix"; then
2947     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2948 set dummy ${ac_tool_prefix}cc; ac_word=$2
2949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2950 $as_echo_n "checking for $ac_word... " >&6; }
2951 if ${ac_cv_prog_CC+:} false; then :
2952   $as_echo_n "(cached) " >&6
2953 else
2954   if test -n "$CC"; then
2955   ac_cv_prog_CC="$CC" # Let the user override the test.
2956 else
2957 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2958 for as_dir in $PATH
2959 do
2960   IFS=$as_save_IFS
2961   test -z "$as_dir" && as_dir=.
2962     for ac_exec_ext in '' $ac_executable_extensions; do
2963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2964     ac_cv_prog_CC="${ac_tool_prefix}cc"
2965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2966     break 2
2967   fi
2968 done
2969   done
2970 IFS=$as_save_IFS
2971
2972 fi
2973 fi
2974 CC=$ac_cv_prog_CC
2975 if test -n "$CC"; then
2976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2977 $as_echo "$CC" >&6; }
2978 else
2979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2980 $as_echo "no" >&6; }
2981 fi
2982
2983
2984   fi
2985 fi
2986 if test -z "$CC"; then
2987   # Extract the first word of "cc", so it can be a program name with args.
2988 set dummy cc; ac_word=$2
2989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2990 $as_echo_n "checking for $ac_word... " >&6; }
2991 if ${ac_cv_prog_CC+:} false; then :
2992   $as_echo_n "(cached) " >&6
2993 else
2994   if test -n "$CC"; then
2995   ac_cv_prog_CC="$CC" # Let the user override the test.
2996 else
2997   ac_prog_rejected=no
2998 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2999 for as_dir in $PATH
3000 do
3001   IFS=$as_save_IFS
3002   test -z "$as_dir" && as_dir=.
3003     for ac_exec_ext in '' $ac_executable_extensions; do
3004   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3005     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3006        ac_prog_rejected=yes
3007        continue
3008      fi
3009     ac_cv_prog_CC="cc"
3010     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3011     break 2
3012   fi
3013 done
3014   done
3015 IFS=$as_save_IFS
3016
3017 if test $ac_prog_rejected = yes; then
3018   # We found a bogon in the path, so make sure we never use it.
3019   set dummy $ac_cv_prog_CC
3020   shift
3021   if test $# != 0; then
3022     # We chose a different compiler from the bogus one.
3023     # However, it has the same basename, so the bogon will be chosen
3024     # first if we set CC to just the basename; use the full file name.
3025     shift
3026     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3027   fi
3028 fi
3029 fi
3030 fi
3031 CC=$ac_cv_prog_CC
3032 if test -n "$CC"; then
3033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3034 $as_echo "$CC" >&6; }
3035 else
3036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3037 $as_echo "no" >&6; }
3038 fi
3039
3040
3041 fi
3042 if test -z "$CC"; then
3043   if test -n "$ac_tool_prefix"; then
3044   for ac_prog in cl.exe
3045   do
3046     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3047 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3049 $as_echo_n "checking for $ac_word... " >&6; }
3050 if ${ac_cv_prog_CC+:} false; then :
3051   $as_echo_n "(cached) " >&6
3052 else
3053   if test -n "$CC"; then
3054   ac_cv_prog_CC="$CC" # Let the user override the test.
3055 else
3056 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3057 for as_dir in $PATH
3058 do
3059   IFS=$as_save_IFS
3060   test -z "$as_dir" && as_dir=.
3061     for ac_exec_ext in '' $ac_executable_extensions; do
3062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3063     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3065     break 2
3066   fi
3067 done
3068   done
3069 IFS=$as_save_IFS
3070
3071 fi
3072 fi
3073 CC=$ac_cv_prog_CC
3074 if test -n "$CC"; then
3075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3076 $as_echo "$CC" >&6; }
3077 else
3078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3079 $as_echo "no" >&6; }
3080 fi
3081
3082
3083     test -n "$CC" && break
3084   done
3085 fi
3086 if test -z "$CC"; then
3087   ac_ct_CC=$CC
3088   for ac_prog in cl.exe
3089 do
3090   # Extract the first word of "$ac_prog", so it can be a program name with args.
3091 set dummy $ac_prog; ac_word=$2
3092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3093 $as_echo_n "checking for $ac_word... " >&6; }
3094 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3095   $as_echo_n "(cached) " >&6
3096 else
3097   if test -n "$ac_ct_CC"; then
3098   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3099 else
3100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3101 for as_dir in $PATH
3102 do
3103   IFS=$as_save_IFS
3104   test -z "$as_dir" && as_dir=.
3105     for ac_exec_ext in '' $ac_executable_extensions; do
3106   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3107     ac_cv_prog_ac_ct_CC="$ac_prog"
3108     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3109     break 2
3110   fi
3111 done
3112   done
3113 IFS=$as_save_IFS
3114
3115 fi
3116 fi
3117 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3118 if test -n "$ac_ct_CC"; then
3119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3120 $as_echo "$ac_ct_CC" >&6; }
3121 else
3122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3123 $as_echo "no" >&6; }
3124 fi
3125
3126
3127   test -n "$ac_ct_CC" && break
3128 done
3129
3130   if test "x$ac_ct_CC" = x; then
3131     CC=""
3132   else
3133     case $cross_compiling:$ac_tool_warned in
3134 yes:)
3135 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3136 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3137 ac_tool_warned=yes ;;
3138 esac
3139     CC=$ac_ct_CC
3140   fi
3141 fi
3142
3143 fi
3144
3145
3146 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3147 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3148 as_fn_error $? "no acceptable C compiler found in \$PATH
3149 See \`config.log' for more details" "$LINENO" 5; }
3150
3151 # Provide some information about the compiler.
3152 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3153 set X $ac_compile
3154 ac_compiler=$2
3155 for ac_option in --version -v -V -qversion; do
3156   { { ac_try="$ac_compiler $ac_option >&5"
3157 case "(($ac_try" in
3158   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3159   *) ac_try_echo=$ac_try;;
3160 esac
3161 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3162 $as_echo "$ac_try_echo"; } >&5
3163   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3164   ac_status=$?
3165   if test -s conftest.err; then
3166     sed '10a\
3167 ... rest of stderr output deleted ...
3168          10q' conftest.err >conftest.er1
3169     cat conftest.er1 >&5
3170   fi
3171   rm -f conftest.er1 conftest.err
3172   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3173   test $ac_status = 0; }
3174 done
3175
3176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3177 /* end confdefs.h.  */
3178
3179 int
3180 main ()
3181 {
3182
3183   ;
3184   return 0;
3185 }
3186 _ACEOF
3187 ac_clean_files_save=$ac_clean_files
3188 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3189 # Try to create an executable without -o first, disregard a.out.
3190 # It will help us diagnose broken compilers, and finding out an intuition
3191 # of exeext.
3192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3193 $as_echo_n "checking whether the C compiler works... " >&6; }
3194 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3195
3196 # The possible output files:
3197 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3198
3199 ac_rmfiles=
3200 for ac_file in $ac_files
3201 do
3202   case $ac_file in
3203     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3204     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3205   esac
3206 done
3207 rm -f $ac_rmfiles
3208
3209 if { { ac_try="$ac_link_default"
3210 case "(($ac_try" in
3211   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3212   *) ac_try_echo=$ac_try;;
3213 esac
3214 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3215 $as_echo "$ac_try_echo"; } >&5
3216   (eval "$ac_link_default") 2>&5
3217   ac_status=$?
3218   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3219   test $ac_status = 0; }; then :
3220   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3221 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3222 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3223 # so that the user can short-circuit this test for compilers unknown to
3224 # Autoconf.
3225 for ac_file in $ac_files ''
3226 do
3227   test -f "$ac_file" || continue
3228   case $ac_file in
3229     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3230         ;;
3231     [ab].out )
3232         # We found the default executable, but exeext='' is most
3233         # certainly right.
3234         break;;
3235     *.* )
3236         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3237         then :; else
3238            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3239         fi
3240         # We set ac_cv_exeext here because the later test for it is not
3241         # safe: cross compilers may not add the suffix if given an `-o'
3242         # argument, so we may need to know it at that point already.
3243         # Even if this section looks crufty: it has the advantage of
3244         # actually working.
3245         break;;
3246     * )
3247         break;;
3248   esac
3249 done
3250 test "$ac_cv_exeext" = no && ac_cv_exeext=
3251
3252 else
3253   ac_file=''
3254 fi
3255 if test -z "$ac_file"; then :
3256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3257 $as_echo "no" >&6; }
3258 $as_echo "$as_me: failed program was:" >&5
3259 sed 's/^/| /' conftest.$ac_ext >&5
3260
3261 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3262 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3263 as_fn_error 77 "C compiler cannot create executables
3264 See \`config.log' for more details" "$LINENO" 5; }
3265 else
3266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3267 $as_echo "yes" >&6; }
3268 fi
3269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3270 $as_echo_n "checking for C compiler default output file name... " >&6; }
3271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3272 $as_echo "$ac_file" >&6; }
3273 ac_exeext=$ac_cv_exeext
3274
3275 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3276 ac_clean_files=$ac_clean_files_save
3277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3278 $as_echo_n "checking for suffix of executables... " >&6; }
3279 if { { ac_try="$ac_link"
3280 case "(($ac_try" in
3281   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3282   *) ac_try_echo=$ac_try;;
3283 esac
3284 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3285 $as_echo "$ac_try_echo"; } >&5
3286   (eval "$ac_link") 2>&5
3287   ac_status=$?
3288   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3289   test $ac_status = 0; }; then :
3290   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3291 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3292 # work properly (i.e., refer to `conftest.exe'), while it won't with
3293 # `rm'.
3294 for ac_file in conftest.exe conftest conftest.*; do
3295   test -f "$ac_file" || continue
3296   case $ac_file in
3297     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3298     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3299           break;;
3300     * ) break;;
3301   esac
3302 done
3303 else
3304   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3305 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3306 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3307 See \`config.log' for more details" "$LINENO" 5; }
3308 fi
3309 rm -f conftest conftest$ac_cv_exeext
3310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3311 $as_echo "$ac_cv_exeext" >&6; }
3312
3313 rm -f conftest.$ac_ext
3314 EXEEXT=$ac_cv_exeext
3315 ac_exeext=$EXEEXT
3316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3317 /* end confdefs.h.  */
3318 #include <stdio.h>
3319 int
3320 main ()
3321 {
3322 FILE *f = fopen ("conftest.out", "w");
3323  return ferror (f) || fclose (f) != 0;
3324
3325   ;
3326   return 0;
3327 }
3328 _ACEOF
3329 ac_clean_files="$ac_clean_files conftest.out"
3330 # Check that the compiler produces executables we can run.  If not, either
3331 # the compiler is broken, or we cross compile.
3332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3333 $as_echo_n "checking whether we are cross compiling... " >&6; }
3334 if test "$cross_compiling" != yes; then
3335   { { ac_try="$ac_link"
3336 case "(($ac_try" in
3337   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3338   *) ac_try_echo=$ac_try;;
3339 esac
3340 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3341 $as_echo "$ac_try_echo"; } >&5
3342   (eval "$ac_link") 2>&5
3343   ac_status=$?
3344   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3345   test $ac_status = 0; }
3346   if { ac_try='./conftest$ac_cv_exeext'
3347   { { case "(($ac_try" in
3348   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3349   *) ac_try_echo=$ac_try;;
3350 esac
3351 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3352 $as_echo "$ac_try_echo"; } >&5
3353   (eval "$ac_try") 2>&5
3354   ac_status=$?
3355   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3356   test $ac_status = 0; }; }; then
3357     cross_compiling=no
3358   else
3359     if test "$cross_compiling" = maybe; then
3360         cross_compiling=yes
3361     else
3362         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3363 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3364 as_fn_error $? "cannot run C compiled programs.
3365 If you meant to cross compile, use \`--host'.
3366 See \`config.log' for more details" "$LINENO" 5; }
3367     fi
3368   fi
3369 fi
3370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3371 $as_echo "$cross_compiling" >&6; }
3372
3373 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3374 ac_clean_files=$ac_clean_files_save
3375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3376 $as_echo_n "checking for suffix of object files... " >&6; }
3377 if ${ac_cv_objext+:} false; then :
3378   $as_echo_n "(cached) " >&6
3379 else
3380   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3381 /* end confdefs.h.  */
3382
3383 int
3384 main ()
3385 {
3386
3387   ;
3388   return 0;
3389 }
3390 _ACEOF
3391 rm -f conftest.o conftest.obj
3392 if { { ac_try="$ac_compile"
3393 case "(($ac_try" in
3394   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3395   *) ac_try_echo=$ac_try;;
3396 esac
3397 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3398 $as_echo "$ac_try_echo"; } >&5
3399   (eval "$ac_compile") 2>&5
3400   ac_status=$?
3401   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3402   test $ac_status = 0; }; then :
3403   for ac_file in conftest.o conftest.obj conftest.*; do
3404   test -f "$ac_file" || continue;
3405   case $ac_file in
3406     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3407     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3408        break;;
3409   esac
3410 done
3411 else
3412   $as_echo "$as_me: failed program was:" >&5
3413 sed 's/^/| /' conftest.$ac_ext >&5
3414
3415 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3416 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3417 as_fn_error $? "cannot compute suffix of object files: cannot compile
3418 See \`config.log' for more details" "$LINENO" 5; }
3419 fi
3420 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3421 fi
3422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3423 $as_echo "$ac_cv_objext" >&6; }
3424 OBJEXT=$ac_cv_objext
3425 ac_objext=$OBJEXT
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3427 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3428 if ${ac_cv_c_compiler_gnu+:} false; then :
3429   $as_echo_n "(cached) " >&6
3430 else
3431   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3432 /* end confdefs.h.  */
3433
3434 int
3435 main ()
3436 {
3437 #ifndef __GNUC__
3438        choke me
3439 #endif
3440
3441   ;
3442   return 0;
3443 }
3444 _ACEOF
3445 if ac_fn_c_try_compile "$LINENO"; then :
3446   ac_compiler_gnu=yes
3447 else
3448   ac_compiler_gnu=no
3449 fi
3450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3451 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3452
3453 fi
3454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3455 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3456 if test $ac_compiler_gnu = yes; then
3457   GCC=yes
3458 else
3459   GCC=
3460 fi
3461 ac_test_CFLAGS=${CFLAGS+set}
3462 ac_save_CFLAGS=$CFLAGS
3463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3464 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3465 if ${ac_cv_prog_cc_g+:} false; then :
3466   $as_echo_n "(cached) " >&6
3467 else
3468   ac_save_c_werror_flag=$ac_c_werror_flag
3469    ac_c_werror_flag=yes
3470    ac_cv_prog_cc_g=no
3471    CFLAGS="-g"
3472    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3473 /* end confdefs.h.  */
3474
3475 int
3476 main ()
3477 {
3478
3479   ;
3480   return 0;
3481 }
3482 _ACEOF
3483 if ac_fn_c_try_compile "$LINENO"; then :
3484   ac_cv_prog_cc_g=yes
3485 else
3486   CFLAGS=""
3487       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3488 /* end confdefs.h.  */
3489
3490 int
3491 main ()
3492 {
3493
3494   ;
3495   return 0;
3496 }
3497 _ACEOF
3498 if ac_fn_c_try_compile "$LINENO"; then :
3499
3500 else
3501   ac_c_werror_flag=$ac_save_c_werror_flag
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 fi
3517 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3518 fi
3519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3520 fi
3521 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3522    ac_c_werror_flag=$ac_save_c_werror_flag
3523 fi
3524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3525 $as_echo "$ac_cv_prog_cc_g" >&6; }
3526 if test "$ac_test_CFLAGS" = set; then
3527   CFLAGS=$ac_save_CFLAGS
3528 elif test $ac_cv_prog_cc_g = yes; then
3529   if test "$GCC" = yes; then
3530     CFLAGS="-g -O2"
3531   else
3532     CFLAGS="-g"
3533   fi
3534 else
3535   if test "$GCC" = yes; then
3536     CFLAGS="-O2"
3537   else
3538     CFLAGS=
3539   fi
3540 fi
3541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3542 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3543 if ${ac_cv_prog_cc_c89+:} false; then :
3544   $as_echo_n "(cached) " >&6
3545 else
3546   ac_cv_prog_cc_c89=no
3547 ac_save_CC=$CC
3548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3549 /* end confdefs.h.  */
3550 #include <stdarg.h>
3551 #include <stdio.h>
3552 struct stat;
3553 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3554 struct buf { int x; };
3555 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3556 static char *e (p, i)
3557      char **p;
3558      int i;
3559 {
3560   return p[i];
3561 }
3562 static char *f (char * (*g) (char **, int), char **p, ...)
3563 {
3564   char *s;
3565   va_list v;
3566   va_start (v,p);
3567   s = g (p, va_arg (v,int));
3568   va_end (v);
3569   return s;
3570 }
3571
3572 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3573    function prototypes and stuff, but not '\xHH' hex character constants.
3574    These don't provoke an error unfortunately, instead are silently treated
3575    as 'x'.  The following induces an error, until -std is added to get
3576    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3577    array size at least.  It's necessary to write '\x00'==0 to get something
3578    that's true only with -std.  */
3579 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3580
3581 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3582    inside strings and character constants.  */
3583 #define FOO(x) 'x'
3584 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3585
3586 int test (int i, double x);
3587 struct s1 {int (*f) (int a);};
3588 struct s2 {int (*f) (double a);};
3589 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3590 int argc;
3591 char **argv;
3592 int
3593 main ()
3594 {
3595 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3596   ;
3597   return 0;
3598 }
3599 _ACEOF
3600 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3601         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3602 do
3603   CC="$ac_save_CC $ac_arg"
3604   if ac_fn_c_try_compile "$LINENO"; then :
3605   ac_cv_prog_cc_c89=$ac_arg
3606 fi
3607 rm -f core conftest.err conftest.$ac_objext
3608   test "x$ac_cv_prog_cc_c89" != "xno" && break
3609 done
3610 rm -f conftest.$ac_ext
3611 CC=$ac_save_CC
3612
3613 fi
3614 # AC_CACHE_VAL
3615 case "x$ac_cv_prog_cc_c89" in
3616   x)
3617     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3618 $as_echo "none needed" >&6; } ;;
3619   xno)
3620     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3621 $as_echo "unsupported" >&6; } ;;
3622   *)
3623     CC="$CC $ac_cv_prog_cc_c89"
3624     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3625 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3626 esac
3627 if test "x$ac_cv_prog_cc_c89" != xno; then :
3628
3629 fi
3630
3631 ac_ext=c
3632 ac_cpp='$CPP $CPPFLAGS'
3633 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3634 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3635 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3636
3637
3638 ac_ext=c
3639 ac_cpp='$CPP $CPPFLAGS'
3640 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3641 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3642 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3644 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3645 # On Suns, sometimes $CPP names a directory.
3646 if test -n "$CPP" && test -d "$CPP"; then
3647   CPP=
3648 fi
3649 if test -z "$CPP"; then
3650   if ${ac_cv_prog_CPP+:} false; then :
3651   $as_echo_n "(cached) " >&6
3652 else
3653       # Double quotes because CPP needs to be expanded
3654     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3655     do
3656       ac_preproc_ok=false
3657 for ac_c_preproc_warn_flag in '' yes
3658 do
3659   # Use a header file that comes with gcc, so configuring glibc
3660   # with a fresh cross-compiler works.
3661   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3662   # <limits.h> exists even on freestanding compilers.
3663   # On the NeXT, cc -E runs the code through the compiler's parser,
3664   # not just through cpp. "Syntax error" is here to catch this case.
3665   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3666 /* end confdefs.h.  */
3667 #ifdef __STDC__
3668 # include <limits.h>
3669 #else
3670 # include <assert.h>
3671 #endif
3672                      Syntax error
3673 _ACEOF
3674 if ac_fn_c_try_cpp "$LINENO"; then :
3675
3676 else
3677   # Broken: fails on valid input.
3678 continue
3679 fi
3680 rm -f conftest.err conftest.i conftest.$ac_ext
3681
3682   # OK, works on sane cases.  Now check whether nonexistent headers
3683   # can be detected and how.
3684   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3685 /* end confdefs.h.  */
3686 #include <ac_nonexistent.h>
3687 _ACEOF
3688 if ac_fn_c_try_cpp "$LINENO"; then :
3689   # Broken: success on invalid input.
3690 continue
3691 else
3692   # Passes both tests.
3693 ac_preproc_ok=:
3694 break
3695 fi
3696 rm -f conftest.err conftest.i conftest.$ac_ext
3697
3698 done
3699 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3700 rm -f conftest.i conftest.err conftest.$ac_ext
3701 if $ac_preproc_ok; then :
3702   break
3703 fi
3704
3705     done
3706     ac_cv_prog_CPP=$CPP
3707
3708 fi
3709   CPP=$ac_cv_prog_CPP
3710 else
3711   ac_cv_prog_CPP=$CPP
3712 fi
3713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3714 $as_echo "$CPP" >&6; }
3715 ac_preproc_ok=false
3716 for ac_c_preproc_warn_flag in '' yes
3717 do
3718   # Use a header file that comes with gcc, so configuring glibc
3719   # with a fresh cross-compiler works.
3720   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3721   # <limits.h> exists even on freestanding compilers.
3722   # On the NeXT, cc -E runs the code through the compiler's parser,
3723   # not just through cpp. "Syntax error" is here to catch this case.
3724   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3725 /* end confdefs.h.  */
3726 #ifdef __STDC__
3727 # include <limits.h>
3728 #else
3729 # include <assert.h>
3730 #endif
3731                      Syntax error
3732 _ACEOF
3733 if ac_fn_c_try_cpp "$LINENO"; then :
3734
3735 else
3736   # Broken: fails on valid input.
3737 continue
3738 fi
3739 rm -f conftest.err conftest.i conftest.$ac_ext
3740
3741   # OK, works on sane cases.  Now check whether nonexistent headers
3742   # can be detected and how.
3743   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3744 /* end confdefs.h.  */
3745 #include <ac_nonexistent.h>
3746 _ACEOF
3747 if ac_fn_c_try_cpp "$LINENO"; then :
3748   # Broken: success on invalid input.
3749 continue
3750 else
3751   # Passes both tests.
3752 ac_preproc_ok=:
3753 break
3754 fi
3755 rm -f conftest.err conftest.i conftest.$ac_ext
3756
3757 done
3758 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3759 rm -f conftest.i conftest.err conftest.$ac_ext
3760 if $ac_preproc_ok; then :
3761
3762 else
3763   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3764 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3765 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3766 See \`config.log' for more details" "$LINENO" 5; }
3767 fi
3768
3769 ac_ext=c
3770 ac_cpp='$CPP $CPPFLAGS'
3771 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3772 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3773 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3774
3775
3776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3777 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3778 if ${ac_cv_path_GREP+:} false; then :
3779   $as_echo_n "(cached) " >&6
3780 else
3781   if test -z "$GREP"; then
3782   ac_path_GREP_found=false
3783   # Loop through the user's path and test for each of PROGNAME-LIST
3784   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3785 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3786 do
3787   IFS=$as_save_IFS
3788   test -z "$as_dir" && as_dir=.
3789     for ac_prog in grep ggrep; do
3790     for ac_exec_ext in '' $ac_executable_extensions; do
3791       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3792       as_fn_executable_p "$ac_path_GREP" || continue
3793 # Check for GNU ac_path_GREP and select it if it is found.
3794   # Check for GNU $ac_path_GREP
3795 case `"$ac_path_GREP" --version 2>&1` in
3796 *GNU*)
3797   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3798 *)
3799   ac_count=0
3800   $as_echo_n 0123456789 >"conftest.in"
3801   while :
3802   do
3803     cat "conftest.in" "conftest.in" >"conftest.tmp"
3804     mv "conftest.tmp" "conftest.in"
3805     cp "conftest.in" "conftest.nl"
3806     $as_echo 'GREP' >> "conftest.nl"
3807     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3808     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3809     as_fn_arith $ac_count + 1 && ac_count=$as_val
3810     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3811       # Best one so far, save it but keep looking for a better one
3812       ac_cv_path_GREP="$ac_path_GREP"
3813       ac_path_GREP_max=$ac_count
3814     fi
3815     # 10*(2^10) chars as input seems more than enough
3816     test $ac_count -gt 10 && break
3817   done
3818   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3819 esac
3820
3821       $ac_path_GREP_found && break 3
3822     done
3823   done
3824   done
3825 IFS=$as_save_IFS
3826   if test -z "$ac_cv_path_GREP"; then
3827     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3828   fi
3829 else
3830   ac_cv_path_GREP=$GREP
3831 fi
3832
3833 fi
3834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3835 $as_echo "$ac_cv_path_GREP" >&6; }
3836  GREP="$ac_cv_path_GREP"
3837
3838
3839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3840 $as_echo_n "checking for egrep... " >&6; }
3841 if ${ac_cv_path_EGREP+:} false; then :
3842   $as_echo_n "(cached) " >&6
3843 else
3844   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3845    then ac_cv_path_EGREP="$GREP -E"
3846    else
3847      if test -z "$EGREP"; then
3848   ac_path_EGREP_found=false
3849   # Loop through the user's path and test for each of PROGNAME-LIST
3850   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3851 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3852 do
3853   IFS=$as_save_IFS
3854   test -z "$as_dir" && as_dir=.
3855     for ac_prog in egrep; do
3856     for ac_exec_ext in '' $ac_executable_extensions; do
3857       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3858       as_fn_executable_p "$ac_path_EGREP" || continue
3859 # Check for GNU ac_path_EGREP and select it if it is found.
3860   # Check for GNU $ac_path_EGREP
3861 case `"$ac_path_EGREP" --version 2>&1` in
3862 *GNU*)
3863   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3864 *)
3865   ac_count=0
3866   $as_echo_n 0123456789 >"conftest.in"
3867   while :
3868   do
3869     cat "conftest.in" "conftest.in" >"conftest.tmp"
3870     mv "conftest.tmp" "conftest.in"
3871     cp "conftest.in" "conftest.nl"
3872     $as_echo 'EGREP' >> "conftest.nl"
3873     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3874     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3875     as_fn_arith $ac_count + 1 && ac_count=$as_val
3876     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3877       # Best one so far, save it but keep looking for a better one
3878       ac_cv_path_EGREP="$ac_path_EGREP"
3879       ac_path_EGREP_max=$ac_count
3880     fi
3881     # 10*(2^10) chars as input seems more than enough
3882     test $ac_count -gt 10 && break
3883   done
3884   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3885 esac
3886
3887       $ac_path_EGREP_found && break 3
3888     done
3889   done
3890   done
3891 IFS=$as_save_IFS
3892   if test -z "$ac_cv_path_EGREP"; then
3893     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3894   fi
3895 else
3896   ac_cv_path_EGREP=$EGREP
3897 fi
3898
3899    fi
3900 fi
3901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3902 $as_echo "$ac_cv_path_EGREP" >&6; }
3903  EGREP="$ac_cv_path_EGREP"
3904
3905
3906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3907 $as_echo_n "checking for ANSI C header files... " >&6; }
3908 if ${ac_cv_header_stdc+:} false; then :
3909   $as_echo_n "(cached) " >&6
3910 else
3911   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3912 /* end confdefs.h.  */
3913 #include <stdlib.h>
3914 #include <stdarg.h>
3915 #include <string.h>
3916 #include <float.h>
3917
3918 int
3919 main ()
3920 {
3921
3922   ;
3923   return 0;
3924 }
3925 _ACEOF
3926 if ac_fn_c_try_compile "$LINENO"; then :
3927   ac_cv_header_stdc=yes
3928 else
3929   ac_cv_header_stdc=no
3930 fi
3931 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3932
3933 if test $ac_cv_header_stdc = yes; then
3934   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3935   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3936 /* end confdefs.h.  */
3937 #include <string.h>
3938
3939 _ACEOF
3940 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3941   $EGREP "memchr" >/dev/null 2>&1; then :
3942
3943 else
3944   ac_cv_header_stdc=no
3945 fi
3946 rm -f conftest*
3947
3948 fi
3949
3950 if test $ac_cv_header_stdc = yes; then
3951   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3952   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3953 /* end confdefs.h.  */
3954 #include <stdlib.h>
3955
3956 _ACEOF
3957 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3958   $EGREP "free" >/dev/null 2>&1; then :
3959
3960 else
3961   ac_cv_header_stdc=no
3962 fi
3963 rm -f conftest*
3964
3965 fi
3966
3967 if test $ac_cv_header_stdc = yes; then
3968   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3969   if test "$cross_compiling" = yes; then :
3970   :
3971 else
3972   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3973 /* end confdefs.h.  */
3974 #include <ctype.h>
3975 #include <stdlib.h>
3976 #if ((' ' & 0x0FF) == 0x020)
3977 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3978 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3979 #else
3980 # define ISLOWER(c) \
3981                    (('a' <= (c) && (c) <= 'i') \
3982                      || ('j' <= (c) && (c) <= 'r') \
3983                      || ('s' <= (c) && (c) <= 'z'))
3984 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3985 #endif
3986
3987 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3988 int
3989 main ()
3990 {
3991   int i;
3992   for (i = 0; i < 256; i++)
3993     if (XOR (islower (i), ISLOWER (i))
3994         || toupper (i) != TOUPPER (i))
3995       return 2;
3996   return 0;
3997 }
3998 _ACEOF
3999 if ac_fn_c_try_run "$LINENO"; then :
4000
4001 else
4002   ac_cv_header_stdc=no
4003 fi
4004 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4005   conftest.$ac_objext conftest.beam conftest.$ac_ext
4006 fi
4007
4008 fi
4009 fi
4010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4011 $as_echo "$ac_cv_header_stdc" >&6; }
4012 if test $ac_cv_header_stdc = yes; then
4013
4014 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4015
4016 fi
4017
4018 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4019 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4020                   inttypes.h stdint.h unistd.h
4021 do :
4022   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4023 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4024 "
4025 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4026   cat >>confdefs.h <<_ACEOF
4027 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4028 _ACEOF
4029
4030 fi
4031
4032 done
4033
4034
4035
4036   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4037 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4038   MINIX=yes
4039 else
4040   MINIX=
4041 fi
4042
4043
4044   if test "$MINIX" = yes; then
4045
4046 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4047
4048
4049 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4050
4051
4052 $as_echo "#define _MINIX 1" >>confdefs.h
4053
4054   fi
4055
4056
4057   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4058 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4059 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4060   $as_echo_n "(cached) " >&6
4061 else
4062   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4063 /* end confdefs.h.  */
4064
4065 #         define __EXTENSIONS__ 1
4066           $ac_includes_default
4067 int
4068 main ()
4069 {
4070
4071   ;
4072   return 0;
4073 }
4074 _ACEOF
4075 if ac_fn_c_try_compile "$LINENO"; then :
4076   ac_cv_safe_to_define___extensions__=yes
4077 else
4078   ac_cv_safe_to_define___extensions__=no
4079 fi
4080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4081 fi
4082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4083 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4084   test $ac_cv_safe_to_define___extensions__ = yes &&
4085     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4086
4087   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4088
4089   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4090
4091   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4092
4093   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4094
4095
4096
4097 if test "$ac_cv_header_minix_config_h" = "yes"; then
4098
4099 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4100
4101 fi
4102
4103 case "$prefix" in
4104         NONE)
4105                 prefix="/usr/local"
4106         ;;
4107 esac
4108
4109 # are we on MinGW?
4110 if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
4111 else
4112         if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes"
4113         else on_mingw="no"; fi
4114 fi
4115
4116 #
4117 # Determine configuration file
4118 # the eval is to evaluate shell expansion twice
4119 if test $on_mingw = "no"; then
4120   ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4121 else
4122   ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4123 fi
4124
4125 # Check whether --with-conf_file was given.
4126 if test "${with_conf_file+set}" = set; then :
4127   withval=$with_conf_file; ub_conf_file="$withval"
4128 fi
4129
4130
4131 hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4132
4133
4134 cat >>confdefs.h <<_ACEOF
4135 #define CONFIGFILE "$hdr_config"
4136 _ACEOF
4137
4138 ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4139 $as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4140          X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4141          X"$ub_conf_file" : 'X\(//\)$' \| \
4142          X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4143 $as_echo X"$ub_conf_file" |
4144     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4145             s//\1/
4146             q
4147           }
4148           /^X\(\/\/\)[^/].*/{
4149             s//\1/
4150             q
4151           }
4152           /^X\(\/\/\)$/{
4153             s//\1/
4154             q
4155           }
4156           /^X\(\/\).*/{
4157             s//\1/
4158             q
4159           }
4160           s/.*/./; q'`
4161
4162
4163 # Determine run, chroot directory and pidfile locations
4164
4165 # Check whether --with-run-dir was given.
4166 if test "${with_run_dir+set}" = set; then :
4167   withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4168 else
4169   if test $on_mingw = no; then
4170     UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4171 else
4172     UNBOUND_RUN_DIR=""
4173 fi
4174
4175 fi
4176
4177
4178 hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4179
4180
4181 cat >>confdefs.h <<_ACEOF
4182 #define RUN_DIR "$hdr_run"
4183 _ACEOF
4184
4185
4186
4187 # Check whether --with-chroot-dir was given.
4188 if test "${with_chroot_dir+set}" = set; then :
4189   withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4190 else
4191   if test $on_mingw = no; then
4192     UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4193 else
4194     UNBOUND_CHROOT_DIR=""
4195 fi
4196
4197 fi
4198
4199
4200 hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4201
4202
4203 cat >>confdefs.h <<_ACEOF
4204 #define CHROOT_DIR "$hdr_chroot"
4205 _ACEOF
4206
4207
4208
4209 # Check whether --with-share-dir was given.
4210 if test "${with_share_dir+set}" = set; then :
4211   withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4212 else
4213   UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4214 fi
4215
4216
4217
4218 cat >>confdefs.h <<_ACEOF
4219 #define SHARE_DIR "$UNBOUND_SHARE_DIR"
4220 _ACEOF
4221
4222
4223
4224 # Check whether --with-pidfile was given.
4225 if test "${with_pidfile+set}" = set; then :
4226   withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4227 else
4228   if test $on_mingw = no; then
4229     UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4230 else
4231     UNBOUND_PIDFILE=""
4232 fi
4233
4234 fi
4235
4236
4237 hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4238
4239
4240 cat >>confdefs.h <<_ACEOF
4241 #define PIDFILE "$hdr_pid"
4242 _ACEOF
4243
4244
4245
4246 # Check whether --with-rootkey-file was given.
4247 if test "${with_rootkey_file+set}" = set; then :
4248   withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4249 else
4250   if test $on_mingw = no; then
4251     UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4252 else
4253     UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4254 fi
4255
4256 fi
4257
4258
4259 hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4260
4261
4262 cat >>confdefs.h <<_ACEOF
4263 #define ROOT_ANCHOR_FILE "$hdr_rkey"
4264 _ACEOF
4265
4266
4267
4268 # Check whether --with-rootcert-file was given.
4269 if test "${with_rootcert_file+set}" = set; then :
4270   withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4271 else
4272   if test $on_mingw = no; then
4273     UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4274 else
4275     UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4276 fi
4277
4278 fi
4279
4280
4281 hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4282
4283
4284 cat >>confdefs.h <<_ACEOF
4285 #define ROOT_CERT_FILE "$hdr_rpem"
4286 _ACEOF
4287
4288
4289
4290 # Check whether --with-username was given.
4291 if test "${with_username+set}" = set; then :
4292   withval=$with_username; UNBOUND_USERNAME="$withval"
4293 else
4294   UNBOUND_USERNAME="unbound"
4295 fi
4296
4297
4298
4299 cat >>confdefs.h <<_ACEOF
4300 #define UB_USERNAME "$UNBOUND_USERNAME"
4301 _ACEOF
4302
4303
4304
4305 $as_echo "#define WINVER 0x0502" >>confdefs.h
4306
4307 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/' `
4308
4309
4310 cat >>confdefs.h <<_ACEOF
4311 #define RSRC_PACKAGE_VERSION $wnvs
4312 _ACEOF
4313
4314
4315 # Checks for typedefs, structures, and compiler characteristics.
4316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4317 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4318 if ${ac_cv_c_const+:} false; then :
4319   $as_echo_n "(cached) " >&6
4320 else
4321   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4322 /* end confdefs.h.  */
4323
4324 int
4325 main ()
4326 {
4327
4328 #ifndef __cplusplus
4329   /* Ultrix mips cc rejects this sort of thing.  */
4330   typedef int charset[2];
4331   const charset cs = { 0, 0 };
4332   /* SunOS 4.1.1 cc rejects this.  */
4333   char const *const *pcpcc;
4334   char **ppc;
4335   /* NEC SVR4.0.2 mips cc rejects this.  */
4336   struct point {int x, y;};
4337   static struct point const zero = {0,0};
4338   /* AIX XL C 1.02.0.0 rejects this.
4339      It does not let you subtract one const X* pointer from another in
4340      an arm of an if-expression whose if-part is not a constant
4341      expression */
4342   const char *g = "string";
4343   pcpcc = &g + (g ? g-g : 0);
4344   /* HPUX 7.0 cc rejects these. */
4345   ++pcpcc;
4346   ppc = (char**) pcpcc;
4347   pcpcc = (char const *const *) ppc;
4348   { /* SCO 3.2v4 cc rejects this sort of thing.  */
4349     char tx;
4350     char *t = &tx;
4351     char const *s = 0 ? (char *) 0 : (char const *) 0;
4352
4353     *t++ = 0;
4354     if (s) return 0;
4355   }
4356   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4357     int x[] = {25, 17};
4358     const int *foo = &x[0];
4359     ++foo;
4360   }
4361   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4362     typedef const int *iptr;
4363     iptr p = 0;
4364     ++p;
4365   }
4366   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4367        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4368     struct s { int j; const int *ap[3]; } bx;
4369     struct s *b = &bx; b->j = 5;
4370   }
4371   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4372     const int foo = 10;
4373     if (!foo) return 0;
4374   }
4375   return !cs[0] && !zero.x;
4376 #endif
4377
4378   ;
4379   return 0;
4380 }
4381 _ACEOF
4382 if ac_fn_c_try_compile "$LINENO"; then :
4383   ac_cv_c_const=yes
4384 else
4385   ac_cv_c_const=no
4386 fi
4387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4388 fi
4389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4390 $as_echo "$ac_cv_c_const" >&6; }
4391 if test $ac_cv_c_const = no; then
4392
4393 $as_echo "#define const /**/" >>confdefs.h
4394
4395 fi
4396
4397 ac_ext=c
4398 ac_cpp='$CPP $CPPFLAGS'
4399 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4400 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4401 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4402
4403 # allow user to override the -g -O2 flags.
4404 if test "x$CFLAGS" = "x" ; then
4405
4406
4407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4408 $as_echo_n "checking whether $CC supports -g... " >&6; }
4409 cache=`echo g | sed 'y%.=/+-%___p_%'`
4410 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4411   $as_echo_n "(cached) " >&6
4412 else
4413
4414 echo 'void f(void){}' >conftest.c
4415 if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4416 eval "cv_prog_cc_flag_$cache=yes"
4417 else
4418 eval "cv_prog_cc_flag_$cache=no"
4419 fi
4420 rm -f conftest conftest.o conftest.c
4421
4422 fi
4423
4424 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4426 $as_echo "yes" >&6; }
4427 :
4428 CFLAGS="$CFLAGS -g"
4429 else
4430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4431 $as_echo "no" >&6; }
4432 :
4433
4434 fi
4435
4436
4437
4438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4439 $as_echo_n "checking whether $CC supports -O2... " >&6; }
4440 cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4441 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4442   $as_echo_n "(cached) " >&6
4443 else
4444
4445 echo 'void f(void){}' >conftest.c
4446 if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4447 eval "cv_prog_cc_flag_$cache=yes"
4448 else
4449 eval "cv_prog_cc_flag_$cache=no"
4450 fi
4451 rm -f conftest conftest.o conftest.c
4452
4453 fi
4454
4455 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4457 $as_echo "yes" >&6; }
4458 :
4459 CFLAGS="$CFLAGS -O2"
4460 else
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4462 $as_echo "no" >&6; }
4463 :
4464
4465 fi
4466
4467 fi
4468 ac_ext=c
4469 ac_cpp='$CPP $CPPFLAGS'
4470 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4471 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4472 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4473 if test -n "$ac_tool_prefix"; then
4474   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4475 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4477 $as_echo_n "checking for $ac_word... " >&6; }
4478 if ${ac_cv_prog_CC+:} false; then :
4479   $as_echo_n "(cached) " >&6
4480 else
4481   if test -n "$CC"; then
4482   ac_cv_prog_CC="$CC" # Let the user override the test.
4483 else
4484 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4485 for as_dir in $PATH
4486 do
4487   IFS=$as_save_IFS
4488   test -z "$as_dir" && as_dir=.
4489     for ac_exec_ext in '' $ac_executable_extensions; do
4490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4491     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4493     break 2
4494   fi
4495 done
4496   done
4497 IFS=$as_save_IFS
4498
4499 fi
4500 fi
4501 CC=$ac_cv_prog_CC
4502 if test -n "$CC"; then
4503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4504 $as_echo "$CC" >&6; }
4505 else
4506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4507 $as_echo "no" >&6; }
4508 fi
4509
4510
4511 fi
4512 if test -z "$ac_cv_prog_CC"; then
4513   ac_ct_CC=$CC
4514   # Extract the first word of "gcc", so it can be a program name with args.
4515 set dummy gcc; ac_word=$2
4516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4517 $as_echo_n "checking for $ac_word... " >&6; }
4518 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4519   $as_echo_n "(cached) " >&6
4520 else
4521   if test -n "$ac_ct_CC"; then
4522   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4523 else
4524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4525 for as_dir in $PATH
4526 do
4527   IFS=$as_save_IFS
4528   test -z "$as_dir" && as_dir=.
4529     for ac_exec_ext in '' $ac_executable_extensions; do
4530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4531     ac_cv_prog_ac_ct_CC="gcc"
4532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4533     break 2
4534   fi
4535 done
4536   done
4537 IFS=$as_save_IFS
4538
4539 fi
4540 fi
4541 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4542 if test -n "$ac_ct_CC"; then
4543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4544 $as_echo "$ac_ct_CC" >&6; }
4545 else
4546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4547 $as_echo "no" >&6; }
4548 fi
4549
4550   if test "x$ac_ct_CC" = x; then
4551     CC=""
4552   else
4553     case $cross_compiling:$ac_tool_warned in
4554 yes:)
4555 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4556 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4557 ac_tool_warned=yes ;;
4558 esac
4559     CC=$ac_ct_CC
4560   fi
4561 else
4562   CC="$ac_cv_prog_CC"
4563 fi
4564
4565 if test -z "$CC"; then
4566           if test -n "$ac_tool_prefix"; then
4567     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4568 set dummy ${ac_tool_prefix}cc; ac_word=$2
4569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4570 $as_echo_n "checking for $ac_word... " >&6; }
4571 if ${ac_cv_prog_CC+:} false; then :
4572   $as_echo_n "(cached) " >&6
4573 else
4574   if test -n "$CC"; then
4575   ac_cv_prog_CC="$CC" # Let the user override the test.
4576 else
4577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4578 for as_dir in $PATH
4579 do
4580   IFS=$as_save_IFS
4581   test -z "$as_dir" && as_dir=.
4582     for ac_exec_ext in '' $ac_executable_extensions; do
4583   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4584     ac_cv_prog_CC="${ac_tool_prefix}cc"
4585     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4586     break 2
4587   fi
4588 done
4589   done
4590 IFS=$as_save_IFS
4591
4592 fi
4593 fi
4594 CC=$ac_cv_prog_CC
4595 if test -n "$CC"; then
4596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4597 $as_echo "$CC" >&6; }
4598 else
4599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4600 $as_echo "no" >&6; }
4601 fi
4602
4603
4604   fi
4605 fi
4606 if test -z "$CC"; then
4607   # Extract the first word of "cc", so it can be a program name with args.
4608 set dummy cc; ac_word=$2
4609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4610 $as_echo_n "checking for $ac_word... " >&6; }
4611 if ${ac_cv_prog_CC+:} false; then :
4612   $as_echo_n "(cached) " >&6
4613 else
4614   if test -n "$CC"; then
4615   ac_cv_prog_CC="$CC" # Let the user override the test.
4616 else
4617   ac_prog_rejected=no
4618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4619 for as_dir in $PATH
4620 do
4621   IFS=$as_save_IFS
4622   test -z "$as_dir" && as_dir=.
4623     for ac_exec_ext in '' $ac_executable_extensions; do
4624   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4625     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4626        ac_prog_rejected=yes
4627        continue
4628      fi
4629     ac_cv_prog_CC="cc"
4630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4631     break 2
4632   fi
4633 done
4634   done
4635 IFS=$as_save_IFS
4636
4637 if test $ac_prog_rejected = yes; then
4638   # We found a bogon in the path, so make sure we never use it.
4639   set dummy $ac_cv_prog_CC
4640   shift
4641   if test $# != 0; then
4642     # We chose a different compiler from the bogus one.
4643     # However, it has the same basename, so the bogon will be chosen
4644     # first if we set CC to just the basename; use the full file name.
4645     shift
4646     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4647   fi
4648 fi
4649 fi
4650 fi
4651 CC=$ac_cv_prog_CC
4652 if test -n "$CC"; then
4653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4654 $as_echo "$CC" >&6; }
4655 else
4656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657 $as_echo "no" >&6; }
4658 fi
4659
4660
4661 fi
4662 if test -z "$CC"; then
4663   if test -n "$ac_tool_prefix"; then
4664   for ac_prog in cl.exe
4665   do
4666     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4667 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4669 $as_echo_n "checking for $ac_word... " >&6; }
4670 if ${ac_cv_prog_CC+:} false; then :
4671   $as_echo_n "(cached) " >&6
4672 else
4673   if test -n "$CC"; then
4674   ac_cv_prog_CC="$CC" # Let the user override the test.
4675 else
4676 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4677 for as_dir in $PATH
4678 do
4679   IFS=$as_save_IFS
4680   test -z "$as_dir" && as_dir=.
4681     for ac_exec_ext in '' $ac_executable_extensions; do
4682   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4683     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4684     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4685     break 2
4686   fi
4687 done
4688   done
4689 IFS=$as_save_IFS
4690
4691 fi
4692 fi
4693 CC=$ac_cv_prog_CC
4694 if test -n "$CC"; then
4695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4696 $as_echo "$CC" >&6; }
4697 else
4698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4699 $as_echo "no" >&6; }
4700 fi
4701
4702
4703     test -n "$CC" && break
4704   done
4705 fi
4706 if test -z "$CC"; then
4707   ac_ct_CC=$CC
4708   for ac_prog in cl.exe
4709 do
4710   # Extract the first word of "$ac_prog", so it can be a program name with args.
4711 set dummy $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_ac_ct_CC+:} false; then :
4715   $as_echo_n "(cached) " >&6
4716 else
4717   if test -n "$ac_ct_CC"; then
4718   ac_cv_prog_ac_ct_CC="$ac_ct_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_ac_ct_CC="$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 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4738 if test -n "$ac_ct_CC"; then
4739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4740 $as_echo "$ac_ct_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 "$ac_ct_CC" && break
4748 done
4749
4750   if test "x$ac_ct_CC" = x; then
4751     CC=""
4752   else
4753     case $cross_compiling:$ac_tool_warned in
4754 yes:)
4755 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4756 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4757 ac_tool_warned=yes ;;
4758 esac
4759     CC=$ac_ct_CC
4760   fi
4761 fi
4762
4763 fi
4764
4765
4766 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4767 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4768 as_fn_error $? "no acceptable C compiler found in \$PATH
4769 See \`config.log' for more details" "$LINENO" 5; }
4770
4771 # Provide some information about the compiler.
4772 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4773 set X $ac_compile
4774 ac_compiler=$2
4775 for ac_option in --version -v -V -qversion; do
4776   { { ac_try="$ac_compiler $ac_option >&5"
4777 case "(($ac_try" in
4778   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4779   *) ac_try_echo=$ac_try;;
4780 esac
4781 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4782 $as_echo "$ac_try_echo"; } >&5
4783   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4784   ac_status=$?
4785   if test -s conftest.err; then
4786     sed '10a\
4787 ... rest of stderr output deleted ...
4788          10q' conftest.err >conftest.er1
4789     cat conftest.er1 >&5
4790   fi
4791   rm -f conftest.er1 conftest.err
4792   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4793   test $ac_status = 0; }
4794 done
4795
4796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4797 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4798 if ${ac_cv_c_compiler_gnu+:} false; then :
4799   $as_echo_n "(cached) " >&6
4800 else
4801   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4802 /* end confdefs.h.  */
4803
4804 int
4805 main ()
4806 {
4807 #ifndef __GNUC__
4808        choke me
4809 #endif
4810
4811   ;
4812   return 0;
4813 }
4814 _ACEOF
4815 if ac_fn_c_try_compile "$LINENO"; then :
4816   ac_compiler_gnu=yes
4817 else
4818   ac_compiler_gnu=no
4819 fi
4820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4821 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4822
4823 fi
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4825 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4826 if test $ac_compiler_gnu = yes; then
4827   GCC=yes
4828 else
4829   GCC=
4830 fi
4831 ac_test_CFLAGS=${CFLAGS+set}
4832 ac_save_CFLAGS=$CFLAGS
4833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4834 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4835 if ${ac_cv_prog_cc_g+:} false; then :
4836   $as_echo_n "(cached) " >&6
4837 else
4838   ac_save_c_werror_flag=$ac_c_werror_flag
4839    ac_c_werror_flag=yes
4840    ac_cv_prog_cc_g=no
4841    CFLAGS="-g"
4842    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4843 /* end confdefs.h.  */
4844
4845 int
4846 main ()
4847 {
4848
4849   ;
4850   return 0;
4851 }
4852 _ACEOF
4853 if ac_fn_c_try_compile "$LINENO"; then :
4854   ac_cv_prog_cc_g=yes
4855 else
4856   CFLAGS=""
4857       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4858 /* end confdefs.h.  */
4859
4860 int
4861 main ()
4862 {
4863
4864   ;
4865   return 0;
4866 }
4867 _ACEOF
4868 if ac_fn_c_try_compile "$LINENO"; then :
4869
4870 else
4871   ac_c_werror_flag=$ac_save_c_werror_flag
4872          CFLAGS="-g"
4873          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4874 /* end confdefs.h.  */
4875
4876 int
4877 main ()
4878 {
4879
4880   ;
4881   return 0;
4882 }
4883 _ACEOF
4884 if ac_fn_c_try_compile "$LINENO"; then :
4885   ac_cv_prog_cc_g=yes
4886 fi
4887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4888 fi
4889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4890 fi
4891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4892    ac_c_werror_flag=$ac_save_c_werror_flag
4893 fi
4894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4895 $as_echo "$ac_cv_prog_cc_g" >&6; }
4896 if test "$ac_test_CFLAGS" = set; then
4897   CFLAGS=$ac_save_CFLAGS
4898 elif test $ac_cv_prog_cc_g = yes; then
4899   if test "$GCC" = yes; then
4900     CFLAGS="-g -O2"
4901   else
4902     CFLAGS="-g"
4903   fi
4904 else
4905   if test "$GCC" = yes; then
4906     CFLAGS="-O2"
4907   else
4908     CFLAGS=
4909   fi
4910 fi
4911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4912 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4913 if ${ac_cv_prog_cc_c89+:} false; then :
4914   $as_echo_n "(cached) " >&6
4915 else
4916   ac_cv_prog_cc_c89=no
4917 ac_save_CC=$CC
4918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4919 /* end confdefs.h.  */
4920 #include <stdarg.h>
4921 #include <stdio.h>
4922 struct stat;
4923 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4924 struct buf { int x; };
4925 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4926 static char *e (p, i)
4927      char **p;
4928      int i;
4929 {
4930   return p[i];
4931 }
4932 static char *f (char * (*g) (char **, int), char **p, ...)
4933 {
4934   char *s;
4935   va_list v;
4936   va_start (v,p);
4937   s = g (p, va_arg (v,int));
4938   va_end (v);
4939   return s;
4940 }
4941
4942 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4943    function prototypes and stuff, but not '\xHH' hex character constants.
4944    These don't provoke an error unfortunately, instead are silently treated
4945    as 'x'.  The following induces an error, until -std is added to get
4946    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4947    array size at least.  It's necessary to write '\x00'==0 to get something
4948    that's true only with -std.  */
4949 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4950
4951 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4952    inside strings and character constants.  */
4953 #define FOO(x) 'x'
4954 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4955
4956 int test (int i, double x);
4957 struct s1 {int (*f) (int a);};
4958 struct s2 {int (*f) (double a);};
4959 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4960 int argc;
4961 char **argv;
4962 int
4963 main ()
4964 {
4965 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4966   ;
4967   return 0;
4968 }
4969 _ACEOF
4970 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4971         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4972 do
4973   CC="$ac_save_CC $ac_arg"
4974   if ac_fn_c_try_compile "$LINENO"; then :
4975   ac_cv_prog_cc_c89=$ac_arg
4976 fi
4977 rm -f core conftest.err conftest.$ac_objext
4978   test "x$ac_cv_prog_cc_c89" != "xno" && break
4979 done
4980 rm -f conftest.$ac_ext
4981 CC=$ac_save_CC
4982
4983 fi
4984 # AC_CACHE_VAL
4985 case "x$ac_cv_prog_cc_c89" in
4986   x)
4987     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4988 $as_echo "none needed" >&6; } ;;
4989   xno)
4990     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4991 $as_echo "unsupported" >&6; } ;;
4992   *)
4993     CC="$CC $ac_cv_prog_cc_c89"
4994     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4995 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4996 esac
4997 if test "x$ac_cv_prog_cc_c89" != xno; then :
4998
4999 fi
5000
5001 ac_ext=c
5002 ac_cpp='$CPP $CPPFLAGS'
5003 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5004 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5005 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5006
5007
5008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5009 $as_echo_n "checking $CC dependency flag... " >&6; }
5010 echo 'void f(){}' >conftest.c
5011 if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5012         DEPFLAG="-MM"
5013 else
5014   if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5015         DEPFLAG="-xM1"
5016   else
5017         DEPFLAG="-MM"  # dunno do something
5018   fi
5019 fi
5020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5021 $as_echo "$DEPFLAG" >&6; }
5022 rm -f conftest.c
5023
5024
5025
5026
5027
5028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5029 $as_echo_n "checking whether $CC supports -Werror... " >&6; }
5030 cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5031 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5032   $as_echo_n "(cached) " >&6
5033 else
5034
5035 echo 'void f(void){}' >conftest.c
5036 if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5037 eval "cv_prog_cc_flag_$cache=yes"
5038 else
5039 eval "cv_prog_cc_flag_$cache=no"
5040 fi
5041 rm -f conftest conftest.o conftest.c
5042
5043 fi
5044
5045 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5047 $as_echo "yes" >&6; }
5048 :
5049 ERRFLAG="-Werror"
5050 else
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5052 $as_echo "no" >&6; }
5053 :
5054 ERRFLAG="-errwarn"
5055 fi
5056
5057
5058
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5060 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5061 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5062 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5063   $as_echo_n "(cached) " >&6
5064 else
5065
5066 echo 'void f(void){}' >conftest.c
5067 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5068 eval "cv_prog_cc_flag_$cache=yes"
5069 else
5070 eval "cv_prog_cc_flag_$cache=no"
5071 fi
5072 rm -f conftest conftest.o conftest.c
5073
5074 fi
5075
5076 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5078 $as_echo "yes" >&6; }
5079 :
5080 ERRFLAG="$ERRFLAG -Wall"
5081 else
5082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5083 $as_echo "no" >&6; }
5084 :
5085 ERRFLAG="$ERRFLAG -errfmt"
5086 fi
5087
5088
5089
5090
5091
5092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5093 $as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5094 cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5095 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5096   $as_echo_n "(cached) " >&6
5097 else
5098
5099 echo 'void f(void){}' >conftest.c
5100 if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5101 eval "cv_prog_cc_flag_$cache=yes"
5102 else
5103 eval "cv_prog_cc_flag_$cache=no"
5104 fi
5105 rm -f conftest conftest.o conftest.c
5106
5107 fi
5108
5109 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5111 $as_echo "yes" >&6; }
5112 :
5113 C99FLAG="-std=c99"
5114 else
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5116 $as_echo "no" >&6; }
5117 :
5118
5119 fi
5120
5121
5122
5123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5124 $as_echo_n "checking whether $CC supports -xc99... " >&6; }
5125 cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5126 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5127   $as_echo_n "(cached) " >&6
5128 else
5129
5130 echo 'void f(void){}' >conftest.c
5131 if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5132 eval "cv_prog_cc_flag_$cache=yes"
5133 else
5134 eval "cv_prog_cc_flag_$cache=no"
5135 fi
5136 rm -f conftest conftest.o conftest.c
5137
5138 fi
5139
5140 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5142 $as_echo "yes" >&6; }
5143 :
5144 C99FLAG="-xc99"
5145 else
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5147 $as_echo "no" >&6; }
5148 :
5149
5150 fi
5151
5152
5153 for ac_header in getopt.h time.h
5154 do :
5155   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5156 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5157 "
5158 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5159   cat >>confdefs.h <<_ACEOF
5160 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5161 _ACEOF
5162
5163 fi
5164
5165 done
5166
5167
5168
5169
5170
5171 { $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
5172 $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; }
5173 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`
5174 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5175   $as_echo_n "(cached) " >&6
5176 else
5177
5178 echo '
5179 #include "confdefs.h"
5180 #include <stdlib.h>
5181 #include <ctype.h>
5182 #include <sys/time.h>
5183 #ifdef HAVE_TIME_H
5184 #include <time.h>
5185 #endif
5186 #include <unistd.h>
5187 #include <netdb.h>
5188 #ifdef HAVE_GETOPT_H
5189 #include <getopt.h>
5190 #endif
5191
5192 int test() {
5193         int a;
5194         char **opts = NULL;
5195         struct timeval tv;
5196         char *t;
5197         time_t time = 0;
5198         char *buf = NULL;
5199         const char* str = NULL;
5200         struct msghdr msg;
5201         msg.msg_control = 0;
5202         t = ctime_r(&time, buf);
5203         tv.tv_usec = 10;
5204         srandom(32);
5205         a = getopt(2, opts, "a");
5206         a = isascii(32);
5207         str = gai_strerror(0);
5208         if(str && t && tv.tv_usec && msg.msg_control)
5209                 a = 0;
5210         return a;
5211 }
5212 ' > conftest.c
5213 echo 'void f(){}' >>conftest.c
5214 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5215 eval "cv_prog_cc_flag_needed_$cache=no"
5216 else
5217
5218 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
5219 eval "cv_prog_cc_flag_needed_$cache=yes"
5220 else
5221 eval "cv_prog_cc_flag_needed_$cache=fail"
5222 #echo 'Test with flag fails too!'
5223 #cat conftest.c
5224 #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"
5225 #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`
5226 #exit 1
5227 fi
5228
5229 fi
5230 rm -f conftest conftest.c conftest.o
5231
5232 fi
5233
5234 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5236 $as_echo "yes" >&6; }
5237 :
5238 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"
5239 else
5240 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5242 $as_echo "no" >&6; }
5243 #echo 'Test with flag is no!'
5244 #cat conftest.c
5245 #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"
5246 #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`
5247 #exit 1
5248 :
5249
5250 else
5251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5252 $as_echo "failed" >&6; }
5253 :
5254
5255 fi
5256 fi
5257
5258
5259
5260
5261
5262 { $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
5263 $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; }
5264 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`
5265 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5266   $as_echo_n "(cached) " >&6
5267 else
5268
5269 echo '
5270 #include "confdefs.h"
5271 #include <stdlib.h>
5272 #include <ctype.h>
5273 #include <sys/time.h>
5274 #ifdef HAVE_TIME_H
5275 #include <time.h>
5276 #endif
5277 #include <unistd.h>
5278 #include <netdb.h>
5279 #ifdef HAVE_GETOPT_H
5280 #include <getopt.h>
5281 #endif
5282
5283 int test() {
5284         int a;
5285         char **opts = NULL;
5286         struct timeval tv;
5287         char *t;
5288         time_t time = 0;
5289         char *buf = NULL;
5290         const char* str = NULL;
5291         struct msghdr msg;
5292         msg.msg_control = 0;
5293         t = ctime_r(&time, buf);
5294         tv.tv_usec = 10;
5295         srandom(32);
5296         a = getopt(2, opts, "a");
5297         a = isascii(32);
5298         str = gai_strerror(0);
5299         if(str && t && tv.tv_usec && msg.msg_control)
5300                 a = 0;
5301         return a;
5302 }
5303 ' > conftest.c
5304 echo 'void f(){}' >>conftest.c
5305 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5306 eval "cv_prog_cc_flag_needed_$cache=no"
5307 else
5308
5309 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
5310 eval "cv_prog_cc_flag_needed_$cache=yes"
5311 else
5312 eval "cv_prog_cc_flag_needed_$cache=fail"
5313 #echo 'Test with flag fails too!'
5314 #cat conftest.c
5315 #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"
5316 #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`
5317 #exit 1
5318 fi
5319
5320 fi
5321 rm -f conftest conftest.c conftest.o
5322
5323 fi
5324
5325 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5327 $as_echo "yes" >&6; }
5328 :
5329 CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5330 else
5331 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5333 $as_echo "no" >&6; }
5334 #echo 'Test with flag is no!'
5335 #cat conftest.c
5336 #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"
5337 #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`
5338 #exit 1
5339 :
5340
5341 else
5342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5343 $as_echo "failed" >&6; }
5344 :
5345
5346 fi
5347 fi
5348
5349
5350
5351
5352
5353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5354 $as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5355 cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5356 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5357   $as_echo_n "(cached) " >&6
5358 else
5359
5360 echo '
5361 #include <stdbool.h>
5362 #include <ctype.h>
5363 int test() {
5364         int a = 0;
5365         return a;
5366 }
5367 ' > conftest.c
5368 echo 'void f(){}' >>conftest.c
5369 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5370 eval "cv_prog_cc_flag_needed_$cache=no"
5371 else
5372
5373 if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5374 eval "cv_prog_cc_flag_needed_$cache=yes"
5375 else
5376 eval "cv_prog_cc_flag_needed_$cache=fail"
5377 #echo 'Test with flag fails too!'
5378 #cat conftest.c
5379 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5380 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5381 #exit 1
5382 fi
5383
5384 fi
5385 rm -f conftest conftest.c conftest.o
5386
5387 fi
5388
5389 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5391 $as_echo "yes" >&6; }
5392 :
5393 CFLAGS="$CFLAGS $C99FLAG"
5394 else
5395 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5397 $as_echo "no" >&6; }
5398 #echo 'Test with flag is no!'
5399 #cat conftest.c
5400 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5401 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5402 #exit 1
5403 :
5404
5405 else
5406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5407 $as_echo "failed" >&6; }
5408 :
5409
5410 fi
5411 fi
5412
5413
5414
5415
5416
5417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
5418 $as_echo_n "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
5419 cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
5420 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5421   $as_echo_n "(cached) " >&6
5422 else
5423
5424 echo '
5425 #include <ctype.h>
5426
5427 int test() {
5428         int a;
5429         a = isascii(32);
5430         return a;
5431 }
5432 ' > conftest.c
5433 echo 'void f(){}' >>conftest.c
5434 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5435 eval "cv_prog_cc_flag_needed_$cache=no"
5436 else
5437
5438 if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5439 eval "cv_prog_cc_flag_needed_$cache=yes"
5440 else
5441 eval "cv_prog_cc_flag_needed_$cache=fail"
5442 #echo 'Test with flag fails too!'
5443 #cat conftest.c
5444 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5445 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5446 #exit 1
5447 fi
5448
5449 fi
5450 rm -f conftest conftest.c conftest.o
5451
5452 fi
5453
5454 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5456 $as_echo "yes" >&6; }
5457 :
5458 CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
5459 else
5460 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5462 $as_echo "no" >&6; }
5463 #echo 'Test with flag is no!'
5464 #cat conftest.c
5465 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5466 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5467 #exit 1
5468 :
5469
5470 else
5471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5472 $as_echo "failed" >&6; }
5473 :
5474
5475 fi
5476 fi
5477
5478
5479
5480
5481
5482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5483 $as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5484 cache=_D_GNU_SOURCE
5485 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5486   $as_echo_n "(cached) " >&6
5487 else
5488
5489 echo '
5490 #include <netinet/in.h>
5491
5492 int test() {
5493         struct in6_pktinfo inf;
5494         int a = (int)sizeof(inf);
5495         return a;
5496 }
5497 ' > conftest.c
5498 echo 'void f(){}' >>conftest.c
5499 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5500 eval "cv_prog_cc_flag_needed_$cache=no"
5501 else
5502
5503 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5504 eval "cv_prog_cc_flag_needed_$cache=yes"
5505 else
5506 eval "cv_prog_cc_flag_needed_$cache=fail"
5507 #echo 'Test with flag fails too!'
5508 #cat conftest.c
5509 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5510 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5511 #exit 1
5512 fi
5513
5514 fi
5515 rm -f conftest conftest.c conftest.o
5516
5517 fi
5518
5519 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5521 $as_echo "yes" >&6; }
5522 :
5523 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5524 else
5525 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5527 $as_echo "no" >&6; }
5528 #echo 'Test with flag is no!'
5529 #cat conftest.c
5530 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5531 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5532 #exit 1
5533 :
5534
5535 else
5536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5537 $as_echo "failed" >&6; }
5538 :
5539
5540 fi
5541 fi
5542
5543
5544 # check again for GNU_SOURCE for setresgid. May fail if setresgid
5545 # is not available at all. -D_FRSRESGID is to make this check unique.
5546 # otherwise we would get the previous cached result.
5547
5548
5549
5550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5551 $as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5552 cache=_D_GNU_SOURCE__D_FRSRESGID
5553 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5554   $as_echo_n "(cached) " >&6
5555 else
5556
5557 echo '
5558 #include <unistd.h>
5559
5560 int test() {
5561         int a = setresgid(0,0,0);
5562         a = setresuid(0,0,0);
5563         return a;
5564 }
5565 ' > conftest.c
5566 echo 'void f(){}' >>conftest.c
5567 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5568 eval "cv_prog_cc_flag_needed_$cache=no"
5569 else
5570
5571 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5572 eval "cv_prog_cc_flag_needed_$cache=yes"
5573 else
5574 eval "cv_prog_cc_flag_needed_$cache=fail"
5575 #echo 'Test with flag fails too!'
5576 #cat conftest.c
5577 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5578 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5579 #exit 1
5580 fi
5581
5582 fi
5583 rm -f conftest conftest.c conftest.o
5584
5585 fi
5586
5587 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5589 $as_echo "yes" >&6; }
5590 :
5591 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5592 else
5593 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5595 $as_echo "no" >&6; }
5596 #echo 'Test with flag is no!'
5597 #cat conftest.c
5598 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5599 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5600 #exit 1
5601 :
5602
5603 else
5604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5605 $as_echo "failed" >&6; }
5606 :
5607
5608 fi
5609 fi
5610
5611
5612
5613
5614
5615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5616 $as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5617 cache=_D_POSIX_C_SOURCE_200112
5618 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5619   $as_echo_n "(cached) " >&6
5620 else
5621
5622 echo '
5623 #include "confdefs.h"
5624 #ifdef HAVE_TIME_H
5625 #include <time.h>
5626 #endif
5627 #include <netdb.h>
5628
5629 int test() {
5630         int a = 0;
5631         char *t;
5632         time_t time = 0;
5633         char *buf = NULL;
5634         const char* str = NULL;
5635         t = ctime_r(&time, buf);
5636         str = gai_strerror(0);
5637         if(t && str)
5638                 a = 0;
5639         return a;
5640 }
5641 ' > conftest.c
5642 echo 'void f(){}' >>conftest.c
5643 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5644 eval "cv_prog_cc_flag_needed_$cache=no"
5645 else
5646
5647 if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5648 eval "cv_prog_cc_flag_needed_$cache=yes"
5649 else
5650 eval "cv_prog_cc_flag_needed_$cache=fail"
5651 #echo 'Test with flag fails too!'
5652 #cat conftest.c
5653 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5654 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5655 #exit 1
5656 fi
5657
5658 fi
5659 rm -f conftest conftest.c conftest.o
5660
5661 fi
5662
5663 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5665 $as_echo "yes" >&6; }
5666 :
5667 CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5668 else
5669 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5671 $as_echo "no" >&6; }
5672 #echo 'Test with flag is no!'
5673 #cat conftest.c
5674 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5675 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5676 #exit 1
5677 :
5678
5679 else
5680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5681 $as_echo "failed" >&6; }
5682 :
5683
5684 fi
5685 fi
5686
5687
5688
5689
5690
5691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5692 $as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5693 cache=_D__EXTENSIONS__
5694 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5695   $as_echo_n "(cached) " >&6
5696 else
5697
5698 echo '
5699 #include "confdefs.h"
5700 #include <stdlib.h>
5701 #include <ctype.h>
5702 #include <sys/time.h>
5703 #ifdef HAVE_TIME_H
5704 #include <time.h>
5705 #endif
5706 #include <unistd.h>
5707 #ifdef HAVE_GETOPT_H
5708 #include <getopt.h>
5709 #endif
5710
5711 int test() {
5712         int a;
5713         char **opts = NULL;
5714         struct timeval tv;
5715         tv.tv_usec = 10;
5716         srandom(32);
5717         a = getopt(2, opts, "a");
5718         a = isascii(32);
5719         if(tv.tv_usec)
5720                 a = 0;
5721         return a;
5722 }
5723 ' > conftest.c
5724 echo 'void f(){}' >>conftest.c
5725 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5726 eval "cv_prog_cc_flag_needed_$cache=no"
5727 else
5728
5729 if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5730 eval "cv_prog_cc_flag_needed_$cache=yes"
5731 else
5732 eval "cv_prog_cc_flag_needed_$cache=fail"
5733 #echo 'Test with flag fails too!'
5734 #cat conftest.c
5735 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5736 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5737 #exit 1
5738 fi
5739
5740 fi
5741 rm -f conftest conftest.c conftest.o
5742
5743 fi
5744
5745 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5747 $as_echo "yes" >&6; }
5748 :
5749 CFLAGS="$CFLAGS -D__EXTENSIONS__"
5750 else
5751 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5753 $as_echo "no" >&6; }
5754 #echo 'Test with flag is no!'
5755 #cat conftest.c
5756 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5757 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5758 #exit 1
5759 :
5760
5761 else
5762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5763 $as_echo "failed" >&6; }
5764 :
5765
5766 fi
5767 fi
5768
5769
5770
5771
5772 # debug mode flags warnings
5773 # Check whether --enable-checking was given.
5774 if test "${enable_checking+set}" = set; then :
5775   enableval=$enable_checking;
5776 fi
5777
5778 # Check whether --enable-debug was given.
5779 if test "${enable_debug+set}" = set; then :
5780   enableval=$enable_debug;
5781 fi
5782
5783 if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5784 else debug_enabled="$enable_checking"; fi
5785
5786 case "$debug_enabled" in
5787         yes)
5788
5789
5790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5791 $as_echo_n "checking whether $CC supports -W... " >&6; }
5792 cache=`echo W | sed 'y%.=/+-%___p_%'`
5793 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5794   $as_echo_n "(cached) " >&6
5795 else
5796
5797 echo 'void f(void){}' >conftest.c
5798 if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5799 eval "cv_prog_cc_flag_$cache=yes"
5800 else
5801 eval "cv_prog_cc_flag_$cache=no"
5802 fi
5803 rm -f conftest conftest.o conftest.c
5804
5805 fi
5806
5807 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5809 $as_echo "yes" >&6; }
5810 :
5811 CFLAGS="$CFLAGS -W"
5812 else
5813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5814 $as_echo "no" >&6; }
5815 :
5816
5817 fi
5818
5819
5820
5821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5822 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5823 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5824 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5825   $as_echo_n "(cached) " >&6
5826 else
5827
5828 echo 'void f(void){}' >conftest.c
5829 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5830 eval "cv_prog_cc_flag_$cache=yes"
5831 else
5832 eval "cv_prog_cc_flag_$cache=no"
5833 fi
5834 rm -f conftest conftest.o conftest.c
5835
5836 fi
5837
5838 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5840 $as_echo "yes" >&6; }
5841 :
5842 CFLAGS="$CFLAGS -Wall"
5843 else
5844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5845 $as_echo "no" >&6; }
5846 :
5847
5848 fi
5849
5850
5851
5852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5853 $as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5854 cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5855 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5856   $as_echo_n "(cached) " >&6
5857 else
5858
5859 echo 'void f(void){}' >conftest.c
5860 if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5861 eval "cv_prog_cc_flag_$cache=yes"
5862 else
5863 eval "cv_prog_cc_flag_$cache=no"
5864 fi
5865 rm -f conftest conftest.o conftest.c
5866
5867 fi
5868
5869 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5871 $as_echo "yes" >&6; }
5872 :
5873 CFLAGS="$CFLAGS -Wextra"
5874 else
5875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5876 $as_echo "no" >&6; }
5877 :
5878
5879 fi
5880
5881
5882
5883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
5884 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
5885 cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
5886 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5887   $as_echo_n "(cached) " >&6
5888 else
5889
5890 echo 'void f(void){}' >conftest.c
5891 if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
5892 eval "cv_prog_cc_flag_$cache=yes"
5893 else
5894 eval "cv_prog_cc_flag_$cache=no"
5895 fi
5896 rm -f conftest conftest.o conftest.c
5897
5898 fi
5899
5900 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5902 $as_echo "yes" >&6; }
5903 :
5904 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
5905 else
5906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5907 $as_echo "no" >&6; }
5908 :
5909
5910 fi
5911
5912
5913 $as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
5914
5915                 ;;
5916         no|*)
5917                 # nothing to do.
5918                 ;;
5919 esac
5920
5921     # Check whether --enable-flto was given.
5922 if test "${enable_flto+set}" = set; then :
5923   enableval=$enable_flto;
5924 fi
5925
5926     if test "x$enable_flto" != "xno"; then :
5927
5928         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
5929 $as_echo_n "checking if $CC supports -flto... " >&6; }
5930         BAKCFLAGS="$CFLAGS"
5931         CFLAGS="$CFLAGS -flto"
5932         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5933 /* end confdefs.h.  */
5934
5935 int
5936 main ()
5937 {
5938
5939   ;
5940   return 0;
5941 }
5942 _ACEOF
5943 if ac_fn_c_try_link "$LINENO"; then :
5944
5945             if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
5946                 CFLAGS="$BAKCFLAGS"
5947                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5948 $as_echo "no" >&6; }
5949             else
5950                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5951 $as_echo "yes" >&6; }
5952             fi
5953             rm -f conftest conftest.c conftest.o
5954
5955 else
5956   CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5957 $as_echo "no" >&6; }
5958 fi
5959 rm -f core conftest.err conftest.$ac_objext \
5960     conftest$ac_exeext conftest.$ac_ext
5961
5962 fi
5963
5964
5965     # Check whether --enable-pie was given.
5966 if test "${enable_pie+set}" = set; then :
5967   enableval=$enable_pie;
5968 fi
5969
5970     if test "x$enable_pie" = "xyes"; then :
5971
5972         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
5973 $as_echo_n "checking if $CC supports PIE... " >&6; }
5974         BAKLDFLAGS="$LDFLAGS"
5975         BAKCFLAGS="$CFLAGS"
5976         LDFLAGS="$LDFLAGS -pie"
5977         CFLAGS="$CFLAGS -fPIE"
5978         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5979 /* end confdefs.h.  */
5980
5981 int
5982 main ()
5983 {
5984
5985   ;
5986   return 0;
5987 }
5988 _ACEOF
5989 if ac_fn_c_try_link "$LINENO"; then :
5990
5991             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
5992                 LDFLAGS="$BAKLDFLAGS"
5993                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5994 $as_echo "no" >&6; }
5995             else
5996                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5997 $as_echo "yes" >&6; }
5998             fi
5999             rm -f conftest conftest.c conftest.o
6000
6001 else
6002   LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6003 $as_echo "no" >&6; }
6004 fi
6005 rm -f core conftest.err conftest.$ac_objext \
6006     conftest$ac_exeext conftest.$ac_ext
6007
6008 fi
6009
6010
6011     # Check whether --enable-relro_now was given.
6012 if test "${enable_relro_now+set}" = set; then :
6013   enableval=$enable_relro_now;
6014 fi
6015
6016     if test "x$enable_relro_now" = "xyes"; then :
6017
6018         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6019 $as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6020         BAKLDFLAGS="$LDFLAGS"
6021         LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6022         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6023 /* end confdefs.h.  */
6024
6025 int
6026 main ()
6027 {
6028
6029   ;
6030   return 0;
6031 }
6032 _ACEOF
6033 if ac_fn_c_try_link "$LINENO"; then :
6034
6035             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6036                 LDFLAGS="$BAKLDFLAGS"
6037                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6038 $as_echo "no" >&6; }
6039             else
6040                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6041 $as_echo "yes" >&6; }
6042             fi
6043             rm -f conftest conftest.c conftest.o
6044
6045 else
6046   LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6047 $as_echo "no" >&6; }
6048 fi
6049 rm -f core conftest.err conftest.$ac_objext \
6050     conftest$ac_exeext conftest.$ac_ext
6051
6052 fi
6053
6054
6055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6056 $as_echo_n "checking for inline... " >&6; }
6057 if ${ac_cv_c_inline+:} false; then :
6058   $as_echo_n "(cached) " >&6
6059 else
6060   ac_cv_c_inline=no
6061 for ac_kw in inline __inline__ __inline; do
6062   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6063 /* end confdefs.h.  */
6064 #ifndef __cplusplus
6065 typedef int foo_t;
6066 static $ac_kw foo_t static_foo () {return 0; }
6067 $ac_kw foo_t foo () {return 0; }
6068 #endif
6069
6070 _ACEOF
6071 if ac_fn_c_try_compile "$LINENO"; then :
6072   ac_cv_c_inline=$ac_kw
6073 fi
6074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6075   test "$ac_cv_c_inline" != no && break
6076 done
6077
6078 fi
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6080 $as_echo "$ac_cv_c_inline" >&6; }
6081
6082 case $ac_cv_c_inline in
6083   inline | yes) ;;
6084   *)
6085     case $ac_cv_c_inline in
6086       no) ac_val=;;
6087       *) ac_val=$ac_cv_c_inline;;
6088     esac
6089     cat >>confdefs.h <<_ACEOF
6090 #ifndef __cplusplus
6091 #define inline $ac_val
6092 #endif
6093 _ACEOF
6094     ;;
6095 esac
6096
6097
6098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6099 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6100 if ${ac_cv_c_format_attribute+:} false; then :
6101   $as_echo_n "(cached) " >&6
6102 else
6103   ac_cv_c_format_attribute=no
6104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6105 /* end confdefs.h.  */
6106 #include <stdio.h>
6107 void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6108 void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6109
6110 int
6111 main ()
6112 {
6113
6114    f ("%s", "str");
6115
6116   ;
6117   return 0;
6118 }
6119 _ACEOF
6120 if ac_fn_c_try_compile "$LINENO"; then :
6121   ac_cv_c_format_attribute="yes"
6122 else
6123   ac_cv_c_format_attribute="no"
6124 fi
6125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6126
6127 fi
6128
6129
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6131 $as_echo "$ac_cv_c_format_attribute" >&6; }
6132 if test $ac_cv_c_format_attribute = yes; then
6133
6134 $as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6135
6136 fi
6137
6138
6139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6140 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6141 if ${ac_cv_c_unused_attribute+:} false; then :
6142   $as_echo_n "(cached) " >&6
6143 else
6144   ac_cv_c_unused_attribute=no
6145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6146 /* end confdefs.h.  */
6147 #include <stdio.h>
6148 void f (char *u __attribute__((unused)));
6149
6150 int
6151 main ()
6152 {
6153
6154    f ("x");
6155
6156   ;
6157   return 0;
6158 }
6159 _ACEOF
6160 if ac_fn_c_try_compile "$LINENO"; then :
6161   ac_cv_c_unused_attribute="yes"
6162 else
6163   ac_cv_c_unused_attribute="no"
6164 fi
6165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6166
6167 fi
6168
6169
6170
6171
6172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6173 $as_echo "$ac_cv_c_unused_attribute" >&6; }
6174 if test $ac_cv_c_unused_attribute = yes; then
6175
6176 $as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6177
6178 fi
6179
6180
6181
6182
6183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6184 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6185 if ${ac_cv_c_weak_attribute+:} false; then :
6186   $as_echo_n "(cached) " >&6
6187 else
6188   ac_cv_c_weak_attribute=no
6189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6190 /* end confdefs.h.  */
6191  #include <stdio.h>
6192 __attribute__((weak)) void f(int x) { printf("%d", x); }
6193
6194 int
6195 main ()
6196 {
6197
6198    f(1);
6199
6200   ;
6201   return 0;
6202 }
6203 _ACEOF
6204 if ac_fn_c_try_compile "$LINENO"; then :
6205   ac_cv_c_weak_attribute="yes"
6206 else
6207   ac_cv_c_weak_attribute="no"
6208 fi
6209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6210
6211 fi
6212
6213
6214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6215 $as_echo "$ac_cv_c_weak_attribute" >&6; }
6216 if test $ac_cv_c_weak_attribute = yes; then
6217
6218 $as_echo "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6219
6220 fi
6221
6222
6223 if test "$srcdir" != "."; then
6224         CPPFLAGS="$CPPFLAGS -I$srcdir"
6225 fi
6226
6227
6228
6229 for ac_prog in flex lex
6230 do
6231   # Extract the first word of "$ac_prog", so it can be a program name with args.
6232 set dummy $ac_prog; ac_word=$2
6233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6234 $as_echo_n "checking for $ac_word... " >&6; }
6235 if ${ac_cv_prog_LEX+:} false; then :
6236   $as_echo_n "(cached) " >&6
6237 else
6238   if test -n "$LEX"; then
6239   ac_cv_prog_LEX="$LEX" # Let the user override the test.
6240 else
6241 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6242 for as_dir in $PATH
6243 do
6244   IFS=$as_save_IFS
6245   test -z "$as_dir" && as_dir=.
6246     for ac_exec_ext in '' $ac_executable_extensions; do
6247   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6248     ac_cv_prog_LEX="$ac_prog"
6249     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6250     break 2
6251   fi
6252 done
6253   done
6254 IFS=$as_save_IFS
6255
6256 fi
6257 fi
6258 LEX=$ac_cv_prog_LEX
6259 if test -n "$LEX"; then
6260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6261 $as_echo "$LEX" >&6; }
6262 else
6263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6264 $as_echo "no" >&6; }
6265 fi
6266
6267
6268   test -n "$LEX" && break
6269 done
6270 test -n "$LEX" || LEX=":"
6271
6272 if test "x$LEX" != "x:"; then
6273   cat >conftest.l <<_ACEOF
6274 %%
6275 a { ECHO; }
6276 b { REJECT; }
6277 c { yymore (); }
6278 d { yyless (1); }
6279 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6280     yyless ((input () != 0)); }
6281 f { unput (yytext[0]); }
6282 . { BEGIN INITIAL; }
6283 %%
6284 #ifdef YYTEXT_POINTER
6285 extern char *yytext;
6286 #endif
6287 int
6288 main (void)
6289 {
6290   return ! yylex () + ! yywrap ();
6291 }
6292 _ACEOF
6293 { { ac_try="$LEX conftest.l"
6294 case "(($ac_try" in
6295   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6296   *) ac_try_echo=$ac_try;;
6297 esac
6298 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6299 $as_echo "$ac_try_echo"; } >&5
6300   (eval "$LEX conftest.l") 2>&5
6301   ac_status=$?
6302   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6303   test $ac_status = 0; }
6304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6305 $as_echo_n "checking lex output file root... " >&6; }
6306 if ${ac_cv_prog_lex_root+:} false; then :
6307   $as_echo_n "(cached) " >&6
6308 else
6309
6310 if test -f lex.yy.c; then
6311   ac_cv_prog_lex_root=lex.yy
6312 elif test -f lexyy.c; then
6313   ac_cv_prog_lex_root=lexyy
6314 else
6315   as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6316 fi
6317 fi
6318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6319 $as_echo "$ac_cv_prog_lex_root" >&6; }
6320 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6321
6322 if test -z "${LEXLIB+set}"; then
6323   { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6324 $as_echo_n "checking lex library... " >&6; }
6325 if ${ac_cv_lib_lex+:} false; then :
6326   $as_echo_n "(cached) " >&6
6327 else
6328
6329     ac_save_LIBS=$LIBS
6330     ac_cv_lib_lex='none needed'
6331     for ac_lib in '' -lfl -ll; do
6332       LIBS="$ac_lib $ac_save_LIBS"
6333       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6334 /* end confdefs.h.  */
6335 `cat $LEX_OUTPUT_ROOT.c`
6336 _ACEOF
6337 if ac_fn_c_try_link "$LINENO"; then :
6338   ac_cv_lib_lex=$ac_lib
6339 fi
6340 rm -f core conftest.err conftest.$ac_objext \
6341     conftest$ac_exeext conftest.$ac_ext
6342       test "$ac_cv_lib_lex" != 'none needed' && break
6343     done
6344     LIBS=$ac_save_LIBS
6345
6346 fi
6347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6348 $as_echo "$ac_cv_lib_lex" >&6; }
6349   test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6350 fi
6351
6352
6353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6354 $as_echo_n "checking whether yytext is a pointer... " >&6; }
6355 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6356   $as_echo_n "(cached) " >&6
6357 else
6358   # POSIX says lex can declare yytext either as a pointer or an array; the
6359 # default is implementation-dependent.  Figure out which it is, since
6360 # not all implementations provide the %pointer and %array declarations.
6361 ac_cv_prog_lex_yytext_pointer=no
6362 ac_save_LIBS=$LIBS
6363 LIBS="$LEXLIB $ac_save_LIBS"
6364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6365 /* end confdefs.h.  */
6366
6367   #define YYTEXT_POINTER 1
6368 `cat $LEX_OUTPUT_ROOT.c`
6369 _ACEOF
6370 if ac_fn_c_try_link "$LINENO"; then :
6371   ac_cv_prog_lex_yytext_pointer=yes
6372 fi
6373 rm -f core conftest.err conftest.$ac_objext \
6374     conftest$ac_exeext conftest.$ac_ext
6375 LIBS=$ac_save_LIBS
6376
6377 fi
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6379 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6380 if test $ac_cv_prog_lex_yytext_pointer = yes; then
6381
6382 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6383
6384 fi
6385 rm -f conftest.l $LEX_OUTPUT_ROOT.c
6386
6387 fi
6388
6389         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6390 $as_echo_n "checking for yylex_destroy... " >&6; }
6391         if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6392
6393 $as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6394
6395                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6396 $as_echo "yes" >&6; }
6397         else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6398 $as_echo "no" >&6; }; fi
6399
6400 for ac_prog in 'bison -y' byacc
6401 do
6402   # Extract the first word of "$ac_prog", so it can be a program name with args.
6403 set dummy $ac_prog; ac_word=$2
6404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6405 $as_echo_n "checking for $ac_word... " >&6; }
6406 if ${ac_cv_prog_YACC+:} false; then :
6407   $as_echo_n "(cached) " >&6
6408 else
6409   if test -n "$YACC"; then
6410   ac_cv_prog_YACC="$YACC" # Let the user override the test.
6411 else
6412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6413 for as_dir in $PATH
6414 do
6415   IFS=$as_save_IFS
6416   test -z "$as_dir" && as_dir=.
6417     for ac_exec_ext in '' $ac_executable_extensions; do
6418   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6419     ac_cv_prog_YACC="$ac_prog"
6420     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6421     break 2
6422   fi
6423 done
6424   done
6425 IFS=$as_save_IFS
6426
6427 fi
6428 fi
6429 YACC=$ac_cv_prog_YACC
6430 if test -n "$YACC"; then
6431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6432 $as_echo "$YACC" >&6; }
6433 else
6434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6435 $as_echo "no" >&6; }
6436 fi
6437
6438
6439   test -n "$YACC" && break
6440 done
6441 test -n "$YACC" || YACC="yacc"
6442
6443 # Extract the first word of "doxygen", so it can be a program name with args.
6444 set dummy doxygen; ac_word=$2
6445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6446 $as_echo_n "checking for $ac_word... " >&6; }
6447 if ${ac_cv_prog_doxygen+:} false; then :
6448   $as_echo_n "(cached) " >&6
6449 else
6450   if test -n "$doxygen"; then
6451   ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6452 else
6453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6454 for as_dir in $PATH
6455 do
6456   IFS=$as_save_IFS
6457   test -z "$as_dir" && as_dir=.
6458     for ac_exec_ext in '' $ac_executable_extensions; do
6459   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6460     ac_cv_prog_doxygen="doxygen"
6461     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6462     break 2
6463   fi
6464 done
6465   done
6466 IFS=$as_save_IFS
6467
6468 fi
6469 fi
6470 doxygen=$ac_cv_prog_doxygen
6471 if test -n "$doxygen"; then
6472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6473 $as_echo "$doxygen" >&6; }
6474 else
6475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6476 $as_echo "no" >&6; }
6477 fi
6478
6479
6480 if test -n "$ac_tool_prefix"; then
6481   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6482 set dummy ${ac_tool_prefix}strip; ac_word=$2
6483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6484 $as_echo_n "checking for $ac_word... " >&6; }
6485 if ${ac_cv_prog_STRIP+:} false; then :
6486   $as_echo_n "(cached) " >&6
6487 else
6488   if test -n "$STRIP"; then
6489   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6490 else
6491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6492 for as_dir in $PATH
6493 do
6494   IFS=$as_save_IFS
6495   test -z "$as_dir" && as_dir=.
6496     for ac_exec_ext in '' $ac_executable_extensions; do
6497   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6498     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6499     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6500     break 2
6501   fi
6502 done
6503   done
6504 IFS=$as_save_IFS
6505
6506 fi
6507 fi
6508 STRIP=$ac_cv_prog_STRIP
6509 if test -n "$STRIP"; then
6510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6511 $as_echo "$STRIP" >&6; }
6512 else
6513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6514 $as_echo "no" >&6; }
6515 fi
6516
6517
6518 fi
6519 if test -z "$ac_cv_prog_STRIP"; then
6520   ac_ct_STRIP=$STRIP
6521   # Extract the first word of "strip", so it can be a program name with args.
6522 set dummy strip; ac_word=$2
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6524 $as_echo_n "checking for $ac_word... " >&6; }
6525 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6526   $as_echo_n "(cached) " >&6
6527 else
6528   if test -n "$ac_ct_STRIP"; then
6529   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6530 else
6531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6532 for as_dir in $PATH
6533 do
6534   IFS=$as_save_IFS
6535   test -z "$as_dir" && as_dir=.
6536     for ac_exec_ext in '' $ac_executable_extensions; do
6537   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6538     ac_cv_prog_ac_ct_STRIP="strip"
6539     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6540     break 2
6541   fi
6542 done
6543   done
6544 IFS=$as_save_IFS
6545
6546 fi
6547 fi
6548 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6549 if test -n "$ac_ct_STRIP"; then
6550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6551 $as_echo "$ac_ct_STRIP" >&6; }
6552 else
6553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6554 $as_echo "no" >&6; }
6555 fi
6556
6557   if test "x$ac_ct_STRIP" = x; then
6558     STRIP=""
6559   else
6560     case $cross_compiling:$ac_tool_warned in
6561 yes:)
6562 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6563 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6564 ac_tool_warned=yes ;;
6565 esac
6566     STRIP=$ac_ct_STRIP
6567   fi
6568 else
6569   STRIP="$ac_cv_prog_STRIP"
6570 fi
6571
6572 ac_aux_dir=
6573 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6574   if test -f "$ac_dir/install-sh"; then
6575     ac_aux_dir=$ac_dir
6576     ac_install_sh="$ac_aux_dir/install-sh -c"
6577     break
6578   elif test -f "$ac_dir/install.sh"; then
6579     ac_aux_dir=$ac_dir
6580     ac_install_sh="$ac_aux_dir/install.sh -c"
6581     break
6582   elif test -f "$ac_dir/shtool"; then
6583     ac_aux_dir=$ac_dir
6584     ac_install_sh="$ac_aux_dir/shtool install -c"
6585     break
6586   fi
6587 done
6588 if test -z "$ac_aux_dir"; then
6589   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6590 fi
6591
6592 # These three variables are undocumented and unsupported,
6593 # and are intended to be withdrawn in a future Autoconf release.
6594 # They can cause serious problems if a builder's source tree is in a directory
6595 # whose full name contains unusual characters.
6596 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6597 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6598 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6599
6600
6601 # Make sure we can run config.sub.
6602 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6603   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6604
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6606 $as_echo_n "checking build system type... " >&6; }
6607 if ${ac_cv_build+:} false; then :
6608   $as_echo_n "(cached) " >&6
6609 else
6610   ac_build_alias=$build_alias
6611 test "x$ac_build_alias" = x &&
6612   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6613 test "x$ac_build_alias" = x &&
6614   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6615 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6616   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6617
6618 fi
6619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6620 $as_echo "$ac_cv_build" >&6; }
6621 case $ac_cv_build in
6622 *-*-*) ;;
6623 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6624 esac
6625 build=$ac_cv_build
6626 ac_save_IFS=$IFS; IFS='-'
6627 set x $ac_cv_build
6628 shift
6629 build_cpu=$1
6630 build_vendor=$2
6631 shift; shift
6632 # Remember, the first character of IFS is used to create $*,
6633 # except with old shells:
6634 build_os=$*
6635 IFS=$ac_save_IFS
6636 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6637
6638
6639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6640 $as_echo_n "checking host system type... " >&6; }
6641 if ${ac_cv_host+:} false; then :
6642   $as_echo_n "(cached) " >&6
6643 else
6644   if test "x$host_alias" = x; then
6645   ac_cv_host=$ac_cv_build
6646 else
6647   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6648     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6649 fi
6650
6651 fi
6652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6653 $as_echo "$ac_cv_host" >&6; }
6654 case $ac_cv_host in
6655 *-*-*) ;;
6656 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6657 esac
6658 host=$ac_cv_host
6659 ac_save_IFS=$IFS; IFS='-'
6660 set x $ac_cv_host
6661 shift
6662 host_cpu=$1
6663 host_vendor=$2
6664 shift; shift
6665 # Remember, the first character of IFS is used to create $*,
6666 # except with old shells:
6667 host_os=$*
6668 IFS=$ac_save_IFS
6669 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6670
6671
6672
6673 # skip these tests, we do not need them.
6674
6675
6676
6677
6678
6679
6680
6681
6682 # always use ./libtool unless override from commandline (libtool=mylibtool)
6683 if test -z "$libtool"; then
6684         libtool="./libtool"
6685 fi
6686
6687 # avoid libtool max commandline length test on systems that fork slowly.
6688
6689 if echo "$host_os" | grep "sunos4" >/dev/null; then
6690         lt_cv_sys_max_cmd_len=32750;
6691 fi
6692 if test -n "$ac_tool_prefix"; then
6693   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6694 set dummy ${ac_tool_prefix}ar; ac_word=$2
6695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6696 $as_echo_n "checking for $ac_word... " >&6; }
6697 if ${ac_cv_path_AR+:} false; then :
6698   $as_echo_n "(cached) " >&6
6699 else
6700   case $AR in
6701   [\\/]* | ?:[\\/]*)
6702   ac_cv_path_AR="$AR" # Let the user override the test with a path.
6703   ;;
6704   *)
6705   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6706 for as_dir in $PATH
6707 do
6708   IFS=$as_save_IFS
6709   test -z "$as_dir" && as_dir=.
6710     for ac_exec_ext in '' $ac_executable_extensions; do
6711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6712     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6714     break 2
6715   fi
6716 done
6717   done
6718 IFS=$as_save_IFS
6719
6720   ;;
6721 esac
6722 fi
6723 AR=$ac_cv_path_AR
6724 if test -n "$AR"; then
6725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6726 $as_echo "$AR" >&6; }
6727 else
6728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6729 $as_echo "no" >&6; }
6730 fi
6731
6732
6733 fi
6734 if test -z "$ac_cv_path_AR"; then
6735   ac_pt_AR=$AR
6736   # Extract the first word of "ar", so it can be a program name with args.
6737 set dummy ar; ac_word=$2
6738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6739 $as_echo_n "checking for $ac_word... " >&6; }
6740 if ${ac_cv_path_ac_pt_AR+:} false; then :
6741   $as_echo_n "(cached) " >&6
6742 else
6743   case $ac_pt_AR in
6744   [\\/]* | ?:[\\/]*)
6745   ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6746   ;;
6747   *)
6748   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6749 for as_dir in $PATH
6750 do
6751   IFS=$as_save_IFS
6752   test -z "$as_dir" && as_dir=.
6753     for ac_exec_ext in '' $ac_executable_extensions; do
6754   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6755     ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6757     break 2
6758   fi
6759 done
6760   done
6761 IFS=$as_save_IFS
6762
6763   ;;
6764 esac
6765 fi
6766 ac_pt_AR=$ac_cv_path_ac_pt_AR
6767 if test -n "$ac_pt_AR"; then
6768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6769 $as_echo "$ac_pt_AR" >&6; }
6770 else
6771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6772 $as_echo "no" >&6; }
6773 fi
6774
6775   if test "x$ac_pt_AR" = x; then
6776     AR="false"
6777   else
6778     case $cross_compiling:$ac_tool_warned in
6779 yes:)
6780 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6781 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6782 ac_tool_warned=yes ;;
6783 esac
6784     AR=$ac_pt_AR
6785   fi
6786 else
6787   AR="$ac_cv_path_AR"
6788 fi
6789
6790 if test $AR = false; then
6791         as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
6792 fi
6793
6794 case `pwd` in
6795   *\ * | *\     *)
6796     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
6797 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
6798 esac
6799
6800
6801
6802 macro_version='2.4.6'
6803 macro_revision='2.4.6'
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817 ltmain=$ac_aux_dir/ltmain.sh
6818
6819 # Backslashify metacharacters that are still active within
6820 # double-quoted strings.
6821 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6822
6823 # Same as above, but do not quote variable references.
6824 double_quote_subst='s/\(["`\\]\)/\\\1/g'
6825
6826 # Sed substitution to delay expansion of an escaped shell variable in a
6827 # double_quote_subst'ed string.
6828 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6829
6830 # Sed substitution to delay expansion of an escaped single quote.
6831 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
6832
6833 # Sed substitution to avoid accidental globbing in evaled expressions
6834 no_glob_subst='s/\*/\\\*/g'
6835
6836 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6837 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
6838 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
6839
6840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
6841 $as_echo_n "checking how to print strings... " >&6; }
6842 # Test print first, because it will be a builtin if present.
6843 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6844    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6845   ECHO='print -r --'
6846 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6847   ECHO='printf %s\n'
6848 else
6849   # Use this function as a fallback that always works.
6850   func_fallback_echo ()
6851   {
6852     eval 'cat <<_LTECHO_EOF
6853 $1
6854 _LTECHO_EOF'
6855   }
6856   ECHO='func_fallback_echo'
6857 fi
6858
6859 # func_echo_all arg...
6860 # Invoke $ECHO with all args, space-separated.
6861 func_echo_all ()
6862 {
6863     $ECHO ""
6864 }
6865
6866 case $ECHO in
6867   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
6868 $as_echo "printf" >&6; } ;;
6869   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
6870 $as_echo "print -r" >&6; } ;;
6871   *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
6872 $as_echo "cat" >&6; } ;;
6873 esac
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6889 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6890 if ${ac_cv_path_SED+:} false; then :
6891   $as_echo_n "(cached) " >&6
6892 else
6893             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6894      for ac_i in 1 2 3 4 5 6 7; do
6895        ac_script="$ac_script$as_nl$ac_script"
6896      done
6897      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6898      { ac_script=; unset ac_script;}
6899      if test -z "$SED"; then
6900   ac_path_SED_found=false
6901   # Loop through the user's path and test for each of PROGNAME-LIST
6902   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6903 for as_dir in $PATH
6904 do
6905   IFS=$as_save_IFS
6906   test -z "$as_dir" && as_dir=.
6907     for ac_prog in sed gsed; do
6908     for ac_exec_ext in '' $ac_executable_extensions; do
6909       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6910       as_fn_executable_p "$ac_path_SED" || continue
6911 # Check for GNU ac_path_SED and select it if it is found.
6912   # Check for GNU $ac_path_SED
6913 case `"$ac_path_SED" --version 2>&1` in
6914 *GNU*)
6915   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6916 *)
6917   ac_count=0
6918   $as_echo_n 0123456789 >"conftest.in"
6919   while :
6920   do
6921     cat "conftest.in" "conftest.in" >"conftest.tmp"
6922     mv "conftest.tmp" "conftest.in"
6923     cp "conftest.in" "conftest.nl"
6924     $as_echo '' >> "conftest.nl"
6925     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6926     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6927     as_fn_arith $ac_count + 1 && ac_count=$as_val
6928     if test $ac_count -gt ${ac_path_SED_max-0}; then
6929       # Best one so far, save it but keep looking for a better one
6930       ac_cv_path_SED="$ac_path_SED"
6931       ac_path_SED_max=$ac_count
6932     fi
6933     # 10*(2^10) chars as input seems more than enough
6934     test $ac_count -gt 10 && break
6935   done
6936   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6937 esac
6938
6939       $ac_path_SED_found && break 3
6940     done
6941   done
6942   done
6943 IFS=$as_save_IFS
6944   if test -z "$ac_cv_path_SED"; then
6945     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6946   fi
6947 else
6948   ac_cv_path_SED=$SED
6949 fi
6950
6951 fi
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6953 $as_echo "$ac_cv_path_SED" >&6; }
6954  SED="$ac_cv_path_SED"
6955   rm -f conftest.sed
6956
6957 test -z "$SED" && SED=sed
6958 Xsed="$SED -e 1s/^X//"
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6971 $as_echo_n "checking for fgrep... " >&6; }
6972 if ${ac_cv_path_FGREP+:} false; then :
6973   $as_echo_n "(cached) " >&6
6974 else
6975   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6976    then ac_cv_path_FGREP="$GREP -F"
6977    else
6978      if test -z "$FGREP"; then
6979   ac_path_FGREP_found=false
6980   # Loop through the user's path and test for each of PROGNAME-LIST
6981   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6982 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6983 do
6984   IFS=$as_save_IFS
6985   test -z "$as_dir" && as_dir=.
6986     for ac_prog in fgrep; do
6987     for ac_exec_ext in '' $ac_executable_extensions; do
6988       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6989       as_fn_executable_p "$ac_path_FGREP" || continue
6990 # Check for GNU ac_path_FGREP and select it if it is found.
6991   # Check for GNU $ac_path_FGREP
6992 case `"$ac_path_FGREP" --version 2>&1` in
6993 *GNU*)
6994   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6995 *)
6996   ac_count=0
6997   $as_echo_n 0123456789 >"conftest.in"
6998   while :
6999   do
7000     cat "conftest.in" "conftest.in" >"conftest.tmp"
7001     mv "conftest.tmp" "conftest.in"
7002     cp "conftest.in" "conftest.nl"
7003     $as_echo 'FGREP' >> "conftest.nl"
7004     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7005     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7006     as_fn_arith $ac_count + 1 && ac_count=$as_val
7007     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7008       # Best one so far, save it but keep looking for a better one
7009       ac_cv_path_FGREP="$ac_path_FGREP"
7010       ac_path_FGREP_max=$ac_count
7011     fi
7012     # 10*(2^10) chars as input seems more than enough
7013     test $ac_count -gt 10 && break
7014   done
7015   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7016 esac
7017
7018       $ac_path_FGREP_found && break 3
7019     done
7020   done
7021   done
7022 IFS=$as_save_IFS
7023   if test -z "$ac_cv_path_FGREP"; then
7024     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7025   fi
7026 else
7027   ac_cv_path_FGREP=$FGREP
7028 fi
7029
7030    fi
7031 fi
7032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7033 $as_echo "$ac_cv_path_FGREP" >&6; }
7034  FGREP="$ac_cv_path_FGREP"
7035
7036
7037 test -z "$GREP" && GREP=grep
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057 # Check whether --with-gnu-ld was given.
7058 if test "${with_gnu_ld+set}" = set; then :
7059   withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7060 else
7061   with_gnu_ld=no
7062 fi
7063
7064 ac_prog=ld
7065 if test yes = "$GCC"; then
7066   # Check if gcc -print-prog-name=ld gives a path.
7067   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7068 $as_echo_n "checking for ld used by $CC... " >&6; }
7069   case $host in
7070   *-*-mingw*)
7071     # gcc leaves a trailing carriage return, which upsets mingw
7072     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7073   *)
7074     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7075   esac
7076   case $ac_prog in
7077     # Accept absolute paths.
7078     [\\/]* | ?:[\\/]*)
7079       re_direlt='/[^/][^/]*/\.\./'
7080       # Canonicalize the pathname of ld
7081       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7082       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7083         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7084       done
7085       test -z "$LD" && LD=$ac_prog
7086       ;;
7087   "")
7088     # If it fails, then pretend we aren't using GCC.
7089     ac_prog=ld
7090     ;;
7091   *)
7092     # If it is relative, then search for the first ld in PATH.
7093     with_gnu_ld=unknown
7094     ;;
7095   esac
7096 elif test yes = "$with_gnu_ld"; then
7097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7098 $as_echo_n "checking for GNU ld... " >&6; }
7099 else
7100   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7101 $as_echo_n "checking for non-GNU ld... " >&6; }
7102 fi
7103 if ${lt_cv_path_LD+:} false; then :
7104   $as_echo_n "(cached) " >&6
7105 else
7106   if test -z "$LD"; then
7107   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7108   for ac_dir in $PATH; do
7109     IFS=$lt_save_ifs
7110     test -z "$ac_dir" && ac_dir=.
7111     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7112       lt_cv_path_LD=$ac_dir/$ac_prog
7113       # Check to see if the program is GNU ld.  I'd rather use --version,
7114       # but apparently some variants of GNU ld only accept -v.
7115       # Break only if it was the GNU/non-GNU ld that we prefer.
7116       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7117       *GNU* | *'with BFD'*)
7118         test no != "$with_gnu_ld" && break
7119         ;;
7120       *)
7121         test yes != "$with_gnu_ld" && break
7122         ;;
7123       esac
7124     fi
7125   done
7126   IFS=$lt_save_ifs
7127 else
7128   lt_cv_path_LD=$LD # Let the user override the test with a path.
7129 fi
7130 fi
7131
7132 LD=$lt_cv_path_LD
7133 if test -n "$LD"; then
7134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7135 $as_echo "$LD" >&6; }
7136 else
7137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7138 $as_echo "no" >&6; }
7139 fi
7140 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7142 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7143 if ${lt_cv_prog_gnu_ld+:} false; then :
7144   $as_echo_n "(cached) " >&6
7145 else
7146   # I'd rather use --version here, but apparently some GNU lds only accept -v.
7147 case `$LD -v 2>&1 </dev/null` in
7148 *GNU* | *'with BFD'*)
7149   lt_cv_prog_gnu_ld=yes
7150   ;;
7151 *)
7152   lt_cv_prog_gnu_ld=no
7153   ;;
7154 esac
7155 fi
7156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7157 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
7158 with_gnu_ld=$lt_cv_prog_gnu_ld
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7169 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7170 if ${lt_cv_path_NM+:} false; then :
7171   $as_echo_n "(cached) " >&6
7172 else
7173   if test -n "$NM"; then
7174   # Let the user override the test.
7175   lt_cv_path_NM=$NM
7176 else
7177   lt_nm_to_check=${ac_tool_prefix}nm
7178   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7179     lt_nm_to_check="$lt_nm_to_check nm"
7180   fi
7181   for lt_tmp_nm in $lt_nm_to_check; do
7182     lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7183     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7184       IFS=$lt_save_ifs
7185       test -z "$ac_dir" && ac_dir=.
7186       tmp_nm=$ac_dir/$lt_tmp_nm
7187       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7188         # Check to see if the nm accepts a BSD-compat flag.
7189         # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7190         #   nm: unknown option "B" ignored
7191         # Tru64's nm complains that /dev/null is an invalid object file
7192         # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7193         case $build_os in
7194         mingw*) lt_bad_file=conftest.nm/nofile ;;
7195         *) lt_bad_file=/dev/null ;;
7196         esac
7197         case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7198         *$lt_bad_file* | *'Invalid file or object type'*)
7199           lt_cv_path_NM="$tmp_nm -B"
7200           break 2
7201           ;;
7202         *)
7203           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7204           */dev/null*)
7205             lt_cv_path_NM="$tmp_nm -p"
7206             break 2
7207             ;;
7208           *)
7209             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7210             continue # so that we can try to find one that supports BSD flags
7211             ;;
7212           esac
7213           ;;
7214         esac
7215       fi
7216     done
7217     IFS=$lt_save_ifs
7218   done
7219   : ${lt_cv_path_NM=no}
7220 fi
7221 fi
7222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7223 $as_echo "$lt_cv_path_NM" >&6; }
7224 if test no != "$lt_cv_path_NM"; then
7225   NM=$lt_cv_path_NM
7226 else
7227   # Didn't find any BSD compatible name lister, look for dumpbin.
7228   if test -n "$DUMPBIN"; then :
7229     # Let the user override the test.
7230   else
7231     if test -n "$ac_tool_prefix"; then
7232   for ac_prog in dumpbin "link -dump"
7233   do
7234     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7235 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7237 $as_echo_n "checking for $ac_word... " >&6; }
7238 if ${ac_cv_prog_DUMPBIN+:} false; then :
7239   $as_echo_n "(cached) " >&6
7240 else
7241   if test -n "$DUMPBIN"; then
7242   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7243 else
7244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7245 for as_dir in $PATH
7246 do
7247   IFS=$as_save_IFS
7248   test -z "$as_dir" && as_dir=.
7249     for ac_exec_ext in '' $ac_executable_extensions; do
7250   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7251     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7252     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7253     break 2
7254   fi
7255 done
7256   done
7257 IFS=$as_save_IFS
7258
7259 fi
7260 fi
7261 DUMPBIN=$ac_cv_prog_DUMPBIN
7262 if test -n "$DUMPBIN"; then
7263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7264 $as_echo "$DUMPBIN" >&6; }
7265 else
7266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7267 $as_echo "no" >&6; }
7268 fi
7269
7270
7271     test -n "$DUMPBIN" && break
7272   done
7273 fi
7274 if test -z "$DUMPBIN"; then
7275   ac_ct_DUMPBIN=$DUMPBIN
7276   for ac_prog in dumpbin "link -dump"
7277 do
7278   # Extract the first word of "$ac_prog", so it can be a program name with args.
7279 set dummy $ac_prog; ac_word=$2
7280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7281 $as_echo_n "checking for $ac_word... " >&6; }
7282 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7283   $as_echo_n "(cached) " >&6
7284 else
7285   if test -n "$ac_ct_DUMPBIN"; then
7286   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7287 else
7288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7289 for as_dir in $PATH
7290 do
7291   IFS=$as_save_IFS
7292   test -z "$as_dir" && as_dir=.
7293     for ac_exec_ext in '' $ac_executable_extensions; do
7294   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7295     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7296     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7297     break 2
7298   fi
7299 done
7300   done
7301 IFS=$as_save_IFS
7302
7303 fi
7304 fi
7305 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7306 if test -n "$ac_ct_DUMPBIN"; then
7307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7308 $as_echo "$ac_ct_DUMPBIN" >&6; }
7309 else
7310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7311 $as_echo "no" >&6; }
7312 fi
7313
7314
7315   test -n "$ac_ct_DUMPBIN" && break
7316 done
7317
7318   if test "x$ac_ct_DUMPBIN" = x; then
7319     DUMPBIN=":"
7320   else
7321     case $cross_compiling:$ac_tool_warned in
7322 yes:)
7323 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7324 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7325 ac_tool_warned=yes ;;
7326 esac
7327     DUMPBIN=$ac_ct_DUMPBIN
7328   fi
7329 fi
7330
7331     case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7332     *COFF*)
7333       DUMPBIN="$DUMPBIN -symbols -headers"
7334       ;;
7335     *)
7336       DUMPBIN=:
7337       ;;
7338     esac
7339   fi
7340
7341   if test : != "$DUMPBIN"; then
7342     NM=$DUMPBIN
7343   fi
7344 fi
7345 test -z "$NM" && NM=nm
7346
7347
7348
7349
7350
7351
7352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7353 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
7354 if ${lt_cv_nm_interface+:} false; then :
7355   $as_echo_n "(cached) " >&6
7356 else
7357   lt_cv_nm_interface="BSD nm"
7358   echo "int some_variable = 0;" > conftest.$ac_ext
7359   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7360   (eval "$ac_compile" 2>conftest.err)
7361   cat conftest.err >&5
7362   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7363   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7364   cat conftest.err >&5
7365   (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7366   cat conftest.out >&5
7367   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7368     lt_cv_nm_interface="MS dumpbin"
7369   fi
7370   rm -f conftest*
7371 fi
7372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7373 $as_echo "$lt_cv_nm_interface" >&6; }
7374
7375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7376 $as_echo_n "checking whether ln -s works... " >&6; }
7377 LN_S=$as_ln_s
7378 if test "$LN_S" = "ln -s"; then
7379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7380 $as_echo "yes" >&6; }
7381 else
7382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7383 $as_echo "no, using $LN_S" >&6; }
7384 fi
7385
7386 # find the maximum length of command line arguments
7387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7388 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7389 if ${lt_cv_sys_max_cmd_len+:} false; then :
7390   $as_echo_n "(cached) " >&6
7391 else
7392     i=0
7393   teststring=ABCD
7394
7395   case $build_os in
7396   msdosdjgpp*)
7397     # On DJGPP, this test can blow up pretty badly due to problems in libc
7398     # (any single argument exceeding 2000 bytes causes a buffer overrun
7399     # during glob expansion).  Even if it were fixed, the result of this
7400     # check would be larger than it should be.
7401     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7402     ;;
7403
7404   gnu*)
7405     # Under GNU Hurd, this test is not required because there is
7406     # no limit to the length of command line arguments.
7407     # Libtool will interpret -1 as no limit whatsoever
7408     lt_cv_sys_max_cmd_len=-1;
7409     ;;
7410
7411   cygwin* | mingw* | cegcc*)
7412     # On Win9x/ME, this test blows up -- it succeeds, but takes
7413     # about 5 minutes as the teststring grows exponentially.
7414     # Worse, since 9x/ME are not pre-emptively multitasking,
7415     # you end up with a "frozen" computer, even though with patience
7416     # the test eventually succeeds (with a max line length of 256k).
7417     # Instead, let's just punt: use the minimum linelength reported by
7418     # all of the supported platforms: 8192 (on NT/2K/XP).
7419     lt_cv_sys_max_cmd_len=8192;
7420     ;;
7421
7422   mint*)
7423     # On MiNT this can take a long time and run out of memory.
7424     lt_cv_sys_max_cmd_len=8192;
7425     ;;
7426
7427   amigaos*)
7428     # On AmigaOS with pdksh, this test takes hours, literally.
7429     # So we just punt and use a minimum line length of 8192.
7430     lt_cv_sys_max_cmd_len=8192;
7431     ;;
7432
7433   bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7434     # This has been around since 386BSD, at least.  Likely further.
7435     if test -x /sbin/sysctl; then
7436       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7437     elif test -x /usr/sbin/sysctl; then
7438       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7439     else
7440       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7441     fi
7442     # And add a safety zone
7443     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7444     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7445     ;;
7446
7447   interix*)
7448     # We know the value 262144 and hardcode it with a safety zone (like BSD)
7449     lt_cv_sys_max_cmd_len=196608
7450     ;;
7451
7452   os2*)
7453     # The test takes a long time on OS/2.
7454     lt_cv_sys_max_cmd_len=8192
7455     ;;
7456
7457   osf*)
7458     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7459     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7460     # nice to cause kernel panics so lets avoid the loop below.
7461     # First set a reasonable default.
7462     lt_cv_sys_max_cmd_len=16384
7463     #
7464     if test -x /sbin/sysconfig; then
7465       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7466         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7467       esac
7468     fi
7469     ;;
7470   sco3.2v5*)
7471     lt_cv_sys_max_cmd_len=102400
7472     ;;
7473   sysv5* | sco5v6* | sysv4.2uw2*)
7474     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7475     if test -n "$kargmax"; then
7476       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[  ]//'`
7477     else
7478       lt_cv_sys_max_cmd_len=32768
7479     fi
7480     ;;
7481   *)
7482     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7483     if test -n "$lt_cv_sys_max_cmd_len" && \
7484        test undefined != "$lt_cv_sys_max_cmd_len"; then
7485       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7486       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7487     else
7488       # Make teststring a little bigger before we do anything with it.
7489       # a 1K string should be a reasonable start.
7490       for i in 1 2 3 4 5 6 7 8; do
7491         teststring=$teststring$teststring
7492       done
7493       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7494       # If test is not a shell built-in, we'll probably end up computing a
7495       # maximum length that is only half of the actual maximum length, but
7496       # we can't tell.
7497       while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7498                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7499               test 17 != "$i" # 1/2 MB should be enough
7500       do
7501         i=`expr $i + 1`
7502         teststring=$teststring$teststring
7503       done
7504       # Only check the string length outside the loop.
7505       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7506       teststring=
7507       # Add a significant safety factor because C++ compilers can tack on
7508       # massive amounts of additional arguments before passing them to the
7509       # linker.  It appears as though 1/2 is a usable value.
7510       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7511     fi
7512     ;;
7513   esac
7514
7515 fi
7516
7517 if test -n "$lt_cv_sys_max_cmd_len"; then
7518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7519 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7520 else
7521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7522 $as_echo "none" >&6; }
7523 fi
7524 max_cmd_len=$lt_cv_sys_max_cmd_len
7525
7526
7527
7528
7529
7530
7531 : ${CP="cp -f"}
7532 : ${MV="mv -f"}
7533 : ${RM="rm -f"}
7534
7535 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7536   lt_unset=unset
7537 else
7538   lt_unset=false
7539 fi
7540
7541
7542
7543
7544
7545 # test EBCDIC or ASCII
7546 case `echo X|tr X '\101'` in
7547  A) # ASCII based system
7548     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7549   lt_SP2NL='tr \040 \012'
7550   lt_NL2SP='tr \015\012 \040\040'
7551   ;;
7552  *) # EBCDIC based system
7553   lt_SP2NL='tr \100 \n'
7554   lt_NL2SP='tr \r\n \100\100'
7555   ;;
7556 esac
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7567 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7568 if ${lt_cv_to_host_file_cmd+:} false; then :
7569   $as_echo_n "(cached) " >&6
7570 else
7571   case $host in
7572   *-*-mingw* )
7573     case $build in
7574       *-*-mingw* ) # actually msys
7575         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7576         ;;
7577       *-*-cygwin* )
7578         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7579         ;;
7580       * ) # otherwise, assume *nix
7581         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7582         ;;
7583     esac
7584     ;;
7585   *-*-cygwin* )
7586     case $build in
7587       *-*-mingw* ) # actually msys
7588         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7589         ;;
7590       *-*-cygwin* )
7591         lt_cv_to_host_file_cmd=func_convert_file_noop
7592         ;;
7593       * ) # otherwise, assume *nix
7594         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7595         ;;
7596     esac
7597     ;;
7598   * ) # unhandled hosts (and "normal" native builds)
7599     lt_cv_to_host_file_cmd=func_convert_file_noop
7600     ;;
7601 esac
7602
7603 fi
7604
7605 to_host_file_cmd=$lt_cv_to_host_file_cmd
7606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7607 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
7608
7609
7610
7611
7612
7613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7614 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7615 if ${lt_cv_to_tool_file_cmd+:} false; then :
7616   $as_echo_n "(cached) " >&6
7617 else
7618   #assume ordinary cross tools, or native build.
7619 lt_cv_to_tool_file_cmd=func_convert_file_noop
7620 case $host in
7621   *-*-mingw* )
7622     case $build in
7623       *-*-mingw* ) # actually msys
7624         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7625         ;;
7626     esac
7627     ;;
7628 esac
7629
7630 fi
7631
7632 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7634 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7635
7636
7637
7638
7639
7640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7641 $as_echo_n "checking for $LD option to reload object files... " >&6; }
7642 if ${lt_cv_ld_reload_flag+:} false; then :
7643   $as_echo_n "(cached) " >&6
7644 else
7645   lt_cv_ld_reload_flag='-r'
7646 fi
7647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7648 $as_echo "$lt_cv_ld_reload_flag" >&6; }
7649 reload_flag=$lt_cv_ld_reload_flag
7650 case $reload_flag in
7651 "" | " "*) ;;
7652 *) reload_flag=" $reload_flag" ;;
7653 esac
7654 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7655 case $host_os in
7656   cygwin* | mingw* | pw32* | cegcc*)
7657     if test yes != "$GCC"; then
7658       reload_cmds=false
7659     fi
7660     ;;
7661   darwin*)
7662     if test yes = "$GCC"; then
7663       reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7664     else
7665       reload_cmds='$LD$reload_flag -o $output$reload_objs'
7666     fi
7667     ;;
7668 esac
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678 if test -n "$ac_tool_prefix"; then
7679   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7680 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7682 $as_echo_n "checking for $ac_word... " >&6; }
7683 if ${ac_cv_prog_OBJDUMP+:} false; then :
7684   $as_echo_n "(cached) " >&6
7685 else
7686   if test -n "$OBJDUMP"; then
7687   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7688 else
7689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7690 for as_dir in $PATH
7691 do
7692   IFS=$as_save_IFS
7693   test -z "$as_dir" && as_dir=.
7694     for ac_exec_ext in '' $ac_executable_extensions; do
7695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7696     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7698     break 2
7699   fi
7700 done
7701   done
7702 IFS=$as_save_IFS
7703
7704 fi
7705 fi
7706 OBJDUMP=$ac_cv_prog_OBJDUMP
7707 if test -n "$OBJDUMP"; then
7708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7709 $as_echo "$OBJDUMP" >&6; }
7710 else
7711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7712 $as_echo "no" >&6; }
7713 fi
7714
7715
7716 fi
7717 if test -z "$ac_cv_prog_OBJDUMP"; then
7718   ac_ct_OBJDUMP=$OBJDUMP
7719   # Extract the first word of "objdump", so it can be a program name with args.
7720 set dummy objdump; ac_word=$2
7721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7722 $as_echo_n "checking for $ac_word... " >&6; }
7723 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7724   $as_echo_n "(cached) " >&6
7725 else
7726   if test -n "$ac_ct_OBJDUMP"; then
7727   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7728 else
7729 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7730 for as_dir in $PATH
7731 do
7732   IFS=$as_save_IFS
7733   test -z "$as_dir" && as_dir=.
7734     for ac_exec_ext in '' $ac_executable_extensions; do
7735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7736     ac_cv_prog_ac_ct_OBJDUMP="objdump"
7737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7738     break 2
7739   fi
7740 done
7741   done
7742 IFS=$as_save_IFS
7743
7744 fi
7745 fi
7746 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7747 if test -n "$ac_ct_OBJDUMP"; then
7748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7749 $as_echo "$ac_ct_OBJDUMP" >&6; }
7750 else
7751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7752 $as_echo "no" >&6; }
7753 fi
7754
7755   if test "x$ac_ct_OBJDUMP" = x; then
7756     OBJDUMP="false"
7757   else
7758     case $cross_compiling:$ac_tool_warned in
7759 yes:)
7760 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7761 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7762 ac_tool_warned=yes ;;
7763 esac
7764     OBJDUMP=$ac_ct_OBJDUMP
7765   fi
7766 else
7767   OBJDUMP="$ac_cv_prog_OBJDUMP"
7768 fi
7769
7770 test -z "$OBJDUMP" && OBJDUMP=objdump
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7781 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
7782 if ${lt_cv_deplibs_check_method+:} false; then :
7783   $as_echo_n "(cached) " >&6
7784 else
7785   lt_cv_file_magic_cmd='$MAGIC_CMD'
7786 lt_cv_file_magic_test_file=
7787 lt_cv_deplibs_check_method='unknown'
7788 # Need to set the preceding variable on all platforms that support
7789 # interlibrary dependencies.
7790 # 'none' -- dependencies not supported.
7791 # 'unknown' -- same as none, but documents that we really don't know.
7792 # 'pass_all' -- all dependencies passed with no checks.
7793 # 'test_compile' -- check by making test program.
7794 # 'file_magic [[regex]]' -- check by looking for files in library path
7795 # that responds to the $file_magic_cmd with a given extended regex.
7796 # If you have 'file' or equivalent on your system and you're not sure
7797 # whether 'pass_all' will *always* work, you probably want this one.
7798
7799 case $host_os in
7800 aix[4-9]*)
7801   lt_cv_deplibs_check_method=pass_all
7802   ;;
7803
7804 beos*)
7805   lt_cv_deplibs_check_method=pass_all
7806   ;;
7807
7808 bsdi[45]*)
7809   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
7810   lt_cv_file_magic_cmd='/usr/bin/file -L'
7811   lt_cv_file_magic_test_file=/shlib/libc.so
7812   ;;
7813
7814 cygwin*)
7815   # func_win32_libid is a shell function defined in ltmain.sh
7816   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7817   lt_cv_file_magic_cmd='func_win32_libid'
7818   ;;
7819
7820 mingw* | pw32*)
7821   # Base MSYS/MinGW do not provide the 'file' command needed by
7822   # func_win32_libid shell function, so use a weaker test based on 'objdump',
7823   # unless we find 'file', for example because we are cross-compiling.
7824   if ( file / ) >/dev/null 2>&1; then
7825     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7826     lt_cv_file_magic_cmd='func_win32_libid'
7827   else
7828     # Keep this pattern in sync with the one in func_win32_libid.
7829     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
7830     lt_cv_file_magic_cmd='$OBJDUMP -f'
7831   fi
7832   ;;
7833
7834 cegcc*)
7835   # use the weaker test based on 'objdump'. See mingw*.
7836   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
7837   lt_cv_file_magic_cmd='$OBJDUMP -f'
7838   ;;
7839
7840 darwin* | rhapsody*)
7841   lt_cv_deplibs_check_method=pass_all
7842   ;;
7843
7844 freebsd* | dragonfly*)
7845   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7846     case $host_cpu in
7847     i*86 )
7848       # Not sure whether the presence of OpenBSD here was a mistake.
7849       # Let's accept both of them until this is cleared up.
7850       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
7851       lt_cv_file_magic_cmd=/usr/bin/file
7852       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7853       ;;
7854     esac
7855   else
7856     lt_cv_deplibs_check_method=pass_all
7857   fi
7858   ;;
7859
7860 haiku*)
7861   lt_cv_deplibs_check_method=pass_all
7862   ;;
7863
7864 hpux10.20* | hpux11*)
7865   lt_cv_file_magic_cmd=/usr/bin/file
7866   case $host_cpu in
7867   ia64*)
7868     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
7869     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7870     ;;
7871   hppa*64*)
7872     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]'
7873     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7874     ;;
7875   *)
7876     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
7877     lt_cv_file_magic_test_file=/usr/lib/libc.sl
7878     ;;
7879   esac
7880   ;;
7881
7882 interix[3-9]*)
7883   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
7884   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
7885   ;;
7886
7887 irix5* | irix6* | nonstopux*)
7888   case $LD in
7889   *-32|*"-32 ") libmagic=32-bit;;
7890   *-n32|*"-n32 ") libmagic=N32;;
7891   *-64|*"-64 ") libmagic=64-bit;;
7892   *) libmagic=never-match;;
7893   esac
7894   lt_cv_deplibs_check_method=pass_all
7895   ;;
7896
7897 # This must be glibc/ELF.
7898 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7899   lt_cv_deplibs_check_method=pass_all
7900   ;;
7901
7902 netbsd*)
7903   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7904     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7905   else
7906     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
7907   fi
7908   ;;
7909
7910 newos6*)
7911   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
7912   lt_cv_file_magic_cmd=/usr/bin/file
7913   lt_cv_file_magic_test_file=/usr/lib/libnls.so
7914   ;;
7915
7916 *nto* | *qnx*)
7917   lt_cv_deplibs_check_method=pass_all
7918   ;;
7919
7920 openbsd* | bitrig*)
7921   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
7922     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
7923   else
7924     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7925   fi
7926   ;;
7927
7928 osf3* | osf4* | osf5*)
7929   lt_cv_deplibs_check_method=pass_all
7930   ;;
7931
7932 rdos*)
7933   lt_cv_deplibs_check_method=pass_all
7934   ;;
7935
7936 solaris*)
7937   lt_cv_deplibs_check_method=pass_all
7938   ;;
7939
7940 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
7941   lt_cv_deplibs_check_method=pass_all
7942   ;;
7943
7944 sysv4 | sysv4.3*)
7945   case $host_vendor in
7946   motorola)
7947     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]'
7948     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7949     ;;
7950   ncr)
7951     lt_cv_deplibs_check_method=pass_all
7952     ;;
7953   sequent)
7954     lt_cv_file_magic_cmd='/bin/file'
7955     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
7956     ;;
7957   sni)
7958     lt_cv_file_magic_cmd='/bin/file'
7959     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
7960     lt_cv_file_magic_test_file=/lib/libc.so
7961     ;;
7962   siemens)
7963     lt_cv_deplibs_check_method=pass_all
7964     ;;
7965   pc)
7966     lt_cv_deplibs_check_method=pass_all
7967     ;;
7968   esac
7969   ;;
7970
7971 tpf*)
7972   lt_cv_deplibs_check_method=pass_all
7973   ;;
7974 os2*)
7975   lt_cv_deplibs_check_method=pass_all
7976   ;;
7977 esac
7978
7979 fi
7980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
7981 $as_echo "$lt_cv_deplibs_check_method" >&6; }
7982
7983 file_magic_glob=
7984 want_nocaseglob=no
7985 if test "$build" = "$host"; then
7986   case $host_os in
7987   mingw* | pw32*)
7988     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
7989       want_nocaseglob=yes
7990     else
7991       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
7992     fi
7993     ;;
7994   esac
7995 fi
7996
7997 file_magic_cmd=$lt_cv_file_magic_cmd
7998 deplibs_check_method=$lt_cv_deplibs_check_method
7999 test -z "$deplibs_check_method" && deplibs_check_method=unknown
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022 if test -n "$ac_tool_prefix"; then
8023   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8024 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8026 $as_echo_n "checking for $ac_word... " >&6; }
8027 if ${ac_cv_prog_DLLTOOL+:} false; then :
8028   $as_echo_n "(cached) " >&6
8029 else
8030   if test -n "$DLLTOOL"; then
8031   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8032 else
8033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8034 for as_dir in $PATH
8035 do
8036   IFS=$as_save_IFS
8037   test -z "$as_dir" && as_dir=.
8038     for ac_exec_ext in '' $ac_executable_extensions; do
8039   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8040     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8042     break 2
8043   fi
8044 done
8045   done
8046 IFS=$as_save_IFS
8047
8048 fi
8049 fi
8050 DLLTOOL=$ac_cv_prog_DLLTOOL
8051 if test -n "$DLLTOOL"; then
8052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8053 $as_echo "$DLLTOOL" >&6; }
8054 else
8055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8056 $as_echo "no" >&6; }
8057 fi
8058
8059
8060 fi
8061 if test -z "$ac_cv_prog_DLLTOOL"; then
8062   ac_ct_DLLTOOL=$DLLTOOL
8063   # Extract the first word of "dlltool", so it can be a program name with args.
8064 set dummy dlltool; ac_word=$2
8065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8066 $as_echo_n "checking for $ac_word... " >&6; }
8067 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8068   $as_echo_n "(cached) " >&6
8069 else
8070   if test -n "$ac_ct_DLLTOOL"; then
8071   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8072 else
8073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8074 for as_dir in $PATH
8075 do
8076   IFS=$as_save_IFS
8077   test -z "$as_dir" && as_dir=.
8078     for ac_exec_ext in '' $ac_executable_extensions; do
8079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8080     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8082     break 2
8083   fi
8084 done
8085   done
8086 IFS=$as_save_IFS
8087
8088 fi
8089 fi
8090 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8091 if test -n "$ac_ct_DLLTOOL"; then
8092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8093 $as_echo "$ac_ct_DLLTOOL" >&6; }
8094 else
8095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8096 $as_echo "no" >&6; }
8097 fi
8098
8099   if test "x$ac_ct_DLLTOOL" = x; then
8100     DLLTOOL="false"
8101   else
8102     case $cross_compiling:$ac_tool_warned in
8103 yes:)
8104 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8105 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8106 ac_tool_warned=yes ;;
8107 esac
8108     DLLTOOL=$ac_ct_DLLTOOL
8109   fi
8110 else
8111   DLLTOOL="$ac_cv_prog_DLLTOOL"
8112 fi
8113
8114 test -z "$DLLTOOL" && DLLTOOL=dlltool
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8126 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8127 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8128   $as_echo_n "(cached) " >&6
8129 else
8130   lt_cv_sharedlib_from_linklib_cmd='unknown'
8131
8132 case $host_os in
8133 cygwin* | mingw* | pw32* | cegcc*)
8134   # two different shell functions defined in ltmain.sh;
8135   # decide which one to use based on capabilities of $DLLTOOL
8136   case `$DLLTOOL --help 2>&1` in
8137   *--identify-strict*)
8138     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8139     ;;
8140   *)
8141     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8142     ;;
8143   esac
8144   ;;
8145 *)
8146   # fallback: assume linklib IS sharedlib
8147   lt_cv_sharedlib_from_linklib_cmd=$ECHO
8148   ;;
8149 esac
8150
8151 fi
8152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8153 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8154 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8155 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8156
8157
8158
8159
8160
8161
8162
8163 if test -n "$ac_tool_prefix"; then
8164   for ac_prog in ar
8165   do
8166     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8167 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8169 $as_echo_n "checking for $ac_word... " >&6; }
8170 if ${ac_cv_prog_AR+:} false; then :
8171   $as_echo_n "(cached) " >&6
8172 else
8173   if test -n "$AR"; then
8174   ac_cv_prog_AR="$AR" # Let the user override the test.
8175 else
8176 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8177 for as_dir in $PATH
8178 do
8179   IFS=$as_save_IFS
8180   test -z "$as_dir" && as_dir=.
8181     for ac_exec_ext in '' $ac_executable_extensions; do
8182   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8183     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8185     break 2
8186   fi
8187 done
8188   done
8189 IFS=$as_save_IFS
8190
8191 fi
8192 fi
8193 AR=$ac_cv_prog_AR
8194 if test -n "$AR"; then
8195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8196 $as_echo "$AR" >&6; }
8197 else
8198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8199 $as_echo "no" >&6; }
8200 fi
8201
8202
8203     test -n "$AR" && break
8204   done
8205 fi
8206 if test -z "$AR"; then
8207   ac_ct_AR=$AR
8208   for ac_prog in ar
8209 do
8210   # Extract the first word of "$ac_prog", so it can be a program name with args.
8211 set dummy $ac_prog; ac_word=$2
8212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8213 $as_echo_n "checking for $ac_word... " >&6; }
8214 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8215   $as_echo_n "(cached) " >&6
8216 else
8217   if test -n "$ac_ct_AR"; then
8218   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8219 else
8220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8221 for as_dir in $PATH
8222 do
8223   IFS=$as_save_IFS
8224   test -z "$as_dir" && as_dir=.
8225     for ac_exec_ext in '' $ac_executable_extensions; do
8226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8227     ac_cv_prog_ac_ct_AR="$ac_prog"
8228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8229     break 2
8230   fi
8231 done
8232   done
8233 IFS=$as_save_IFS
8234
8235 fi
8236 fi
8237 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8238 if test -n "$ac_ct_AR"; then
8239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8240 $as_echo "$ac_ct_AR" >&6; }
8241 else
8242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8243 $as_echo "no" >&6; }
8244 fi
8245
8246
8247   test -n "$ac_ct_AR" && break
8248 done
8249
8250   if test "x$ac_ct_AR" = x; then
8251     AR="false"
8252   else
8253     case $cross_compiling:$ac_tool_warned in
8254 yes:)
8255 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8256 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8257 ac_tool_warned=yes ;;
8258 esac
8259     AR=$ac_ct_AR
8260   fi
8261 fi
8262
8263 : ${AR=ar}
8264 : ${AR_FLAGS=cru}
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8277 $as_echo_n "checking for archiver @FILE support... " >&6; }
8278 if ${lt_cv_ar_at_file+:} false; then :
8279   $as_echo_n "(cached) " >&6
8280 else
8281   lt_cv_ar_at_file=no
8282    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8283 /* end confdefs.h.  */
8284
8285 int
8286 main ()
8287 {
8288
8289   ;
8290   return 0;
8291 }
8292 _ACEOF
8293 if ac_fn_c_try_compile "$LINENO"; then :
8294   echo conftest.$ac_objext > conftest.lst
8295       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8296       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8297   (eval $lt_ar_try) 2>&5
8298   ac_status=$?
8299   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8300   test $ac_status = 0; }
8301       if test 0 -eq "$ac_status"; then
8302         # Ensure the archiver fails upon bogus file names.
8303         rm -f conftest.$ac_objext libconftest.a
8304         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8305   (eval $lt_ar_try) 2>&5
8306   ac_status=$?
8307   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8308   test $ac_status = 0; }
8309         if test 0 -ne "$ac_status"; then
8310           lt_cv_ar_at_file=@
8311         fi
8312       fi
8313       rm -f conftest.* libconftest.a
8314
8315 fi
8316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8317
8318 fi
8319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8320 $as_echo "$lt_cv_ar_at_file" >&6; }
8321
8322 if test no = "$lt_cv_ar_at_file"; then
8323   archiver_list_spec=
8324 else
8325   archiver_list_spec=$lt_cv_ar_at_file
8326 fi
8327
8328
8329
8330
8331
8332
8333
8334 if test -n "$ac_tool_prefix"; then
8335   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8336 set dummy ${ac_tool_prefix}strip; ac_word=$2
8337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8338 $as_echo_n "checking for $ac_word... " >&6; }
8339 if ${ac_cv_prog_STRIP+:} false; then :
8340   $as_echo_n "(cached) " >&6
8341 else
8342   if test -n "$STRIP"; then
8343   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8344 else
8345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8346 for as_dir in $PATH
8347 do
8348   IFS=$as_save_IFS
8349   test -z "$as_dir" && as_dir=.
8350     for ac_exec_ext in '' $ac_executable_extensions; do
8351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8352     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8354     break 2
8355   fi
8356 done
8357   done
8358 IFS=$as_save_IFS
8359
8360 fi
8361 fi
8362 STRIP=$ac_cv_prog_STRIP
8363 if test -n "$STRIP"; then
8364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8365 $as_echo "$STRIP" >&6; }
8366 else
8367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8368 $as_echo "no" >&6; }
8369 fi
8370
8371
8372 fi
8373 if test -z "$ac_cv_prog_STRIP"; then
8374   ac_ct_STRIP=$STRIP
8375   # Extract the first word of "strip", so it can be a program name with args.
8376 set dummy strip; ac_word=$2
8377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8378 $as_echo_n "checking for $ac_word... " >&6; }
8379 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8380   $as_echo_n "(cached) " >&6
8381 else
8382   if test -n "$ac_ct_STRIP"; then
8383   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8384 else
8385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8386 for as_dir in $PATH
8387 do
8388   IFS=$as_save_IFS
8389   test -z "$as_dir" && as_dir=.
8390     for ac_exec_ext in '' $ac_executable_extensions; do
8391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8392     ac_cv_prog_ac_ct_STRIP="strip"
8393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8394     break 2
8395   fi
8396 done
8397   done
8398 IFS=$as_save_IFS
8399
8400 fi
8401 fi
8402 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8403 if test -n "$ac_ct_STRIP"; then
8404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8405 $as_echo "$ac_ct_STRIP" >&6; }
8406 else
8407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8408 $as_echo "no" >&6; }
8409 fi
8410
8411   if test "x$ac_ct_STRIP" = x; then
8412     STRIP=":"
8413   else
8414     case $cross_compiling:$ac_tool_warned in
8415 yes:)
8416 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8417 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8418 ac_tool_warned=yes ;;
8419 esac
8420     STRIP=$ac_ct_STRIP
8421   fi
8422 else
8423   STRIP="$ac_cv_prog_STRIP"
8424 fi
8425
8426 test -z "$STRIP" && STRIP=:
8427
8428
8429
8430
8431
8432
8433 if test -n "$ac_tool_prefix"; then
8434   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8435 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8437 $as_echo_n "checking for $ac_word... " >&6; }
8438 if ${ac_cv_prog_RANLIB+:} false; then :
8439   $as_echo_n "(cached) " >&6
8440 else
8441   if test -n "$RANLIB"; then
8442   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8443 else
8444 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8445 for as_dir in $PATH
8446 do
8447   IFS=$as_save_IFS
8448   test -z "$as_dir" && as_dir=.
8449     for ac_exec_ext in '' $ac_executable_extensions; do
8450   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8451     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8453     break 2
8454   fi
8455 done
8456   done
8457 IFS=$as_save_IFS
8458
8459 fi
8460 fi
8461 RANLIB=$ac_cv_prog_RANLIB
8462 if test -n "$RANLIB"; then
8463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8464 $as_echo "$RANLIB" >&6; }
8465 else
8466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8467 $as_echo "no" >&6; }
8468 fi
8469
8470
8471 fi
8472 if test -z "$ac_cv_prog_RANLIB"; then
8473   ac_ct_RANLIB=$RANLIB
8474   # Extract the first word of "ranlib", so it can be a program name with args.
8475 set dummy ranlib; ac_word=$2
8476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8477 $as_echo_n "checking for $ac_word... " >&6; }
8478 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8479   $as_echo_n "(cached) " >&6
8480 else
8481   if test -n "$ac_ct_RANLIB"; then
8482   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8483 else
8484 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8485 for as_dir in $PATH
8486 do
8487   IFS=$as_save_IFS
8488   test -z "$as_dir" && as_dir=.
8489     for ac_exec_ext in '' $ac_executable_extensions; do
8490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8491     ac_cv_prog_ac_ct_RANLIB="ranlib"
8492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8493     break 2
8494   fi
8495 done
8496   done
8497 IFS=$as_save_IFS
8498
8499 fi
8500 fi
8501 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8502 if test -n "$ac_ct_RANLIB"; then
8503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8504 $as_echo "$ac_ct_RANLIB" >&6; }
8505 else
8506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8507 $as_echo "no" >&6; }
8508 fi
8509
8510   if test "x$ac_ct_RANLIB" = x; then
8511     RANLIB=":"
8512   else
8513     case $cross_compiling:$ac_tool_warned in
8514 yes:)
8515 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8516 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8517 ac_tool_warned=yes ;;
8518 esac
8519     RANLIB=$ac_ct_RANLIB
8520   fi
8521 else
8522   RANLIB="$ac_cv_prog_RANLIB"
8523 fi
8524
8525 test -z "$RANLIB" && RANLIB=:
8526
8527
8528
8529
8530
8531
8532 # Determine commands to create old-style static archives.
8533 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8534 old_postinstall_cmds='chmod 644 $oldlib'
8535 old_postuninstall_cmds=
8536
8537 if test -n "$RANLIB"; then
8538   case $host_os in
8539   bitrig* | openbsd*)
8540     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8541     ;;
8542   *)
8543     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8544     ;;
8545   esac
8546   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8547 fi
8548
8549 case $host_os in
8550   darwin*)
8551     lock_old_archive_extraction=yes ;;
8552   *)
8553     lock_old_archive_extraction=no ;;
8554 esac
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576 for ac_prog in gawk mawk nawk awk
8577 do
8578   # Extract the first word of "$ac_prog", so it can be a program name with args.
8579 set dummy $ac_prog; ac_word=$2
8580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8581 $as_echo_n "checking for $ac_word... " >&6; }
8582 if ${ac_cv_prog_AWK+:} false; then :
8583   $as_echo_n "(cached) " >&6
8584 else
8585   if test -n "$AWK"; then
8586   ac_cv_prog_AWK="$AWK" # Let the user override the test.
8587 else
8588 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8589 for as_dir in $PATH
8590 do
8591   IFS=$as_save_IFS
8592   test -z "$as_dir" && as_dir=.
8593     for ac_exec_ext in '' $ac_executable_extensions; do
8594   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8595     ac_cv_prog_AWK="$ac_prog"
8596     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8597     break 2
8598   fi
8599 done
8600   done
8601 IFS=$as_save_IFS
8602
8603 fi
8604 fi
8605 AWK=$ac_cv_prog_AWK
8606 if test -n "$AWK"; then
8607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8608 $as_echo "$AWK" >&6; }
8609 else
8610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8611 $as_echo "no" >&6; }
8612 fi
8613
8614
8615   test -n "$AWK" && break
8616 done
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636 # If no C compiler was specified, use CC.
8637 LTCC=${LTCC-"$CC"}
8638
8639 # If no C compiler flags were specified, use CFLAGS.
8640 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8641
8642 # Allow CC to be a program name with arguments.
8643 compiler=$CC
8644
8645
8646 # Check for command to grab the raw symbol name followed by C symbol from nm.
8647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8648 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8649 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8650   $as_echo_n "(cached) " >&6
8651 else
8652
8653 # These are sane defaults that work on at least a few old systems.
8654 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8655
8656 # Character class describing NM global symbol codes.
8657 symcode='[BCDEGRST]'
8658
8659 # Regexp to match symbols that can be accessed directly from C.
8660 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8661
8662 # Define system-specific variables.
8663 case $host_os in
8664 aix*)
8665   symcode='[BCDT]'
8666   ;;
8667 cygwin* | mingw* | pw32* | cegcc*)
8668   symcode='[ABCDGISTW]'
8669   ;;
8670 hpux*)
8671   if test ia64 = "$host_cpu"; then
8672     symcode='[ABCDEGRST]'
8673   fi
8674   ;;
8675 irix* | nonstopux*)
8676   symcode='[BCDEGRST]'
8677   ;;
8678 osf*)
8679   symcode='[BCDEGQRST]'
8680   ;;
8681 solaris*)
8682   symcode='[BDRT]'
8683   ;;
8684 sco3.2v5*)
8685   symcode='[DT]'
8686   ;;
8687 sysv4.2uw2*)
8688   symcode='[DT]'
8689   ;;
8690 sysv5* | sco5v6* | unixware* | OpenUNIX*)
8691   symcode='[ABDT]'
8692   ;;
8693 sysv4)
8694   symcode='[DFNSTU]'
8695   ;;
8696 esac
8697
8698 # If we're using GNU nm, then use its standard symbol codes.
8699 case `$NM -V 2>&1` in
8700 *GNU* | *'with BFD'*)
8701   symcode='[ABCDGIRSTW]' ;;
8702 esac
8703
8704 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8705   # Gets list of data symbols to import.
8706   lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8707   # Adjust the below global symbol transforms to fixup imported variables.
8708   lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8709   lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
8710   lt_c_name_lib_hook="\
8711   -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
8712   -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
8713 else
8714   # Disable hooks by default.
8715   lt_cv_sys_global_symbol_to_import=
8716   lt_cdecl_hook=
8717   lt_c_name_hook=
8718   lt_c_name_lib_hook=
8719 fi
8720
8721 # Transform an extracted symbol line into a proper C declaration.
8722 # Some systems (esp. on ia64) link data and code symbols differently,
8723 # so use this general approach.
8724 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8725 $lt_cdecl_hook\
8726 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8727 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8728
8729 # Transform an extracted symbol line into symbol name and symbol address
8730 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8731 $lt_c_name_hook\
8732 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8733 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8734
8735 # Transform an extracted symbol line into symbol name with lib prefix and
8736 # symbol address.
8737 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8738 $lt_c_name_lib_hook\
8739 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8740 " -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8741 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8742
8743 # Handle CRLF in mingw tool chain
8744 opt_cr=
8745 case $build_os in
8746 mingw*)
8747   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8748   ;;
8749 esac
8750
8751 # Try without a prefix underscore, then with it.
8752 for ac_symprfx in "" "_"; do
8753
8754   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8755   symxfrm="\\1 $ac_symprfx\\2 \\2"
8756
8757   # Write the raw and C identifiers.
8758   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8759     # Fake it for dumpbin and say T for any non-static function,
8760     # D for any global variable and I for any imported variable.
8761     # Also find C++ and __fastcall symbols from MSVC++,
8762     # which start with @ or ?.
8763     lt_cv_sys_global_symbol_pipe="$AWK '"\
8764 "     {last_section=section; section=\$ 3};"\
8765 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8766 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8767 "     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8768 "     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8769 "     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8770 "     \$ 0!~/External *\|/{next};"\
8771 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8772 "     {if(hide[section]) next};"\
8773 "     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8774 "     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8775 "     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8776 "     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8777 "     ' prfx=^$ac_symprfx"
8778   else
8779     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8780   fi
8781   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8782
8783   # Check to see that the pipe works correctly.
8784   pipe_works=no
8785
8786   rm -f conftest*
8787   cat > conftest.$ac_ext <<_LT_EOF
8788 #ifdef __cplusplus
8789 extern "C" {
8790 #endif
8791 char nm_test_var;
8792 void nm_test_func(void);
8793 void nm_test_func(void){}
8794 #ifdef __cplusplus
8795 }
8796 #endif
8797 int main(){nm_test_var='a';nm_test_func();return(0);}
8798 _LT_EOF
8799
8800   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8801   (eval $ac_compile) 2>&5
8802   ac_status=$?
8803   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8804   test $ac_status = 0; }; then
8805     # Now try to grab the symbols.
8806     nlist=conftest.nm
8807     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
8808   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
8809   ac_status=$?
8810   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8811   test $ac_status = 0; } && test -s "$nlist"; then
8812       # Try sorting and uniquifying the output.
8813       if sort "$nlist" | uniq > "$nlist"T; then
8814         mv -f "$nlist"T "$nlist"
8815       else
8816         rm -f "$nlist"T
8817       fi
8818
8819       # Make sure that we snagged all the symbols we need.
8820       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
8821         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
8822           cat <<_LT_EOF > conftest.$ac_ext
8823 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
8824 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
8825 /* DATA imports from DLLs on WIN32 can't be const, because runtime
8826    relocations are performed -- see ld's documentation on pseudo-relocs.  */
8827 # define LT_DLSYM_CONST
8828 #elif defined __osf__
8829 /* This system does not cope well with relocations in const data.  */
8830 # define LT_DLSYM_CONST
8831 #else
8832 # define LT_DLSYM_CONST const
8833 #endif
8834
8835 #ifdef __cplusplus
8836 extern "C" {
8837 #endif
8838
8839 _LT_EOF
8840           # Now generate the symbol file.
8841           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
8842
8843           cat <<_LT_EOF >> conftest.$ac_ext
8844
8845 /* The mapping between symbol names and symbols.  */
8846 LT_DLSYM_CONST struct {
8847   const char *name;
8848   void       *address;
8849 }
8850 lt__PROGRAM__LTX_preloaded_symbols[] =
8851 {
8852   { "@PROGRAM@", (void *) 0 },
8853 _LT_EOF
8854           $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
8855           cat <<\_LT_EOF >> conftest.$ac_ext
8856   {0, (void *) 0}
8857 };
8858
8859 /* This works around a problem in FreeBSD linker */
8860 #ifdef FREEBSD_WORKAROUND
8861 static const void *lt_preloaded_setup() {
8862   return lt__PROGRAM__LTX_preloaded_symbols;
8863 }
8864 #endif
8865
8866 #ifdef __cplusplus
8867 }
8868 #endif
8869 _LT_EOF
8870           # Now try linking the two files.
8871           mv conftest.$ac_objext conftstm.$ac_objext
8872           lt_globsym_save_LIBS=$LIBS
8873           lt_globsym_save_CFLAGS=$CFLAGS
8874           LIBS=conftstm.$ac_objext
8875           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
8876           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8877   (eval $ac_link) 2>&5
8878   ac_status=$?
8879   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8880   test $ac_status = 0; } && test -s conftest$ac_exeext; then
8881             pipe_works=yes
8882           fi
8883           LIBS=$lt_globsym_save_LIBS
8884           CFLAGS=$lt_globsym_save_CFLAGS
8885         else
8886           echo "cannot find nm_test_func in $nlist" >&5
8887         fi
8888       else
8889         echo "cannot find nm_test_var in $nlist" >&5
8890       fi
8891     else
8892       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
8893     fi
8894   else
8895     echo "$progname: failed program was:" >&5
8896     cat conftest.$ac_ext >&5
8897   fi
8898   rm -rf conftest* conftst*
8899
8900   # Do not use the global_symbol_pipe unless it works.
8901   if test yes = "$pipe_works"; then
8902     break
8903   else
8904     lt_cv_sys_global_symbol_pipe=
8905   fi
8906 done
8907
8908 fi
8909
8910 if test -z "$lt_cv_sys_global_symbol_pipe"; then
8911   lt_cv_sys_global_symbol_to_cdecl=
8912 fi
8913 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
8914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
8915 $as_echo "failed" >&6; }
8916 else
8917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
8918 $as_echo "ok" >&6; }
8919 fi
8920
8921 # Response file support.
8922 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8923   nm_file_list_spec='@'
8924 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
8925   nm_file_list_spec='@'
8926 fi
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
8965 $as_echo_n "checking for sysroot... " >&6; }
8966
8967 # Check whether --with-sysroot was given.
8968 if test "${with_sysroot+set}" = set; then :
8969   withval=$with_sysroot;
8970 else
8971   with_sysroot=no
8972 fi
8973
8974
8975 lt_sysroot=
8976 case $with_sysroot in #(
8977  yes)
8978    if test yes = "$GCC"; then
8979      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
8980    fi
8981    ;; #(
8982  /*)
8983    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
8984    ;; #(
8985  no|'')
8986    ;; #(
8987  *)
8988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
8989 $as_echo "$with_sysroot" >&6; }
8990    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
8991    ;;
8992 esac
8993
8994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
8995 $as_echo "${lt_sysroot:-no}" >&6; }
8996
8997
8998
8999
9000
9001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
9002 $as_echo_n "checking for a working dd... " >&6; }
9003 if ${ac_cv_path_lt_DD+:} false; then :
9004   $as_echo_n "(cached) " >&6
9005 else
9006   printf 0123456789abcdef0123456789abcdef >conftest.i
9007 cat conftest.i conftest.i >conftest2.i
9008 : ${lt_DD:=$DD}
9009 if test -z "$lt_DD"; then
9010   ac_path_lt_DD_found=false
9011   # Loop through the user's path and test for each of PROGNAME-LIST
9012   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9013 for as_dir in $PATH
9014 do
9015   IFS=$as_save_IFS
9016   test -z "$as_dir" && as_dir=.
9017     for ac_prog in dd; do
9018     for ac_exec_ext in '' $ac_executable_extensions; do
9019       ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
9020       as_fn_executable_p "$ac_path_lt_DD" || continue
9021 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9022   cmp -s conftest.i conftest.out \
9023   && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
9024 fi
9025       $ac_path_lt_DD_found && break 3
9026     done
9027   done
9028   done
9029 IFS=$as_save_IFS
9030   if test -z "$ac_cv_path_lt_DD"; then
9031     :
9032   fi
9033 else
9034   ac_cv_path_lt_DD=$lt_DD
9035 fi
9036
9037 rm -f conftest.i conftest2.i conftest.out
9038 fi
9039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
9040 $as_echo "$ac_cv_path_lt_DD" >&6; }
9041
9042
9043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
9044 $as_echo_n "checking how to truncate binary pipes... " >&6; }
9045 if ${lt_cv_truncate_bin+:} false; then :
9046   $as_echo_n "(cached) " >&6
9047 else
9048   printf 0123456789abcdef0123456789abcdef >conftest.i
9049 cat conftest.i conftest.i >conftest2.i
9050 lt_cv_truncate_bin=
9051 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9052   cmp -s conftest.i conftest.out \
9053   && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
9054 fi
9055 rm -f conftest.i conftest2.i conftest.out
9056 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
9057 fi
9058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
9059 $as_echo "$lt_cv_truncate_bin" >&6; }
9060
9061
9062
9063
9064
9065
9066
9067 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
9068 func_cc_basename ()
9069 {
9070     for cc_temp in $*""; do
9071       case $cc_temp in
9072         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9073         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9074         \-*) ;;
9075         *) break;;
9076       esac
9077     done
9078     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9079 }
9080
9081 # Check whether --enable-libtool-lock was given.
9082 if test "${enable_libtool_lock+set}" = set; then :
9083   enableval=$enable_libtool_lock;
9084 fi
9085
9086 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
9087
9088 # Some flags need to be propagated to the compiler or linker for good
9089 # libtool support.
9090 case $host in
9091 ia64-*-hpux*)
9092   # Find out what ABI is being produced by ac_compile, and set mode
9093   # options accordingly.
9094   echo 'int i;' > conftest.$ac_ext
9095   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9096   (eval $ac_compile) 2>&5
9097   ac_status=$?
9098   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9099   test $ac_status = 0; }; then
9100     case `/usr/bin/file conftest.$ac_objext` in
9101       *ELF-32*)
9102         HPUX_IA64_MODE=32
9103         ;;
9104       *ELF-64*)
9105         HPUX_IA64_MODE=64
9106         ;;
9107     esac
9108   fi
9109   rm -rf conftest*
9110   ;;
9111 *-*-irix6*)
9112   # Find out what ABI is being produced by ac_compile, and set linker
9113   # options accordingly.
9114   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9115   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9116   (eval $ac_compile) 2>&5
9117   ac_status=$?
9118   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9119   test $ac_status = 0; }; then
9120     if test yes = "$lt_cv_prog_gnu_ld"; then
9121       case `/usr/bin/file conftest.$ac_objext` in
9122         *32-bit*)
9123           LD="${LD-ld} -melf32bsmip"
9124           ;;
9125         *N32*)
9126           LD="${LD-ld} -melf32bmipn32"
9127           ;;
9128         *64-bit*)
9129           LD="${LD-ld} -melf64bmip"
9130         ;;
9131       esac
9132     else
9133       case `/usr/bin/file conftest.$ac_objext` in
9134         *32-bit*)
9135           LD="${LD-ld} -32"
9136           ;;
9137         *N32*)
9138           LD="${LD-ld} -n32"
9139           ;;
9140         *64-bit*)
9141           LD="${LD-ld} -64"
9142           ;;
9143       esac
9144     fi
9145   fi
9146   rm -rf conftest*
9147   ;;
9148
9149 mips64*-*linux*)
9150   # Find out what ABI is being produced by ac_compile, and set linker
9151   # options accordingly.
9152   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9153   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9154   (eval $ac_compile) 2>&5
9155   ac_status=$?
9156   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9157   test $ac_status = 0; }; then
9158     emul=elf
9159     case `/usr/bin/file conftest.$ac_objext` in
9160       *32-bit*)
9161         emul="${emul}32"
9162         ;;
9163       *64-bit*)
9164         emul="${emul}64"
9165         ;;
9166     esac
9167     case `/usr/bin/file conftest.$ac_objext` in
9168       *MSB*)
9169         emul="${emul}btsmip"
9170         ;;
9171       *LSB*)
9172         emul="${emul}ltsmip"
9173         ;;
9174     esac
9175     case `/usr/bin/file conftest.$ac_objext` in
9176       *N32*)
9177         emul="${emul}n32"
9178         ;;
9179     esac
9180     LD="${LD-ld} -m $emul"
9181   fi
9182   rm -rf conftest*
9183   ;;
9184
9185 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9186 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9187   # Find out what ABI is being produced by ac_compile, and set linker
9188   # options accordingly.  Note that the listed cases only cover the
9189   # situations where additional linker options are needed (such as when
9190   # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9191   # vice versa); the common cases where no linker options are needed do
9192   # not appear in the list.
9193   echo 'int i;' > conftest.$ac_ext
9194   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9195   (eval $ac_compile) 2>&5
9196   ac_status=$?
9197   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9198   test $ac_status = 0; }; then
9199     case `/usr/bin/file conftest.o` in
9200       *32-bit*)
9201         case $host in
9202           x86_64-*kfreebsd*-gnu)
9203             LD="${LD-ld} -m elf_i386_fbsd"
9204             ;;
9205           x86_64-*linux*)
9206             case `/usr/bin/file conftest.o` in
9207               *x86-64*)
9208                 LD="${LD-ld} -m elf32_x86_64"
9209                 ;;
9210               *)
9211                 LD="${LD-ld} -m elf_i386"
9212                 ;;
9213             esac
9214             ;;
9215           powerpc64le-*linux*)
9216             LD="${LD-ld} -m elf32lppclinux"
9217             ;;
9218           powerpc64-*linux*)
9219             LD="${LD-ld} -m elf32ppclinux"
9220             ;;
9221           s390x-*linux*)
9222             LD="${LD-ld} -m elf_s390"
9223             ;;
9224           sparc64-*linux*)
9225             LD="${LD-ld} -m elf32_sparc"
9226             ;;
9227         esac
9228         ;;
9229       *64-bit*)
9230         case $host in
9231           x86_64-*kfreebsd*-gnu)
9232             LD="${LD-ld} -m elf_x86_64_fbsd"
9233             ;;
9234           x86_64-*linux*)
9235             LD="${LD-ld} -m elf_x86_64"
9236             ;;
9237           powerpcle-*linux*)
9238             LD="${LD-ld} -m elf64lppc"
9239             ;;
9240           powerpc-*linux*)
9241             LD="${LD-ld} -m elf64ppc"
9242             ;;
9243           s390*-*linux*|s390*-*tpf*)
9244             LD="${LD-ld} -m elf64_s390"
9245             ;;
9246           sparc*-*linux*)
9247             LD="${LD-ld} -m elf64_sparc"
9248             ;;
9249         esac
9250         ;;
9251     esac
9252   fi
9253   rm -rf conftest*
9254   ;;
9255
9256 *-*-sco3.2v5*)
9257   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9258   SAVE_CFLAGS=$CFLAGS
9259   CFLAGS="$CFLAGS -belf"
9260   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9261 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
9262 if ${lt_cv_cc_needs_belf+:} false; then :
9263   $as_echo_n "(cached) " >&6
9264 else
9265   ac_ext=c
9266 ac_cpp='$CPP $CPPFLAGS'
9267 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9268 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9269 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9270
9271      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9272 /* end confdefs.h.  */
9273
9274 int
9275 main ()
9276 {
9277
9278   ;
9279   return 0;
9280 }
9281 _ACEOF
9282 if ac_fn_c_try_link "$LINENO"; then :
9283   lt_cv_cc_needs_belf=yes
9284 else
9285   lt_cv_cc_needs_belf=no
9286 fi
9287 rm -f core conftest.err conftest.$ac_objext \
9288     conftest$ac_exeext conftest.$ac_ext
9289      ac_ext=c
9290 ac_cpp='$CPP $CPPFLAGS'
9291 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9292 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9293 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9294
9295 fi
9296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9297 $as_echo "$lt_cv_cc_needs_belf" >&6; }
9298   if test yes != "$lt_cv_cc_needs_belf"; then
9299     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9300     CFLAGS=$SAVE_CFLAGS
9301   fi
9302   ;;
9303 *-*solaris*)
9304   # Find out what ABI is being produced by ac_compile, and set linker
9305   # options accordingly.
9306   echo 'int i;' > conftest.$ac_ext
9307   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9308   (eval $ac_compile) 2>&5
9309   ac_status=$?
9310   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9311   test $ac_status = 0; }; then
9312     case `/usr/bin/file conftest.o` in
9313     *64-bit*)
9314       case $lt_cv_prog_gnu_ld in
9315       yes*)
9316         case $host in
9317         i?86-*-solaris*|x86_64-*-solaris*)
9318           LD="${LD-ld} -m elf_x86_64"
9319           ;;
9320         sparc*-*-solaris*)
9321           LD="${LD-ld} -m elf64_sparc"
9322           ;;
9323         esac
9324         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9325         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9326           LD=${LD-ld}_sol2
9327         fi
9328         ;;
9329       *)
9330         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9331           LD="${LD-ld} -64"
9332         fi
9333         ;;
9334       esac
9335       ;;
9336     esac
9337   fi
9338   rm -rf conftest*
9339   ;;
9340 esac
9341
9342 need_locks=$enable_libtool_lock
9343
9344 if test -n "$ac_tool_prefix"; then
9345   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9346 set dummy ${ac_tool_prefix}mt; ac_word=$2
9347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9348 $as_echo_n "checking for $ac_word... " >&6; }
9349 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9350   $as_echo_n "(cached) " >&6
9351 else
9352   if test -n "$MANIFEST_TOOL"; then
9353   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9354 else
9355 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9356 for as_dir in $PATH
9357 do
9358   IFS=$as_save_IFS
9359   test -z "$as_dir" && as_dir=.
9360     for ac_exec_ext in '' $ac_executable_extensions; do
9361   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9362     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9363     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9364     break 2
9365   fi
9366 done
9367   done
9368 IFS=$as_save_IFS
9369
9370 fi
9371 fi
9372 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9373 if test -n "$MANIFEST_TOOL"; then
9374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9375 $as_echo "$MANIFEST_TOOL" >&6; }
9376 else
9377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9378 $as_echo "no" >&6; }
9379 fi
9380
9381
9382 fi
9383 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9384   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9385   # Extract the first word of "mt", so it can be a program name with args.
9386 set dummy mt; ac_word=$2
9387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9388 $as_echo_n "checking for $ac_word... " >&6; }
9389 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9390   $as_echo_n "(cached) " >&6
9391 else
9392   if test -n "$ac_ct_MANIFEST_TOOL"; then
9393   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9394 else
9395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9396 for as_dir in $PATH
9397 do
9398   IFS=$as_save_IFS
9399   test -z "$as_dir" && as_dir=.
9400     for ac_exec_ext in '' $ac_executable_extensions; do
9401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9402     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9404     break 2
9405   fi
9406 done
9407   done
9408 IFS=$as_save_IFS
9409
9410 fi
9411 fi
9412 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9413 if test -n "$ac_ct_MANIFEST_TOOL"; then
9414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9415 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9416 else
9417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9418 $as_echo "no" >&6; }
9419 fi
9420
9421   if test "x$ac_ct_MANIFEST_TOOL" = x; then
9422     MANIFEST_TOOL=":"
9423   else
9424     case $cross_compiling:$ac_tool_warned in
9425 yes:)
9426 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9427 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9428 ac_tool_warned=yes ;;
9429 esac
9430     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9431   fi
9432 else
9433   MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9434 fi
9435
9436 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9438 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9439 if ${lt_cv_path_mainfest_tool+:} false; then :
9440   $as_echo_n "(cached) " >&6
9441 else
9442   lt_cv_path_mainfest_tool=no
9443   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9444   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9445   cat conftest.err >&5
9446   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9447     lt_cv_path_mainfest_tool=yes
9448   fi
9449   rm -f conftest*
9450 fi
9451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9452 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
9453 if test yes != "$lt_cv_path_mainfest_tool"; then
9454   MANIFEST_TOOL=:
9455 fi
9456
9457
9458
9459
9460
9461
9462   case $host_os in
9463     rhapsody* | darwin*)
9464     if test -n "$ac_tool_prefix"; then
9465   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9466 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9468 $as_echo_n "checking for $ac_word... " >&6; }
9469 if ${ac_cv_prog_DSYMUTIL+:} false; then :
9470   $as_echo_n "(cached) " >&6
9471 else
9472   if test -n "$DSYMUTIL"; then
9473   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9474 else
9475 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9476 for as_dir in $PATH
9477 do
9478   IFS=$as_save_IFS
9479   test -z "$as_dir" && as_dir=.
9480     for ac_exec_ext in '' $ac_executable_extensions; do
9481   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9482     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9484     break 2
9485   fi
9486 done
9487   done
9488 IFS=$as_save_IFS
9489
9490 fi
9491 fi
9492 DSYMUTIL=$ac_cv_prog_DSYMUTIL
9493 if test -n "$DSYMUTIL"; then
9494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9495 $as_echo "$DSYMUTIL" >&6; }
9496 else
9497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9498 $as_echo "no" >&6; }
9499 fi
9500
9501
9502 fi
9503 if test -z "$ac_cv_prog_DSYMUTIL"; then
9504   ac_ct_DSYMUTIL=$DSYMUTIL
9505   # Extract the first word of "dsymutil", so it can be a program name with args.
9506 set dummy dsymutil; ac_word=$2
9507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9508 $as_echo_n "checking for $ac_word... " >&6; }
9509 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9510   $as_echo_n "(cached) " >&6
9511 else
9512   if test -n "$ac_ct_DSYMUTIL"; then
9513   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9514 else
9515 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9516 for as_dir in $PATH
9517 do
9518   IFS=$as_save_IFS
9519   test -z "$as_dir" && as_dir=.
9520     for ac_exec_ext in '' $ac_executable_extensions; do
9521   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9522     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9523     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9524     break 2
9525   fi
9526 done
9527   done
9528 IFS=$as_save_IFS
9529
9530 fi
9531 fi
9532 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9533 if test -n "$ac_ct_DSYMUTIL"; then
9534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9535 $as_echo "$ac_ct_DSYMUTIL" >&6; }
9536 else
9537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9538 $as_echo "no" >&6; }
9539 fi
9540
9541   if test "x$ac_ct_DSYMUTIL" = x; then
9542     DSYMUTIL=":"
9543   else
9544     case $cross_compiling:$ac_tool_warned in
9545 yes:)
9546 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9547 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9548 ac_tool_warned=yes ;;
9549 esac
9550     DSYMUTIL=$ac_ct_DSYMUTIL
9551   fi
9552 else
9553   DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9554 fi
9555
9556     if test -n "$ac_tool_prefix"; then
9557   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9558 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9560 $as_echo_n "checking for $ac_word... " >&6; }
9561 if ${ac_cv_prog_NMEDIT+:} false; then :
9562   $as_echo_n "(cached) " >&6
9563 else
9564   if test -n "$NMEDIT"; then
9565   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9566 else
9567 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9568 for as_dir in $PATH
9569 do
9570   IFS=$as_save_IFS
9571   test -z "$as_dir" && as_dir=.
9572     for ac_exec_ext in '' $ac_executable_extensions; do
9573   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9574     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9576     break 2
9577   fi
9578 done
9579   done
9580 IFS=$as_save_IFS
9581
9582 fi
9583 fi
9584 NMEDIT=$ac_cv_prog_NMEDIT
9585 if test -n "$NMEDIT"; then
9586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9587 $as_echo "$NMEDIT" >&6; }
9588 else
9589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9590 $as_echo "no" >&6; }
9591 fi
9592
9593
9594 fi
9595 if test -z "$ac_cv_prog_NMEDIT"; then
9596   ac_ct_NMEDIT=$NMEDIT
9597   # Extract the first word of "nmedit", so it can be a program name with args.
9598 set dummy nmedit; ac_word=$2
9599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9600 $as_echo_n "checking for $ac_word... " >&6; }
9601 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9602   $as_echo_n "(cached) " >&6
9603 else
9604   if test -n "$ac_ct_NMEDIT"; then
9605   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9606 else
9607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9608 for as_dir in $PATH
9609 do
9610   IFS=$as_save_IFS
9611   test -z "$as_dir" && as_dir=.
9612     for ac_exec_ext in '' $ac_executable_extensions; do
9613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9614     ac_cv_prog_ac_ct_NMEDIT="nmedit"
9615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9616     break 2
9617   fi
9618 done
9619   done
9620 IFS=$as_save_IFS
9621
9622 fi
9623 fi
9624 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9625 if test -n "$ac_ct_NMEDIT"; then
9626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9627 $as_echo "$ac_ct_NMEDIT" >&6; }
9628 else
9629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9630 $as_echo "no" >&6; }
9631 fi
9632
9633   if test "x$ac_ct_NMEDIT" = x; then
9634     NMEDIT=":"
9635   else
9636     case $cross_compiling:$ac_tool_warned in
9637 yes:)
9638 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9639 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9640 ac_tool_warned=yes ;;
9641 esac
9642     NMEDIT=$ac_ct_NMEDIT
9643   fi
9644 else
9645   NMEDIT="$ac_cv_prog_NMEDIT"
9646 fi
9647
9648     if test -n "$ac_tool_prefix"; then
9649   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9650 set dummy ${ac_tool_prefix}lipo; ac_word=$2
9651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9652 $as_echo_n "checking for $ac_word... " >&6; }
9653 if ${ac_cv_prog_LIPO+:} false; then :
9654   $as_echo_n "(cached) " >&6
9655 else
9656   if test -n "$LIPO"; then
9657   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9658 else
9659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9660 for as_dir in $PATH
9661 do
9662   IFS=$as_save_IFS
9663   test -z "$as_dir" && as_dir=.
9664     for ac_exec_ext in '' $ac_executable_extensions; do
9665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9666     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9668     break 2
9669   fi
9670 done
9671   done
9672 IFS=$as_save_IFS
9673
9674 fi
9675 fi
9676 LIPO=$ac_cv_prog_LIPO
9677 if test -n "$LIPO"; then
9678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9679 $as_echo "$LIPO" >&6; }
9680 else
9681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9682 $as_echo "no" >&6; }
9683 fi
9684
9685
9686 fi
9687 if test -z "$ac_cv_prog_LIPO"; then
9688   ac_ct_LIPO=$LIPO
9689   # Extract the first word of "lipo", so it can be a program name with args.
9690 set dummy lipo; ac_word=$2
9691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9692 $as_echo_n "checking for $ac_word... " >&6; }
9693 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9694   $as_echo_n "(cached) " >&6
9695 else
9696   if test -n "$ac_ct_LIPO"; then
9697   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9698 else
9699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9700 for as_dir in $PATH
9701 do
9702   IFS=$as_save_IFS
9703   test -z "$as_dir" && as_dir=.
9704     for ac_exec_ext in '' $ac_executable_extensions; do
9705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9706     ac_cv_prog_ac_ct_LIPO="lipo"
9707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9708     break 2
9709   fi
9710 done
9711   done
9712 IFS=$as_save_IFS
9713
9714 fi
9715 fi
9716 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9717 if test -n "$ac_ct_LIPO"; then
9718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9719 $as_echo "$ac_ct_LIPO" >&6; }
9720 else
9721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9722 $as_echo "no" >&6; }
9723 fi
9724
9725   if test "x$ac_ct_LIPO" = x; then
9726     LIPO=":"
9727   else
9728     case $cross_compiling:$ac_tool_warned in
9729 yes:)
9730 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9731 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9732 ac_tool_warned=yes ;;
9733 esac
9734     LIPO=$ac_ct_LIPO
9735   fi
9736 else
9737   LIPO="$ac_cv_prog_LIPO"
9738 fi
9739
9740     if test -n "$ac_tool_prefix"; then
9741   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9742 set dummy ${ac_tool_prefix}otool; ac_word=$2
9743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9744 $as_echo_n "checking for $ac_word... " >&6; }
9745 if ${ac_cv_prog_OTOOL+:} false; then :
9746   $as_echo_n "(cached) " >&6
9747 else
9748   if test -n "$OTOOL"; then
9749   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9750 else
9751 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9752 for as_dir in $PATH
9753 do
9754   IFS=$as_save_IFS
9755   test -z "$as_dir" && as_dir=.
9756     for ac_exec_ext in '' $ac_executable_extensions; do
9757   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9758     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9759     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9760     break 2
9761   fi
9762 done
9763   done
9764 IFS=$as_save_IFS
9765
9766 fi
9767 fi
9768 OTOOL=$ac_cv_prog_OTOOL
9769 if test -n "$OTOOL"; then
9770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9771 $as_echo "$OTOOL" >&6; }
9772 else
9773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9774 $as_echo "no" >&6; }
9775 fi
9776
9777
9778 fi
9779 if test -z "$ac_cv_prog_OTOOL"; then
9780   ac_ct_OTOOL=$OTOOL
9781   # Extract the first word of "otool", so it can be a program name with args.
9782 set dummy otool; ac_word=$2
9783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9784 $as_echo_n "checking for $ac_word... " >&6; }
9785 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9786   $as_echo_n "(cached) " >&6
9787 else
9788   if test -n "$ac_ct_OTOOL"; then
9789   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
9790 else
9791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9792 for as_dir in $PATH
9793 do
9794   IFS=$as_save_IFS
9795   test -z "$as_dir" && as_dir=.
9796     for ac_exec_ext in '' $ac_executable_extensions; do
9797   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9798     ac_cv_prog_ac_ct_OTOOL="otool"
9799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9800     break 2
9801   fi
9802 done
9803   done
9804 IFS=$as_save_IFS
9805
9806 fi
9807 fi
9808 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
9809 if test -n "$ac_ct_OTOOL"; then
9810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
9811 $as_echo "$ac_ct_OTOOL" >&6; }
9812 else
9813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814 $as_echo "no" >&6; }
9815 fi
9816
9817   if test "x$ac_ct_OTOOL" = x; then
9818     OTOOL=":"
9819   else
9820     case $cross_compiling:$ac_tool_warned in
9821 yes:)
9822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9823 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9824 ac_tool_warned=yes ;;
9825 esac
9826     OTOOL=$ac_ct_OTOOL
9827   fi
9828 else
9829   OTOOL="$ac_cv_prog_OTOOL"
9830 fi
9831
9832     if test -n "$ac_tool_prefix"; then
9833   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
9834 set dummy ${ac_tool_prefix}otool64; ac_word=$2
9835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9836 $as_echo_n "checking for $ac_word... " >&6; }
9837 if ${ac_cv_prog_OTOOL64+:} false; then :
9838   $as_echo_n "(cached) " >&6
9839 else
9840   if test -n "$OTOOL64"; then
9841   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
9842 else
9843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9844 for as_dir in $PATH
9845 do
9846   IFS=$as_save_IFS
9847   test -z "$as_dir" && as_dir=.
9848     for ac_exec_ext in '' $ac_executable_extensions; do
9849   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9850     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
9851     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9852     break 2
9853   fi
9854 done
9855   done
9856 IFS=$as_save_IFS
9857
9858 fi
9859 fi
9860 OTOOL64=$ac_cv_prog_OTOOL64
9861 if test -n "$OTOOL64"; then
9862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
9863 $as_echo "$OTOOL64" >&6; }
9864 else
9865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9866 $as_echo "no" >&6; }
9867 fi
9868
9869
9870 fi
9871 if test -z "$ac_cv_prog_OTOOL64"; then
9872   ac_ct_OTOOL64=$OTOOL64
9873   # Extract the first word of "otool64", so it can be a program name with args.
9874 set dummy otool64; ac_word=$2
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9876 $as_echo_n "checking for $ac_word... " >&6; }
9877 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
9878   $as_echo_n "(cached) " >&6
9879 else
9880   if test -n "$ac_ct_OTOOL64"; then
9881   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
9882 else
9883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9884 for as_dir in $PATH
9885 do
9886   IFS=$as_save_IFS
9887   test -z "$as_dir" && as_dir=.
9888     for ac_exec_ext in '' $ac_executable_extensions; do
9889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9890     ac_cv_prog_ac_ct_OTOOL64="otool64"
9891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9892     break 2
9893   fi
9894 done
9895   done
9896 IFS=$as_save_IFS
9897
9898 fi
9899 fi
9900 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
9901 if test -n "$ac_ct_OTOOL64"; then
9902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
9903 $as_echo "$ac_ct_OTOOL64" >&6; }
9904 else
9905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9906 $as_echo "no" >&6; }
9907 fi
9908
9909   if test "x$ac_ct_OTOOL64" = x; then
9910     OTOOL64=":"
9911   else
9912     case $cross_compiling:$ac_tool_warned in
9913 yes:)
9914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9915 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9916 ac_tool_warned=yes ;;
9917 esac
9918     OTOOL64=$ac_ct_OTOOL64
9919   fi
9920 else
9921   OTOOL64="$ac_cv_prog_OTOOL64"
9922 fi
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
9951 $as_echo_n "checking for -single_module linker flag... " >&6; }
9952 if ${lt_cv_apple_cc_single_mod+:} false; then :
9953   $as_echo_n "(cached) " >&6
9954 else
9955   lt_cv_apple_cc_single_mod=no
9956       if test -z "$LT_MULTI_MODULE"; then
9957         # By default we will add the -single_module flag. You can override
9958         # by either setting the environment variable LT_MULTI_MODULE
9959         # non-empty at configure time, or by adding -multi_module to the
9960         # link flags.
9961         rm -rf libconftest.dylib*
9962         echo "int foo(void){return 1;}" > conftest.c
9963         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9964 -dynamiclib -Wl,-single_module conftest.c" >&5
9965         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9966           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
9967         _lt_result=$?
9968         # If there is a non-empty error log, and "single_module"
9969         # appears in it, assume the flag caused a linker warning
9970         if test -s conftest.err && $GREP single_module conftest.err; then
9971           cat conftest.err >&5
9972         # Otherwise, if the output was created with a 0 exit code from
9973         # the compiler, it worked.
9974         elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
9975           lt_cv_apple_cc_single_mod=yes
9976         else
9977           cat conftest.err >&5
9978         fi
9979         rm -rf libconftest.dylib*
9980         rm -f conftest.*
9981       fi
9982 fi
9983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
9984 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
9985
9986     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
9987 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
9988 if ${lt_cv_ld_exported_symbols_list+:} false; then :
9989   $as_echo_n "(cached) " >&6
9990 else
9991   lt_cv_ld_exported_symbols_list=no
9992       save_LDFLAGS=$LDFLAGS
9993       echo "_main" > conftest.sym
9994       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
9995       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9996 /* end confdefs.h.  */
9997
9998 int
9999 main ()
10000 {
10001
10002   ;
10003   return 0;
10004 }
10005 _ACEOF
10006 if ac_fn_c_try_link "$LINENO"; then :
10007   lt_cv_ld_exported_symbols_list=yes
10008 else
10009   lt_cv_ld_exported_symbols_list=no
10010 fi
10011 rm -f core conftest.err conftest.$ac_objext \
10012     conftest$ac_exeext conftest.$ac_ext
10013         LDFLAGS=$save_LDFLAGS
10014
10015 fi
10016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
10017 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
10018
10019     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
10020 $as_echo_n "checking for -force_load linker flag... " >&6; }
10021 if ${lt_cv_ld_force_load+:} false; then :
10022   $as_echo_n "(cached) " >&6
10023 else
10024   lt_cv_ld_force_load=no
10025       cat > conftest.c << _LT_EOF
10026 int forced_loaded() { return 2;}
10027 _LT_EOF
10028       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
10029       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
10030       echo "$AR cru libconftest.a conftest.o" >&5
10031       $AR cru libconftest.a conftest.o 2>&5
10032       echo "$RANLIB libconftest.a" >&5
10033       $RANLIB libconftest.a 2>&5
10034       cat > conftest.c << _LT_EOF
10035 int main() { return 0;}
10036 _LT_EOF
10037       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
10038       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10039       _lt_result=$?
10040       if test -s conftest.err && $GREP force_load conftest.err; then
10041         cat conftest.err >&5
10042       elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10043         lt_cv_ld_force_load=yes
10044       else
10045         cat conftest.err >&5
10046       fi
10047         rm -f conftest.err libconftest.a conftest conftest.c
10048         rm -rf conftest.dSYM
10049
10050 fi
10051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
10052 $as_echo "$lt_cv_ld_force_load" >&6; }
10053     case $host_os in
10054     rhapsody* | darwin1.[012])
10055       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10056     darwin1.*)
10057       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10058     darwin*) # darwin 5.x on
10059       # if running on 10.5 or later, the deployment target defaults
10060       # to the OS version, if on x86, and 10.4, the deployment
10061       # target defaults to 10.4. Don't you love it?
10062       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10063         10.0,*86*-darwin8*|10.0,*-darwin[91]*)
10064           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10065         10.[012][,.]*)
10066           _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10067         10.*)
10068           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10069       esac
10070     ;;
10071   esac
10072     if test yes = "$lt_cv_apple_cc_single_mod"; then
10073       _lt_dar_single_mod='$single_module'
10074     fi
10075     if test yes = "$lt_cv_ld_exported_symbols_list"; then
10076       _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10077     else
10078       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10079     fi
10080     if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10081       _lt_dsymutil='~$DSYMUTIL $lib || :'
10082     else
10083       _lt_dsymutil=
10084     fi
10085     ;;
10086   esac
10087
10088 # func_munge_path_list VARIABLE PATH
10089 # -----------------------------------
10090 # VARIABLE is name of variable containing _space_ separated list of
10091 # directories to be munged by the contents of PATH, which is string
10092 # having a format:
10093 # "DIR[:DIR]:"
10094 #       string "DIR[ DIR]" will be prepended to VARIABLE
10095 # ":DIR[:DIR]"
10096 #       string "DIR[ DIR]" will be appended to VARIABLE
10097 # "DIRP[:DIRP]::[DIRA:]DIRA"
10098 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
10099 #       "DIRA[ DIRA]" will be appended to VARIABLE
10100 # "DIR[:DIR]"
10101 #       VARIABLE will be replaced by "DIR[ DIR]"
10102 func_munge_path_list ()
10103 {
10104     case x$2 in
10105     x)
10106         ;;
10107     *:)
10108         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10109         ;;
10110     x:*)
10111         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10112         ;;
10113     *::*)
10114         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10115         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10116         ;;
10117     *)
10118         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10119         ;;
10120     esac
10121 }
10122
10123 for ac_header in dlfcn.h
10124 do :
10125   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10126 "
10127 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
10128   cat >>confdefs.h <<_ACEOF
10129 #define HAVE_DLFCN_H 1
10130 _ACEOF
10131
10132 fi
10133
10134 done
10135
10136
10137
10138
10139
10140
10141
10142 # Set options
10143
10144
10145
10146         enable_dlopen=no
10147
10148
10149   enable_win32_dll=no
10150
10151
10152             # Check whether --enable-shared was given.
10153 if test "${enable_shared+set}" = set; then :
10154   enableval=$enable_shared; p=${PACKAGE-default}
10155     case $enableval in
10156     yes) enable_shared=yes ;;
10157     no) enable_shared=no ;;
10158     *)
10159       enable_shared=no
10160       # Look at the argument we got.  We use all the common list separators.
10161       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10162       for pkg in $enableval; do
10163         IFS=$lt_save_ifs
10164         if test "X$pkg" = "X$p"; then
10165           enable_shared=yes
10166         fi
10167       done
10168       IFS=$lt_save_ifs
10169       ;;
10170     esac
10171 else
10172   enable_shared=yes
10173 fi
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183   # Check whether --enable-static was given.
10184 if test "${enable_static+set}" = set; then :
10185   enableval=$enable_static; p=${PACKAGE-default}
10186     case $enableval in
10187     yes) enable_static=yes ;;
10188     no) enable_static=no ;;
10189     *)
10190      enable_static=no
10191       # Look at the argument we got.  We use all the common list separators.
10192       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10193       for pkg in $enableval; do
10194         IFS=$lt_save_ifs
10195         if test "X$pkg" = "X$p"; then
10196           enable_static=yes
10197         fi
10198       done
10199       IFS=$lt_save_ifs
10200       ;;
10201     esac
10202 else
10203   enable_static=yes
10204 fi
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215 # Check whether --with-pic was given.
10216 if test "${with_pic+set}" = set; then :
10217   withval=$with_pic; lt_p=${PACKAGE-default}
10218     case $withval in
10219     yes|no) pic_mode=$withval ;;
10220     *)
10221       pic_mode=default
10222       # Look at the argument we got.  We use all the common list separators.
10223       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10224       for lt_pkg in $withval; do
10225         IFS=$lt_save_ifs
10226         if test "X$lt_pkg" = "X$lt_p"; then
10227           pic_mode=yes
10228         fi
10229       done
10230       IFS=$lt_save_ifs
10231       ;;
10232     esac
10233 else
10234   pic_mode=default
10235 fi
10236
10237
10238
10239
10240
10241
10242
10243
10244   # Check whether --enable-fast-install was given.
10245 if test "${enable_fast_install+set}" = set; then :
10246   enableval=$enable_fast_install; p=${PACKAGE-default}
10247     case $enableval in
10248     yes) enable_fast_install=yes ;;
10249     no) enable_fast_install=no ;;
10250     *)
10251       enable_fast_install=no
10252       # Look at the argument we got.  We use all the common list separators.
10253       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10254       for pkg in $enableval; do
10255         IFS=$lt_save_ifs
10256         if test "X$pkg" = "X$p"; then
10257           enable_fast_install=yes
10258         fi
10259       done
10260       IFS=$lt_save_ifs
10261       ;;
10262     esac
10263 else
10264   enable_fast_install=yes
10265 fi
10266
10267
10268
10269
10270
10271
10272
10273
10274   shared_archive_member_spec=
10275 case $host,$enable_shared in
10276 power*-*-aix[5-9]*,yes)
10277   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10278 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
10279
10280 # Check whether --with-aix-soname was given.
10281 if test "${with_aix_soname+set}" = set; then :
10282   withval=$with_aix_soname; case $withval in
10283     aix|svr4|both)
10284       ;;
10285     *)
10286       as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10287       ;;
10288     esac
10289     lt_cv_with_aix_soname=$with_aix_soname
10290 else
10291   if ${lt_cv_with_aix_soname+:} false; then :
10292   $as_echo_n "(cached) " >&6
10293 else
10294   lt_cv_with_aix_soname=aix
10295 fi
10296
10297     with_aix_soname=$lt_cv_with_aix_soname
10298 fi
10299
10300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10301 $as_echo "$with_aix_soname" >&6; }
10302   if test aix != "$with_aix_soname"; then
10303     # For the AIX way of multilib, we name the shared archive member
10304     # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10305     # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10306     # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10307     # the AIX toolchain works better with OBJECT_MODE set (default 32).
10308     if test 64 = "${OBJECT_MODE-32}"; then
10309       shared_archive_member_spec=shr_64
10310     else
10311       shared_archive_member_spec=shr
10312     fi
10313   fi
10314   ;;
10315 *)
10316   with_aix_soname=aix
10317   ;;
10318 esac
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329 # This can be used to rebuild libtool when needed
10330 LIBTOOL_DEPS=$ltmain
10331
10332 # Always use our own libtool.
10333 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364 test -z "$LN_S" && LN_S="ln -s"
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379 if test -n "${ZSH_VERSION+set}"; then
10380    setopt NO_GLOB_SUBST
10381 fi
10382
10383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10384 $as_echo_n "checking for objdir... " >&6; }
10385 if ${lt_cv_objdir+:} false; then :
10386   $as_echo_n "(cached) " >&6
10387 else
10388   rm -f .libs 2>/dev/null
10389 mkdir .libs 2>/dev/null
10390 if test -d .libs; then
10391   lt_cv_objdir=.libs
10392 else
10393   # MS-DOS does not allow filenames that begin with a dot.
10394   lt_cv_objdir=_libs
10395 fi
10396 rmdir .libs 2>/dev/null
10397 fi
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10399 $as_echo "$lt_cv_objdir" >&6; }
10400 objdir=$lt_cv_objdir
10401
10402
10403
10404
10405
10406 cat >>confdefs.h <<_ACEOF
10407 #define LT_OBJDIR "$lt_cv_objdir/"
10408 _ACEOF
10409
10410
10411
10412
10413 case $host_os in
10414 aix3*)
10415   # AIX sometimes has problems with the GCC collect2 program.  For some
10416   # reason, if we set the COLLECT_NAMES environment variable, the problems
10417   # vanish in a puff of smoke.
10418   if test set != "${COLLECT_NAMES+set}"; then
10419     COLLECT_NAMES=
10420     export COLLECT_NAMES
10421   fi
10422   ;;
10423 esac
10424
10425 # Global variables:
10426 ofile=libtool
10427 can_build_shared=yes
10428
10429 # All known linkers require a '.a' archive for static linking (except MSVC,
10430 # which needs '.lib').
10431 libext=a
10432
10433 with_gnu_ld=$lt_cv_prog_gnu_ld
10434
10435 old_CC=$CC
10436 old_CFLAGS=$CFLAGS
10437
10438 # Set sane defaults for various variables
10439 test -z "$CC" && CC=cc
10440 test -z "$LTCC" && LTCC=$CC
10441 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10442 test -z "$LD" && LD=ld
10443 test -z "$ac_objext" && ac_objext=o
10444
10445 func_cc_basename $compiler
10446 cc_basename=$func_cc_basename_result
10447
10448
10449 # Only perform the check for file, if the check method requires it
10450 test -z "$MAGIC_CMD" && MAGIC_CMD=file
10451 case $deplibs_check_method in
10452 file_magic*)
10453   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10454     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10455 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10456 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10457   $as_echo_n "(cached) " >&6
10458 else
10459   case $MAGIC_CMD in
10460 [\\/*] |  ?:[\\/]*)
10461   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10462   ;;
10463 *)
10464   lt_save_MAGIC_CMD=$MAGIC_CMD
10465   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10466   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10467   for ac_dir in $ac_dummy; do
10468     IFS=$lt_save_ifs
10469     test -z "$ac_dir" && ac_dir=.
10470     if test -f "$ac_dir/${ac_tool_prefix}file"; then
10471       lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10472       if test -n "$file_magic_test_file"; then
10473         case $deplibs_check_method in
10474         "file_magic "*)
10475           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10476           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10477           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10478             $EGREP "$file_magic_regex" > /dev/null; then
10479             :
10480           else
10481             cat <<_LT_EOF 1>&2
10482
10483 *** Warning: the command libtool uses to detect shared libraries,
10484 *** $file_magic_cmd, produces output that libtool cannot recognize.
10485 *** The result is that libtool may fail to recognize shared libraries
10486 *** as such.  This will affect the creation of libtool libraries that
10487 *** depend on shared libraries, but programs linked with such libtool
10488 *** libraries will work regardless of this problem.  Nevertheless, you
10489 *** may want to report the problem to your system manager and/or to
10490 *** bug-libtool@gnu.org
10491
10492 _LT_EOF
10493           fi ;;
10494         esac
10495       fi
10496       break
10497     fi
10498   done
10499   IFS=$lt_save_ifs
10500   MAGIC_CMD=$lt_save_MAGIC_CMD
10501   ;;
10502 esac
10503 fi
10504
10505 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10506 if test -n "$MAGIC_CMD"; then
10507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10508 $as_echo "$MAGIC_CMD" >&6; }
10509 else
10510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10511 $as_echo "no" >&6; }
10512 fi
10513
10514
10515
10516
10517
10518 if test -z "$lt_cv_path_MAGIC_CMD"; then
10519   if test -n "$ac_tool_prefix"; then
10520     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10521 $as_echo_n "checking for file... " >&6; }
10522 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10523   $as_echo_n "(cached) " >&6
10524 else
10525   case $MAGIC_CMD in
10526 [\\/*] |  ?:[\\/]*)
10527   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10528   ;;
10529 *)
10530   lt_save_MAGIC_CMD=$MAGIC_CMD
10531   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10532   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10533   for ac_dir in $ac_dummy; do
10534     IFS=$lt_save_ifs
10535     test -z "$ac_dir" && ac_dir=.
10536     if test -f "$ac_dir/file"; then
10537       lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10538       if test -n "$file_magic_test_file"; then
10539         case $deplibs_check_method in
10540         "file_magic "*)
10541           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10542           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10543           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10544             $EGREP "$file_magic_regex" > /dev/null; then
10545             :
10546           else
10547             cat <<_LT_EOF 1>&2
10548
10549 *** Warning: the command libtool uses to detect shared libraries,
10550 *** $file_magic_cmd, produces output that libtool cannot recognize.
10551 *** The result is that libtool may fail to recognize shared libraries
10552 *** as such.  This will affect the creation of libtool libraries that
10553 *** depend on shared libraries, but programs linked with such libtool
10554 *** libraries will work regardless of this problem.  Nevertheless, you
10555 *** may want to report the problem to your system manager and/or to
10556 *** bug-libtool@gnu.org
10557
10558 _LT_EOF
10559           fi ;;
10560         esac
10561       fi
10562       break
10563     fi
10564   done
10565   IFS=$lt_save_ifs
10566   MAGIC_CMD=$lt_save_MAGIC_CMD
10567   ;;
10568 esac
10569 fi
10570
10571 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10572 if test -n "$MAGIC_CMD"; then
10573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10574 $as_echo "$MAGIC_CMD" >&6; }
10575 else
10576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10577 $as_echo "no" >&6; }
10578 fi
10579
10580
10581   else
10582     MAGIC_CMD=:
10583   fi
10584 fi
10585
10586   fi
10587   ;;
10588 esac
10589
10590 # Use C for the default configuration in the libtool script
10591
10592 lt_save_CC=$CC
10593 ac_ext=c
10594 ac_cpp='$CPP $CPPFLAGS'
10595 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10596 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10597 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10598
10599
10600 # Source file extension for C test sources.
10601 ac_ext=c
10602
10603 # Object file extension for compiled C test sources.
10604 objext=o
10605 objext=$objext
10606
10607 # Code to be used in simple compile tests
10608 lt_simple_compile_test_code="int some_variable = 0;"
10609
10610 # Code to be used in simple link tests
10611 lt_simple_link_test_code='int main(){return(0);}'
10612
10613
10614
10615
10616
10617
10618
10619 # If no C compiler was specified, use CC.
10620 LTCC=${LTCC-"$CC"}
10621
10622 # If no C compiler flags were specified, use CFLAGS.
10623 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10624
10625 # Allow CC to be a program name with arguments.
10626 compiler=$CC
10627
10628 # Save the default compiler, since it gets overwritten when the other
10629 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10630 compiler_DEFAULT=$CC
10631
10632 # save warnings/boilerplate of simple test code
10633 ac_outfile=conftest.$ac_objext
10634 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10635 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10636 _lt_compiler_boilerplate=`cat conftest.err`
10637 $RM conftest*
10638
10639 ac_outfile=conftest.$ac_objext
10640 echo "$lt_simple_link_test_code" >conftest.$ac_ext
10641 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10642 _lt_linker_boilerplate=`cat conftest.err`
10643 $RM -r conftest*
10644
10645
10646 if test -n "$compiler"; then
10647
10648 lt_prog_compiler_no_builtin_flag=
10649
10650 if test yes = "$GCC"; then
10651   case $cc_basename in
10652   nvcc*)
10653     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10654   *)
10655     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10656   esac
10657
10658   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10659 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10660 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10661   $as_echo_n "(cached) " >&6
10662 else
10663   lt_cv_prog_compiler_rtti_exceptions=no
10664    ac_outfile=conftest.$ac_objext
10665    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10666    lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
10667    # Insert the option either (1) after the last *FLAGS variable, or
10668    # (2) before a word containing "conftest.", or (3) at the end.
10669    # Note that $ac_compile itself does not contain backslashes and begins
10670    # with a dollar sign (not a hyphen), so the echo should work correctly.
10671    # The option is referenced via a variable to avoid confusing sed.
10672    lt_compile=`echo "$ac_compile" | $SED \
10673    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10674    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10675    -e 's:$: $lt_compiler_flag:'`
10676    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10677    (eval "$lt_compile" 2>conftest.err)
10678    ac_status=$?
10679    cat conftest.err >&5
10680    echo "$as_me:$LINENO: \$? = $ac_status" >&5
10681    if (exit $ac_status) && test -s "$ac_outfile"; then
10682      # The compiler can only warn and ignore the option if not recognized
10683      # So say no if there are warnings other than the usual output.
10684      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10685      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10686      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10687        lt_cv_prog_compiler_rtti_exceptions=yes
10688      fi
10689    fi
10690    $RM conftest*
10691
10692 fi
10693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10694 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10695
10696 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10697     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10698 else
10699     :
10700 fi
10701
10702 fi
10703
10704
10705
10706
10707
10708
10709   lt_prog_compiler_wl=
10710 lt_prog_compiler_pic=
10711 lt_prog_compiler_static=
10712
10713
10714   if test yes = "$GCC"; then
10715     lt_prog_compiler_wl='-Wl,'
10716     lt_prog_compiler_static='-static'
10717
10718     case $host_os in
10719       aix*)
10720       # All AIX code is PIC.
10721       if test ia64 = "$host_cpu"; then
10722         # AIX 5 now supports IA64 processor
10723         lt_prog_compiler_static='-Bstatic'
10724       fi
10725       lt_prog_compiler_pic='-fPIC'
10726       ;;
10727
10728     amigaos*)
10729       case $host_cpu in
10730       powerpc)
10731             # see comment about AmigaOS4 .so support
10732             lt_prog_compiler_pic='-fPIC'
10733         ;;
10734       m68k)
10735             # FIXME: we need at least 68020 code to build shared libraries, but
10736             # adding the '-m68020' flag to GCC prevents building anything better,
10737             # like '-m68040'.
10738             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10739         ;;
10740       esac
10741       ;;
10742
10743     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10744       # PIC is the default for these OSes.
10745       ;;
10746
10747     mingw* | cygwin* | pw32* | os2* | cegcc*)
10748       # This hack is so that the source file can tell whether it is being
10749       # built for inclusion in a dll (and should export symbols for example).
10750       # Although the cygwin gcc ignores -fPIC, still need this for old-style
10751       # (--disable-auto-import) libraries
10752       lt_prog_compiler_pic='-DDLL_EXPORT'
10753       case $host_os in
10754       os2*)
10755         lt_prog_compiler_static='$wl-static'
10756         ;;
10757       esac
10758       ;;
10759
10760     darwin* | rhapsody*)
10761       # PIC is the default on this platform
10762       # Common symbols not allowed in MH_DYLIB files
10763       lt_prog_compiler_pic='-fno-common'
10764       ;;
10765
10766     haiku*)
10767       # PIC is the default for Haiku.
10768       # The "-static" flag exists, but is broken.
10769       lt_prog_compiler_static=
10770       ;;
10771
10772     hpux*)
10773       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10774       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10775       # sets the default TLS model and affects inlining.
10776       case $host_cpu in
10777       hppa*64*)
10778         # +Z the default
10779         ;;
10780       *)
10781         lt_prog_compiler_pic='-fPIC'
10782         ;;
10783       esac
10784       ;;
10785
10786     interix[3-9]*)
10787       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10788       # Instead, we relocate shared libraries at runtime.
10789       ;;
10790
10791     msdosdjgpp*)
10792       # Just because we use GCC doesn't mean we suddenly get shared libraries
10793       # on systems that don't support them.
10794       lt_prog_compiler_can_build_shared=no
10795       enable_shared=no
10796       ;;
10797
10798     *nto* | *qnx*)
10799       # QNX uses GNU C++, but need to define -shared option too, otherwise
10800       # it will coredump.
10801       lt_prog_compiler_pic='-fPIC -shared'
10802       ;;
10803
10804     sysv4*MP*)
10805       if test -d /usr/nec; then
10806         lt_prog_compiler_pic=-Kconform_pic
10807       fi
10808       ;;
10809
10810     *)
10811       lt_prog_compiler_pic='-fPIC'
10812       ;;
10813     esac
10814
10815     case $cc_basename in
10816     nvcc*) # Cuda Compiler Driver 2.2
10817       lt_prog_compiler_wl='-Xlinker '
10818       if test -n "$lt_prog_compiler_pic"; then
10819         lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
10820       fi
10821       ;;
10822     esac
10823   else
10824     # PORTME Check for flag to pass linker flags through the system compiler.
10825     case $host_os in
10826     aix*)
10827       lt_prog_compiler_wl='-Wl,'
10828       if test ia64 = "$host_cpu"; then
10829         # AIX 5 now supports IA64 processor
10830         lt_prog_compiler_static='-Bstatic'
10831       else
10832         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
10833       fi
10834       ;;
10835
10836     darwin* | rhapsody*)
10837       # PIC is the default on this platform
10838       # Common symbols not allowed in MH_DYLIB files
10839       lt_prog_compiler_pic='-fno-common'
10840       case $cc_basename in
10841       nagfor*)
10842         # NAG Fortran compiler
10843         lt_prog_compiler_wl='-Wl,-Wl,,'
10844         lt_prog_compiler_pic='-PIC'
10845         lt_prog_compiler_static='-Bstatic'
10846         ;;
10847       esac
10848       ;;
10849
10850     mingw* | cygwin* | pw32* | os2* | cegcc*)
10851       # This hack is so that the source file can tell whether it is being
10852       # built for inclusion in a dll (and should export symbols for example).
10853       lt_prog_compiler_pic='-DDLL_EXPORT'
10854       case $host_os in
10855       os2*)
10856         lt_prog_compiler_static='$wl-static'
10857         ;;
10858       esac
10859       ;;
10860
10861     hpux9* | hpux10* | hpux11*)
10862       lt_prog_compiler_wl='-Wl,'
10863       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10864       # not for PA HP-UX.
10865       case $host_cpu in
10866       hppa*64*|ia64*)
10867         # +Z the default
10868         ;;
10869       *)
10870         lt_prog_compiler_pic='+Z'
10871         ;;
10872       esac
10873       # Is there a better lt_prog_compiler_static that works with the bundled CC?
10874       lt_prog_compiler_static='$wl-a ${wl}archive'
10875       ;;
10876
10877     irix5* | irix6* | nonstopux*)
10878       lt_prog_compiler_wl='-Wl,'
10879       # PIC (with -KPIC) is the default.
10880       lt_prog_compiler_static='-non_shared'
10881       ;;
10882
10883     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
10884       case $cc_basename in
10885       # old Intel for x86_64, which still supported -KPIC.
10886       ecc*)
10887         lt_prog_compiler_wl='-Wl,'
10888         lt_prog_compiler_pic='-KPIC'
10889         lt_prog_compiler_static='-static'
10890         ;;
10891       # icc used to be incompatible with GCC.
10892       # ICC 10 doesn't accept -KPIC any more.
10893       icc* | ifort*)
10894         lt_prog_compiler_wl='-Wl,'
10895         lt_prog_compiler_pic='-fPIC'
10896         lt_prog_compiler_static='-static'
10897         ;;
10898       # Lahey Fortran 8.1.
10899       lf95*)
10900         lt_prog_compiler_wl='-Wl,'
10901         lt_prog_compiler_pic='--shared'
10902         lt_prog_compiler_static='--static'
10903         ;;
10904       nagfor*)
10905         # NAG Fortran compiler
10906         lt_prog_compiler_wl='-Wl,-Wl,,'
10907         lt_prog_compiler_pic='-PIC'
10908         lt_prog_compiler_static='-Bstatic'
10909         ;;
10910       tcc*)
10911         # Fabrice Bellard et al's Tiny C Compiler
10912         lt_prog_compiler_wl='-Wl,'
10913         lt_prog_compiler_pic='-fPIC'
10914         lt_prog_compiler_static='-static'
10915         ;;
10916       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
10917         # Portland Group compilers (*not* the Pentium gcc compiler,
10918         # which looks to be a dead project)
10919         lt_prog_compiler_wl='-Wl,'
10920         lt_prog_compiler_pic='-fpic'
10921         lt_prog_compiler_static='-Bstatic'
10922         ;;
10923       ccc*)
10924         lt_prog_compiler_wl='-Wl,'
10925         # All Alpha code is PIC.
10926         lt_prog_compiler_static='-non_shared'
10927         ;;
10928       xl* | bgxl* | bgf* | mpixl*)
10929         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
10930         lt_prog_compiler_wl='-Wl,'
10931         lt_prog_compiler_pic='-qpic'
10932         lt_prog_compiler_static='-qstaticlink'
10933         ;;
10934       *)
10935         case `$CC -V 2>&1 | sed 5q` in
10936         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
10937           # Sun Fortran 8.3 passes all unrecognized flags to the linker
10938           lt_prog_compiler_pic='-KPIC'
10939           lt_prog_compiler_static='-Bstatic'
10940           lt_prog_compiler_wl=''
10941           ;;
10942         *Sun\ F* | *Sun*Fortran*)
10943           lt_prog_compiler_pic='-KPIC'
10944           lt_prog_compiler_static='-Bstatic'
10945           lt_prog_compiler_wl='-Qoption ld '
10946           ;;
10947         *Sun\ C*)
10948           # Sun C 5.9
10949           lt_prog_compiler_pic='-KPIC'
10950           lt_prog_compiler_static='-Bstatic'
10951           lt_prog_compiler_wl='-Wl,'
10952           ;;
10953         *Intel*\ [CF]*Compiler*)
10954           lt_prog_compiler_wl='-Wl,'
10955           lt_prog_compiler_pic='-fPIC'
10956           lt_prog_compiler_static='-static'
10957           ;;
10958         *Portland\ Group*)
10959           lt_prog_compiler_wl='-Wl,'
10960           lt_prog_compiler_pic='-fpic'
10961           lt_prog_compiler_static='-Bstatic'
10962           ;;
10963         esac
10964         ;;
10965       esac
10966       ;;
10967
10968     newsos6)
10969       lt_prog_compiler_pic='-KPIC'
10970       lt_prog_compiler_static='-Bstatic'
10971       ;;
10972
10973     *nto* | *qnx*)
10974       # QNX uses GNU C++, but need to define -shared option too, otherwise
10975       # it will coredump.
10976       lt_prog_compiler_pic='-fPIC -shared'
10977       ;;
10978
10979     osf3* | osf4* | osf5*)
10980       lt_prog_compiler_wl='-Wl,'
10981       # All OSF/1 code is PIC.
10982       lt_prog_compiler_static='-non_shared'
10983       ;;
10984
10985     rdos*)
10986       lt_prog_compiler_static='-non_shared'
10987       ;;
10988
10989     solaris*)
10990       lt_prog_compiler_pic='-KPIC'
10991       lt_prog_compiler_static='-Bstatic'
10992       case $cc_basename in
10993       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
10994         lt_prog_compiler_wl='-Qoption ld ';;
10995       *)
10996         lt_prog_compiler_wl='-Wl,';;
10997       esac
10998       ;;
10999
11000     sunos4*)
11001       lt_prog_compiler_wl='-Qoption ld '
11002       lt_prog_compiler_pic='-PIC'
11003       lt_prog_compiler_static='-Bstatic'
11004       ;;
11005
11006     sysv4 | sysv4.2uw2* | sysv4.3*)
11007       lt_prog_compiler_wl='-Wl,'
11008       lt_prog_compiler_pic='-KPIC'
11009       lt_prog_compiler_static='-Bstatic'
11010       ;;
11011
11012     sysv4*MP*)
11013       if test -d /usr/nec; then
11014         lt_prog_compiler_pic='-Kconform_pic'
11015         lt_prog_compiler_static='-Bstatic'
11016       fi
11017       ;;
11018
11019     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11020       lt_prog_compiler_wl='-Wl,'
11021       lt_prog_compiler_pic='-KPIC'
11022       lt_prog_compiler_static='-Bstatic'
11023       ;;
11024
11025     unicos*)
11026       lt_prog_compiler_wl='-Wl,'
11027       lt_prog_compiler_can_build_shared=no
11028       ;;
11029
11030     uts4*)
11031       lt_prog_compiler_pic='-pic'
11032       lt_prog_compiler_static='-Bstatic'
11033       ;;
11034
11035     *)
11036       lt_prog_compiler_can_build_shared=no
11037       ;;
11038     esac
11039   fi
11040
11041 case $host_os in
11042   # For platforms that do not support PIC, -DPIC is meaningless:
11043   *djgpp*)
11044     lt_prog_compiler_pic=
11045     ;;
11046   *)
11047     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11048     ;;
11049 esac
11050
11051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11052 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
11053 if ${lt_cv_prog_compiler_pic+:} false; then :
11054   $as_echo_n "(cached) " >&6
11055 else
11056   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11057 fi
11058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11059 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
11060 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11061
11062 #
11063 # Check to make sure the PIC flag actually works.
11064 #
11065 if test -n "$lt_prog_compiler_pic"; then
11066   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
11067 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
11068 if ${lt_cv_prog_compiler_pic_works+:} false; then :
11069   $as_echo_n "(cached) " >&6
11070 else
11071   lt_cv_prog_compiler_pic_works=no
11072    ac_outfile=conftest.$ac_objext
11073    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11074    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
11075    # Insert the option either (1) after the last *FLAGS variable, or
11076    # (2) before a word containing "conftest.", or (3) at the end.
11077    # Note that $ac_compile itself does not contain backslashes and begins
11078    # with a dollar sign (not a hyphen), so the echo should work correctly.
11079    # The option is referenced via a variable to avoid confusing sed.
11080    lt_compile=`echo "$ac_compile" | $SED \
11081    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11082    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11083    -e 's:$: $lt_compiler_flag:'`
11084    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11085    (eval "$lt_compile" 2>conftest.err)
11086    ac_status=$?
11087    cat conftest.err >&5
11088    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11089    if (exit $ac_status) && test -s "$ac_outfile"; then
11090      # The compiler can only warn and ignore the option if not recognized
11091      # So say no if there are warnings other than the usual output.
11092      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11093      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11094      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11095        lt_cv_prog_compiler_pic_works=yes
11096      fi
11097    fi
11098    $RM conftest*
11099
11100 fi
11101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
11102 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
11103
11104 if test yes = "$lt_cv_prog_compiler_pic_works"; then
11105     case $lt_prog_compiler_pic in
11106      "" | " "*) ;;
11107      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11108      esac
11109 else
11110     lt_prog_compiler_pic=
11111      lt_prog_compiler_can_build_shared=no
11112 fi
11113
11114 fi
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126 #
11127 # Check to make sure the static flag actually works.
11128 #
11129 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11131 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11132 if ${lt_cv_prog_compiler_static_works+:} false; then :
11133   $as_echo_n "(cached) " >&6
11134 else
11135   lt_cv_prog_compiler_static_works=no
11136    save_LDFLAGS=$LDFLAGS
11137    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11138    echo "$lt_simple_link_test_code" > conftest.$ac_ext
11139    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11140      # The linker can only warn and ignore the option if not recognized
11141      # So say no if there are warnings
11142      if test -s conftest.err; then
11143        # Append any errors to the config.log.
11144        cat conftest.err 1>&5
11145        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11146        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11147        if diff conftest.exp conftest.er2 >/dev/null; then
11148          lt_cv_prog_compiler_static_works=yes
11149        fi
11150      else
11151        lt_cv_prog_compiler_static_works=yes
11152      fi
11153    fi
11154    $RM -r conftest*
11155    LDFLAGS=$save_LDFLAGS
11156
11157 fi
11158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11159 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
11160
11161 if test yes = "$lt_cv_prog_compiler_static_works"; then
11162     :
11163 else
11164     lt_prog_compiler_static=
11165 fi
11166
11167
11168
11169
11170
11171
11172
11173   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11174 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11175 if ${lt_cv_prog_compiler_c_o+:} false; then :
11176   $as_echo_n "(cached) " >&6
11177 else
11178   lt_cv_prog_compiler_c_o=no
11179    $RM -r conftest 2>/dev/null
11180    mkdir conftest
11181    cd conftest
11182    mkdir out
11183    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11184
11185    lt_compiler_flag="-o out/conftest2.$ac_objext"
11186    # Insert the option either (1) after the last *FLAGS variable, or
11187    # (2) before a word containing "conftest.", or (3) at the end.
11188    # Note that $ac_compile itself does not contain backslashes and begins
11189    # with a dollar sign (not a hyphen), so the echo should work correctly.
11190    lt_compile=`echo "$ac_compile" | $SED \
11191    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11192    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11193    -e 's:$: $lt_compiler_flag:'`
11194    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11195    (eval "$lt_compile" 2>out/conftest.err)
11196    ac_status=$?
11197    cat out/conftest.err >&5
11198    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11199    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11200    then
11201      # The compiler can only warn and ignore the option if not recognized
11202      # So say no if there are warnings
11203      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11204      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11205      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11206        lt_cv_prog_compiler_c_o=yes
11207      fi
11208    fi
11209    chmod u+w . 2>&5
11210    $RM conftest*
11211    # SGI C++ compiler will create directory out/ii_files/ for
11212    # template instantiation
11213    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11214    $RM out/* && rmdir out
11215    cd ..
11216    $RM -r conftest
11217    $RM conftest*
11218
11219 fi
11220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11221 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11222
11223
11224
11225
11226
11227
11228   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11229 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11230 if ${lt_cv_prog_compiler_c_o+:} false; then :
11231   $as_echo_n "(cached) " >&6
11232 else
11233   lt_cv_prog_compiler_c_o=no
11234    $RM -r conftest 2>/dev/null
11235    mkdir conftest
11236    cd conftest
11237    mkdir out
11238    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11239
11240    lt_compiler_flag="-o out/conftest2.$ac_objext"
11241    # Insert the option either (1) after the last *FLAGS variable, or
11242    # (2) before a word containing "conftest.", or (3) at the end.
11243    # Note that $ac_compile itself does not contain backslashes and begins
11244    # with a dollar sign (not a hyphen), so the echo should work correctly.
11245    lt_compile=`echo "$ac_compile" | $SED \
11246    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11247    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11248    -e 's:$: $lt_compiler_flag:'`
11249    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11250    (eval "$lt_compile" 2>out/conftest.err)
11251    ac_status=$?
11252    cat out/conftest.err >&5
11253    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11254    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11255    then
11256      # The compiler can only warn and ignore the option if not recognized
11257      # So say no if there are warnings
11258      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11259      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11260      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11261        lt_cv_prog_compiler_c_o=yes
11262      fi
11263    fi
11264    chmod u+w . 2>&5
11265    $RM conftest*
11266    # SGI C++ compiler will create directory out/ii_files/ for
11267    # template instantiation
11268    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11269    $RM out/* && rmdir out
11270    cd ..
11271    $RM -r conftest
11272    $RM conftest*
11273
11274 fi
11275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11276 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11277
11278
11279
11280
11281 hard_links=nottested
11282 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11283   # do not overwrite the value of need_locks provided by the user
11284   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11285 $as_echo_n "checking if we can lock with hard links... " >&6; }
11286   hard_links=yes
11287   $RM conftest*
11288   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11289   touch conftest.a
11290   ln conftest.a conftest.b 2>&5 || hard_links=no
11291   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11293 $as_echo "$hard_links" >&6; }
11294   if test no = "$hard_links"; then
11295     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11296 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11297     need_locks=warn
11298   fi
11299 else
11300   need_locks=no
11301 fi
11302
11303
11304
11305
11306
11307
11308   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11309 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11310
11311   runpath_var=
11312   allow_undefined_flag=
11313   always_export_symbols=no
11314   archive_cmds=
11315   archive_expsym_cmds=
11316   compiler_needs_object=no
11317   enable_shared_with_static_runtimes=no
11318   export_dynamic_flag_spec=
11319   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11320   hardcode_automatic=no
11321   hardcode_direct=no
11322   hardcode_direct_absolute=no
11323   hardcode_libdir_flag_spec=
11324   hardcode_libdir_separator=
11325   hardcode_minus_L=no
11326   hardcode_shlibpath_var=unsupported
11327   inherit_rpath=no
11328   link_all_deplibs=unknown
11329   module_cmds=
11330   module_expsym_cmds=
11331   old_archive_from_new_cmds=
11332   old_archive_from_expsyms_cmds=
11333   thread_safe_flag_spec=
11334   whole_archive_flag_spec=
11335   # include_expsyms should be a list of space-separated symbols to be *always*
11336   # included in the symbol list
11337   include_expsyms=
11338   # exclude_expsyms can be an extended regexp of symbols to exclude
11339   # it will be wrapped by ' (' and ')$', so one must not match beginning or
11340   # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11341   # as well as any symbol that contains 'd'.
11342   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11343   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11344   # platforms (ab)use it in PIC code, but their linkers get confused if
11345   # the symbol is explicitly referenced.  Since portable code cannot
11346   # rely on this symbol name, it's probably fine to never include it in
11347   # preloaded symbol tables.
11348   # Exclude shared library initialization/finalization symbols.
11349   extract_expsyms_cmds=
11350
11351   case $host_os in
11352   cygwin* | mingw* | pw32* | cegcc*)
11353     # FIXME: the MSVC++ port hasn't been tested in a loooong time
11354     # When not using gcc, we currently assume that we are using
11355     # Microsoft Visual C++.
11356     if test yes != "$GCC"; then
11357       with_gnu_ld=no
11358     fi
11359     ;;
11360   interix*)
11361     # we just hope/assume this is gcc and not c89 (= MSVC++)
11362     with_gnu_ld=yes
11363     ;;
11364   openbsd* | bitrig*)
11365     with_gnu_ld=no
11366     ;;
11367   esac
11368
11369   ld_shlibs=yes
11370
11371   # On some targets, GNU ld is compatible enough with the native linker
11372   # that we're better off using the native interface for both.
11373   lt_use_gnu_ld_interface=no
11374   if test yes = "$with_gnu_ld"; then
11375     case $host_os in
11376       aix*)
11377         # The AIX port of GNU ld has always aspired to compatibility
11378         # with the native linker.  However, as the warning in the GNU ld
11379         # block says, versions before 2.19.5* couldn't really create working
11380         # shared libraries, regardless of the interface used.
11381         case `$LD -v 2>&1` in
11382           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11383           *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11384           *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11385           *)
11386             lt_use_gnu_ld_interface=yes
11387             ;;
11388         esac
11389         ;;
11390       *)
11391         lt_use_gnu_ld_interface=yes
11392         ;;
11393     esac
11394   fi
11395
11396   if test yes = "$lt_use_gnu_ld_interface"; then
11397     # If archive_cmds runs LD, not CC, wlarc should be empty
11398     wlarc='$wl'
11399
11400     # Set some defaults for GNU ld with shared library support. These
11401     # are reset later if shared libraries are not supported. Putting them
11402     # here allows them to be overridden if necessary.
11403     runpath_var=LD_RUN_PATH
11404     hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11405     export_dynamic_flag_spec='$wl--export-dynamic'
11406     # ancient GNU ld didn't support --whole-archive et. al.
11407     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11408       whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11409     else
11410       whole_archive_flag_spec=
11411     fi
11412     supports_anon_versioning=no
11413     case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11414       *GNU\ gold*) supports_anon_versioning=yes ;;
11415       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11416       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11417       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11418       *\ 2.11.*) ;; # other 2.11 versions
11419       *) supports_anon_versioning=yes ;;
11420     esac
11421
11422     # See if GNU ld supports shared libraries.
11423     case $host_os in
11424     aix[3-9]*)
11425       # On AIX/PPC, the GNU linker is very broken
11426       if test ia64 != "$host_cpu"; then
11427         ld_shlibs=no
11428         cat <<_LT_EOF 1>&2
11429
11430 *** Warning: the GNU linker, at least up to release 2.19, is reported
11431 *** to be unable to reliably create shared libraries on AIX.
11432 *** Therefore, libtool is disabling shared libraries support.  If you
11433 *** really care for shared libraries, you may want to install binutils
11434 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11435 *** You will then need to restart the configuration process.
11436
11437 _LT_EOF
11438       fi
11439       ;;
11440
11441     amigaos*)
11442       case $host_cpu in
11443       powerpc)
11444             # see comment about AmigaOS4 .so support
11445             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11446             archive_expsym_cmds=''
11447         ;;
11448       m68k)
11449             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)'
11450             hardcode_libdir_flag_spec='-L$libdir'
11451             hardcode_minus_L=yes
11452         ;;
11453       esac
11454       ;;
11455
11456     beos*)
11457       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11458         allow_undefined_flag=unsupported
11459         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11460         # support --undefined.  This deserves some investigation.  FIXME
11461         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11462       else
11463         ld_shlibs=no
11464       fi
11465       ;;
11466
11467     cygwin* | mingw* | pw32* | cegcc*)
11468       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11469       # as there is no search path for DLLs.
11470       hardcode_libdir_flag_spec='-L$libdir'
11471       export_dynamic_flag_spec='$wl--export-all-symbols'
11472       allow_undefined_flag=unsupported
11473       always_export_symbols=no
11474       enable_shared_with_static_runtimes=yes
11475       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'
11476       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11477
11478       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11479         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11480         # If the export-symbols file already is a .def file, use it as
11481         # is; otherwise, prepend EXPORTS...
11482         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11483           cp $export_symbols $output_objdir/$soname.def;
11484         else
11485           echo EXPORTS > $output_objdir/$soname.def;
11486           cat $export_symbols >> $output_objdir/$soname.def;
11487         fi~
11488         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11489       else
11490         ld_shlibs=no
11491       fi
11492       ;;
11493
11494     haiku*)
11495       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11496       link_all_deplibs=yes
11497       ;;
11498
11499     os2*)
11500       hardcode_libdir_flag_spec='-L$libdir'
11501       hardcode_minus_L=yes
11502       allow_undefined_flag=unsupported
11503       shrext_cmds=.dll
11504       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11505         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11506         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11507         $ECHO EXPORTS >> $output_objdir/$libname.def~
11508         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11509         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11510         emximp -o $lib $output_objdir/$libname.def'
11511       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11512         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11513         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11514         $ECHO EXPORTS >> $output_objdir/$libname.def~
11515         prefix_cmds="$SED"~
11516         if test EXPORTS = "`$SED 1q $export_symbols`"; then
11517           prefix_cmds="$prefix_cmds -e 1d";
11518         fi~
11519         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11520         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11521         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11522         emximp -o $lib $output_objdir/$libname.def'
11523       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11524       enable_shared_with_static_runtimes=yes
11525       ;;
11526
11527     interix[3-9]*)
11528       hardcode_direct=no
11529       hardcode_shlibpath_var=no
11530       hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11531       export_dynamic_flag_spec='$wl-E'
11532       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11533       # Instead, shared libraries are loaded at an image base (0x10000000 by
11534       # default) and relocated if they conflict, which is a slow very memory
11535       # consuming and fragmenting process.  To avoid this, we pick a random,
11536       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11537       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11538       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11539       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'
11540       ;;
11541
11542     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11543       tmp_diet=no
11544       if test linux-dietlibc = "$host_os"; then
11545         case $cc_basename in
11546           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
11547         esac
11548       fi
11549       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11550          && test no = "$tmp_diet"
11551       then
11552         tmp_addflag=' $pic_flag'
11553         tmp_sharedflag='-shared'
11554         case $cc_basename,$host_cpu in
11555         pgcc*)                          # Portland Group C compiler
11556           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'
11557           tmp_addflag=' $pic_flag'
11558           ;;
11559         pgf77* | pgf90* | pgf95* | pgfortran*)
11560                                         # Portland Group f77 and f90 compilers
11561           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'
11562           tmp_addflag=' $pic_flag -Mnomain' ;;
11563         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
11564           tmp_addflag=' -i_dynamic' ;;
11565         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
11566           tmp_addflag=' -i_dynamic -nofor_main' ;;
11567         ifc* | ifort*)                  # Intel Fortran compiler
11568           tmp_addflag=' -nofor_main' ;;
11569         lf95*)                          # Lahey Fortran 8.1
11570           whole_archive_flag_spec=
11571           tmp_sharedflag='--shared' ;;
11572         nagfor*)                        # NAGFOR 5.3
11573           tmp_sharedflag='-Wl,-shared' ;;
11574         xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11575           tmp_sharedflag='-qmkshrobj'
11576           tmp_addflag= ;;
11577         nvcc*)  # Cuda Compiler Driver 2.2
11578           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'
11579           compiler_needs_object=yes
11580           ;;
11581         esac
11582         case `$CC -V 2>&1 | sed 5q` in
11583         *Sun\ C*)                       # Sun C 5.9
11584           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'
11585           compiler_needs_object=yes
11586           tmp_sharedflag='-G' ;;
11587         *Sun\ F*)                       # Sun Fortran 8.3
11588           tmp_sharedflag='-G' ;;
11589         esac
11590         archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11591
11592         if test yes = "$supports_anon_versioning"; then
11593           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11594             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11595             echo "local: *; };" >> $output_objdir/$libname.ver~
11596             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11597         fi
11598
11599         case $cc_basename in
11600         tcc*)
11601           export_dynamic_flag_spec='-rdynamic'
11602           ;;
11603         xlf* | bgf* | bgxlf* | mpixlf*)
11604           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11605           whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11606           hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11607           archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11608           if test yes = "$supports_anon_versioning"; then
11609             archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11610               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11611               echo "local: *; };" >> $output_objdir/$libname.ver~
11612               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11613           fi
11614           ;;
11615         esac
11616       else
11617         ld_shlibs=no
11618       fi
11619       ;;
11620
11621     netbsd*)
11622       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11623         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11624         wlarc=
11625       else
11626         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11627         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11628       fi
11629       ;;
11630
11631     solaris*)
11632       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11633         ld_shlibs=no
11634         cat <<_LT_EOF 1>&2
11635
11636 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
11637 *** create shared libraries on Solaris systems.  Therefore, libtool
11638 *** is disabling shared libraries support.  We urge you to upgrade GNU
11639 *** binutils to release 2.9.1 or newer.  Another option is to modify
11640 *** your PATH or compiler configuration so that the native linker is
11641 *** used, and then restart.
11642
11643 _LT_EOF
11644       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11645         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11646         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11647       else
11648         ld_shlibs=no
11649       fi
11650       ;;
11651
11652     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11653       case `$LD -v 2>&1` in
11654         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11655         ld_shlibs=no
11656         cat <<_LT_EOF 1>&2
11657
11658 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11659 *** reliably create shared libraries on SCO systems.  Therefore, libtool
11660 *** is disabling shared libraries support.  We urge you to upgrade GNU
11661 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11662 *** your PATH or compiler configuration so that the native linker is
11663 *** used, and then restart.
11664
11665 _LT_EOF
11666         ;;
11667         *)
11668           # For security reasons, it is highly recommended that you always
11669           # use absolute paths for naming shared libraries, and exclude the
11670           # DT_RUNPATH tag from executables and libraries.  But doing so
11671           # requires that you compile everything twice, which is a pain.
11672           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11673             hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11674             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11675             archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11676           else
11677             ld_shlibs=no
11678           fi
11679         ;;
11680       esac
11681       ;;
11682
11683     sunos4*)
11684       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11685       wlarc=
11686       hardcode_direct=yes
11687       hardcode_shlibpath_var=no
11688       ;;
11689
11690     *)
11691       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11692         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11693         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11694       else
11695         ld_shlibs=no
11696       fi
11697       ;;
11698     esac
11699
11700     if test no = "$ld_shlibs"; then
11701       runpath_var=
11702       hardcode_libdir_flag_spec=
11703       export_dynamic_flag_spec=
11704       whole_archive_flag_spec=
11705     fi
11706   else
11707     # PORTME fill in a description of your system's linker (not GNU ld)
11708     case $host_os in
11709     aix3*)
11710       allow_undefined_flag=unsupported
11711       always_export_symbols=yes
11712       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'
11713       # Note: this linker hardcodes the directories in LIBPATH if there
11714       # are no directories specified by -L.
11715       hardcode_minus_L=yes
11716       if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11717         # Neither direct hardcoding nor static linking is supported with a
11718         # broken collect2.
11719         hardcode_direct=unsupported
11720       fi
11721       ;;
11722
11723     aix[4-9]*)
11724       if test ia64 = "$host_cpu"; then
11725         # On IA64, the linker does run time linking by default, so we don't
11726         # have to do anything special.
11727         aix_use_runtimelinking=no
11728         exp_sym_flag='-Bexport'
11729         no_entry_flag=
11730       else
11731         # If we're using GNU nm, then we don't want the "-C" option.
11732         # -C means demangle to GNU nm, but means don't demangle to AIX nm.
11733         # Without the "-l" option, or with the "-B" option, AIX nm treats
11734         # weak defined symbols like other global defined symbols, whereas
11735         # GNU nm marks them as "W".
11736         # While the 'weak' keyword is ignored in the Export File, we need
11737         # it in the Import File for the 'aix-soname' feature, so we have
11738         # to replace the "-B" option with "-P" for AIX nm.
11739         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11740           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'
11741         else
11742           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'
11743         fi
11744         aix_use_runtimelinking=no
11745
11746         # Test if we are trying to use run time linking or normal
11747         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
11748         # have runtime linking enabled, and use it for executables.
11749         # For shared libraries, we enable/disable runtime linking
11750         # depending on the kind of the shared library created -
11751         # when "with_aix_soname,aix_use_runtimelinking" is:
11752         # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
11753         # "aix,yes"  lib.so          shared, rtl:yes, for executables
11754         #            lib.a           static archive
11755         # "both,no"  lib.so.V(shr.o) shared, rtl:yes
11756         #            lib.a(lib.so.V) shared, rtl:no,  for executables
11757         # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11758         #            lib.a(lib.so.V) shared, rtl:no
11759         # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
11760         #            lib.a           static archive
11761         case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11762           for ld_flag in $LDFLAGS; do
11763           if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11764             aix_use_runtimelinking=yes
11765             break
11766           fi
11767           done
11768           if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11769             # With aix-soname=svr4, we create the lib.so.V shared archives only,
11770             # so we don't have lib.a shared libs to link our executables.
11771             # We have to force runtime linking in this case.
11772             aix_use_runtimelinking=yes
11773             LDFLAGS="$LDFLAGS -Wl,-brtl"
11774           fi
11775           ;;
11776         esac
11777
11778         exp_sym_flag='-bexport'
11779         no_entry_flag='-bnoentry'
11780       fi
11781
11782       # When large executables or shared objects are built, AIX ld can
11783       # have problems creating the table of contents.  If linking a library
11784       # or program results in "error TOC overflow" add -mminimal-toc to
11785       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11786       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11787
11788       archive_cmds=''
11789       hardcode_direct=yes
11790       hardcode_direct_absolute=yes
11791       hardcode_libdir_separator=':'
11792       link_all_deplibs=yes
11793       file_list_spec='$wl-f,'
11794       case $with_aix_soname,$aix_use_runtimelinking in
11795       aix,*) ;; # traditional, no import file
11796       svr4,* | *,yes) # use import file
11797         # The Import File defines what to hardcode.
11798         hardcode_direct=no
11799         hardcode_direct_absolute=no
11800         ;;
11801       esac
11802
11803       if test yes = "$GCC"; then
11804         case $host_os in aix4.[012]|aix4.[012].*)
11805         # We only want to do this on AIX 4.2 and lower, the check
11806         # below for broken collect2 doesn't work under 4.3+
11807           collect2name=`$CC -print-prog-name=collect2`
11808           if test -f "$collect2name" &&
11809            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
11810           then
11811           # We have reworked collect2
11812           :
11813           else
11814           # We have old collect2
11815           hardcode_direct=unsupported
11816           # It fails to find uninstalled libraries when the uninstalled
11817           # path is not listed in the libpath.  Setting hardcode_minus_L
11818           # to unsupported forces relinking
11819           hardcode_minus_L=yes
11820           hardcode_libdir_flag_spec='-L$libdir'
11821           hardcode_libdir_separator=
11822           fi
11823           ;;
11824         esac
11825         shared_flag='-shared'
11826         if test yes = "$aix_use_runtimelinking"; then
11827           shared_flag="$shared_flag "'$wl-G'
11828         fi
11829         # Need to ensure runtime linking is disabled for the traditional
11830         # shared library, or the linker may eventually find shared libraries
11831         # /with/ Import File - we do not want to mix them.
11832         shared_flag_aix='-shared'
11833         shared_flag_svr4='-shared $wl-G'
11834       else
11835         # not using gcc
11836         if test ia64 = "$host_cpu"; then
11837         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11838         # chokes on -Wl,-G. The following line is correct:
11839           shared_flag='-G'
11840         else
11841           if test yes = "$aix_use_runtimelinking"; then
11842             shared_flag='$wl-G'
11843           else
11844             shared_flag='$wl-bM:SRE'
11845           fi
11846           shared_flag_aix='$wl-bM:SRE'
11847           shared_flag_svr4='$wl-G'
11848         fi
11849       fi
11850
11851       export_dynamic_flag_spec='$wl-bexpall'
11852       # It seems that -bexpall does not export symbols beginning with
11853       # underscore (_), so it is better to generate a list of symbols to export.
11854       always_export_symbols=yes
11855       if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
11856         # Warning - without using the other runtime loading flags (-brtl),
11857         # -berok will link without error, but may produce a broken library.
11858         allow_undefined_flag='-berok'
11859         # Determine the default libpath from the value encoded in an
11860         # empty executable.
11861         if test set = "${lt_cv_aix_libpath+set}"; then
11862   aix_libpath=$lt_cv_aix_libpath
11863 else
11864   if ${lt_cv_aix_libpath_+:} false; then :
11865   $as_echo_n "(cached) " >&6
11866 else
11867   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11868 /* end confdefs.h.  */
11869
11870 int
11871 main ()
11872 {
11873
11874   ;
11875   return 0;
11876 }
11877 _ACEOF
11878 if ac_fn_c_try_link "$LINENO"; then :
11879
11880   lt_aix_libpath_sed='
11881       /Import File Strings/,/^$/ {
11882           /^0/ {
11883               s/^0  *\([^ ]*\) *$/\1/
11884               p
11885           }
11886       }'
11887   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11888   # Check for a 64-bit object if we didn't find anything.
11889   if test -z "$lt_cv_aix_libpath_"; then
11890     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11891   fi
11892 fi
11893 rm -f core conftest.err conftest.$ac_objext \
11894     conftest$ac_exeext conftest.$ac_ext
11895   if test -z "$lt_cv_aix_libpath_"; then
11896     lt_cv_aix_libpath_=/usr/lib:/lib
11897   fi
11898
11899 fi
11900
11901   aix_libpath=$lt_cv_aix_libpath_
11902 fi
11903
11904         hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
11905         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
11906       else
11907         if test ia64 = "$host_cpu"; then
11908           hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
11909           allow_undefined_flag="-z nodefs"
11910           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"
11911         else
11912          # Determine the default libpath from the value encoded in an
11913          # empty executable.
11914          if test set = "${lt_cv_aix_libpath+set}"; then
11915   aix_libpath=$lt_cv_aix_libpath
11916 else
11917   if ${lt_cv_aix_libpath_+:} false; then :
11918   $as_echo_n "(cached) " >&6
11919 else
11920   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11921 /* end confdefs.h.  */
11922
11923 int
11924 main ()
11925 {
11926
11927   ;
11928   return 0;
11929 }
11930 _ACEOF
11931 if ac_fn_c_try_link "$LINENO"; then :
11932
11933   lt_aix_libpath_sed='
11934       /Import File Strings/,/^$/ {
11935           /^0/ {
11936               s/^0  *\([^ ]*\) *$/\1/
11937               p
11938           }
11939       }'
11940   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11941   # Check for a 64-bit object if we didn't find anything.
11942   if test -z "$lt_cv_aix_libpath_"; then
11943     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11944   fi
11945 fi
11946 rm -f core conftest.err conftest.$ac_objext \
11947     conftest$ac_exeext conftest.$ac_ext
11948   if test -z "$lt_cv_aix_libpath_"; then
11949     lt_cv_aix_libpath_=/usr/lib:/lib
11950   fi
11951
11952 fi
11953
11954   aix_libpath=$lt_cv_aix_libpath_
11955 fi
11956
11957          hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
11958           # Warning - without using the other run time loading flags,
11959           # -berok will link without error, but may produce a broken library.
11960           no_undefined_flag=' $wl-bernotok'
11961           allow_undefined_flag=' $wl-berok'
11962           if test yes = "$with_gnu_ld"; then
11963             # We only use this code for GNU lds that support --whole-archive.
11964             whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
11965           else
11966             # Exported symbols can be pulled into shared objects from archives
11967             whole_archive_flag_spec='$convenience'
11968           fi
11969           archive_cmds_need_lc=yes
11970           archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
11971           # -brtl affects multiple linker settings, -berok does not and is overridden later
11972           compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
11973           if test svr4 != "$with_aix_soname"; then
11974             # This is similar to how AIX traditionally builds its shared libraries.
11975             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'
11976           fi
11977           if test aix != "$with_aix_soname"; then
11978             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'
11979           else
11980             # used by -dlpreopen to get the symbols
11981             archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
11982           fi
11983           archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
11984         fi
11985       fi
11986       ;;
11987
11988     amigaos*)
11989       case $host_cpu in
11990       powerpc)
11991             # see comment about AmigaOS4 .so support
11992             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11993             archive_expsym_cmds=''
11994         ;;
11995       m68k)
11996             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)'
11997             hardcode_libdir_flag_spec='-L$libdir'
11998             hardcode_minus_L=yes
11999         ;;
12000       esac
12001       ;;
12002
12003     bsdi[45]*)
12004       export_dynamic_flag_spec=-rdynamic
12005       ;;
12006
12007     cygwin* | mingw* | pw32* | cegcc*)
12008       # When not using gcc, we currently assume that we are using
12009       # Microsoft Visual C++.
12010       # hardcode_libdir_flag_spec is actually meaningless, as there is
12011       # no search path for DLLs.
12012       case $cc_basename in
12013       cl*)
12014         # Native MSVC
12015         hardcode_libdir_flag_spec=' '
12016         allow_undefined_flag=unsupported
12017         always_export_symbols=yes
12018         file_list_spec='@'
12019         # Tell ltmain to make .lib files, not .a files.
12020         libext=lib
12021         # Tell ltmain to make .dll files, not .so files.
12022         shrext_cmds=.dll
12023         # FIXME: Setting linknames here is a bad hack.
12024         archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
12025         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12026             cp "$export_symbols" "$output_objdir/$soname.def";
12027             echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
12028           else
12029             $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
12030           fi~
12031           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12032           linknames='
12033         # The linker will not automatically build a static lib if we build a DLL.
12034         # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12035         enable_shared_with_static_runtimes=yes
12036         exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
12037         export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12038         # Don't use ranlib
12039         old_postinstall_cmds='chmod 644 $oldlib'
12040         postlink_cmds='lt_outputfile="@OUTPUT@"~
12041           lt_tool_outputfile="@TOOL_OUTPUT@"~
12042           case $lt_outputfile in
12043             *.exe|*.EXE) ;;
12044             *)
12045               lt_outputfile=$lt_outputfile.exe
12046               lt_tool_outputfile=$lt_tool_outputfile.exe
12047               ;;
12048           esac~
12049           if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
12050             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12051             $RM "$lt_outputfile.manifest";
12052           fi'
12053         ;;
12054       *)
12055         # Assume MSVC wrapper
12056         hardcode_libdir_flag_spec=' '
12057         allow_undefined_flag=unsupported
12058         # Tell ltmain to make .lib files, not .a files.
12059         libext=lib
12060         # Tell ltmain to make .dll files, not .so files.
12061         shrext_cmds=.dll
12062         # FIXME: Setting linknames here is a bad hack.
12063         archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12064         # The linker will automatically build a .lib file if we build a DLL.
12065         old_archive_from_new_cmds='true'
12066         # FIXME: Should let the user specify the lib program.
12067         old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12068         enable_shared_with_static_runtimes=yes
12069         ;;
12070       esac
12071       ;;
12072
12073     darwin* | rhapsody*)
12074
12075
12076   archive_cmds_need_lc=no
12077   hardcode_direct=no
12078   hardcode_automatic=yes
12079   hardcode_shlibpath_var=unsupported
12080   if test yes = "$lt_cv_ld_force_load"; then
12081     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\"`'
12082
12083   else
12084     whole_archive_flag_spec=''
12085   fi
12086   link_all_deplibs=yes
12087   allow_undefined_flag=$_lt_dar_allow_undefined
12088   case $cc_basename in
12089      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
12090      *) _lt_dar_can_shared=$GCC ;;
12091   esac
12092   if test yes = "$_lt_dar_can_shared"; then
12093     output_verbose_link_cmd=func_echo_all
12094     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
12095     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
12096     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"
12097     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"
12098
12099   else
12100   ld_shlibs=no
12101   fi
12102
12103       ;;
12104
12105     dgux*)
12106       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12107       hardcode_libdir_flag_spec='-L$libdir'
12108       hardcode_shlibpath_var=no
12109       ;;
12110
12111     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12112     # support.  Future versions do this automatically, but an explicit c++rt0.o
12113     # does not break anything, and helps significantly (at the cost of a little
12114     # extra space).
12115     freebsd2.2*)
12116       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12117       hardcode_libdir_flag_spec='-R$libdir'
12118       hardcode_direct=yes
12119       hardcode_shlibpath_var=no
12120       ;;
12121
12122     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12123     freebsd2.*)
12124       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12125       hardcode_direct=yes
12126       hardcode_minus_L=yes
12127       hardcode_shlibpath_var=no
12128       ;;
12129
12130     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12131     freebsd* | dragonfly*)
12132       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12133       hardcode_libdir_flag_spec='-R$libdir'
12134       hardcode_direct=yes
12135       hardcode_shlibpath_var=no
12136       ;;
12137
12138     hpux9*)
12139       if test yes = "$GCC"; then
12140         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'
12141       else
12142         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'
12143       fi
12144       hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12145       hardcode_libdir_separator=:
12146       hardcode_direct=yes
12147
12148       # hardcode_minus_L: Not really in the search PATH,
12149       # but as the default location of the library.
12150       hardcode_minus_L=yes
12151       export_dynamic_flag_spec='$wl-E'
12152       ;;
12153
12154     hpux10*)
12155       if test yes,no = "$GCC,$with_gnu_ld"; then
12156         archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12157       else
12158         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12159       fi
12160       if test no = "$with_gnu_ld"; then
12161         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12162         hardcode_libdir_separator=:
12163         hardcode_direct=yes
12164         hardcode_direct_absolute=yes
12165         export_dynamic_flag_spec='$wl-E'
12166         # hardcode_minus_L: Not really in the search PATH,
12167         # but as the default location of the library.
12168         hardcode_minus_L=yes
12169       fi
12170       ;;
12171
12172     hpux11*)
12173       if test yes,no = "$GCC,$with_gnu_ld"; then
12174         case $host_cpu in
12175         hppa*64*)
12176           archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12177           ;;
12178         ia64*)
12179           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12180           ;;
12181         *)
12182           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12183           ;;
12184         esac
12185       else
12186         case $host_cpu in
12187         hppa*64*)
12188           archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12189           ;;
12190         ia64*)
12191           archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12192           ;;
12193         *)
12194
12195           # Older versions of the 11.00 compiler do not understand -b yet
12196           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12197           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12198 $as_echo_n "checking if $CC understands -b... " >&6; }
12199 if ${lt_cv_prog_compiler__b+:} false; then :
12200   $as_echo_n "(cached) " >&6
12201 else
12202   lt_cv_prog_compiler__b=no
12203    save_LDFLAGS=$LDFLAGS
12204    LDFLAGS="$LDFLAGS -b"
12205    echo "$lt_simple_link_test_code" > conftest.$ac_ext
12206    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12207      # The linker can only warn and ignore the option if not recognized
12208      # So say no if there are warnings
12209      if test -s conftest.err; then
12210        # Append any errors to the config.log.
12211        cat conftest.err 1>&5
12212        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12213        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12214        if diff conftest.exp conftest.er2 >/dev/null; then
12215          lt_cv_prog_compiler__b=yes
12216        fi
12217      else
12218        lt_cv_prog_compiler__b=yes
12219      fi
12220    fi
12221    $RM -r conftest*
12222    LDFLAGS=$save_LDFLAGS
12223
12224 fi
12225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12226 $as_echo "$lt_cv_prog_compiler__b" >&6; }
12227
12228 if test yes = "$lt_cv_prog_compiler__b"; then
12229     archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12230 else
12231     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12232 fi
12233
12234           ;;
12235         esac
12236       fi
12237       if test no = "$with_gnu_ld"; then
12238         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12239         hardcode_libdir_separator=:
12240
12241         case $host_cpu in
12242         hppa*64*|ia64*)
12243           hardcode_direct=no
12244           hardcode_shlibpath_var=no
12245           ;;
12246         *)
12247           hardcode_direct=yes
12248           hardcode_direct_absolute=yes
12249           export_dynamic_flag_spec='$wl-E'
12250
12251           # hardcode_minus_L: Not really in the search PATH,
12252           # but as the default location of the library.
12253           hardcode_minus_L=yes
12254           ;;
12255         esac
12256       fi
12257       ;;
12258
12259     irix5* | irix6* | nonstopux*)
12260       if test yes = "$GCC"; then
12261         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'
12262         # Try to use the -exported_symbol ld option, if it does not
12263         # work, assume that -exports_file does not work either and
12264         # implicitly export all symbols.
12265         # This should be the same for all languages, so no per-tag cache variable.
12266         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12267 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12268 if ${lt_cv_irix_exported_symbol+:} false; then :
12269   $as_echo_n "(cached) " >&6
12270 else
12271   save_LDFLAGS=$LDFLAGS
12272            LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12273            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12274 /* end confdefs.h.  */
12275 int foo (void) { return 0; }
12276 _ACEOF
12277 if ac_fn_c_try_link "$LINENO"; then :
12278   lt_cv_irix_exported_symbol=yes
12279 else
12280   lt_cv_irix_exported_symbol=no
12281 fi
12282 rm -f core conftest.err conftest.$ac_objext \
12283     conftest$ac_exeext conftest.$ac_ext
12284            LDFLAGS=$save_LDFLAGS
12285 fi
12286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12287 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
12288         if test yes = "$lt_cv_irix_exported_symbol"; then
12289           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'
12290         fi
12291       else
12292         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'
12293         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'
12294       fi
12295       archive_cmds_need_lc='no'
12296       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12297       hardcode_libdir_separator=:
12298       inherit_rpath=yes
12299       link_all_deplibs=yes
12300       ;;
12301
12302     linux*)
12303       case $cc_basename in
12304       tcc*)
12305         # Fabrice Bellard et al's Tiny C Compiler
12306         ld_shlibs=yes
12307         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12308         ;;
12309       esac
12310       ;;
12311
12312     netbsd*)
12313       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12314         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12315       else
12316         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12317       fi
12318       hardcode_libdir_flag_spec='-R$libdir'
12319       hardcode_direct=yes
12320       hardcode_shlibpath_var=no
12321       ;;
12322
12323     newsos6)
12324       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12325       hardcode_direct=yes
12326       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12327       hardcode_libdir_separator=:
12328       hardcode_shlibpath_var=no
12329       ;;
12330
12331     *nto* | *qnx*)
12332       ;;
12333
12334     openbsd* | bitrig*)
12335       if test -f /usr/libexec/ld.so; then
12336         hardcode_direct=yes
12337         hardcode_shlibpath_var=no
12338         hardcode_direct_absolute=yes
12339         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12340           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12341           archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12342           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12343           export_dynamic_flag_spec='$wl-E'
12344         else
12345           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12346           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12347         fi
12348       else
12349         ld_shlibs=no
12350       fi
12351       ;;
12352
12353     os2*)
12354       hardcode_libdir_flag_spec='-L$libdir'
12355       hardcode_minus_L=yes
12356       allow_undefined_flag=unsupported
12357       shrext_cmds=.dll
12358       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12359         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12360         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12361         $ECHO EXPORTS >> $output_objdir/$libname.def~
12362         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12363         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12364         emximp -o $lib $output_objdir/$libname.def'
12365       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12366         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12367         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12368         $ECHO EXPORTS >> $output_objdir/$libname.def~
12369         prefix_cmds="$SED"~
12370         if test EXPORTS = "`$SED 1q $export_symbols`"; then
12371           prefix_cmds="$prefix_cmds -e 1d";
12372         fi~
12373         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12374         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12375         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12376         emximp -o $lib $output_objdir/$libname.def'
12377       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12378       enable_shared_with_static_runtimes=yes
12379       ;;
12380
12381     osf3*)
12382       if test yes = "$GCC"; then
12383         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12384         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'
12385       else
12386         allow_undefined_flag=' -expect_unresolved \*'
12387         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'
12388       fi
12389       archive_cmds_need_lc='no'
12390       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12391       hardcode_libdir_separator=:
12392       ;;
12393
12394     osf4* | osf5*)      # as osf3* with the addition of -msym flag
12395       if test yes = "$GCC"; then
12396         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12397         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'
12398         hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12399       else
12400         allow_undefined_flag=' -expect_unresolved \*'
12401         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'
12402         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~
12403           $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'
12404
12405         # Both c and cxx compiler support -rpath directly
12406         hardcode_libdir_flag_spec='-rpath $libdir'
12407       fi
12408       archive_cmds_need_lc='no'
12409       hardcode_libdir_separator=:
12410       ;;
12411
12412     solaris*)
12413       no_undefined_flag=' -z defs'
12414       if test yes = "$GCC"; then
12415         wlarc='$wl'
12416         archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12417         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12418           $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'
12419       else
12420         case `$CC -V 2>&1` in
12421         *"Compilers 5.0"*)
12422           wlarc=''
12423           archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12424           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12425             $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12426           ;;
12427         *)
12428           wlarc='$wl'
12429           archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12430           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12431             $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12432           ;;
12433         esac
12434       fi
12435       hardcode_libdir_flag_spec='-R$libdir'
12436       hardcode_shlibpath_var=no
12437       case $host_os in
12438       solaris2.[0-5] | solaris2.[0-5].*) ;;
12439       *)
12440         # The compiler driver will combine and reorder linker options,
12441         # but understands '-z linker_flag'.  GCC discards it without '$wl',
12442         # but is careful enough not to reorder.
12443         # Supported since Solaris 2.6 (maybe 2.5.1?)
12444         if test yes = "$GCC"; then
12445           whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12446         else
12447           whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12448         fi
12449         ;;
12450       esac
12451       link_all_deplibs=yes
12452       ;;
12453
12454     sunos4*)
12455       if test sequent = "$host_vendor"; then
12456         # Use $CC to link under sequent, because it throws in some extra .o
12457         # files that make .init and .fini sections work.
12458         archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12459       else
12460         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12461       fi
12462       hardcode_libdir_flag_spec='-L$libdir'
12463       hardcode_direct=yes
12464       hardcode_minus_L=yes
12465       hardcode_shlibpath_var=no
12466       ;;
12467
12468     sysv4)
12469       case $host_vendor in
12470         sni)
12471           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12472           hardcode_direct=yes # is this really true???
12473         ;;
12474         siemens)
12475           ## LD is ld it makes a PLAMLIB
12476           ## CC just makes a GrossModule.
12477           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12478           reload_cmds='$CC -r -o $output$reload_objs'
12479           hardcode_direct=no
12480         ;;
12481         motorola)
12482           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12483           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12484         ;;
12485       esac
12486       runpath_var='LD_RUN_PATH'
12487       hardcode_shlibpath_var=no
12488       ;;
12489
12490     sysv4.3*)
12491       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12492       hardcode_shlibpath_var=no
12493       export_dynamic_flag_spec='-Bexport'
12494       ;;
12495
12496     sysv4*MP*)
12497       if test -d /usr/nec; then
12498         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12499         hardcode_shlibpath_var=no
12500         runpath_var=LD_RUN_PATH
12501         hardcode_runpath_var=yes
12502         ld_shlibs=yes
12503       fi
12504       ;;
12505
12506     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12507       no_undefined_flag='$wl-z,text'
12508       archive_cmds_need_lc=no
12509       hardcode_shlibpath_var=no
12510       runpath_var='LD_RUN_PATH'
12511
12512       if test yes = "$GCC"; then
12513         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12514         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12515       else
12516         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12517         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12518       fi
12519       ;;
12520
12521     sysv5* | sco3.2v5* | sco5v6*)
12522       # Note: We CANNOT use -z defs as we might desire, because we do not
12523       # link with -lc, and that would cause any symbols used from libc to
12524       # always be unresolved, which means just about no library would
12525       # ever link correctly.  If we're not using GNU ld we use -z text
12526       # though, which does catch some bad symbols but isn't as heavy-handed
12527       # as -z defs.
12528       no_undefined_flag='$wl-z,text'
12529       allow_undefined_flag='$wl-z,nodefs'
12530       archive_cmds_need_lc=no
12531       hardcode_shlibpath_var=no
12532       hardcode_libdir_flag_spec='$wl-R,$libdir'
12533       hardcode_libdir_separator=':'
12534       link_all_deplibs=yes
12535       export_dynamic_flag_spec='$wl-Bexport'
12536       runpath_var='LD_RUN_PATH'
12537
12538       if test yes = "$GCC"; then
12539         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12540         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12541       else
12542         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12543         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12544       fi
12545       ;;
12546
12547     uts4*)
12548       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12549       hardcode_libdir_flag_spec='-L$libdir'
12550       hardcode_shlibpath_var=no
12551       ;;
12552
12553     *)
12554       ld_shlibs=no
12555       ;;
12556     esac
12557
12558     if test sni = "$host_vendor"; then
12559       case $host in
12560       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12561         export_dynamic_flag_spec='$wl-Blargedynsym'
12562         ;;
12563       esac
12564     fi
12565   fi
12566
12567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12568 $as_echo "$ld_shlibs" >&6; }
12569 test no = "$ld_shlibs" && can_build_shared=no
12570
12571 with_gnu_ld=$with_gnu_ld
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587 #
12588 # Do we need to explicitly link libc?
12589 #
12590 case "x$archive_cmds_need_lc" in
12591 x|xyes)
12592   # Assume -lc should be added
12593   archive_cmds_need_lc=yes
12594
12595   if test yes,yes = "$GCC,$enable_shared"; then
12596     case $archive_cmds in
12597     *'~'*)
12598       # FIXME: we may have to deal with multi-command sequences.
12599       ;;
12600     '$CC '*)
12601       # Test whether the compiler implicitly links with -lc since on some
12602       # systems, -lgcc has to come before -lc. If gcc already passes -lc
12603       # to ld, don't add -lc before -lgcc.
12604       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12605 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12606 if ${lt_cv_archive_cmds_need_lc+:} false; then :
12607   $as_echo_n "(cached) " >&6
12608 else
12609   $RM conftest*
12610         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12611
12612         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12613   (eval $ac_compile) 2>&5
12614   ac_status=$?
12615   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12616   test $ac_status = 0; } 2>conftest.err; then
12617           soname=conftest
12618           lib=conftest
12619           libobjs=conftest.$ac_objext
12620           deplibs=
12621           wl=$lt_prog_compiler_wl
12622           pic_flag=$lt_prog_compiler_pic
12623           compiler_flags=-v
12624           linker_flags=-v
12625           verstring=
12626           output_objdir=.
12627           libname=conftest
12628           lt_save_allow_undefined_flag=$allow_undefined_flag
12629           allow_undefined_flag=
12630           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12631   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12632   ac_status=$?
12633   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12634   test $ac_status = 0; }
12635           then
12636             lt_cv_archive_cmds_need_lc=no
12637           else
12638             lt_cv_archive_cmds_need_lc=yes
12639           fi
12640           allow_undefined_flag=$lt_save_allow_undefined_flag
12641         else
12642           cat conftest.err 1>&5
12643         fi
12644         $RM conftest*
12645
12646 fi
12647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12648 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12649       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12650       ;;
12651     esac
12652   fi
12653   ;;
12654 esac
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12808 $as_echo_n "checking dynamic linker characteristics... " >&6; }
12809
12810 if test yes = "$GCC"; then
12811   case $host_os in
12812     darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
12813     *) lt_awk_arg='/^libraries:/' ;;
12814   esac
12815   case $host_os in
12816     mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
12817     *) lt_sed_strip_eq='s|=/|/|g' ;;
12818   esac
12819   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
12820   case $lt_search_path_spec in
12821   *\;*)
12822     # if the path contains ";" then we assume it to be the separator
12823     # otherwise default to the standard path separator (i.e. ":") - it is
12824     # assumed that no part of a normal pathname contains ";" but that should
12825     # okay in the real world where ";" in dirpaths is itself problematic.
12826     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
12827     ;;
12828   *)
12829     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
12830     ;;
12831   esac
12832   # Ok, now we have the path, separated by spaces, we can step through it
12833   # and add multilib dir if necessary...
12834   lt_tmp_lt_search_path_spec=
12835   lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
12836   # ...but if some path component already ends with the multilib dir we assume
12837   # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
12838   case "$lt_multi_os_dir; $lt_search_path_spec " in
12839   "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
12840     lt_multi_os_dir=
12841     ;;
12842   esac
12843   for lt_sys_path in $lt_search_path_spec; do
12844     if test -d "$lt_sys_path$lt_multi_os_dir"; then
12845       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
12846     elif test -n "$lt_multi_os_dir"; then
12847       test -d "$lt_sys_path" && \
12848         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
12849     fi
12850   done
12851   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
12852 BEGIN {RS = " "; FS = "/|\n";} {
12853   lt_foo = "";
12854   lt_count = 0;
12855   for (lt_i = NF; lt_i > 0; lt_i--) {
12856     if ($lt_i != "" && $lt_i != ".") {
12857       if ($lt_i == "..") {
12858         lt_count++;
12859       } else {
12860         if (lt_count == 0) {
12861           lt_foo = "/" $lt_i lt_foo;
12862         } else {
12863           lt_count--;
12864         }
12865       }
12866     }
12867   }
12868   if (lt_foo != "") { lt_freq[lt_foo]++; }
12869   if (lt_freq[lt_foo] == 1) { print lt_foo; }
12870 }'`
12871   # AWK program above erroneously prepends '/' to C:/dos/paths
12872   # for these hosts.
12873   case $host_os in
12874     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
12875       $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
12876   esac
12877   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
12878 else
12879   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12880 fi
12881 library_names_spec=
12882 libname_spec='lib$name'
12883 soname_spec=
12884 shrext_cmds=.so
12885 postinstall_cmds=
12886 postuninstall_cmds=
12887 finish_cmds=
12888 finish_eval=
12889 shlibpath_var=
12890 shlibpath_overrides_runpath=unknown
12891 version_type=none
12892 dynamic_linker="$host_os ld.so"
12893 sys_lib_dlsearch_path_spec="/lib /usr/lib"
12894 need_lib_prefix=unknown
12895 hardcode_into_libs=no
12896
12897 # when you set need_version to no, make sure it does not cause -set_version
12898 # flags to be left without arguments
12899 need_version=unknown
12900
12901
12902
12903 case $host_os in
12904 aix3*)
12905   version_type=linux # correct to gnu/linux during the next big refactor
12906   library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
12907   shlibpath_var=LIBPATH
12908
12909   # AIX 3 has no versioning support, so we append a major version to the name.
12910   soname_spec='$libname$release$shared_ext$major'
12911   ;;
12912
12913 aix[4-9]*)
12914   version_type=linux # correct to gnu/linux during the next big refactor
12915   need_lib_prefix=no
12916   need_version=no
12917   hardcode_into_libs=yes
12918   if test ia64 = "$host_cpu"; then
12919     # AIX 5 supports IA64
12920     library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
12921     shlibpath_var=LD_LIBRARY_PATH
12922   else
12923     # With GCC up to 2.95.x, collect2 would create an import file
12924     # for dependence libraries.  The import file would start with
12925     # the line '#! .'.  This would cause the generated library to
12926     # depend on '.', always an invalid library.  This was fixed in
12927     # development snapshots of GCC prior to 3.0.
12928     case $host_os in
12929       aix4 | aix4.[01] | aix4.[01].*)
12930       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12931            echo ' yes '
12932            echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
12933         :
12934       else
12935         can_build_shared=no
12936       fi
12937       ;;
12938     esac
12939     # Using Import Files as archive members, it is possible to support
12940     # filename-based versioning of shared library archives on AIX. While
12941     # this would work for both with and without runtime linking, it will
12942     # prevent static linking of such archives. So we do filename-based
12943     # shared library versioning with .so extension only, which is used
12944     # when both runtime linking and shared linking is enabled.
12945     # Unfortunately, runtime linking may impact performance, so we do
12946     # not want this to be the default eventually. Also, we use the
12947     # versioned .so libs for executables only if there is the -brtl
12948     # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
12949     # To allow for filename-based versioning support, we need to create
12950     # libNAME.so.V as an archive file, containing:
12951     # *) an Import File, referring to the versioned filename of the
12952     #    archive as well as the shared archive member, telling the
12953     #    bitwidth (32 or 64) of that shared object, and providing the
12954     #    list of exported symbols of that shared object, eventually
12955     #    decorated with the 'weak' keyword
12956     # *) the shared object with the F_LOADONLY flag set, to really avoid
12957     #    it being seen by the linker.
12958     # At run time we better use the real file rather than another symlink,
12959     # but for link time we create the symlink libNAME.so -> libNAME.so.V
12960
12961     case $with_aix_soname,$aix_use_runtimelinking in
12962     # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
12963     # soname into executable. Probably we can add versioning support to
12964     # collect2, so additional links can be useful in future.
12965     aix,yes) # traditional libtool
12966       dynamic_linker='AIX unversionable lib.so'
12967       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
12968       # instead of lib<name>.a to let people know that these are not
12969       # typical AIX shared libraries.
12970       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12971       ;;
12972     aix,no) # traditional AIX only
12973       dynamic_linker='AIX lib.a(lib.so.V)'
12974       # We preserve .a as extension for shared libraries through AIX4.2
12975       # and later when we are not doing run time linking.
12976       library_names_spec='$libname$release.a $libname.a'
12977       soname_spec='$libname$release$shared_ext$major'
12978       ;;
12979     svr4,*) # full svr4 only
12980       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
12981       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
12982       # We do not specify a path in Import Files, so LIBPATH fires.
12983       shlibpath_overrides_runpath=yes
12984       ;;
12985     *,yes) # both, prefer svr4
12986       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
12987       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
12988       # unpreferred sharedlib libNAME.a needs extra handling
12989       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"'
12990       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"'
12991       # We do not specify a path in Import Files, so LIBPATH fires.
12992       shlibpath_overrides_runpath=yes
12993       ;;
12994     *,no) # both, prefer aix
12995       dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
12996       library_names_spec='$libname$release.a $libname.a'
12997       soname_spec='$libname$release$shared_ext$major'
12998       # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
12999       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)'
13000       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"'
13001       ;;
13002     esac
13003     shlibpath_var=LIBPATH
13004   fi
13005   ;;
13006
13007 amigaos*)
13008   case $host_cpu in
13009   powerpc)
13010     # Since July 2007 AmigaOS4 officially supports .so libraries.
13011     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
13012     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13013     ;;
13014   m68k)
13015     library_names_spec='$libname.ixlibrary $libname.a'
13016     # Create ${libname}_ixlibrary.a entries in /sys/libs.
13017     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'
13018     ;;
13019   esac
13020   ;;
13021
13022 beos*)
13023   library_names_spec='$libname$shared_ext'
13024   dynamic_linker="$host_os ld.so"
13025   shlibpath_var=LIBRARY_PATH
13026   ;;
13027
13028 bsdi[45]*)
13029   version_type=linux # correct to gnu/linux during the next big refactor
13030   need_version=no
13031   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13032   soname_spec='$libname$release$shared_ext$major'
13033   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13034   shlibpath_var=LD_LIBRARY_PATH
13035   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13036   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13037   # the default ld.so.conf also contains /usr/contrib/lib and
13038   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13039   # libtool to hard-code these into programs
13040   ;;
13041
13042 cygwin* | mingw* | pw32* | cegcc*)
13043   version_type=windows
13044   shrext_cmds=.dll
13045   need_version=no
13046   need_lib_prefix=no
13047
13048   case $GCC,$cc_basename in
13049   yes,*)
13050     # gcc
13051     library_names_spec='$libname.dll.a'
13052     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13053     postinstall_cmds='base_file=`basename \$file`~
13054       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13055       dldir=$destdir/`dirname \$dlpath`~
13056       test -d \$dldir || mkdir -p \$dldir~
13057       $install_prog $dir/$dlname \$dldir/$dlname~
13058       chmod a+x \$dldir/$dlname~
13059       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13060         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13061       fi'
13062     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13063       dlpath=$dir/\$dldll~
13064        $RM \$dlpath'
13065     shlibpath_overrides_runpath=yes
13066
13067     case $host_os in
13068     cygwin*)
13069       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13070       soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13071
13072       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
13073       ;;
13074     mingw* | cegcc*)
13075       # MinGW DLLs use traditional 'lib' prefix
13076       soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13077       ;;
13078     pw32*)
13079       # pw32 DLLs use 'pw' prefix rather than 'lib'
13080       library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13081       ;;
13082     esac
13083     dynamic_linker='Win32 ld.exe'
13084     ;;
13085
13086   *,cl*)
13087     # Native MSVC
13088     libname_spec='$name'
13089     soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13090     library_names_spec='$libname.dll.lib'
13091
13092     case $build_os in
13093     mingw*)
13094       sys_lib_search_path_spec=
13095       lt_save_ifs=$IFS
13096       IFS=';'
13097       for lt_path in $LIB
13098       do
13099         IFS=$lt_save_ifs
13100         # Let DOS variable expansion print the short 8.3 style file name.
13101         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
13102         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13103       done
13104       IFS=$lt_save_ifs
13105       # Convert to MSYS style.
13106       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13107       ;;
13108     cygwin*)
13109       # Convert to unix form, then to dos form, then back to unix form
13110       # but this time dos style (no spaces!) so that the unix form looks
13111       # like /cygdrive/c/PROGRA~1:/cygdr...
13112       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13113       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13114       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13115       ;;
13116     *)
13117       sys_lib_search_path_spec=$LIB
13118       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13119         # It is most probably a Windows format PATH.
13120         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13121       else
13122         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13123       fi
13124       # FIXME: find the short name or the path components, as spaces are
13125       # common. (e.g. "Program Files" -> "PROGRA~1")
13126       ;;
13127     esac
13128
13129     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13130     postinstall_cmds='base_file=`basename \$file`~
13131       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13132       dldir=$destdir/`dirname \$dlpath`~
13133       test -d \$dldir || mkdir -p \$dldir~
13134       $install_prog $dir/$dlname \$dldir/$dlname'
13135     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13136       dlpath=$dir/\$dldll~
13137        $RM \$dlpath'
13138     shlibpath_overrides_runpath=yes
13139     dynamic_linker='Win32 link.exe'
13140     ;;
13141
13142   *)
13143     # Assume MSVC wrapper
13144     library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13145     dynamic_linker='Win32 ld.exe'
13146     ;;
13147   esac
13148   # FIXME: first we should search . and the directory the executable is in
13149   shlibpath_var=PATH
13150   ;;
13151
13152 darwin* | rhapsody*)
13153   dynamic_linker="$host_os dyld"
13154   version_type=darwin
13155   need_lib_prefix=no
13156   need_version=no
13157   library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13158   soname_spec='$libname$release$major$shared_ext'
13159   shlibpath_overrides_runpath=yes
13160   shlibpath_var=DYLD_LIBRARY_PATH
13161   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13162
13163   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13164   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13165   ;;
13166
13167 dgux*)
13168   version_type=linux # correct to gnu/linux during the next big refactor
13169   need_lib_prefix=no
13170   need_version=no
13171   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13172   soname_spec='$libname$release$shared_ext$major'
13173   shlibpath_var=LD_LIBRARY_PATH
13174   ;;
13175
13176 freebsd* | dragonfly*)
13177   # DragonFly does not have aout.  When/if they implement a new
13178   # versioning mechanism, adjust this.
13179   if test -x /usr/bin/objformat; then
13180     objformat=`/usr/bin/objformat`
13181   else
13182     case $host_os in
13183     freebsd[23].*) objformat=aout ;;
13184     *) objformat=elf ;;
13185     esac
13186   fi
13187   version_type=freebsd-$objformat
13188   case $version_type in
13189     freebsd-elf*)
13190       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13191       soname_spec='$libname$release$shared_ext$major'
13192       need_version=no
13193       need_lib_prefix=no
13194       ;;
13195     freebsd-*)
13196       library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13197       need_version=yes
13198       ;;
13199   esac
13200   shlibpath_var=LD_LIBRARY_PATH
13201   case $host_os in
13202   freebsd2.*)
13203     shlibpath_overrides_runpath=yes
13204     ;;
13205   freebsd3.[01]* | freebsdelf3.[01]*)
13206     shlibpath_overrides_runpath=yes
13207     hardcode_into_libs=yes
13208     ;;
13209   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13210   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13211     shlibpath_overrides_runpath=no
13212     hardcode_into_libs=yes
13213     ;;
13214   *) # from 4.6 on, and DragonFly
13215     shlibpath_overrides_runpath=yes
13216     hardcode_into_libs=yes
13217     ;;
13218   esac
13219   ;;
13220
13221 haiku*)
13222   version_type=linux # correct to gnu/linux during the next big refactor
13223   need_lib_prefix=no
13224   need_version=no
13225   dynamic_linker="$host_os runtime_loader"
13226   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13227   soname_spec='$libname$release$shared_ext$major'
13228   shlibpath_var=LIBRARY_PATH
13229   shlibpath_overrides_runpath=no
13230   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13231   hardcode_into_libs=yes
13232   ;;
13233
13234 hpux9* | hpux10* | hpux11*)
13235   # Give a soname corresponding to the major version so that dld.sl refuses to
13236   # link against other versions.
13237   version_type=sunos
13238   need_lib_prefix=no
13239   need_version=no
13240   case $host_cpu in
13241   ia64*)
13242     shrext_cmds='.so'
13243     hardcode_into_libs=yes
13244     dynamic_linker="$host_os dld.so"
13245     shlibpath_var=LD_LIBRARY_PATH
13246     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13247     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13248     soname_spec='$libname$release$shared_ext$major'
13249     if test 32 = "$HPUX_IA64_MODE"; then
13250       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13251       sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13252     else
13253       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13254       sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13255     fi
13256     ;;
13257   hppa*64*)
13258     shrext_cmds='.sl'
13259     hardcode_into_libs=yes
13260     dynamic_linker="$host_os dld.sl"
13261     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13262     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13263     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13264     soname_spec='$libname$release$shared_ext$major'
13265     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13266     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13267     ;;
13268   *)
13269     shrext_cmds='.sl'
13270     dynamic_linker="$host_os dld.sl"
13271     shlibpath_var=SHLIB_PATH
13272     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13273     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13274     soname_spec='$libname$release$shared_ext$major'
13275     ;;
13276   esac
13277   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13278   postinstall_cmds='chmod 555 $lib'
13279   # or fails outright, so override atomically:
13280   install_override_mode=555
13281   ;;
13282
13283 interix[3-9]*)
13284   version_type=linux # correct to gnu/linux during the next big refactor
13285   need_lib_prefix=no
13286   need_version=no
13287   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13288   soname_spec='$libname$release$shared_ext$major'
13289   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13290   shlibpath_var=LD_LIBRARY_PATH
13291   shlibpath_overrides_runpath=no
13292   hardcode_into_libs=yes
13293   ;;
13294
13295 irix5* | irix6* | nonstopux*)
13296   case $host_os in
13297     nonstopux*) version_type=nonstopux ;;
13298     *)
13299         if test yes = "$lt_cv_prog_gnu_ld"; then
13300                 version_type=linux # correct to gnu/linux during the next big refactor
13301         else
13302                 version_type=irix
13303         fi ;;
13304   esac
13305   need_lib_prefix=no
13306   need_version=no
13307   soname_spec='$libname$release$shared_ext$major'
13308   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13309   case $host_os in
13310   irix5* | nonstopux*)
13311     libsuff= shlibsuff=
13312     ;;
13313   *)
13314     case $LD in # libtool.m4 will add one of these switches to LD
13315     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13316       libsuff= shlibsuff= libmagic=32-bit;;
13317     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13318       libsuff=32 shlibsuff=N32 libmagic=N32;;
13319     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13320       libsuff=64 shlibsuff=64 libmagic=64-bit;;
13321     *) libsuff= shlibsuff= libmagic=never-match;;
13322     esac
13323     ;;
13324   esac
13325   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13326   shlibpath_overrides_runpath=no
13327   sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13328   sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13329   hardcode_into_libs=yes
13330   ;;
13331
13332 # No shared lib support for Linux oldld, aout, or coff.
13333 linux*oldld* | linux*aout* | linux*coff*)
13334   dynamic_linker=no
13335   ;;
13336
13337 linux*android*)
13338   version_type=none # Android doesn't support versioned libraries.
13339   need_lib_prefix=no
13340   need_version=no
13341   library_names_spec='$libname$release$shared_ext'
13342   soname_spec='$libname$release$shared_ext'
13343   finish_cmds=
13344   shlibpath_var=LD_LIBRARY_PATH
13345   shlibpath_overrides_runpath=yes
13346
13347   # This implies no fast_install, which is unacceptable.
13348   # Some rework will be needed to allow for fast_install
13349   # before this can be enabled.
13350   hardcode_into_libs=yes
13351
13352   dynamic_linker='Android linker'
13353   # Don't embed -rpath directories since the linker doesn't support them.
13354   hardcode_libdir_flag_spec='-L$libdir'
13355   ;;
13356
13357 # This must be glibc/ELF.
13358 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13359   version_type=linux # correct to gnu/linux during the next big refactor
13360   need_lib_prefix=no
13361   need_version=no
13362   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13363   soname_spec='$libname$release$shared_ext$major'
13364   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13365   shlibpath_var=LD_LIBRARY_PATH
13366   shlibpath_overrides_runpath=no
13367
13368   # Some binutils ld are patched to set DT_RUNPATH
13369   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
13370   $as_echo_n "(cached) " >&6
13371 else
13372   lt_cv_shlibpath_overrides_runpath=no
13373     save_LDFLAGS=$LDFLAGS
13374     save_libdir=$libdir
13375     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13376          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13377     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13378 /* end confdefs.h.  */
13379
13380 int
13381 main ()
13382 {
13383
13384   ;
13385   return 0;
13386 }
13387 _ACEOF
13388 if ac_fn_c_try_link "$LINENO"; then :
13389   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
13390   lt_cv_shlibpath_overrides_runpath=yes
13391 fi
13392 fi
13393 rm -f core conftest.err conftest.$ac_objext \
13394     conftest$ac_exeext conftest.$ac_ext
13395     LDFLAGS=$save_LDFLAGS
13396     libdir=$save_libdir
13397
13398 fi
13399
13400   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13401
13402   # This implies no fast_install, which is unacceptable.
13403   # Some rework will be needed to allow for fast_install
13404   # before this can be enabled.
13405   hardcode_into_libs=yes
13406
13407   # Add ABI-specific directories to the system library path.
13408   sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
13409
13410   # Ideally, we could use ldconfig to report *all* directores which are
13411   # searched for libraries, however this is still not possible.  Aside from not
13412   # being certain /sbin/ldconfig is available, command
13413   # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13414   # even though it is searched at run-time.  Try to do the best guess by
13415   # appending ld.so.conf contents (and includes) to the search path.
13416   if test -f /etc/ld.so.conf; then
13417     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' ' '`
13418     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
13419   fi
13420
13421   # We used to test for /lib/ld.so.1 and disable shared libraries on
13422   # powerpc, because MkLinux only supported shared libraries with the
13423   # GNU dynamic linker.  Since this was broken with cross compilers,
13424   # most powerpc-linux boxes support dynamic linking these days and
13425   # people can always --disable-shared, the test was removed, and we
13426   # assume the GNU/Linux dynamic linker is in use.
13427   dynamic_linker='GNU/Linux ld.so'
13428   ;;
13429
13430 netbsd*)
13431   version_type=sunos
13432   need_lib_prefix=no
13433   need_version=no
13434   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13435     library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13436     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13437     dynamic_linker='NetBSD (a.out) ld.so'
13438   else
13439     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13440     soname_spec='$libname$release$shared_ext$major'
13441     dynamic_linker='NetBSD ld.elf_so'
13442   fi
13443   shlibpath_var=LD_LIBRARY_PATH
13444   shlibpath_overrides_runpath=yes
13445   hardcode_into_libs=yes
13446   ;;
13447
13448 newsos6)
13449   version_type=linux # correct to gnu/linux during the next big refactor
13450   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13451   shlibpath_var=LD_LIBRARY_PATH
13452   shlibpath_overrides_runpath=yes
13453   ;;
13454
13455 *nto* | *qnx*)
13456   version_type=qnx
13457   need_lib_prefix=no
13458   need_version=no
13459   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13460   soname_spec='$libname$release$shared_ext$major'
13461   shlibpath_var=LD_LIBRARY_PATH
13462   shlibpath_overrides_runpath=no
13463   hardcode_into_libs=yes
13464   dynamic_linker='ldqnx.so'
13465   ;;
13466
13467 openbsd* | bitrig*)
13468   version_type=sunos
13469   sys_lib_dlsearch_path_spec=/usr/lib
13470   need_lib_prefix=no
13471   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13472     need_version=no
13473   else
13474     need_version=yes
13475   fi
13476   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13477   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13478   shlibpath_var=LD_LIBRARY_PATH
13479   shlibpath_overrides_runpath=yes
13480   ;;
13481
13482 os2*)
13483   libname_spec='$name'
13484   version_type=windows
13485   shrext_cmds=.dll
13486   need_version=no
13487   need_lib_prefix=no
13488   # OS/2 can only load a DLL with a base name of 8 characters or less.
13489   soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13490     v=$($ECHO $release$versuffix | tr -d .-);
13491     n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13492     $ECHO $n$v`$shared_ext'
13493   library_names_spec='${libname}_dll.$libext'
13494   dynamic_linker='OS/2 ld.exe'
13495   shlibpath_var=BEGINLIBPATH
13496   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13497   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13498   postinstall_cmds='base_file=`basename \$file`~
13499     dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13500     dldir=$destdir/`dirname \$dlpath`~
13501     test -d \$dldir || mkdir -p \$dldir~
13502     $install_prog $dir/$dlname \$dldir/$dlname~
13503     chmod a+x \$dldir/$dlname~
13504     if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13505       eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13506     fi'
13507   postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13508     dlpath=$dir/\$dldll~
13509     $RM \$dlpath'
13510   ;;
13511
13512 osf3* | osf4* | osf5*)
13513   version_type=osf
13514   need_lib_prefix=no
13515   need_version=no
13516   soname_spec='$libname$release$shared_ext$major'
13517   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13518   shlibpath_var=LD_LIBRARY_PATH
13519   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13520   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13521   ;;
13522
13523 rdos*)
13524   dynamic_linker=no
13525   ;;
13526
13527 solaris*)
13528   version_type=linux # correct to gnu/linux during the next big refactor
13529   need_lib_prefix=no
13530   need_version=no
13531   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13532   soname_spec='$libname$release$shared_ext$major'
13533   shlibpath_var=LD_LIBRARY_PATH
13534   shlibpath_overrides_runpath=yes
13535   hardcode_into_libs=yes
13536   # ldd complains unless libraries are executable
13537   postinstall_cmds='chmod +x $lib'
13538   ;;
13539
13540 sunos4*)
13541   version_type=sunos
13542   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13543   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13544   shlibpath_var=LD_LIBRARY_PATH
13545   shlibpath_overrides_runpath=yes
13546   if test yes = "$with_gnu_ld"; then
13547     need_lib_prefix=no
13548   fi
13549   need_version=yes
13550   ;;
13551
13552 sysv4 | sysv4.3*)
13553   version_type=linux # correct to gnu/linux during the next big refactor
13554   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13555   soname_spec='$libname$release$shared_ext$major'
13556   shlibpath_var=LD_LIBRARY_PATH
13557   case $host_vendor in
13558     sni)
13559       shlibpath_overrides_runpath=no
13560       need_lib_prefix=no
13561       runpath_var=LD_RUN_PATH
13562       ;;
13563     siemens)
13564       need_lib_prefix=no
13565       ;;
13566     motorola)
13567       need_lib_prefix=no
13568       need_version=no
13569       shlibpath_overrides_runpath=no
13570       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13571       ;;
13572   esac
13573   ;;
13574
13575 sysv4*MP*)
13576   if test -d /usr/nec; then
13577     version_type=linux # correct to gnu/linux during the next big refactor
13578     library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13579     soname_spec='$libname$shared_ext.$major'
13580     shlibpath_var=LD_LIBRARY_PATH
13581   fi
13582   ;;
13583
13584 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13585   version_type=sco
13586   need_lib_prefix=no
13587   need_version=no
13588   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13589   soname_spec='$libname$release$shared_ext$major'
13590   shlibpath_var=LD_LIBRARY_PATH
13591   shlibpath_overrides_runpath=yes
13592   hardcode_into_libs=yes
13593   if test yes = "$with_gnu_ld"; then
13594     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13595   else
13596     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13597     case $host_os in
13598       sco3.2v5*)
13599         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13600         ;;
13601     esac
13602   fi
13603   sys_lib_dlsearch_path_spec='/usr/lib'
13604   ;;
13605
13606 tpf*)
13607   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13608   version_type=linux # correct to gnu/linux during the next big refactor
13609   need_lib_prefix=no
13610   need_version=no
13611   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13612   shlibpath_var=LD_LIBRARY_PATH
13613   shlibpath_overrides_runpath=no
13614   hardcode_into_libs=yes
13615   ;;
13616
13617 uts4*)
13618   version_type=linux # correct to gnu/linux during the next big refactor
13619   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13620   soname_spec='$libname$release$shared_ext$major'
13621   shlibpath_var=LD_LIBRARY_PATH
13622   ;;
13623
13624 *)
13625   dynamic_linker=no
13626   ;;
13627 esac
13628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13629 $as_echo "$dynamic_linker" >&6; }
13630 test no = "$dynamic_linker" && can_build_shared=no
13631
13632 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13633 if test yes = "$GCC"; then
13634   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13635 fi
13636
13637 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13638   sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13639 fi
13640
13641 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13642   sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13643 fi
13644
13645 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13646 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13647
13648 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13649 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13650
13651 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13652 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13751 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13752 hardcode_action=
13753 if test -n "$hardcode_libdir_flag_spec" ||
13754    test -n "$runpath_var" ||
13755    test yes = "$hardcode_automatic"; then
13756
13757   # We can hardcode non-existent directories.
13758   if test no != "$hardcode_direct" &&
13759      # If the only mechanism to avoid hardcoding is shlibpath_var, we
13760      # have to relink, otherwise we might link with an installed library
13761      # when we should be linking with a yet-to-be-installed one
13762      ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13763      test no != "$hardcode_minus_L"; then
13764     # Linking always hardcodes the temporary library directory.
13765     hardcode_action=relink
13766   else
13767     # We can link without hardcoding, and we can hardcode nonexisting dirs.
13768     hardcode_action=immediate
13769   fi
13770 else
13771   # We cannot hardcode anything, or else we can only hardcode existing
13772   # directories.
13773   hardcode_action=unsupported
13774 fi
13775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13776 $as_echo "$hardcode_action" >&6; }
13777
13778 if test relink = "$hardcode_action" ||
13779    test yes = "$inherit_rpath"; then
13780   # Fast installation is not supported
13781   enable_fast_install=no
13782 elif test yes = "$shlibpath_overrides_runpath" ||
13783      test no = "$enable_shared"; then
13784   # Fast installation is not necessary
13785   enable_fast_install=needless
13786 fi
13787
13788
13789
13790
13791
13792
13793   if test yes != "$enable_dlopen"; then
13794   enable_dlopen=unknown
13795   enable_dlopen_self=unknown
13796   enable_dlopen_self_static=unknown
13797 else
13798   lt_cv_dlopen=no
13799   lt_cv_dlopen_libs=
13800
13801   case $host_os in
13802   beos*)
13803     lt_cv_dlopen=load_add_on
13804     lt_cv_dlopen_libs=
13805     lt_cv_dlopen_self=yes
13806     ;;
13807
13808   mingw* | pw32* | cegcc*)
13809     lt_cv_dlopen=LoadLibrary
13810     lt_cv_dlopen_libs=
13811     ;;
13812
13813   cygwin*)
13814     lt_cv_dlopen=dlopen
13815     lt_cv_dlopen_libs=
13816     ;;
13817
13818   darwin*)
13819     # if libdl is installed we need to link against it
13820     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13821 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13822 if ${ac_cv_lib_dl_dlopen+:} false; then :
13823   $as_echo_n "(cached) " >&6
13824 else
13825   ac_check_lib_save_LIBS=$LIBS
13826 LIBS="-ldl  $LIBS"
13827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13828 /* end confdefs.h.  */
13829
13830 /* Override any GCC internal prototype to avoid an error.
13831    Use char because int might match the return type of a GCC
13832    builtin and then its argument prototype would still apply.  */
13833 #ifdef __cplusplus
13834 extern "C"
13835 #endif
13836 char dlopen ();
13837 int
13838 main ()
13839 {
13840 return dlopen ();
13841   ;
13842   return 0;
13843 }
13844 _ACEOF
13845 if ac_fn_c_try_link "$LINENO"; then :
13846   ac_cv_lib_dl_dlopen=yes
13847 else
13848   ac_cv_lib_dl_dlopen=no
13849 fi
13850 rm -f core conftest.err conftest.$ac_objext \
13851     conftest$ac_exeext conftest.$ac_ext
13852 LIBS=$ac_check_lib_save_LIBS
13853 fi
13854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13855 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13856 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13857   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13858 else
13859
13860     lt_cv_dlopen=dyld
13861     lt_cv_dlopen_libs=
13862     lt_cv_dlopen_self=yes
13863
13864 fi
13865
13866     ;;
13867
13868   tpf*)
13869     # Don't try to run any link tests for TPF.  We know it's impossible
13870     # because TPF is a cross-compiler, and we know how we open DSOs.
13871     lt_cv_dlopen=dlopen
13872     lt_cv_dlopen_libs=
13873     lt_cv_dlopen_self=no
13874     ;;
13875
13876   *)
13877     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
13878 if test "x$ac_cv_func_shl_load" = xyes; then :
13879   lt_cv_dlopen=shl_load
13880 else
13881   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
13882 $as_echo_n "checking for shl_load in -ldld... " >&6; }
13883 if ${ac_cv_lib_dld_shl_load+:} false; then :
13884   $as_echo_n "(cached) " >&6
13885 else
13886   ac_check_lib_save_LIBS=$LIBS
13887 LIBS="-ldld  $LIBS"
13888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13889 /* end confdefs.h.  */
13890
13891 /* Override any GCC internal prototype to avoid an error.
13892    Use char because int might match the return type of a GCC
13893    builtin and then its argument prototype would still apply.  */
13894 #ifdef __cplusplus
13895 extern "C"
13896 #endif
13897 char shl_load ();
13898 int
13899 main ()
13900 {
13901 return shl_load ();
13902   ;
13903   return 0;
13904 }
13905 _ACEOF
13906 if ac_fn_c_try_link "$LINENO"; then :
13907   ac_cv_lib_dld_shl_load=yes
13908 else
13909   ac_cv_lib_dld_shl_load=no
13910 fi
13911 rm -f core conftest.err conftest.$ac_objext \
13912     conftest$ac_exeext conftest.$ac_ext
13913 LIBS=$ac_check_lib_save_LIBS
13914 fi
13915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
13916 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
13917 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
13918   lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
13919 else
13920   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
13921 if test "x$ac_cv_func_dlopen" = xyes; then :
13922   lt_cv_dlopen=dlopen
13923 else
13924   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13925 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13926 if ${ac_cv_lib_dl_dlopen+:} false; then :
13927   $as_echo_n "(cached) " >&6
13928 else
13929   ac_check_lib_save_LIBS=$LIBS
13930 LIBS="-ldl  $LIBS"
13931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13932 /* end confdefs.h.  */
13933
13934 /* Override any GCC internal prototype to avoid an error.
13935    Use char because int might match the return type of a GCC
13936    builtin and then its argument prototype would still apply.  */
13937 #ifdef __cplusplus
13938 extern "C"
13939 #endif
13940 char dlopen ();
13941 int
13942 main ()
13943 {
13944 return dlopen ();
13945   ;
13946   return 0;
13947 }
13948 _ACEOF
13949 if ac_fn_c_try_link "$LINENO"; then :
13950   ac_cv_lib_dl_dlopen=yes
13951 else
13952   ac_cv_lib_dl_dlopen=no
13953 fi
13954 rm -f core conftest.err conftest.$ac_objext \
13955     conftest$ac_exeext conftest.$ac_ext
13956 LIBS=$ac_check_lib_save_LIBS
13957 fi
13958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13959 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13960 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13961   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13962 else
13963   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
13964 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
13965 if ${ac_cv_lib_svld_dlopen+:} false; then :
13966   $as_echo_n "(cached) " >&6
13967 else
13968   ac_check_lib_save_LIBS=$LIBS
13969 LIBS="-lsvld  $LIBS"
13970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13971 /* end confdefs.h.  */
13972
13973 /* Override any GCC internal prototype to avoid an error.
13974    Use char because int might match the return type of a GCC
13975    builtin and then its argument prototype would still apply.  */
13976 #ifdef __cplusplus
13977 extern "C"
13978 #endif
13979 char dlopen ();
13980 int
13981 main ()
13982 {
13983 return dlopen ();
13984   ;
13985   return 0;
13986 }
13987 _ACEOF
13988 if ac_fn_c_try_link "$LINENO"; then :
13989   ac_cv_lib_svld_dlopen=yes
13990 else
13991   ac_cv_lib_svld_dlopen=no
13992 fi
13993 rm -f core conftest.err conftest.$ac_objext \
13994     conftest$ac_exeext conftest.$ac_ext
13995 LIBS=$ac_check_lib_save_LIBS
13996 fi
13997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
13998 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
13999 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
14000   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
14001 else
14002   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
14003 $as_echo_n "checking for dld_link in -ldld... " >&6; }
14004 if ${ac_cv_lib_dld_dld_link+:} false; then :
14005   $as_echo_n "(cached) " >&6
14006 else
14007   ac_check_lib_save_LIBS=$LIBS
14008 LIBS="-ldld  $LIBS"
14009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14010 /* end confdefs.h.  */
14011
14012 /* Override any GCC internal prototype to avoid an error.
14013    Use char because int might match the return type of a GCC
14014    builtin and then its argument prototype would still apply.  */
14015 #ifdef __cplusplus
14016 extern "C"
14017 #endif
14018 char dld_link ();
14019 int
14020 main ()
14021 {
14022 return dld_link ();
14023   ;
14024   return 0;
14025 }
14026 _ACEOF
14027 if ac_fn_c_try_link "$LINENO"; then :
14028   ac_cv_lib_dld_dld_link=yes
14029 else
14030   ac_cv_lib_dld_dld_link=no
14031 fi
14032 rm -f core conftest.err conftest.$ac_objext \
14033     conftest$ac_exeext conftest.$ac_ext
14034 LIBS=$ac_check_lib_save_LIBS
14035 fi
14036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
14037 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
14038 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
14039   lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
14040 fi
14041
14042
14043 fi
14044
14045
14046 fi
14047
14048
14049 fi
14050
14051
14052 fi
14053
14054
14055 fi
14056
14057     ;;
14058   esac
14059
14060   if test no = "$lt_cv_dlopen"; then
14061     enable_dlopen=no
14062   else
14063     enable_dlopen=yes
14064   fi
14065
14066   case $lt_cv_dlopen in
14067   dlopen)
14068     save_CPPFLAGS=$CPPFLAGS
14069     test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14070
14071     save_LDFLAGS=$LDFLAGS
14072     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14073
14074     save_LIBS=$LIBS
14075     LIBS="$lt_cv_dlopen_libs $LIBS"
14076
14077     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
14078 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
14079 if ${lt_cv_dlopen_self+:} false; then :
14080   $as_echo_n "(cached) " >&6
14081 else
14082           if test yes = "$cross_compiling"; then :
14083   lt_cv_dlopen_self=cross
14084 else
14085   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14086   lt_status=$lt_dlunknown
14087   cat > conftest.$ac_ext <<_LT_EOF
14088 #line $LINENO "configure"
14089 #include "confdefs.h"
14090
14091 #if HAVE_DLFCN_H
14092 #include <dlfcn.h>
14093 #endif
14094
14095 #include <stdio.h>
14096
14097 #ifdef RTLD_GLOBAL
14098 #  define LT_DLGLOBAL           RTLD_GLOBAL
14099 #else
14100 #  ifdef DL_GLOBAL
14101 #    define LT_DLGLOBAL         DL_GLOBAL
14102 #  else
14103 #    define LT_DLGLOBAL         0
14104 #  endif
14105 #endif
14106
14107 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14108    find out it does not work in some platform. */
14109 #ifndef LT_DLLAZY_OR_NOW
14110 #  ifdef RTLD_LAZY
14111 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14112 #  else
14113 #    ifdef DL_LAZY
14114 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14115 #    else
14116 #      ifdef RTLD_NOW
14117 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14118 #      else
14119 #        ifdef DL_NOW
14120 #          define LT_DLLAZY_OR_NOW      DL_NOW
14121 #        else
14122 #          define LT_DLLAZY_OR_NOW      0
14123 #        endif
14124 #      endif
14125 #    endif
14126 #  endif
14127 #endif
14128
14129 /* When -fvisibility=hidden is used, assume the code has been annotated
14130    correspondingly for the symbols needed.  */
14131 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14132 int fnord () __attribute__((visibility("default")));
14133 #endif
14134
14135 int fnord () { return 42; }
14136 int main ()
14137 {
14138   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14139   int status = $lt_dlunknown;
14140
14141   if (self)
14142     {
14143       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14144       else
14145         {
14146           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14147           else puts (dlerror ());
14148         }
14149       /* dlclose (self); */
14150     }
14151   else
14152     puts (dlerror ());
14153
14154   return status;
14155 }
14156 _LT_EOF
14157   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14158   (eval $ac_link) 2>&5
14159   ac_status=$?
14160   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14161   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14162     (./conftest; exit; ) >&5 2>/dev/null
14163     lt_status=$?
14164     case x$lt_status in
14165       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14166       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14167       x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14168     esac
14169   else :
14170     # compilation failed
14171     lt_cv_dlopen_self=no
14172   fi
14173 fi
14174 rm -fr conftest*
14175
14176
14177 fi
14178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14179 $as_echo "$lt_cv_dlopen_self" >&6; }
14180
14181     if test yes = "$lt_cv_dlopen_self"; then
14182       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14183       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14184 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
14185 if ${lt_cv_dlopen_self_static+:} false; then :
14186   $as_echo_n "(cached) " >&6
14187 else
14188           if test yes = "$cross_compiling"; then :
14189   lt_cv_dlopen_self_static=cross
14190 else
14191   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14192   lt_status=$lt_dlunknown
14193   cat > conftest.$ac_ext <<_LT_EOF
14194 #line $LINENO "configure"
14195 #include "confdefs.h"
14196
14197 #if HAVE_DLFCN_H
14198 #include <dlfcn.h>
14199 #endif
14200
14201 #include <stdio.h>
14202
14203 #ifdef RTLD_GLOBAL
14204 #  define LT_DLGLOBAL           RTLD_GLOBAL
14205 #else
14206 #  ifdef DL_GLOBAL
14207 #    define LT_DLGLOBAL         DL_GLOBAL
14208 #  else
14209 #    define LT_DLGLOBAL         0
14210 #  endif
14211 #endif
14212
14213 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14214    find out it does not work in some platform. */
14215 #ifndef LT_DLLAZY_OR_NOW
14216 #  ifdef RTLD_LAZY
14217 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14218 #  else
14219 #    ifdef DL_LAZY
14220 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14221 #    else
14222 #      ifdef RTLD_NOW
14223 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14224 #      else
14225 #        ifdef DL_NOW
14226 #          define LT_DLLAZY_OR_NOW      DL_NOW
14227 #        else
14228 #          define LT_DLLAZY_OR_NOW      0
14229 #        endif
14230 #      endif
14231 #    endif
14232 #  endif
14233 #endif
14234
14235 /* When -fvisibility=hidden is used, assume the code has been annotated
14236    correspondingly for the symbols needed.  */
14237 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14238 int fnord () __attribute__((visibility("default")));
14239 #endif
14240
14241 int fnord () { return 42; }
14242 int main ()
14243 {
14244   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14245   int status = $lt_dlunknown;
14246
14247   if (self)
14248     {
14249       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14250       else
14251         {
14252           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14253           else puts (dlerror ());
14254         }
14255       /* dlclose (self); */
14256     }
14257   else
14258     puts (dlerror ());
14259
14260   return status;
14261 }
14262 _LT_EOF
14263   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14264   (eval $ac_link) 2>&5
14265   ac_status=$?
14266   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14267   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14268     (./conftest; exit; ) >&5 2>/dev/null
14269     lt_status=$?
14270     case x$lt_status in
14271       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14272       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14273       x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14274     esac
14275   else :
14276     # compilation failed
14277     lt_cv_dlopen_self_static=no
14278   fi
14279 fi
14280 rm -fr conftest*
14281
14282
14283 fi
14284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14285 $as_echo "$lt_cv_dlopen_self_static" >&6; }
14286     fi
14287
14288     CPPFLAGS=$save_CPPFLAGS
14289     LDFLAGS=$save_LDFLAGS
14290     LIBS=$save_LIBS
14291     ;;
14292   esac
14293
14294   case $lt_cv_dlopen_self in
14295   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14296   *) enable_dlopen_self=unknown ;;
14297   esac
14298
14299   case $lt_cv_dlopen_self_static in
14300   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14301   *) enable_dlopen_self_static=unknown ;;
14302   esac
14303 fi
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321 striplib=
14322 old_striplib=
14323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14324 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
14325 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14326   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14327   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14329 $as_echo "yes" >&6; }
14330 else
14331 # FIXME - insert some real tests, host_os isn't really good enough
14332   case $host_os in
14333   darwin*)
14334     if test -n "$STRIP"; then
14335       striplib="$STRIP -x"
14336       old_striplib="$STRIP -S"
14337       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14338 $as_echo "yes" >&6; }
14339     else
14340       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14341 $as_echo "no" >&6; }
14342     fi
14343     ;;
14344   *)
14345     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14346 $as_echo "no" >&6; }
14347     ;;
14348   esac
14349 fi
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362   # Report what library types will actually be built
14363   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14364 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
14365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14366 $as_echo "$can_build_shared" >&6; }
14367
14368   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14369 $as_echo_n "checking whether to build shared libraries... " >&6; }
14370   test no = "$can_build_shared" && enable_shared=no
14371
14372   # On AIX, shared libraries and static libraries use the same namespace, and
14373   # are all built from PIC.
14374   case $host_os in
14375   aix3*)
14376     test yes = "$enable_shared" && enable_static=no
14377     if test -n "$RANLIB"; then
14378       archive_cmds="$archive_cmds~\$RANLIB \$lib"
14379       postinstall_cmds='$RANLIB $lib'
14380     fi
14381     ;;
14382
14383   aix[4-9]*)
14384     if test ia64 != "$host_cpu"; then
14385       case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14386       yes,aix,yes) ;;                   # shared object as lib.so file only
14387       yes,svr4,*) ;;                    # shared object as lib.so archive member only
14388       yes,*) enable_static=no ;;        # shared object in lib.a archive as well
14389       esac
14390     fi
14391     ;;
14392   esac
14393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14394 $as_echo "$enable_shared" >&6; }
14395
14396   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14397 $as_echo_n "checking whether to build static libraries... " >&6; }
14398   # Make sure either enable_shared or enable_static is yes.
14399   test yes = "$enable_shared" || enable_static=yes
14400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14401 $as_echo "$enable_static" >&6; }
14402
14403
14404
14405
14406 fi
14407 ac_ext=c
14408 ac_cpp='$CPP $CPPFLAGS'
14409 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14410 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14411 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14412
14413 CC=$lt_save_CC
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429         ac_config_commands="$ac_config_commands libtool"
14430
14431
14432
14433
14434 # Only expand once:
14435
14436
14437
14438
14439 # Checks for header files.
14440 for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/ipc.h sys/shm.h
14441 do :
14442   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14443 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
14444 "
14445 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14446   cat >>confdefs.h <<_ACEOF
14447 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14448 _ACEOF
14449
14450 fi
14451
14452 done
14453
14454
14455 # check for types.
14456 # Using own tests for int64* because autoconf builtin only give 32bit.
14457 ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
14458 if test "x$ac_cv_type_int8_t" = xyes; then :
14459
14460 else
14461
14462 cat >>confdefs.h <<_ACEOF
14463 #define int8_t signed char
14464 _ACEOF
14465
14466 fi
14467
14468 ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
14469 if test "x$ac_cv_type_int16_t" = xyes; then :
14470
14471 else
14472
14473 cat >>confdefs.h <<_ACEOF
14474 #define int16_t short
14475 _ACEOF
14476
14477 fi
14478
14479 ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
14480 if test "x$ac_cv_type_int32_t" = xyes; then :
14481
14482 else
14483
14484 cat >>confdefs.h <<_ACEOF
14485 #define int32_t int
14486 _ACEOF
14487
14488 fi
14489
14490 ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
14491 if test "x$ac_cv_type_int64_t" = xyes; then :
14492
14493 else
14494
14495 cat >>confdefs.h <<_ACEOF
14496 #define int64_t long long
14497 _ACEOF
14498
14499 fi
14500
14501 ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
14502 if test "x$ac_cv_type_uint8_t" = xyes; then :
14503
14504 else
14505
14506 cat >>confdefs.h <<_ACEOF
14507 #define uint8_t unsigned char
14508 _ACEOF
14509
14510 fi
14511
14512 ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
14513 if test "x$ac_cv_type_uint16_t" = xyes; then :
14514
14515 else
14516
14517 cat >>confdefs.h <<_ACEOF
14518 #define uint16_t unsigned short
14519 _ACEOF
14520
14521 fi
14522
14523 ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
14524 if test "x$ac_cv_type_uint32_t" = xyes; then :
14525
14526 else
14527
14528 cat >>confdefs.h <<_ACEOF
14529 #define uint32_t unsigned int
14530 _ACEOF
14531
14532 fi
14533
14534 ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
14535 if test "x$ac_cv_type_uint64_t" = xyes; then :
14536
14537 else
14538
14539 cat >>confdefs.h <<_ACEOF
14540 #define uint64_t unsigned long long
14541 _ACEOF
14542
14543 fi
14544
14545 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14546 if test "x$ac_cv_type_size_t" = xyes; then :
14547
14548 else
14549
14550 cat >>confdefs.h <<_ACEOF
14551 #define size_t unsigned int
14552 _ACEOF
14553
14554 fi
14555
14556 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
14557 if test "x$ac_cv_type_ssize_t" = xyes; then :
14558
14559 else
14560
14561 cat >>confdefs.h <<_ACEOF
14562 #define ssize_t int
14563 _ACEOF
14564
14565 fi
14566
14567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
14568 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
14569 if ${ac_cv_type_uid_t+:} false; then :
14570   $as_echo_n "(cached) " >&6
14571 else
14572   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14573 /* end confdefs.h.  */
14574 #include <sys/types.h>
14575
14576 _ACEOF
14577 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14578   $EGREP "uid_t" >/dev/null 2>&1; then :
14579   ac_cv_type_uid_t=yes
14580 else
14581   ac_cv_type_uid_t=no
14582 fi
14583 rm -f conftest*
14584
14585 fi
14586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
14587 $as_echo "$ac_cv_type_uid_t" >&6; }
14588 if test $ac_cv_type_uid_t = no; then
14589
14590 $as_echo "#define uid_t int" >>confdefs.h
14591
14592
14593 $as_echo "#define gid_t int" >>confdefs.h
14594
14595 fi
14596
14597 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14598 if test "x$ac_cv_type_pid_t" = xyes; then :
14599
14600 else
14601
14602 cat >>confdefs.h <<_ACEOF
14603 #define pid_t int
14604 _ACEOF
14605
14606 fi
14607
14608 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
14609 if test "x$ac_cv_type_off_t" = xyes; then :
14610
14611 else
14612
14613 cat >>confdefs.h <<_ACEOF
14614 #define off_t long int
14615 _ACEOF
14616
14617 fi
14618
14619 ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
14620 $ac_includes_default
14621 #ifdef HAVE_WINSOCK2_H
14622 #  include <winsock2.h>
14623 #endif
14624
14625 "
14626 if test "x$ac_cv_type_u_char" = xyes; then :
14627
14628 else
14629
14630 $as_echo "#define u_char unsigned char" >>confdefs.h
14631
14632 fi
14633
14634 ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
14635 $ac_includes_default
14636 #ifdef HAVE_SYS_RESOURCE_H
14637 #  include <sys/resource.h>
14638 #endif
14639
14640 "
14641 if test "x$ac_cv_type_rlim_t" = xyes; then :
14642
14643 else
14644
14645 $as_echo "#define rlim_t unsigned long" >>confdefs.h
14646
14647 fi
14648
14649
14650 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
14651 $ac_includes_default
14652 #ifdef HAVE_SYS_SOCKET_H
14653 #  include <sys/socket.h>
14654 #endif
14655 #ifdef HAVE_WS2TCPIP_H
14656 #  include <ws2tcpip.h>
14657 #endif
14658
14659 "
14660 if test "x$ac_cv_type_socklen_t" = xyes; then :
14661
14662 else
14663
14664 $as_echo "#define socklen_t int" >>confdefs.h
14665
14666 fi
14667
14668  ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
14669 $ac_includes_default
14670 #ifdef HAVE_SYS_TYPES_H
14671 # include <sys/types.h>
14672 #endif
14673 #ifdef HAVE_NETINET_IN_H
14674 # include <netinet/in.h>
14675 #endif
14676
14677 "
14678 if test "x$ac_cv_type_in_addr_t" = xyes; then :
14679
14680 else
14681
14682 $as_echo "#define in_addr_t uint32_t" >>confdefs.h
14683
14684 fi
14685
14686  ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
14687 $ac_includes_default
14688 #ifdef HAVE_SYS_TYPES_H
14689 # include <sys/types.h>
14690 #endif
14691 #ifdef HAVE_NETINET_IN_H
14692 # include <netinet/in.h>
14693 #endif
14694
14695 "
14696 if test "x$ac_cv_type_in_port_t" = xyes; then :
14697
14698 else
14699
14700 $as_echo "#define in_port_t uint16_t" >>confdefs.h
14701
14702 fi
14703
14704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
14705 $as_echo_n "checking if memcmp compares unsigned... " >&6; }
14706 if test "$cross_compiling" = yes; then :
14707    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
14708 $as_echo "cross-compile no" >&6; }
14709
14710 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14711
14712   case " $LIBOBJS " in
14713   *" memcmp.$ac_objext "* ) ;;
14714   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14715  ;;
14716 esac
14717
14718
14719 else
14720   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14721 /* end confdefs.h.  */
14722
14723 #include <stdio.h>
14724 #include <stdlib.h>
14725 #include <string.h>
14726 int main(void)
14727 {
14728         char a = 255, b = 0;
14729         if(memcmp(&a, &b, 1) < 0)
14730                 return 1;
14731         return 0;
14732 }
14733
14734 _ACEOF
14735 if ac_fn_c_try_run "$LINENO"; then :
14736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14737 $as_echo "yes" >&6; }
14738 else
14739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14740 $as_echo "no" >&6; }
14741
14742 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14743
14744   case " $LIBOBJS " in
14745   *" memcmp.$ac_objext "* ) ;;
14746   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14747  ;;
14748 esac
14749
14750
14751 fi
14752 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14753   conftest.$ac_objext conftest.beam conftest.$ac_ext
14754 fi
14755
14756
14757 # The cast to long int works around a bug in the HP C Compiler
14758 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14759 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14760 # This bug is HP SR number 8606223364.
14761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
14762 $as_echo_n "checking size of time_t... " >&6; }
14763 if ${ac_cv_sizeof_time_t+:} false; then :
14764   $as_echo_n "(cached) " >&6
14765 else
14766   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
14767 $ac_includes_default
14768 #ifdef TIME_WITH_SYS_TIME
14769 # include <sys/time.h>
14770 # include <time.h>
14771 #else
14772 # ifdef HAVE_SYS_TIME_H
14773 #  include <sys/time.h>
14774 # else
14775 #  include <time.h>
14776 # endif
14777 #endif
14778
14779 "; then :
14780
14781 else
14782   if test "$ac_cv_type_time_t" = yes; then
14783      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14784 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14785 as_fn_error 77 "cannot compute sizeof (time_t)
14786 See \`config.log' for more details" "$LINENO" 5; }
14787    else
14788      ac_cv_sizeof_time_t=0
14789    fi
14790 fi
14791
14792 fi
14793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
14794 $as_echo "$ac_cv_sizeof_time_t" >&6; }
14795
14796
14797
14798 cat >>confdefs.h <<_ACEOF
14799 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
14800 _ACEOF
14801
14802
14803
14804 # add option to disable the evil rpath
14805
14806 # Check whether --enable-rpath was given.
14807 if test "${enable_rpath+set}" = set; then :
14808   enableval=$enable_rpath; enable_rpath=$enableval
14809 else
14810   enable_rpath=yes
14811 fi
14812
14813 if test "x$enable_rpath" = xno; then
14814                 ac_config_commands="$ac_config_commands disable-rpath"
14815
14816 fi
14817
14818
14819
14820 # check to see if libraries are needed for these functions.
14821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
14822 $as_echo_n "checking for library containing inet_pton... " >&6; }
14823 if ${ac_cv_search_inet_pton+:} false; then :
14824   $as_echo_n "(cached) " >&6
14825 else
14826   ac_func_search_save_LIBS=$LIBS
14827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14828 /* end confdefs.h.  */
14829
14830 /* Override any GCC internal prototype to avoid an error.
14831    Use char because int might match the return type of a GCC
14832    builtin and then its argument prototype would still apply.  */
14833 #ifdef __cplusplus
14834 extern "C"
14835 #endif
14836 char inet_pton ();
14837 int
14838 main ()
14839 {
14840 return inet_pton ();
14841   ;
14842   return 0;
14843 }
14844 _ACEOF
14845 for ac_lib in '' nsl; do
14846   if test -z "$ac_lib"; then
14847     ac_res="none required"
14848   else
14849     ac_res=-l$ac_lib
14850     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14851   fi
14852   if ac_fn_c_try_link "$LINENO"; then :
14853   ac_cv_search_inet_pton=$ac_res
14854 fi
14855 rm -f core conftest.err conftest.$ac_objext \
14856     conftest$ac_exeext
14857   if ${ac_cv_search_inet_pton+:} false; then :
14858   break
14859 fi
14860 done
14861 if ${ac_cv_search_inet_pton+:} false; then :
14862
14863 else
14864   ac_cv_search_inet_pton=no
14865 fi
14866 rm conftest.$ac_ext
14867 LIBS=$ac_func_search_save_LIBS
14868 fi
14869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
14870 $as_echo "$ac_cv_search_inet_pton" >&6; }
14871 ac_res=$ac_cv_search_inet_pton
14872 if test "$ac_res" != no; then :
14873   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14874
14875 fi
14876
14877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
14878 $as_echo_n "checking for library containing socket... " >&6; }
14879 if ${ac_cv_search_socket+:} false; then :
14880   $as_echo_n "(cached) " >&6
14881 else
14882   ac_func_search_save_LIBS=$LIBS
14883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14884 /* end confdefs.h.  */
14885
14886 /* Override any GCC internal prototype to avoid an error.
14887    Use char because int might match the return type of a GCC
14888    builtin and then its argument prototype would still apply.  */
14889 #ifdef __cplusplus
14890 extern "C"
14891 #endif
14892 char socket ();
14893 int
14894 main ()
14895 {
14896 return socket ();
14897   ;
14898   return 0;
14899 }
14900 _ACEOF
14901 for ac_lib in '' socket; do
14902   if test -z "$ac_lib"; then
14903     ac_res="none required"
14904   else
14905     ac_res=-l$ac_lib
14906     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14907   fi
14908   if ac_fn_c_try_link "$LINENO"; then :
14909   ac_cv_search_socket=$ac_res
14910 fi
14911 rm -f core conftest.err conftest.$ac_objext \
14912     conftest$ac_exeext
14913   if ${ac_cv_search_socket+:} false; then :
14914   break
14915 fi
14916 done
14917 if ${ac_cv_search_socket+:} false; then :
14918
14919 else
14920   ac_cv_search_socket=no
14921 fi
14922 rm conftest.$ac_ext
14923 LIBS=$ac_func_search_save_LIBS
14924 fi
14925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
14926 $as_echo "$ac_cv_search_socket" >&6; }
14927 ac_res=$ac_cv_search_socket
14928 if test "$ac_res" != no; then :
14929   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14930
14931 fi
14932
14933
14934 # check wether strptime also works
14935
14936 # check some functions of the OS before linking libs (while still runnable).
14937 for ac_header in unistd.h
14938 do :
14939   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
14940 if test "x$ac_cv_header_unistd_h" = xyes; then :
14941   cat >>confdefs.h <<_ACEOF
14942 #define HAVE_UNISTD_H 1
14943 _ACEOF
14944
14945 fi
14946
14947 done
14948
14949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
14950 $as_echo_n "checking for working chown... " >&6; }
14951 if ${ac_cv_func_chown_works+:} false; then :
14952   $as_echo_n "(cached) " >&6
14953 else
14954   if test "$cross_compiling" = yes; then :
14955   ac_cv_func_chown_works=no
14956 else
14957   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14958 /* end confdefs.h.  */
14959 $ac_includes_default
14960 #include <fcntl.h>
14961
14962 int
14963 main ()
14964 {
14965   char *f = "conftest.chown";
14966   struct stat before, after;
14967
14968   if (creat (f, 0600) < 0)
14969     return 1;
14970   if (stat (f, &before) < 0)
14971     return 1;
14972   if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
14973     return 1;
14974   if (stat (f, &after) < 0)
14975     return 1;
14976   return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
14977
14978   ;
14979   return 0;
14980 }
14981 _ACEOF
14982 if ac_fn_c_try_run "$LINENO"; then :
14983   ac_cv_func_chown_works=yes
14984 else
14985   ac_cv_func_chown_works=no
14986 fi
14987 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14988   conftest.$ac_objext conftest.beam conftest.$ac_ext
14989 fi
14990
14991 rm -f conftest.chown
14992
14993 fi
14994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
14995 $as_echo "$ac_cv_func_chown_works" >&6; }
14996 if test $ac_cv_func_chown_works = yes; then
14997
14998 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
14999
15000 fi
15001
15002 for ac_header in vfork.h
15003 do :
15004   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15005 if test "x$ac_cv_header_vfork_h" = xyes; then :
15006   cat >>confdefs.h <<_ACEOF
15007 #define HAVE_VFORK_H 1
15008 _ACEOF
15009
15010 fi
15011
15012 done
15013
15014 for ac_func in fork vfork
15015 do :
15016   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15017 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15018 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15019   cat >>confdefs.h <<_ACEOF
15020 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15021 _ACEOF
15022
15023 fi
15024 done
15025
15026 if test "x$ac_cv_func_fork" = xyes; then
15027   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15028 $as_echo_n "checking for working fork... " >&6; }
15029 if ${ac_cv_func_fork_works+:} false; then :
15030   $as_echo_n "(cached) " >&6
15031 else
15032   if test "$cross_compiling" = yes; then :
15033   ac_cv_func_fork_works=cross
15034 else
15035   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15036 /* end confdefs.h.  */
15037 $ac_includes_default
15038 int
15039 main ()
15040 {
15041
15042           /* By Ruediger Kuhlmann. */
15043           return fork () < 0;
15044
15045   ;
15046   return 0;
15047 }
15048 _ACEOF
15049 if ac_fn_c_try_run "$LINENO"; then :
15050   ac_cv_func_fork_works=yes
15051 else
15052   ac_cv_func_fork_works=no
15053 fi
15054 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15055   conftest.$ac_objext conftest.beam conftest.$ac_ext
15056 fi
15057
15058 fi
15059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15060 $as_echo "$ac_cv_func_fork_works" >&6; }
15061
15062 else
15063   ac_cv_func_fork_works=$ac_cv_func_fork
15064 fi
15065 if test "x$ac_cv_func_fork_works" = xcross; then
15066   case $host in
15067     *-*-amigaos* | *-*-msdosdjgpp*)
15068       # Override, as these systems have only a dummy fork() stub
15069       ac_cv_func_fork_works=no
15070       ;;
15071     *)
15072       ac_cv_func_fork_works=yes
15073       ;;
15074   esac
15075   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15076 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15077 fi
15078 ac_cv_func_vfork_works=$ac_cv_func_vfork
15079 if test "x$ac_cv_func_vfork" = xyes; then
15080   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15081 $as_echo_n "checking for working vfork... " >&6; }
15082 if ${ac_cv_func_vfork_works+:} false; then :
15083   $as_echo_n "(cached) " >&6
15084 else
15085   if test "$cross_compiling" = yes; then :
15086   ac_cv_func_vfork_works=cross
15087 else
15088   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15089 /* end confdefs.h.  */
15090 /* Thanks to Paul Eggert for this test.  */
15091 $ac_includes_default
15092 #include <sys/wait.h>
15093 #ifdef HAVE_VFORK_H
15094 # include <vfork.h>
15095 #endif
15096 /* On some sparc systems, changes by the child to local and incoming
15097    argument registers are propagated back to the parent.  The compiler
15098    is told about this with #include <vfork.h>, but some compilers
15099    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15100    static variable whose address is put into a register that is
15101    clobbered by the vfork.  */
15102 static void
15103 #ifdef __cplusplus
15104 sparc_address_test (int arg)
15105 # else
15106 sparc_address_test (arg) int arg;
15107 #endif
15108 {
15109   static pid_t child;
15110   if (!child) {
15111     child = vfork ();
15112     if (child < 0) {
15113       perror ("vfork");
15114       _exit(2);
15115     }
15116     if (!child) {
15117       arg = getpid();
15118       write(-1, "", 0);
15119       _exit (arg);
15120     }
15121   }
15122 }
15123
15124 int
15125 main ()
15126 {
15127   pid_t parent = getpid ();
15128   pid_t child;
15129
15130   sparc_address_test (0);
15131
15132   child = vfork ();
15133
15134   if (child == 0) {
15135     /* Here is another test for sparc vfork register problems.  This
15136        test uses lots of local variables, at least as many local
15137        variables as main has allocated so far including compiler
15138        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15139        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15140        reuse the register of parent for one of the local variables,
15141        since it will think that parent can't possibly be used any more
15142        in this routine.  Assigning to the local variable will thus
15143        munge parent in the parent process.  */
15144     pid_t
15145       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15146       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15147     /* Convince the compiler that p..p7 are live; otherwise, it might
15148        use the same hardware register for all 8 local variables.  */
15149     if (p != p1 || p != p2 || p != p3 || p != p4
15150         || p != p5 || p != p6 || p != p7)
15151       _exit(1);
15152
15153     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15154        from child file descriptors.  If the child closes a descriptor
15155        before it execs or exits, this munges the parent's descriptor
15156        as well.  Test for this by closing stdout in the child.  */
15157     _exit(close(fileno(stdout)) != 0);
15158   } else {
15159     int status;
15160     struct stat st;
15161
15162     while (wait(&status) != child)
15163       ;
15164     return (
15165          /* Was there some problem with vforking?  */
15166          child < 0
15167
15168          /* Did the child fail?  (This shouldn't happen.)  */
15169          || status
15170
15171          /* Did the vfork/compiler bug occur?  */
15172          || parent != getpid()
15173
15174          /* Did the file descriptor bug occur?  */
15175          || fstat(fileno(stdout), &st) != 0
15176          );
15177   }
15178 }
15179 _ACEOF
15180 if ac_fn_c_try_run "$LINENO"; then :
15181   ac_cv_func_vfork_works=yes
15182 else
15183   ac_cv_func_vfork_works=no
15184 fi
15185 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15186   conftest.$ac_objext conftest.beam conftest.$ac_ext
15187 fi
15188
15189 fi
15190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15191 $as_echo "$ac_cv_func_vfork_works" >&6; }
15192
15193 fi;
15194 if test "x$ac_cv_func_fork_works" = xcross; then
15195   ac_cv_func_vfork_works=$ac_cv_func_vfork
15196   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15197 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15198 fi
15199
15200 if test "x$ac_cv_func_vfork_works" = xyes; then
15201
15202 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15203
15204 else
15205
15206 $as_echo "#define vfork fork" >>confdefs.h
15207
15208 fi
15209 if test "x$ac_cv_func_fork_works" = xyes; then
15210
15211 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15212
15213 fi
15214
15215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
15216 $as_echo_n "checking return type of signal handlers... " >&6; }
15217 if ${ac_cv_type_signal+:} false; then :
15218   $as_echo_n "(cached) " >&6
15219 else
15220   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15221 /* end confdefs.h.  */
15222 #include <sys/types.h>
15223 #include <signal.h>
15224
15225 int
15226 main ()
15227 {
15228 return *(signal (0, 0)) (0) == 1;
15229   ;
15230   return 0;
15231 }
15232 _ACEOF
15233 if ac_fn_c_try_compile "$LINENO"; then :
15234   ac_cv_type_signal=int
15235 else
15236   ac_cv_type_signal=void
15237 fi
15238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15239 fi
15240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
15241 $as_echo "$ac_cv_type_signal" >&6; }
15242
15243 cat >>confdefs.h <<_ACEOF
15244 #define RETSIGTYPE $ac_cv_type_signal
15245 _ACEOF
15246
15247
15248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15249 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15250 if ${ac_cv_sys_largefile_source+:} false; then :
15251   $as_echo_n "(cached) " >&6
15252 else
15253   while :; do
15254   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15255 /* end confdefs.h.  */
15256 #include <sys/types.h> /* for off_t */
15257      #include <stdio.h>
15258 int
15259 main ()
15260 {
15261 int (*fp) (FILE *, off_t, int) = fseeko;
15262      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15263   ;
15264   return 0;
15265 }
15266 _ACEOF
15267 if ac_fn_c_try_link "$LINENO"; then :
15268   ac_cv_sys_largefile_source=no; break
15269 fi
15270 rm -f core conftest.err conftest.$ac_objext \
15271     conftest$ac_exeext conftest.$ac_ext
15272   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15273 /* end confdefs.h.  */
15274 #define _LARGEFILE_SOURCE 1
15275 #include <sys/types.h> /* for off_t */
15276      #include <stdio.h>
15277 int
15278 main ()
15279 {
15280 int (*fp) (FILE *, off_t, int) = fseeko;
15281      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15282   ;
15283   return 0;
15284 }
15285 _ACEOF
15286 if ac_fn_c_try_link "$LINENO"; then :
15287   ac_cv_sys_largefile_source=1; break
15288 fi
15289 rm -f core conftest.err conftest.$ac_objext \
15290     conftest$ac_exeext conftest.$ac_ext
15291   ac_cv_sys_largefile_source=unknown
15292   break
15293 done
15294 fi
15295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15296 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15297 case $ac_cv_sys_largefile_source in #(
15298   no | unknown) ;;
15299   *)
15300 cat >>confdefs.h <<_ACEOF
15301 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15302 _ACEOF
15303 ;;
15304 esac
15305 rm -rf conftest*
15306
15307 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15308 # in glibc 2.1.3, but that breaks too many other things.
15309 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15310 if test $ac_cv_sys_largefile_source != unknown; then
15311
15312 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15313
15314 fi
15315
15316
15317 # Check whether --enable-largefile was given.
15318 if test "${enable_largefile+set}" = set; then :
15319   enableval=$enable_largefile;
15320 fi
15321
15322 if test "$enable_largefile" != no; then
15323
15324   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15325 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15326 if ${ac_cv_sys_largefile_CC+:} false; then :
15327   $as_echo_n "(cached) " >&6
15328 else
15329   ac_cv_sys_largefile_CC=no
15330      if test "$GCC" != yes; then
15331        ac_save_CC=$CC
15332        while :; do
15333          # IRIX 6.2 and later do not support large files by default,
15334          # so use the C compiler's -n32 option if that helps.
15335          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15336 /* end confdefs.h.  */
15337 #include <sys/types.h>
15338  /* Check that off_t can represent 2**63 - 1 correctly.
15339     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15340     since some C++ compilers masquerading as C compilers
15341     incorrectly reject 9223372036854775807.  */
15342 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15343   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15344                        && LARGE_OFF_T % 2147483647 == 1)
15345                       ? 1 : -1];
15346 int
15347 main ()
15348 {
15349
15350   ;
15351   return 0;
15352 }
15353 _ACEOF
15354          if ac_fn_c_try_compile "$LINENO"; then :
15355   break
15356 fi
15357 rm -f core conftest.err conftest.$ac_objext
15358          CC="$CC -n32"
15359          if ac_fn_c_try_compile "$LINENO"; then :
15360   ac_cv_sys_largefile_CC=' -n32'; break
15361 fi
15362 rm -f core conftest.err conftest.$ac_objext
15363          break
15364        done
15365        CC=$ac_save_CC
15366        rm -f conftest.$ac_ext
15367     fi
15368 fi
15369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15370 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15371   if test "$ac_cv_sys_largefile_CC" != no; then
15372     CC=$CC$ac_cv_sys_largefile_CC
15373   fi
15374
15375   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15376 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15377 if ${ac_cv_sys_file_offset_bits+:} false; then :
15378   $as_echo_n "(cached) " >&6
15379 else
15380   while :; do
15381   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15382 /* end confdefs.h.  */
15383 #include <sys/types.h>
15384  /* Check that off_t can represent 2**63 - 1 correctly.
15385     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15386     since some C++ compilers masquerading as C compilers
15387     incorrectly reject 9223372036854775807.  */
15388 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15389   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15390                        && LARGE_OFF_T % 2147483647 == 1)
15391                       ? 1 : -1];
15392 int
15393 main ()
15394 {
15395
15396   ;
15397   return 0;
15398 }
15399 _ACEOF
15400 if ac_fn_c_try_compile "$LINENO"; then :
15401   ac_cv_sys_file_offset_bits=no; break
15402 fi
15403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15404   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15405 /* end confdefs.h.  */
15406 #define _FILE_OFFSET_BITS 64
15407 #include <sys/types.h>
15408  /* Check that off_t can represent 2**63 - 1 correctly.
15409     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15410     since some C++ compilers masquerading as C compilers
15411     incorrectly reject 9223372036854775807.  */
15412 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15413   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15414                        && LARGE_OFF_T % 2147483647 == 1)
15415                       ? 1 : -1];
15416 int
15417 main ()
15418 {
15419
15420   ;
15421   return 0;
15422 }
15423 _ACEOF
15424 if ac_fn_c_try_compile "$LINENO"; then :
15425   ac_cv_sys_file_offset_bits=64; break
15426 fi
15427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15428   ac_cv_sys_file_offset_bits=unknown
15429   break
15430 done
15431 fi
15432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15433 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15434 case $ac_cv_sys_file_offset_bits in #(
15435   no | unknown) ;;
15436   *)
15437 cat >>confdefs.h <<_ACEOF
15438 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15439 _ACEOF
15440 ;;
15441 esac
15442 rm -rf conftest*
15443   if test $ac_cv_sys_file_offset_bits = unknown; then
15444     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15445 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15446 if ${ac_cv_sys_large_files+:} false; then :
15447   $as_echo_n "(cached) " >&6
15448 else
15449   while :; do
15450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15451 /* end confdefs.h.  */
15452 #include <sys/types.h>
15453  /* Check that off_t can represent 2**63 - 1 correctly.
15454     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15455     since some C++ compilers masquerading as C compilers
15456     incorrectly reject 9223372036854775807.  */
15457 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15458   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15459                        && LARGE_OFF_T % 2147483647 == 1)
15460                       ? 1 : -1];
15461 int
15462 main ()
15463 {
15464
15465   ;
15466   return 0;
15467 }
15468 _ACEOF
15469 if ac_fn_c_try_compile "$LINENO"; then :
15470   ac_cv_sys_large_files=no; break
15471 fi
15472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15473   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15474 /* end confdefs.h.  */
15475 #define _LARGE_FILES 1
15476 #include <sys/types.h>
15477  /* Check that off_t can represent 2**63 - 1 correctly.
15478     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15479     since some C++ compilers masquerading as C compilers
15480     incorrectly reject 9223372036854775807.  */
15481 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15482   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15483                        && LARGE_OFF_T % 2147483647 == 1)
15484                       ? 1 : -1];
15485 int
15486 main ()
15487 {
15488
15489   ;
15490   return 0;
15491 }
15492 _ACEOF
15493 if ac_fn_c_try_compile "$LINENO"; then :
15494   ac_cv_sys_large_files=1; break
15495 fi
15496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15497   ac_cv_sys_large_files=unknown
15498   break
15499 done
15500 fi
15501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15502 $as_echo "$ac_cv_sys_large_files" >&6; }
15503 case $ac_cv_sys_large_files in #(
15504   no | unknown) ;;
15505   *)
15506 cat >>confdefs.h <<_ACEOF
15507 #define _LARGE_FILES $ac_cv_sys_large_files
15508 _ACEOF
15509 ;;
15510 esac
15511 rm -rf conftest*
15512   fi
15513
15514
15515 fi
15516
15517
15518
15519
15520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
15521 $as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
15522 cache=_D_LARGEFILE_SOURCE_1
15523 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
15524   $as_echo_n "(cached) " >&6
15525 else
15526
15527 echo '
15528 #include <stdio.h>
15529 int test() {
15530         int a = fseeko(stdin, 0, 0);
15531         return a;
15532 }
15533 ' > conftest.c
15534 echo 'void f(){}' >>conftest.c
15535 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
15536 eval "cv_prog_cc_flag_needed_$cache=no"
15537 else
15538
15539 if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
15540 eval "cv_prog_cc_flag_needed_$cache=yes"
15541 else
15542 eval "cv_prog_cc_flag_needed_$cache=fail"
15543 #echo 'Test with flag fails too!'
15544 #cat conftest.c
15545 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15546 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15547 #exit 1
15548 fi
15549
15550 fi
15551 rm -f conftest conftest.c conftest.o
15552
15553 fi
15554
15555 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
15556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15557 $as_echo "yes" >&6; }
15558 :
15559 CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
15560 else
15561 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
15562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15563 $as_echo "no" >&6; }
15564 #echo 'Test with flag is no!'
15565 #cat conftest.c
15566 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15567 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15568 #exit 1
15569 :
15570
15571 else
15572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15573 $as_echo "failed" >&6; }
15574 :
15575
15576 fi
15577 fi
15578
15579
15580
15581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
15582 $as_echo_n "checking if nonblocking sockets work... " >&6; }
15583 if echo $target | grep mingw32 >/dev/null; then
15584         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
15585 $as_echo "no (windows)" >&6; }
15586
15587 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15588
15589 else
15590 if test "$cross_compiling" = yes; then :
15591
15592         { $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
15593 $as_echo "crosscompile(yes)" >&6; }
15594
15595 else
15596   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15597 /* end confdefs.h.  */
15598
15599
15600 #include <stdio.h>
15601 #include <string.h>
15602 #include <stdlib.h>
15603 #include <fcntl.h>
15604 #include <errno.h>
15605 #ifdef HAVE_SYS_TYPES_H
15606 #include <sys/types.h>
15607 #endif
15608 #ifdef HAVE_SYS_SOCKET_H
15609 #include <sys/socket.h>
15610 #endif
15611 #ifdef HAVE_NETINET_IN_H
15612 #include <netinet/in.h>
15613 #endif
15614 #ifdef HAVE_ARPA_INET_H
15615 #include <arpa/inet.h>
15616 #endif
15617 #ifdef HAVE_UNISTD_H
15618 #include <unistd.h>
15619 #endif
15620 #ifdef HAVE_TIME_H
15621 #include <time.h>
15622 #endif
15623
15624 int main(void)
15625 {
15626         int port;
15627         int sfd, cfd;
15628         int num = 10;
15629         int i, p;
15630         struct sockaddr_in a;
15631         /* test if select and nonblocking reads work well together */
15632         /* open port.
15633            fork child to send 10 messages.
15634            select to read.
15635            then try to nonblocking read the 10 messages
15636            then, nonblocking read must give EAGAIN
15637         */
15638
15639         port = 12345 + (time(0)%32);
15640         sfd = socket(PF_INET, SOCK_DGRAM, 0);
15641         if(sfd == -1) {
15642                 perror("socket");
15643                 return 1;
15644         }
15645         memset(&a, 0, sizeof(a));
15646         a.sin_family = AF_INET;
15647         a.sin_port = htons(port);
15648         a.sin_addr.s_addr = inet_addr("127.0.0.1");
15649         if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15650                 perror("bind");
15651                 return 1;
15652         }
15653         if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
15654                 perror("fcntl");
15655                 return 1;
15656         }
15657
15658         cfd = socket(PF_INET, SOCK_DGRAM, 0);
15659         if(cfd == -1) {
15660                 perror("client socket");
15661                 return 1;
15662         }
15663         a.sin_port = 0;
15664         if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15665                 perror("client bind");
15666                 return 1;
15667         }
15668         a.sin_port = htons(port);
15669
15670         /* no handler, causes exit in 10 seconds */
15671         alarm(10);
15672
15673         /* send and receive on the socket */
15674         if((p=fork()) == 0) {
15675                 for(i=0; i<num; i++) {
15676                         if(sendto(cfd, &i, sizeof(i), 0,
15677                                 (struct sockaddr*)&a, sizeof(a)) < 0) {
15678                                 perror("sendto");
15679                                 return 1;
15680                         }
15681                 }
15682         } else {
15683                 /* parent */
15684                 fd_set rset;
15685                 int x;
15686                 if(p == -1) {
15687                         perror("fork");
15688                         return 1;
15689                 }
15690                 FD_ZERO(&rset);
15691                 FD_SET(sfd, &rset);
15692                 if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
15693                         perror("select");
15694                         return 1;
15695                 }
15696                 i = 0;
15697                 while(i < num) {
15698                         if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
15699                                 if(errno == EAGAIN)
15700                                         continue;
15701                                 perror("recv");
15702                                 return 1;
15703                         }
15704                         i++;
15705                 }
15706                 /* now we want to get EAGAIN: nonblocking goodness */
15707                 errno = 0;
15708                 recv(sfd, &x, sizeof(x), 0);
15709                 if(errno != EAGAIN) {
15710                         perror("trying to recv again");
15711                         return 1;
15712                 }
15713                 /* EAGAIN encountered */
15714         }
15715
15716         close(sfd);
15717         close(cfd);
15718         return 0;
15719 }
15720
15721 _ACEOF
15722 if ac_fn_c_try_run "$LINENO"; then :
15723
15724         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15725 $as_echo "yes" >&6; }
15726
15727 else
15728
15729         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15730 $as_echo "no" >&6; }
15731
15732 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15733
15734
15735 fi
15736 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15737   conftest.$ac_objext conftest.beam conftest.$ac_ext
15738 fi
15739
15740 fi
15741
15742
15743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
15744 $as_echo_n "checking whether mkdir has one arg... " >&6; }
15745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15746 /* end confdefs.h.  */
15747
15748 #include <stdio.h>
15749 #include <unistd.h>
15750 #ifdef HAVE_WINSOCK2_H
15751 #include <winsock2.h>
15752 #endif
15753 #ifdef HAVE_SYS_STAT_H
15754 #include <sys/stat.h>
15755 #endif
15756
15757 int
15758 main ()
15759 {
15760
15761         (void)mkdir("directory");
15762
15763   ;
15764   return 0;
15765 }
15766 _ACEOF
15767 if ac_fn_c_try_compile "$LINENO"; then :
15768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15769 $as_echo "yes" >&6; }
15770
15771 $as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
15772
15773
15774 else
15775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15776 $as_echo "no" >&6; }
15777
15778 fi
15779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15780
15781 for ac_func in strptime
15782 do :
15783   ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
15784 if test "x$ac_cv_func_strptime" = xyes; then :
15785   cat >>confdefs.h <<_ACEOF
15786 #define HAVE_STRPTIME 1
15787 _ACEOF
15788
15789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
15790 $as_echo_n "checking whether strptime works... " >&6; }
15791 if test c${cross_compiling} = cno; then
15792 if test "$cross_compiling" = yes; then :
15793   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15794 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15795 as_fn_error $? "cannot run test program while cross compiling
15796 See \`config.log' for more details" "$LINENO" 5; }
15797 else
15798   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15799 /* end confdefs.h.  */
15800
15801 #define _XOPEN_SOURCE 600
15802 #include <time.h>
15803 int main(void) { struct tm tm; char *res;
15804 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);
15805 if (!res) return 2;
15806 res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
15807 if (!res) return 1; return 0; }
15808
15809 _ACEOF
15810 if ac_fn_c_try_run "$LINENO"; then :
15811   eval "ac_cv_c_strptime_works=yes"
15812 else
15813   eval "ac_cv_c_strptime_works=no"
15814 fi
15815 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15816   conftest.$ac_objext conftest.beam conftest.$ac_ext
15817 fi
15818
15819 else
15820 eval "ac_cv_c_strptime_works=maybe"
15821 fi
15822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
15823 $as_echo "$ac_cv_c_strptime_works" >&6; }
15824 if test $ac_cv_c_strptime_works = no; then
15825 case " $LIBOBJS " in
15826   *" strptime.$ac_objext "* ) ;;
15827   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15828  ;;
15829 esac
15830
15831 else
15832
15833 cat >>confdefs.h <<_ACEOF
15834 #define STRPTIME_WORKS 1
15835 _ACEOF
15836
15837 fi
15838
15839 else
15840   case " $LIBOBJS " in
15841   *" strptime.$ac_objext "* ) ;;
15842   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15843  ;;
15844 esac
15845
15846 fi
15847 done
15848
15849
15850 # set memory allocation checking if requested
15851 # Check whether --enable-alloc-checks was given.
15852 if test "${enable_alloc_checks+set}" = set; then :
15853   enableval=$enable_alloc_checks;
15854 fi
15855
15856 # Check whether --enable-alloc-lite was given.
15857 if test "${enable_alloc_lite+set}" = set; then :
15858   enableval=$enable_alloc_lite;
15859 fi
15860
15861 # Check whether --enable-alloc-nonregional was given.
15862 if test "${enable_alloc_nonregional+set}" = set; then :
15863   enableval=$enable_alloc_nonregional;
15864 fi
15865
15866 if test x_$enable_alloc_nonregional = x_yes; then
15867
15868 $as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
15869
15870 fi
15871 if test x_$enable_alloc_checks = x_yes; then
15872
15873 $as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
15874
15875 else
15876         if test x_$enable_alloc_lite = x_yes; then
15877
15878 $as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
15879
15880         else
15881
15882         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15883 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15884         if test "$cross_compiling" = yes; then :
15885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
15886 $as_echo "no (crosscompile)" >&6; }
15887         case " $LIBOBJS " in
15888   *" malloc.$ac_objext "* ) ;;
15889   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15890  ;;
15891 esac
15892
15893
15894 cat >>confdefs.h <<_ACEOF
15895 #define malloc rpl_malloc_unbound
15896 _ACEOF
15897
15898 else
15899   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15900 /* end confdefs.h.  */
15901 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
15902 #include <stdlib.h>
15903 #else
15904 char *malloc ();
15905 #endif
15906
15907 int
15908 main ()
15909 {
15910  if(malloc(0) != 0) return 1;
15911   ;
15912   return 0;
15913 }
15914
15915 _ACEOF
15916 if ac_fn_c_try_run "$LINENO"; then :
15917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15918 $as_echo "no" >&6; }
15919         case " $LIBOBJS " in
15920   *" malloc.$ac_objext "* ) ;;
15921   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15922  ;;
15923 esac
15924
15925
15926 cat >>confdefs.h <<_ACEOF
15927 #define malloc rpl_malloc_unbound
15928 _ACEOF
15929
15930 else
15931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15932 $as_echo "yes" >&6; }
15933
15934 $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
15935
15936 fi
15937 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15938   conftest.$ac_objext conftest.beam conftest.$ac_ext
15939 fi
15940
15941
15942         fi
15943 fi
15944
15945 # check windows threads (we use them, not pthreads, on windows).
15946 if test "$on_mingw" = "yes"; then
15947 # check windows threads
15948         for ac_header in windows.h
15949 do :
15950   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
15951 "
15952 if test "x$ac_cv_header_windows_h" = xyes; then :
15953   cat >>confdefs.h <<_ACEOF
15954 #define HAVE_WINDOWS_H 1
15955 _ACEOF
15956
15957 fi
15958
15959 done
15960
15961         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
15962 $as_echo_n "checking for CreateThread... " >&6; }
15963         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15964 /* end confdefs.h.  */
15965
15966 #ifdef HAVE_WINDOWS_H
15967 #include <windows.h>
15968 #endif
15969
15970 int
15971 main ()
15972 {
15973
15974         HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
15975
15976   ;
15977   return 0;
15978 }
15979 _ACEOF
15980 if ac_fn_c_try_compile "$LINENO"; then :
15981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15982 $as_echo "yes" >&6; }
15983
15984 $as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
15985
15986
15987 else
15988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15989 $as_echo "no" >&6; }
15990
15991 fi
15992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15993
15994 else
15995 # not on mingw, check thread libraries.
15996
15997 # check for thread library.
15998 # check this first, so that the pthread lib does not get linked in via
15999 # libssl or libpython, and thus distorts the tests, and we end up using
16000 # the non-threadsafe C libraries.
16001
16002 # Check whether --with-pthreads was given.
16003 if test "${with_pthreads+set}" = set; then :
16004   withval=$with_pthreads;
16005 else
16006    withval="yes"
16007 fi
16008
16009 ub_have_pthreads=no
16010 if test x_$withval != x_no; then
16011
16012
16013 ac_ext=c
16014 ac_cpp='$CPP $CPPFLAGS'
16015 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16016 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16017 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16018
16019 ax_pthread_ok=no
16020
16021 # We used to check for pthread.h first, but this fails if pthread.h
16022 # requires special compiler flags (e.g. on True64 or Sequent).
16023 # It gets checked for in the link test anyway.
16024
16025 # First of all, check if the user has set any of the PTHREAD_LIBS,
16026 # etcetera environment variables, and if threads linking works using
16027 # them:
16028 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16029         save_CFLAGS="$CFLAGS"
16030         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16031         save_LIBS="$LIBS"
16032         LIBS="$PTHREAD_LIBS $LIBS"
16033         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16034 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
16035         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16036 /* end confdefs.h.  */
16037
16038 /* Override any GCC internal prototype to avoid an error.
16039    Use char because int might match the return type of a GCC
16040    builtin and then its argument prototype would still apply.  */
16041 #ifdef __cplusplus
16042 extern "C"
16043 #endif
16044 char pthread_join ();
16045 int
16046 main ()
16047 {
16048 return pthread_join ();
16049   ;
16050   return 0;
16051 }
16052 _ACEOF
16053 if ac_fn_c_try_link "$LINENO"; then :
16054   ax_pthread_ok=yes
16055 fi
16056 rm -f core conftest.err conftest.$ac_objext \
16057     conftest$ac_exeext conftest.$ac_ext
16058         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16059 $as_echo "$ax_pthread_ok" >&6; }
16060         if test x"$ax_pthread_ok" = xno; then
16061                 PTHREAD_LIBS=""
16062                 PTHREAD_CFLAGS=""
16063         fi
16064         LIBS="$save_LIBS"
16065         CFLAGS="$save_CFLAGS"
16066 fi
16067
16068 # We must check for the threads library under a number of different
16069 # names; the ordering is very important because some systems
16070 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16071 # libraries is broken (non-POSIX).
16072
16073 # Create a list of thread flags to try.  Items starting with a "-" are
16074 # C compiler flags, and other items are library names, except for "none"
16075 # which indicates that we try without any flags at all, and "pthread-config"
16076 # which is a program returning the flags for the Pth emulation library.
16077
16078 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
16079
16080 # The ordering *is* (sometimes) important.  Some notes on the
16081 # individual items follow:
16082
16083 # pthreads: AIX (must check this before -lpthread)
16084 # none: in case threads are in libc; should be tried before -Kthread and
16085 #       other compiler flags to prevent continual compiler warnings
16086 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16087 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16088 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16089 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16090 # -pthreads: Solaris/gcc
16091 # -mthreads: Mingw32/gcc, Lynx/gcc
16092 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16093 #      doesn't hurt to check since this sometimes defines pthreads too;
16094 #      also defines -D_REENTRANT)
16095 #      ... -mt is also the pthreads flag for HP/aCC
16096 # pthread: Linux, etcetera
16097 # --thread-safe: KAI C++
16098 # pthread-config: use pthread-config program (for GNU Pth library)
16099
16100 case ${host_os} in
16101         solaris*)
16102
16103         # On Solaris (at least, for some versions), libc contains stubbed
16104         # (non-functional) versions of the pthreads routines, so link-based
16105         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
16106         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16107         # a function called by this macro, so we could check for that, but
16108         # who knows whether they'll stub that too in a future libc.)  So,
16109         # we'll just look for -pthreads and -lpthread first:
16110
16111         ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
16112         ;;
16113
16114         darwin*)
16115         ax_pthread_flags="-pthread $ax_pthread_flags"
16116         ;;
16117 esac
16118
16119 # Clang doesn't consider unrecognized options an error unless we specify
16120 # -Werror. We throw in some extra Clang-specific options to ensure that
16121 # this doesn't happen for GCC, which also accepts -Werror.
16122
16123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
16124 $as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
16125 save_CFLAGS="$CFLAGS"
16126 ax_pthread_extra_flags="-Werror"
16127 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
16128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16129 /* end confdefs.h.  */
16130 int foo(void);
16131 int
16132 main ()
16133 {
16134 foo()
16135   ;
16136   return 0;
16137 }
16138 _ACEOF
16139 if ac_fn_c_try_compile "$LINENO"; then :
16140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16141 $as_echo "yes" >&6; }
16142 else
16143   ax_pthread_extra_flags=
16144                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16145 $as_echo "no" >&6; }
16146 fi
16147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16148 CFLAGS="$save_CFLAGS"
16149
16150 if test x"$ax_pthread_ok" = xno; then
16151 for flag in $ax_pthread_flags; do
16152
16153         case $flag in
16154                 none)
16155                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
16156 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
16157                 ;;
16158
16159                 -*)
16160                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
16161 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
16162                 PTHREAD_CFLAGS="$flag"
16163                 ;;
16164
16165                 pthread-config)
16166                 # Extract the first word of "pthread-config", so it can be a program name with args.
16167 set dummy pthread-config; ac_word=$2
16168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16169 $as_echo_n "checking for $ac_word... " >&6; }
16170 if ${ac_cv_prog_ax_pthread_config+:} false; then :
16171   $as_echo_n "(cached) " >&6
16172 else
16173   if test -n "$ax_pthread_config"; then
16174   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
16175 else
16176 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16177 for as_dir in $PATH
16178 do
16179   IFS=$as_save_IFS
16180   test -z "$as_dir" && as_dir=.
16181     for ac_exec_ext in '' $ac_executable_extensions; do
16182   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16183     ac_cv_prog_ax_pthread_config="yes"
16184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16185     break 2
16186   fi
16187 done
16188   done
16189 IFS=$as_save_IFS
16190
16191   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
16192 fi
16193 fi
16194 ax_pthread_config=$ac_cv_prog_ax_pthread_config
16195 if test -n "$ax_pthread_config"; then
16196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
16197 $as_echo "$ax_pthread_config" >&6; }
16198 else
16199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16200 $as_echo "no" >&6; }
16201 fi
16202
16203
16204                 if test x"$ax_pthread_config" = xno; then continue; fi
16205                 PTHREAD_CFLAGS="`pthread-config --cflags`"
16206                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16207                 ;;
16208
16209                 *)
16210                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
16211 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
16212                 PTHREAD_LIBS="-l$flag"
16213                 ;;
16214         esac
16215
16216         save_LIBS="$LIBS"
16217         save_CFLAGS="$CFLAGS"
16218         LIBS="$PTHREAD_LIBS $LIBS"
16219         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
16220
16221         # Check for various functions.  We must include pthread.h,
16222         # since some functions may be macros.  (On the Sequent, we
16223         # need a special flag -Kthread to make this header compile.)
16224         # We check for pthread_join because it is in -lpthread on IRIX
16225         # while pthread_create is in libc.  We check for pthread_attr_init
16226         # due to DEC craziness with -lpthreads.  We check for
16227         # pthread_cleanup_push because it is one of the few pthread
16228         # functions on Solaris that doesn't have a non-functional libc stub.
16229         # We try pthread_create on general principles.
16230         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16231 /* end confdefs.h.  */
16232 #include <pthread.h>
16233                         static void routine(void *a) { *((int*)a) = 0; }
16234                         static void *start_routine(void *a) { return a; }
16235 int
16236 main ()
16237 {
16238 pthread_t th; pthread_attr_t attr;
16239                         pthread_create(&th, 0, start_routine, 0);
16240                         pthread_join(th, 0);
16241                         pthread_attr_init(&attr);
16242                         pthread_cleanup_push(routine, 0);
16243                         pthread_cleanup_pop(0) /* ; */
16244   ;
16245   return 0;
16246 }
16247 _ACEOF
16248 if ac_fn_c_try_link "$LINENO"; then :
16249   ax_pthread_ok=yes
16250 fi
16251 rm -f core conftest.err conftest.$ac_objext \
16252     conftest$ac_exeext conftest.$ac_ext
16253
16254         LIBS="$save_LIBS"
16255         CFLAGS="$save_CFLAGS"
16256
16257         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16258 $as_echo "$ax_pthread_ok" >&6; }
16259         if test "x$ax_pthread_ok" = xyes; then
16260                 break;
16261         fi
16262
16263         PTHREAD_LIBS=""
16264         PTHREAD_CFLAGS=""
16265 done
16266 fi
16267
16268 # Various other checks:
16269 if test "x$ax_pthread_ok" = xyes; then
16270         save_LIBS="$LIBS"
16271         LIBS="$PTHREAD_LIBS $LIBS"
16272         save_CFLAGS="$CFLAGS"
16273         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16274
16275         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
16276         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
16277 $as_echo_n "checking for joinable pthread attribute... " >&6; }
16278         attr_name=unknown
16279         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
16280             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16281 /* end confdefs.h.  */
16282 #include <pthread.h>
16283 int
16284 main ()
16285 {
16286 int attr = $attr; return attr /* ; */
16287   ;
16288   return 0;
16289 }
16290 _ACEOF
16291 if ac_fn_c_try_link "$LINENO"; then :
16292   attr_name=$attr; break
16293 fi
16294 rm -f core conftest.err conftest.$ac_objext \
16295     conftest$ac_exeext conftest.$ac_ext
16296         done
16297         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
16298 $as_echo "$attr_name" >&6; }
16299         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
16300
16301 cat >>confdefs.h <<_ACEOF
16302 #define PTHREAD_CREATE_JOINABLE $attr_name
16303 _ACEOF
16304
16305         fi
16306
16307         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
16308 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
16309         flag=no
16310         case ${host_os} in
16311             aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
16312             osf* | hpux*) flag="-D_REENTRANT";;
16313             solaris*)
16314             if test "$GCC" = "yes"; then
16315                 flag="-D_REENTRANT"
16316             else
16317                 # TODO: What about Clang on Solaris?
16318                 flag="-mt -D_REENTRANT"
16319             fi
16320             ;;
16321         esac
16322         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
16323 $as_echo "$flag" >&6; }
16324         if test "x$flag" != xno; then
16325             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16326         fi
16327
16328         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
16329 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
16330 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
16331   $as_echo_n "(cached) " >&6
16332 else
16333
16334                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16335 /* end confdefs.h.  */
16336 #include <pthread.h>
16337 int
16338 main ()
16339 {
16340 int i = PTHREAD_PRIO_INHERIT;
16341   ;
16342   return 0;
16343 }
16344 _ACEOF
16345 if ac_fn_c_try_link "$LINENO"; then :
16346   ax_cv_PTHREAD_PRIO_INHERIT=yes
16347 else
16348   ax_cv_PTHREAD_PRIO_INHERIT=no
16349 fi
16350 rm -f core conftest.err conftest.$ac_objext \
16351     conftest$ac_exeext conftest.$ac_ext
16352
16353 fi
16354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
16355 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
16356         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
16357
16358 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
16359
16360 fi
16361
16362         LIBS="$save_LIBS"
16363         CFLAGS="$save_CFLAGS"
16364
16365         # More AIX lossage: compile with *_r variant
16366         if test "x$GCC" != xyes; then
16367             case $host_os in
16368                 aix*)
16369                 case "x/$CC" in #(
16370   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
16371     #handle absolute path differently from PATH based program lookup
16372                    case "x$CC" in #(
16373   x/*) :
16374     if as_fn_executable_p ${CC}_r; then :
16375   PTHREAD_CC="${CC}_r"
16376 fi ;; #(
16377   *) :
16378     for ac_prog in ${CC}_r
16379 do
16380   # Extract the first word of "$ac_prog", so it can be a program name with args.
16381 set dummy $ac_prog; ac_word=$2
16382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16383 $as_echo_n "checking for $ac_word... " >&6; }
16384 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
16385   $as_echo_n "(cached) " >&6
16386 else
16387   if test -n "$PTHREAD_CC"; then
16388   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16389 else
16390 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16391 for as_dir in $PATH
16392 do
16393   IFS=$as_save_IFS
16394   test -z "$as_dir" && as_dir=.
16395     for ac_exec_ext in '' $ac_executable_extensions; do
16396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16397     ac_cv_prog_PTHREAD_CC="$ac_prog"
16398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16399     break 2
16400   fi
16401 done
16402   done
16403 IFS=$as_save_IFS
16404
16405 fi
16406 fi
16407 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16408 if test -n "$PTHREAD_CC"; then
16409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
16410 $as_echo "$PTHREAD_CC" >&6; }
16411 else
16412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16413 $as_echo "no" >&6; }
16414 fi
16415
16416
16417   test -n "$PTHREAD_CC" && break
16418 done
16419 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16420  ;;
16421 esac ;; #(
16422   *) :
16423      ;;
16424 esac
16425                 ;;
16426             esac
16427         fi
16428 fi
16429
16430 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16431
16432
16433
16434
16435
16436 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16437 if test x"$ax_pthread_ok" = xyes; then
16438
16439
16440 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
16441
16442                 LIBS="$PTHREAD_LIBS $LIBS"
16443                 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16444                 CC="$PTHREAD_CC"
16445                 ub_have_pthreads=yes
16446                 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
16447 "
16448 if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
16449
16450 cat >>confdefs.h <<_ACEOF
16451 #define HAVE_PTHREAD_SPINLOCK_T 1
16452 _ACEOF
16453
16454
16455 fi
16456 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
16457 "
16458 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
16459
16460 cat >>confdefs.h <<_ACEOF
16461 #define HAVE_PTHREAD_RWLOCK_T 1
16462 _ACEOF
16463
16464
16465 fi
16466
16467
16468                 if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
16469                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
16470 $as_echo_n "checking if -pthread unused during linking... " >&6; }
16471                 # catch clang warning 'argument unused during compilation'
16472                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16473 /* end confdefs.h.  */
16474 $ac_includes_default
16475
16476 int main(void) {return 0;}
16477
16478 _ACEOF
16479                 pthread_unused="yes"
16480                 # first compile
16481                 echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
16482                 $CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
16483                 if test $? = 0; then
16484                         # then link
16485                         echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
16486                         $CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
16487                         if test $? -ne 0; then
16488                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16489 $as_echo "yes" >&6; }
16490                                 CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
16491                                 PTHREAD_CFLAGS_ONLY="-pthread"
16492
16493                         else
16494                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16495 $as_echo "no" >&6; }
16496                         fi
16497                 else
16498                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16499 $as_echo "no" >&6; }
16500                 fi # endif cc successful
16501                 rm -f conftest conftest.c conftest.o
16502                 fi # endif -pthread in CFLAGS
16503
16504
16505         :
16506 else
16507         ax_pthread_ok=no
16508
16509 fi
16510 ac_ext=c
16511 ac_cpp='$CPP $CPPFLAGS'
16512 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16513 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16514 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16515
16516
16517 fi
16518
16519 # check solaris thread library
16520
16521 # Check whether --with-solaris-threads was given.
16522 if test "${with_solaris_threads+set}" = set; then :
16523   withval=$with_solaris_threads;
16524 else
16525    withval="no"
16526 fi
16527
16528 ub_have_sol_threads=no
16529 if test x_$withval != x_no; then
16530         if test x_$ub_have_pthreads != x_no; then
16531             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
16532 $as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
16533         else
16534         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
16535 $as_echo_n "checking for library containing thr_create... " >&6; }
16536 if ${ac_cv_search_thr_create+:} false; then :
16537   $as_echo_n "(cached) " >&6
16538 else
16539   ac_func_search_save_LIBS=$LIBS
16540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16541 /* end confdefs.h.  */
16542
16543 /* Override any GCC internal prototype to avoid an error.
16544    Use char because int might match the return type of a GCC
16545    builtin and then its argument prototype would still apply.  */
16546 #ifdef __cplusplus
16547 extern "C"
16548 #endif
16549 char thr_create ();
16550 int
16551 main ()
16552 {
16553 return thr_create ();
16554   ;
16555   return 0;
16556 }
16557 _ACEOF
16558 for ac_lib in '' thread; do
16559   if test -z "$ac_lib"; then
16560     ac_res="none required"
16561   else
16562     ac_res=-l$ac_lib
16563     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16564   fi
16565   if ac_fn_c_try_link "$LINENO"; then :
16566   ac_cv_search_thr_create=$ac_res
16567 fi
16568 rm -f core conftest.err conftest.$ac_objext \
16569     conftest$ac_exeext
16570   if ${ac_cv_search_thr_create+:} false; then :
16571   break
16572 fi
16573 done
16574 if ${ac_cv_search_thr_create+:} false; then :
16575
16576 else
16577   ac_cv_search_thr_create=no
16578 fi
16579 rm conftest.$ac_ext
16580 LIBS=$ac_func_search_save_LIBS
16581 fi
16582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
16583 $as_echo "$ac_cv_search_thr_create" >&6; }
16584 ac_res=$ac_cv_search_thr_create
16585 if test "$ac_res" != no; then :
16586   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16587
16588
16589 $as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
16590
16591
16592
16593
16594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
16595 $as_echo_n "checking whether $CC supports -mt... " >&6; }
16596 cache=`echo mt | sed 'y%.=/+-%___p_%'`
16597 if eval \${cv_prog_cc_flag_$cache+:} false; then :
16598   $as_echo_n "(cached) " >&6
16599 else
16600
16601 echo 'void f(void){}' >conftest.c
16602 if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
16603 eval "cv_prog_cc_flag_$cache=yes"
16604 else
16605 eval "cv_prog_cc_flag_$cache=no"
16606 fi
16607 rm -f conftest conftest.o conftest.c
16608
16609 fi
16610
16611 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
16612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16613 $as_echo "yes" >&6; }
16614 :
16615 CFLAGS="$CFLAGS -mt"
16616 else
16617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16618 $as_echo "no" >&6; }
16619 :
16620 CFLAGS="$CFLAGS -D_REENTRANT"
16621 fi
16622
16623                 ub_have_sol_threads=yes
16624
16625 else
16626
16627                 as_fn_error $? "no solaris threads found." "$LINENO" 5
16628
16629 fi
16630
16631         fi
16632 fi
16633
16634 fi # end of non-mingw check of thread libraries
16635
16636 # Check for PyUnbound
16637
16638 # Check whether --with-pyunbound was given.
16639 if test "${with_pyunbound+set}" = set; then :
16640   withval=$with_pyunbound;
16641 else
16642    withval="no"
16643 fi
16644
16645
16646 ub_test_python=no
16647 ub_with_pyunbound=no
16648 if test x_$withval != x_no; then
16649    ub_with_pyunbound=yes
16650    ub_test_python=yes
16651 fi
16652
16653 # Check for Python module
16654
16655 # Check whether --with-pythonmodule was given.
16656 if test "${with_pythonmodule+set}" = set; then :
16657   withval=$with_pythonmodule;
16658 else
16659    withval="no"
16660 fi
16661
16662
16663 ub_with_pythonmod=no
16664 if test x_$withval != x_no; then
16665    ub_with_pythonmod=yes
16666    ub_test_python=yes
16667 fi
16668
16669 # Check for Python & SWIG only on PyUnbound or PyModule
16670 if test x_$ub_test_python != x_no; then
16671
16672    # Check for Python
16673    ub_have_python=no
16674    ac_save_LIBS="$LIBS"
16675         #
16676         # Allow the use of a (user set) custom python version
16677         #
16678
16679
16680         # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
16681 set dummy python$PYTHON_VERSION; ac_word=$2
16682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16683 $as_echo_n "checking for $ac_word... " >&6; }
16684 if ${ac_cv_path_PYTHON+:} false; then :
16685   $as_echo_n "(cached) " >&6
16686 else
16687   case $PYTHON in
16688   [\\/]* | ?:[\\/]*)
16689   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
16690   ;;
16691   *)
16692   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16693 for as_dir in $PATH
16694 do
16695   IFS=$as_save_IFS
16696   test -z "$as_dir" && as_dir=.
16697     for ac_exec_ext in '' $ac_executable_extensions; do
16698   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16699     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
16700     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16701     break 2
16702   fi
16703 done
16704   done
16705 IFS=$as_save_IFS
16706
16707   ;;
16708 esac
16709 fi
16710 PYTHON=$ac_cv_path_PYTHON
16711 if test -n "$PYTHON"; then
16712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
16713 $as_echo "$PYTHON" >&6; }
16714 else
16715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16716 $as_echo "no" >&6; }
16717 fi
16718
16719
16720         if test -z "$PYTHON"; then
16721            as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
16722            PYTHON_VERSION=""
16723         fi
16724
16725         if test -z "$PYTHON_VERSION"; then
16726                 PYTHON_VERSION=`$PYTHON -c "import sys; \
16727                         print(sys.version.split()[0])"`
16728         fi
16729
16730         #
16731         # Check if you have distutils, else fail
16732         #
16733         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
16734 $as_echo_n "checking for the distutils Python package... " >&6; }
16735         if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then
16736                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16737 $as_echo "yes" >&6; }
16738         else
16739                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16740 $as_echo "no" >&6; }
16741                 as_fn_error $? "cannot import Python module \"distutils\".
16742 Please check your Python installation. The error was:
16743 $ac_distutils_result" "$LINENO" 5
16744                 PYTHON_VERSION=""
16745         fi
16746
16747         #
16748         # Check for Python include path
16749         #
16750         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
16751 $as_echo_n "checking for Python include path... " >&6; }
16752         if test -z "$PYTHON_CPPFLAGS"; then
16753                 python_path=`$PYTHON -c "import distutils.sysconfig; \
16754                         print(distutils.sysconfig.get_python_inc());"`
16755                 if test -n "${python_path}"; then
16756                         python_path="-I$python_path"
16757                 fi
16758                 PYTHON_CPPFLAGS=$python_path
16759         fi
16760         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
16761 $as_echo "$PYTHON_CPPFLAGS" >&6; }
16762
16763
16764         #
16765         # Check for Python library path
16766         #
16767         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
16768 $as_echo_n "checking for Python library path... " >&6; }
16769         if test -z "$PYTHON_LDFLAGS"; then
16770                 PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
16771                         print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
16772         fi
16773         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
16774 $as_echo "$PYTHON_LDFLAGS" >&6; }
16775
16776
16777         #
16778         # Check for site packages
16779         #
16780         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
16781 $as_echo_n "checking for Python site-packages path... " >&6; }
16782         if test -z "$PYTHON_SITE_PKG"; then
16783                 PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
16784                         print(distutils.sysconfig.get_python_lib(1,0));"`
16785         fi
16786         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
16787 $as_echo "$PYTHON_SITE_PKG" >&6; }
16788
16789
16790         #
16791         # final check to see if everything compiles alright
16792         #
16793         { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
16794 $as_echo_n "checking consistency of all components of python development environment... " >&6; }
16795         ac_ext=c
16796 ac_cpp='$CPP $CPPFLAGS'
16797 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16798 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16799 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16800
16801         # save current global flags
16802         ac_save_LIBS="$LIBS"
16803         ac_save_CPPFLAGS="$CPPFLAGS"
16804
16805         LIBS="$LIBS $PYTHON_LDFLAGS"
16806         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16807         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16808 /* end confdefs.h.  */
16809
16810                 #include <Python.h>
16811
16812 int
16813 main ()
16814 {
16815
16816                 Py_Initialize();
16817
16818   ;
16819   return 0;
16820 }
16821 _ACEOF
16822 if ac_fn_c_try_link "$LINENO"; then :
16823   pythonexists=yes
16824 else
16825   pythonexists=no
16826 fi
16827 rm -f core conftest.err conftest.$ac_objext \
16828     conftest$ac_exeext conftest.$ac_ext
16829
16830         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
16831 $as_echo "$pythonexists" >&6; }
16832
16833         if test ! "$pythonexists" = "yes"; then
16834            as_fn_error $? "
16835   Could not link test program to Python. Maybe the main Python library has been
16836   installed in some non-standard library path. If so, pass it to configure,
16837   via the LDFLAGS environment variable.
16838   Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
16839   ============================================================================
16840    ERROR!
16841    You probably have to install the development version of the Python package
16842    for your distribution.  The exact name of this package varies among them.
16843   ============================================================================
16844            " "$LINENO" 5
16845           PYTHON_VERSION=""
16846         fi
16847         ac_ext=c
16848 ac_cpp='$CPP $CPPFLAGS'
16849 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16850 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16851 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16852
16853         # turn back to default flags
16854         CPPFLAGS="$ac_save_CPPFLAGS"
16855         LIBS="$ac_save_LIBS"
16856
16857         #
16858         # all done!
16859         #
16860
16861    if test ! -z "$PYTHON_VERSION"; then
16862         if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
16863                 as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
16864         fi
16865
16866       PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
16867
16868       # Have Python
16869
16870 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
16871
16872       LIBS="$PYTHON_LDFLAGS $LIBS"
16873       CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16874       ub_have_python=yes
16875       PC_PY_DEPENDENCY="python"
16876
16877
16878       # Check for SWIG
16879       ub_have_swig=no
16880
16881         # Extract the first word of "swig", so it can be a program name with args.
16882 set dummy swig; ac_word=$2
16883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16884 $as_echo_n "checking for $ac_word... " >&6; }
16885 if ${ac_cv_path_SWIG+:} false; then :
16886   $as_echo_n "(cached) " >&6
16887 else
16888   case $SWIG in
16889   [\\/]* | ?:[\\/]*)
16890   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
16891   ;;
16892   *)
16893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16894 for as_dir in $PATH
16895 do
16896   IFS=$as_save_IFS
16897   test -z "$as_dir" && as_dir=.
16898     for ac_exec_ext in '' $ac_executable_extensions; do
16899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16900     ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
16901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16902     break 2
16903   fi
16904 done
16905   done
16906 IFS=$as_save_IFS
16907
16908   ;;
16909 esac
16910 fi
16911 SWIG=$ac_cv_path_SWIG
16912 if test -n "$SWIG"; then
16913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
16914 $as_echo "$SWIG" >&6; }
16915 else
16916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16917 $as_echo "no" >&6; }
16918 fi
16919
16920
16921         if test -z "$SWIG" ; then
16922                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
16923 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
16924                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
16925         elif test -n "2.0.1" ; then
16926                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
16927 $as_echo_n "checking for SWIG version... " >&6; }
16928                 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'`
16929                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
16930 $as_echo "$swig_version" >&6; }
16931                 if test -n "$swig_version" ; then
16932                         # Calculate the required version number components
16933                         required=2.0.1
16934                         required_major=`echo $required | sed 's/[^0-9].*//'`
16935                         if test -z "$required_major" ; then
16936                                 required_major=0
16937                         fi
16938                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
16939                         required_minor=`echo $required | sed 's/[^0-9].*//'`
16940                         if test -z "$required_minor" ; then
16941                                 required_minor=0
16942                         fi
16943                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
16944                         required_patch=`echo $required | sed 's/[^0-9].*//'`
16945                         if test -z "$required_patch" ; then
16946                                 required_patch=0
16947                         fi
16948                         # Calculate the available version number components
16949                         available=$swig_version
16950                         available_major=`echo $available | sed 's/[^0-9].*//'`
16951                         if test -z "$available_major" ; then
16952                                 available_major=0
16953                         fi
16954                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
16955                         available_minor=`echo $available | sed 's/[^0-9].*//'`
16956                         if test -z "$available_minor" ; then
16957                                 available_minor=0
16958                         fi
16959                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
16960                         available_patch=`echo $available | sed 's/[^0-9].*//'`
16961                         if test -z "$available_patch" ; then
16962                                 available_patch=0
16963                         fi
16964                         badversion=0
16965                         if test $available_major -lt $required_major ; then
16966                                 badversion=1
16967                         fi
16968                         if test $available_major -eq $required_major \
16969                                 -a $available_minor -lt $required_minor ; then
16970                                 badversion=1
16971                         fi
16972                         if test $available_major -eq $required_major \
16973                                 -a $available_minor -eq $required_minor \
16974                                 -a $available_patch -lt $required_patch ; then
16975                                 badversion=1
16976                         fi
16977                         if test $badversion -eq 1 ; then
16978                                 { $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
16979 $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;}
16980                                 SWIG='echo "Error: SWIG version >= 2.0.1 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
16981                         else
16982                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
16983 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
16984                                 SWIG_LIB=`$SWIG -swiglib`
16985                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
16986 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
16987                         fi
16988                 else
16989                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
16990 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
16991                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
16992                 fi
16993         fi
16994
16995
16996       { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
16997 $as_echo_n "checking SWIG... " >&6; }
16998       if test ! -x "$SWIG"; then
16999          as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
17000       else
17001
17002 $as_echo "#define HAVE_SWIG 1" >>confdefs.h
17003
17004          swig="$SWIG"
17005
17006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
17007 $as_echo "present" >&6; }
17008
17009          # If have Python & SWIG
17010          # Declare PythonMod
17011          if test x_$ub_with_pythonmod != x_no; then
17012
17013 $as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
17014
17015             WITH_PYTHONMODULE=yes
17016
17017             PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
17018
17019             PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
17020
17021             PYTHONMOD_INSTALL=pythonmod-install
17022
17023             PYTHONMOD_UNINSTALL=pythonmod-uninstall
17024
17025          fi
17026
17027          # Declare PyUnbound
17028          if test x_$ub_with_pyunbound != x_no; then
17029
17030 $as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
17031
17032             WITH_PYUNBOUND=yes
17033
17034             PYUNBOUND_OBJ="libunbound_wrap.lo"
17035
17036             PYUNBOUND_TARGET="_unbound.la"
17037
17038             PYUNBOUND_INSTALL=pyunbound-install
17039
17040             PYUNBOUND_UNINSTALL=pyunbound-uninstall
17041
17042          fi
17043       fi
17044    else
17045       { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
17046 $as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
17047       ub_with_pyunbound=no
17048       ub_with_pythonmod=no
17049    fi
17050 fi
17051
17052 if test "`uname`" = "NetBSD"; then
17053         NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
17054
17055 fi
17056 CONFIG_DATE=`date +%Y%m%d`
17057
17058
17059 # Checks for libraries.
17060
17061 # libnss
17062 USE_NSS="no"
17063
17064 # Check whether --with-nss was given.
17065 if test "${with_nss+set}" = set; then :
17066   withval=$with_nss;
17067         USE_NSS="yes"
17068
17069 $as_echo "#define HAVE_NSS 1" >>confdefs.h
17070
17071         if test "$withval" != "" -a "$withval" != "yes"; then
17072                 CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
17073                 LDFLAGS="$LDFLAGS -L$withval/lib"
17074
17075         if test "x$enable_rpath" = xyes; then
17076                 if echo "$withval/lib" | grep "^/" >/dev/null; then
17077                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17078                 fi
17079         fi
17080
17081                 CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
17082         else
17083                 CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
17084                 CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
17085         fi
17086         LIBS="$LIBS -lnss3 -lnspr4"
17087         SSLLIB=""
17088
17089
17090 fi
17091
17092
17093 # libnettle
17094 USE_NETTLE="no"
17095
17096 # Check whether --with-nettle was given.
17097 if test "${with_nettle+set}" = set; then :
17098   withval=$with_nettle;
17099         USE_NETTLE="yes"
17100
17101 $as_echo "#define HAVE_NETTLE 1" >>confdefs.h
17102
17103         for ac_header in nettle/dsa-compat.h
17104 do :
17105   ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
17106 "
17107 if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then :
17108   cat >>confdefs.h <<_ACEOF
17109 #define HAVE_NETTLE_DSA_COMPAT_H 1
17110 _ACEOF
17111
17112 fi
17113
17114 done
17115
17116         if test "$withval" != "" -a "$withval" != "yes"; then
17117                 CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
17118                 LDFLAGS="$LDFLAGS -L$withval/lib"
17119
17120         if test "x$enable_rpath" = xyes; then
17121                 if echo "$withval/lib" | grep "^/" >/dev/null; then
17122                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17123                 fi
17124         fi
17125
17126         else
17127                 CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
17128         fi
17129         LIBS="$LIBS -lhogweed -lnettle -lgmp"
17130         SSLLIB=""
17131
17132
17133 fi
17134
17135
17136 # openssl
17137 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17138
17139
17140 # Check whether --with-ssl was given.
17141 if test "${with_ssl+set}" = set; then :
17142   withval=$with_ssl;
17143
17144 else
17145
17146             withval="yes"
17147
17148 fi
17149
17150     if test x_$withval = x_no; then
17151         as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
17152     fi
17153
17154     withval=$withval
17155     if test x_$withval != x_no; then
17156         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
17157 $as_echo_n "checking for SSL... " >&6; }
17158         if test x_$withval = x_ -o x_$withval = x_yes; then
17159             withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
17160         fi
17161         for dir in $withval; do
17162             ssldir="$dir"
17163             if test -f "$dir/include/openssl/ssl.h"; then
17164                 found_ssl="yes"
17165
17166 cat >>confdefs.h <<_ACEOF
17167 #define HAVE_SSL /**/
17168 _ACEOF
17169
17170                                 if test "$ssldir" != "/usr"; then
17171                         CPPFLAGS="$CPPFLAGS -I$ssldir/include"
17172                         LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
17173                 fi
17174                 break;
17175             fi
17176         done
17177         if test x_$found_ssl != x_yes; then
17178             as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
17179         else
17180             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
17181 $as_echo "found in $ssldir" >&6; }
17182             HAVE_SSL=yes
17183                         if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
17184                 LDFLAGS="$LDFLAGS -L$ssldir/lib"
17185                 LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
17186
17187         if test "x$enable_rpath" = xyes; then
17188                 if echo "$ssldir/lib" | grep "^/" >/dev/null; then
17189                         RUNTIME_PATH="$RUNTIME_PATH -R$ssldir/lib"
17190                 fi
17191         fi
17192
17193             fi
17194
17195             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_Update in -lcrypto" >&5
17196 $as_echo_n "checking for HMAC_Update in -lcrypto... " >&6; }
17197             LIBS="$LIBS -lcrypto"
17198             LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
17199             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17200 /* end confdefs.h.  */
17201
17202 int
17203 main ()
17204 {
17205
17206                 int HMAC_Update(void);
17207                 (void)HMAC_Update();
17208
17209   ;
17210   return 0;
17211 }
17212 _ACEOF
17213 if ac_fn_c_try_link "$LINENO"; then :
17214
17215                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17216 $as_echo "yes" >&6; }
17217
17218 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17219
17220
17221 else
17222
17223                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17224 $as_echo "no" >&6; }
17225                 # check if -lwsock32 or -lgdi32 are needed.
17226                 BAKLIBS="$LIBS"
17227                 BAKSSLLIBS="$LIBSSL_LIBS"
17228                 LIBS="$LIBS -lgdi32"
17229                 LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32"
17230                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
17231 $as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
17232                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17233 /* end confdefs.h.  */
17234
17235 int
17236 main ()
17237 {
17238
17239                     int HMAC_Update(void);
17240                     (void)HMAC_Update();
17241
17242   ;
17243   return 0;
17244 }
17245 _ACEOF
17246 if ac_fn_c_try_link "$LINENO"; then :
17247
17248
17249 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17250
17251                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17252 $as_echo "yes" >&6; }
17253
17254 else
17255
17256                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17257 $as_echo "no" >&6; }
17258                     LIBS="$BAKLIBS"
17259                     LIBSSL_LIBS="$BAKSSLLIBS"
17260                     LIBS="$LIBS -ldl"
17261                     LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
17262                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
17263 $as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
17264                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17265 /* end confdefs.h.  */
17266
17267 int
17268 main ()
17269 {
17270
17271                         int HMAC_Update(void);
17272                         (void)HMAC_Update();
17273
17274   ;
17275   return 0;
17276 }
17277 _ACEOF
17278 if ac_fn_c_try_link "$LINENO"; then :
17279
17280
17281 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17282
17283                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17284 $as_echo "yes" >&6; }
17285
17286 else
17287
17288                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17289 $as_echo "no" >&6; }
17290                         LIBS="$BAKLIBS"
17291                         LIBSSL_LIBS="$BAKSSLLIBS"
17292                         LIBS="$LIBS -ldl -pthread"
17293                         LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
17294                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
17295 $as_echo_n "checking if -lcrypto needs -ldl -pthread... " >&6; }
17296                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17297 /* end confdefs.h.  */
17298
17299 int
17300 main ()
17301 {
17302
17303                             int HMAC_Update(void);
17304                             (void)HMAC_Update();
17305
17306   ;
17307   return 0;
17308 }
17309 _ACEOF
17310 if ac_fn_c_try_link "$LINENO"; then :
17311
17312
17313 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17314
17315                             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17316 $as_echo "yes" >&6; }
17317
17318 else
17319
17320                             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17321 $as_echo "no" >&6; }
17322                             as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
17323
17324 fi
17325 rm -f core conftest.err conftest.$ac_objext \
17326     conftest$ac_exeext conftest.$ac_ext
17327
17328 fi
17329 rm -f core conftest.err conftest.$ac_objext \
17330     conftest$ac_exeext conftest.$ac_ext
17331
17332 fi
17333 rm -f core conftest.err conftest.$ac_objext \
17334     conftest$ac_exeext conftest.$ac_ext
17335
17336 fi
17337 rm -f core conftest.err conftest.$ac_objext \
17338     conftest$ac_exeext conftest.$ac_ext
17339         fi
17340
17341
17342     fi
17343 for ac_header in openssl/ssl.h
17344 do :
17345   ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
17346 "
17347 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
17348   cat >>confdefs.h <<_ACEOF
17349 #define HAVE_OPENSSL_SSL_H 1
17350 _ACEOF
17351
17352 fi
17353
17354 done
17355
17356 for ac_header in openssl/err.h
17357 do :
17358   ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
17359 "
17360 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
17361   cat >>confdefs.h <<_ACEOF
17362 #define HAVE_OPENSSL_ERR_H 1
17363 _ACEOF
17364
17365 fi
17366
17367 done
17368
17369 for ac_header in openssl/rand.h
17370 do :
17371   ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
17372 "
17373 if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
17374   cat >>confdefs.h <<_ACEOF
17375 #define HAVE_OPENSSL_RAND_H 1
17376 _ACEOF
17377
17378 fi
17379
17380 done
17381
17382
17383
17384
17385 # check if libssl needs libdl
17386 BAKLIBS="$LIBS"
17387 LIBS="-lssl $LIBS"
17388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
17389 $as_echo_n "checking if libssl needs libdl... " >&6; }
17390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17391 /* end confdefs.h.  */
17392
17393 /* Override any GCC internal prototype to avoid an error.
17394    Use char because int might match the return type of a GCC
17395    builtin and then its argument prototype would still apply.  */
17396 #ifdef __cplusplus
17397 extern "C"
17398 #endif
17399 char SSL_CTX_new ();
17400 int
17401 main ()
17402 {
17403 return SSL_CTX_new ();
17404   ;
17405   return 0;
17406 }
17407 _ACEOF
17408 if ac_fn_c_try_link "$LINENO"; then :
17409
17410         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17411 $as_echo "no" >&6; }
17412         LIBS="$BAKLIBS"
17413
17414 else
17415
17416         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17417 $as_echo "yes" >&6; }
17418         LIBS="$BAKLIBS"
17419         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17420 $as_echo_n "checking for library containing dlopen... " >&6; }
17421 if ${ac_cv_search_dlopen+:} false; then :
17422   $as_echo_n "(cached) " >&6
17423 else
17424   ac_func_search_save_LIBS=$LIBS
17425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17426 /* end confdefs.h.  */
17427
17428 /* Override any GCC internal prototype to avoid an error.
17429    Use char because int might match the return type of a GCC
17430    builtin and then its argument prototype would still apply.  */
17431 #ifdef __cplusplus
17432 extern "C"
17433 #endif
17434 char dlopen ();
17435 int
17436 main ()
17437 {
17438 return dlopen ();
17439   ;
17440   return 0;
17441 }
17442 _ACEOF
17443 for ac_lib in '' dl; do
17444   if test -z "$ac_lib"; then
17445     ac_res="none required"
17446   else
17447     ac_res=-l$ac_lib
17448     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17449   fi
17450   if ac_fn_c_try_link "$LINENO"; then :
17451   ac_cv_search_dlopen=$ac_res
17452 fi
17453 rm -f core conftest.err conftest.$ac_objext \
17454     conftest$ac_exeext
17455   if ${ac_cv_search_dlopen+:} false; then :
17456   break
17457 fi
17458 done
17459 if ${ac_cv_search_dlopen+:} false; then :
17460
17461 else
17462   ac_cv_search_dlopen=no
17463 fi
17464 rm conftest.$ac_ext
17465 LIBS=$ac_func_search_save_LIBS
17466 fi
17467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17468 $as_echo "$ac_cv_search_dlopen" >&6; }
17469 ac_res=$ac_cv_search_dlopen
17470 if test "$ac_res" != no; then :
17471   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17472
17473 fi
17474
17475
17476 fi
17477 rm -f core conftest.err conftest.$ac_objext \
17478     conftest$ac_exeext conftest.$ac_ext
17479 SSLLIB="-lssl"
17480
17481 # check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
17482 BAKLIBS="$LIBS"
17483 LIBS="-lssl $LIBS"
17484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
17485 $as_echo_n "checking if libssl needs -lcrypt32... " >&6; }
17486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17487 /* end confdefs.h.  */
17488
17489 /* Override any GCC internal prototype to avoid an error.
17490    Use char because int might match the return type of a GCC
17491    builtin and then its argument prototype would still apply.  */
17492 #ifdef __cplusplus
17493 extern "C"
17494 #endif
17495 char HMAC_Update ();
17496 int
17497 main ()
17498 {
17499 return HMAC_Update ();
17500   ;
17501   return 0;
17502 }
17503 _ACEOF
17504 if ac_fn_c_try_link "$LINENO"; then :
17505
17506         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17507 $as_echo "no" >&6; }
17508         LIBS="$BAKLIBS"
17509
17510 else
17511
17512         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17513 $as_echo "yes" >&6; }
17514         LIBS="$BAKLIBS"
17515         LIBS="$LIBS -lcrypt32"
17516
17517 fi
17518 rm -f core conftest.err conftest.$ac_objext \
17519     conftest$ac_exeext conftest.$ac_ext
17520
17521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
17522 $as_echo_n "checking for LibreSSL... " >&6; }
17523 if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
17524         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17525 $as_echo "yes" >&6; }
17526
17527 $as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
17528
17529         # libressl provides these compat functions, but they may also be
17530         # declared by the OS in libc.  See if they have been declared.
17531         ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
17532 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
17533   ac_have_decl=1
17534 else
17535   ac_have_decl=0
17536 fi
17537
17538 cat >>confdefs.h <<_ACEOF
17539 #define HAVE_DECL_STRLCPY $ac_have_decl
17540 _ACEOF
17541 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
17542 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
17543   ac_have_decl=1
17544 else
17545   ac_have_decl=0
17546 fi
17547
17548 cat >>confdefs.h <<_ACEOF
17549 #define HAVE_DECL_STRLCAT $ac_have_decl
17550 _ACEOF
17551 ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
17552 if test "x$ac_cv_have_decl_arc4random" = xyes; then :
17553   ac_have_decl=1
17554 else
17555   ac_have_decl=0
17556 fi
17557
17558 cat >>confdefs.h <<_ACEOF
17559 #define HAVE_DECL_ARC4RANDOM $ac_have_decl
17560 _ACEOF
17561 ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
17562 if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
17563   ac_have_decl=1
17564 else
17565   ac_have_decl=0
17566 fi
17567
17568 cat >>confdefs.h <<_ACEOF
17569 #define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
17570 _ACEOF
17571 ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
17572 if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
17573   ac_have_decl=1
17574 else
17575   ac_have_decl=0
17576 fi
17577
17578 cat >>confdefs.h <<_ACEOF
17579 #define HAVE_DECL_REALLOCARRAY $ac_have_decl
17580 _ACEOF
17581
17582 else
17583         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17584 $as_echo "no" >&6; }
17585 fi
17586 for ac_header in openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h
17587 do :
17588   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17589 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
17590 "
17591 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17592   cat >>confdefs.h <<_ACEOF
17593 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17594 _ACEOF
17595
17596 fi
17597
17598 done
17599
17600 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
17601 do :
17602   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17603 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17604 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17605   cat >>confdefs.h <<_ACEOF
17606 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17607 _ACEOF
17608
17609 fi
17610 done
17611
17612
17613 # these check_funcs need -lssl
17614 BAKLIBS="$LIBS"
17615 LIBS="-lssl $LIBS"
17616 for ac_func in OPENSSL_init_ssl SSL_CTX_set_security_level
17617 do :
17618   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17619 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17620 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17621   cat >>confdefs.h <<_ACEOF
17622 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17623 _ACEOF
17624
17625 fi
17626 done
17627
17628 LIBS="$BAKLIBS"
17629
17630 ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
17631 $ac_includes_default
17632 #ifdef HAVE_OPENSSL_ERR_H
17633 #include <openssl/err.h>
17634 #endif
17635
17636 #ifdef HAVE_OPENSSL_RAND_H
17637 #include <openssl/rand.h>
17638 #endif
17639
17640 #ifdef HAVE_OPENSSL_CONF_H
17641 #include <openssl/conf.h>
17642 #endif
17643
17644 #ifdef HAVE_OPENSSL_ENGINE_H
17645 #include <openssl/engine.h>
17646 #endif
17647 #include <openssl/ssl.h>
17648 #include <openssl/evp.h>
17649
17650 "
17651 if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
17652   ac_have_decl=1
17653 else
17654   ac_have_decl=0
17655 fi
17656
17657 cat >>confdefs.h <<_ACEOF
17658 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
17659 _ACEOF
17660 ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
17661 $ac_includes_default
17662 #ifdef HAVE_OPENSSL_ERR_H
17663 #include <openssl/err.h>
17664 #endif
17665
17666 #ifdef HAVE_OPENSSL_RAND_H
17667 #include <openssl/rand.h>
17668 #endif
17669
17670 #ifdef HAVE_OPENSSL_CONF_H
17671 #include <openssl/conf.h>
17672 #endif
17673
17674 #ifdef HAVE_OPENSSL_ENGINE_H
17675 #include <openssl/engine.h>
17676 #endif
17677 #include <openssl/ssl.h>
17678 #include <openssl/evp.h>
17679
17680 "
17681 if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
17682   ac_have_decl=1
17683 else
17684   ac_have_decl=0
17685 fi
17686
17687 cat >>confdefs.h <<_ACEOF
17688 #define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
17689 _ACEOF
17690 ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
17691 $ac_includes_default
17692 #ifdef HAVE_OPENSSL_ERR_H
17693 #include <openssl/err.h>
17694 #endif
17695
17696 #ifdef HAVE_OPENSSL_RAND_H
17697 #include <openssl/rand.h>
17698 #endif
17699
17700 #ifdef HAVE_OPENSSL_CONF_H
17701 #include <openssl/conf.h>
17702 #endif
17703
17704 #ifdef HAVE_OPENSSL_ENGINE_H
17705 #include <openssl/engine.h>
17706 #endif
17707 #include <openssl/ssl.h>
17708 #include <openssl/evp.h>
17709
17710 "
17711 if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
17712   ac_have_decl=1
17713 else
17714   ac_have_decl=0
17715 fi
17716
17717 cat >>confdefs.h <<_ACEOF
17718 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
17719 _ACEOF
17720
17721 fi
17722
17723
17724
17725 # Check whether --enable-sha1 was given.
17726 if test "${enable_sha1+set}" = set; then :
17727   enableval=$enable_sha1;
17728 fi
17729
17730 case "$enable_sha1" in
17731         no)
17732         ;;
17733         yes|*)
17734
17735 $as_echo "#define USE_SHA1 1" >>confdefs.h
17736
17737         ;;
17738 esac
17739
17740
17741 # Check whether --enable-sha2 was given.
17742 if test "${enable_sha2+set}" = set; then :
17743   enableval=$enable_sha2;
17744 fi
17745
17746 case "$enable_sha2" in
17747         no)
17748         ;;
17749         yes|*)
17750
17751 $as_echo "#define USE_SHA2 1" >>confdefs.h
17752
17753         ;;
17754 esac
17755
17756 # Check whether --enable-subnet was given.
17757 if test "${enable_subnet+set}" = set; then :
17758   enableval=$enable_subnet;
17759 fi
17760
17761 case "$enable_subnet" in
17762         yes)
17763
17764 $as_echo "#define CLIENT_SUBNET 1" >>confdefs.h
17765
17766         SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
17767
17768         SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
17769
17770         ;;
17771         no|*)
17772         ;;
17773 esac
17774
17775 # check wether gost also works
17776
17777 # Check whether --enable-gost was given.
17778 if test "${enable_gost+set}" = set; then :
17779   enableval=$enable_gost;
17780 fi
17781
17782 use_gost="no"
17783 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17784 case "$enable_gost" in
17785         no)
17786         ;;
17787         *)
17788         ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
17789 if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
17790   :
17791 else
17792   as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
17793 fi
17794
17795         ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
17796 if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
17797
17798 else
17799   as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
17800 fi
17801
17802
17803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
17804 $as_echo_n "checking if GOST works... " >&6; }
17805 if test c${cross_compiling} = cno; then
17806 BAKCFLAGS="$CFLAGS"
17807 if test -n "$ssldir"; then
17808         CFLAGS="$CFLAGS -Wl,-rpath,$ssldir/lib"
17809 fi
17810 if test "$cross_compiling" = yes; then :
17811   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17812 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17813 as_fn_error $? "cannot run test program while cross compiling
17814 See \`config.log' for more details" "$LINENO" 5; }
17815 else
17816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17817 /* end confdefs.h.  */
17818
17819 #include <string.h>
17820 #include <openssl/ssl.h>
17821 #include <openssl/evp.h>
17822 #include <openssl/engine.h>
17823 #include <openssl/conf.h>
17824 /* routine to load gost (from sldns) */
17825 int load_gost_id(void)
17826 {
17827         static int gost_id = 0;
17828         const EVP_PKEY_ASN1_METHOD* meth;
17829         ENGINE* e;
17830
17831         if(gost_id) return gost_id;
17832
17833         /* see if configuration loaded gost implementation from other engine*/
17834         meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
17835         if(meth) {
17836                 EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
17837                 return gost_id;
17838         }
17839
17840         /* see if engine can be loaded already */
17841         e = ENGINE_by_id("gost");
17842         if(!e) {
17843                 /* load it ourself, in case statically linked */
17844                 ENGINE_load_builtin_engines();
17845                 ENGINE_load_dynamic();
17846                 e = ENGINE_by_id("gost");
17847         }
17848         if(!e) {
17849                 /* no gost engine in openssl */
17850                 return 0;
17851         }
17852         if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
17853                 ENGINE_finish(e);
17854                 ENGINE_free(e);
17855                 return 0;
17856         }
17857
17858         meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
17859         if(!meth) {
17860                 /* algo not found */
17861                 ENGINE_finish(e);
17862                 ENGINE_free(e);
17863                 return 0;
17864         }
17865         EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
17866         return gost_id;
17867 }
17868 int main(void) {
17869         EVP_MD_CTX* ctx;
17870         const EVP_MD* md;
17871         unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
17872         const char* str = "Hello world";
17873         const unsigned char check[] = {
17874                 0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
17875                 0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
17876                 0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
17877                 0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
17878         };
17879         OPENSSL_config(NULL);
17880         (void)load_gost_id();
17881         md = EVP_get_digestbyname("md_gost94");
17882         if(!md) return 1;
17883         memset(digest, 0, sizeof(digest));
17884         ctx = EVP_MD_CTX_create();
17885         if(!ctx) return 2;
17886         if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
17887         if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
17888         if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
17889         /* uncomment to see the hash calculated.
17890                 {int i;
17891                 for(i=0; i<32; i++)
17892                         printf(" %2.2x", (int)digest[i]);
17893                 printf("\n");}
17894         */
17895         if(memcmp(digest, check, sizeof(check)) != 0)
17896                 return 6;
17897         return 0;
17898 }
17899
17900 _ACEOF
17901 if ac_fn_c_try_run "$LINENO"; then :
17902   eval "ac_cv_c_gost_works=yes"
17903 else
17904   eval "ac_cv_c_gost_works=no"
17905 fi
17906 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17907   conftest.$ac_objext conftest.beam conftest.$ac_ext
17908 fi
17909
17910 CFLAGS="$BAKCFLAGS"
17911 else
17912 eval "ac_cv_c_gost_works=maybe"
17913 fi
17914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
17915 $as_echo "$ac_cv_c_gost_works" >&6; }
17916
17917         if test "$ac_cv_c_gost_works" != no; then
17918                 use_gost="yes"
17919
17920 $as_echo "#define USE_GOST 1" >>confdefs.h
17921
17922         fi
17923         ;;
17924 esac
17925 fi
17926 # Check whether --enable-ecdsa was given.
17927 if test "${enable_ecdsa+set}" = set; then :
17928   enableval=$enable_ecdsa;
17929 fi
17930
17931 use_ecdsa="no"
17932 case "$enable_ecdsa" in
17933     no)
17934       ;;
17935     *)
17936       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17937               ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
17938 if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
17939
17940 else
17941   as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17942 fi
17943
17944               ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
17945 if test "x$ac_cv_func_SHA384_Init" = xyes; then :
17946
17947 else
17948   as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17949 fi
17950
17951               ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
17952 #include <openssl/evp.h>
17953
17954 "
17955 if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = 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_NID_X9_62_PRIME256V1 $ac_have_decl
17963 _ACEOF
17964 if test $ac_have_decl = 1; then :
17965
17966 else
17967   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17968 fi
17969 ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
17970 #include <openssl/evp.h>
17971
17972 "
17973 if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
17974   ac_have_decl=1
17975 else
17976   ac_have_decl=0
17977 fi
17978
17979 cat >>confdefs.h <<_ACEOF
17980 #define HAVE_DECL_NID_SECP384R1 $ac_have_decl
17981 _ACEOF
17982 if test $ac_have_decl = 1; then :
17983
17984 else
17985   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17986 fi
17987
17988               # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
17989               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
17990 $as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
17991               if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
17992                 if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
17993                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17994 $as_echo "no" >&6; }
17995
17996 cat >>confdefs.h <<_ACEOF
17997 #define USE_ECDSA_EVP_WORKAROUND 1
17998 _ACEOF
17999
18000                 else
18001                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18002 $as_echo "yes" >&6; }
18003                 fi
18004               else
18005                 # not OpenSSL, thus likely LibreSSL, which supports it
18006                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18007 $as_echo "yes" >&6; }
18008               fi
18009       fi
18010       # we now know we have ECDSA and the required curves.
18011
18012 cat >>confdefs.h <<_ACEOF
18013 #define USE_ECDSA 1
18014 _ACEOF
18015
18016       use_ecdsa="yes"
18017       ;;
18018 esac
18019
18020 # Check whether --enable-dsa was given.
18021 if test "${enable_dsa+set}" = set; then :
18022   enableval=$enable_dsa;
18023 fi
18024
18025 use_dsa="no"
18026 case "$enable_dsa" in
18027     no)
18028       ;;
18029     *)
18030       # detect if DSA is supported, and turn it off if not.
18031       ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
18032 if test "x$ac_cv_func_DSA_SIG_new" = xyes; then :
18033
18034
18035 cat >>confdefs.h <<_ACEOF
18036 #define USE_DSA 1
18037 _ACEOF
18038
18039
18040 else
18041   if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
18042                fi
18043 fi
18044
18045       ;;
18046 esac
18047
18048
18049 # Check whether --enable-event-api was given.
18050 if test "${enable_event_api+set}" = set; then :
18051   enableval=$enable_event_api;
18052 fi
18053
18054 case "$enable_event_api" in
18055     yes)
18056       UNBOUND_EVENT_INSTALL=unbound-event-install
18057
18058       UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
18059
18060       ;;
18061     *)
18062       ;;
18063 esac
18064
18065 # Check whether --enable-tfo-client was given.
18066 if test "${enable_tfo_client+set}" = set; then :
18067   enableval=$enable_tfo_client;
18068 fi
18069
18070 case "$enable_tfo_client" in
18071         yes)
18072                 case `uname` in
18073                         Linux) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
18074 #include <netinet/tcp.h>
18075
18076 "
18077 if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then :
18078   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
18079 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
18080 else
18081   as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
18082 fi
18083
18084
18085 cat >>confdefs.h <<_ACEOF
18086 #define USE_MSG_FASTOPEN 1
18087 _ACEOF
18088
18089                           ;;
18090                         Darwin) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
18091 #include <sys/socket.h>
18092
18093 "
18094 if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then :
18095   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
18096 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
18097 else
18098   as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
18099 fi
18100
18101
18102 cat >>confdefs.h <<_ACEOF
18103 #define USE_OSX_MSG_FASTOPEN 1
18104 _ACEOF
18105
18106                           ;;
18107                 esac
18108         ;;
18109         no|*)
18110                 ;;
18111 esac
18112
18113 # Check whether --enable-tfo-server was given.
18114 if test "${enable_tfo_server+set}" = set; then :
18115   enableval=$enable_tfo_server;
18116 fi
18117
18118 case "$enable_tfo_server" in
18119         yes)
18120               ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
18121 #include <netinet/tcp.h>
18122
18123 "
18124 if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then :
18125   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
18126 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
18127 else
18128   as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
18129 fi
18130
18131
18132 cat >>confdefs.h <<_ACEOF
18133 #define USE_TCP_FASTOPEN 1
18134 _ACEOF
18135
18136                 ;;
18137         no|*)
18138                 ;;
18139 esac
18140
18141 # check for libevent
18142
18143 # Check whether --with-libevent was given.
18144 if test "${with_libevent+set}" = set; then :
18145   withval=$with_libevent;
18146 else
18147    withval="no"
18148 fi
18149
18150 if test x_$withval = x_yes -o x_$withval != x_no; then
18151         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
18152 $as_echo_n "checking for libevent... " >&6; }
18153         if test x_$withval = x_ -o x_$withval = x_yes; then
18154             withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18155         fi
18156         for dir in $withval; do
18157             thedir="$dir"
18158             if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
18159                 found_libevent="yes"
18160                                 if test "$thedir" != "/usr"; then
18161                     CPPFLAGS="$CPPFLAGS -I$thedir/include"
18162                 fi
18163                 break;
18164             fi
18165         done
18166         if test x_$found_libevent != x_yes; then
18167                 if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
18168                         # libevent source directory
18169                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
18170 $as_echo "found in $thedir" >&6; }
18171                         CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
18172                         BAK_LDFLAGS_SET="1"
18173                         BAK_LDFLAGS="$LDFLAGS"
18174                         # remove evdns from linking
18175                         mkdir build >/dev/null 2>&1
18176                         mkdir build/libevent >/dev/null 2>&1
18177                         mkdir build/libevent/.libs >/dev/null 2>&1
18178                         ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
18179                         ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
18180                         ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
18181                         cp $ev_files_o build/libevent
18182                         cp $ev_files_lo build/libevent
18183                         cp $ev_files_libso build/libevent/.libs
18184                         LATE_LDFLAGS="build/libevent/*.lo -lm"
18185                         LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
18186                 else
18187                         as_fn_error $? "Cannot find the libevent library in $withval
18188 You can restart ./configure --with-libevent=no to use a builtin alternative.
18189 Please note that this alternative is not as capable as libevent when using
18190 large outgoing port ranges.  " "$LINENO" 5
18191                 fi
18192         else
18193             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
18194 $as_echo "found in $thedir" >&6; }
18195                     if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
18196                     LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
18197
18198         if test "x$enable_rpath" = xyes; then
18199                 if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
18200                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
18201                 fi
18202         fi
18203
18204             else
18205                                     if test "$thedir" != "/usr" -a "$thedir" != ""; then
18206                         LDFLAGS="$LDFLAGS -L$thedir/lib"
18207
18208         if test "x$enable_rpath" = xyes; then
18209                 if echo "$thedir/lib" | grep "^/" >/dev/null; then
18210                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
18211                 fi
18212         fi
18213
18214                     fi
18215             fi
18216         fi
18217         # check for library used by libevent after 1.3c
18218         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18219 $as_echo_n "checking for library containing clock_gettime... " >&6; }
18220 if ${ac_cv_search_clock_gettime+:} false; then :
18221   $as_echo_n "(cached) " >&6
18222 else
18223   ac_func_search_save_LIBS=$LIBS
18224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18225 /* end confdefs.h.  */
18226
18227 /* Override any GCC internal prototype to avoid an error.
18228    Use char because int might match the return type of a GCC
18229    builtin and then its argument prototype would still apply.  */
18230 #ifdef __cplusplus
18231 extern "C"
18232 #endif
18233 char clock_gettime ();
18234 int
18235 main ()
18236 {
18237 return clock_gettime ();
18238   ;
18239   return 0;
18240 }
18241 _ACEOF
18242 for ac_lib in '' rt; do
18243   if test -z "$ac_lib"; then
18244     ac_res="none required"
18245   else
18246     ac_res=-l$ac_lib
18247     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18248   fi
18249   if ac_fn_c_try_link "$LINENO"; then :
18250   ac_cv_search_clock_gettime=$ac_res
18251 fi
18252 rm -f core conftest.err conftest.$ac_objext \
18253     conftest$ac_exeext
18254   if ${ac_cv_search_clock_gettime+:} false; then :
18255   break
18256 fi
18257 done
18258 if ${ac_cv_search_clock_gettime+:} false; then :
18259
18260 else
18261   ac_cv_search_clock_gettime=no
18262 fi
18263 rm conftest.$ac_ext
18264 LIBS=$ac_func_search_save_LIBS
18265 fi
18266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18267 $as_echo "$ac_cv_search_clock_gettime" >&6; }
18268 ac_res=$ac_cv_search_clock_gettime
18269 if test "$ac_res" != no; then :
18270   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18271
18272 fi
18273
18274
18275         # is the event.h header libev or libevent?
18276         for ac_header in event.h
18277 do :
18278   ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
18279 "
18280 if test "x$ac_cv_header_event_h" = xyes; then :
18281   cat >>confdefs.h <<_ACEOF
18282 #define HAVE_EVENT_H 1
18283 _ACEOF
18284
18285 fi
18286
18287 done
18288
18289         ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
18290 #include <event.h>
18291
18292 "
18293 if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
18294
18295                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
18296 $as_echo_n "checking for library containing event_set... " >&6; }
18297 if ${ac_cv_search_event_set+:} false; then :
18298   $as_echo_n "(cached) " >&6
18299 else
18300   ac_func_search_save_LIBS=$LIBS
18301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18302 /* end confdefs.h.  */
18303
18304 /* Override any GCC internal prototype to avoid an error.
18305    Use char because int might match the return type of a GCC
18306    builtin and then its argument prototype would still apply.  */
18307 #ifdef __cplusplus
18308 extern "C"
18309 #endif
18310 char event_set ();
18311 int
18312 main ()
18313 {
18314 return event_set ();
18315   ;
18316   return 0;
18317 }
18318 _ACEOF
18319 for ac_lib in '' ev; do
18320   if test -z "$ac_lib"; then
18321     ac_res="none required"
18322   else
18323     ac_res=-l$ac_lib
18324     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18325   fi
18326   if ac_fn_c_try_link "$LINENO"; then :
18327   ac_cv_search_event_set=$ac_res
18328 fi
18329 rm -f core conftest.err conftest.$ac_objext \
18330     conftest$ac_exeext
18331   if ${ac_cv_search_event_set+:} false; then :
18332   break
18333 fi
18334 done
18335 if ${ac_cv_search_event_set+:} false; then :
18336
18337 else
18338   ac_cv_search_event_set=no
18339 fi
18340 rm conftest.$ac_ext
18341 LIBS=$ac_func_search_save_LIBS
18342 fi
18343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
18344 $as_echo "$ac_cv_search_event_set" >&6; }
18345 ac_res=$ac_cv_search_event_set
18346 if test "$ac_res" != no; then :
18347   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18348
18349 fi
18350
18351
18352 else
18353
18354                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
18355 $as_echo_n "checking for library containing event_set... " >&6; }
18356 if ${ac_cv_search_event_set+:} false; then :
18357   $as_echo_n "(cached) " >&6
18358 else
18359   ac_func_search_save_LIBS=$LIBS
18360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18361 /* end confdefs.h.  */
18362
18363 /* Override any GCC internal prototype to avoid an error.
18364    Use char because int might match the return type of a GCC
18365    builtin and then its argument prototype would still apply.  */
18366 #ifdef __cplusplus
18367 extern "C"
18368 #endif
18369 char event_set ();
18370 int
18371 main ()
18372 {
18373 return event_set ();
18374   ;
18375   return 0;
18376 }
18377 _ACEOF
18378 for ac_lib in '' event; do
18379   if test -z "$ac_lib"; then
18380     ac_res="none required"
18381   else
18382     ac_res=-l$ac_lib
18383     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18384   fi
18385   if ac_fn_c_try_link "$LINENO"; then :
18386   ac_cv_search_event_set=$ac_res
18387 fi
18388 rm -f core conftest.err conftest.$ac_objext \
18389     conftest$ac_exeext
18390   if ${ac_cv_search_event_set+:} false; then :
18391   break
18392 fi
18393 done
18394 if ${ac_cv_search_event_set+:} false; then :
18395
18396 else
18397   ac_cv_search_event_set=no
18398 fi
18399 rm conftest.$ac_ext
18400 LIBS=$ac_func_search_save_LIBS
18401 fi
18402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
18403 $as_echo "$ac_cv_search_event_set" >&6; }
18404 ac_res=$ac_cv_search_event_set
18405 if test "$ac_res" != no; then :
18406   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18407
18408 fi
18409
18410
18411 fi
18412
18413         for ac_func in event_base_free
18414 do :
18415   ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
18416 if test "x$ac_cv_func_event_base_free" = xyes; then :
18417   cat >>confdefs.h <<_ACEOF
18418 #define HAVE_EVENT_BASE_FREE 1
18419 _ACEOF
18420
18421 fi
18422 done
18423  # only in libevent 1.2 and later
18424         for ac_func in event_base_once
18425 do :
18426   ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
18427 if test "x$ac_cv_func_event_base_once" = xyes; then :
18428   cat >>confdefs.h <<_ACEOF
18429 #define HAVE_EVENT_BASE_ONCE 1
18430 _ACEOF
18431
18432 fi
18433 done
18434  # only in libevent 1.4.1 and later
18435         for ac_func in event_base_new
18436 do :
18437   ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
18438 if test "x$ac_cv_func_event_base_new" = xyes; then :
18439   cat >>confdefs.h <<_ACEOF
18440 #define HAVE_EVENT_BASE_NEW 1
18441 _ACEOF
18442
18443 fi
18444 done
18445  # only in libevent 1.4.1 and later
18446         for ac_func in event_base_get_method
18447 do :
18448   ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
18449 if test "x$ac_cv_func_event_base_get_method" = xyes; then :
18450   cat >>confdefs.h <<_ACEOF
18451 #define HAVE_EVENT_BASE_GET_METHOD 1
18452 _ACEOF
18453
18454 fi
18455 done
18456  # only in libevent 1.4.3 and later
18457         for ac_func in ev_loop
18458 do :
18459   ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
18460 if test "x$ac_cv_func_ev_loop" = xyes; then :
18461   cat >>confdefs.h <<_ACEOF
18462 #define HAVE_EV_LOOP 1
18463 _ACEOF
18464
18465 fi
18466 done
18467  # only in libev. (tested on 3.51)
18468         for ac_func in ev_default_loop
18469 do :
18470   ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
18471 if test "x$ac_cv_func_ev_default_loop" = xyes; then :
18472   cat >>confdefs.h <<_ACEOF
18473 #define HAVE_EV_DEFAULT_LOOP 1
18474 _ACEOF
18475
18476 fi
18477 done
18478  # only in libev. (tested on 4.00)
18479         PC_LIBEVENT_DEPENDENCY="libevent"
18480
18481         if test -n "$BAK_LDFLAGS_SET"; then
18482                 LDFLAGS="$BAK_LDFLAGS"
18483         fi
18484 else
18485
18486 $as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
18487
18488 fi
18489
18490 # check for libexpat
18491
18492 # Check whether --with-libexpat was given.
18493 if test "${with_libexpat+set}" = set; then :
18494   withval=$with_libexpat;
18495 else
18496    withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18497 fi
18498
18499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
18500 $as_echo_n "checking for libexpat... " >&6; }
18501 found_libexpat="no"
18502 for dir in $withval ; do
18503             if test -f "$dir/include/expat.h"; then
18504                 found_libexpat="yes"
18505                                 if test "$dir" != "/usr"; then
18506                     CPPFLAGS="$CPPFLAGS -I$dir/include"
18507                     LDFLAGS="$LDFLAGS -L$dir/lib"
18508                 fi
18509                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
18510 $as_echo "found in $dir" >&6; }
18511                 break;
18512             fi
18513 done
18514 if test x_$found_libexpat != x_yes; then
18515         as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
18516 fi
18517 for ac_header in expat.h
18518 do :
18519   ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
18520 "
18521 if test "x$ac_cv_header_expat_h" = xyes; then :
18522   cat >>confdefs.h <<_ACEOF
18523 #define HAVE_EXPAT_H 1
18524 _ACEOF
18525
18526 fi
18527
18528 done
18529
18530 ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
18531 #include <expat.h>
18532
18533 "
18534 if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then :
18535   ac_have_decl=1
18536 else
18537   ac_have_decl=0
18538 fi
18539
18540 cat >>confdefs.h <<_ACEOF
18541 #define HAVE_DECL_XML_STOPPARSER $ac_have_decl
18542 _ACEOF
18543
18544
18545 # set static linking if requested
18546
18547 staticexe=""
18548 # Check whether --enable-static-exe was given.
18549 if test "${enable_static_exe+set}" = set; then :
18550   enableval=$enable_static_exe;
18551 fi
18552
18553 if test x_$enable_static_exe = x_yes; then
18554         staticexe="-static"
18555         if test "$on_mingw" = yes; then
18556                 staticexe="-all-static"
18557                 # for static compile, include gdi32 and zlib here.
18558                 LIBS="$LIBS -lgdi32 -lz"
18559         fi
18560 fi
18561
18562 # Include systemd.m4 - begin
18563 #   macros for configuring systemd
18564 #   Copyright 2015, Sami Kerola, CloudFlare.
18565 #   BSD licensed.
18566 # Check whether --enable-systemd was given.
18567 if test "${enable_systemd+set}" = set; then :
18568   enableval=$enable_systemd;
18569 else
18570   enable_systemd=no
18571 fi
18572
18573 have_systemd=no
18574
18575
18576
18577
18578
18579
18580
18581 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
18582         if test -n "$ac_tool_prefix"; then
18583   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
18584 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
18585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18586 $as_echo_n "checking for $ac_word... " >&6; }
18587 if ${ac_cv_path_PKG_CONFIG+:} false; then :
18588   $as_echo_n "(cached) " >&6
18589 else
18590   case $PKG_CONFIG in
18591   [\\/]* | ?:[\\/]*)
18592   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
18593   ;;
18594   *)
18595   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18596 for as_dir in $PATH
18597 do
18598   IFS=$as_save_IFS
18599   test -z "$as_dir" && as_dir=.
18600     for ac_exec_ext in '' $ac_executable_extensions; do
18601   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18602     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18603     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18604     break 2
18605   fi
18606 done
18607   done
18608 IFS=$as_save_IFS
18609
18610   ;;
18611 esac
18612 fi
18613 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
18614 if test -n "$PKG_CONFIG"; then
18615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
18616 $as_echo "$PKG_CONFIG" >&6; }
18617 else
18618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18619 $as_echo "no" >&6; }
18620 fi
18621
18622
18623 fi
18624 if test -z "$ac_cv_path_PKG_CONFIG"; then
18625   ac_pt_PKG_CONFIG=$PKG_CONFIG
18626   # Extract the first word of "pkg-config", so it can be a program name with args.
18627 set dummy pkg-config; ac_word=$2
18628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18629 $as_echo_n "checking for $ac_word... " >&6; }
18630 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
18631   $as_echo_n "(cached) " >&6
18632 else
18633   case $ac_pt_PKG_CONFIG in
18634   [\\/]* | ?:[\\/]*)
18635   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
18636   ;;
18637   *)
18638   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18639 for as_dir in $PATH
18640 do
18641   IFS=$as_save_IFS
18642   test -z "$as_dir" && as_dir=.
18643     for ac_exec_ext in '' $ac_executable_extensions; do
18644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18645     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18647     break 2
18648   fi
18649 done
18650   done
18651 IFS=$as_save_IFS
18652
18653   ;;
18654 esac
18655 fi
18656 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
18657 if test -n "$ac_pt_PKG_CONFIG"; then
18658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
18659 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
18660 else
18661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18662 $as_echo "no" >&6; }
18663 fi
18664
18665   if test "x$ac_pt_PKG_CONFIG" = x; then
18666     PKG_CONFIG=""
18667   else
18668     case $cross_compiling:$ac_tool_warned in
18669 yes:)
18670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18671 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18672 ac_tool_warned=yes ;;
18673 esac
18674     PKG_CONFIG=$ac_pt_PKG_CONFIG
18675   fi
18676 else
18677   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
18678 fi
18679
18680 fi
18681 if test -n "$PKG_CONFIG"; then
18682         _pkg_min_version=0.9.0
18683         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
18684 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
18685         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
18686                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18687 $as_echo "yes" >&6; }
18688         else
18689                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18690 $as_echo "no" >&6; }
18691                 PKG_CONFIG=""
18692         fi
18693 fi
18694 if test "x$enable_systemd" != xno; then :
18695
18696
18697
18698 pkg_failed=no
18699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
18700 $as_echo_n "checking for SYSTEMD... " >&6; }
18701
18702 if test -n "$SYSTEMD_CFLAGS"; then
18703     pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
18704  elif test -n "$PKG_CONFIG"; then
18705     if test -n "$PKG_CONFIG" && \
18706     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
18707   ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
18708   ac_status=$?
18709   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18710   test $ac_status = 0; }; then
18711   pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
18712                       test "x$?" != "x0" && pkg_failed=yes
18713 else
18714   pkg_failed=yes
18715 fi
18716  else
18717     pkg_failed=untried
18718 fi
18719 if test -n "$SYSTEMD_LIBS"; then
18720     pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
18721  elif test -n "$PKG_CONFIG"; then
18722     if test -n "$PKG_CONFIG" && \
18723     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
18724   ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
18725   ac_status=$?
18726   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18727   test $ac_status = 0; }; then
18728   pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
18729                       test "x$?" != "x0" && pkg_failed=yes
18730 else
18731   pkg_failed=yes
18732 fi
18733  else
18734     pkg_failed=untried
18735 fi
18736
18737
18738
18739 if test $pkg_failed = yes; then
18740         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18741 $as_echo "no" >&6; }
18742
18743 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
18744         _pkg_short_errors_supported=yes
18745 else
18746         _pkg_short_errors_supported=no
18747 fi
18748         if test $_pkg_short_errors_supported = yes; then
18749                 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
18750         else
18751                 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
18752         fi
18753         # Put the nasty error message in config.log where it belongs
18754         echo "$SYSTEMD_PKG_ERRORS" >&5
18755
18756         have_systemd=no
18757 elif test $pkg_failed = untried; then
18758         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18759 $as_echo "no" >&6; }
18760         have_systemd=no
18761 else
18762         SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
18763         SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
18764         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18765 $as_echo "yes" >&6; }
18766         have_systemd=yes
18767 fi
18768                 if test "x$have_systemd" != "xyes"; then :
18769
18770
18771 pkg_failed=no
18772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
18773 $as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
18774
18775 if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
18776     pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
18777  elif test -n "$PKG_CONFIG"; then
18778     if test -n "$PKG_CONFIG" && \
18779     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
18780   ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
18781   ac_status=$?
18782   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18783   test $ac_status = 0; }; then
18784   pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
18785                       test "x$?" != "x0" && pkg_failed=yes
18786 else
18787   pkg_failed=yes
18788 fi
18789  else
18790     pkg_failed=untried
18791 fi
18792 if test -n "$SYSTEMD_DAEMON_LIBS"; then
18793     pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
18794  elif test -n "$PKG_CONFIG"; then
18795     if test -n "$PKG_CONFIG" && \
18796     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
18797   ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
18798   ac_status=$?
18799   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18800   test $ac_status = 0; }; then
18801   pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
18802                       test "x$?" != "x0" && pkg_failed=yes
18803 else
18804   pkg_failed=yes
18805 fi
18806  else
18807     pkg_failed=untried
18808 fi
18809
18810
18811
18812 if test $pkg_failed = yes; then
18813         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18814 $as_echo "no" >&6; }
18815
18816 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
18817         _pkg_short_errors_supported=yes
18818 else
18819         _pkg_short_errors_supported=no
18820 fi
18821         if test $_pkg_short_errors_supported = yes; then
18822                 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
18823         else
18824                 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
18825         fi
18826         # Put the nasty error message in config.log where it belongs
18827         echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
18828
18829         have_systemd_daemon=no
18830 elif test $pkg_failed = untried; then
18831         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18832 $as_echo "no" >&6; }
18833         have_systemd_daemon=no
18834 else
18835         SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
18836         SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
18837         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18838 $as_echo "yes" >&6; }
18839         have_systemd_daemon=yes
18840 fi
18841                 if test "x$have_systemd_daemon" = "xyes"; then :
18842   have_systemd=yes
18843 fi
18844
18845 fi
18846         case $enable_systemd:$have_systemd in #(
18847   yes:no) :
18848     as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
18849   *:yes) :
18850
18851 $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
18852
18853                 LIBS="$LIBS $SYSTEMD_LIBS"
18854
18855          ;; #(
18856   *) :
18857      ;;
18858 esac
18859
18860
18861 fi
18862  if test "x$have_systemd" = xyes; then
18863   USE_SYSTEMD_TRUE=
18864   USE_SYSTEMD_FALSE='#'
18865 else
18866   USE_SYSTEMD_TRUE='#'
18867   USE_SYSTEMD_FALSE=
18868 fi
18869
18870
18871 # Include systemd.m4 - end
18872
18873 # set lock checking if requested
18874 # Check whether --enable-lock_checks was given.
18875 if test "${enable_lock_checks+set}" = set; then :
18876   enableval=$enable_lock_checks;
18877 fi
18878
18879 if test x_$enable_lock_checks = x_yes; then
18880
18881 $as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
18882
18883         CHECKLOCK_OBJ="checklocks.lo"
18884
18885 fi
18886
18887
18888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
18889 $as_echo_n "checking for getaddrinfo... " >&6; }
18890 ac_cv_func_getaddrinfo=no
18891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18892 /* end confdefs.h.  */
18893
18894 #ifdef __cplusplus
18895 extern "C"
18896 {
18897 #endif
18898 char* getaddrinfo();
18899 char* (*f) () = getaddrinfo;
18900 #ifdef __cplusplus
18901 }
18902 #endif
18903 int main() {
18904         ;
18905         return 0;
18906 }
18907
18908 _ACEOF
18909 if ac_fn_c_try_link "$LINENO"; then :
18910   ac_cv_func_getaddrinfo="yes"
18911 if test "$ac_cv_header_windows_h" = "yes"; then
18912
18913 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
18914
18915         USE_WINSOCK="1"
18916         LIBS="$LIBS -lws2_32"
18917 fi
18918
18919 else
18920   ORIGLIBS="$LIBS"
18921 LIBS="$LIBS -lws2_32"
18922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18923 /* end confdefs.h.  */
18924
18925 #ifdef HAVE_WS2TCPIP_H
18926 #include <ws2tcpip.h>
18927 #endif
18928
18929 int
18930 main ()
18931 {
18932
18933         (void)getaddrinfo(NULL, NULL, NULL, NULL);
18934
18935
18936   ;
18937   return 0;
18938 }
18939 _ACEOF
18940 if ac_fn_c_try_link "$LINENO"; then :
18941
18942 ac_cv_func_getaddrinfo="yes"
18943
18944 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
18945
18946 USE_WINSOCK="1"
18947
18948 else
18949
18950 ac_cv_func_getaddrinfo="no"
18951 LIBS="$ORIGLIBS"
18952
18953 fi
18954 rm -f core conftest.err conftest.$ac_objext \
18955     conftest$ac_exeext conftest.$ac_ext
18956
18957 fi
18958 rm -f core conftest.err conftest.$ac_objext \
18959     conftest$ac_exeext conftest.$ac_ext
18960
18961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
18962 $as_echo "$ac_cv_func_getaddrinfo" >&6; }
18963 if test $ac_cv_func_getaddrinfo = yes; then
18964
18965 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
18966
18967 fi
18968
18969 if test "$USE_WINSOCK" = 1; then
18970
18971 $as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
18972
18973         for ac_header in iphlpapi.h
18974 do :
18975   ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
18976 #include <windows.h>
18977
18978 "
18979 if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
18980   cat >>confdefs.h <<_ACEOF
18981 #define HAVE_IPHLPAPI_H 1
18982 _ACEOF
18983
18984 fi
18985
18986 done
18987
18988         if test -n "$ac_tool_prefix"; then
18989   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
18990 set dummy ${ac_tool_prefix}windres; ac_word=$2
18991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18992 $as_echo_n "checking for $ac_word... " >&6; }
18993 if ${ac_cv_prog_WINDRES+:} false; then :
18994   $as_echo_n "(cached) " >&6
18995 else
18996   if test -n "$WINDRES"; then
18997   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
18998 else
18999 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19000 for as_dir in $PATH
19001 do
19002   IFS=$as_save_IFS
19003   test -z "$as_dir" && as_dir=.
19004     for ac_exec_ext in '' $ac_executable_extensions; do
19005   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19006     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
19007     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19008     break 2
19009   fi
19010 done
19011   done
19012 IFS=$as_save_IFS
19013
19014 fi
19015 fi
19016 WINDRES=$ac_cv_prog_WINDRES
19017 if test -n "$WINDRES"; then
19018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
19019 $as_echo "$WINDRES" >&6; }
19020 else
19021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19022 $as_echo "no" >&6; }
19023 fi
19024
19025
19026 fi
19027 if test -z "$ac_cv_prog_WINDRES"; then
19028   ac_ct_WINDRES=$WINDRES
19029   # Extract the first word of "windres", so it can be a program name with args.
19030 set dummy windres; ac_word=$2
19031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19032 $as_echo_n "checking for $ac_word... " >&6; }
19033 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
19034   $as_echo_n "(cached) " >&6
19035 else
19036   if test -n "$ac_ct_WINDRES"; then
19037   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
19038 else
19039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19040 for as_dir in $PATH
19041 do
19042   IFS=$as_save_IFS
19043   test -z "$as_dir" && as_dir=.
19044     for ac_exec_ext in '' $ac_executable_extensions; do
19045   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19046     ac_cv_prog_ac_ct_WINDRES="windres"
19047     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19048     break 2
19049   fi
19050 done
19051   done
19052 IFS=$as_save_IFS
19053
19054 fi
19055 fi
19056 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
19057 if test -n "$ac_ct_WINDRES"; then
19058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
19059 $as_echo "$ac_ct_WINDRES" >&6; }
19060 else
19061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19062 $as_echo "no" >&6; }
19063 fi
19064
19065   if test "x$ac_ct_WINDRES" = x; then
19066     WINDRES=""
19067   else
19068     case $cross_compiling:$ac_tool_warned in
19069 yes:)
19070 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19071 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19072 ac_tool_warned=yes ;;
19073 esac
19074     WINDRES=$ac_ct_WINDRES
19075   fi
19076 else
19077   WINDRES="$ac_cv_prog_WINDRES"
19078 fi
19079
19080         LIBS="$LIBS -liphlpapi"
19081         WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
19082
19083         WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
19084
19085         WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
19086
19087         WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
19088
19089         WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
19090
19091         WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
19092
19093         WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
19094
19095         WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
19096
19097 fi
19098 if test $ac_cv_func_getaddrinfo = no; then
19099         case " $LIBOBJS " in
19100   *" fake-rfc2553.$ac_objext "* ) ;;
19101   *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
19102  ;;
19103 esac
19104
19105 fi
19106 # check after getaddrinfo for its libraries
19107
19108 # check ioctlsocket
19109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
19110 $as_echo_n "checking for ioctlsocket... " >&6; }
19111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19112 /* end confdefs.h.  */
19113
19114 #ifdef HAVE_WINSOCK2_H
19115 #include <winsock2.h>
19116 #endif
19117
19118 int
19119 main ()
19120 {
19121
19122         (void)ioctlsocket(0, 0, NULL);
19123
19124   ;
19125   return 0;
19126 }
19127 _ACEOF
19128 if ac_fn_c_try_link "$LINENO"; then :
19129
19130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19131 $as_echo "yes" >&6; }
19132
19133 $as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
19134
19135
19136 else
19137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19138 $as_echo "no" >&6; }
19139 fi
19140 rm -f core conftest.err conftest.$ac_objext \
19141     conftest$ac_exeext conftest.$ac_ext
19142
19143
19144 # see if daemon(3) exists, and if it is deprecated.
19145 for ac_func in daemon
19146 do :
19147   ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
19148 if test "x$ac_cv_func_daemon" = xyes; then :
19149   cat >>confdefs.h <<_ACEOF
19150 #define HAVE_DAEMON 1
19151 _ACEOF
19152
19153 fi
19154 done
19155
19156 if test $ac_cv_func_daemon = yes; then
19157
19158
19159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
19160 $as_echo_n "checking if daemon is deprecated... " >&6; }
19161 cache=`echo daemon | sed 'y%.=/+-%___p_%'`
19162 if eval \${cv_cc_deprecated_$cache+:} false; then :
19163   $as_echo_n "(cached) " >&6
19164 else
19165
19166 echo '
19167 #include <stdlib.h>
19168 ' >conftest.c
19169 echo 'void f(){ (void)daemon(0, 0); }' >>conftest.c
19170 if test -z "`$CC -c conftest.c 2>&1 | grep deprecated`"; then
19171 eval "cv_cc_deprecated_$cache=no"
19172 else
19173 eval "cv_cc_deprecated_$cache=yes"
19174 fi
19175 rm -f conftest conftest.o conftest.c
19176
19177 fi
19178
19179 if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
19180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19181 $as_echo "yes" >&6; }
19182
19183 cat >>confdefs.h <<_ACEOF
19184 #define DEPRECATED_DAEMON 1
19185 _ACEOF
19186
19187 :
19188
19189 else
19190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19191 $as_echo "no" >&6; }
19192 :
19193
19194 fi
19195
19196 fi
19197
19198 ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
19199 $ac_includes_default
19200 #ifdef HAVE_SYS_UN_H
19201 #include <sys/un.h>
19202 #endif
19203
19204 "
19205 if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
19206
19207 cat >>confdefs.h <<_ACEOF
19208 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
19209 _ACEOF
19210
19211
19212 fi
19213
19214 ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
19215 $ac_includes_default
19216 #if HAVE_SYS_PARAM_H
19217 #include <sys/param.h>
19218 #endif
19219
19220 #ifdef HAVE_SYS_SOCKET_H
19221 #include <sys/socket.h>
19222 #endif
19223
19224 #ifdef HAVE_SYS_UIO_H
19225 #include <sys/uio.h>
19226 #endif
19227
19228 #ifdef HAVE_NETINET_IN_H
19229 #include <netinet/in.h>
19230 #endif
19231
19232 #ifdef HAVE_NETINET_TCP_H
19233 #include <netinet/tcp.h>
19234 #endif
19235
19236 #ifdef HAVE_ARPA_INET_H
19237 #include <arpa/inet.h>
19238 #endif
19239
19240 #ifdef HAVE_WINSOCK2_H
19241 #include <winsock2.h>
19242 #endif
19243
19244 #ifdef HAVE_WS2TCPIP_H
19245 #include <ws2tcpip.h>
19246 #endif
19247
19248 "
19249 if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
19250
19251 cat >>confdefs.h <<_ACEOF
19252 #define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
19253 _ACEOF
19254
19255
19256 fi
19257
19258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
19259 $as_echo_n "checking for library containing setusercontext... " >&6; }
19260 if ${ac_cv_search_setusercontext+:} false; then :
19261   $as_echo_n "(cached) " >&6
19262 else
19263   ac_func_search_save_LIBS=$LIBS
19264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19265 /* end confdefs.h.  */
19266
19267 /* Override any GCC internal prototype to avoid an error.
19268    Use char because int might match the return type of a GCC
19269    builtin and then its argument prototype would still apply.  */
19270 #ifdef __cplusplus
19271 extern "C"
19272 #endif
19273 char setusercontext ();
19274 int
19275 main ()
19276 {
19277 return setusercontext ();
19278   ;
19279   return 0;
19280 }
19281 _ACEOF
19282 for ac_lib in '' util; do
19283   if test -z "$ac_lib"; then
19284     ac_res="none required"
19285   else
19286     ac_res=-l$ac_lib
19287     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19288   fi
19289   if ac_fn_c_try_link "$LINENO"; then :
19290   ac_cv_search_setusercontext=$ac_res
19291 fi
19292 rm -f core conftest.err conftest.$ac_objext \
19293     conftest$ac_exeext
19294   if ${ac_cv_search_setusercontext+:} false; then :
19295   break
19296 fi
19297 done
19298 if ${ac_cv_search_setusercontext+:} false; then :
19299
19300 else
19301   ac_cv_search_setusercontext=no
19302 fi
19303 rm conftest.$ac_ext
19304 LIBS=$ac_func_search_save_LIBS
19305 fi
19306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
19307 $as_echo "$ac_cv_search_setusercontext" >&6; }
19308 ac_res=$ac_cv_search_setusercontext
19309 if test "$ac_res" != no; then :
19310   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19311
19312 fi
19313
19314 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
19315 do :
19316   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19317 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19318 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19319   cat >>confdefs.h <<_ACEOF
19320 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19321 _ACEOF
19322
19323 fi
19324 done
19325
19326 for ac_func in setresuid
19327 do :
19328   ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
19329 if test "x$ac_cv_func_setresuid" = xyes; then :
19330   cat >>confdefs.h <<_ACEOF
19331 #define HAVE_SETRESUID 1
19332 _ACEOF
19333
19334 else
19335   for ac_func in setreuid
19336 do :
19337   ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
19338 if test "x$ac_cv_func_setreuid" = xyes; then :
19339   cat >>confdefs.h <<_ACEOF
19340 #define HAVE_SETREUID 1
19341 _ACEOF
19342
19343 fi
19344 done
19345
19346 fi
19347 done
19348
19349 for ac_func in setresgid
19350 do :
19351   ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
19352 if test "x$ac_cv_func_setresgid" = xyes; then :
19353   cat >>confdefs.h <<_ACEOF
19354 #define HAVE_SETRESGID 1
19355 _ACEOF
19356
19357 else
19358   for ac_func in setregid
19359 do :
19360   ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
19361 if test "x$ac_cv_func_setregid" = xyes; then :
19362   cat >>confdefs.h <<_ACEOF
19363 #define HAVE_SETREGID 1
19364 _ACEOF
19365
19366 fi
19367 done
19368
19369 fi
19370 done
19371
19372
19373 # check if setreuid en setregid fail, on MacOSX10.4(darwin8).
19374 if echo $build_os | grep darwin8 > /dev/null; then
19375
19376 $as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
19377
19378 fi
19379 ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
19380 $ac_includes_default
19381 #ifdef HAVE_NETINET_IN_H
19382 #include <netinet/in.h>
19383 #endif
19384
19385 #ifdef HAVE_NETINET_TCP_H
19386 #include <netinet/tcp.h>
19387 #endif
19388
19389 #ifdef HAVE_ARPA_INET_H
19390 #include <arpa/inet.h>
19391 #endif
19392
19393 #ifdef HAVE_WINSOCK2_H
19394 #include <winsock2.h>
19395 #endif
19396
19397 #ifdef HAVE_WS2TCPIP_H
19398 #include <ws2tcpip.h>
19399 #endif
19400
19401 "
19402 if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
19403   ac_have_decl=1
19404 else
19405   ac_have_decl=0
19406 fi
19407
19408 cat >>confdefs.h <<_ACEOF
19409 #define HAVE_DECL_INET_PTON $ac_have_decl
19410 _ACEOF
19411 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
19412 $ac_includes_default
19413 #ifdef HAVE_NETINET_IN_H
19414 #include <netinet/in.h>
19415 #endif
19416
19417 #ifdef HAVE_NETINET_TCP_H
19418 #include <netinet/tcp.h>
19419 #endif
19420
19421 #ifdef HAVE_ARPA_INET_H
19422 #include <arpa/inet.h>
19423 #endif
19424
19425 #ifdef HAVE_WINSOCK2_H
19426 #include <winsock2.h>
19427 #endif
19428
19429 #ifdef HAVE_WS2TCPIP_H
19430 #include <ws2tcpip.h>
19431 #endif
19432
19433 "
19434 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
19435   ac_have_decl=1
19436 else
19437   ac_have_decl=0
19438 fi
19439
19440 cat >>confdefs.h <<_ACEOF
19441 #define HAVE_DECL_INET_NTOP $ac_have_decl
19442 _ACEOF
19443
19444 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
19445 if test "x$ac_cv_func_inet_aton" = xyes; then :
19446   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
19447
19448 else
19449   case " $LIBOBJS " in
19450   *" inet_aton.$ac_objext "* ) ;;
19451   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
19452  ;;
19453 esac
19454
19455 fi
19456
19457
19458 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
19459 if test "x$ac_cv_func_inet_pton" = xyes; then :
19460   $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
19461
19462 else
19463   case " $LIBOBJS " in
19464   *" inet_pton.$ac_objext "* ) ;;
19465   *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
19466  ;;
19467 esac
19468
19469 fi
19470
19471
19472 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
19473 if test "x$ac_cv_func_inet_ntop" = xyes; then :
19474   $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
19475
19476 else
19477   case " $LIBOBJS " in
19478   *" inet_ntop.$ac_objext "* ) ;;
19479   *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
19480  ;;
19481 esac
19482
19483 fi
19484
19485
19486 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
19487 if test "x$ac_cv_func_snprintf" = xyes; then :
19488   $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
19489
19490 else
19491   case " $LIBOBJS " in
19492   *" snprintf.$ac_objext "* ) ;;
19493   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
19494  ;;
19495 esac
19496
19497 fi
19498
19499
19500 # test if snprintf return the proper length
19501 if test "x$ac_cv_func_snprintf" = xyes; then
19502     if test c${cross_compiling} = cno; then
19503         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
19504 $as_echo_n "checking for correct snprintf return value... " >&6; }
19505         if test "$cross_compiling" = yes; then :
19506   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19507 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19508 as_fn_error $? "cannot run test program while cross compiling
19509 See \`config.log' for more details" "$LINENO" 5; }
19510 else
19511   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19512 /* end confdefs.h.  */
19513 $ac_includes_default
19514
19515 int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
19516
19517 _ACEOF
19518 if ac_fn_c_try_run "$LINENO"; then :
19519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19520 $as_echo "yes" >&6; }
19521 else
19522
19523                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19524 $as_echo "no" >&6; }
19525
19526 $as_echo "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
19527
19528                 case " $LIBOBJS " in
19529   *" snprintf.$ac_objext "* ) ;;
19530   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
19531  ;;
19532 esac
19533
19534
19535 fi
19536 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19537   conftest.$ac_objext conftest.beam conftest.$ac_ext
19538 fi
19539
19540     fi
19541 fi
19542 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
19543 if test "x$ac_cv_func_strlcat" = xyes; then :
19544   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
19545
19546 else
19547   case " $LIBOBJS " in
19548   *" strlcat.$ac_objext "* ) ;;
19549   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
19550  ;;
19551 esac
19552
19553 fi
19554
19555
19556 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
19557 if test "x$ac_cv_func_strlcpy" = xyes; then :
19558   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
19559
19560 else
19561   case " $LIBOBJS " in
19562   *" strlcpy.$ac_objext "* ) ;;
19563   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
19564  ;;
19565 esac
19566
19567 fi
19568
19569
19570 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
19571 if test "x$ac_cv_func_memmove" = xyes; then :
19572   $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
19573
19574 else
19575   case " $LIBOBJS " in
19576   *" memmove.$ac_objext "* ) ;;
19577   *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
19578  ;;
19579 esac
19580
19581 fi
19582
19583
19584 ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
19585 if test "x$ac_cv_func_gmtime_r" = xyes; then :
19586   $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
19587
19588 else
19589   case " $LIBOBJS " in
19590   *" gmtime_r.$ac_objext "* ) ;;
19591   *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
19592  ;;
19593 esac
19594
19595 fi
19596
19597
19598 ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
19599 if test "x$ac_cv_func_isblank" = xyes; then :
19600   $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
19601
19602 else
19603   case " $LIBOBJS " in
19604   *" isblank.$ac_objext "* ) ;;
19605   *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
19606  ;;
19607 esac
19608
19609 fi
19610
19611
19612 LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
19613
19614 ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
19615 if test "x$ac_cv_func_reallocarray" = xyes; then :
19616   $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
19617
19618 else
19619   case " $LIBOBJS " in
19620   *" reallocarray.$ac_objext "* ) ;;
19621   *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
19622  ;;
19623 esac
19624
19625 fi
19626
19627
19628 if test "$USE_NSS" = "no"; then
19629         ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
19630 if test "x$ac_cv_func_arc4random" = xyes; then :
19631   $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
19632
19633 else
19634   case " $LIBOBJS " in
19635   *" arc4random.$ac_objext "* ) ;;
19636   *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
19637  ;;
19638 esac
19639
19640 fi
19641
19642
19643         ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
19644 if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
19645   $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
19646
19647 else
19648   case " $LIBOBJS " in
19649   *" arc4random_uniform.$ac_objext "* ) ;;
19650   *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
19651  ;;
19652 esac
19653
19654 fi
19655
19656
19657         if test "$ac_cv_func_arc4random" = "no"; then
19658                 case " $LIBOBJS " in
19659   *" explicit_bzero.$ac_objext "* ) ;;
19660   *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
19661  ;;
19662 esac
19663
19664                 case " $LIBOBJS " in
19665   *" arc4_lock.$ac_objext "* ) ;;
19666   *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
19667  ;;
19668 esac
19669
19670                 for ac_func in getentropy
19671 do :
19672   ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
19673 if test "x$ac_cv_func_getentropy" = xyes; then :
19674   cat >>confdefs.h <<_ACEOF
19675 #define HAVE_GETENTROPY 1
19676 _ACEOF
19677
19678 else
19679
19680                     if test "$USE_WINSOCK" = 1; then
19681                         case " $LIBOBJS " in
19682   *" getentropy_win.$ac_objext "* ) ;;
19683   *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
19684  ;;
19685 esac
19686
19687                     else
19688                         case "$host" in
19689                         Darwin|*darwin*)
19690                                 case " $LIBOBJS " in
19691   *" getentropy_osx.$ac_objext "* ) ;;
19692   *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
19693  ;;
19694 esac
19695
19696                         ;;
19697                         *solaris*|*sunos*|SunOS)
19698                                 case " $LIBOBJS " in
19699   *" getentropy_solaris.$ac_objext "* ) ;;
19700   *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
19701  ;;
19702 esac
19703
19704                                 for ac_header in sys/sha2.h
19705 do :
19706   ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
19707 "
19708 if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
19709   cat >>confdefs.h <<_ACEOF
19710 #define HAVE_SYS_SHA2_H 1
19711 _ACEOF
19712
19713 else
19714
19715                                         for ac_func in SHA512_Update
19716 do :
19717   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
19718 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
19719   cat >>confdefs.h <<_ACEOF
19720 #define HAVE_SHA512_UPDATE 1
19721 _ACEOF
19722
19723 else
19724
19725                                                 case " $LIBOBJS " in
19726   *" sha512.$ac_objext "* ) ;;
19727   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
19728  ;;
19729 esac
19730
19731
19732 fi
19733 done
19734
19735
19736 fi
19737
19738 done
19739
19740                                 if test "$ac_cv_header_sys_sha2_h" = "yes"; then
19741                                         # this lib needed for sha2 on solaris
19742                                         LIBS="$LIBS -lmd"
19743                                 fi
19744                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19745 $as_echo_n "checking for library containing clock_gettime... " >&6; }
19746 if ${ac_cv_search_clock_gettime+:} false; then :
19747   $as_echo_n "(cached) " >&6
19748 else
19749   ac_func_search_save_LIBS=$LIBS
19750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19751 /* end confdefs.h.  */
19752
19753 /* Override any GCC internal prototype to avoid an error.
19754    Use char because int might match the return type of a GCC
19755    builtin and then its argument prototype would still apply.  */
19756 #ifdef __cplusplus
19757 extern "C"
19758 #endif
19759 char clock_gettime ();
19760 int
19761 main ()
19762 {
19763 return clock_gettime ();
19764   ;
19765   return 0;
19766 }
19767 _ACEOF
19768 for ac_lib in '' rt; do
19769   if test -z "$ac_lib"; then
19770     ac_res="none required"
19771   else
19772     ac_res=-l$ac_lib
19773     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19774   fi
19775   if ac_fn_c_try_link "$LINENO"; then :
19776   ac_cv_search_clock_gettime=$ac_res
19777 fi
19778 rm -f core conftest.err conftest.$ac_objext \
19779     conftest$ac_exeext
19780   if ${ac_cv_search_clock_gettime+:} false; then :
19781   break
19782 fi
19783 done
19784 if ${ac_cv_search_clock_gettime+:} false; then :
19785
19786 else
19787   ac_cv_search_clock_gettime=no
19788 fi
19789 rm conftest.$ac_ext
19790 LIBS=$ac_func_search_save_LIBS
19791 fi
19792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19793 $as_echo "$ac_cv_search_clock_gettime" >&6; }
19794 ac_res=$ac_cv_search_clock_gettime
19795 if test "$ac_res" != no; then :
19796   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19797
19798 fi
19799
19800                         ;;
19801                         *linux*|Linux|*)
19802                                 case " $LIBOBJS " in
19803   *" getentropy_linux.$ac_objext "* ) ;;
19804   *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
19805  ;;
19806 esac
19807
19808                                 for ac_func in SHA512_Update
19809 do :
19810   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
19811 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
19812   cat >>confdefs.h <<_ACEOF
19813 #define HAVE_SHA512_UPDATE 1
19814 _ACEOF
19815
19816 else
19817
19818
19819 $as_echo "#define COMPAT_SHA512 1" >>confdefs.h
19820
19821                                         case " $LIBOBJS " in
19822   *" sha512.$ac_objext "* ) ;;
19823   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
19824  ;;
19825 esac
19826
19827
19828 fi
19829 done
19830
19831                                 for ac_header in sys/sysctl.h
19832 do :
19833   ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
19834 "
19835 if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
19836   cat >>confdefs.h <<_ACEOF
19837 #define HAVE_SYS_SYSCTL_H 1
19838 _ACEOF
19839
19840 fi
19841
19842 done
19843
19844                                 for ac_func in getauxval
19845 do :
19846   ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
19847 if test "x$ac_cv_func_getauxval" = xyes; then :
19848   cat >>confdefs.h <<_ACEOF
19849 #define HAVE_GETAUXVAL 1
19850 _ACEOF
19851
19852 fi
19853 done
19854
19855                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19856 $as_echo_n "checking for library containing clock_gettime... " >&6; }
19857 if ${ac_cv_search_clock_gettime+:} false; then :
19858   $as_echo_n "(cached) " >&6
19859 else
19860   ac_func_search_save_LIBS=$LIBS
19861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19862 /* end confdefs.h.  */
19863
19864 /* Override any GCC internal prototype to avoid an error.
19865    Use char because int might match the return type of a GCC
19866    builtin and then its argument prototype would still apply.  */
19867 #ifdef __cplusplus
19868 extern "C"
19869 #endif
19870 char clock_gettime ();
19871 int
19872 main ()
19873 {
19874 return clock_gettime ();
19875   ;
19876   return 0;
19877 }
19878 _ACEOF
19879 for ac_lib in '' rt; do
19880   if test -z "$ac_lib"; then
19881     ac_res="none required"
19882   else
19883     ac_res=-l$ac_lib
19884     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19885   fi
19886   if ac_fn_c_try_link "$LINENO"; then :
19887   ac_cv_search_clock_gettime=$ac_res
19888 fi
19889 rm -f core conftest.err conftest.$ac_objext \
19890     conftest$ac_exeext
19891   if ${ac_cv_search_clock_gettime+:} false; then :
19892   break
19893 fi
19894 done
19895 if ${ac_cv_search_clock_gettime+:} false; then :
19896
19897 else
19898   ac_cv_search_clock_gettime=no
19899 fi
19900 rm conftest.$ac_ext
19901 LIBS=$ac_func_search_save_LIBS
19902 fi
19903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19904 $as_echo "$ac_cv_search_clock_gettime" >&6; }
19905 ac_res=$ac_cv_search_clock_gettime
19906 if test "$ac_res" != no; then :
19907   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19908
19909 fi
19910
19911                         ;;
19912                         esac
19913                     fi
19914
19915 fi
19916 done
19917
19918         fi
19919 fi
19920 LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
19921
19922 ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
19923 if test "x$ac_cv_func_ctime_r" = xyes; then :
19924   $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
19925
19926 else
19927   case " $LIBOBJS " in
19928   *" ctime_r.$ac_objext "* ) ;;
19929   *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
19930  ;;
19931 esac
19932
19933 fi
19934
19935
19936 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
19937 if test "x$ac_cv_func_strsep" = xyes; then :
19938   $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
19939
19940 else
19941   case " $LIBOBJS " in
19942   *" strsep.$ac_objext "* ) ;;
19943   *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
19944  ;;
19945 esac
19946
19947 fi
19948
19949
19950
19951 # Check whether --enable-allsymbols was given.
19952 if test "${enable_allsymbols+set}" = set; then :
19953   enableval=$enable_allsymbols;
19954 fi
19955
19956 case "$enable_allsymbols" in
19957         yes)
19958         COMMON_OBJ_ALL_SYMBOLS=""
19959         UBSYMS=""
19960         EXTRALINK="-L. -L.libs -lunbound"
19961
19962 $as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
19963
19964         ;;
19965         no|*)
19966         COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
19967         UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
19968         EXTRALINK=""
19969         ;;
19970 esac
19971
19972
19973
19974 if test x_$enable_lock_checks = x_yes; then
19975         UBSYMS="-export-symbols clubsyms.def"
19976         cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
19977         echo lock_protect >> clubsyms.def
19978         echo lock_unprotect >> clubsyms.def
19979         echo lock_get_mem >> clubsyms.def
19980         echo checklock_start >> clubsyms.def
19981         echo checklock_stop >> clubsyms.def
19982         echo checklock_lock >> clubsyms.def
19983         echo checklock_unlock >> clubsyms.def
19984         echo checklock_init >> clubsyms.def
19985         echo checklock_thrcreate >> clubsyms.def
19986         echo checklock_thrjoin >> clubsyms.def
19987 fi
19988
19989 # check for dnstap if requested
19990
19991   # Check whether --enable-dnstap was given.
19992 if test "${enable_dnstap+set}" = set; then :
19993   enableval=$enable_dnstap; opt_dnstap=$enableval
19994 else
19995   opt_dnstap=no
19996 fi
19997
19998
19999
20000 # Check whether --with-dnstap-socket-path was given.
20001 if test "${with_dnstap_socket_path+set}" = set; then :
20002   withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
20003 else
20004   opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
20005 fi
20006
20007
20008   if test "x$opt_dnstap" != "xno"; then
20009     # Extract the first word of "protoc-c", so it can be a program name with args.
20010 set dummy protoc-c; ac_word=$2
20011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20012 $as_echo_n "checking for $ac_word... " >&6; }
20013 if ${ac_cv_path_PROTOC_C+:} false; then :
20014   $as_echo_n "(cached) " >&6
20015 else
20016   case $PROTOC_C in
20017   [\\/]* | ?:[\\/]*)
20018   ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
20019   ;;
20020   *)
20021   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20022 for as_dir in $PATH
20023 do
20024   IFS=$as_save_IFS
20025   test -z "$as_dir" && as_dir=.
20026     for ac_exec_ext in '' $ac_executable_extensions; do
20027   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20028     ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
20029     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20030     break 2
20031   fi
20032 done
20033   done
20034 IFS=$as_save_IFS
20035
20036   ;;
20037 esac
20038 fi
20039 PROTOC_C=$ac_cv_path_PROTOC_C
20040 if test -n "$PROTOC_C"; then
20041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
20042 $as_echo "$PROTOC_C" >&6; }
20043 else
20044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20045 $as_echo "no" >&6; }
20046 fi
20047
20048
20049     if test -z "$PROTOC_C"; then
20050       as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
20051     fi
20052
20053 # Check whether --with-protobuf-c was given.
20054 if test "${with_protobuf_c+set}" = set; then :
20055   withval=$with_protobuf_c;
20056           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
20057           if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
20058             CFLAGS="$CFLAGS -I$withval/include/google"
20059           else
20060             CFLAGS="$CFLAGS -I$withval/include"
20061           fi
20062           LDFLAGS="$LDFLAGS -L$withval/lib"
20063
20064 else
20065
20066           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
20067           if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
20068             CFLAGS="$CFLAGS -I/usr/include/google"
20069           else
20070             if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
20071               CFLAGS="$CFLAGS -I/usr/local/include/google"
20072               LDFLAGS="$LDFLAGS -L/usr/local/lib"
20073             fi
20074           fi
20075
20076 fi
20077
20078
20079 # Check whether --with-libfstrm was given.
20080 if test "${with_libfstrm+set}" = set; then :
20081   withval=$with_libfstrm;
20082         CFLAGS="$CFLAGS -I$withval/include"
20083         LDFLAGS="$LDFLAGS -L$withval/lib"
20084
20085 fi
20086
20087     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fstrm_iothr_init" >&5
20088 $as_echo_n "checking for library containing fstrm_iothr_init... " >&6; }
20089 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20090   $as_echo_n "(cached) " >&6
20091 else
20092   ac_func_search_save_LIBS=$LIBS
20093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20094 /* end confdefs.h.  */
20095
20096 /* Override any GCC internal prototype to avoid an error.
20097    Use char because int might match the return type of a GCC
20098    builtin and then its argument prototype would still apply.  */
20099 #ifdef __cplusplus
20100 extern "C"
20101 #endif
20102 char fstrm_iothr_init ();
20103 int
20104 main ()
20105 {
20106 return fstrm_iothr_init ();
20107   ;
20108   return 0;
20109 }
20110 _ACEOF
20111 for ac_lib in '' fstrm; do
20112   if test -z "$ac_lib"; then
20113     ac_res="none required"
20114   else
20115     ac_res=-l$ac_lib
20116     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20117   fi
20118   if ac_fn_c_try_link "$LINENO"; then :
20119   ac_cv_search_fstrm_iothr_init=$ac_res
20120 fi
20121 rm -f core conftest.err conftest.$ac_objext \
20122     conftest$ac_exeext
20123   if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20124   break
20125 fi
20126 done
20127 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20128
20129 else
20130   ac_cv_search_fstrm_iothr_init=no
20131 fi
20132 rm conftest.$ac_ext
20133 LIBS=$ac_func_search_save_LIBS
20134 fi
20135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fstrm_iothr_init" >&5
20136 $as_echo "$ac_cv_search_fstrm_iothr_init" >&6; }
20137 ac_res=$ac_cv_search_fstrm_iothr_init
20138 if test "$ac_res" != no; then :
20139   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20140
20141 else
20142   as_fn_error $? "The fstrm library was not found. Please install fstrm!" "$LINENO" 5
20143 fi
20144
20145     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
20146 $as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
20147 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20148   $as_echo_n "(cached) " >&6
20149 else
20150   ac_func_search_save_LIBS=$LIBS
20151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20152 /* end confdefs.h.  */
20153
20154 /* Override any GCC internal prototype to avoid an error.
20155    Use char because int might match the return type of a GCC
20156    builtin and then its argument prototype would still apply.  */
20157 #ifdef __cplusplus
20158 extern "C"
20159 #endif
20160 char protobuf_c_message_pack ();
20161 int
20162 main ()
20163 {
20164 return protobuf_c_message_pack ();
20165   ;
20166   return 0;
20167 }
20168 _ACEOF
20169 for ac_lib in '' protobuf-c; do
20170   if test -z "$ac_lib"; then
20171     ac_res="none required"
20172   else
20173     ac_res=-l$ac_lib
20174     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20175   fi
20176   if ac_fn_c_try_link "$LINENO"; then :
20177   ac_cv_search_protobuf_c_message_pack=$ac_res
20178 fi
20179 rm -f core conftest.err conftest.$ac_objext \
20180     conftest$ac_exeext
20181   if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20182   break
20183 fi
20184 done
20185 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20186
20187 else
20188   ac_cv_search_protobuf_c_message_pack=no
20189 fi
20190 rm conftest.$ac_ext
20191 LIBS=$ac_func_search_save_LIBS
20192 fi
20193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
20194 $as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
20195 ac_res=$ac_cv_search_protobuf_c_message_pack
20196 if test "$ac_res" != no; then :
20197   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20198
20199 else
20200   as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
20201 fi
20202
20203
20204
20205 $as_echo "#define USE_DNSTAP 1" >>confdefs.h
20206
20207         ENABLE_DNSTAP=1
20208
20209
20210
20211         hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
20212
20213
20214 cat >>confdefs.h <<_ACEOF
20215 #define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
20216 _ACEOF
20217
20218
20219         DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c"
20220
20221         DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo"
20222
20223
20224   else
20225
20226         ENABLE_DNSTAP=0
20227
20228
20229
20230   fi
20231
20232
20233 # check for dnscrypt if requested
20234
20235   # Check whether --enable-dnscrypt was given.
20236 if test "${enable_dnscrypt+set}" = set; then :
20237   enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
20238 else
20239   opt_dnscrypt=no
20240 fi
20241
20242
20243   if test "x$opt_dnscrypt" != "xno"; then
20244
20245 # Check whether --with-libsodium was given.
20246 if test "${with_libsodium+set}" = set; then :
20247   withval=$with_libsodium;
20248         CFLAGS="$CFLAGS -I$withval/include"
20249         LDFLAGS="$LDFLAGS -L$withval/lib"
20250
20251 fi
20252
20253     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
20254 $as_echo_n "checking for library containing sodium_init... " >&6; }
20255 if ${ac_cv_search_sodium_init+:} false; then :
20256   $as_echo_n "(cached) " >&6
20257 else
20258   ac_func_search_save_LIBS=$LIBS
20259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20260 /* end confdefs.h.  */
20261
20262 /* Override any GCC internal prototype to avoid an error.
20263    Use char because int might match the return type of a GCC
20264    builtin and then its argument prototype would still apply.  */
20265 #ifdef __cplusplus
20266 extern "C"
20267 #endif
20268 char sodium_init ();
20269 int
20270 main ()
20271 {
20272 return sodium_init ();
20273   ;
20274   return 0;
20275 }
20276 _ACEOF
20277 for ac_lib in '' sodium; do
20278   if test -z "$ac_lib"; then
20279     ac_res="none required"
20280   else
20281     ac_res=-l$ac_lib
20282     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20283   fi
20284   if ac_fn_c_try_link "$LINENO"; then :
20285   ac_cv_search_sodium_init=$ac_res
20286 fi
20287 rm -f core conftest.err conftest.$ac_objext \
20288     conftest$ac_exeext
20289   if ${ac_cv_search_sodium_init+:} false; then :
20290   break
20291 fi
20292 done
20293 if ${ac_cv_search_sodium_init+:} false; then :
20294
20295 else
20296   ac_cv_search_sodium_init=no
20297 fi
20298 rm conftest.$ac_ext
20299 LIBS=$ac_func_search_save_LIBS
20300 fi
20301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
20302 $as_echo "$ac_cv_search_sodium_init" >&6; }
20303 ac_res=$ac_cv_search_sodium_init
20304 if test "$ac_res" != no; then :
20305   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20306
20307 else
20308   as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
20309 fi
20310
20311
20312
20313 $as_echo "#define USE_DNSCRYPT 1" >>confdefs.h
20314
20315         ENABLE_DNSCRYPT=1
20316
20317
20318         DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
20319
20320         DNSCRYPT_OBJ="dnscrypt.lo"
20321
20322
20323   else
20324
20325         ENABLE_DNSCRYPT=0
20326
20327
20328
20329   fi
20330
20331
20332 # check for cachedb if requested
20333 # Check whether --enable-cachedb was given.
20334 if test "${enable_cachedb+set}" = set; then :
20335   enableval=$enable_cachedb;
20336 fi
20337
20338 case "$enable_cachedb" in
20339     yes)
20340
20341 $as_echo "#define USE_CACHEDB 1" >>confdefs.h
20342
20343         ;;
20344     no|*)
20345         # nothing
20346         ;;
20347 esac
20348
20349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
20350 $as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
20351 # on openBSD, the implicit rule make $< work.
20352 # on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
20353 # gmake works.
20354 cat >conftest.make <<EOF
20355 all:    conftest.lo
20356
20357 conftest.lo foo.lo bla.lo:
20358         if test -f "\$<"; then touch \$@; fi
20359
20360 .SUFFIXES: .lo
20361 .c.lo:
20362         if test -f "\$<"; then touch \$@; fi
20363
20364 conftest.lo:        conftest.dir/conftest.c
20365 EOF
20366 mkdir conftest.dir
20367 touch conftest.dir/conftest.c
20368 rm -f conftest.lo conftest.c
20369 ${MAKE:-make} -f conftest.make >/dev/null
20370 rm -f conftest.make conftest.c conftest.dir/conftest.c
20371 rm -rf conftest.dir
20372 if test ! -f conftest.lo; then
20373         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20374 $as_echo "no" >&6; }
20375         SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
20376         SOURCEFILE='`cat .source`'
20377 else
20378         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20379 $as_echo "yes" >&6; }
20380         SOURCEDETERMINE=':'
20381         SOURCEFILE='$<'
20382 fi
20383 rm -f conftest.lo
20384
20385
20386
20387 # see if we want to build the library or everything
20388 ALLTARGET="alltargets"
20389 INSTALLTARGET="install-all"
20390
20391 # Check whether --with-libunbound-only was given.
20392 if test "${with_libunbound_only+set}" = set; then :
20393   withval=$with_libunbound_only;
20394         if test "$withval" = "yes"; then
20395                 ALLTARGET="lib"
20396                 INSTALLTARGET="install-lib"
20397         fi
20398
20399 fi
20400
20401
20402
20403
20404
20405   { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
20406 $as_echo "$as_me: Stripping extension flags..." >&6;}
20407
20408   if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
20409     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
20410
20411 $as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
20412
20413   fi
20414
20415
20416   if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
20417     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
20418
20419 $as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
20420
20421   fi
20422
20423
20424   if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
20425     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
20426
20427 $as_echo "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
20428
20429   fi
20430
20431
20432   if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
20433     CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
20434
20435 $as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
20436
20437   fi
20438
20439
20440   if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
20441     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
20442
20443 $as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
20444
20445   fi
20446
20447
20448   if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
20449     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
20450
20451 $as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
20452
20453   fi
20454
20455
20456   if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
20457     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
20458
20459 $as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
20460
20461   fi
20462
20463
20464   if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
20465     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
20466
20467 $as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
20468
20469   fi
20470
20471
20472   if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
20473     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
20474
20475 $as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
20476
20477   fi
20478
20479
20480 LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
20481
20482
20483 cat >>confdefs.h <<_ACEOF
20484 #define MAXSYSLOGMSGLEN 10240
20485 _ACEOF
20486
20487
20488
20489
20490 version=1.6.2
20491
20492 date=`date +'%b %e, %Y'`
20493
20494
20495 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"
20496
20497 ac_config_headers="$ac_config_headers config.h"
20498
20499 cat >confcache <<\_ACEOF
20500 # This file is a shell script that caches the results of configure
20501 # tests run on this system so they can be shared between configure
20502 # scripts and configure runs, see configure's option --config-cache.
20503 # It is not useful on other systems.  If it contains results you don't
20504 # want to keep, you may remove or edit it.
20505 #
20506 # config.status only pays attention to the cache file if you give it
20507 # the --recheck option to rerun configure.
20508 #
20509 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20510 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20511 # following values.
20512
20513 _ACEOF
20514
20515 # The following way of writing the cache mishandles newlines in values,
20516 # but we know of no workaround that is simple, portable, and efficient.
20517 # So, we kill variables containing newlines.
20518 # Ultrix sh set writes to stderr and can't be redirected directly,
20519 # and sets the high bit in the cache file unless we assign to the vars.
20520 (
20521   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20522     eval ac_val=\$$ac_var
20523     case $ac_val in #(
20524     *${as_nl}*)
20525       case $ac_var in #(
20526       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20527 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
20528       esac
20529       case $ac_var in #(
20530       _ | IFS | as_nl) ;; #(
20531       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
20532       *) { eval $ac_var=; unset $ac_var;} ;;
20533       esac ;;
20534     esac
20535   done
20536
20537   (set) 2>&1 |
20538     case $as_nl`(ac_space=' '; set) 2>&1` in #(
20539     *${as_nl}ac_space=\ *)
20540       # `set' does not quote correctly, so add quotes: double-quote
20541       # substitution turns \\\\ into \\, and sed turns \\ into \.
20542       sed -n \
20543         "s/'/'\\\\''/g;
20544           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20545       ;; #(
20546     *)
20547       # `set' quotes correctly as required by POSIX, so do not add quotes.
20548       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20549       ;;
20550     esac |
20551     sort
20552 ) |
20553   sed '
20554      /^ac_cv_env_/b end
20555      t clear
20556      :clear
20557      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20558      t end
20559      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20560      :end' >>confcache
20561 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20562   if test -w "$cache_file"; then
20563     if test "x$cache_file" != "x/dev/null"; then
20564       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
20565 $as_echo "$as_me: updating cache $cache_file" >&6;}
20566       if test ! -f "$cache_file" || test -h "$cache_file"; then
20567         cat confcache >"$cache_file"
20568       else
20569         case $cache_file in #(
20570         */* | ?:*)
20571           mv -f confcache "$cache_file"$$ &&
20572           mv -f "$cache_file"$$ "$cache_file" ;; #(
20573         *)
20574           mv -f confcache "$cache_file" ;;
20575         esac
20576       fi
20577     fi
20578   else
20579     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
20580 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20581   fi
20582 fi
20583 rm -f confcache
20584
20585 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20586 # Let make expand exec_prefix.
20587 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20588
20589 DEFS=-DHAVE_CONFIG_H
20590
20591 ac_libobjs=
20592 ac_ltlibobjs=
20593 U=
20594 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20595   # 1. Remove the extension, and $U if already installed.
20596   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20597   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
20598   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
20599   #    will be set to the directory where LIBOBJS objects are built.
20600   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20601   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
20602 done
20603 LIBOBJS=$ac_libobjs
20604
20605 LTLIBOBJS=$ac_ltlibobjs
20606
20607
20608 if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
20609   as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
20610 Usually this means the macro was only invoked conditionally." "$LINENO" 5
20611 fi
20612
20613 : "${CONFIG_STATUS=./config.status}"
20614 ac_write_fail=0
20615 ac_clean_files_save=$ac_clean_files
20616 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20617 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20618 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
20619 as_write_fail=0
20620 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
20621 #! $SHELL
20622 # Generated by $as_me.
20623 # Run this file to recreate the current configuration.
20624 # Compiler output produced by configure, useful for debugging
20625 # configure, is in config.log if it exists.
20626
20627 debug=false
20628 ac_cs_recheck=false
20629 ac_cs_silent=false
20630
20631 SHELL=\${CONFIG_SHELL-$SHELL}
20632 export SHELL
20633 _ASEOF
20634 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20635 ## -------------------- ##
20636 ## M4sh Initialization. ##
20637 ## -------------------- ##
20638
20639 # Be more Bourne compatible
20640 DUALCASE=1; export DUALCASE # for MKS sh
20641 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20642   emulate sh
20643   NULLCMD=:
20644   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20645   # is contrary to our usage.  Disable this feature.
20646   alias -g '${1+"$@"}'='"$@"'
20647   setopt NO_GLOB_SUBST
20648 else
20649   case `(set -o) 2>/dev/null` in #(
20650   *posix*) :
20651     set -o posix ;; #(
20652   *) :
20653      ;;
20654 esac
20655 fi
20656
20657
20658 as_nl='
20659 '
20660 export as_nl
20661 # Printing a long string crashes Solaris 7 /usr/bin/printf.
20662 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
20663 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
20664 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
20665 # Prefer a ksh shell builtin over an external printf program on Solaris,
20666 # but without wasting forks for bash or zsh.
20667 if test -z "$BASH_VERSION$ZSH_VERSION" \
20668     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
20669   as_echo='print -r --'
20670   as_echo_n='print -rn --'
20671 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
20672   as_echo='printf %s\n'
20673   as_echo_n='printf %s'
20674 else
20675   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
20676     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
20677     as_echo_n='/usr/ucb/echo -n'
20678   else
20679     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
20680     as_echo_n_body='eval
20681       arg=$1;
20682       case $arg in #(
20683       *"$as_nl"*)
20684         expr "X$arg" : "X\\(.*\\)$as_nl";
20685         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
20686       esac;
20687       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
20688     '
20689     export as_echo_n_body
20690     as_echo_n='sh -c $as_echo_n_body as_echo'
20691   fi
20692   export as_echo_body
20693   as_echo='sh -c $as_echo_body as_echo'
20694 fi
20695
20696 # The user is always right.
20697 if test "${PATH_SEPARATOR+set}" != set; then
20698   PATH_SEPARATOR=:
20699   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20700     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20701       PATH_SEPARATOR=';'
20702   }
20703 fi
20704
20705
20706 # IFS
20707 # We need space, tab and new line, in precisely that order.  Quoting is
20708 # there to prevent editors from complaining about space-tab.
20709 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20710 # splitting by setting IFS to empty value.)
20711 IFS=" ""        $as_nl"
20712
20713 # Find who we are.  Look in the path if we contain no directory separator.
20714 as_myself=
20715 case $0 in #((
20716   *[\\/]* ) as_myself=$0 ;;
20717   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20718 for as_dir in $PATH
20719 do
20720   IFS=$as_save_IFS
20721   test -z "$as_dir" && as_dir=.
20722     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20723   done
20724 IFS=$as_save_IFS
20725
20726      ;;
20727 esac
20728 # We did not find ourselves, most probably we were run as `sh COMMAND'
20729 # in which case we are not to be found in the path.
20730 if test "x$as_myself" = x; then
20731   as_myself=$0
20732 fi
20733 if test ! -f "$as_myself"; then
20734   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20735   exit 1
20736 fi
20737
20738 # Unset variables that we do not need and which cause bugs (e.g. in
20739 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
20740 # suppresses any "Segmentation fault" message there.  '((' could
20741 # trigger a bug in pdksh 5.2.14.
20742 for as_var in BASH_ENV ENV MAIL MAILPATH
20743 do eval test x\${$as_var+set} = xset \
20744   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20745 done
20746 PS1='$ '
20747 PS2='> '
20748 PS4='+ '
20749
20750 # NLS nuisances.
20751 LC_ALL=C
20752 export LC_ALL
20753 LANGUAGE=C
20754 export LANGUAGE
20755
20756 # CDPATH.
20757 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20758
20759
20760 # as_fn_error STATUS ERROR [LINENO LOG_FD]
20761 # ----------------------------------------
20762 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20763 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
20764 # script with STATUS, using 1 if that was 0.
20765 as_fn_error ()
20766 {
20767   as_status=$1; test $as_status -eq 0 && as_status=1
20768   if test "$4"; then
20769     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20770     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
20771   fi
20772   $as_echo "$as_me: error: $2" >&2
20773   as_fn_exit $as_status
20774 } # as_fn_error
20775
20776
20777 # as_fn_set_status STATUS
20778 # -----------------------
20779 # Set $? to STATUS, without forking.
20780 as_fn_set_status ()
20781 {
20782   return $1
20783 } # as_fn_set_status
20784
20785 # as_fn_exit STATUS
20786 # -----------------
20787 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20788 as_fn_exit ()
20789 {
20790   set +e
20791   as_fn_set_status $1
20792   exit $1
20793 } # as_fn_exit
20794
20795 # as_fn_unset VAR
20796 # ---------------
20797 # Portably unset VAR.
20798 as_fn_unset ()
20799 {
20800   { eval $1=; unset $1;}
20801 }
20802 as_unset=as_fn_unset
20803 # as_fn_append VAR VALUE
20804 # ----------------------
20805 # Append the text in VALUE to the end of the definition contained in VAR. Take
20806 # advantage of any shell optimizations that allow amortized linear growth over
20807 # repeated appends, instead of the typical quadratic growth present in naive
20808 # implementations.
20809 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20810   eval 'as_fn_append ()
20811   {
20812     eval $1+=\$2
20813   }'
20814 else
20815   as_fn_append ()
20816   {
20817     eval $1=\$$1\$2
20818   }
20819 fi # as_fn_append
20820
20821 # as_fn_arith ARG...
20822 # ------------------
20823 # Perform arithmetic evaluation on the ARGs, and store the result in the
20824 # global $as_val. Take advantage of shells that can avoid forks. The arguments
20825 # must be portable across $(()) and expr.
20826 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20827   eval 'as_fn_arith ()
20828   {
20829     as_val=$(( $* ))
20830   }'
20831 else
20832   as_fn_arith ()
20833   {
20834     as_val=`expr "$@" || test $? -eq 1`
20835   }
20836 fi # as_fn_arith
20837
20838
20839 if expr a : '\(a\)' >/dev/null 2>&1 &&
20840    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20841   as_expr=expr
20842 else
20843   as_expr=false
20844 fi
20845
20846 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20847   as_basename=basename
20848 else
20849   as_basename=false
20850 fi
20851
20852 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20853   as_dirname=dirname
20854 else
20855   as_dirname=false
20856 fi
20857
20858 as_me=`$as_basename -- "$0" ||
20859 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20860          X"$0" : 'X\(//\)$' \| \
20861          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20862 $as_echo X/"$0" |
20863     sed '/^.*\/\([^/][^/]*\)\/*$/{
20864             s//\1/
20865             q
20866           }
20867           /^X\/\(\/\/\)$/{
20868             s//\1/
20869             q
20870           }
20871           /^X\/\(\/\).*/{
20872             s//\1/
20873             q
20874           }
20875           s/.*/./; q'`
20876
20877 # Avoid depending upon Character Ranges.
20878 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20879 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20880 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20881 as_cr_digits='0123456789'
20882 as_cr_alnum=$as_cr_Letters$as_cr_digits
20883
20884 ECHO_C= ECHO_N= ECHO_T=
20885 case `echo -n x` in #(((((
20886 -n*)
20887   case `echo 'xy\c'` in
20888   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
20889   xy)  ECHO_C='\c';;
20890   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
20891        ECHO_T=' ';;
20892   esac;;
20893 *)
20894   ECHO_N='-n';;
20895 esac
20896
20897 rm -f conf$$ conf$$.exe conf$$.file
20898 if test -d conf$$.dir; then
20899   rm -f conf$$.dir/conf$$.file
20900 else
20901   rm -f conf$$.dir
20902   mkdir conf$$.dir 2>/dev/null
20903 fi
20904 if (echo >conf$$.file) 2>/dev/null; then
20905   if ln -s conf$$.file conf$$ 2>/dev/null; then
20906     as_ln_s='ln -s'
20907     # ... but there are two gotchas:
20908     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20909     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20910     # In both cases, we have to default to `cp -pR'.
20911     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20912       as_ln_s='cp -pR'
20913   elif ln conf$$.file conf$$ 2>/dev/null; then
20914     as_ln_s=ln
20915   else
20916     as_ln_s='cp -pR'
20917   fi
20918 else
20919   as_ln_s='cp -pR'
20920 fi
20921 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20922 rmdir conf$$.dir 2>/dev/null
20923
20924
20925 # as_fn_mkdir_p
20926 # -------------
20927 # Create "$as_dir" as a directory, including parents if necessary.
20928 as_fn_mkdir_p ()
20929 {
20930
20931   case $as_dir in #(
20932   -*) as_dir=./$as_dir;;
20933   esac
20934   test -d "$as_dir" || eval $as_mkdir_p || {
20935     as_dirs=
20936     while :; do
20937       case $as_dir in #(
20938       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20939       *) as_qdir=$as_dir;;
20940       esac
20941       as_dirs="'$as_qdir' $as_dirs"
20942       as_dir=`$as_dirname -- "$as_dir" ||
20943 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20944          X"$as_dir" : 'X\(//\)[^/]' \| \
20945          X"$as_dir" : 'X\(//\)$' \| \
20946          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20947 $as_echo X"$as_dir" |
20948     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20949             s//\1/
20950             q
20951           }
20952           /^X\(\/\/\)[^/].*/{
20953             s//\1/
20954             q
20955           }
20956           /^X\(\/\/\)$/{
20957             s//\1/
20958             q
20959           }
20960           /^X\(\/\).*/{
20961             s//\1/
20962             q
20963           }
20964           s/.*/./; q'`
20965       test -d "$as_dir" && break
20966     done
20967     test -z "$as_dirs" || eval "mkdir $as_dirs"
20968   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20969
20970
20971 } # as_fn_mkdir_p
20972 if mkdir -p . 2>/dev/null; then
20973   as_mkdir_p='mkdir -p "$as_dir"'
20974 else
20975   test -d ./-p && rmdir ./-p
20976   as_mkdir_p=false
20977 fi
20978
20979
20980 # as_fn_executable_p FILE
20981 # -----------------------
20982 # Test if FILE is an executable regular file.
20983 as_fn_executable_p ()
20984 {
20985   test -f "$1" && test -x "$1"
20986 } # as_fn_executable_p
20987 as_test_x='test -x'
20988 as_executable_p=as_fn_executable_p
20989
20990 # Sed expression to map a string onto a valid CPP name.
20991 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20992
20993 # Sed expression to map a string onto a valid variable name.
20994 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20995
20996
20997 exec 6>&1
20998 ## ----------------------------------- ##
20999 ## Main body of $CONFIG_STATUS script. ##
21000 ## ----------------------------------- ##
21001 _ASEOF
21002 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
21003
21004 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21005 # Save the log message, to keep $0 and so on meaningful, and to
21006 # report actual input values of CONFIG_FILES etc. instead of their
21007 # values after options handling.
21008 ac_log="
21009 This file was extended by unbound $as_me 1.6.2, which was
21010 generated by GNU Autoconf 2.69.  Invocation command line was
21011
21012   CONFIG_FILES    = $CONFIG_FILES
21013   CONFIG_HEADERS  = $CONFIG_HEADERS
21014   CONFIG_LINKS    = $CONFIG_LINKS
21015   CONFIG_COMMANDS = $CONFIG_COMMANDS
21016   $ $0 $@
21017
21018 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21019 "
21020
21021 _ACEOF
21022
21023 case $ac_config_files in *"
21024 "*) set x $ac_config_files; shift; ac_config_files=$*;;
21025 esac
21026
21027 case $ac_config_headers in *"
21028 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
21029 esac
21030
21031
21032 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21033 # Files that config.status was made for.
21034 config_files="$ac_config_files"
21035 config_headers="$ac_config_headers"
21036 config_commands="$ac_config_commands"
21037
21038 _ACEOF
21039
21040 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21041 ac_cs_usage="\
21042 \`$as_me' instantiates files and other configuration actions
21043 from templates according to the current configuration.  Unless the files
21044 and actions are specified as TAGs, all are instantiated by default.
21045
21046 Usage: $0 [OPTION]... [TAG]...
21047
21048   -h, --help       print this help, then exit
21049   -V, --version    print version number and configuration settings, then exit
21050       --config     print configuration, then exit
21051   -q, --quiet, --silent
21052                    do not print progress messages
21053   -d, --debug      don't remove temporary files
21054       --recheck    update $as_me by reconfiguring in the same conditions
21055       --file=FILE[:TEMPLATE]
21056                    instantiate the configuration file FILE
21057       --header=FILE[:TEMPLATE]
21058                    instantiate the configuration header FILE
21059
21060 Configuration files:
21061 $config_files
21062
21063 Configuration headers:
21064 $config_headers
21065
21066 Configuration commands:
21067 $config_commands
21068
21069 Report bugs to <unbound-bugs@nlnetlabs.nl>."
21070
21071 _ACEOF
21072 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21073 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
21074 ac_cs_version="\\
21075 unbound config.status 1.6.2
21076 configured by $0, generated by GNU Autoconf 2.69,
21077   with options \\"\$ac_cs_config\\"
21078
21079 Copyright (C) 2012 Free Software Foundation, Inc.
21080 This config.status script is free software; the Free Software Foundation
21081 gives unlimited permission to copy, distribute and modify it."
21082
21083 ac_pwd='$ac_pwd'
21084 srcdir='$srcdir'
21085 AWK='$AWK'
21086 test -n "\$AWK" || AWK=awk
21087 _ACEOF
21088
21089 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21090 # The default lists apply if the user does not specify any file.
21091 ac_need_defaults=:
21092 while test $# != 0
21093 do
21094   case $1 in
21095   --*=?*)
21096     ac_option=`expr "X$1" : 'X\([^=]*\)='`
21097     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
21098     ac_shift=:
21099     ;;
21100   --*=)
21101     ac_option=`expr "X$1" : 'X\([^=]*\)='`
21102     ac_optarg=
21103     ac_shift=:
21104     ;;
21105   *)
21106     ac_option=$1
21107     ac_optarg=$2
21108     ac_shift=shift
21109     ;;
21110   esac
21111
21112   case $ac_option in
21113   # Handling of the options.
21114   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21115     ac_cs_recheck=: ;;
21116   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
21117     $as_echo "$ac_cs_version"; exit ;;
21118   --config | --confi | --conf | --con | --co | --c )
21119     $as_echo "$ac_cs_config"; exit ;;
21120   --debug | --debu | --deb | --de | --d | -d )
21121     debug=: ;;
21122   --file | --fil | --fi | --f )
21123     $ac_shift
21124     case $ac_optarg in
21125     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21126     '') as_fn_error $? "missing file argument" ;;
21127     esac
21128     as_fn_append CONFIG_FILES " '$ac_optarg'"
21129     ac_need_defaults=false;;
21130   --header | --heade | --head | --hea )
21131     $ac_shift
21132     case $ac_optarg in
21133     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21134     esac
21135     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
21136     ac_need_defaults=false;;
21137   --he | --h)
21138     # Conflict between --help and --header
21139     as_fn_error $? "ambiguous option: \`$1'
21140 Try \`$0 --help' for more information.";;
21141   --help | --hel | -h )
21142     $as_echo "$ac_cs_usage"; exit ;;
21143   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21144   | -silent | --silent | --silen | --sile | --sil | --si | --s)
21145     ac_cs_silent=: ;;
21146
21147   # This is an error.
21148   -*) as_fn_error $? "unrecognized option: \`$1'
21149 Try \`$0 --help' for more information." ;;
21150
21151   *) as_fn_append ac_config_targets " $1"
21152      ac_need_defaults=false ;;
21153
21154   esac
21155   shift
21156 done
21157
21158 ac_configure_extra_args=
21159
21160 if $ac_cs_silent; then
21161   exec 6>/dev/null
21162   ac_configure_extra_args="$ac_configure_extra_args --silent"
21163 fi
21164
21165 _ACEOF
21166 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21167 if \$ac_cs_recheck; then
21168   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21169   shift
21170   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
21171   CONFIG_SHELL='$SHELL'
21172   export CONFIG_SHELL
21173   exec "\$@"
21174 fi
21175
21176 _ACEOF
21177 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21178 exec 5>>config.log
21179 {
21180   echo
21181   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21182 ## Running $as_me. ##
21183 _ASBOX
21184   $as_echo "$ac_log"
21185 } >&5
21186
21187 _ACEOF
21188 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21189 #
21190 # INIT-COMMANDS
21191 #
21192
21193
21194 # The HP-UX ksh and POSIX shell print the target directory to stdout
21195 # if CDPATH is set.
21196 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21197
21198 sed_quote_subst='$sed_quote_subst'
21199 double_quote_subst='$double_quote_subst'
21200 delay_variable_subst='$delay_variable_subst'
21201 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
21202 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
21203 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
21204 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
21205 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
21206 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
21207 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
21208 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
21209 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
21210 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
21211 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
21212 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
21213 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
21214 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
21215 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
21216 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
21217 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
21218 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
21219 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
21220 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
21221 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
21222 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
21223 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
21224 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
21225 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
21226 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
21227 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
21228 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
21229 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
21230 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
21231 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
21232 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
21233 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
21234 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
21235 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
21236 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
21237 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
21238 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
21239 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
21240 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
21241 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
21242 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
21243 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
21244 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
21245 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
21246 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
21247 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
21248 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
21249 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
21250 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
21251 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
21252 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
21253 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
21254 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
21255 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
21256 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
21257 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
21258 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
21259 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"`'
21260 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
21261 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
21262 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
21263 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
21264 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
21265 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
21266 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
21267 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
21268 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
21269 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
21270 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
21271 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
21272 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
21273 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
21274 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
21275 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
21276 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
21277 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
21278 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
21279 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
21280 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
21281 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
21282 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
21283 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
21284 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
21285 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
21286 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
21287 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
21288 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
21289 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
21290 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
21291 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
21292 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
21293 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
21294 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
21295 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
21296 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
21297 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
21298 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
21299 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
21300 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
21301 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
21302 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
21303 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
21304 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
21305 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
21306 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
21307 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
21308 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
21309 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
21310 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
21311 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
21312 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
21313 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
21314 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
21315 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
21316 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
21317 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
21318 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
21319 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
21320 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
21321 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
21322 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
21323 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
21324 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
21325 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
21326 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
21327 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
21328 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
21329 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
21330 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
21331 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
21332 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
21333 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
21334 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
21335 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
21336
21337 LTCC='$LTCC'
21338 LTCFLAGS='$LTCFLAGS'
21339 compiler='$compiler_DEFAULT'
21340
21341 # A function that is used when there is no print builtin or printf.
21342 func_fallback_echo ()
21343 {
21344   eval 'cat <<_LTECHO_EOF
21345 \$1
21346 _LTECHO_EOF'
21347 }
21348
21349 # Quote evaled strings.
21350 for var in SHELL \
21351 ECHO \
21352 PATH_SEPARATOR \
21353 SED \
21354 GREP \
21355 EGREP \
21356 FGREP \
21357 LD \
21358 NM \
21359 LN_S \
21360 lt_SP2NL \
21361 lt_NL2SP \
21362 reload_flag \
21363 OBJDUMP \
21364 deplibs_check_method \
21365 file_magic_cmd \
21366 file_magic_glob \
21367 want_nocaseglob \
21368 DLLTOOL \
21369 sharedlib_from_linklib_cmd \
21370 AR \
21371 AR_FLAGS \
21372 archiver_list_spec \
21373 STRIP \
21374 RANLIB \
21375 CC \
21376 CFLAGS \
21377 compiler \
21378 lt_cv_sys_global_symbol_pipe \
21379 lt_cv_sys_global_symbol_to_cdecl \
21380 lt_cv_sys_global_symbol_to_import \
21381 lt_cv_sys_global_symbol_to_c_name_address \
21382 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
21383 lt_cv_nm_interface \
21384 nm_file_list_spec \
21385 lt_cv_truncate_bin \
21386 lt_prog_compiler_no_builtin_flag \
21387 lt_prog_compiler_pic \
21388 lt_prog_compiler_wl \
21389 lt_prog_compiler_static \
21390 lt_cv_prog_compiler_c_o \
21391 need_locks \
21392 MANIFEST_TOOL \
21393 DSYMUTIL \
21394 NMEDIT \
21395 LIPO \
21396 OTOOL \
21397 OTOOL64 \
21398 shrext_cmds \
21399 export_dynamic_flag_spec \
21400 whole_archive_flag_spec \
21401 compiler_needs_object \
21402 with_gnu_ld \
21403 allow_undefined_flag \
21404 no_undefined_flag \
21405 hardcode_libdir_flag_spec \
21406 hardcode_libdir_separator \
21407 exclude_expsyms \
21408 include_expsyms \
21409 file_list_spec \
21410 variables_saved_for_relink \
21411 libname_spec \
21412 library_names_spec \
21413 soname_spec \
21414 install_override_mode \
21415 finish_eval \
21416 old_striplib \
21417 striplib; do
21418     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
21419     *[\\\\\\\`\\"\\\$]*)
21420       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
21421       ;;
21422     *)
21423       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
21424       ;;
21425     esac
21426 done
21427
21428 # Double-quote double-evaled strings.
21429 for var in reload_cmds \
21430 old_postinstall_cmds \
21431 old_postuninstall_cmds \
21432 old_archive_cmds \
21433 extract_expsyms_cmds \
21434 old_archive_from_new_cmds \
21435 old_archive_from_expsyms_cmds \
21436 archive_cmds \
21437 archive_expsym_cmds \
21438 module_cmds \
21439 module_expsym_cmds \
21440 export_symbols_cmds \
21441 prelink_cmds \
21442 postlink_cmds \
21443 postinstall_cmds \
21444 postuninstall_cmds \
21445 finish_cmds \
21446 sys_lib_search_path_spec \
21447 configure_time_dlsearch_path \
21448 configure_time_lt_sys_library_path; do
21449     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
21450     *[\\\\\\\`\\"\\\$]*)
21451       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
21452       ;;
21453     *)
21454       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
21455       ;;
21456     esac
21457 done
21458
21459 ac_aux_dir='$ac_aux_dir'
21460
21461 # See if we are running on zsh, and set the options that allow our
21462 # commands through without removal of \ escapes INIT.
21463 if test -n "\${ZSH_VERSION+set}"; then
21464    setopt NO_GLOB_SUBST
21465 fi
21466
21467
21468     PACKAGE='$PACKAGE'
21469     VERSION='$VERSION'
21470     RM='$RM'
21471     ofile='$ofile'
21472
21473
21474
21475
21476 _ACEOF
21477
21478 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21479
21480 # Handling of arguments.
21481 for ac_config_target in $ac_config_targets
21482 do
21483   case $ac_config_target in
21484     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
21485     "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
21486     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21487     "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
21488     "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
21489     "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
21490     "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
21491     "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
21492     "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
21493     "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
21494     "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
21495     "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
21496     "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
21497     "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
21498     "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
21499     "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
21500     "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
21501     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
21502
21503   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
21504   esac
21505 done
21506
21507
21508 # If the user did not use the arguments to specify the items to instantiate,
21509 # then the envvar interface is used.  Set only those that are not.
21510 # We use the long form for the default assignment because of an extremely
21511 # bizarre bug on SunOS 4.1.3.
21512 if $ac_need_defaults; then
21513   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21514   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21515   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21516 fi
21517
21518 # Have a temporary directory for convenience.  Make it in the build tree
21519 # simply because there is no reason against having it here, and in addition,
21520 # creating and moving files from /tmp can sometimes cause problems.
21521 # Hook for its removal unless debugging.
21522 # Note that there is a small window in which the directory will not be cleaned:
21523 # after its creation but before its name has been assigned to `$tmp'.
21524 $debug ||
21525 {
21526   tmp= ac_tmp=
21527   trap 'exit_status=$?
21528   : "${ac_tmp:=$tmp}"
21529   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
21530 ' 0
21531   trap 'as_fn_exit 1' 1 2 13 15
21532 }
21533 # Create a (secure) tmp directory for tmp files.
21534
21535 {
21536   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
21537   test -d "$tmp"
21538 }  ||
21539 {
21540   tmp=./conf$$-$RANDOM
21541   (umask 077 && mkdir "$tmp")
21542 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
21543 ac_tmp=$tmp
21544
21545 # Set up the scripts for CONFIG_FILES section.
21546 # No need to generate them if there are no CONFIG_FILES.
21547 # This happens for instance with `./config.status config.h'.
21548 if test -n "$CONFIG_FILES"; then
21549
21550
21551 ac_cr=`echo X | tr X '\015'`
21552 # On cygwin, bash can eat \r inside `` if the user requested igncr.
21553 # But we know of no other shell where ac_cr would be empty at this
21554 # point, so we can use a bashism as a fallback.
21555 if test "x$ac_cr" = x; then
21556   eval ac_cr=\$\'\\r\'
21557 fi
21558 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
21559 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
21560   ac_cs_awk_cr='\\r'
21561 else
21562   ac_cs_awk_cr=$ac_cr
21563 fi
21564
21565 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
21566 _ACEOF
21567
21568
21569 {
21570   echo "cat >conf$$subs.awk <<_ACEOF" &&
21571   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
21572   echo "_ACEOF"
21573 } >conf$$subs.sh ||
21574   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
21575 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
21576 ac_delim='%!_!# '
21577 for ac_last_try in false false false false false :; do
21578   . ./conf$$subs.sh ||
21579     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
21580
21581   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
21582   if test $ac_delim_n = $ac_delim_num; then
21583     break
21584   elif $ac_last_try; then
21585     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
21586   else
21587     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21588   fi
21589 done
21590 rm -f conf$$subs.sh
21591
21592 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21593 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
21594 _ACEOF
21595 sed -n '
21596 h
21597 s/^/S["/; s/!.*/"]=/
21598 p
21599 g
21600 s/^[^!]*!//
21601 :repl
21602 t repl
21603 s/'"$ac_delim"'$//
21604 t delim
21605 :nl
21606 h
21607 s/\(.\{148\}\)..*/\1/
21608 t more1
21609 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
21610 p
21611 n
21612 b repl
21613 :more1
21614 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21615 p
21616 g
21617 s/.\{148\}//
21618 t nl
21619 :delim
21620 h
21621 s/\(.\{148\}\)..*/\1/
21622 t more2
21623 s/["\\]/\\&/g; s/^/"/; s/$/"/
21624 p
21625 b
21626 :more2
21627 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21628 p
21629 g
21630 s/.\{148\}//
21631 t delim
21632 ' <conf$$subs.awk | sed '
21633 /^[^""]/{
21634   N
21635   s/\n//
21636 }
21637 ' >>$CONFIG_STATUS || ac_write_fail=1
21638 rm -f conf$$subs.awk
21639 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21640 _ACAWK
21641 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
21642   for (key in S) S_is_set[key] = 1
21643   FS = "\a"
21644
21645 }
21646 {
21647   line = $ 0
21648   nfields = split(line, field, "@")
21649   substed = 0
21650   len = length(field[1])
21651   for (i = 2; i < nfields; i++) {
21652     key = field[i]
21653     keylen = length(key)
21654     if (S_is_set[key]) {
21655       value = S[key]
21656       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
21657       len += length(value) + length(field[++i])
21658       substed = 1
21659     } else
21660       len += 1 + keylen
21661   }
21662
21663   print line
21664 }
21665
21666 _ACAWK
21667 _ACEOF
21668 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21669 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
21670   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
21671 else
21672   cat
21673 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
21674   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
21675 _ACEOF
21676
21677 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
21678 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
21679 # trailing colons and then remove the whole line if VPATH becomes empty
21680 # (actually we leave an empty line to preserve line numbers).
21681 if test "x$srcdir" = x.; then
21682   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
21683 h
21684 s///
21685 s/^/:/
21686 s/[      ]*$/:/
21687 s/:\$(srcdir):/:/g
21688 s/:\${srcdir}:/:/g
21689 s/:@srcdir@:/:/g
21690 s/^:*//
21691 s/:*$//
21692 x
21693 s/\(=[   ]*\).*/\1/
21694 G
21695 s/\n//
21696 s/^[^=]*=[       ]*$//
21697 }'
21698 fi
21699
21700 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21701 fi # test -n "$CONFIG_FILES"
21702
21703 # Set up the scripts for CONFIG_HEADERS section.
21704 # No need to generate them if there are no CONFIG_HEADERS.
21705 # This happens for instance with `./config.status Makefile'.
21706 if test -n "$CONFIG_HEADERS"; then
21707 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
21708 BEGIN {
21709 _ACEOF
21710
21711 # Transform confdefs.h into an awk script `defines.awk', embedded as
21712 # here-document in config.status, that substitutes the proper values into
21713 # config.h.in to produce config.h.
21714
21715 # Create a delimiter string that does not exist in confdefs.h, to ease
21716 # handling of long lines.
21717 ac_delim='%!_!# '
21718 for ac_last_try in false false :; do
21719   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
21720   if test -z "$ac_tt"; then
21721     break
21722   elif $ac_last_try; then
21723     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
21724   else
21725     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21726   fi
21727 done
21728
21729 # For the awk script, D is an array of macro values keyed by name,
21730 # likewise P contains macro parameters if any.  Preserve backslash
21731 # newline sequences.
21732
21733 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21734 sed -n '
21735 s/.\{148\}/&'"$ac_delim"'/g
21736 t rset
21737 :rset
21738 s/^[     ]*#[    ]*define[       ][      ]*/ /
21739 t def
21740 d
21741 :def
21742 s/\\$//
21743 t bsnl
21744 s/["\\]/\\&/g
21745 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
21746 D["\1"]=" \3"/p
21747 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
21748 d
21749 :bsnl
21750 s/["\\]/\\&/g
21751 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
21752 D["\1"]=" \3\\\\\\n"\\/p
21753 t cont
21754 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
21755 t cont
21756 d
21757 :cont
21758 n
21759 s/.\{148\}/&'"$ac_delim"'/g
21760 t clear
21761 :clear
21762 s/\\$//
21763 t bsnlc
21764 s/["\\]/\\&/g; s/^/"/; s/$/"/p
21765 d
21766 :bsnlc
21767 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
21768 b cont
21769 ' <confdefs.h | sed '
21770 s/'"$ac_delim"'/"\\\
21771 "/g' >>$CONFIG_STATUS || ac_write_fail=1
21772
21773 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21774   for (key in D) D_is_set[key] = 1
21775   FS = "\a"
21776 }
21777 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
21778   line = \$ 0
21779   split(line, arg, " ")
21780   if (arg[1] == "#") {
21781     defundef = arg[2]
21782     mac1 = arg[3]
21783   } else {
21784     defundef = substr(arg[1], 2)
21785     mac1 = arg[2]
21786   }
21787   split(mac1, mac2, "(") #)
21788   macro = mac2[1]
21789   prefix = substr(line, 1, index(line, defundef) - 1)
21790   if (D_is_set[macro]) {
21791     # Preserve the white space surrounding the "#".
21792     print prefix "define", macro P[macro] D[macro]
21793     next
21794   } else {
21795     # Replace #undef with comments.  This is necessary, for example,
21796     # in the case of _POSIX_SOURCE, which is predefined and required
21797     # on some systems where configure will not decide to define it.
21798     if (defundef == "undef") {
21799       print "/*", prefix defundef, macro, "*/"
21800       next
21801     }
21802   }
21803 }
21804 { print }
21805 _ACAWK
21806 _ACEOF
21807 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21808   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
21809 fi # test -n "$CONFIG_HEADERS"
21810
21811
21812 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
21813 shift
21814 for ac_tag
21815 do
21816   case $ac_tag in
21817   :[FHLC]) ac_mode=$ac_tag; continue;;
21818   esac
21819   case $ac_mode$ac_tag in
21820   :[FHL]*:*);;
21821   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
21822   :[FH]-) ac_tag=-:-;;
21823   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21824   esac
21825   ac_save_IFS=$IFS
21826   IFS=:
21827   set x $ac_tag
21828   IFS=$ac_save_IFS
21829   shift
21830   ac_file=$1
21831   shift
21832
21833   case $ac_mode in
21834   :L) ac_source=$1;;
21835   :[FH])
21836     ac_file_inputs=
21837     for ac_f
21838     do
21839       case $ac_f in
21840       -) ac_f="$ac_tmp/stdin";;
21841       *) # Look for the file first in the build tree, then in the source tree
21842          # (if the path is not absolute).  The absolute path cannot be DOS-style,
21843          # because $ac_f cannot contain `:'.
21844          test -f "$ac_f" ||
21845            case $ac_f in
21846            [\\/$]*) false;;
21847            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21848            esac ||
21849            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
21850       esac
21851       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
21852       as_fn_append ac_file_inputs " '$ac_f'"
21853     done
21854
21855     # Let's still pretend it is `configure' which instantiates (i.e., don't
21856     # use $as_me), people would be surprised to read:
21857     #    /* config.h.  Generated by config.status.  */
21858     configure_input='Generated from '`
21859           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
21860         `' by configure.'
21861     if test x"$ac_file" != x-; then
21862       configure_input="$ac_file.  $configure_input"
21863       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21864 $as_echo "$as_me: creating $ac_file" >&6;}
21865     fi
21866     # Neutralize special characters interpreted by sed in replacement strings.
21867     case $configure_input in #(
21868     *\&* | *\|* | *\\* )
21869        ac_sed_conf_input=`$as_echo "$configure_input" |
21870        sed 's/[\\\\&|]/\\\\&/g'`;; #(
21871     *) ac_sed_conf_input=$configure_input;;
21872     esac
21873
21874     case $ac_tag in
21875     *:-:* | *:-) cat >"$ac_tmp/stdin" \
21876       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
21877     esac
21878     ;;
21879   esac
21880
21881   ac_dir=`$as_dirname -- "$ac_file" ||
21882 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21883          X"$ac_file" : 'X\(//\)[^/]' \| \
21884          X"$ac_file" : 'X\(//\)$' \| \
21885          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21886 $as_echo X"$ac_file" |
21887     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21888             s//\1/
21889             q
21890           }
21891           /^X\(\/\/\)[^/].*/{
21892             s//\1/
21893             q
21894           }
21895           /^X\(\/\/\)$/{
21896             s//\1/
21897             q
21898           }
21899           /^X\(\/\).*/{
21900             s//\1/
21901             q
21902           }
21903           s/.*/./; q'`
21904   as_dir="$ac_dir"; as_fn_mkdir_p
21905   ac_builddir=.
21906
21907 case "$ac_dir" in
21908 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21909 *)
21910   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21911   # A ".." for each directory in $ac_dir_suffix.
21912   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21913   case $ac_top_builddir_sub in
21914   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21915   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21916   esac ;;
21917 esac
21918 ac_abs_top_builddir=$ac_pwd
21919 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21920 # for backward compatibility:
21921 ac_top_builddir=$ac_top_build_prefix
21922
21923 case $srcdir in
21924   .)  # We are building in place.
21925     ac_srcdir=.
21926     ac_top_srcdir=$ac_top_builddir_sub
21927     ac_abs_top_srcdir=$ac_pwd ;;
21928   [\\/]* | ?:[\\/]* )  # Absolute name.
21929     ac_srcdir=$srcdir$ac_dir_suffix;
21930     ac_top_srcdir=$srcdir
21931     ac_abs_top_srcdir=$srcdir ;;
21932   *) # Relative name.
21933     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21934     ac_top_srcdir=$ac_top_build_prefix$srcdir
21935     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21936 esac
21937 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21938
21939
21940   case $ac_mode in
21941   :F)
21942   #
21943   # CONFIG_FILE
21944   #
21945
21946 _ACEOF
21947
21948 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21949 # If the template does not know about datarootdir, expand it.
21950 # FIXME: This hack should be removed a few years after 2.60.
21951 ac_datarootdir_hack=; ac_datarootdir_seen=
21952 ac_sed_dataroot='
21953 /datarootdir/ {
21954   p
21955   q
21956 }
21957 /@datadir@/p
21958 /@docdir@/p
21959 /@infodir@/p
21960 /@localedir@/p
21961 /@mandir@/p'
21962 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21963 *datarootdir*) ac_datarootdir_seen=yes;;
21964 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21965   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21966 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21967 _ACEOF
21968 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21969   ac_datarootdir_hack='
21970   s&@datadir@&$datadir&g
21971   s&@docdir@&$docdir&g
21972   s&@infodir@&$infodir&g
21973   s&@localedir@&$localedir&g
21974   s&@mandir@&$mandir&g
21975   s&\\\${datarootdir}&$datarootdir&g' ;;
21976 esac
21977 _ACEOF
21978
21979 # Neutralize VPATH when `$srcdir' = `.'.
21980 # Shell code in configure.ac might set extrasub.
21981 # FIXME: do we really want to maintain this feature?
21982 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21983 ac_sed_extra="$ac_vpsub
21984 $extrasub
21985 _ACEOF
21986 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21987 :t
21988 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21989 s|@configure_input@|$ac_sed_conf_input|;t t
21990 s&@top_builddir@&$ac_top_builddir_sub&;t t
21991 s&@top_build_prefix@&$ac_top_build_prefix&;t t
21992 s&@srcdir@&$ac_srcdir&;t t
21993 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21994 s&@top_srcdir@&$ac_top_srcdir&;t t
21995 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21996 s&@builddir@&$ac_builddir&;t t
21997 s&@abs_builddir@&$ac_abs_builddir&;t t
21998 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21999 $ac_datarootdir_hack
22000 "
22001 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
22002   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22003
22004 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
22005   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
22006   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
22007       "$ac_tmp/out"`; test -z "$ac_out"; } &&
22008   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22009 which seems to be undefined.  Please make sure it is defined" >&5
22010 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22011 which seems to be undefined.  Please make sure it is defined" >&2;}
22012
22013   rm -f "$ac_tmp/stdin"
22014   case $ac_file in
22015   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
22016   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
22017   esac \
22018   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22019  ;;
22020   :H)
22021   #
22022   # CONFIG_HEADER
22023   #
22024   if test x"$ac_file" != x-; then
22025     {
22026       $as_echo "/* $configure_input  */" \
22027       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
22028     } >"$ac_tmp/config.h" \
22029       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22030     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
22031       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
22032 $as_echo "$as_me: $ac_file is unchanged" >&6;}
22033     else
22034       rm -f "$ac_file"
22035       mv "$ac_tmp/config.h" "$ac_file" \
22036         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22037     fi
22038   else
22039     $as_echo "/* $configure_input  */" \
22040       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
22041       || as_fn_error $? "could not create -" "$LINENO" 5
22042   fi
22043  ;;
22044
22045   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
22046 $as_echo "$as_me: executing $ac_file commands" >&6;}
22047  ;;
22048   esac
22049
22050
22051   case $ac_file$ac_mode in
22052     "libtool":C)
22053
22054     # See if we are running on zsh, and set the options that allow our
22055     # commands through without removal of \ escapes.
22056     if test -n "${ZSH_VERSION+set}"; then
22057       setopt NO_GLOB_SUBST
22058     fi
22059
22060     cfgfile=${ofile}T
22061     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
22062     $RM "$cfgfile"
22063
22064     cat <<_LT_EOF >> "$cfgfile"
22065 #! $SHELL
22066 # Generated automatically by $as_me ($PACKAGE) $VERSION
22067 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22068 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
22069
22070 # Provide generalized library-building support services.
22071 # Written by Gordon Matzigkeit, 1996
22072
22073 # Copyright (C) 2014 Free Software Foundation, Inc.
22074 # This is free software; see the source for copying conditions.  There is NO
22075 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22076
22077 # GNU Libtool is free software; you can redistribute it and/or modify
22078 # it under the terms of the GNU General Public License as published by
22079 # the Free Software Foundation; either version 2 of of the License, or
22080 # (at your option) any later version.
22081 #
22082 # As a special exception to the GNU General Public License, if you
22083 # distribute this file as part of a program or library that is built
22084 # using GNU Libtool, you may include this file under the  same
22085 # distribution terms that you use for the rest of that program.
22086 #
22087 # GNU Libtool is distributed in the hope that it will be useful, but
22088 # WITHOUT ANY WARRANTY; without even the implied warranty of
22089 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22090 # GNU General Public License for more details.
22091 #
22092 # You should have received a copy of the GNU General Public License
22093 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22094
22095
22096 # The names of the tagged configurations supported by this script.
22097 available_tags=''
22098
22099 # Configured defaults for sys_lib_dlsearch_path munging.
22100 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
22101
22102 # ### BEGIN LIBTOOL CONFIG
22103
22104 # Which release of libtool.m4 was used?
22105 macro_version=$macro_version
22106 macro_revision=$macro_revision
22107
22108 # Whether or not to build shared libraries.
22109 build_libtool_libs=$enable_shared
22110
22111 # Whether or not to build static libraries.
22112 build_old_libs=$enable_static
22113
22114 # What type of objects to build.
22115 pic_mode=$pic_mode
22116
22117 # Whether or not to optimize for fast installation.
22118 fast_install=$enable_fast_install
22119
22120 # Shared archive member basename,for filename based shared library versioning on AIX.
22121 shared_archive_member_spec=$shared_archive_member_spec
22122
22123 # Shell to use when invoking shell scripts.
22124 SHELL=$lt_SHELL
22125
22126 # An echo program that protects backslashes.
22127 ECHO=$lt_ECHO
22128
22129 # The PATH separator for the build system.
22130 PATH_SEPARATOR=$lt_PATH_SEPARATOR
22131
22132 # The host system.
22133 host_alias=$host_alias
22134 host=$host
22135 host_os=$host_os
22136
22137 # The build system.
22138 build_alias=$build_alias
22139 build=$build
22140 build_os=$build_os
22141
22142 # A sed program that does not truncate output.
22143 SED=$lt_SED
22144
22145 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
22146 Xsed="\$SED -e 1s/^X//"
22147
22148 # A grep program that handles long lines.
22149 GREP=$lt_GREP
22150
22151 # An ERE matcher.
22152 EGREP=$lt_EGREP
22153
22154 # A literal string matcher.
22155 FGREP=$lt_FGREP
22156
22157 # A BSD- or MS-compatible name lister.
22158 NM=$lt_NM
22159
22160 # Whether we need soft or hard links.
22161 LN_S=$lt_LN_S
22162
22163 # What is the maximum length of a command?
22164 max_cmd_len=$max_cmd_len
22165
22166 # Object file suffix (normally "o").
22167 objext=$ac_objext
22168
22169 # Executable file suffix (normally "").
22170 exeext=$exeext
22171
22172 # whether the shell understands "unset".
22173 lt_unset=$lt_unset
22174
22175 # turn spaces into newlines.
22176 SP2NL=$lt_lt_SP2NL
22177
22178 # turn newlines into spaces.
22179 NL2SP=$lt_lt_NL2SP
22180
22181 # convert \$build file names to \$host format.
22182 to_host_file_cmd=$lt_cv_to_host_file_cmd
22183
22184 # convert \$build files to toolchain format.
22185 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
22186
22187 # An object symbol dumper.
22188 OBJDUMP=$lt_OBJDUMP
22189
22190 # Method to check whether dependent libraries are shared objects.
22191 deplibs_check_method=$lt_deplibs_check_method
22192
22193 # Command to use when deplibs_check_method = "file_magic".
22194 file_magic_cmd=$lt_file_magic_cmd
22195
22196 # How to find potential files when deplibs_check_method = "file_magic".
22197 file_magic_glob=$lt_file_magic_glob
22198
22199 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
22200 want_nocaseglob=$lt_want_nocaseglob
22201
22202 # DLL creation program.
22203 DLLTOOL=$lt_DLLTOOL
22204
22205 # Command to associate shared and link libraries.
22206 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
22207
22208 # The archiver.
22209 AR=$lt_AR
22210
22211 # Flags to create an archive.
22212 AR_FLAGS=$lt_AR_FLAGS
22213
22214 # How to feed a file listing to the archiver.
22215 archiver_list_spec=$lt_archiver_list_spec
22216
22217 # A symbol stripping program.
22218 STRIP=$lt_STRIP
22219
22220 # Commands used to install an old-style archive.
22221 RANLIB=$lt_RANLIB
22222 old_postinstall_cmds=$lt_old_postinstall_cmds
22223 old_postuninstall_cmds=$lt_old_postuninstall_cmds
22224
22225 # Whether to use a lock for old archive extraction.
22226 lock_old_archive_extraction=$lock_old_archive_extraction
22227
22228 # A C compiler.
22229 LTCC=$lt_CC
22230
22231 # LTCC compiler flags.
22232 LTCFLAGS=$lt_CFLAGS
22233
22234 # Take the output of nm and produce a listing of raw symbols and C names.
22235 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
22236
22237 # Transform the output of nm in a proper C declaration.
22238 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
22239
22240 # Transform the output of nm into a list of symbols to manually relocate.
22241 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
22242
22243 # Transform the output of nm in a C name address pair.
22244 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
22245
22246 # Transform the output of nm in a C name address pair when lib prefix is needed.
22247 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
22248
22249 # The name lister interface.
22250 nm_interface=$lt_lt_cv_nm_interface
22251
22252 # Specify filename containing input files for \$NM.
22253 nm_file_list_spec=$lt_nm_file_list_spec
22254
22255 # The root where to search for dependent libraries,and where our libraries should be installed.
22256 lt_sysroot=$lt_sysroot
22257
22258 # Command to truncate a binary pipe.
22259 lt_truncate_bin=$lt_lt_cv_truncate_bin
22260
22261 # The name of the directory that contains temporary libtool files.
22262 objdir=$objdir
22263
22264 # Used to examine libraries when file_magic_cmd begins with "file".
22265 MAGIC_CMD=$MAGIC_CMD
22266
22267 # Must we lock files when doing compilation?
22268 need_locks=$lt_need_locks
22269
22270 # Manifest tool.
22271 MANIFEST_TOOL=$lt_MANIFEST_TOOL
22272
22273 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
22274 DSYMUTIL=$lt_DSYMUTIL
22275
22276 # Tool to change global to local symbols on Mac OS X.
22277 NMEDIT=$lt_NMEDIT
22278
22279 # Tool to manipulate fat objects and archives on Mac OS X.
22280 LIPO=$lt_LIPO
22281
22282 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
22283 OTOOL=$lt_OTOOL
22284
22285 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
22286 OTOOL64=$lt_OTOOL64
22287
22288 # Old archive suffix (normally "a").
22289 libext=$libext
22290
22291 # Shared library suffix (normally ".so").
22292 shrext_cmds=$lt_shrext_cmds
22293
22294 # The commands to extract the exported symbol list from a shared archive.
22295 extract_expsyms_cmds=$lt_extract_expsyms_cmds
22296
22297 # Variables whose values should be saved in libtool wrapper scripts and
22298 # restored at link time.
22299 variables_saved_for_relink=$lt_variables_saved_for_relink
22300
22301 # Do we need the "lib" prefix for modules?
22302 need_lib_prefix=$need_lib_prefix
22303
22304 # Do we need a version for libraries?
22305 need_version=$need_version
22306
22307 # Library versioning type.
22308 version_type=$version_type
22309
22310 # Shared library runtime path variable.
22311 runpath_var=$runpath_var
22312
22313 # Shared library path variable.
22314 shlibpath_var=$shlibpath_var
22315
22316 # Is shlibpath searched before the hard-coded library search path?
22317 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
22318
22319 # Format of library name prefix.
22320 libname_spec=$lt_libname_spec
22321
22322 # List of archive names.  First name is the real one, the rest are links.
22323 # The last name is the one that the linker finds with -lNAME
22324 library_names_spec=$lt_library_names_spec
22325
22326 # The coded name of the library, if different from the real name.
22327 soname_spec=$lt_soname_spec
22328
22329 # Permission mode override for installation of shared libraries.
22330 install_override_mode=$lt_install_override_mode
22331
22332 # Command to use after installation of a shared archive.
22333 postinstall_cmds=$lt_postinstall_cmds
22334
22335 # Command to use after uninstallation of a shared archive.
22336 postuninstall_cmds=$lt_postuninstall_cmds
22337
22338 # Commands used to finish a libtool library installation in a directory.
22339 finish_cmds=$lt_finish_cmds
22340
22341 # As "finish_cmds", except a single script fragment to be evaled but
22342 # not shown.
22343 finish_eval=$lt_finish_eval
22344
22345 # Whether we should hardcode library paths into libraries.
22346 hardcode_into_libs=$hardcode_into_libs
22347
22348 # Compile-time system search path for libraries.
22349 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
22350
22351 # Detected run-time system search path for libraries.
22352 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
22353
22354 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
22355 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
22356
22357 # Whether dlopen is supported.
22358 dlopen_support=$enable_dlopen
22359
22360 # Whether dlopen of programs is supported.
22361 dlopen_self=$enable_dlopen_self
22362
22363 # Whether dlopen of statically linked programs is supported.
22364 dlopen_self_static=$enable_dlopen_self_static
22365
22366 # Commands to strip libraries.
22367 old_striplib=$lt_old_striplib
22368 striplib=$lt_striplib
22369
22370
22371 # The linker used to build libraries.
22372 LD=$lt_LD
22373
22374 # How to create reloadable object files.
22375 reload_flag=$lt_reload_flag
22376 reload_cmds=$lt_reload_cmds
22377
22378 # Commands used to build an old-style archive.
22379 old_archive_cmds=$lt_old_archive_cmds
22380
22381 # A language specific compiler.
22382 CC=$lt_compiler
22383
22384 # Is the compiler the GNU compiler?
22385 with_gcc=$GCC
22386
22387 # Compiler flag to turn off builtin functions.
22388 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
22389
22390 # Additional compiler flags for building library objects.
22391 pic_flag=$lt_lt_prog_compiler_pic
22392
22393 # How to pass a linker flag through the compiler.
22394 wl=$lt_lt_prog_compiler_wl
22395
22396 # Compiler flag to prevent dynamic linking.
22397 link_static_flag=$lt_lt_prog_compiler_static
22398
22399 # Does compiler simultaneously support -c and -o options?
22400 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
22401
22402 # Whether or not to add -lc for building shared libraries.
22403 build_libtool_need_lc=$archive_cmds_need_lc
22404
22405 # Whether or not to disallow shared libs when runtime libs are static.
22406 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
22407
22408 # Compiler flag to allow reflexive dlopens.
22409 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
22410
22411 # Compiler flag to generate shared objects directly from archives.
22412 whole_archive_flag_spec=$lt_whole_archive_flag_spec
22413
22414 # Whether the compiler copes with passing no objects directly.
22415 compiler_needs_object=$lt_compiler_needs_object
22416
22417 # Create an old-style archive from a shared archive.
22418 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
22419
22420 # Create a temporary old-style archive to link instead of a shared archive.
22421 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
22422
22423 # Commands used to build a shared archive.
22424 archive_cmds=$lt_archive_cmds
22425 archive_expsym_cmds=$lt_archive_expsym_cmds
22426
22427 # Commands used to build a loadable module if different from building
22428 # a shared archive.
22429 module_cmds=$lt_module_cmds
22430 module_expsym_cmds=$lt_module_expsym_cmds
22431
22432 # Whether we are building with GNU ld or not.
22433 with_gnu_ld=$lt_with_gnu_ld
22434
22435 # Flag that allows shared libraries with undefined symbols to be built.
22436 allow_undefined_flag=$lt_allow_undefined_flag
22437
22438 # Flag that enforces no undefined symbols.
22439 no_undefined_flag=$lt_no_undefined_flag
22440
22441 # Flag to hardcode \$libdir into a binary during linking.
22442 # This must work even if \$libdir does not exist
22443 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
22444
22445 # Whether we need a single "-rpath" flag with a separated argument.
22446 hardcode_libdir_separator=$lt_hardcode_libdir_separator
22447
22448 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
22449 # DIR into the resulting binary.
22450 hardcode_direct=$hardcode_direct
22451
22452 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
22453 # DIR into the resulting binary and the resulting library dependency is
22454 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
22455 # library is relocated.
22456 hardcode_direct_absolute=$hardcode_direct_absolute
22457
22458 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
22459 # into the resulting binary.
22460 hardcode_minus_L=$hardcode_minus_L
22461
22462 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
22463 # into the resulting binary.
22464 hardcode_shlibpath_var=$hardcode_shlibpath_var
22465
22466 # Set to "yes" if building a shared library automatically hardcodes DIR
22467 # into the library and all subsequent libraries and executables linked
22468 # against it.
22469 hardcode_automatic=$hardcode_automatic
22470
22471 # Set to yes if linker adds runtime paths of dependent libraries
22472 # to runtime path list.
22473 inherit_rpath=$inherit_rpath
22474
22475 # Whether libtool must link a program against all its dependency libraries.
22476 link_all_deplibs=$link_all_deplibs
22477
22478 # Set to "yes" if exported symbols are required.
22479 always_export_symbols=$always_export_symbols
22480
22481 # The commands to list exported symbols.
22482 export_symbols_cmds=$lt_export_symbols_cmds
22483
22484 # Symbols that should not be listed in the preloaded symbols.
22485 exclude_expsyms=$lt_exclude_expsyms
22486
22487 # Symbols that must always be exported.
22488 include_expsyms=$lt_include_expsyms
22489
22490 # Commands necessary for linking programs (against libraries) with templates.
22491 prelink_cmds=$lt_prelink_cmds
22492
22493 # Commands necessary for finishing linking programs.
22494 postlink_cmds=$lt_postlink_cmds
22495
22496 # Specify filename containing input files.
22497 file_list_spec=$lt_file_list_spec
22498
22499 # How to hardcode a shared library path into an executable.
22500 hardcode_action=$hardcode_action
22501
22502 # ### END LIBTOOL CONFIG
22503
22504 _LT_EOF
22505
22506     cat <<'_LT_EOF' >> "$cfgfile"
22507
22508 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
22509
22510 # func_munge_path_list VARIABLE PATH
22511 # -----------------------------------
22512 # VARIABLE is name of variable containing _space_ separated list of
22513 # directories to be munged by the contents of PATH, which is string
22514 # having a format:
22515 # "DIR[:DIR]:"
22516 #       string "DIR[ DIR]" will be prepended to VARIABLE
22517 # ":DIR[:DIR]"
22518 #       string "DIR[ DIR]" will be appended to VARIABLE
22519 # "DIRP[:DIRP]::[DIRA:]DIRA"
22520 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
22521 #       "DIRA[ DIRA]" will be appended to VARIABLE
22522 # "DIR[:DIR]"
22523 #       VARIABLE will be replaced by "DIR[ DIR]"
22524 func_munge_path_list ()
22525 {
22526     case x$2 in
22527     x)
22528         ;;
22529     *:)
22530         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
22531         ;;
22532     x:*)
22533         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
22534         ;;
22535     *::*)
22536         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
22537         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
22538         ;;
22539     *)
22540         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
22541         ;;
22542     esac
22543 }
22544
22545
22546 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
22547 func_cc_basename ()
22548 {
22549     for cc_temp in $*""; do
22550       case $cc_temp in
22551         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
22552         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
22553         \-*) ;;
22554         *) break;;
22555       esac
22556     done
22557     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
22558 }
22559
22560
22561 # ### END FUNCTIONS SHARED WITH CONFIGURE
22562
22563 _LT_EOF
22564
22565   case $host_os in
22566   aix3*)
22567     cat <<\_LT_EOF >> "$cfgfile"
22568 # AIX sometimes has problems with the GCC collect2 program.  For some
22569 # reason, if we set the COLLECT_NAMES environment variable, the problems
22570 # vanish in a puff of smoke.
22571 if test set != "${COLLECT_NAMES+set}"; then
22572   COLLECT_NAMES=
22573   export COLLECT_NAMES
22574 fi
22575 _LT_EOF
22576     ;;
22577   esac
22578
22579
22580 ltmain=$ac_aux_dir/ltmain.sh
22581
22582
22583   # We use sed instead of cat because bash on DJGPP gets confused if
22584   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
22585   # text mode, it properly converts lines to CR/LF.  This bash problem
22586   # is reportedly fixed, but why not run on old versions too?
22587   sed '$q' "$ltmain" >> "$cfgfile" \
22588      || (rm -f "$cfgfile"; exit 1)
22589
22590    mv -f "$cfgfile" "$ofile" ||
22591     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
22592   chmod +x "$ofile"
22593
22594  ;;
22595     "disable-rpath":C)
22596         sed < libtool > libtool-2 \
22597         's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
22598         mv libtool-2 libtool
22599         chmod 755 libtool
22600         libtool="./libtool"
22601          ;;
22602
22603   esac
22604 done # for ac_tag
22605
22606
22607 as_fn_exit 0
22608 _ACEOF
22609 ac_clean_files=$ac_clean_files_save
22610
22611 test $ac_write_fail = 0 ||
22612   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
22613
22614
22615 # configure is writing to config.log, and then calls config.status.
22616 # config.status does its own redirection, appending to config.log.
22617 # Unfortunately, on DOS this fails, as config.log is still kept open
22618 # by configure, so config.status won't be able to write to it; its
22619 # output is simply discarded.  So we exec the FD to /dev/null,
22620 # effectively closing config.log, so it can be properly (re)opened and
22621 # appended to by config.status.  When coming back to configure, we
22622 # need to make the FD available again.
22623 if test "$no_create" != yes; then
22624   ac_cs_success=:
22625   ac_config_status_args=
22626   test "$silent" = yes &&
22627     ac_config_status_args="$ac_config_status_args --quiet"
22628   exec 5>/dev/null
22629   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
22630   exec 5>>config.log
22631   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22632   # would make configure fail if this is the last instruction.
22633   $ac_cs_success || as_fn_exit 1
22634 fi
22635 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
22636   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
22637 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
22638 fi
22639