]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - contrib/unbound/configure
MFH (r287917, r287918, r289063): upgrade to latest Unbound
[FreeBSD/stable/10.git] / contrib / unbound / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for unbound 1.5.5.
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.5.5'
594 PACKAGE_STRING='unbound 1.5.5'
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 DNSTAP_OBJ
642 DNSTAP_SRC
643 opt_dnstap_socket_path
644 ENABLE_DNSTAP
645 PROTOC_C
646 UBSYMS
647 EXTRALINK
648 COMMON_OBJ_ALL_SYMBOLS
649 LIBOBJ_WITHOUT_CTIME
650 LIBOBJ_WITHOUT_CTIMEARC4
651 WIN_CHECKCONF_OBJ_LINK
652 WIN_CONTROL_OBJ_LINK
653 WIN_UBANCHOR_OBJ_LINK
654 WIN_HOST_OBJ_LINK
655 WIN_DAEMON_OBJ_LINK
656 WIN_DAEMON_OBJ
657 WIN_DAEMON_SRC
658 WINAPPS
659 WINDRES
660 CHECKLOCK_OBJ
661 staticexe
662 UNBOUND_EVENT_UNINSTALL
663 UNBOUND_EVENT_INSTALL
664 HAVE_SSL
665 CONFIG_DATE
666 NETBSD_LINTFLAGS
667 PYUNBOUND_UNINSTALL
668 PYUNBOUND_INSTALL
669 PYUNBOUND_TARGET
670 PYUNBOUND_OBJ
671 WITH_PYUNBOUND
672 PYTHONMOD_UNINSTALL
673 PYTHONMOD_INSTALL
674 PYTHONMOD_HEADER
675 PYTHONMOD_OBJ
676 WITH_PYTHONMODULE
677 swig
678 SWIG_LIB
679 SWIG
680 PY_MAJOR_VERSION
681 PYTHON_SITE_PKG
682 PYTHON_LDFLAGS
683 PYTHON_CPPFLAGS
684 PYTHON
685 PYTHON_VERSION
686 PTHREAD_CFLAGS
687 PTHREAD_LIBS
688 PTHREAD_CC
689 ax_pthread_config
690 RUNTIME_PATH
691 LIBOBJS
692 OTOOL64
693 OTOOL
694 LIPO
695 NMEDIT
696 DSYMUTIL
697 MANIFEST_TOOL
698 AWK
699 RANLIB
700 ac_ct_AR
701 DLLTOOL
702 OBJDUMP
703 LN_S
704 NM
705 ac_ct_DUMPBIN
706 DUMPBIN
707 LD
708 FGREP
709 SED
710 LIBTOOL
711 AR
712 host_os
713 host_vendor
714 host_cpu
715 host
716 build_os
717 build_vendor
718 build_cpu
719 build
720 libtool
721 STRIP
722 doxygen
723 YFLAGS
724 YACC
725 LEXLIB
726 LEX_OUTPUT_ROOT
727 LEX
728 debug_enabled
729 DEPFLAG
730 UNBOUND_USERNAME
731 UNBOUND_ROOTCERT_FILE
732 UNBOUND_ROOTKEY_FILE
733 UNBOUND_PIDFILE
734 UNBOUND_SHARE_DIR
735 UNBOUND_CHROOT_DIR
736 UNBOUND_RUN_DIR
737 ub_conf_dir
738 ub_conf_file
739 EGREP
740 GREP
741 CPP
742 OBJEXT
743 EXEEXT
744 ac_ct_CC
745 CPPFLAGS
746 LDFLAGS
747 CFLAGS
748 CC
749 LIBUNBOUND_AGE
750 LIBUNBOUND_REVISION
751 LIBUNBOUND_CURRENT
752 UNBOUND_VERSION_MICRO
753 UNBOUND_VERSION_MINOR
754 UNBOUND_VERSION_MAJOR
755 target_alias
756 host_alias
757 build_alias
758 LIBS
759 ECHO_T
760 ECHO_N
761 ECHO_C
762 DEFS
763 mandir
764 localedir
765 libdir
766 psdir
767 pdfdir
768 dvidir
769 htmldir
770 infodir
771 docdir
772 oldincludedir
773 includedir
774 localstatedir
775 sharedstatedir
776 sysconfdir
777 datadir
778 datarootdir
779 libexecdir
780 sbindir
781 bindir
782 program_transform_name
783 prefix
784 exec_prefix
785 PACKAGE_URL
786 PACKAGE_BUGREPORT
787 PACKAGE_STRING
788 PACKAGE_VERSION
789 PACKAGE_TARNAME
790 PACKAGE_NAME
791 PATH_SEPARATOR
792 SHELL'
793 ac_subst_files=''
794 ac_user_opts='
795 enable_option_checking
796 with_conf_file
797 with_run_dir
798 with_chroot_dir
799 with_share_dir
800 with_pidfile
801 with_rootkey_file
802 with_rootcert_file
803 with_username
804 enable_checking
805 enable_debug
806 enable_flto
807 enable_pie
808 enable_relro_now
809 enable_shared
810 enable_static
811 with_pic
812 enable_fast_install
813 with_gnu_ld
814 with_sysroot
815 enable_libtool_lock
816 enable_rpath
817 enable_largefile
818 enable_alloc_checks
819 enable_alloc_lite
820 enable_alloc_nonregional
821 with_pthreads
822 with_solaris_threads
823 with_pyunbound
824 with_pythonmodule
825 with_nss
826 with_ssl
827 enable_sha2
828 enable_gost
829 enable_ecdsa
830 enable_event_api
831 with_libevent
832 with_libexpat
833 enable_static_exe
834 enable_lock_checks
835 enable_allsymbols
836 enable_dnstap
837 with_dnstap_socket_path
838 with_protobuf_c
839 with_libfstrm
840 with_libunbound_only
841 '
842       ac_precious_vars='build_alias
843 host_alias
844 target_alias
845 CC
846 CFLAGS
847 LDFLAGS
848 LIBS
849 CPPFLAGS
850 CPP
851 YACC
852 YFLAGS
853 PYTHON_VERSION'
854
855
856 # Initialize some variables set by options.
857 ac_init_help=
858 ac_init_version=false
859 ac_unrecognized_opts=
860 ac_unrecognized_sep=
861 # The variables have the same names as the options, with
862 # dashes changed to underlines.
863 cache_file=/dev/null
864 exec_prefix=NONE
865 no_create=
866 no_recursion=
867 prefix=NONE
868 program_prefix=NONE
869 program_suffix=NONE
870 program_transform_name=s,x,x,
871 silent=
872 site=
873 srcdir=
874 verbose=
875 x_includes=NONE
876 x_libraries=NONE
877
878 # Installation directory options.
879 # These are left unexpanded so users can "make install exec_prefix=/foo"
880 # and all the variables that are supposed to be based on exec_prefix
881 # by default will actually change.
882 # Use braces instead of parens because sh, perl, etc. also accept them.
883 # (The list follows the same order as the GNU Coding Standards.)
884 bindir='${exec_prefix}/bin'
885 sbindir='${exec_prefix}/sbin'
886 libexecdir='${exec_prefix}/libexec'
887 datarootdir='${prefix}/share'
888 datadir='${datarootdir}'
889 sysconfdir='${prefix}/etc'
890 sharedstatedir='${prefix}/com'
891 localstatedir='${prefix}/var'
892 includedir='${prefix}/include'
893 oldincludedir='/usr/include'
894 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
895 infodir='${datarootdir}/info'
896 htmldir='${docdir}'
897 dvidir='${docdir}'
898 pdfdir='${docdir}'
899 psdir='${docdir}'
900 libdir='${exec_prefix}/lib'
901 localedir='${datarootdir}/locale'
902 mandir='${datarootdir}/man'
903
904 ac_prev=
905 ac_dashdash=
906 for ac_option
907 do
908   # If the previous option needs an argument, assign it.
909   if test -n "$ac_prev"; then
910     eval $ac_prev=\$ac_option
911     ac_prev=
912     continue
913   fi
914
915   case $ac_option in
916   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
917   *=)   ac_optarg= ;;
918   *)    ac_optarg=yes ;;
919   esac
920
921   # Accept the important Cygnus configure options, so we can diagnose typos.
922
923   case $ac_dashdash$ac_option in
924   --)
925     ac_dashdash=yes ;;
926
927   -bindir | --bindir | --bindi | --bind | --bin | --bi)
928     ac_prev=bindir ;;
929   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
930     bindir=$ac_optarg ;;
931
932   -build | --build | --buil | --bui | --bu)
933     ac_prev=build_alias ;;
934   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
935     build_alias=$ac_optarg ;;
936
937   -cache-file | --cache-file | --cache-fil | --cache-fi \
938   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
939     ac_prev=cache_file ;;
940   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
941   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
942     cache_file=$ac_optarg ;;
943
944   --config-cache | -C)
945     cache_file=config.cache ;;
946
947   -datadir | --datadir | --datadi | --datad)
948     ac_prev=datadir ;;
949   -datadir=* | --datadir=* | --datadi=* | --datad=*)
950     datadir=$ac_optarg ;;
951
952   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
953   | --dataroo | --dataro | --datar)
954     ac_prev=datarootdir ;;
955   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
956   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
957     datarootdir=$ac_optarg ;;
958
959   -disable-* | --disable-*)
960     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
961     # Reject names that are not valid shell variable names.
962     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
963       as_fn_error $? "invalid feature name: $ac_useropt"
964     ac_useropt_orig=$ac_useropt
965     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
966     case $ac_user_opts in
967       *"
968 "enable_$ac_useropt"
969 "*) ;;
970       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
971          ac_unrecognized_sep=', ';;
972     esac
973     eval enable_$ac_useropt=no ;;
974
975   -docdir | --docdir | --docdi | --doc | --do)
976     ac_prev=docdir ;;
977   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
978     docdir=$ac_optarg ;;
979
980   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
981     ac_prev=dvidir ;;
982   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
983     dvidir=$ac_optarg ;;
984
985   -enable-* | --enable-*)
986     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
987     # Reject names that are not valid shell variable names.
988     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
989       as_fn_error $? "invalid feature name: $ac_useropt"
990     ac_useropt_orig=$ac_useropt
991     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
992     case $ac_user_opts in
993       *"
994 "enable_$ac_useropt"
995 "*) ;;
996       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
997          ac_unrecognized_sep=', ';;
998     esac
999     eval enable_$ac_useropt=\$ac_optarg ;;
1000
1001   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1002   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1003   | --exec | --exe | --ex)
1004     ac_prev=exec_prefix ;;
1005   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1006   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1007   | --exec=* | --exe=* | --ex=*)
1008     exec_prefix=$ac_optarg ;;
1009
1010   -gas | --gas | --ga | --g)
1011     # Obsolete; use --with-gas.
1012     with_gas=yes ;;
1013
1014   -help | --help | --hel | --he | -h)
1015     ac_init_help=long ;;
1016   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1017     ac_init_help=recursive ;;
1018   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1019     ac_init_help=short ;;
1020
1021   -host | --host | --hos | --ho)
1022     ac_prev=host_alias ;;
1023   -host=* | --host=* | --hos=* | --ho=*)
1024     host_alias=$ac_optarg ;;
1025
1026   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1027     ac_prev=htmldir ;;
1028   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1029   | --ht=*)
1030     htmldir=$ac_optarg ;;
1031
1032   -includedir | --includedir | --includedi | --included | --include \
1033   | --includ | --inclu | --incl | --inc)
1034     ac_prev=includedir ;;
1035   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1036   | --includ=* | --inclu=* | --incl=* | --inc=*)
1037     includedir=$ac_optarg ;;
1038
1039   -infodir | --infodir | --infodi | --infod | --info | --inf)
1040     ac_prev=infodir ;;
1041   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1042     infodir=$ac_optarg ;;
1043
1044   -libdir | --libdir | --libdi | --libd)
1045     ac_prev=libdir ;;
1046   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1047     libdir=$ac_optarg ;;
1048
1049   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1050   | --libexe | --libex | --libe)
1051     ac_prev=libexecdir ;;
1052   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1053   | --libexe=* | --libex=* | --libe=*)
1054     libexecdir=$ac_optarg ;;
1055
1056   -localedir | --localedir | --localedi | --localed | --locale)
1057     ac_prev=localedir ;;
1058   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1059     localedir=$ac_optarg ;;
1060
1061   -localstatedir | --localstatedir | --localstatedi | --localstated \
1062   | --localstate | --localstat | --localsta | --localst | --locals)
1063     ac_prev=localstatedir ;;
1064   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1065   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1066     localstatedir=$ac_optarg ;;
1067
1068   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1069     ac_prev=mandir ;;
1070   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1071     mandir=$ac_optarg ;;
1072
1073   -nfp | --nfp | --nf)
1074     # Obsolete; use --without-fp.
1075     with_fp=no ;;
1076
1077   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1078   | --no-cr | --no-c | -n)
1079     no_create=yes ;;
1080
1081   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1082   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1083     no_recursion=yes ;;
1084
1085   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1086   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1087   | --oldin | --oldi | --old | --ol | --o)
1088     ac_prev=oldincludedir ;;
1089   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1090   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1091   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1092     oldincludedir=$ac_optarg ;;
1093
1094   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1095     ac_prev=prefix ;;
1096   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1097     prefix=$ac_optarg ;;
1098
1099   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1100   | --program-pre | --program-pr | --program-p)
1101     ac_prev=program_prefix ;;
1102   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1103   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1104     program_prefix=$ac_optarg ;;
1105
1106   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1107   | --program-suf | --program-su | --program-s)
1108     ac_prev=program_suffix ;;
1109   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1110   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1111     program_suffix=$ac_optarg ;;
1112
1113   -program-transform-name | --program-transform-name \
1114   | --program-transform-nam | --program-transform-na \
1115   | --program-transform-n | --program-transform- \
1116   | --program-transform | --program-transfor \
1117   | --program-transfo | --program-transf \
1118   | --program-trans | --program-tran \
1119   | --progr-tra | --program-tr | --program-t)
1120     ac_prev=program_transform_name ;;
1121   -program-transform-name=* | --program-transform-name=* \
1122   | --program-transform-nam=* | --program-transform-na=* \
1123   | --program-transform-n=* | --program-transform-=* \
1124   | --program-transform=* | --program-transfor=* \
1125   | --program-transfo=* | --program-transf=* \
1126   | --program-trans=* | --program-tran=* \
1127   | --progr-tra=* | --program-tr=* | --program-t=*)
1128     program_transform_name=$ac_optarg ;;
1129
1130   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1131     ac_prev=pdfdir ;;
1132   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1133     pdfdir=$ac_optarg ;;
1134
1135   -psdir | --psdir | --psdi | --psd | --ps)
1136     ac_prev=psdir ;;
1137   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1138     psdir=$ac_optarg ;;
1139
1140   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1141   | -silent | --silent | --silen | --sile | --sil)
1142     silent=yes ;;
1143
1144   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1145     ac_prev=sbindir ;;
1146   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1147   | --sbi=* | --sb=*)
1148     sbindir=$ac_optarg ;;
1149
1150   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1151   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1152   | --sharedst | --shareds | --shared | --share | --shar \
1153   | --sha | --sh)
1154     ac_prev=sharedstatedir ;;
1155   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1156   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1157   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1158   | --sha=* | --sh=*)
1159     sharedstatedir=$ac_optarg ;;
1160
1161   -site | --site | --sit)
1162     ac_prev=site ;;
1163   -site=* | --site=* | --sit=*)
1164     site=$ac_optarg ;;
1165
1166   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1167     ac_prev=srcdir ;;
1168   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1169     srcdir=$ac_optarg ;;
1170
1171   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1172   | --syscon | --sysco | --sysc | --sys | --sy)
1173     ac_prev=sysconfdir ;;
1174   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1175   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1176     sysconfdir=$ac_optarg ;;
1177
1178   -target | --target | --targe | --targ | --tar | --ta | --t)
1179     ac_prev=target_alias ;;
1180   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1181     target_alias=$ac_optarg ;;
1182
1183   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1184     verbose=yes ;;
1185
1186   -version | --version | --versio | --versi | --vers | -V)
1187     ac_init_version=: ;;
1188
1189   -with-* | --with-*)
1190     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1191     # Reject names that are not valid shell variable names.
1192     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1193       as_fn_error $? "invalid package name: $ac_useropt"
1194     ac_useropt_orig=$ac_useropt
1195     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1196     case $ac_user_opts in
1197       *"
1198 "with_$ac_useropt"
1199 "*) ;;
1200       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1201          ac_unrecognized_sep=', ';;
1202     esac
1203     eval with_$ac_useropt=\$ac_optarg ;;
1204
1205   -without-* | --without-*)
1206     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1207     # Reject names that are not valid shell variable names.
1208     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1209       as_fn_error $? "invalid package name: $ac_useropt"
1210     ac_useropt_orig=$ac_useropt
1211     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1212     case $ac_user_opts in
1213       *"
1214 "with_$ac_useropt"
1215 "*) ;;
1216       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1217          ac_unrecognized_sep=', ';;
1218     esac
1219     eval with_$ac_useropt=no ;;
1220
1221   --x)
1222     # Obsolete; use --with-x.
1223     with_x=yes ;;
1224
1225   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1226   | --x-incl | --x-inc | --x-in | --x-i)
1227     ac_prev=x_includes ;;
1228   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1229   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1230     x_includes=$ac_optarg ;;
1231
1232   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1233   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1234     ac_prev=x_libraries ;;
1235   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1236   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1237     x_libraries=$ac_optarg ;;
1238
1239   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1240 Try \`$0 --help' for more information"
1241     ;;
1242
1243   *=*)
1244     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1245     # Reject names that are not valid shell variable names.
1246     case $ac_envvar in #(
1247       '' | [0-9]* | *[!_$as_cr_alnum]* )
1248       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1249     esac
1250     eval $ac_envvar=\$ac_optarg
1251     export $ac_envvar ;;
1252
1253   *)
1254     # FIXME: should be removed in autoconf 3.0.
1255     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1256     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1257       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1258     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1259     ;;
1260
1261   esac
1262 done
1263
1264 if test -n "$ac_prev"; then
1265   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1266   as_fn_error $? "missing argument to $ac_option"
1267 fi
1268
1269 if test -n "$ac_unrecognized_opts"; then
1270   case $enable_option_checking in
1271     no) ;;
1272     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1273     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1274   esac
1275 fi
1276
1277 # Check all directory arguments for consistency.
1278 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1279                 datadir sysconfdir sharedstatedir localstatedir includedir \
1280                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1281                 libdir localedir mandir
1282 do
1283   eval ac_val=\$$ac_var
1284   # Remove trailing slashes.
1285   case $ac_val in
1286     */ )
1287       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1288       eval $ac_var=\$ac_val;;
1289   esac
1290   # Be sure to have absolute directory names.
1291   case $ac_val in
1292     [\\/$]* | ?:[\\/]* )  continue;;
1293     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1294   esac
1295   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1296 done
1297
1298 # There might be people who depend on the old broken behavior: `$host'
1299 # used to hold the argument of --host etc.
1300 # FIXME: To remove some day.
1301 build=$build_alias
1302 host=$host_alias
1303 target=$target_alias
1304
1305 # FIXME: To remove some day.
1306 if test "x$host_alias" != x; then
1307   if test "x$build_alias" = x; then
1308     cross_compiling=maybe
1309   elif test "x$build_alias" != "x$host_alias"; then
1310     cross_compiling=yes
1311   fi
1312 fi
1313
1314 ac_tool_prefix=
1315 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1316
1317 test "$silent" = yes && exec 6>/dev/null
1318
1319
1320 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1321 ac_ls_di=`ls -di .` &&
1322 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1323   as_fn_error $? "working directory cannot be determined"
1324 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1325   as_fn_error $? "pwd does not report name of working directory"
1326
1327
1328 # Find the source files, if location was not specified.
1329 if test -z "$srcdir"; then
1330   ac_srcdir_defaulted=yes
1331   # Try the directory containing this script, then the parent directory.
1332   ac_confdir=`$as_dirname -- "$as_myself" ||
1333 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1334          X"$as_myself" : 'X\(//\)[^/]' \| \
1335          X"$as_myself" : 'X\(//\)$' \| \
1336          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1337 $as_echo X"$as_myself" |
1338     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1339             s//\1/
1340             q
1341           }
1342           /^X\(\/\/\)[^/].*/{
1343             s//\1/
1344             q
1345           }
1346           /^X\(\/\/\)$/{
1347             s//\1/
1348             q
1349           }
1350           /^X\(\/\).*/{
1351             s//\1/
1352             q
1353           }
1354           s/.*/./; q'`
1355   srcdir=$ac_confdir
1356   if test ! -r "$srcdir/$ac_unique_file"; then
1357     srcdir=..
1358   fi
1359 else
1360   ac_srcdir_defaulted=no
1361 fi
1362 if test ! -r "$srcdir/$ac_unique_file"; then
1363   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1364   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1365 fi
1366 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1367 ac_abs_confdir=`(
1368         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1369         pwd)`
1370 # When building in place, set srcdir=.
1371 if test "$ac_abs_confdir" = "$ac_pwd"; then
1372   srcdir=.
1373 fi
1374 # Remove unnecessary trailing slashes from srcdir.
1375 # Double slashes in file names in object file debugging info
1376 # mess up M-x gdb in Emacs.
1377 case $srcdir in
1378 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1379 esac
1380 for ac_var in $ac_precious_vars; do
1381   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1382   eval ac_env_${ac_var}_value=\$${ac_var}
1383   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1384   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1385 done
1386
1387 #
1388 # Report the --help message.
1389 #
1390 if test "$ac_init_help" = "long"; then
1391   # Omit some internal or obsolete options to make the list less imposing.
1392   # This message is too long to be a string in the A/UX 3.1 sh.
1393   cat <<_ACEOF
1394 \`configure' configures unbound 1.5.5 to adapt to many kinds of systems.
1395
1396 Usage: $0 [OPTION]... [VAR=VALUE]...
1397
1398 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1399 VAR=VALUE.  See below for descriptions of some of the useful variables.
1400
1401 Defaults for the options are specified in brackets.
1402
1403 Configuration:
1404   -h, --help              display this help and exit
1405       --help=short        display options specific to this package
1406       --help=recursive    display the short help of all the included packages
1407   -V, --version           display version information and exit
1408   -q, --quiet, --silent   do not print \`checking ...' messages
1409       --cache-file=FILE   cache test results in FILE [disabled]
1410   -C, --config-cache      alias for \`--cache-file=config.cache'
1411   -n, --no-create         do not create output files
1412       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1413
1414 Installation directories:
1415   --prefix=PREFIX         install architecture-independent files in PREFIX
1416                           [$ac_default_prefix]
1417   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1418                           [PREFIX]
1419
1420 By default, \`make install' will install all the files in
1421 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1422 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1423 for instance \`--prefix=\$HOME'.
1424
1425 For better control, use the options below.
1426
1427 Fine tuning of the installation directories:
1428   --bindir=DIR            user executables [EPREFIX/bin]
1429   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1430   --libexecdir=DIR        program executables [EPREFIX/libexec]
1431   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1432   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1433   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1434   --libdir=DIR            object code libraries [EPREFIX/lib]
1435   --includedir=DIR        C header files [PREFIX/include]
1436   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1437   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1438   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1439   --infodir=DIR           info documentation [DATAROOTDIR/info]
1440   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1441   --mandir=DIR            man documentation [DATAROOTDIR/man]
1442   --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1443   --htmldir=DIR           html documentation [DOCDIR]
1444   --dvidir=DIR            dvi documentation [DOCDIR]
1445   --pdfdir=DIR            pdf documentation [DOCDIR]
1446   --psdir=DIR             ps documentation [DOCDIR]
1447 _ACEOF
1448
1449   cat <<\_ACEOF
1450
1451 System types:
1452   --build=BUILD     configure for building on BUILD [guessed]
1453   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1454 _ACEOF
1455 fi
1456
1457 if test -n "$ac_init_help"; then
1458   case $ac_init_help in
1459      short | recursive ) echo "Configuration of unbound 1.5.5:";;
1460    esac
1461   cat <<\_ACEOF
1462
1463 Optional Features:
1464   --disable-option-checking  ignore unrecognized --enable/--with options
1465   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1466   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1467   --enable-checking       Enable warnings, asserts, makefile-dependencies
1468   --enable-debug          same as enable-checking
1469   --disable-flto          Disable link-time optimization (gcc specific option)
1470   --enable-pie            Enable Position-Independent Executable (eg. to fully
1471                           benefit from ASLR, small performance penalty)
1472   --enable-relro-now      Enable full relocation binding at load-time (RELRO
1473                           NOW, to protect GOT and .dtor areas)
1474   --enable-shared[=PKGS]  build shared libraries [default=yes]
1475   --enable-static[=PKGS]  build static libraries [default=yes]
1476   --enable-fast-install[=PKGS]
1477                           optimize for fast installation [default=yes]
1478   --disable-libtool-lock  avoid locking (might break parallel builds)
1479   --disable-rpath         disable hardcoded rpath (default=enabled)
1480   --disable-largefile     omit support for large files
1481   --enable-alloc-checks   enable to memory allocation statistics, for debug
1482                           purposes
1483   --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1484                           purposes
1485   --enable-alloc-nonregional
1486                           enable nonregional allocs, slow but exposes regional
1487                           allocations to other memory purifiers, for debug
1488                           purposes
1489   --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1490   --disable-gost          Disable GOST support
1491   --disable-ecdsa         Disable ECDSA support
1492   --enable-event-api      Enable (experimental) libevent-based libunbound API
1493                           installed to unbound-event.h
1494   --enable-static-exe     enable to compile executables statically against
1495                           (event) libs, for debug purposes
1496   --enable-lock-checks    enable to check lock and unlock calls, for debug
1497                           purposes
1498   --enable-allsymbols     export all symbols from libunbound and link binaries
1499                           to it, smaller install size but libunbound export
1500                           table is polluted by internal symbols
1501   --enable-dnstap         Enable dnstap support (requires fstrm, protobuf-c)
1502
1503 Optional Packages:
1504   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1505   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1506   --with-conf-file=path   Pathname to the Unbound configuration file
1507   --with-run-dir=path     set default directory to chdir to (by default dir
1508                           part of cfg file)
1509   --with-chroot-dir=path  set default directory to chroot to (by default same
1510                           as run-dir)
1511   --with-share-dir=path   set default directory with shared data (by default
1512                           same as share/unbound)
1513   --with-pidfile=filename set default pathname to unbound pidfile (default
1514                           run-dir/unbound.pid)
1515   --with-rootkey-file=filename
1516                           set default pathname to root key file (default
1517                           run-dir/root.key). This file is read and written.
1518   --with-rootcert-file=filename
1519                           set default pathname to root update certificate file
1520                           (default run-dir/icannbundle.pem). This file need
1521                           not exist if you are content with the builtin.
1522   --with-username=user    set default user that unbound changes to (default
1523                           user is unbound)
1524   --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1525                           both]
1526   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1527   --with-sysroot=DIR Search for dependent libraries within DIR
1528                         (or the compiler's sysroot if not specified).
1529   --with-pthreads         use pthreads library, or --without-pthreads to
1530                           disable threading support.
1531   --with-solaris-threads  use solaris native thread library.
1532   --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1533                           (default=no)
1534   --with-pythonmodule     build Python module, or --without-pythonmodule to
1535                           disable script engine. (default=no)
1536   --with-nss=path         use libnss instead of openssl, installed at path.
1537   --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1538                           /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1539                           /usr)
1540   --with-libevent=pathname
1541                           use libevent (will check /usr/local /opt/local
1542                           /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1543                           an explicit path). Slower, but allows use of large
1544                           outgoing port ranges.
1545   --with-libexpat=path    specify explicit path for libexpat.
1546   --with-dnstap-socket-path=pathname
1547                           set default dnstap socket path
1548   --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1549   --with-libfstrm=path    Path where libfstrm is installed, for dnstap
1550   --with-libunbound-only  do not build daemon and tool programs
1551
1552 Some influential environment variables:
1553   CC          C compiler command
1554   CFLAGS      C compiler flags
1555   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1556               nonstandard directory <lib dir>
1557   LIBS        libraries to pass to the linker, e.g. -l<library>
1558   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1559               you have headers in a nonstandard directory <include dir>
1560   CPP         C preprocessor
1561   YACC        The `Yet Another Compiler Compiler' implementation to use.
1562               Defaults to the first program found out of: `bison -y', `byacc',
1563               `yacc'.
1564   YFLAGS      The list of arguments that will be passed by default to $YACC.
1565               This script will default YFLAGS to the empty string to avoid a
1566               default value of `-d' given by some make applications.
1567   PYTHON_VERSION
1568               The installed Python version to use, for example '2.3'. This
1569               string will be appended to the Python interpreter canonical
1570               name.
1571
1572 Use these variables to override the choices made by `configure' or to help
1573 it to find libraries and programs with nonstandard names/locations.
1574
1575 Report bugs to <unbound-bugs@nlnetlabs.nl>.
1576 _ACEOF
1577 ac_status=$?
1578 fi
1579
1580 if test "$ac_init_help" = "recursive"; then
1581   # If there are subdirs, report their specific --help.
1582   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1583     test -d "$ac_dir" ||
1584       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1585       continue
1586     ac_builddir=.
1587
1588 case "$ac_dir" in
1589 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1590 *)
1591   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1592   # A ".." for each directory in $ac_dir_suffix.
1593   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1594   case $ac_top_builddir_sub in
1595   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1596   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1597   esac ;;
1598 esac
1599 ac_abs_top_builddir=$ac_pwd
1600 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1601 # for backward compatibility:
1602 ac_top_builddir=$ac_top_build_prefix
1603
1604 case $srcdir in
1605   .)  # We are building in place.
1606     ac_srcdir=.
1607     ac_top_srcdir=$ac_top_builddir_sub
1608     ac_abs_top_srcdir=$ac_pwd ;;
1609   [\\/]* | ?:[\\/]* )  # Absolute name.
1610     ac_srcdir=$srcdir$ac_dir_suffix;
1611     ac_top_srcdir=$srcdir
1612     ac_abs_top_srcdir=$srcdir ;;
1613   *) # Relative name.
1614     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1615     ac_top_srcdir=$ac_top_build_prefix$srcdir
1616     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1617 esac
1618 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1619
1620     cd "$ac_dir" || { ac_status=$?; continue; }
1621     # Check for guested configure.
1622     if test -f "$ac_srcdir/configure.gnu"; then
1623       echo &&
1624       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1625     elif test -f "$ac_srcdir/configure"; then
1626       echo &&
1627       $SHELL "$ac_srcdir/configure" --help=recursive
1628     else
1629       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1630     fi || ac_status=$?
1631     cd "$ac_pwd" || { ac_status=$?; break; }
1632   done
1633 fi
1634
1635 test -n "$ac_init_help" && exit $ac_status
1636 if $ac_init_version; then
1637   cat <<\_ACEOF
1638 unbound configure 1.5.5
1639 generated by GNU Autoconf 2.69
1640
1641 Copyright (C) 2012 Free Software Foundation, Inc.
1642 This configure script is free software; the Free Software Foundation
1643 gives unlimited permission to copy, distribute and modify it.
1644 _ACEOF
1645   exit
1646 fi
1647
1648 ## ------------------------ ##
1649 ## Autoconf initialization. ##
1650 ## ------------------------ ##
1651
1652 # ac_fn_c_try_compile LINENO
1653 # --------------------------
1654 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1655 ac_fn_c_try_compile ()
1656 {
1657   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1658   rm -f conftest.$ac_objext
1659   if { { ac_try="$ac_compile"
1660 case "(($ac_try" in
1661   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1662   *) ac_try_echo=$ac_try;;
1663 esac
1664 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1665 $as_echo "$ac_try_echo"; } >&5
1666   (eval "$ac_compile") 2>conftest.err
1667   ac_status=$?
1668   if test -s conftest.err; then
1669     grep -v '^ *+' conftest.err >conftest.er1
1670     cat conftest.er1 >&5
1671     mv -f conftest.er1 conftest.err
1672   fi
1673   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1674   test $ac_status = 0; } && {
1675          test -z "$ac_c_werror_flag" ||
1676          test ! -s conftest.err
1677        } && test -s conftest.$ac_objext; then :
1678   ac_retval=0
1679 else
1680   $as_echo "$as_me: failed program was:" >&5
1681 sed 's/^/| /' conftest.$ac_ext >&5
1682
1683         ac_retval=1
1684 fi
1685   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1686   as_fn_set_status $ac_retval
1687
1688 } # ac_fn_c_try_compile
1689
1690 # ac_fn_c_try_cpp LINENO
1691 # ----------------------
1692 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1693 ac_fn_c_try_cpp ()
1694 {
1695   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1696   if { { ac_try="$ac_cpp conftest.$ac_ext"
1697 case "(($ac_try" in
1698   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1699   *) ac_try_echo=$ac_try;;
1700 esac
1701 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1702 $as_echo "$ac_try_echo"; } >&5
1703   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1704   ac_status=$?
1705   if test -s conftest.err; then
1706     grep -v '^ *+' conftest.err >conftest.er1
1707     cat conftest.er1 >&5
1708     mv -f conftest.er1 conftest.err
1709   fi
1710   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1711   test $ac_status = 0; } > conftest.i && {
1712          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1713          test ! -s conftest.err
1714        }; then :
1715   ac_retval=0
1716 else
1717   $as_echo "$as_me: failed program was:" >&5
1718 sed 's/^/| /' conftest.$ac_ext >&5
1719
1720     ac_retval=1
1721 fi
1722   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1723   as_fn_set_status $ac_retval
1724
1725 } # ac_fn_c_try_cpp
1726
1727 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1728 # -------------------------------------------------------
1729 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1730 # the include files in INCLUDES and setting the cache variable VAR
1731 # accordingly.
1732 ac_fn_c_check_header_mongrel ()
1733 {
1734   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1735   if eval \${$3+:} false; then :
1736   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1737 $as_echo_n "checking for $2... " >&6; }
1738 if eval \${$3+:} false; then :
1739   $as_echo_n "(cached) " >&6
1740 fi
1741 eval ac_res=\$$3
1742                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1743 $as_echo "$ac_res" >&6; }
1744 else
1745   # Is the header compilable?
1746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1747 $as_echo_n "checking $2 usability... " >&6; }
1748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1749 /* end confdefs.h.  */
1750 $4
1751 #include <$2>
1752 _ACEOF
1753 if ac_fn_c_try_compile "$LINENO"; then :
1754   ac_header_compiler=yes
1755 else
1756   ac_header_compiler=no
1757 fi
1758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1760 $as_echo "$ac_header_compiler" >&6; }
1761
1762 # Is the header present?
1763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1764 $as_echo_n "checking $2 presence... " >&6; }
1765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1766 /* end confdefs.h.  */
1767 #include <$2>
1768 _ACEOF
1769 if ac_fn_c_try_cpp "$LINENO"; then :
1770   ac_header_preproc=yes
1771 else
1772   ac_header_preproc=no
1773 fi
1774 rm -f conftest.err conftest.i conftest.$ac_ext
1775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1776 $as_echo "$ac_header_preproc" >&6; }
1777
1778 # So?  What about this header?
1779 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1780   yes:no: )
1781     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1782 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1783     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1784 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1785     ;;
1786   no:yes:* )
1787     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1788 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1789     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1790 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1791     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1792 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1793     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1794 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1795     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1796 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1797 ( $as_echo "## ---------------------------------------- ##
1798 ## Report this to unbound-bugs@nlnetlabs.nl ##
1799 ## ---------------------------------------- ##"
1800      ) | sed "s/^/$as_me: WARNING:     /" >&2
1801     ;;
1802 esac
1803   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1804 $as_echo_n "checking for $2... " >&6; }
1805 if eval \${$3+:} false; then :
1806   $as_echo_n "(cached) " >&6
1807 else
1808   eval "$3=\$ac_header_compiler"
1809 fi
1810 eval ac_res=\$$3
1811                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1812 $as_echo "$ac_res" >&6; }
1813 fi
1814   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1815
1816 } # ac_fn_c_check_header_mongrel
1817
1818 # ac_fn_c_try_run LINENO
1819 # ----------------------
1820 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1821 # that executables *can* be run.
1822 ac_fn_c_try_run ()
1823 {
1824   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1825   if { { ac_try="$ac_link"
1826 case "(($ac_try" in
1827   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1828   *) ac_try_echo=$ac_try;;
1829 esac
1830 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1831 $as_echo "$ac_try_echo"; } >&5
1832   (eval "$ac_link") 2>&5
1833   ac_status=$?
1834   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1835   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1836   { { case "(($ac_try" in
1837   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1838   *) ac_try_echo=$ac_try;;
1839 esac
1840 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1841 $as_echo "$ac_try_echo"; } >&5
1842   (eval "$ac_try") 2>&5
1843   ac_status=$?
1844   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1845   test $ac_status = 0; }; }; then :
1846   ac_retval=0
1847 else
1848   $as_echo "$as_me: program exited with status $ac_status" >&5
1849        $as_echo "$as_me: failed program was:" >&5
1850 sed 's/^/| /' conftest.$ac_ext >&5
1851
1852        ac_retval=$ac_status
1853 fi
1854   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1855   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1856   as_fn_set_status $ac_retval
1857
1858 } # ac_fn_c_try_run
1859
1860 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1861 # -------------------------------------------------------
1862 # Tests whether HEADER exists and can be compiled using the include files in
1863 # INCLUDES, setting the cache variable VAR accordingly.
1864 ac_fn_c_check_header_compile ()
1865 {
1866   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1868 $as_echo_n "checking for $2... " >&6; }
1869 if eval \${$3+:} false; then :
1870   $as_echo_n "(cached) " >&6
1871 else
1872   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1873 /* end confdefs.h.  */
1874 $4
1875 #include <$2>
1876 _ACEOF
1877 if ac_fn_c_try_compile "$LINENO"; then :
1878   eval "$3=yes"
1879 else
1880   eval "$3=no"
1881 fi
1882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1883 fi
1884 eval ac_res=\$$3
1885                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1886 $as_echo "$ac_res" >&6; }
1887   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1888
1889 } # ac_fn_c_check_header_compile
1890
1891 # ac_fn_c_try_link LINENO
1892 # -----------------------
1893 # Try to link conftest.$ac_ext, and return whether this succeeded.
1894 ac_fn_c_try_link ()
1895 {
1896   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1897   rm -f conftest.$ac_objext conftest$ac_exeext
1898   if { { ac_try="$ac_link"
1899 case "(($ac_try" in
1900   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1901   *) ac_try_echo=$ac_try;;
1902 esac
1903 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1904 $as_echo "$ac_try_echo"; } >&5
1905   (eval "$ac_link") 2>conftest.err
1906   ac_status=$?
1907   if test -s conftest.err; then
1908     grep -v '^ *+' conftest.err >conftest.er1
1909     cat conftest.er1 >&5
1910     mv -f conftest.er1 conftest.err
1911   fi
1912   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1913   test $ac_status = 0; } && {
1914          test -z "$ac_c_werror_flag" ||
1915          test ! -s conftest.err
1916        } && test -s conftest$ac_exeext && {
1917          test "$cross_compiling" = yes ||
1918          test -x conftest$ac_exeext
1919        }; then :
1920   ac_retval=0
1921 else
1922   $as_echo "$as_me: failed program was:" >&5
1923 sed 's/^/| /' conftest.$ac_ext >&5
1924
1925         ac_retval=1
1926 fi
1927   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1928   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1929   # interfere with the next link command; also delete a directory that is
1930   # left behind by Apple's compiler.  We do this before executing the actions.
1931   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1932   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1933   as_fn_set_status $ac_retval
1934
1935 } # ac_fn_c_try_link
1936
1937 # ac_fn_c_check_func LINENO FUNC VAR
1938 # ----------------------------------
1939 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1940 ac_fn_c_check_func ()
1941 {
1942   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1943   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1944 $as_echo_n "checking for $2... " >&6; }
1945 if eval \${$3+:} false; then :
1946   $as_echo_n "(cached) " >&6
1947 else
1948   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1949 /* end confdefs.h.  */
1950 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1951    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1952 #define $2 innocuous_$2
1953
1954 /* System header to define __stub macros and hopefully few prototypes,
1955     which can conflict with char $2 (); below.
1956     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1957     <limits.h> exists even on freestanding compilers.  */
1958
1959 #ifdef __STDC__
1960 # include <limits.h>
1961 #else
1962 # include <assert.h>
1963 #endif
1964
1965 #undef $2
1966
1967 /* Override any GCC internal prototype to avoid an error.
1968    Use char because int might match the return type of a GCC
1969    builtin and then its argument prototype would still apply.  */
1970 #ifdef __cplusplus
1971 extern "C"
1972 #endif
1973 char $2 ();
1974 /* The GNU C library defines this for functions which it implements
1975     to always fail with ENOSYS.  Some functions are actually named
1976     something starting with __ and the normal name is an alias.  */
1977 #if defined __stub_$2 || defined __stub___$2
1978 choke me
1979 #endif
1980
1981 int
1982 main ()
1983 {
1984 return $2 ();
1985   ;
1986   return 0;
1987 }
1988 _ACEOF
1989 if ac_fn_c_try_link "$LINENO"; then :
1990   eval "$3=yes"
1991 else
1992   eval "$3=no"
1993 fi
1994 rm -f core conftest.err conftest.$ac_objext \
1995     conftest$ac_exeext conftest.$ac_ext
1996 fi
1997 eval ac_res=\$$3
1998                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1999 $as_echo "$ac_res" >&6; }
2000   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2001
2002 } # ac_fn_c_check_func
2003
2004 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2005 # -------------------------------------------
2006 # Tests whether TYPE exists after having included INCLUDES, setting cache
2007 # variable VAR accordingly.
2008 ac_fn_c_check_type ()
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   eval "$3=no"
2017   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2018 /* end confdefs.h.  */
2019 $4
2020 int
2021 main ()
2022 {
2023 if (sizeof ($2))
2024          return 0;
2025   ;
2026   return 0;
2027 }
2028 _ACEOF
2029 if ac_fn_c_try_compile "$LINENO"; then :
2030   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031 /* end confdefs.h.  */
2032 $4
2033 int
2034 main ()
2035 {
2036 if (sizeof (($2)))
2037             return 0;
2038   ;
2039   return 0;
2040 }
2041 _ACEOF
2042 if ac_fn_c_try_compile "$LINENO"; then :
2043
2044 else
2045   eval "$3=yes"
2046 fi
2047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2048 fi
2049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2050 fi
2051 eval ac_res=\$$3
2052                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2053 $as_echo "$ac_res" >&6; }
2054   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2055
2056 } # ac_fn_c_check_type
2057
2058 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2059 # --------------------------------------------
2060 # Tries to find the compile-time value of EXPR in a program that includes
2061 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2062 # computed
2063 ac_fn_c_compute_int ()
2064 {
2065   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2066   if test "$cross_compiling" = yes; then
2067     # Depending upon the size, compute the lo and hi bounds.
2068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2069 /* end confdefs.h.  */
2070 $4
2071 int
2072 main ()
2073 {
2074 static int test_array [1 - 2 * !(($2) >= 0)];
2075 test_array [0] = 0;
2076 return test_array [0];
2077
2078   ;
2079   return 0;
2080 }
2081 _ACEOF
2082 if ac_fn_c_try_compile "$LINENO"; then :
2083   ac_lo=0 ac_mid=0
2084   while :; do
2085     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2086 /* end confdefs.h.  */
2087 $4
2088 int
2089 main ()
2090 {
2091 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2092 test_array [0] = 0;
2093 return test_array [0];
2094
2095   ;
2096   return 0;
2097 }
2098 _ACEOF
2099 if ac_fn_c_try_compile "$LINENO"; then :
2100   ac_hi=$ac_mid; break
2101 else
2102   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2103                         if test $ac_lo -le $ac_mid; then
2104                           ac_lo= ac_hi=
2105                           break
2106                         fi
2107                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2108 fi
2109 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110   done
2111 else
2112   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2113 /* end confdefs.h.  */
2114 $4
2115 int
2116 main ()
2117 {
2118 static int test_array [1 - 2 * !(($2) < 0)];
2119 test_array [0] = 0;
2120 return test_array [0];
2121
2122   ;
2123   return 0;
2124 }
2125 _ACEOF
2126 if ac_fn_c_try_compile "$LINENO"; then :
2127   ac_hi=-1 ac_mid=-1
2128   while :; do
2129     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130 /* end confdefs.h.  */
2131 $4
2132 int
2133 main ()
2134 {
2135 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2136 test_array [0] = 0;
2137 return test_array [0];
2138
2139   ;
2140   return 0;
2141 }
2142 _ACEOF
2143 if ac_fn_c_try_compile "$LINENO"; then :
2144   ac_lo=$ac_mid; break
2145 else
2146   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2147                         if test $ac_mid -le $ac_hi; then
2148                           ac_lo= ac_hi=
2149                           break
2150                         fi
2151                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2152 fi
2153 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2154   done
2155 else
2156   ac_lo= ac_hi=
2157 fi
2158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2159 fi
2160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2161 # Binary search between lo and hi bounds.
2162 while test "x$ac_lo" != "x$ac_hi"; do
2163   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165 /* end confdefs.h.  */
2166 $4
2167 int
2168 main ()
2169 {
2170 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2171 test_array [0] = 0;
2172 return test_array [0];
2173
2174   ;
2175   return 0;
2176 }
2177 _ACEOF
2178 if ac_fn_c_try_compile "$LINENO"; then :
2179   ac_hi=$ac_mid
2180 else
2181   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2182 fi
2183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2184 done
2185 case $ac_lo in #((
2186 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2187 '') ac_retval=1 ;;
2188 esac
2189   else
2190     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191 /* end confdefs.h.  */
2192 $4
2193 static long int longval () { return $2; }
2194 static unsigned long int ulongval () { return $2; }
2195 #include <stdio.h>
2196 #include <stdlib.h>
2197 int
2198 main ()
2199 {
2200
2201   FILE *f = fopen ("conftest.val", "w");
2202   if (! f)
2203     return 1;
2204   if (($2) < 0)
2205     {
2206       long int i = longval ();
2207       if (i != ($2))
2208         return 1;
2209       fprintf (f, "%ld", i);
2210     }
2211   else
2212     {
2213       unsigned long int i = ulongval ();
2214       if (i != ($2))
2215         return 1;
2216       fprintf (f, "%lu", i);
2217     }
2218   /* Do not output a trailing newline, as this causes \r\n confusion
2219      on some platforms.  */
2220   return ferror (f) || fclose (f) != 0;
2221
2222   ;
2223   return 0;
2224 }
2225 _ACEOF
2226 if ac_fn_c_try_run "$LINENO"; then :
2227   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2228 else
2229   ac_retval=1
2230 fi
2231 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2232   conftest.$ac_objext conftest.beam conftest.$ac_ext
2233 rm -f conftest.val
2234
2235   fi
2236   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2237   as_fn_set_status $ac_retval
2238
2239 } # ac_fn_c_compute_int
2240
2241 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2242 # ---------------------------------------------
2243 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2244 # accordingly.
2245 ac_fn_c_check_decl ()
2246 {
2247   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2248   as_decl_name=`echo $2|sed 's/ *(.*//'`
2249   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2250   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2251 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2252 if eval \${$3+:} false; then :
2253   $as_echo_n "(cached) " >&6
2254 else
2255   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2256 /* end confdefs.h.  */
2257 $4
2258 int
2259 main ()
2260 {
2261 #ifndef $as_decl_name
2262 #ifdef __cplusplus
2263   (void) $as_decl_use;
2264 #else
2265   (void) $as_decl_name;
2266 #endif
2267 #endif
2268
2269   ;
2270   return 0;
2271 }
2272 _ACEOF
2273 if ac_fn_c_try_compile "$LINENO"; then :
2274   eval "$3=yes"
2275 else
2276   eval "$3=no"
2277 fi
2278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279 fi
2280 eval ac_res=\$$3
2281                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2282 $as_echo "$ac_res" >&6; }
2283   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2284
2285 } # ac_fn_c_check_decl
2286
2287 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2288 # ----------------------------------------------------
2289 # Tries to find if the field MEMBER exists in type AGGR, after including
2290 # INCLUDES, setting cache variable VAR accordingly.
2291 ac_fn_c_check_member ()
2292 {
2293   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2294   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2295 $as_echo_n "checking for $2.$3... " >&6; }
2296 if eval \${$4+:} false; then :
2297   $as_echo_n "(cached) " >&6
2298 else
2299   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2300 /* end confdefs.h.  */
2301 $5
2302 int
2303 main ()
2304 {
2305 static $2 ac_aggr;
2306 if (ac_aggr.$3)
2307 return 0;
2308   ;
2309   return 0;
2310 }
2311 _ACEOF
2312 if ac_fn_c_try_compile "$LINENO"; then :
2313   eval "$4=yes"
2314 else
2315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316 /* end confdefs.h.  */
2317 $5
2318 int
2319 main ()
2320 {
2321 static $2 ac_aggr;
2322 if (sizeof ac_aggr.$3)
2323 return 0;
2324   ;
2325   return 0;
2326 }
2327 _ACEOF
2328 if ac_fn_c_try_compile "$LINENO"; then :
2329   eval "$4=yes"
2330 else
2331   eval "$4=no"
2332 fi
2333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334 fi
2335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2336 fi
2337 eval ac_res=\$$4
2338                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2339 $as_echo "$ac_res" >&6; }
2340   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2341
2342 } # ac_fn_c_check_member
2343 cat >config.log <<_ACEOF
2344 This file contains any messages produced by compilers while
2345 running configure, to aid debugging if configure makes a mistake.
2346
2347 It was created by unbound $as_me 1.5.5, which was
2348 generated by GNU Autoconf 2.69.  Invocation command line was
2349
2350   $ $0 $@
2351
2352 _ACEOF
2353 exec 5>>config.log
2354 {
2355 cat <<_ASUNAME
2356 ## --------- ##
2357 ## Platform. ##
2358 ## --------- ##
2359
2360 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2361 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2362 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2363 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2364 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2365
2366 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2367 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2368
2369 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2370 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2371 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2372 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2373 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2374 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2375 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2376
2377 _ASUNAME
2378
2379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2380 for as_dir in $PATH
2381 do
2382   IFS=$as_save_IFS
2383   test -z "$as_dir" && as_dir=.
2384     $as_echo "PATH: $as_dir"
2385   done
2386 IFS=$as_save_IFS
2387
2388 } >&5
2389
2390 cat >&5 <<_ACEOF
2391
2392
2393 ## ----------- ##
2394 ## Core tests. ##
2395 ## ----------- ##
2396
2397 _ACEOF
2398
2399
2400 # Keep a trace of the command line.
2401 # Strip out --no-create and --no-recursion so they do not pile up.
2402 # Strip out --silent because we don't want to record it for future runs.
2403 # Also quote any args containing shell meta-characters.
2404 # Make two passes to allow for proper duplicate-argument suppression.
2405 ac_configure_args=
2406 ac_configure_args0=
2407 ac_configure_args1=
2408 ac_must_keep_next=false
2409 for ac_pass in 1 2
2410 do
2411   for ac_arg
2412   do
2413     case $ac_arg in
2414     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2415     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2416     | -silent | --silent | --silen | --sile | --sil)
2417       continue ;;
2418     *\'*)
2419       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2420     esac
2421     case $ac_pass in
2422     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2423     2)
2424       as_fn_append ac_configure_args1 " '$ac_arg'"
2425       if test $ac_must_keep_next = true; then
2426         ac_must_keep_next=false # Got value, back to normal.
2427       else
2428         case $ac_arg in
2429           *=* | --config-cache | -C | -disable-* | --disable-* \
2430           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2431           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2432           | -with-* | --with-* | -without-* | --without-* | --x)
2433             case "$ac_configure_args0 " in
2434               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2435             esac
2436             ;;
2437           -* ) ac_must_keep_next=true ;;
2438         esac
2439       fi
2440       as_fn_append ac_configure_args " '$ac_arg'"
2441       ;;
2442     esac
2443   done
2444 done
2445 { ac_configure_args0=; unset ac_configure_args0;}
2446 { ac_configure_args1=; unset ac_configure_args1;}
2447
2448 # When interrupted or exit'd, cleanup temporary files, and complete
2449 # config.log.  We remove comments because anyway the quotes in there
2450 # would cause problems or look ugly.
2451 # WARNING: Use '\'' to represent an apostrophe within the trap.
2452 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2453 trap 'exit_status=$?
2454   # Save into config.log some information that might help in debugging.
2455   {
2456     echo
2457
2458     $as_echo "## ---------------- ##
2459 ## Cache variables. ##
2460 ## ---------------- ##"
2461     echo
2462     # The following way of writing the cache mishandles newlines in values,
2463 (
2464   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2465     eval ac_val=\$$ac_var
2466     case $ac_val in #(
2467     *${as_nl}*)
2468       case $ac_var in #(
2469       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2470 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2471       esac
2472       case $ac_var in #(
2473       _ | IFS | as_nl) ;; #(
2474       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2475       *) { eval $ac_var=; unset $ac_var;} ;;
2476       esac ;;
2477     esac
2478   done
2479   (set) 2>&1 |
2480     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2481     *${as_nl}ac_space=\ *)
2482       sed -n \
2483         "s/'\''/'\''\\\\'\'''\''/g;
2484           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2485       ;; #(
2486     *)
2487       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2488       ;;
2489     esac |
2490     sort
2491 )
2492     echo
2493
2494     $as_echo "## ----------------- ##
2495 ## Output variables. ##
2496 ## ----------------- ##"
2497     echo
2498     for ac_var in $ac_subst_vars
2499     do
2500       eval ac_val=\$$ac_var
2501       case $ac_val in
2502       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2503       esac
2504       $as_echo "$ac_var='\''$ac_val'\''"
2505     done | sort
2506     echo
2507
2508     if test -n "$ac_subst_files"; then
2509       $as_echo "## ------------------- ##
2510 ## File substitutions. ##
2511 ## ------------------- ##"
2512       echo
2513       for ac_var in $ac_subst_files
2514       do
2515         eval ac_val=\$$ac_var
2516         case $ac_val in
2517         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2518         esac
2519         $as_echo "$ac_var='\''$ac_val'\''"
2520       done | sort
2521       echo
2522     fi
2523
2524     if test -s confdefs.h; then
2525       $as_echo "## ----------- ##
2526 ## confdefs.h. ##
2527 ## ----------- ##"
2528       echo
2529       cat confdefs.h
2530       echo
2531     fi
2532     test "$ac_signal" != 0 &&
2533       $as_echo "$as_me: caught signal $ac_signal"
2534     $as_echo "$as_me: exit $exit_status"
2535   } >&5
2536   rm -f core *.core core.conftest.* &&
2537     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2538     exit $exit_status
2539 ' 0
2540 for ac_signal in 1 2 13 15; do
2541   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2542 done
2543 ac_signal=0
2544
2545 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2546 rm -f -r conftest* confdefs.h
2547
2548 $as_echo "/* confdefs.h */" > confdefs.h
2549
2550 # Predefined preprocessor variables.
2551
2552 cat >>confdefs.h <<_ACEOF
2553 #define PACKAGE_NAME "$PACKAGE_NAME"
2554 _ACEOF
2555
2556 cat >>confdefs.h <<_ACEOF
2557 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2558 _ACEOF
2559
2560 cat >>confdefs.h <<_ACEOF
2561 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2562 _ACEOF
2563
2564 cat >>confdefs.h <<_ACEOF
2565 #define PACKAGE_STRING "$PACKAGE_STRING"
2566 _ACEOF
2567
2568 cat >>confdefs.h <<_ACEOF
2569 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2570 _ACEOF
2571
2572 cat >>confdefs.h <<_ACEOF
2573 #define PACKAGE_URL "$PACKAGE_URL"
2574 _ACEOF
2575
2576
2577 # Let the site file select an alternate cache file if it wants to.
2578 # Prefer an explicitly selected file to automatically selected ones.
2579 ac_site_file1=NONE
2580 ac_site_file2=NONE
2581 if test -n "$CONFIG_SITE"; then
2582   # We do not want a PATH search for config.site.
2583   case $CONFIG_SITE in #((
2584     -*)  ac_site_file1=./$CONFIG_SITE;;
2585     */*) ac_site_file1=$CONFIG_SITE;;
2586     *)   ac_site_file1=./$CONFIG_SITE;;
2587   esac
2588 elif test "x$prefix" != xNONE; then
2589   ac_site_file1=$prefix/share/config.site
2590   ac_site_file2=$prefix/etc/config.site
2591 else
2592   ac_site_file1=$ac_default_prefix/share/config.site
2593   ac_site_file2=$ac_default_prefix/etc/config.site
2594 fi
2595 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2596 do
2597   test "x$ac_site_file" = xNONE && continue
2598   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2599     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2600 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2601     sed 's/^/| /' "$ac_site_file" >&5
2602     . "$ac_site_file" \
2603       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2604 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2605 as_fn_error $? "failed to load site script $ac_site_file
2606 See \`config.log' for more details" "$LINENO" 5; }
2607   fi
2608 done
2609
2610 if test -r "$cache_file"; then
2611   # Some versions of bash will fail to source /dev/null (special files
2612   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2613   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2614     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2615 $as_echo "$as_me: loading cache $cache_file" >&6;}
2616     case $cache_file in
2617       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2618       *)                      . "./$cache_file";;
2619     esac
2620   fi
2621 else
2622   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2623 $as_echo "$as_me: creating cache $cache_file" >&6;}
2624   >$cache_file
2625 fi
2626
2627 # Check that the precious variables saved in the cache have kept the same
2628 # value.
2629 ac_cache_corrupted=false
2630 for ac_var in $ac_precious_vars; do
2631   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2632   eval ac_new_set=\$ac_env_${ac_var}_set
2633   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2634   eval ac_new_val=\$ac_env_${ac_var}_value
2635   case $ac_old_set,$ac_new_set in
2636     set,)
2637       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2638 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2639       ac_cache_corrupted=: ;;
2640     ,set)
2641       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2642 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2643       ac_cache_corrupted=: ;;
2644     ,);;
2645     *)
2646       if test "x$ac_old_val" != "x$ac_new_val"; then
2647         # differences in whitespace do not lead to failure.
2648         ac_old_val_w=`echo x $ac_old_val`
2649         ac_new_val_w=`echo x $ac_new_val`
2650         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2651           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2652 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2653           ac_cache_corrupted=:
2654         else
2655           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2656 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2657           eval $ac_var=\$ac_old_val
2658         fi
2659         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2660 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2661         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2662 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2663       fi;;
2664   esac
2665   # Pass precious variables to config.status.
2666   if test "$ac_new_set" = set; then
2667     case $ac_new_val in
2668     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2669     *) ac_arg=$ac_var=$ac_new_val ;;
2670     esac
2671     case " $ac_configure_args " in
2672       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2673       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2674     esac
2675   fi
2676 done
2677 if $ac_cache_corrupted; then
2678   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2679 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2680   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2681 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2682   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2683 fi
2684 ## -------------------- ##
2685 ## Main body of script. ##
2686 ## -------------------- ##
2687
2688 ac_ext=c
2689 ac_cpp='$CPP $CPPFLAGS'
2690 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2691 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2692 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2693
2694
2695 UNBOUND_VERSION_MAJOR=1
2696
2697 UNBOUND_VERSION_MINOR=5
2698
2699 UNBOUND_VERSION_MICRO=5
2700
2701
2702 LIBUNBOUND_CURRENT=5
2703 LIBUNBOUND_REVISION=8
2704 LIBUNBOUND_AGE=3
2705 # 1.0.0 had 0:12:0
2706 # 1.0.1 had 0:13:0
2707 # 1.0.2 had 0:14:0
2708 # 1.1.0 had 0:15:0
2709 # 1.1.1 had 0:16:0
2710 # 1.2.0 had 0:17:0
2711 # 1.2.1 had 0:18:0
2712 # 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
2713 # 1.3.1 had 1:1:0
2714 # 1.3.2 had 1:2:0
2715 # 1.3.3 had 1:3:0
2716 # 1.3.4 had 1:4:0
2717 # 1.4.0-snapshots had 1:5:0
2718 # 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
2719 # 1.4.1 had 2:1:0
2720 # 1.4.2 had 2:2:0
2721 # 1.4.3 had 2:3:0
2722 # 1.4.4 had 2:4:0
2723 # 1.4.5 had 2:5:0
2724 # 1.4.6 had 2:6:0
2725 # 1.4.7 had 2:7:0
2726 # 1.4.8 had 2:8:0
2727 # 1.4.9 had 2:9:0
2728 # 1.4.10 had 2:10:0
2729 # 1.4.11 had 2:11:0
2730 # 1.4.12 had 2:12:0
2731 # 1.4.13 had 2:13:0
2732 # and 1.4.13p1 and 1.4.13.p2
2733 # 1.4.14 had 2:14:0
2734 # 1.4.15 had 3:0:1 # adds ub_version()
2735 # 1.4.16 had 3:1:1
2736 # 1.4.17 had 3:2:1
2737 # 1.4.18 had 3:3:1
2738 # 1.4.19 had 3:4:1
2739 # 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
2740 # 1.4.21 had 4:1:2
2741 # 1.4.22 had 4:1:2
2742 # 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2743 # 1.5.1 had 5:3:3
2744 # 1.5.2 had 5:5:3
2745 # 1.5.3 had 5:6:3
2746 # 1.5.4 had 5:7:3
2747 # 1.5.5 had 5:8:3
2748
2749 #   Current  -- the number of the binary API that we're implementing
2750 #   Revision -- which iteration of the implementation of the binary
2751 #               API are we supplying?
2752 #   Age      -- How many previous binary API versions do we also
2753 #               support?
2754 #
2755 # If we release a new version that does not change the binary API,
2756 # increment Revision.
2757 #
2758 # If we release a new version that changes the binary API, but does
2759 # not break programs compiled against the old binary API, increment
2760 # Current and Age.  Set Revision to 0, since this is the first
2761 # implementation of the new API.
2762 #
2763 # Otherwise, we're changing the binary API and breaking bakward
2764 # compatibility with old binaries.  Increment Current.  Set Age to 0,
2765 # since we're backward compatible with no previous APIs.  Set Revision
2766 # to 0 too.
2767
2768
2769
2770
2771 CFLAGS="$CFLAGS"
2772 ac_ext=c
2773 ac_cpp='$CPP $CPPFLAGS'
2774 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2775 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2776 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2777 if test -n "$ac_tool_prefix"; then
2778   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2779 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2781 $as_echo_n "checking for $ac_word... " >&6; }
2782 if ${ac_cv_prog_CC+:} false; then :
2783   $as_echo_n "(cached) " >&6
2784 else
2785   if test -n "$CC"; then
2786   ac_cv_prog_CC="$CC" # Let the user override the test.
2787 else
2788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2789 for as_dir in $PATH
2790 do
2791   IFS=$as_save_IFS
2792   test -z "$as_dir" && as_dir=.
2793     for ac_exec_ext in '' $ac_executable_extensions; do
2794   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2795     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2796     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2797     break 2
2798   fi
2799 done
2800   done
2801 IFS=$as_save_IFS
2802
2803 fi
2804 fi
2805 CC=$ac_cv_prog_CC
2806 if test -n "$CC"; then
2807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2808 $as_echo "$CC" >&6; }
2809 else
2810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2811 $as_echo "no" >&6; }
2812 fi
2813
2814
2815 fi
2816 if test -z "$ac_cv_prog_CC"; then
2817   ac_ct_CC=$CC
2818   # Extract the first word of "gcc", so it can be a program name with args.
2819 set dummy gcc; ac_word=$2
2820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2821 $as_echo_n "checking for $ac_word... " >&6; }
2822 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2823   $as_echo_n "(cached) " >&6
2824 else
2825   if test -n "$ac_ct_CC"; then
2826   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2827 else
2828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2829 for as_dir in $PATH
2830 do
2831   IFS=$as_save_IFS
2832   test -z "$as_dir" && as_dir=.
2833     for ac_exec_ext in '' $ac_executable_extensions; do
2834   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2835     ac_cv_prog_ac_ct_CC="gcc"
2836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2837     break 2
2838   fi
2839 done
2840   done
2841 IFS=$as_save_IFS
2842
2843 fi
2844 fi
2845 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2846 if test -n "$ac_ct_CC"; then
2847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2848 $as_echo "$ac_ct_CC" >&6; }
2849 else
2850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2851 $as_echo "no" >&6; }
2852 fi
2853
2854   if test "x$ac_ct_CC" = x; then
2855     CC=""
2856   else
2857     case $cross_compiling:$ac_tool_warned in
2858 yes:)
2859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2860 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2861 ac_tool_warned=yes ;;
2862 esac
2863     CC=$ac_ct_CC
2864   fi
2865 else
2866   CC="$ac_cv_prog_CC"
2867 fi
2868
2869 if test -z "$CC"; then
2870           if test -n "$ac_tool_prefix"; then
2871     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2872 set dummy ${ac_tool_prefix}cc; ac_word=$2
2873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2874 $as_echo_n "checking for $ac_word... " >&6; }
2875 if ${ac_cv_prog_CC+:} false; then :
2876   $as_echo_n "(cached) " >&6
2877 else
2878   if test -n "$CC"; then
2879   ac_cv_prog_CC="$CC" # Let the user override the test.
2880 else
2881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2882 for as_dir in $PATH
2883 do
2884   IFS=$as_save_IFS
2885   test -z "$as_dir" && as_dir=.
2886     for ac_exec_ext in '' $ac_executable_extensions; do
2887   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2888     ac_cv_prog_CC="${ac_tool_prefix}cc"
2889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2890     break 2
2891   fi
2892 done
2893   done
2894 IFS=$as_save_IFS
2895
2896 fi
2897 fi
2898 CC=$ac_cv_prog_CC
2899 if test -n "$CC"; then
2900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2901 $as_echo "$CC" >&6; }
2902 else
2903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2904 $as_echo "no" >&6; }
2905 fi
2906
2907
2908   fi
2909 fi
2910 if test -z "$CC"; then
2911   # Extract the first word of "cc", so it can be a program name with args.
2912 set dummy cc; ac_word=$2
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2914 $as_echo_n "checking for $ac_word... " >&6; }
2915 if ${ac_cv_prog_CC+:} false; then :
2916   $as_echo_n "(cached) " >&6
2917 else
2918   if test -n "$CC"; then
2919   ac_cv_prog_CC="$CC" # Let the user override the test.
2920 else
2921   ac_prog_rejected=no
2922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2923 for as_dir in $PATH
2924 do
2925   IFS=$as_save_IFS
2926   test -z "$as_dir" && as_dir=.
2927     for ac_exec_ext in '' $ac_executable_extensions; do
2928   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2929     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2930        ac_prog_rejected=yes
2931        continue
2932      fi
2933     ac_cv_prog_CC="cc"
2934     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2935     break 2
2936   fi
2937 done
2938   done
2939 IFS=$as_save_IFS
2940
2941 if test $ac_prog_rejected = yes; then
2942   # We found a bogon in the path, so make sure we never use it.
2943   set dummy $ac_cv_prog_CC
2944   shift
2945   if test $# != 0; then
2946     # We chose a different compiler from the bogus one.
2947     # However, it has the same basename, so the bogon will be chosen
2948     # first if we set CC to just the basename; use the full file name.
2949     shift
2950     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2951   fi
2952 fi
2953 fi
2954 fi
2955 CC=$ac_cv_prog_CC
2956 if test -n "$CC"; then
2957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2958 $as_echo "$CC" >&6; }
2959 else
2960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2961 $as_echo "no" >&6; }
2962 fi
2963
2964
2965 fi
2966 if test -z "$CC"; then
2967   if test -n "$ac_tool_prefix"; then
2968   for ac_prog in cl.exe
2969   do
2970     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2971 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2973 $as_echo_n "checking for $ac_word... " >&6; }
2974 if ${ac_cv_prog_CC+:} false; then :
2975   $as_echo_n "(cached) " >&6
2976 else
2977   if test -n "$CC"; then
2978   ac_cv_prog_CC="$CC" # Let the user override the test.
2979 else
2980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2981 for as_dir in $PATH
2982 do
2983   IFS=$as_save_IFS
2984   test -z "$as_dir" && as_dir=.
2985     for ac_exec_ext in '' $ac_executable_extensions; do
2986   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2987     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2988     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2989     break 2
2990   fi
2991 done
2992   done
2993 IFS=$as_save_IFS
2994
2995 fi
2996 fi
2997 CC=$ac_cv_prog_CC
2998 if test -n "$CC"; then
2999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3000 $as_echo "$CC" >&6; }
3001 else
3002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3003 $as_echo "no" >&6; }
3004 fi
3005
3006
3007     test -n "$CC" && break
3008   done
3009 fi
3010 if test -z "$CC"; then
3011   ac_ct_CC=$CC
3012   for ac_prog in cl.exe
3013 do
3014   # Extract the first word of "$ac_prog", so it can be a program name with args.
3015 set dummy $ac_prog; ac_word=$2
3016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3017 $as_echo_n "checking for $ac_word... " >&6; }
3018 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3019   $as_echo_n "(cached) " >&6
3020 else
3021   if test -n "$ac_ct_CC"; then
3022   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3023 else
3024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3025 for as_dir in $PATH
3026 do
3027   IFS=$as_save_IFS
3028   test -z "$as_dir" && as_dir=.
3029     for ac_exec_ext in '' $ac_executable_extensions; do
3030   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3031     ac_cv_prog_ac_ct_CC="$ac_prog"
3032     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3033     break 2
3034   fi
3035 done
3036   done
3037 IFS=$as_save_IFS
3038
3039 fi
3040 fi
3041 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3042 if test -n "$ac_ct_CC"; then
3043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3044 $as_echo "$ac_ct_CC" >&6; }
3045 else
3046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3047 $as_echo "no" >&6; }
3048 fi
3049
3050
3051   test -n "$ac_ct_CC" && break
3052 done
3053
3054   if test "x$ac_ct_CC" = x; then
3055     CC=""
3056   else
3057     case $cross_compiling:$ac_tool_warned in
3058 yes:)
3059 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3060 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3061 ac_tool_warned=yes ;;
3062 esac
3063     CC=$ac_ct_CC
3064   fi
3065 fi
3066
3067 fi
3068
3069
3070 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3071 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3072 as_fn_error $? "no acceptable C compiler found in \$PATH
3073 See \`config.log' for more details" "$LINENO" 5; }
3074
3075 # Provide some information about the compiler.
3076 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3077 set X $ac_compile
3078 ac_compiler=$2
3079 for ac_option in --version -v -V -qversion; do
3080   { { ac_try="$ac_compiler $ac_option >&5"
3081 case "(($ac_try" in
3082   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3083   *) ac_try_echo=$ac_try;;
3084 esac
3085 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3086 $as_echo "$ac_try_echo"; } >&5
3087   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3088   ac_status=$?
3089   if test -s conftest.err; then
3090     sed '10a\
3091 ... rest of stderr output deleted ...
3092          10q' conftest.err >conftest.er1
3093     cat conftest.er1 >&5
3094   fi
3095   rm -f conftest.er1 conftest.err
3096   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3097   test $ac_status = 0; }
3098 done
3099
3100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3101 /* end confdefs.h.  */
3102
3103 int
3104 main ()
3105 {
3106
3107   ;
3108   return 0;
3109 }
3110 _ACEOF
3111 ac_clean_files_save=$ac_clean_files
3112 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3113 # Try to create an executable without -o first, disregard a.out.
3114 # It will help us diagnose broken compilers, and finding out an intuition
3115 # of exeext.
3116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3117 $as_echo_n "checking whether the C compiler works... " >&6; }
3118 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3119
3120 # The possible output files:
3121 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3122
3123 ac_rmfiles=
3124 for ac_file in $ac_files
3125 do
3126   case $ac_file in
3127     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3128     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3129   esac
3130 done
3131 rm -f $ac_rmfiles
3132
3133 if { { ac_try="$ac_link_default"
3134 case "(($ac_try" in
3135   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3136   *) ac_try_echo=$ac_try;;
3137 esac
3138 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3139 $as_echo "$ac_try_echo"; } >&5
3140   (eval "$ac_link_default") 2>&5
3141   ac_status=$?
3142   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3143   test $ac_status = 0; }; then :
3144   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3145 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3146 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3147 # so that the user can short-circuit this test for compilers unknown to
3148 # Autoconf.
3149 for ac_file in $ac_files ''
3150 do
3151   test -f "$ac_file" || continue
3152   case $ac_file in
3153     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3154         ;;
3155     [ab].out )
3156         # We found the default executable, but exeext='' is most
3157         # certainly right.
3158         break;;
3159     *.* )
3160         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3161         then :; else
3162            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3163         fi
3164         # We set ac_cv_exeext here because the later test for it is not
3165         # safe: cross compilers may not add the suffix if given an `-o'
3166         # argument, so we may need to know it at that point already.
3167         # Even if this section looks crufty: it has the advantage of
3168         # actually working.
3169         break;;
3170     * )
3171         break;;
3172   esac
3173 done
3174 test "$ac_cv_exeext" = no && ac_cv_exeext=
3175
3176 else
3177   ac_file=''
3178 fi
3179 if test -z "$ac_file"; then :
3180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3181 $as_echo "no" >&6; }
3182 $as_echo "$as_me: failed program was:" >&5
3183 sed 's/^/| /' conftest.$ac_ext >&5
3184
3185 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3186 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3187 as_fn_error 77 "C compiler cannot create executables
3188 See \`config.log' for more details" "$LINENO" 5; }
3189 else
3190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3191 $as_echo "yes" >&6; }
3192 fi
3193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3194 $as_echo_n "checking for C compiler default output file name... " >&6; }
3195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3196 $as_echo "$ac_file" >&6; }
3197 ac_exeext=$ac_cv_exeext
3198
3199 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3200 ac_clean_files=$ac_clean_files_save
3201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3202 $as_echo_n "checking for suffix of executables... " >&6; }
3203 if { { ac_try="$ac_link"
3204 case "(($ac_try" in
3205   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3206   *) ac_try_echo=$ac_try;;
3207 esac
3208 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3209 $as_echo "$ac_try_echo"; } >&5
3210   (eval "$ac_link") 2>&5
3211   ac_status=$?
3212   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3213   test $ac_status = 0; }; then :
3214   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3215 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3216 # work properly (i.e., refer to `conftest.exe'), while it won't with
3217 # `rm'.
3218 for ac_file in conftest.exe conftest conftest.*; do
3219   test -f "$ac_file" || continue
3220   case $ac_file in
3221     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3222     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3223           break;;
3224     * ) break;;
3225   esac
3226 done
3227 else
3228   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3229 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3230 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3231 See \`config.log' for more details" "$LINENO" 5; }
3232 fi
3233 rm -f conftest conftest$ac_cv_exeext
3234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3235 $as_echo "$ac_cv_exeext" >&6; }
3236
3237 rm -f conftest.$ac_ext
3238 EXEEXT=$ac_cv_exeext
3239 ac_exeext=$EXEEXT
3240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3241 /* end confdefs.h.  */
3242 #include <stdio.h>
3243 int
3244 main ()
3245 {
3246 FILE *f = fopen ("conftest.out", "w");
3247  return ferror (f) || fclose (f) != 0;
3248
3249   ;
3250   return 0;
3251 }
3252 _ACEOF
3253 ac_clean_files="$ac_clean_files conftest.out"
3254 # Check that the compiler produces executables we can run.  If not, either
3255 # the compiler is broken, or we cross compile.
3256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3257 $as_echo_n "checking whether we are cross compiling... " >&6; }
3258 if test "$cross_compiling" != yes; then
3259   { { ac_try="$ac_link"
3260 case "(($ac_try" in
3261   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3262   *) ac_try_echo=$ac_try;;
3263 esac
3264 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3265 $as_echo "$ac_try_echo"; } >&5
3266   (eval "$ac_link") 2>&5
3267   ac_status=$?
3268   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3269   test $ac_status = 0; }
3270   if { ac_try='./conftest$ac_cv_exeext'
3271   { { case "(($ac_try" in
3272   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3273   *) ac_try_echo=$ac_try;;
3274 esac
3275 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3276 $as_echo "$ac_try_echo"; } >&5
3277   (eval "$ac_try") 2>&5
3278   ac_status=$?
3279   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3280   test $ac_status = 0; }; }; then
3281     cross_compiling=no
3282   else
3283     if test "$cross_compiling" = maybe; then
3284         cross_compiling=yes
3285     else
3286         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3287 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3288 as_fn_error $? "cannot run C compiled programs.
3289 If you meant to cross compile, use \`--host'.
3290 See \`config.log' for more details" "$LINENO" 5; }
3291     fi
3292   fi
3293 fi
3294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3295 $as_echo "$cross_compiling" >&6; }
3296
3297 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3298 ac_clean_files=$ac_clean_files_save
3299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3300 $as_echo_n "checking for suffix of object files... " >&6; }
3301 if ${ac_cv_objext+:} false; then :
3302   $as_echo_n "(cached) " >&6
3303 else
3304   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3305 /* end confdefs.h.  */
3306
3307 int
3308 main ()
3309 {
3310
3311   ;
3312   return 0;
3313 }
3314 _ACEOF
3315 rm -f conftest.o conftest.obj
3316 if { { ac_try="$ac_compile"
3317 case "(($ac_try" in
3318   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3319   *) ac_try_echo=$ac_try;;
3320 esac
3321 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3322 $as_echo "$ac_try_echo"; } >&5
3323   (eval "$ac_compile") 2>&5
3324   ac_status=$?
3325   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3326   test $ac_status = 0; }; then :
3327   for ac_file in conftest.o conftest.obj conftest.*; do
3328   test -f "$ac_file" || continue;
3329   case $ac_file in
3330     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3331     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3332        break;;
3333   esac
3334 done
3335 else
3336   $as_echo "$as_me: failed program was:" >&5
3337 sed 's/^/| /' conftest.$ac_ext >&5
3338
3339 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3340 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3341 as_fn_error $? "cannot compute suffix of object files: cannot compile
3342 See \`config.log' for more details" "$LINENO" 5; }
3343 fi
3344 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3345 fi
3346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3347 $as_echo "$ac_cv_objext" >&6; }
3348 OBJEXT=$ac_cv_objext
3349 ac_objext=$OBJEXT
3350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3351 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3352 if ${ac_cv_c_compiler_gnu+:} false; then :
3353   $as_echo_n "(cached) " >&6
3354 else
3355   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3356 /* end confdefs.h.  */
3357
3358 int
3359 main ()
3360 {
3361 #ifndef __GNUC__
3362        choke me
3363 #endif
3364
3365   ;
3366   return 0;
3367 }
3368 _ACEOF
3369 if ac_fn_c_try_compile "$LINENO"; then :
3370   ac_compiler_gnu=yes
3371 else
3372   ac_compiler_gnu=no
3373 fi
3374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3375 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3376
3377 fi
3378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3379 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3380 if test $ac_compiler_gnu = yes; then
3381   GCC=yes
3382 else
3383   GCC=
3384 fi
3385 ac_test_CFLAGS=${CFLAGS+set}
3386 ac_save_CFLAGS=$CFLAGS
3387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3388 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3389 if ${ac_cv_prog_cc_g+:} false; then :
3390   $as_echo_n "(cached) " >&6
3391 else
3392   ac_save_c_werror_flag=$ac_c_werror_flag
3393    ac_c_werror_flag=yes
3394    ac_cv_prog_cc_g=no
3395    CFLAGS="-g"
3396    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3397 /* end confdefs.h.  */
3398
3399 int
3400 main ()
3401 {
3402
3403   ;
3404   return 0;
3405 }
3406 _ACEOF
3407 if ac_fn_c_try_compile "$LINENO"; then :
3408   ac_cv_prog_cc_g=yes
3409 else
3410   CFLAGS=""
3411       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3412 /* end confdefs.h.  */
3413
3414 int
3415 main ()
3416 {
3417
3418   ;
3419   return 0;
3420 }
3421 _ACEOF
3422 if ac_fn_c_try_compile "$LINENO"; then :
3423
3424 else
3425   ac_c_werror_flag=$ac_save_c_werror_flag
3426          CFLAGS="-g"
3427          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3428 /* end confdefs.h.  */
3429
3430 int
3431 main ()
3432 {
3433
3434   ;
3435   return 0;
3436 }
3437 _ACEOF
3438 if ac_fn_c_try_compile "$LINENO"; then :
3439   ac_cv_prog_cc_g=yes
3440 fi
3441 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3442 fi
3443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3444 fi
3445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3446    ac_c_werror_flag=$ac_save_c_werror_flag
3447 fi
3448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3449 $as_echo "$ac_cv_prog_cc_g" >&6; }
3450 if test "$ac_test_CFLAGS" = set; then
3451   CFLAGS=$ac_save_CFLAGS
3452 elif test $ac_cv_prog_cc_g = yes; then
3453   if test "$GCC" = yes; then
3454     CFLAGS="-g -O2"
3455   else
3456     CFLAGS="-g"
3457   fi
3458 else
3459   if test "$GCC" = yes; then
3460     CFLAGS="-O2"
3461   else
3462     CFLAGS=
3463   fi
3464 fi
3465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3466 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3467 if ${ac_cv_prog_cc_c89+:} false; then :
3468   $as_echo_n "(cached) " >&6
3469 else
3470   ac_cv_prog_cc_c89=no
3471 ac_save_CC=$CC
3472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3473 /* end confdefs.h.  */
3474 #include <stdarg.h>
3475 #include <stdio.h>
3476 struct stat;
3477 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3478 struct buf { int x; };
3479 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3480 static char *e (p, i)
3481      char **p;
3482      int i;
3483 {
3484   return p[i];
3485 }
3486 static char *f (char * (*g) (char **, int), char **p, ...)
3487 {
3488   char *s;
3489   va_list v;
3490   va_start (v,p);
3491   s = g (p, va_arg (v,int));
3492   va_end (v);
3493   return s;
3494 }
3495
3496 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3497    function prototypes and stuff, but not '\xHH' hex character constants.
3498    These don't provoke an error unfortunately, instead are silently treated
3499    as 'x'.  The following induces an error, until -std is added to get
3500    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3501    array size at least.  It's necessary to write '\x00'==0 to get something
3502    that's true only with -std.  */
3503 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3504
3505 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3506    inside strings and character constants.  */
3507 #define FOO(x) 'x'
3508 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3509
3510 int test (int i, double x);
3511 struct s1 {int (*f) (int a);};
3512 struct s2 {int (*f) (double a);};
3513 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3514 int argc;
3515 char **argv;
3516 int
3517 main ()
3518 {
3519 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3520   ;
3521   return 0;
3522 }
3523 _ACEOF
3524 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3525         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3526 do
3527   CC="$ac_save_CC $ac_arg"
3528   if ac_fn_c_try_compile "$LINENO"; then :
3529   ac_cv_prog_cc_c89=$ac_arg
3530 fi
3531 rm -f core conftest.err conftest.$ac_objext
3532   test "x$ac_cv_prog_cc_c89" != "xno" && break
3533 done
3534 rm -f conftest.$ac_ext
3535 CC=$ac_save_CC
3536
3537 fi
3538 # AC_CACHE_VAL
3539 case "x$ac_cv_prog_cc_c89" in
3540   x)
3541     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3542 $as_echo "none needed" >&6; } ;;
3543   xno)
3544     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3545 $as_echo "unsupported" >&6; } ;;
3546   *)
3547     CC="$CC $ac_cv_prog_cc_c89"
3548     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3549 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3550 esac
3551 if test "x$ac_cv_prog_cc_c89" != xno; then :
3552
3553 fi
3554
3555 ac_ext=c
3556 ac_cpp='$CPP $CPPFLAGS'
3557 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3558 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3559 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3560
3561
3562 ac_ext=c
3563 ac_cpp='$CPP $CPPFLAGS'
3564 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3565 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3566 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3568 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3569 # On Suns, sometimes $CPP names a directory.
3570 if test -n "$CPP" && test -d "$CPP"; then
3571   CPP=
3572 fi
3573 if test -z "$CPP"; then
3574   if ${ac_cv_prog_CPP+:} false; then :
3575   $as_echo_n "(cached) " >&6
3576 else
3577       # Double quotes because CPP needs to be expanded
3578     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3579     do
3580       ac_preproc_ok=false
3581 for ac_c_preproc_warn_flag in '' yes
3582 do
3583   # Use a header file that comes with gcc, so configuring glibc
3584   # with a fresh cross-compiler works.
3585   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3586   # <limits.h> exists even on freestanding compilers.
3587   # On the NeXT, cc -E runs the code through the compiler's parser,
3588   # not just through cpp. "Syntax error" is here to catch this case.
3589   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3590 /* end confdefs.h.  */
3591 #ifdef __STDC__
3592 # include <limits.h>
3593 #else
3594 # include <assert.h>
3595 #endif
3596                      Syntax error
3597 _ACEOF
3598 if ac_fn_c_try_cpp "$LINENO"; then :
3599
3600 else
3601   # Broken: fails on valid input.
3602 continue
3603 fi
3604 rm -f conftest.err conftest.i conftest.$ac_ext
3605
3606   # OK, works on sane cases.  Now check whether nonexistent headers
3607   # can be detected and how.
3608   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3609 /* end confdefs.h.  */
3610 #include <ac_nonexistent.h>
3611 _ACEOF
3612 if ac_fn_c_try_cpp "$LINENO"; then :
3613   # Broken: success on invalid input.
3614 continue
3615 else
3616   # Passes both tests.
3617 ac_preproc_ok=:
3618 break
3619 fi
3620 rm -f conftest.err conftest.i conftest.$ac_ext
3621
3622 done
3623 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3624 rm -f conftest.i conftest.err conftest.$ac_ext
3625 if $ac_preproc_ok; then :
3626   break
3627 fi
3628
3629     done
3630     ac_cv_prog_CPP=$CPP
3631
3632 fi
3633   CPP=$ac_cv_prog_CPP
3634 else
3635   ac_cv_prog_CPP=$CPP
3636 fi
3637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3638 $as_echo "$CPP" >&6; }
3639 ac_preproc_ok=false
3640 for ac_c_preproc_warn_flag in '' yes
3641 do
3642   # Use a header file that comes with gcc, so configuring glibc
3643   # with a fresh cross-compiler works.
3644   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3645   # <limits.h> exists even on freestanding compilers.
3646   # On the NeXT, cc -E runs the code through the compiler's parser,
3647   # not just through cpp. "Syntax error" is here to catch this case.
3648   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3649 /* end confdefs.h.  */
3650 #ifdef __STDC__
3651 # include <limits.h>
3652 #else
3653 # include <assert.h>
3654 #endif
3655                      Syntax error
3656 _ACEOF
3657 if ac_fn_c_try_cpp "$LINENO"; then :
3658
3659 else
3660   # Broken: fails on valid input.
3661 continue
3662 fi
3663 rm -f conftest.err conftest.i conftest.$ac_ext
3664
3665   # OK, works on sane cases.  Now check whether nonexistent headers
3666   # can be detected and how.
3667   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3668 /* end confdefs.h.  */
3669 #include <ac_nonexistent.h>
3670 _ACEOF
3671 if ac_fn_c_try_cpp "$LINENO"; then :
3672   # Broken: success on invalid input.
3673 continue
3674 else
3675   # Passes both tests.
3676 ac_preproc_ok=:
3677 break
3678 fi
3679 rm -f conftest.err conftest.i conftest.$ac_ext
3680
3681 done
3682 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3683 rm -f conftest.i conftest.err conftest.$ac_ext
3684 if $ac_preproc_ok; then :
3685
3686 else
3687   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3688 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3689 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3690 See \`config.log' for more details" "$LINENO" 5; }
3691 fi
3692
3693 ac_ext=c
3694 ac_cpp='$CPP $CPPFLAGS'
3695 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3696 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3697 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3698
3699
3700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3701 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3702 if ${ac_cv_path_GREP+:} false; then :
3703   $as_echo_n "(cached) " >&6
3704 else
3705   if test -z "$GREP"; then
3706   ac_path_GREP_found=false
3707   # Loop through the user's path and test for each of PROGNAME-LIST
3708   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3709 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3710 do
3711   IFS=$as_save_IFS
3712   test -z "$as_dir" && as_dir=.
3713     for ac_prog in grep ggrep; do
3714     for ac_exec_ext in '' $ac_executable_extensions; do
3715       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3716       as_fn_executable_p "$ac_path_GREP" || continue
3717 # Check for GNU ac_path_GREP and select it if it is found.
3718   # Check for GNU $ac_path_GREP
3719 case `"$ac_path_GREP" --version 2>&1` in
3720 *GNU*)
3721   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3722 *)
3723   ac_count=0
3724   $as_echo_n 0123456789 >"conftest.in"
3725   while :
3726   do
3727     cat "conftest.in" "conftest.in" >"conftest.tmp"
3728     mv "conftest.tmp" "conftest.in"
3729     cp "conftest.in" "conftest.nl"
3730     $as_echo 'GREP' >> "conftest.nl"
3731     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3732     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3733     as_fn_arith $ac_count + 1 && ac_count=$as_val
3734     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3735       # Best one so far, save it but keep looking for a better one
3736       ac_cv_path_GREP="$ac_path_GREP"
3737       ac_path_GREP_max=$ac_count
3738     fi
3739     # 10*(2^10) chars as input seems more than enough
3740     test $ac_count -gt 10 && break
3741   done
3742   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3743 esac
3744
3745       $ac_path_GREP_found && break 3
3746     done
3747   done
3748   done
3749 IFS=$as_save_IFS
3750   if test -z "$ac_cv_path_GREP"; then
3751     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3752   fi
3753 else
3754   ac_cv_path_GREP=$GREP
3755 fi
3756
3757 fi
3758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3759 $as_echo "$ac_cv_path_GREP" >&6; }
3760  GREP="$ac_cv_path_GREP"
3761
3762
3763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3764 $as_echo_n "checking for egrep... " >&6; }
3765 if ${ac_cv_path_EGREP+:} false; then :
3766   $as_echo_n "(cached) " >&6
3767 else
3768   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3769    then ac_cv_path_EGREP="$GREP -E"
3770    else
3771      if test -z "$EGREP"; then
3772   ac_path_EGREP_found=false
3773   # Loop through the user's path and test for each of PROGNAME-LIST
3774   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3775 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3776 do
3777   IFS=$as_save_IFS
3778   test -z "$as_dir" && as_dir=.
3779     for ac_prog in egrep; do
3780     for ac_exec_ext in '' $ac_executable_extensions; do
3781       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3782       as_fn_executable_p "$ac_path_EGREP" || continue
3783 # Check for GNU ac_path_EGREP and select it if it is found.
3784   # Check for GNU $ac_path_EGREP
3785 case `"$ac_path_EGREP" --version 2>&1` in
3786 *GNU*)
3787   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3788 *)
3789   ac_count=0
3790   $as_echo_n 0123456789 >"conftest.in"
3791   while :
3792   do
3793     cat "conftest.in" "conftest.in" >"conftest.tmp"
3794     mv "conftest.tmp" "conftest.in"
3795     cp "conftest.in" "conftest.nl"
3796     $as_echo 'EGREP' >> "conftest.nl"
3797     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3798     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3799     as_fn_arith $ac_count + 1 && ac_count=$as_val
3800     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3801       # Best one so far, save it but keep looking for a better one
3802       ac_cv_path_EGREP="$ac_path_EGREP"
3803       ac_path_EGREP_max=$ac_count
3804     fi
3805     # 10*(2^10) chars as input seems more than enough
3806     test $ac_count -gt 10 && break
3807   done
3808   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3809 esac
3810
3811       $ac_path_EGREP_found && break 3
3812     done
3813   done
3814   done
3815 IFS=$as_save_IFS
3816   if test -z "$ac_cv_path_EGREP"; then
3817     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3818   fi
3819 else
3820   ac_cv_path_EGREP=$EGREP
3821 fi
3822
3823    fi
3824 fi
3825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3826 $as_echo "$ac_cv_path_EGREP" >&6; }
3827  EGREP="$ac_cv_path_EGREP"
3828
3829
3830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3831 $as_echo_n "checking for ANSI C header files... " >&6; }
3832 if ${ac_cv_header_stdc+:} false; then :
3833   $as_echo_n "(cached) " >&6
3834 else
3835   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3836 /* end confdefs.h.  */
3837 #include <stdlib.h>
3838 #include <stdarg.h>
3839 #include <string.h>
3840 #include <float.h>
3841
3842 int
3843 main ()
3844 {
3845
3846   ;
3847   return 0;
3848 }
3849 _ACEOF
3850 if ac_fn_c_try_compile "$LINENO"; then :
3851   ac_cv_header_stdc=yes
3852 else
3853   ac_cv_header_stdc=no
3854 fi
3855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3856
3857 if test $ac_cv_header_stdc = yes; then
3858   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3859   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3860 /* end confdefs.h.  */
3861 #include <string.h>
3862
3863 _ACEOF
3864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3865   $EGREP "memchr" >/dev/null 2>&1; then :
3866
3867 else
3868   ac_cv_header_stdc=no
3869 fi
3870 rm -f conftest*
3871
3872 fi
3873
3874 if test $ac_cv_header_stdc = yes; then
3875   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3876   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3877 /* end confdefs.h.  */
3878 #include <stdlib.h>
3879
3880 _ACEOF
3881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3882   $EGREP "free" >/dev/null 2>&1; then :
3883
3884 else
3885   ac_cv_header_stdc=no
3886 fi
3887 rm -f conftest*
3888
3889 fi
3890
3891 if test $ac_cv_header_stdc = yes; then
3892   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3893   if test "$cross_compiling" = yes; then :
3894   :
3895 else
3896   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3897 /* end confdefs.h.  */
3898 #include <ctype.h>
3899 #include <stdlib.h>
3900 #if ((' ' & 0x0FF) == 0x020)
3901 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3902 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3903 #else
3904 # define ISLOWER(c) \
3905                    (('a' <= (c) && (c) <= 'i') \
3906                      || ('j' <= (c) && (c) <= 'r') \
3907                      || ('s' <= (c) && (c) <= 'z'))
3908 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3909 #endif
3910
3911 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3912 int
3913 main ()
3914 {
3915   int i;
3916   for (i = 0; i < 256; i++)
3917     if (XOR (islower (i), ISLOWER (i))
3918         || toupper (i) != TOUPPER (i))
3919       return 2;
3920   return 0;
3921 }
3922 _ACEOF
3923 if ac_fn_c_try_run "$LINENO"; then :
3924
3925 else
3926   ac_cv_header_stdc=no
3927 fi
3928 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3929   conftest.$ac_objext conftest.beam conftest.$ac_ext
3930 fi
3931
3932 fi
3933 fi
3934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3935 $as_echo "$ac_cv_header_stdc" >&6; }
3936 if test $ac_cv_header_stdc = yes; then
3937
3938 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
3939
3940 fi
3941
3942 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3943 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3944                   inttypes.h stdint.h unistd.h
3945 do :
3946   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3947 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3948 "
3949 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3950   cat >>confdefs.h <<_ACEOF
3951 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3952 _ACEOF
3953
3954 fi
3955
3956 done
3957
3958
3959
3960   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3961 if test "x$ac_cv_header_minix_config_h" = xyes; then :
3962   MINIX=yes
3963 else
3964   MINIX=
3965 fi
3966
3967
3968   if test "$MINIX" = yes; then
3969
3970 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
3971
3972
3973 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
3974
3975
3976 $as_echo "#define _MINIX 1" >>confdefs.h
3977
3978   fi
3979
3980
3981   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3982 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3983 if ${ac_cv_safe_to_define___extensions__+:} false; then :
3984   $as_echo_n "(cached) " >&6
3985 else
3986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3987 /* end confdefs.h.  */
3988
3989 #         define __EXTENSIONS__ 1
3990           $ac_includes_default
3991 int
3992 main ()
3993 {
3994
3995   ;
3996   return 0;
3997 }
3998 _ACEOF
3999 if ac_fn_c_try_compile "$LINENO"; then :
4000   ac_cv_safe_to_define___extensions__=yes
4001 else
4002   ac_cv_safe_to_define___extensions__=no
4003 fi
4004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4005 fi
4006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4007 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4008   test $ac_cv_safe_to_define___extensions__ = yes &&
4009     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4010
4011   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4012
4013   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4014
4015   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4016
4017   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4018
4019
4020
4021 if test "$ac_cv_header_minix_config_h" = "yes"; then
4022
4023 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4024
4025 fi
4026
4027 case "$prefix" in
4028         NONE)
4029                 prefix="/usr/local"
4030         ;;
4031 esac
4032
4033 # are we on MinGW?
4034 if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
4035 else
4036         if echo $target | grep mingw32 >/dev/null; then on_mingw="yes"
4037         else on_mingw="no"; fi
4038 fi
4039
4040 #
4041 # Determine configuration file
4042 # the eval is to evaluate shell expansion twice
4043 if test $on_mingw = "no"; then
4044   ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4045 else
4046   ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4047 fi
4048
4049 # Check whether --with-conf_file was given.
4050 if test "${with_conf_file+set}" = set; then :
4051   withval=$with_conf_file; ub_conf_file="$withval"
4052 fi
4053
4054
4055 hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4056
4057
4058 cat >>confdefs.h <<_ACEOF
4059 #define CONFIGFILE "$hdr_config"
4060 _ACEOF
4061
4062 ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4063 $as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4064          X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4065          X"$ub_conf_file" : 'X\(//\)$' \| \
4066          X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4067 $as_echo X"$ub_conf_file" |
4068     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4069             s//\1/
4070             q
4071           }
4072           /^X\(\/\/\)[^/].*/{
4073             s//\1/
4074             q
4075           }
4076           /^X\(\/\/\)$/{
4077             s//\1/
4078             q
4079           }
4080           /^X\(\/\).*/{
4081             s//\1/
4082             q
4083           }
4084           s/.*/./; q'`
4085
4086
4087 # Determine run, chroot directory and pidfile locations
4088
4089 # Check whether --with-run-dir was given.
4090 if test "${with_run_dir+set}" = set; then :
4091   withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4092 else
4093   if test $on_mingw = no; then
4094     UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4095 else
4096     UNBOUND_RUN_DIR=""
4097 fi
4098
4099 fi
4100
4101
4102 hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4103
4104
4105 cat >>confdefs.h <<_ACEOF
4106 #define RUN_DIR "$hdr_run"
4107 _ACEOF
4108
4109
4110
4111 # Check whether --with-chroot-dir was given.
4112 if test "${with_chroot_dir+set}" = set; then :
4113   withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4114 else
4115   if test $on_mingw = no; then
4116     UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4117 else
4118     UNBOUND_CHROOT_DIR=""
4119 fi
4120
4121 fi
4122
4123
4124 hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4125
4126
4127 cat >>confdefs.h <<_ACEOF
4128 #define CHROOT_DIR "$hdr_chroot"
4129 _ACEOF
4130
4131
4132
4133 # Check whether --with-share-dir was given.
4134 if test "${with_share_dir+set}" = set; then :
4135   withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4136 else
4137   UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4138 fi
4139
4140
4141
4142 cat >>confdefs.h <<_ACEOF
4143 #define SHARE_DIR "$UNBOUND_SHARE_DIR"
4144 _ACEOF
4145
4146
4147
4148 # Check whether --with-pidfile was given.
4149 if test "${with_pidfile+set}" = set; then :
4150   withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4151 else
4152   if test $on_mingw = no; then
4153     UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4154 else
4155     UNBOUND_PIDFILE=""
4156 fi
4157
4158 fi
4159
4160
4161 hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4162
4163
4164 cat >>confdefs.h <<_ACEOF
4165 #define PIDFILE "$hdr_pid"
4166 _ACEOF
4167
4168
4169
4170 # Check whether --with-rootkey-file was given.
4171 if test "${with_rootkey_file+set}" = set; then :
4172   withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4173 else
4174   if test $on_mingw = no; then
4175     UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4176 else
4177     UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4178 fi
4179
4180 fi
4181
4182
4183 hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4184
4185
4186 cat >>confdefs.h <<_ACEOF
4187 #define ROOT_ANCHOR_FILE "$hdr_rkey"
4188 _ACEOF
4189
4190
4191
4192 # Check whether --with-rootcert-file was given.
4193 if test "${with_rootcert_file+set}" = set; then :
4194   withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4195 else
4196   if test $on_mingw = no; then
4197     UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4198 else
4199     UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4200 fi
4201
4202 fi
4203
4204
4205 hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4206
4207
4208 cat >>confdefs.h <<_ACEOF
4209 #define ROOT_CERT_FILE "$hdr_rpem"
4210 _ACEOF
4211
4212
4213
4214 # Check whether --with-username was given.
4215 if test "${with_username+set}" = set; then :
4216   withval=$with_username; UNBOUND_USERNAME="$withval"
4217 else
4218   UNBOUND_USERNAME="unbound"
4219 fi
4220
4221
4222
4223 cat >>confdefs.h <<_ACEOF
4224 #define UB_USERNAME "$UNBOUND_USERNAME"
4225 _ACEOF
4226
4227
4228
4229 $as_echo "#define WINVER 0x0502" >>confdefs.h
4230
4231 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/' `
4232
4233
4234 cat >>confdefs.h <<_ACEOF
4235 #define RSRC_PACKAGE_VERSION $wnvs
4236 _ACEOF
4237
4238
4239 # Checks for typedefs, structures, and compiler characteristics.
4240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4241 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4242 if ${ac_cv_c_const+:} false; then :
4243   $as_echo_n "(cached) " >&6
4244 else
4245   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4246 /* end confdefs.h.  */
4247
4248 int
4249 main ()
4250 {
4251
4252 #ifndef __cplusplus
4253   /* Ultrix mips cc rejects this sort of thing.  */
4254   typedef int charset[2];
4255   const charset cs = { 0, 0 };
4256   /* SunOS 4.1.1 cc rejects this.  */
4257   char const *const *pcpcc;
4258   char **ppc;
4259   /* NEC SVR4.0.2 mips cc rejects this.  */
4260   struct point {int x, y;};
4261   static struct point const zero = {0,0};
4262   /* AIX XL C 1.02.0.0 rejects this.
4263      It does not let you subtract one const X* pointer from another in
4264      an arm of an if-expression whose if-part is not a constant
4265      expression */
4266   const char *g = "string";
4267   pcpcc = &g + (g ? g-g : 0);
4268   /* HPUX 7.0 cc rejects these. */
4269   ++pcpcc;
4270   ppc = (char**) pcpcc;
4271   pcpcc = (char const *const *) ppc;
4272   { /* SCO 3.2v4 cc rejects this sort of thing.  */
4273     char tx;
4274     char *t = &tx;
4275     char const *s = 0 ? (char *) 0 : (char const *) 0;
4276
4277     *t++ = 0;
4278     if (s) return 0;
4279   }
4280   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4281     int x[] = {25, 17};
4282     const int *foo = &x[0];
4283     ++foo;
4284   }
4285   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4286     typedef const int *iptr;
4287     iptr p = 0;
4288     ++p;
4289   }
4290   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4291        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4292     struct s { int j; const int *ap[3]; } bx;
4293     struct s *b = &bx; b->j = 5;
4294   }
4295   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4296     const int foo = 10;
4297     if (!foo) return 0;
4298   }
4299   return !cs[0] && !zero.x;
4300 #endif
4301
4302   ;
4303   return 0;
4304 }
4305 _ACEOF
4306 if ac_fn_c_try_compile "$LINENO"; then :
4307   ac_cv_c_const=yes
4308 else
4309   ac_cv_c_const=no
4310 fi
4311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4312 fi
4313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4314 $as_echo "$ac_cv_c_const" >&6; }
4315 if test $ac_cv_c_const = no; then
4316
4317 $as_echo "#define const /**/" >>confdefs.h
4318
4319 fi
4320
4321 ac_ext=c
4322 ac_cpp='$CPP $CPPFLAGS'
4323 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4324 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4325 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4326
4327 # allow user to override the -g -O2 flags.
4328 if test "x$CFLAGS" = "x" ; then
4329
4330
4331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4332 $as_echo_n "checking whether $CC supports -g... " >&6; }
4333 cache=`echo g | sed 'y%.=/+-%___p_%'`
4334 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4335   $as_echo_n "(cached) " >&6
4336 else
4337
4338 echo 'void f(void){}' >conftest.c
4339 if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4340 eval "cv_prog_cc_flag_$cache=yes"
4341 else
4342 eval "cv_prog_cc_flag_$cache=no"
4343 fi
4344 rm -f conftest conftest.o conftest.c
4345
4346 fi
4347
4348 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4350 $as_echo "yes" >&6; }
4351 :
4352 CFLAGS="$CFLAGS -g"
4353 else
4354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4355 $as_echo "no" >&6; }
4356 :
4357
4358 fi
4359
4360
4361
4362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4363 $as_echo_n "checking whether $CC supports -O2... " >&6; }
4364 cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4365 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4366   $as_echo_n "(cached) " >&6
4367 else
4368
4369 echo 'void f(void){}' >conftest.c
4370 if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4371 eval "cv_prog_cc_flag_$cache=yes"
4372 else
4373 eval "cv_prog_cc_flag_$cache=no"
4374 fi
4375 rm -f conftest conftest.o conftest.c
4376
4377 fi
4378
4379 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4381 $as_echo "yes" >&6; }
4382 :
4383 CFLAGS="$CFLAGS -O2"
4384 else
4385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4386 $as_echo "no" >&6; }
4387 :
4388
4389 fi
4390
4391 fi
4392 ac_ext=c
4393 ac_cpp='$CPP $CPPFLAGS'
4394 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4395 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4396 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4397 if test -n "$ac_tool_prefix"; then
4398   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4399 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4401 $as_echo_n "checking for $ac_word... " >&6; }
4402 if ${ac_cv_prog_CC+:} false; then :
4403   $as_echo_n "(cached) " >&6
4404 else
4405   if test -n "$CC"; then
4406   ac_cv_prog_CC="$CC" # Let the user override the test.
4407 else
4408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4409 for as_dir in $PATH
4410 do
4411   IFS=$as_save_IFS
4412   test -z "$as_dir" && as_dir=.
4413     for ac_exec_ext in '' $ac_executable_extensions; do
4414   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4415     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4416     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4417     break 2
4418   fi
4419 done
4420   done
4421 IFS=$as_save_IFS
4422
4423 fi
4424 fi
4425 CC=$ac_cv_prog_CC
4426 if test -n "$CC"; then
4427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4428 $as_echo "$CC" >&6; }
4429 else
4430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4431 $as_echo "no" >&6; }
4432 fi
4433
4434
4435 fi
4436 if test -z "$ac_cv_prog_CC"; then
4437   ac_ct_CC=$CC
4438   # Extract the first word of "gcc", so it can be a program name with args.
4439 set dummy gcc; ac_word=$2
4440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4441 $as_echo_n "checking for $ac_word... " >&6; }
4442 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4443   $as_echo_n "(cached) " >&6
4444 else
4445   if test -n "$ac_ct_CC"; then
4446   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4447 else
4448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4449 for as_dir in $PATH
4450 do
4451   IFS=$as_save_IFS
4452   test -z "$as_dir" && as_dir=.
4453     for ac_exec_ext in '' $ac_executable_extensions; do
4454   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4455     ac_cv_prog_ac_ct_CC="gcc"
4456     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4457     break 2
4458   fi
4459 done
4460   done
4461 IFS=$as_save_IFS
4462
4463 fi
4464 fi
4465 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4466 if test -n "$ac_ct_CC"; then
4467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4468 $as_echo "$ac_ct_CC" >&6; }
4469 else
4470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4471 $as_echo "no" >&6; }
4472 fi
4473
4474   if test "x$ac_ct_CC" = x; then
4475     CC=""
4476   else
4477     case $cross_compiling:$ac_tool_warned in
4478 yes:)
4479 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4480 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4481 ac_tool_warned=yes ;;
4482 esac
4483     CC=$ac_ct_CC
4484   fi
4485 else
4486   CC="$ac_cv_prog_CC"
4487 fi
4488
4489 if test -z "$CC"; then
4490           if test -n "$ac_tool_prefix"; then
4491     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4492 set dummy ${ac_tool_prefix}cc; ac_word=$2
4493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4494 $as_echo_n "checking for $ac_word... " >&6; }
4495 if ${ac_cv_prog_CC+:} false; then :
4496   $as_echo_n "(cached) " >&6
4497 else
4498   if test -n "$CC"; then
4499   ac_cv_prog_CC="$CC" # Let the user override the test.
4500 else
4501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4502 for as_dir in $PATH
4503 do
4504   IFS=$as_save_IFS
4505   test -z "$as_dir" && as_dir=.
4506     for ac_exec_ext in '' $ac_executable_extensions; do
4507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4508     ac_cv_prog_CC="${ac_tool_prefix}cc"
4509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4510     break 2
4511   fi
4512 done
4513   done
4514 IFS=$as_save_IFS
4515
4516 fi
4517 fi
4518 CC=$ac_cv_prog_CC
4519 if test -n "$CC"; then
4520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4521 $as_echo "$CC" >&6; }
4522 else
4523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4524 $as_echo "no" >&6; }
4525 fi
4526
4527
4528   fi
4529 fi
4530 if test -z "$CC"; then
4531   # Extract the first word of "cc", so it can be a program name with args.
4532 set dummy cc; ac_word=$2
4533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4534 $as_echo_n "checking for $ac_word... " >&6; }
4535 if ${ac_cv_prog_CC+:} false; then :
4536   $as_echo_n "(cached) " >&6
4537 else
4538   if test -n "$CC"; then
4539   ac_cv_prog_CC="$CC" # Let the user override the test.
4540 else
4541   ac_prog_rejected=no
4542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4543 for as_dir in $PATH
4544 do
4545   IFS=$as_save_IFS
4546   test -z "$as_dir" && as_dir=.
4547     for ac_exec_ext in '' $ac_executable_extensions; do
4548   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4549     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4550        ac_prog_rejected=yes
4551        continue
4552      fi
4553     ac_cv_prog_CC="cc"
4554     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4555     break 2
4556   fi
4557 done
4558   done
4559 IFS=$as_save_IFS
4560
4561 if test $ac_prog_rejected = yes; then
4562   # We found a bogon in the path, so make sure we never use it.
4563   set dummy $ac_cv_prog_CC
4564   shift
4565   if test $# != 0; then
4566     # We chose a different compiler from the bogus one.
4567     # However, it has the same basename, so the bogon will be chosen
4568     # first if we set CC to just the basename; use the full file name.
4569     shift
4570     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4571   fi
4572 fi
4573 fi
4574 fi
4575 CC=$ac_cv_prog_CC
4576 if test -n "$CC"; then
4577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4578 $as_echo "$CC" >&6; }
4579 else
4580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4581 $as_echo "no" >&6; }
4582 fi
4583
4584
4585 fi
4586 if test -z "$CC"; then
4587   if test -n "$ac_tool_prefix"; then
4588   for ac_prog in cl.exe
4589   do
4590     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4591 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4593 $as_echo_n "checking for $ac_word... " >&6; }
4594 if ${ac_cv_prog_CC+:} false; then :
4595   $as_echo_n "(cached) " >&6
4596 else
4597   if test -n "$CC"; then
4598   ac_cv_prog_CC="$CC" # Let the user override the test.
4599 else
4600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4601 for as_dir in $PATH
4602 do
4603   IFS=$as_save_IFS
4604   test -z "$as_dir" && as_dir=.
4605     for ac_exec_ext in '' $ac_executable_extensions; do
4606   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4607     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4608     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4609     break 2
4610   fi
4611 done
4612   done
4613 IFS=$as_save_IFS
4614
4615 fi
4616 fi
4617 CC=$ac_cv_prog_CC
4618 if test -n "$CC"; then
4619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4620 $as_echo "$CC" >&6; }
4621 else
4622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4623 $as_echo "no" >&6; }
4624 fi
4625
4626
4627     test -n "$CC" && break
4628   done
4629 fi
4630 if test -z "$CC"; then
4631   ac_ct_CC=$CC
4632   for ac_prog in cl.exe
4633 do
4634   # Extract the first word of "$ac_prog", so it can be a program name with args.
4635 set dummy $ac_prog; ac_word=$2
4636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4637 $as_echo_n "checking for $ac_word... " >&6; }
4638 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4639   $as_echo_n "(cached) " >&6
4640 else
4641   if test -n "$ac_ct_CC"; then
4642   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4643 else
4644 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4645 for as_dir in $PATH
4646 do
4647   IFS=$as_save_IFS
4648   test -z "$as_dir" && as_dir=.
4649     for ac_exec_ext in '' $ac_executable_extensions; do
4650   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4651     ac_cv_prog_ac_ct_CC="$ac_prog"
4652     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4653     break 2
4654   fi
4655 done
4656   done
4657 IFS=$as_save_IFS
4658
4659 fi
4660 fi
4661 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4662 if test -n "$ac_ct_CC"; then
4663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4664 $as_echo "$ac_ct_CC" >&6; }
4665 else
4666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4667 $as_echo "no" >&6; }
4668 fi
4669
4670
4671   test -n "$ac_ct_CC" && break
4672 done
4673
4674   if test "x$ac_ct_CC" = x; then
4675     CC=""
4676   else
4677     case $cross_compiling:$ac_tool_warned in
4678 yes:)
4679 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4680 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4681 ac_tool_warned=yes ;;
4682 esac
4683     CC=$ac_ct_CC
4684   fi
4685 fi
4686
4687 fi
4688
4689
4690 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4691 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4692 as_fn_error $? "no acceptable C compiler found in \$PATH
4693 See \`config.log' for more details" "$LINENO" 5; }
4694
4695 # Provide some information about the compiler.
4696 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4697 set X $ac_compile
4698 ac_compiler=$2
4699 for ac_option in --version -v -V -qversion; do
4700   { { ac_try="$ac_compiler $ac_option >&5"
4701 case "(($ac_try" in
4702   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4703   *) ac_try_echo=$ac_try;;
4704 esac
4705 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4706 $as_echo "$ac_try_echo"; } >&5
4707   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4708   ac_status=$?
4709   if test -s conftest.err; then
4710     sed '10a\
4711 ... rest of stderr output deleted ...
4712          10q' conftest.err >conftest.er1
4713     cat conftest.er1 >&5
4714   fi
4715   rm -f conftest.er1 conftest.err
4716   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4717   test $ac_status = 0; }
4718 done
4719
4720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4721 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4722 if ${ac_cv_c_compiler_gnu+:} false; then :
4723   $as_echo_n "(cached) " >&6
4724 else
4725   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4726 /* end confdefs.h.  */
4727
4728 int
4729 main ()
4730 {
4731 #ifndef __GNUC__
4732        choke me
4733 #endif
4734
4735   ;
4736   return 0;
4737 }
4738 _ACEOF
4739 if ac_fn_c_try_compile "$LINENO"; then :
4740   ac_compiler_gnu=yes
4741 else
4742   ac_compiler_gnu=no
4743 fi
4744 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4745 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4746
4747 fi
4748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4749 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4750 if test $ac_compiler_gnu = yes; then
4751   GCC=yes
4752 else
4753   GCC=
4754 fi
4755 ac_test_CFLAGS=${CFLAGS+set}
4756 ac_save_CFLAGS=$CFLAGS
4757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4758 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4759 if ${ac_cv_prog_cc_g+:} false; then :
4760   $as_echo_n "(cached) " >&6
4761 else
4762   ac_save_c_werror_flag=$ac_c_werror_flag
4763    ac_c_werror_flag=yes
4764    ac_cv_prog_cc_g=no
4765    CFLAGS="-g"
4766    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4767 /* end confdefs.h.  */
4768
4769 int
4770 main ()
4771 {
4772
4773   ;
4774   return 0;
4775 }
4776 _ACEOF
4777 if ac_fn_c_try_compile "$LINENO"; then :
4778   ac_cv_prog_cc_g=yes
4779 else
4780   CFLAGS=""
4781       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4782 /* end confdefs.h.  */
4783
4784 int
4785 main ()
4786 {
4787
4788   ;
4789   return 0;
4790 }
4791 _ACEOF
4792 if ac_fn_c_try_compile "$LINENO"; then :
4793
4794 else
4795   ac_c_werror_flag=$ac_save_c_werror_flag
4796          CFLAGS="-g"
4797          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4798 /* end confdefs.h.  */
4799
4800 int
4801 main ()
4802 {
4803
4804   ;
4805   return 0;
4806 }
4807 _ACEOF
4808 if ac_fn_c_try_compile "$LINENO"; then :
4809   ac_cv_prog_cc_g=yes
4810 fi
4811 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4812 fi
4813 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4814 fi
4815 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4816    ac_c_werror_flag=$ac_save_c_werror_flag
4817 fi
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4819 $as_echo "$ac_cv_prog_cc_g" >&6; }
4820 if test "$ac_test_CFLAGS" = set; then
4821   CFLAGS=$ac_save_CFLAGS
4822 elif test $ac_cv_prog_cc_g = yes; then
4823   if test "$GCC" = yes; then
4824     CFLAGS="-g -O2"
4825   else
4826     CFLAGS="-g"
4827   fi
4828 else
4829   if test "$GCC" = yes; then
4830     CFLAGS="-O2"
4831   else
4832     CFLAGS=
4833   fi
4834 fi
4835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4836 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4837 if ${ac_cv_prog_cc_c89+:} false; then :
4838   $as_echo_n "(cached) " >&6
4839 else
4840   ac_cv_prog_cc_c89=no
4841 ac_save_CC=$CC
4842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4843 /* end confdefs.h.  */
4844 #include <stdarg.h>
4845 #include <stdio.h>
4846 struct stat;
4847 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4848 struct buf { int x; };
4849 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4850 static char *e (p, i)
4851      char **p;
4852      int i;
4853 {
4854   return p[i];
4855 }
4856 static char *f (char * (*g) (char **, int), char **p, ...)
4857 {
4858   char *s;
4859   va_list v;
4860   va_start (v,p);
4861   s = g (p, va_arg (v,int));
4862   va_end (v);
4863   return s;
4864 }
4865
4866 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4867    function prototypes and stuff, but not '\xHH' hex character constants.
4868    These don't provoke an error unfortunately, instead are silently treated
4869    as 'x'.  The following induces an error, until -std is added to get
4870    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4871    array size at least.  It's necessary to write '\x00'==0 to get something
4872    that's true only with -std.  */
4873 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4874
4875 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4876    inside strings and character constants.  */
4877 #define FOO(x) 'x'
4878 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4879
4880 int test (int i, double x);
4881 struct s1 {int (*f) (int a);};
4882 struct s2 {int (*f) (double a);};
4883 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4884 int argc;
4885 char **argv;
4886 int
4887 main ()
4888 {
4889 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4890   ;
4891   return 0;
4892 }
4893 _ACEOF
4894 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4895         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4896 do
4897   CC="$ac_save_CC $ac_arg"
4898   if ac_fn_c_try_compile "$LINENO"; then :
4899   ac_cv_prog_cc_c89=$ac_arg
4900 fi
4901 rm -f core conftest.err conftest.$ac_objext
4902   test "x$ac_cv_prog_cc_c89" != "xno" && break
4903 done
4904 rm -f conftest.$ac_ext
4905 CC=$ac_save_CC
4906
4907 fi
4908 # AC_CACHE_VAL
4909 case "x$ac_cv_prog_cc_c89" in
4910   x)
4911     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4912 $as_echo "none needed" >&6; } ;;
4913   xno)
4914     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4915 $as_echo "unsupported" >&6; } ;;
4916   *)
4917     CC="$CC $ac_cv_prog_cc_c89"
4918     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4919 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4920 esac
4921 if test "x$ac_cv_prog_cc_c89" != xno; then :
4922
4923 fi
4924
4925 ac_ext=c
4926 ac_cpp='$CPP $CPPFLAGS'
4927 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4928 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4929 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4930
4931
4932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
4933 $as_echo_n "checking $CC dependency flag... " >&6; }
4934 echo 'void f(){}' >conftest.c
4935 if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
4936         DEPFLAG="-MM"
4937 else
4938   if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
4939         DEPFLAG="-xM1"
4940   else
4941         DEPFLAG="-MM"  # dunno do something
4942   fi
4943 fi
4944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
4945 $as_echo "$DEPFLAG" >&6; }
4946 rm -f conftest.c
4947
4948
4949
4950
4951
4952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
4953 $as_echo_n "checking whether $CC supports -Werror... " >&6; }
4954 cache=`echo Werror | sed 'y%.=/+-%___p_%'`
4955 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4956   $as_echo_n "(cached) " >&6
4957 else
4958
4959 echo 'void f(void){}' >conftest.c
4960 if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
4961 eval "cv_prog_cc_flag_$cache=yes"
4962 else
4963 eval "cv_prog_cc_flag_$cache=no"
4964 fi
4965 rm -f conftest conftest.o conftest.c
4966
4967 fi
4968
4969 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4971 $as_echo "yes" >&6; }
4972 :
4973 ERRFLAG="-Werror"
4974 else
4975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4976 $as_echo "no" >&6; }
4977 :
4978 ERRFLAG="-errwarn"
4979 fi
4980
4981
4982
4983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
4984 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
4985 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
4986 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4987   $as_echo_n "(cached) " >&6
4988 else
4989
4990 echo 'void f(void){}' >conftest.c
4991 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
4992 eval "cv_prog_cc_flag_$cache=yes"
4993 else
4994 eval "cv_prog_cc_flag_$cache=no"
4995 fi
4996 rm -f conftest conftest.o conftest.c
4997
4998 fi
4999
5000 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5002 $as_echo "yes" >&6; }
5003 :
5004 ERRFLAG="$ERRFLAG -Wall"
5005 else
5006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5007 $as_echo "no" >&6; }
5008 :
5009 ERRFLAG="$ERRFLAG -errfmt"
5010 fi
5011
5012
5013
5014
5015
5016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5017 $as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5018 cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5019 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5020   $as_echo_n "(cached) " >&6
5021 else
5022
5023 echo 'void f(void){}' >conftest.c
5024 if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5025 eval "cv_prog_cc_flag_$cache=yes"
5026 else
5027 eval "cv_prog_cc_flag_$cache=no"
5028 fi
5029 rm -f conftest conftest.o conftest.c
5030
5031 fi
5032
5033 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5035 $as_echo "yes" >&6; }
5036 :
5037 C99FLAG="-std=c99"
5038 else
5039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5040 $as_echo "no" >&6; }
5041 :
5042
5043 fi
5044
5045
5046
5047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5048 $as_echo_n "checking whether $CC supports -xc99... " >&6; }
5049 cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5050 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5051   $as_echo_n "(cached) " >&6
5052 else
5053
5054 echo 'void f(void){}' >conftest.c
5055 if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5056 eval "cv_prog_cc_flag_$cache=yes"
5057 else
5058 eval "cv_prog_cc_flag_$cache=no"
5059 fi
5060 rm -f conftest conftest.o conftest.c
5061
5062 fi
5063
5064 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5066 $as_echo "yes" >&6; }
5067 :
5068 C99FLAG="-xc99"
5069 else
5070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5071 $as_echo "no" >&6; }
5072 :
5073
5074 fi
5075
5076
5077 for ac_header in getopt.h time.h
5078 do :
5079   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5080 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5081 "
5082 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5083   cat >>confdefs.h <<_ACEOF
5084 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5085 _ACEOF
5086
5087 fi
5088
5089 done
5090
5091
5092
5093
5094
5095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC" >&5
5096 $as_echo_n "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC... " >&6; }
5097 cache=`$as_echo "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE" | $as_tr_sh`
5098 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5099   $as_echo_n "(cached) " >&6
5100 else
5101
5102 echo '
5103 #include "confdefs.h"
5104 #include <stdlib.h>
5105 #include <ctype.h>
5106 #include <sys/time.h>
5107 #ifdef HAVE_TIME_H
5108 #include <time.h>
5109 #endif
5110 #include <unistd.h>
5111 #include <netdb.h>
5112 #ifdef HAVE_GETOPT_H
5113 #include <getopt.h>
5114 #endif
5115
5116 int test() {
5117         int a;
5118         char **opts = NULL;
5119         struct timeval tv;
5120         char *t;
5121         time_t time = 0;
5122         char *buf = NULL;
5123         const char* str = NULL;
5124         struct msghdr msg;
5125         msg.msg_control = 0;
5126         t = ctime_r(&time, buf);
5127         tv.tv_usec = 10;
5128         srandom(32);
5129         a = getopt(2, opts, "a");
5130         a = isascii(32);
5131         str = gai_strerror(0);
5132         if(str && t && tv.tv_usec && msg.msg_control)
5133                 a = 0;
5134         return a;
5135 }
5136 ' > conftest.c
5137 echo 'void f(){}' >>conftest.c
5138 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5139 eval "cv_prog_cc_flag_needed_$cache=no"
5140 else
5141
5142 if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_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
5143 eval "cv_prog_cc_flag_needed_$cache=yes"
5144 else
5145 eval "cv_prog_cc_flag_needed_$cache=fail"
5146 #echo 'Test with flag fails too!'
5147 #cat conftest.c
5148 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5149 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5150 #exit 1
5151 fi
5152
5153 fi
5154 rm -f conftest conftest.c conftest.o
5155
5156 fi
5157
5158 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5160 $as_echo "yes" >&6; }
5161 :
5162 CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE"
5163 else
5164 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5166 $as_echo "no" >&6; }
5167 #echo 'Test with flag is no!'
5168 #cat conftest.c
5169 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5170 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5171 #exit 1
5172 :
5173
5174 else
5175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5176 $as_echo "failed" >&6; }
5177 :
5178
5179 fi
5180 fi
5181
5182
5183
5184
5185
5186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC" >&5
5187 $as_echo_n "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC... " >&6; }
5188 cache=`$as_echo "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE" | $as_tr_sh`
5189 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5190   $as_echo_n "(cached) " >&6
5191 else
5192
5193 echo '
5194 #include "confdefs.h"
5195 #include <stdlib.h>
5196 #include <ctype.h>
5197 #include <sys/time.h>
5198 #ifdef HAVE_TIME_H
5199 #include <time.h>
5200 #endif
5201 #include <unistd.h>
5202 #include <netdb.h>
5203 #ifdef HAVE_GETOPT_H
5204 #include <getopt.h>
5205 #endif
5206
5207 int test() {
5208         int a;
5209         char **opts = NULL;
5210         struct timeval tv;
5211         char *t;
5212         time_t time = 0;
5213         char *buf = NULL;
5214         const char* str = NULL;
5215         struct msghdr msg;
5216         msg.msg_control = 0;
5217         t = ctime_r(&time, buf);
5218         tv.tv_usec = 10;
5219         srandom(32);
5220         a = getopt(2, opts, "a");
5221         a = isascii(32);
5222         str = gai_strerror(0);
5223         if(str && t && tv.tv_usec && msg.msg_control)
5224                 a = 0;
5225         return a;
5226 }
5227 ' > conftest.c
5228 echo 'void f(){}' >>conftest.c
5229 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5230 eval "cv_prog_cc_flag_needed_$cache=no"
5231 else
5232
5233 if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5234 eval "cv_prog_cc_flag_needed_$cache=yes"
5235 else
5236 eval "cv_prog_cc_flag_needed_$cache=fail"
5237 #echo 'Test with flag fails too!'
5238 #cat conftest.c
5239 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5240 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5241 #exit 1
5242 fi
5243
5244 fi
5245 rm -f conftest conftest.c conftest.o
5246
5247 fi
5248
5249 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5251 $as_echo "yes" >&6; }
5252 :
5253 CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5254 else
5255 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5257 $as_echo "no" >&6; }
5258 #echo 'Test with flag is no!'
5259 #cat conftest.c
5260 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5261 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5262 #exit 1
5263 :
5264
5265 else
5266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5267 $as_echo "failed" >&6; }
5268 :
5269
5270 fi
5271 fi
5272
5273
5274
5275
5276
5277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5278 $as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5279 cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5280 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5281   $as_echo_n "(cached) " >&6
5282 else
5283
5284 echo '
5285 #include <stdbool.h>
5286 #include <ctype.h>
5287 int test() {
5288         int a = 0;
5289         return a;
5290 }
5291 ' > conftest.c
5292 echo 'void f(){}' >>conftest.c
5293 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5294 eval "cv_prog_cc_flag_needed_$cache=no"
5295 else
5296
5297 if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5298 eval "cv_prog_cc_flag_needed_$cache=yes"
5299 else
5300 eval "cv_prog_cc_flag_needed_$cache=fail"
5301 #echo 'Test with flag fails too!'
5302 #cat conftest.c
5303 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5304 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5305 #exit 1
5306 fi
5307
5308 fi
5309 rm -f conftest conftest.c conftest.o
5310
5311 fi
5312
5313 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5315 $as_echo "yes" >&6; }
5316 :
5317 CFLAGS="$CFLAGS $C99FLAG"
5318 else
5319 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5321 $as_echo "no" >&6; }
5322 #echo 'Test with flag is no!'
5323 #cat conftest.c
5324 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5325 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5326 #exit 1
5327 :
5328
5329 else
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5331 $as_echo "failed" >&6; }
5332 :
5333
5334 fi
5335 fi
5336
5337
5338
5339
5340
5341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE as a flag for $CC" >&5
5342 $as_echo_n "checking whether we need -D_BSD_SOURCE as a flag for $CC... " >&6; }
5343 cache=_D_BSD_SOURCE
5344 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5345   $as_echo_n "(cached) " >&6
5346 else
5347
5348 echo '
5349 #include <ctype.h>
5350
5351 int test() {
5352         int a;
5353         a = isascii(32);
5354         return a;
5355 }
5356 ' > conftest.c
5357 echo 'void f(){}' >>conftest.c
5358 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5359 eval "cv_prog_cc_flag_needed_$cache=no"
5360 else
5361
5362 if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5363 eval "cv_prog_cc_flag_needed_$cache=yes"
5364 else
5365 eval "cv_prog_cc_flag_needed_$cache=fail"
5366 #echo 'Test with flag fails too!'
5367 #cat conftest.c
5368 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE $ERRFLAG -c conftest.c 2>&1"
5369 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE $ERRFLAG -c conftest.c 2>&1`
5370 #exit 1
5371 fi
5372
5373 fi
5374 rm -f conftest conftest.c conftest.o
5375
5376 fi
5377
5378 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5380 $as_echo "yes" >&6; }
5381 :
5382 CFLAGS="$CFLAGS -D_BSD_SOURCE"
5383 else
5384 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5386 $as_echo "no" >&6; }
5387 #echo 'Test with flag is no!'
5388 #cat conftest.c
5389 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE $ERRFLAG -c conftest.c 2>&1"
5390 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE $ERRFLAG -c conftest.c 2>&1`
5391 #exit 1
5392 :
5393
5394 else
5395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5396 $as_echo "failed" >&6; }
5397 :
5398
5399 fi
5400 fi
5401
5402
5403
5404
5405
5406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5407 $as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5408 cache=_D_GNU_SOURCE
5409 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5410   $as_echo_n "(cached) " >&6
5411 else
5412
5413 echo '
5414 #include <netinet/in.h>
5415
5416 int test() {
5417         struct in6_pktinfo inf;
5418         int a = (int)sizeof(inf);
5419         return a;
5420 }
5421 ' > conftest.c
5422 echo 'void f(){}' >>conftest.c
5423 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5424 eval "cv_prog_cc_flag_needed_$cache=no"
5425 else
5426
5427 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5428 eval "cv_prog_cc_flag_needed_$cache=yes"
5429 else
5430 eval "cv_prog_cc_flag_needed_$cache=fail"
5431 #echo 'Test with flag fails too!'
5432 #cat conftest.c
5433 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5434 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5435 #exit 1
5436 fi
5437
5438 fi
5439 rm -f conftest conftest.c conftest.o
5440
5441 fi
5442
5443 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5445 $as_echo "yes" >&6; }
5446 :
5447 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5448 else
5449 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5451 $as_echo "no" >&6; }
5452 #echo 'Test with flag is no!'
5453 #cat conftest.c
5454 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5455 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5456 #exit 1
5457 :
5458
5459 else
5460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5461 $as_echo "failed" >&6; }
5462 :
5463
5464 fi
5465 fi
5466
5467
5468 # check again for GNU_SOURCE for setresgid. May fail if setresgid
5469 # is not available at all. -D_FRSRESGID is to make this check unique.
5470 # otherwise we would get the previous cached result.
5471
5472
5473
5474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5475 $as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5476 cache=_D_GNU_SOURCE__D_FRSRESGID
5477 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5478   $as_echo_n "(cached) " >&6
5479 else
5480
5481 echo '
5482 #include <unistd.h>
5483
5484 int test() {
5485         int a = setresgid(0,0,0);
5486         a = setresuid(0,0,0);
5487         return a;
5488 }
5489 ' > conftest.c
5490 echo 'void f(){}' >>conftest.c
5491 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5492 eval "cv_prog_cc_flag_needed_$cache=no"
5493 else
5494
5495 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5496 eval "cv_prog_cc_flag_needed_$cache=yes"
5497 else
5498 eval "cv_prog_cc_flag_needed_$cache=fail"
5499 #echo 'Test with flag fails too!'
5500 #cat conftest.c
5501 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5502 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5503 #exit 1
5504 fi
5505
5506 fi
5507 rm -f conftest conftest.c conftest.o
5508
5509 fi
5510
5511 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5513 $as_echo "yes" >&6; }
5514 :
5515 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5516 else
5517 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5519 $as_echo "no" >&6; }
5520 #echo 'Test with flag is no!'
5521 #cat conftest.c
5522 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5523 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5524 #exit 1
5525 :
5526
5527 else
5528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5529 $as_echo "failed" >&6; }
5530 :
5531
5532 fi
5533 fi
5534
5535
5536
5537
5538
5539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5540 $as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5541 cache=_D_POSIX_C_SOURCE_200112
5542 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5543   $as_echo_n "(cached) " >&6
5544 else
5545
5546 echo '
5547 #include "confdefs.h"
5548 #ifdef HAVE_TIME_H
5549 #include <time.h>
5550 #endif
5551 #include <netdb.h>
5552
5553 int test() {
5554         int a = 0;
5555         char *t;
5556         time_t time = 0;
5557         char *buf = NULL;
5558         const char* str = NULL;
5559         t = ctime_r(&time, buf);
5560         str = gai_strerror(0);
5561         if(t && str)
5562                 a = 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_POSIX_C_SOURCE=200112 $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_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5578 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $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_POSIX_C_SOURCE=200112"
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_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5599 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $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__EXTENSIONS__ as a flag for $CC" >&5
5616 $as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5617 cache=_D__EXTENSIONS__
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 #include <stdlib.h>
5625 #include <ctype.h>
5626 #include <sys/time.h>
5627 #ifdef HAVE_TIME_H
5628 #include <time.h>
5629 #endif
5630 #include <unistd.h>
5631 #ifdef HAVE_GETOPT_H
5632 #include <getopt.h>
5633 #endif
5634
5635 int test() {
5636         int a;
5637         char **opts = NULL;
5638         struct timeval tv;
5639         tv.tv_usec = 10;
5640         srandom(32);
5641         a = getopt(2, opts, "a");
5642         a = isascii(32);
5643         if(tv.tv_usec)
5644                 a = 0;
5645         return a;
5646 }
5647 ' > conftest.c
5648 echo 'void f(){}' >>conftest.c
5649 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5650 eval "cv_prog_cc_flag_needed_$cache=no"
5651 else
5652
5653 if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5654 eval "cv_prog_cc_flag_needed_$cache=yes"
5655 else
5656 eval "cv_prog_cc_flag_needed_$cache=fail"
5657 #echo 'Test with flag fails too!'
5658 #cat conftest.c
5659 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5660 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5661 #exit 1
5662 fi
5663
5664 fi
5665 rm -f conftest conftest.c conftest.o
5666
5667 fi
5668
5669 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5671 $as_echo "yes" >&6; }
5672 :
5673 CFLAGS="$CFLAGS -D__EXTENSIONS__"
5674 else
5675 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5677 $as_echo "no" >&6; }
5678 #echo 'Test with flag is no!'
5679 #cat conftest.c
5680 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5681 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5682 #exit 1
5683 :
5684
5685 else
5686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5687 $as_echo "failed" >&6; }
5688 :
5689
5690 fi
5691 fi
5692
5693
5694
5695
5696 # debug mode flags warnings
5697 # Check whether --enable-checking was given.
5698 if test "${enable_checking+set}" = set; then :
5699   enableval=$enable_checking;
5700 fi
5701
5702 # Check whether --enable-debug was given.
5703 if test "${enable_debug+set}" = set; then :
5704   enableval=$enable_debug;
5705 fi
5706
5707 if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5708 else debug_enabled="$enable_checking"; fi
5709
5710 case "$debug_enabled" in
5711         yes)
5712
5713
5714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5715 $as_echo_n "checking whether $CC supports -W... " >&6; }
5716 cache=`echo W | sed 'y%.=/+-%___p_%'`
5717 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5718   $as_echo_n "(cached) " >&6
5719 else
5720
5721 echo 'void f(void){}' >conftest.c
5722 if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5723 eval "cv_prog_cc_flag_$cache=yes"
5724 else
5725 eval "cv_prog_cc_flag_$cache=no"
5726 fi
5727 rm -f conftest conftest.o conftest.c
5728
5729 fi
5730
5731 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5733 $as_echo "yes" >&6; }
5734 :
5735 CFLAGS="$CFLAGS -W"
5736 else
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5738 $as_echo "no" >&6; }
5739 :
5740
5741 fi
5742
5743
5744
5745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5746 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5747 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5748 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5749   $as_echo_n "(cached) " >&6
5750 else
5751
5752 echo 'void f(void){}' >conftest.c
5753 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5754 eval "cv_prog_cc_flag_$cache=yes"
5755 else
5756 eval "cv_prog_cc_flag_$cache=no"
5757 fi
5758 rm -f conftest conftest.o conftest.c
5759
5760 fi
5761
5762 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5764 $as_echo "yes" >&6; }
5765 :
5766 CFLAGS="$CFLAGS -Wall"
5767 else
5768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5769 $as_echo "no" >&6; }
5770 :
5771
5772 fi
5773
5774
5775
5776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5777 $as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5778 cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5779 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5780   $as_echo_n "(cached) " >&6
5781 else
5782
5783 echo 'void f(void){}' >conftest.c
5784 if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5785 eval "cv_prog_cc_flag_$cache=yes"
5786 else
5787 eval "cv_prog_cc_flag_$cache=no"
5788 fi
5789 rm -f conftest conftest.o conftest.c
5790
5791 fi
5792
5793 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5795 $as_echo "yes" >&6; }
5796 :
5797 CFLAGS="$CFLAGS -Wextra"
5798 else
5799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5800 $as_echo "no" >&6; }
5801 :
5802
5803 fi
5804
5805
5806
5807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
5808 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
5809 cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
5810 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5811   $as_echo_n "(cached) " >&6
5812 else
5813
5814 echo 'void f(void){}' >conftest.c
5815 if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
5816 eval "cv_prog_cc_flag_$cache=yes"
5817 else
5818 eval "cv_prog_cc_flag_$cache=no"
5819 fi
5820 rm -f conftest conftest.o conftest.c
5821
5822 fi
5823
5824 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5826 $as_echo "yes" >&6; }
5827 :
5828 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
5829 else
5830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5831 $as_echo "no" >&6; }
5832 :
5833
5834 fi
5835
5836
5837 $as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
5838
5839                 ;;
5840         no|*)
5841                 # nothing to do.
5842                 ;;
5843 esac
5844
5845     # Check whether --enable-flto was given.
5846 if test "${enable_flto+set}" = set; then :
5847   enableval=$enable_flto;
5848 fi
5849
5850     if test "x$enable_flto" != "xno"; then :
5851
5852         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
5853 $as_echo_n "checking if $CC supports -flto... " >&6; }
5854         BAKCFLAGS="$CFLAGS"
5855         CFLAGS="$CFLAGS -flto"
5856         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5857 /* end confdefs.h.  */
5858
5859 int
5860 main ()
5861 {
5862
5863   ;
5864   return 0;
5865 }
5866 _ACEOF
5867 if ac_fn_c_try_link "$LINENO"; then :
5868
5869             if $CC $CFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
5870                 CFLAGS="$BAKCFLAGS"
5871                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5872 $as_echo "no" >&6; }
5873             else
5874                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5875 $as_echo "yes" >&6; }
5876             fi
5877             rm -f conftest conftest.c conftest.o
5878
5879 else
5880   CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5881 $as_echo "no" >&6; }
5882 fi
5883 rm -f core conftest.err conftest.$ac_objext \
5884     conftest$ac_exeext conftest.$ac_ext
5885
5886 fi
5887
5888
5889     # Check whether --enable-pie was given.
5890 if test "${enable_pie+set}" = set; then :
5891   enableval=$enable_pie;
5892 fi
5893
5894     if test "x$enable_pie" = "xyes"; then :
5895
5896         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
5897 $as_echo_n "checking if $CC supports PIE... " >&6; }
5898         BAKLDFLAGS="$LDFLAGS"
5899         BAKCFLAGS="$CFLAGS"
5900         LDFLAGS="$LDFLAGS -pie"
5901         CFLAGS="$CFLAGS -fPIE"
5902         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5903 /* end confdefs.h.  */
5904
5905 int
5906 main ()
5907 {
5908
5909   ;
5910   return 0;
5911 }
5912 _ACEOF
5913 if ac_fn_c_try_link "$LINENO"; then :
5914
5915             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
5916                 LDFLAGS="$BAKLDFLAGS"
5917                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5918 $as_echo "no" >&6; }
5919             else
5920                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5921 $as_echo "yes" >&6; }
5922             fi
5923             rm -f conftest conftest.c conftest.o
5924
5925 else
5926   LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5927 $as_echo "no" >&6; }
5928 fi
5929 rm -f core conftest.err conftest.$ac_objext \
5930     conftest$ac_exeext conftest.$ac_ext
5931
5932 fi
5933
5934
5935     # Check whether --enable-relro_now was given.
5936 if test "${enable_relro_now+set}" = set; then :
5937   enableval=$enable_relro_now;
5938 fi
5939
5940     if test "x$enable_relro_now" = "xyes"; then :
5941
5942         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
5943 $as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
5944         BAKLDFLAGS="$LDFLAGS"
5945         LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
5946         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5947 /* end confdefs.h.  */
5948
5949 int
5950 main ()
5951 {
5952
5953   ;
5954   return 0;
5955 }
5956 _ACEOF
5957 if ac_fn_c_try_link "$LINENO"; then :
5958
5959             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
5960                 LDFLAGS="$BAKLDFLAGS"
5961                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5962 $as_echo "no" >&6; }
5963             else
5964                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5965 $as_echo "yes" >&6; }
5966             fi
5967             rm -f conftest conftest.c conftest.o
5968
5969 else
5970   LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5971 $as_echo "no" >&6; }
5972 fi
5973 rm -f core conftest.err conftest.$ac_objext \
5974     conftest$ac_exeext conftest.$ac_ext
5975
5976 fi
5977
5978
5979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5980 $as_echo_n "checking for inline... " >&6; }
5981 if ${ac_cv_c_inline+:} false; then :
5982   $as_echo_n "(cached) " >&6
5983 else
5984   ac_cv_c_inline=no
5985 for ac_kw in inline __inline__ __inline; do
5986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5987 /* end confdefs.h.  */
5988 #ifndef __cplusplus
5989 typedef int foo_t;
5990 static $ac_kw foo_t static_foo () {return 0; }
5991 $ac_kw foo_t foo () {return 0; }
5992 #endif
5993
5994 _ACEOF
5995 if ac_fn_c_try_compile "$LINENO"; then :
5996   ac_cv_c_inline=$ac_kw
5997 fi
5998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5999   test "$ac_cv_c_inline" != no && break
6000 done
6001
6002 fi
6003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6004 $as_echo "$ac_cv_c_inline" >&6; }
6005
6006 case $ac_cv_c_inline in
6007   inline | yes) ;;
6008   *)
6009     case $ac_cv_c_inline in
6010       no) ac_val=;;
6011       *) ac_val=$ac_cv_c_inline;;
6012     esac
6013     cat >>confdefs.h <<_ACEOF
6014 #ifndef __cplusplus
6015 #define inline $ac_val
6016 #endif
6017 _ACEOF
6018     ;;
6019 esac
6020
6021
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6023 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6024 if ${ac_cv_c_format_attribute+:} false; then :
6025   $as_echo_n "(cached) " >&6
6026 else
6027   ac_cv_c_format_attribute=no
6028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6029 /* end confdefs.h.  */
6030 #include <stdio.h>
6031 void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6032 void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6033
6034 int
6035 main ()
6036 {
6037
6038    f ("%s", "str");
6039
6040   ;
6041   return 0;
6042 }
6043 _ACEOF
6044 if ac_fn_c_try_compile "$LINENO"; then :
6045   ac_cv_c_format_attribute="yes"
6046 else
6047   ac_cv_c_format_attribute="no"
6048 fi
6049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6050
6051 fi
6052
6053
6054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6055 $as_echo "$ac_cv_c_format_attribute" >&6; }
6056 if test $ac_cv_c_format_attribute = yes; then
6057
6058 $as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6059
6060 fi
6061
6062
6063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6064 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6065 if ${ac_cv_c_unused_attribute+:} false; then :
6066   $as_echo_n "(cached) " >&6
6067 else
6068   ac_cv_c_unused_attribute=no
6069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6070 /* end confdefs.h.  */
6071 #include <stdio.h>
6072 void f (char *u __attribute__((unused)));
6073
6074 int
6075 main ()
6076 {
6077
6078    f ("x");
6079
6080   ;
6081   return 0;
6082 }
6083 _ACEOF
6084 if ac_fn_c_try_compile "$LINENO"; then :
6085   ac_cv_c_unused_attribute="yes"
6086 else
6087   ac_cv_c_unused_attribute="no"
6088 fi
6089 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6090
6091 fi
6092
6093
6094
6095
6096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6097 $as_echo "$ac_cv_c_unused_attribute" >&6; }
6098 if test $ac_cv_c_unused_attribute = yes; then
6099
6100 $as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6101
6102 fi
6103
6104
6105 if test "$srcdir" != "."; then
6106         CPPFLAGS="$CPPFLAGS -I$srcdir"
6107 fi
6108
6109
6110
6111 for ac_prog in flex lex
6112 do
6113   # Extract the first word of "$ac_prog", so it can be a program name with args.
6114 set dummy $ac_prog; ac_word=$2
6115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6116 $as_echo_n "checking for $ac_word... " >&6; }
6117 if ${ac_cv_prog_LEX+:} false; then :
6118   $as_echo_n "(cached) " >&6
6119 else
6120   if test -n "$LEX"; then
6121   ac_cv_prog_LEX="$LEX" # Let the user override the test.
6122 else
6123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6124 for as_dir in $PATH
6125 do
6126   IFS=$as_save_IFS
6127   test -z "$as_dir" && as_dir=.
6128     for ac_exec_ext in '' $ac_executable_extensions; do
6129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6130     ac_cv_prog_LEX="$ac_prog"
6131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6132     break 2
6133   fi
6134 done
6135   done
6136 IFS=$as_save_IFS
6137
6138 fi
6139 fi
6140 LEX=$ac_cv_prog_LEX
6141 if test -n "$LEX"; then
6142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6143 $as_echo "$LEX" >&6; }
6144 else
6145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6146 $as_echo "no" >&6; }
6147 fi
6148
6149
6150   test -n "$LEX" && break
6151 done
6152 test -n "$LEX" || LEX=":"
6153
6154 if test "x$LEX" != "x:"; then
6155   cat >conftest.l <<_ACEOF
6156 %%
6157 a { ECHO; }
6158 b { REJECT; }
6159 c { yymore (); }
6160 d { yyless (1); }
6161 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6162     yyless ((input () != 0)); }
6163 f { unput (yytext[0]); }
6164 . { BEGIN INITIAL; }
6165 %%
6166 #ifdef YYTEXT_POINTER
6167 extern char *yytext;
6168 #endif
6169 int
6170 main (void)
6171 {
6172   return ! yylex () + ! yywrap ();
6173 }
6174 _ACEOF
6175 { { ac_try="$LEX conftest.l"
6176 case "(($ac_try" in
6177   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6178   *) ac_try_echo=$ac_try;;
6179 esac
6180 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6181 $as_echo "$ac_try_echo"; } >&5
6182   (eval "$LEX conftest.l") 2>&5
6183   ac_status=$?
6184   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6185   test $ac_status = 0; }
6186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6187 $as_echo_n "checking lex output file root... " >&6; }
6188 if ${ac_cv_prog_lex_root+:} false; then :
6189   $as_echo_n "(cached) " >&6
6190 else
6191
6192 if test -f lex.yy.c; then
6193   ac_cv_prog_lex_root=lex.yy
6194 elif test -f lexyy.c; then
6195   ac_cv_prog_lex_root=lexyy
6196 else
6197   as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6198 fi
6199 fi
6200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6201 $as_echo "$ac_cv_prog_lex_root" >&6; }
6202 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6203
6204 if test -z "${LEXLIB+set}"; then
6205   { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6206 $as_echo_n "checking lex library... " >&6; }
6207 if ${ac_cv_lib_lex+:} false; then :
6208   $as_echo_n "(cached) " >&6
6209 else
6210
6211     ac_save_LIBS=$LIBS
6212     ac_cv_lib_lex='none needed'
6213     for ac_lib in '' -lfl -ll; do
6214       LIBS="$ac_lib $ac_save_LIBS"
6215       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6216 /* end confdefs.h.  */
6217 `cat $LEX_OUTPUT_ROOT.c`
6218 _ACEOF
6219 if ac_fn_c_try_link "$LINENO"; then :
6220   ac_cv_lib_lex=$ac_lib
6221 fi
6222 rm -f core conftest.err conftest.$ac_objext \
6223     conftest$ac_exeext conftest.$ac_ext
6224       test "$ac_cv_lib_lex" != 'none needed' && break
6225     done
6226     LIBS=$ac_save_LIBS
6227
6228 fi
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6230 $as_echo "$ac_cv_lib_lex" >&6; }
6231   test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6232 fi
6233
6234
6235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6236 $as_echo_n "checking whether yytext is a pointer... " >&6; }
6237 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6238   $as_echo_n "(cached) " >&6
6239 else
6240   # POSIX says lex can declare yytext either as a pointer or an array; the
6241 # default is implementation-dependent.  Figure out which it is, since
6242 # not all implementations provide the %pointer and %array declarations.
6243 ac_cv_prog_lex_yytext_pointer=no
6244 ac_save_LIBS=$LIBS
6245 LIBS="$LEXLIB $ac_save_LIBS"
6246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6247 /* end confdefs.h.  */
6248
6249   #define YYTEXT_POINTER 1
6250 `cat $LEX_OUTPUT_ROOT.c`
6251 _ACEOF
6252 if ac_fn_c_try_link "$LINENO"; then :
6253   ac_cv_prog_lex_yytext_pointer=yes
6254 fi
6255 rm -f core conftest.err conftest.$ac_objext \
6256     conftest$ac_exeext conftest.$ac_ext
6257 LIBS=$ac_save_LIBS
6258
6259 fi
6260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6261 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6262 if test $ac_cv_prog_lex_yytext_pointer = yes; then
6263
6264 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6265
6266 fi
6267 rm -f conftest.l $LEX_OUTPUT_ROOT.c
6268
6269 fi
6270
6271         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6272 $as_echo_n "checking for yylex_destroy... " >&6; }
6273         if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6274
6275 $as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6276
6277                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6278 $as_echo "yes" >&6; }
6279         else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6280 $as_echo "no" >&6; }; fi
6281
6282 for ac_prog in 'bison -y' byacc
6283 do
6284   # Extract the first word of "$ac_prog", so it can be a program name with args.
6285 set dummy $ac_prog; ac_word=$2
6286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6287 $as_echo_n "checking for $ac_word... " >&6; }
6288 if ${ac_cv_prog_YACC+:} false; then :
6289   $as_echo_n "(cached) " >&6
6290 else
6291   if test -n "$YACC"; then
6292   ac_cv_prog_YACC="$YACC" # Let the user override the test.
6293 else
6294 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6295 for as_dir in $PATH
6296 do
6297   IFS=$as_save_IFS
6298   test -z "$as_dir" && as_dir=.
6299     for ac_exec_ext in '' $ac_executable_extensions; do
6300   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6301     ac_cv_prog_YACC="$ac_prog"
6302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6303     break 2
6304   fi
6305 done
6306   done
6307 IFS=$as_save_IFS
6308
6309 fi
6310 fi
6311 YACC=$ac_cv_prog_YACC
6312 if test -n "$YACC"; then
6313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6314 $as_echo "$YACC" >&6; }
6315 else
6316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6317 $as_echo "no" >&6; }
6318 fi
6319
6320
6321   test -n "$YACC" && break
6322 done
6323 test -n "$YACC" || YACC="yacc"
6324
6325 # Extract the first word of "doxygen", so it can be a program name with args.
6326 set dummy doxygen; ac_word=$2
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6328 $as_echo_n "checking for $ac_word... " >&6; }
6329 if ${ac_cv_prog_doxygen+:} false; then :
6330   $as_echo_n "(cached) " >&6
6331 else
6332   if test -n "$doxygen"; then
6333   ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6334 else
6335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6336 for as_dir in $PATH
6337 do
6338   IFS=$as_save_IFS
6339   test -z "$as_dir" && as_dir=.
6340     for ac_exec_ext in '' $ac_executable_extensions; do
6341   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6342     ac_cv_prog_doxygen="doxygen"
6343     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6344     break 2
6345   fi
6346 done
6347   done
6348 IFS=$as_save_IFS
6349
6350 fi
6351 fi
6352 doxygen=$ac_cv_prog_doxygen
6353 if test -n "$doxygen"; then
6354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6355 $as_echo "$doxygen" >&6; }
6356 else
6357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6358 $as_echo "no" >&6; }
6359 fi
6360
6361
6362 if test -n "$ac_tool_prefix"; then
6363   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6364 set dummy ${ac_tool_prefix}strip; ac_word=$2
6365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6366 $as_echo_n "checking for $ac_word... " >&6; }
6367 if ${ac_cv_prog_STRIP+:} false; then :
6368   $as_echo_n "(cached) " >&6
6369 else
6370   if test -n "$STRIP"; then
6371   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6372 else
6373 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6374 for as_dir in $PATH
6375 do
6376   IFS=$as_save_IFS
6377   test -z "$as_dir" && as_dir=.
6378     for ac_exec_ext in '' $ac_executable_extensions; do
6379   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6380     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6381     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6382     break 2
6383   fi
6384 done
6385   done
6386 IFS=$as_save_IFS
6387
6388 fi
6389 fi
6390 STRIP=$ac_cv_prog_STRIP
6391 if test -n "$STRIP"; then
6392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6393 $as_echo "$STRIP" >&6; }
6394 else
6395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6396 $as_echo "no" >&6; }
6397 fi
6398
6399
6400 fi
6401 if test -z "$ac_cv_prog_STRIP"; then
6402   ac_ct_STRIP=$STRIP
6403   # Extract the first word of "strip", so it can be a program name with args.
6404 set dummy strip; ac_word=$2
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6406 $as_echo_n "checking for $ac_word... " >&6; }
6407 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6408   $as_echo_n "(cached) " >&6
6409 else
6410   if test -n "$ac_ct_STRIP"; then
6411   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6412 else
6413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6414 for as_dir in $PATH
6415 do
6416   IFS=$as_save_IFS
6417   test -z "$as_dir" && as_dir=.
6418     for ac_exec_ext in '' $ac_executable_extensions; do
6419   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6420     ac_cv_prog_ac_ct_STRIP="strip"
6421     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6422     break 2
6423   fi
6424 done
6425   done
6426 IFS=$as_save_IFS
6427
6428 fi
6429 fi
6430 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6431 if test -n "$ac_ct_STRIP"; then
6432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6433 $as_echo "$ac_ct_STRIP" >&6; }
6434 else
6435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6436 $as_echo "no" >&6; }
6437 fi
6438
6439   if test "x$ac_ct_STRIP" = x; then
6440     STRIP=""
6441   else
6442     case $cross_compiling:$ac_tool_warned in
6443 yes:)
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6445 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6446 ac_tool_warned=yes ;;
6447 esac
6448     STRIP=$ac_ct_STRIP
6449   fi
6450 else
6451   STRIP="$ac_cv_prog_STRIP"
6452 fi
6453
6454 ac_aux_dir=
6455 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6456   if test -f "$ac_dir/install-sh"; then
6457     ac_aux_dir=$ac_dir
6458     ac_install_sh="$ac_aux_dir/install-sh -c"
6459     break
6460   elif test -f "$ac_dir/install.sh"; then
6461     ac_aux_dir=$ac_dir
6462     ac_install_sh="$ac_aux_dir/install.sh -c"
6463     break
6464   elif test -f "$ac_dir/shtool"; then
6465     ac_aux_dir=$ac_dir
6466     ac_install_sh="$ac_aux_dir/shtool install -c"
6467     break
6468   fi
6469 done
6470 if test -z "$ac_aux_dir"; then
6471   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6472 fi
6473
6474 # These three variables are undocumented and unsupported,
6475 # and are intended to be withdrawn in a future Autoconf release.
6476 # They can cause serious problems if a builder's source tree is in a directory
6477 # whose full name contains unusual characters.
6478 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6479 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6480 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6481
6482
6483 # Make sure we can run config.sub.
6484 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6485   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6486
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6488 $as_echo_n "checking build system type... " >&6; }
6489 if ${ac_cv_build+:} false; then :
6490   $as_echo_n "(cached) " >&6
6491 else
6492   ac_build_alias=$build_alias
6493 test "x$ac_build_alias" = x &&
6494   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6495 test "x$ac_build_alias" = x &&
6496   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6497 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6498   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6499
6500 fi
6501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6502 $as_echo "$ac_cv_build" >&6; }
6503 case $ac_cv_build in
6504 *-*-*) ;;
6505 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6506 esac
6507 build=$ac_cv_build
6508 ac_save_IFS=$IFS; IFS='-'
6509 set x $ac_cv_build
6510 shift
6511 build_cpu=$1
6512 build_vendor=$2
6513 shift; shift
6514 # Remember, the first character of IFS is used to create $*,
6515 # except with old shells:
6516 build_os=$*
6517 IFS=$ac_save_IFS
6518 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6519
6520
6521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6522 $as_echo_n "checking host system type... " >&6; }
6523 if ${ac_cv_host+:} false; then :
6524   $as_echo_n "(cached) " >&6
6525 else
6526   if test "x$host_alias" = x; then
6527   ac_cv_host=$ac_cv_build
6528 else
6529   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6530     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6531 fi
6532
6533 fi
6534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6535 $as_echo "$ac_cv_host" >&6; }
6536 case $ac_cv_host in
6537 *-*-*) ;;
6538 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6539 esac
6540 host=$ac_cv_host
6541 ac_save_IFS=$IFS; IFS='-'
6542 set x $ac_cv_host
6543 shift
6544 host_cpu=$1
6545 host_vendor=$2
6546 shift; shift
6547 # Remember, the first character of IFS is used to create $*,
6548 # except with old shells:
6549 host_os=$*
6550 IFS=$ac_save_IFS
6551 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6552
6553
6554
6555 # skip these tests, we do not need them.
6556
6557
6558
6559
6560
6561
6562
6563
6564 # always use ./libtool unless override from commandline (libtool=mylibtool)
6565 if test -z "$libtool"; then
6566         libtool="./libtool"
6567 fi
6568
6569 # avoid libtool max commandline length test on systems that fork slowly.
6570
6571 if echo "$host_os" | grep "sunos4" >/dev/null; then
6572         lt_cv_sys_max_cmd_len=32750;
6573 fi
6574 if test -n "$ac_tool_prefix"; then
6575   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6576 set dummy ${ac_tool_prefix}ar; ac_word=$2
6577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6578 $as_echo_n "checking for $ac_word... " >&6; }
6579 if ${ac_cv_path_AR+:} false; then :
6580   $as_echo_n "(cached) " >&6
6581 else
6582   case $AR in
6583   [\\/]* | ?:[\\/]*)
6584   ac_cv_path_AR="$AR" # Let the user override the test with a path.
6585   ;;
6586   *)
6587   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6588 for as_dir in $PATH
6589 do
6590   IFS=$as_save_IFS
6591   test -z "$as_dir" && as_dir=.
6592     for ac_exec_ext in '' $ac_executable_extensions; do
6593   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6594     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6595     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6596     break 2
6597   fi
6598 done
6599   done
6600 IFS=$as_save_IFS
6601
6602   ;;
6603 esac
6604 fi
6605 AR=$ac_cv_path_AR
6606 if test -n "$AR"; then
6607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6608 $as_echo "$AR" >&6; }
6609 else
6610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6611 $as_echo "no" >&6; }
6612 fi
6613
6614
6615 fi
6616 if test -z "$ac_cv_path_AR"; then
6617   ac_pt_AR=$AR
6618   # Extract the first word of "ar", so it can be a program name with args.
6619 set dummy ar; ac_word=$2
6620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6621 $as_echo_n "checking for $ac_word... " >&6; }
6622 if ${ac_cv_path_ac_pt_AR+:} false; then :
6623   $as_echo_n "(cached) " >&6
6624 else
6625   case $ac_pt_AR in
6626   [\\/]* | ?:[\\/]*)
6627   ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6628   ;;
6629   *)
6630   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6631 for as_dir in $PATH
6632 do
6633   IFS=$as_save_IFS
6634   test -z "$as_dir" && as_dir=.
6635     for ac_exec_ext in '' $ac_executable_extensions; do
6636   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6637     ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6638     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6639     break 2
6640   fi
6641 done
6642   done
6643 IFS=$as_save_IFS
6644
6645   ;;
6646 esac
6647 fi
6648 ac_pt_AR=$ac_cv_path_ac_pt_AR
6649 if test -n "$ac_pt_AR"; then
6650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6651 $as_echo "$ac_pt_AR" >&6; }
6652 else
6653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6654 $as_echo "no" >&6; }
6655 fi
6656
6657   if test "x$ac_pt_AR" = x; then
6658     AR="false"
6659   else
6660     case $cross_compiling:$ac_tool_warned in
6661 yes:)
6662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6663 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6664 ac_tool_warned=yes ;;
6665 esac
6666     AR=$ac_pt_AR
6667   fi
6668 else
6669   AR="$ac_cv_path_AR"
6670 fi
6671
6672 if test $AR = false; then
6673         as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
6674 fi
6675
6676 case `pwd` in
6677   *\ * | *\     *)
6678     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
6679 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
6680 esac
6681
6682
6683
6684 macro_version='2.4.2'
6685 macro_revision='1.3337'
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699 ltmain="$ac_aux_dir/ltmain.sh"
6700
6701 # Backslashify metacharacters that are still active within
6702 # double-quoted strings.
6703 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6704
6705 # Same as above, but do not quote variable references.
6706 double_quote_subst='s/\(["`\\]\)/\\\1/g'
6707
6708 # Sed substitution to delay expansion of an escaped shell variable in a
6709 # double_quote_subst'ed string.
6710 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6711
6712 # Sed substitution to delay expansion of an escaped single quote.
6713 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
6714
6715 # Sed substitution to avoid accidental globbing in evaled expressions
6716 no_glob_subst='s/\*/\\\*/g'
6717
6718 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6719 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
6720 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
6721
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
6723 $as_echo_n "checking how to print strings... " >&6; }
6724 # Test print first, because it will be a builtin if present.
6725 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6726    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6727   ECHO='print -r --'
6728 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6729   ECHO='printf %s\n'
6730 else
6731   # Use this function as a fallback that always works.
6732   func_fallback_echo ()
6733   {
6734     eval 'cat <<_LTECHO_EOF
6735 $1
6736 _LTECHO_EOF'
6737   }
6738   ECHO='func_fallback_echo'
6739 fi
6740
6741 # func_echo_all arg...
6742 # Invoke $ECHO with all args, space-separated.
6743 func_echo_all ()
6744 {
6745     $ECHO ""
6746 }
6747
6748 case "$ECHO" in
6749   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
6750 $as_echo "printf" >&6; } ;;
6751   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
6752 $as_echo "print -r" >&6; } ;;
6753   *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
6754 $as_echo "cat" >&6; } ;;
6755 esac
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6771 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6772 if ${ac_cv_path_SED+:} false; then :
6773   $as_echo_n "(cached) " >&6
6774 else
6775             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6776      for ac_i in 1 2 3 4 5 6 7; do
6777        ac_script="$ac_script$as_nl$ac_script"
6778      done
6779      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6780      { ac_script=; unset ac_script;}
6781      if test -z "$SED"; then
6782   ac_path_SED_found=false
6783   # Loop through the user's path and test for each of PROGNAME-LIST
6784   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6785 for as_dir in $PATH
6786 do
6787   IFS=$as_save_IFS
6788   test -z "$as_dir" && as_dir=.
6789     for ac_prog in sed gsed; do
6790     for ac_exec_ext in '' $ac_executable_extensions; do
6791       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6792       as_fn_executable_p "$ac_path_SED" || continue
6793 # Check for GNU ac_path_SED and select it if it is found.
6794   # Check for GNU $ac_path_SED
6795 case `"$ac_path_SED" --version 2>&1` in
6796 *GNU*)
6797   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6798 *)
6799   ac_count=0
6800   $as_echo_n 0123456789 >"conftest.in"
6801   while :
6802   do
6803     cat "conftest.in" "conftest.in" >"conftest.tmp"
6804     mv "conftest.tmp" "conftest.in"
6805     cp "conftest.in" "conftest.nl"
6806     $as_echo '' >> "conftest.nl"
6807     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6808     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6809     as_fn_arith $ac_count + 1 && ac_count=$as_val
6810     if test $ac_count -gt ${ac_path_SED_max-0}; then
6811       # Best one so far, save it but keep looking for a better one
6812       ac_cv_path_SED="$ac_path_SED"
6813       ac_path_SED_max=$ac_count
6814     fi
6815     # 10*(2^10) chars as input seems more than enough
6816     test $ac_count -gt 10 && break
6817   done
6818   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6819 esac
6820
6821       $ac_path_SED_found && break 3
6822     done
6823   done
6824   done
6825 IFS=$as_save_IFS
6826   if test -z "$ac_cv_path_SED"; then
6827     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6828   fi
6829 else
6830   ac_cv_path_SED=$SED
6831 fi
6832
6833 fi
6834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6835 $as_echo "$ac_cv_path_SED" >&6; }
6836  SED="$ac_cv_path_SED"
6837   rm -f conftest.sed
6838
6839 test -z "$SED" && SED=sed
6840 Xsed="$SED -e 1s/^X//"
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6853 $as_echo_n "checking for fgrep... " >&6; }
6854 if ${ac_cv_path_FGREP+:} false; then :
6855   $as_echo_n "(cached) " >&6
6856 else
6857   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6858    then ac_cv_path_FGREP="$GREP -F"
6859    else
6860      if test -z "$FGREP"; then
6861   ac_path_FGREP_found=false
6862   # Loop through the user's path and test for each of PROGNAME-LIST
6863   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6864 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6865 do
6866   IFS=$as_save_IFS
6867   test -z "$as_dir" && as_dir=.
6868     for ac_prog in fgrep; do
6869     for ac_exec_ext in '' $ac_executable_extensions; do
6870       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6871       as_fn_executable_p "$ac_path_FGREP" || continue
6872 # Check for GNU ac_path_FGREP and select it if it is found.
6873   # Check for GNU $ac_path_FGREP
6874 case `"$ac_path_FGREP" --version 2>&1` in
6875 *GNU*)
6876   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6877 *)
6878   ac_count=0
6879   $as_echo_n 0123456789 >"conftest.in"
6880   while :
6881   do
6882     cat "conftest.in" "conftest.in" >"conftest.tmp"
6883     mv "conftest.tmp" "conftest.in"
6884     cp "conftest.in" "conftest.nl"
6885     $as_echo 'FGREP' >> "conftest.nl"
6886     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6887     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6888     as_fn_arith $ac_count + 1 && ac_count=$as_val
6889     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6890       # Best one so far, save it but keep looking for a better one
6891       ac_cv_path_FGREP="$ac_path_FGREP"
6892       ac_path_FGREP_max=$ac_count
6893     fi
6894     # 10*(2^10) chars as input seems more than enough
6895     test $ac_count -gt 10 && break
6896   done
6897   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6898 esac
6899
6900       $ac_path_FGREP_found && break 3
6901     done
6902   done
6903   done
6904 IFS=$as_save_IFS
6905   if test -z "$ac_cv_path_FGREP"; then
6906     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6907   fi
6908 else
6909   ac_cv_path_FGREP=$FGREP
6910 fi
6911
6912    fi
6913 fi
6914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6915 $as_echo "$ac_cv_path_FGREP" >&6; }
6916  FGREP="$ac_cv_path_FGREP"
6917
6918
6919 test -z "$GREP" && GREP=grep
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939 # Check whether --with-gnu-ld was given.
6940 if test "${with_gnu_ld+set}" = set; then :
6941   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6942 else
6943   with_gnu_ld=no
6944 fi
6945
6946 ac_prog=ld
6947 if test "$GCC" = yes; then
6948   # Check if gcc -print-prog-name=ld gives a path.
6949   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
6950 $as_echo_n "checking for ld used by $CC... " >&6; }
6951   case $host in
6952   *-*-mingw*)
6953     # gcc leaves a trailing carriage return which upsets mingw
6954     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6955   *)
6956     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6957   esac
6958   case $ac_prog in
6959     # Accept absolute paths.
6960     [\\/]* | ?:[\\/]*)
6961       re_direlt='/[^/][^/]*/\.\./'
6962       # Canonicalize the pathname of ld
6963       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
6964       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
6965         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
6966       done
6967       test -z "$LD" && LD="$ac_prog"
6968       ;;
6969   "")
6970     # If it fails, then pretend we aren't using GCC.
6971     ac_prog=ld
6972     ;;
6973   *)
6974     # If it is relative, then search for the first ld in PATH.
6975     with_gnu_ld=unknown
6976     ;;
6977   esac
6978 elif test "$with_gnu_ld" = yes; then
6979   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6980 $as_echo_n "checking for GNU ld... " >&6; }
6981 else
6982   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6983 $as_echo_n "checking for non-GNU ld... " >&6; }
6984 fi
6985 if ${lt_cv_path_LD+:} false; then :
6986   $as_echo_n "(cached) " >&6
6987 else
6988   if test -z "$LD"; then
6989   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6990   for ac_dir in $PATH; do
6991     IFS="$lt_save_ifs"
6992     test -z "$ac_dir" && ac_dir=.
6993     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6994       lt_cv_path_LD="$ac_dir/$ac_prog"
6995       # Check to see if the program is GNU ld.  I'd rather use --version,
6996       # but apparently some variants of GNU ld only accept -v.
6997       # Break only if it was the GNU/non-GNU ld that we prefer.
6998       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
6999       *GNU* | *'with BFD'*)
7000         test "$with_gnu_ld" != no && break
7001         ;;
7002       *)
7003         test "$with_gnu_ld" != yes && break
7004         ;;
7005       esac
7006     fi
7007   done
7008   IFS="$lt_save_ifs"
7009 else
7010   lt_cv_path_LD="$LD" # Let the user override the test with a path.
7011 fi
7012 fi
7013
7014 LD="$lt_cv_path_LD"
7015 if test -n "$LD"; then
7016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7017 $as_echo "$LD" >&6; }
7018 else
7019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7020 $as_echo "no" >&6; }
7021 fi
7022 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7024 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7025 if ${lt_cv_prog_gnu_ld+:} false; then :
7026   $as_echo_n "(cached) " >&6
7027 else
7028   # I'd rather use --version here, but apparently some GNU lds only accept -v.
7029 case `$LD -v 2>&1 </dev/null` in
7030 *GNU* | *'with BFD'*)
7031   lt_cv_prog_gnu_ld=yes
7032   ;;
7033 *)
7034   lt_cv_prog_gnu_ld=no
7035   ;;
7036 esac
7037 fi
7038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7039 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
7040 with_gnu_ld=$lt_cv_prog_gnu_ld
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7051 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7052 if ${lt_cv_path_NM+:} false; then :
7053   $as_echo_n "(cached) " >&6
7054 else
7055   if test -n "$NM"; then
7056   # Let the user override the test.
7057   lt_cv_path_NM="$NM"
7058 else
7059   lt_nm_to_check="${ac_tool_prefix}nm"
7060   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7061     lt_nm_to_check="$lt_nm_to_check nm"
7062   fi
7063   for lt_tmp_nm in $lt_nm_to_check; do
7064     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7065     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7066       IFS="$lt_save_ifs"
7067       test -z "$ac_dir" && ac_dir=.
7068       tmp_nm="$ac_dir/$lt_tmp_nm"
7069       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
7070         # Check to see if the nm accepts a BSD-compat flag.
7071         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
7072         #   nm: unknown option "B" ignored
7073         # Tru64's nm complains that /dev/null is an invalid object file
7074         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
7075         */dev/null* | *'Invalid file or object type'*)
7076           lt_cv_path_NM="$tmp_nm -B"
7077           break
7078           ;;
7079         *)
7080           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7081           */dev/null*)
7082             lt_cv_path_NM="$tmp_nm -p"
7083             break
7084             ;;
7085           *)
7086             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7087             continue # so that we can try to find one that supports BSD flags
7088             ;;
7089           esac
7090           ;;
7091         esac
7092       fi
7093     done
7094     IFS="$lt_save_ifs"
7095   done
7096   : ${lt_cv_path_NM=no}
7097 fi
7098 fi
7099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7100 $as_echo "$lt_cv_path_NM" >&6; }
7101 if test "$lt_cv_path_NM" != "no"; then
7102   NM="$lt_cv_path_NM"
7103 else
7104   # Didn't find any BSD compatible name lister, look for dumpbin.
7105   if test -n "$DUMPBIN"; then :
7106     # Let the user override the test.
7107   else
7108     if test -n "$ac_tool_prefix"; then
7109   for ac_prog in dumpbin "link -dump"
7110   do
7111     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7112 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7114 $as_echo_n "checking for $ac_word... " >&6; }
7115 if ${ac_cv_prog_DUMPBIN+:} false; then :
7116   $as_echo_n "(cached) " >&6
7117 else
7118   if test -n "$DUMPBIN"; then
7119   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7120 else
7121 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7122 for as_dir in $PATH
7123 do
7124   IFS=$as_save_IFS
7125   test -z "$as_dir" && as_dir=.
7126     for ac_exec_ext in '' $ac_executable_extensions; do
7127   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7128     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7129     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7130     break 2
7131   fi
7132 done
7133   done
7134 IFS=$as_save_IFS
7135
7136 fi
7137 fi
7138 DUMPBIN=$ac_cv_prog_DUMPBIN
7139 if test -n "$DUMPBIN"; then
7140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7141 $as_echo "$DUMPBIN" >&6; }
7142 else
7143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7144 $as_echo "no" >&6; }
7145 fi
7146
7147
7148     test -n "$DUMPBIN" && break
7149   done
7150 fi
7151 if test -z "$DUMPBIN"; then
7152   ac_ct_DUMPBIN=$DUMPBIN
7153   for ac_prog in dumpbin "link -dump"
7154 do
7155   # Extract the first word of "$ac_prog", so it can be a program name with args.
7156 set dummy $ac_prog; ac_word=$2
7157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7158 $as_echo_n "checking for $ac_word... " >&6; }
7159 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7160   $as_echo_n "(cached) " >&6
7161 else
7162   if test -n "$ac_ct_DUMPBIN"; then
7163   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7164 else
7165 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7166 for as_dir in $PATH
7167 do
7168   IFS=$as_save_IFS
7169   test -z "$as_dir" && as_dir=.
7170     for ac_exec_ext in '' $ac_executable_extensions; do
7171   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7172     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7174     break 2
7175   fi
7176 done
7177   done
7178 IFS=$as_save_IFS
7179
7180 fi
7181 fi
7182 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7183 if test -n "$ac_ct_DUMPBIN"; then
7184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7185 $as_echo "$ac_ct_DUMPBIN" >&6; }
7186 else
7187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7188 $as_echo "no" >&6; }
7189 fi
7190
7191
7192   test -n "$ac_ct_DUMPBIN" && break
7193 done
7194
7195   if test "x$ac_ct_DUMPBIN" = x; then
7196     DUMPBIN=":"
7197   else
7198     case $cross_compiling:$ac_tool_warned in
7199 yes:)
7200 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7201 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7202 ac_tool_warned=yes ;;
7203 esac
7204     DUMPBIN=$ac_ct_DUMPBIN
7205   fi
7206 fi
7207
7208     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
7209     *COFF*)
7210       DUMPBIN="$DUMPBIN -symbols"
7211       ;;
7212     *)
7213       DUMPBIN=:
7214       ;;
7215     esac
7216   fi
7217
7218   if test "$DUMPBIN" != ":"; then
7219     NM="$DUMPBIN"
7220   fi
7221 fi
7222 test -z "$NM" && NM=nm
7223
7224
7225
7226
7227
7228
7229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7230 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
7231 if ${lt_cv_nm_interface+:} false; then :
7232   $as_echo_n "(cached) " >&6
7233 else
7234   lt_cv_nm_interface="BSD nm"
7235   echo "int some_variable = 0;" > conftest.$ac_ext
7236   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7237   (eval "$ac_compile" 2>conftest.err)
7238   cat conftest.err >&5
7239   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7240   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7241   cat conftest.err >&5
7242   (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7243   cat conftest.out >&5
7244   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7245     lt_cv_nm_interface="MS dumpbin"
7246   fi
7247   rm -f conftest*
7248 fi
7249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7250 $as_echo "$lt_cv_nm_interface" >&6; }
7251
7252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7253 $as_echo_n "checking whether ln -s works... " >&6; }
7254 LN_S=$as_ln_s
7255 if test "$LN_S" = "ln -s"; then
7256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7257 $as_echo "yes" >&6; }
7258 else
7259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7260 $as_echo "no, using $LN_S" >&6; }
7261 fi
7262
7263 # find the maximum length of command line arguments
7264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7265 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7266 if ${lt_cv_sys_max_cmd_len+:} false; then :
7267   $as_echo_n "(cached) " >&6
7268 else
7269     i=0
7270   teststring="ABCD"
7271
7272   case $build_os in
7273   msdosdjgpp*)
7274     # On DJGPP, this test can blow up pretty badly due to problems in libc
7275     # (any single argument exceeding 2000 bytes causes a buffer overrun
7276     # during glob expansion).  Even if it were fixed, the result of this
7277     # check would be larger than it should be.
7278     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7279     ;;
7280
7281   gnu*)
7282     # Under GNU Hurd, this test is not required because there is
7283     # no limit to the length of command line arguments.
7284     # Libtool will interpret -1 as no limit whatsoever
7285     lt_cv_sys_max_cmd_len=-1;
7286     ;;
7287
7288   cygwin* | mingw* | cegcc*)
7289     # On Win9x/ME, this test blows up -- it succeeds, but takes
7290     # about 5 minutes as the teststring grows exponentially.
7291     # Worse, since 9x/ME are not pre-emptively multitasking,
7292     # you end up with a "frozen" computer, even though with patience
7293     # the test eventually succeeds (with a max line length of 256k).
7294     # Instead, let's just punt: use the minimum linelength reported by
7295     # all of the supported platforms: 8192 (on NT/2K/XP).
7296     lt_cv_sys_max_cmd_len=8192;
7297     ;;
7298
7299   mint*)
7300     # On MiNT this can take a long time and run out of memory.
7301     lt_cv_sys_max_cmd_len=8192;
7302     ;;
7303
7304   amigaos*)
7305     # On AmigaOS with pdksh, this test takes hours, literally.
7306     # So we just punt and use a minimum line length of 8192.
7307     lt_cv_sys_max_cmd_len=8192;
7308     ;;
7309
7310   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
7311     # This has been around since 386BSD, at least.  Likely further.
7312     if test -x /sbin/sysctl; then
7313       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7314     elif test -x /usr/sbin/sysctl; then
7315       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7316     else
7317       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7318     fi
7319     # And add a safety zone
7320     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7321     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7322     ;;
7323
7324   interix*)
7325     # We know the value 262144 and hardcode it with a safety zone (like BSD)
7326     lt_cv_sys_max_cmd_len=196608
7327     ;;
7328
7329   os2*)
7330     # The test takes a long time on OS/2.
7331     lt_cv_sys_max_cmd_len=8192
7332     ;;
7333
7334   osf*)
7335     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7336     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7337     # nice to cause kernel panics so lets avoid the loop below.
7338     # First set a reasonable default.
7339     lt_cv_sys_max_cmd_len=16384
7340     #
7341     if test -x /sbin/sysconfig; then
7342       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7343         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7344       esac
7345     fi
7346     ;;
7347   sco3.2v5*)
7348     lt_cv_sys_max_cmd_len=102400
7349     ;;
7350   sysv5* | sco5v6* | sysv4.2uw2*)
7351     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7352     if test -n "$kargmax"; then
7353       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[  ]//'`
7354     else
7355       lt_cv_sys_max_cmd_len=32768
7356     fi
7357     ;;
7358   *)
7359     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7360     if test -n "$lt_cv_sys_max_cmd_len"; then
7361       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7362       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7363     else
7364       # Make teststring a little bigger before we do anything with it.
7365       # a 1K string should be a reasonable start.
7366       for i in 1 2 3 4 5 6 7 8 ; do
7367         teststring=$teststring$teststring
7368       done
7369       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7370       # If test is not a shell built-in, we'll probably end up computing a
7371       # maximum length that is only half of the actual maximum length, but
7372       # we can't tell.
7373       while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
7374                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7375               test $i != 17 # 1/2 MB should be enough
7376       do
7377         i=`expr $i + 1`
7378         teststring=$teststring$teststring
7379       done
7380       # Only check the string length outside the loop.
7381       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7382       teststring=
7383       # Add a significant safety factor because C++ compilers can tack on
7384       # massive amounts of additional arguments before passing them to the
7385       # linker.  It appears as though 1/2 is a usable value.
7386       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7387     fi
7388     ;;
7389   esac
7390
7391 fi
7392
7393 if test -n $lt_cv_sys_max_cmd_len ; then
7394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7395 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7396 else
7397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7398 $as_echo "none" >&6; }
7399 fi
7400 max_cmd_len=$lt_cv_sys_max_cmd_len
7401
7402
7403
7404
7405
7406
7407 : ${CP="cp -f"}
7408 : ${MV="mv -f"}
7409 : ${RM="rm -f"}
7410
7411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
7412 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
7413 # Try some XSI features
7414 xsi_shell=no
7415 ( _lt_dummy="a/b/c"
7416   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7417       = c,a/b,b/c, \
7418     && eval 'test $(( 1 + 1 )) -eq 2 \
7419     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7420   && xsi_shell=yes
7421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
7422 $as_echo "$xsi_shell" >&6; }
7423
7424
7425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
7426 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
7427 lt_shell_append=no
7428 ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
7429     >/dev/null 2>&1 \
7430   && lt_shell_append=yes
7431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
7432 $as_echo "$lt_shell_append" >&6; }
7433
7434
7435 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7436   lt_unset=unset
7437 else
7438   lt_unset=false
7439 fi
7440
7441
7442
7443
7444
7445 # test EBCDIC or ASCII
7446 case `echo X|tr X '\101'` in
7447  A) # ASCII based system
7448     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7449   lt_SP2NL='tr \040 \012'
7450   lt_NL2SP='tr \015\012 \040\040'
7451   ;;
7452  *) # EBCDIC based system
7453   lt_SP2NL='tr \100 \n'
7454   lt_NL2SP='tr \r\n \100\100'
7455   ;;
7456 esac
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7467 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7468 if ${lt_cv_to_host_file_cmd+:} false; then :
7469   $as_echo_n "(cached) " >&6
7470 else
7471   case $host in
7472   *-*-mingw* )
7473     case $build in
7474       *-*-mingw* ) # actually msys
7475         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7476         ;;
7477       *-*-cygwin* )
7478         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7479         ;;
7480       * ) # otherwise, assume *nix
7481         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7482         ;;
7483     esac
7484     ;;
7485   *-*-cygwin* )
7486     case $build in
7487       *-*-mingw* ) # actually msys
7488         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7489         ;;
7490       *-*-cygwin* )
7491         lt_cv_to_host_file_cmd=func_convert_file_noop
7492         ;;
7493       * ) # otherwise, assume *nix
7494         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7495         ;;
7496     esac
7497     ;;
7498   * ) # unhandled hosts (and "normal" native builds)
7499     lt_cv_to_host_file_cmd=func_convert_file_noop
7500     ;;
7501 esac
7502
7503 fi
7504
7505 to_host_file_cmd=$lt_cv_to_host_file_cmd
7506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7507 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
7508
7509
7510
7511
7512
7513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7514 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7515 if ${lt_cv_to_tool_file_cmd+:} false; then :
7516   $as_echo_n "(cached) " >&6
7517 else
7518   #assume ordinary cross tools, or native build.
7519 lt_cv_to_tool_file_cmd=func_convert_file_noop
7520 case $host in
7521   *-*-mingw* )
7522     case $build in
7523       *-*-mingw* ) # actually msys
7524         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7525         ;;
7526     esac
7527     ;;
7528 esac
7529
7530 fi
7531
7532 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7534 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7535
7536
7537
7538
7539
7540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7541 $as_echo_n "checking for $LD option to reload object files... " >&6; }
7542 if ${lt_cv_ld_reload_flag+:} false; then :
7543   $as_echo_n "(cached) " >&6
7544 else
7545   lt_cv_ld_reload_flag='-r'
7546 fi
7547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7548 $as_echo "$lt_cv_ld_reload_flag" >&6; }
7549 reload_flag=$lt_cv_ld_reload_flag
7550 case $reload_flag in
7551 "" | " "*) ;;
7552 *) reload_flag=" $reload_flag" ;;
7553 esac
7554 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7555 case $host_os in
7556   cygwin* | mingw* | pw32* | cegcc*)
7557     if test "$GCC" != yes; then
7558       reload_cmds=false
7559     fi
7560     ;;
7561   darwin*)
7562     if test "$GCC" = yes; then
7563       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
7564     else
7565       reload_cmds='$LD$reload_flag -o $output$reload_objs'
7566     fi
7567     ;;
7568 esac
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578 if test -n "$ac_tool_prefix"; then
7579   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7580 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7582 $as_echo_n "checking for $ac_word... " >&6; }
7583 if ${ac_cv_prog_OBJDUMP+:} false; then :
7584   $as_echo_n "(cached) " >&6
7585 else
7586   if test -n "$OBJDUMP"; then
7587   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7588 else
7589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7590 for as_dir in $PATH
7591 do
7592   IFS=$as_save_IFS
7593   test -z "$as_dir" && as_dir=.
7594     for ac_exec_ext in '' $ac_executable_extensions; do
7595   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7596     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7597     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7598     break 2
7599   fi
7600 done
7601   done
7602 IFS=$as_save_IFS
7603
7604 fi
7605 fi
7606 OBJDUMP=$ac_cv_prog_OBJDUMP
7607 if test -n "$OBJDUMP"; then
7608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7609 $as_echo "$OBJDUMP" >&6; }
7610 else
7611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7612 $as_echo "no" >&6; }
7613 fi
7614
7615
7616 fi
7617 if test -z "$ac_cv_prog_OBJDUMP"; then
7618   ac_ct_OBJDUMP=$OBJDUMP
7619   # Extract the first word of "objdump", so it can be a program name with args.
7620 set dummy objdump; ac_word=$2
7621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7622 $as_echo_n "checking for $ac_word... " >&6; }
7623 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7624   $as_echo_n "(cached) " >&6
7625 else
7626   if test -n "$ac_ct_OBJDUMP"; then
7627   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7628 else
7629 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7630 for as_dir in $PATH
7631 do
7632   IFS=$as_save_IFS
7633   test -z "$as_dir" && as_dir=.
7634     for ac_exec_ext in '' $ac_executable_extensions; do
7635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7636     ac_cv_prog_ac_ct_OBJDUMP="objdump"
7637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7638     break 2
7639   fi
7640 done
7641   done
7642 IFS=$as_save_IFS
7643
7644 fi
7645 fi
7646 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7647 if test -n "$ac_ct_OBJDUMP"; then
7648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7649 $as_echo "$ac_ct_OBJDUMP" >&6; }
7650 else
7651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7652 $as_echo "no" >&6; }
7653 fi
7654
7655   if test "x$ac_ct_OBJDUMP" = x; then
7656     OBJDUMP="false"
7657   else
7658     case $cross_compiling:$ac_tool_warned in
7659 yes:)
7660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7661 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7662 ac_tool_warned=yes ;;
7663 esac
7664     OBJDUMP=$ac_ct_OBJDUMP
7665   fi
7666 else
7667   OBJDUMP="$ac_cv_prog_OBJDUMP"
7668 fi
7669
7670 test -z "$OBJDUMP" && OBJDUMP=objdump
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7681 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
7682 if ${lt_cv_deplibs_check_method+:} false; then :
7683   $as_echo_n "(cached) " >&6
7684 else
7685   lt_cv_file_magic_cmd='$MAGIC_CMD'
7686 lt_cv_file_magic_test_file=
7687 lt_cv_deplibs_check_method='unknown'
7688 # Need to set the preceding variable on all platforms that support
7689 # interlibrary dependencies.
7690 # 'none' -- dependencies not supported.
7691 # `unknown' -- same as none, but documents that we really don't know.
7692 # 'pass_all' -- all dependencies passed with no checks.
7693 # 'test_compile' -- check by making test program.
7694 # 'file_magic [[regex]]' -- check by looking for files in library path
7695 # which responds to the $file_magic_cmd with a given extended regex.
7696 # If you have `file' or equivalent on your system and you're not sure
7697 # whether `pass_all' will *always* work, you probably want this one.
7698
7699 case $host_os in
7700 aix[4-9]*)
7701   lt_cv_deplibs_check_method=pass_all
7702   ;;
7703
7704 beos*)
7705   lt_cv_deplibs_check_method=pass_all
7706   ;;
7707
7708 bsdi[45]*)
7709   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
7710   lt_cv_file_magic_cmd='/usr/bin/file -L'
7711   lt_cv_file_magic_test_file=/shlib/libc.so
7712   ;;
7713
7714 cygwin*)
7715   # func_win32_libid is a shell function defined in ltmain.sh
7716   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7717   lt_cv_file_magic_cmd='func_win32_libid'
7718   ;;
7719
7720 mingw* | pw32*)
7721   # Base MSYS/MinGW do not provide the 'file' command needed by
7722   # func_win32_libid shell function, so use a weaker test based on 'objdump',
7723   # unless we find 'file', for example because we are cross-compiling.
7724   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
7725   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
7726     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7727     lt_cv_file_magic_cmd='func_win32_libid'
7728   else
7729     # Keep this pattern in sync with the one in func_win32_libid.
7730     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
7731     lt_cv_file_magic_cmd='$OBJDUMP -f'
7732   fi
7733   ;;
7734
7735 cegcc*)
7736   # use the weaker test based on 'objdump'. See mingw*.
7737   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
7738   lt_cv_file_magic_cmd='$OBJDUMP -f'
7739   ;;
7740
7741 darwin* | rhapsody*)
7742   lt_cv_deplibs_check_method=pass_all
7743   ;;
7744
7745 freebsd* | dragonfly*)
7746   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7747     case $host_cpu in
7748     i*86 )
7749       # Not sure whether the presence of OpenBSD here was a mistake.
7750       # Let's accept both of them until this is cleared up.
7751       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
7752       lt_cv_file_magic_cmd=/usr/bin/file
7753       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7754       ;;
7755     esac
7756   else
7757     lt_cv_deplibs_check_method=pass_all
7758   fi
7759   ;;
7760
7761 gnu*)
7762   lt_cv_deplibs_check_method=pass_all
7763   ;;
7764
7765 haiku*)
7766   lt_cv_deplibs_check_method=pass_all
7767   ;;
7768
7769 hpux10.20* | hpux11*)
7770   lt_cv_file_magic_cmd=/usr/bin/file
7771   case $host_cpu in
7772   ia64*)
7773     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
7774     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7775     ;;
7776   hppa*64*)
7777     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]'
7778     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7779     ;;
7780   *)
7781     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
7782     lt_cv_file_magic_test_file=/usr/lib/libc.sl
7783     ;;
7784   esac
7785   ;;
7786
7787 interix[3-9]*)
7788   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
7789   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
7790   ;;
7791
7792 irix5* | irix6* | nonstopux*)
7793   case $LD in
7794   *-32|*"-32 ") libmagic=32-bit;;
7795   *-n32|*"-n32 ") libmagic=N32;;
7796   *-64|*"-64 ") libmagic=64-bit;;
7797   *) libmagic=never-match;;
7798   esac
7799   lt_cv_deplibs_check_method=pass_all
7800   ;;
7801
7802 # This must be glibc/ELF.
7803 linux* | k*bsd*-gnu | kopensolaris*-gnu)
7804   lt_cv_deplibs_check_method=pass_all
7805   ;;
7806
7807 netbsd*)
7808   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7809     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7810   else
7811     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
7812   fi
7813   ;;
7814
7815 newos6*)
7816   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
7817   lt_cv_file_magic_cmd=/usr/bin/file
7818   lt_cv_file_magic_test_file=/usr/lib/libnls.so
7819   ;;
7820
7821 *nto* | *qnx*)
7822   lt_cv_deplibs_check_method=pass_all
7823   ;;
7824
7825 openbsd*)
7826   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7827     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
7828   else
7829     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7830   fi
7831   ;;
7832
7833 osf3* | osf4* | osf5*)
7834   lt_cv_deplibs_check_method=pass_all
7835   ;;
7836
7837 rdos*)
7838   lt_cv_deplibs_check_method=pass_all
7839   ;;
7840
7841 solaris*)
7842   lt_cv_deplibs_check_method=pass_all
7843   ;;
7844
7845 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
7846   lt_cv_deplibs_check_method=pass_all
7847   ;;
7848
7849 sysv4 | sysv4.3*)
7850   case $host_vendor in
7851   motorola)
7852     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]'
7853     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7854     ;;
7855   ncr)
7856     lt_cv_deplibs_check_method=pass_all
7857     ;;
7858   sequent)
7859     lt_cv_file_magic_cmd='/bin/file'
7860     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
7861     ;;
7862   sni)
7863     lt_cv_file_magic_cmd='/bin/file'
7864     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
7865     lt_cv_file_magic_test_file=/lib/libc.so
7866     ;;
7867   siemens)
7868     lt_cv_deplibs_check_method=pass_all
7869     ;;
7870   pc)
7871     lt_cv_deplibs_check_method=pass_all
7872     ;;
7873   esac
7874   ;;
7875
7876 tpf*)
7877   lt_cv_deplibs_check_method=pass_all
7878   ;;
7879 esac
7880
7881 fi
7882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
7883 $as_echo "$lt_cv_deplibs_check_method" >&6; }
7884
7885 file_magic_glob=
7886 want_nocaseglob=no
7887 if test "$build" = "$host"; then
7888   case $host_os in
7889   mingw* | pw32*)
7890     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
7891       want_nocaseglob=yes
7892     else
7893       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
7894     fi
7895     ;;
7896   esac
7897 fi
7898
7899 file_magic_cmd=$lt_cv_file_magic_cmd
7900 deplibs_check_method=$lt_cv_deplibs_check_method
7901 test -z "$deplibs_check_method" && deplibs_check_method=unknown
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924 if test -n "$ac_tool_prefix"; then
7925   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7926 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7928 $as_echo_n "checking for $ac_word... " >&6; }
7929 if ${ac_cv_prog_DLLTOOL+:} false; then :
7930   $as_echo_n "(cached) " >&6
7931 else
7932   if test -n "$DLLTOOL"; then
7933   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7934 else
7935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7936 for as_dir in $PATH
7937 do
7938   IFS=$as_save_IFS
7939   test -z "$as_dir" && as_dir=.
7940     for ac_exec_ext in '' $ac_executable_extensions; do
7941   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7942     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7943     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7944     break 2
7945   fi
7946 done
7947   done
7948 IFS=$as_save_IFS
7949
7950 fi
7951 fi
7952 DLLTOOL=$ac_cv_prog_DLLTOOL
7953 if test -n "$DLLTOOL"; then
7954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7955 $as_echo "$DLLTOOL" >&6; }
7956 else
7957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7958 $as_echo "no" >&6; }
7959 fi
7960
7961
7962 fi
7963 if test -z "$ac_cv_prog_DLLTOOL"; then
7964   ac_ct_DLLTOOL=$DLLTOOL
7965   # Extract the first word of "dlltool", so it can be a program name with args.
7966 set dummy dlltool; ac_word=$2
7967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7968 $as_echo_n "checking for $ac_word... " >&6; }
7969 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7970   $as_echo_n "(cached) " >&6
7971 else
7972   if test -n "$ac_ct_DLLTOOL"; then
7973   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7974 else
7975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7976 for as_dir in $PATH
7977 do
7978   IFS=$as_save_IFS
7979   test -z "$as_dir" && as_dir=.
7980     for ac_exec_ext in '' $ac_executable_extensions; do
7981   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7982     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7983     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7984     break 2
7985   fi
7986 done
7987   done
7988 IFS=$as_save_IFS
7989
7990 fi
7991 fi
7992 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7993 if test -n "$ac_ct_DLLTOOL"; then
7994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7995 $as_echo "$ac_ct_DLLTOOL" >&6; }
7996 else
7997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7998 $as_echo "no" >&6; }
7999 fi
8000
8001   if test "x$ac_ct_DLLTOOL" = x; then
8002     DLLTOOL="false"
8003   else
8004     case $cross_compiling:$ac_tool_warned in
8005 yes:)
8006 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8007 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8008 ac_tool_warned=yes ;;
8009 esac
8010     DLLTOOL=$ac_ct_DLLTOOL
8011   fi
8012 else
8013   DLLTOOL="$ac_cv_prog_DLLTOOL"
8014 fi
8015
8016 test -z "$DLLTOOL" && DLLTOOL=dlltool
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8028 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8029 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8030   $as_echo_n "(cached) " >&6
8031 else
8032   lt_cv_sharedlib_from_linklib_cmd='unknown'
8033
8034 case $host_os in
8035 cygwin* | mingw* | pw32* | cegcc*)
8036   # two different shell functions defined in ltmain.sh
8037   # decide which to use based on capabilities of $DLLTOOL
8038   case `$DLLTOOL --help 2>&1` in
8039   *--identify-strict*)
8040     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8041     ;;
8042   *)
8043     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8044     ;;
8045   esac
8046   ;;
8047 *)
8048   # fallback: assume linklib IS sharedlib
8049   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
8050   ;;
8051 esac
8052
8053 fi
8054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8055 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8056 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8057 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8058
8059
8060
8061
8062
8063
8064
8065 if test -n "$ac_tool_prefix"; then
8066   for ac_prog in ar
8067   do
8068     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8069 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8071 $as_echo_n "checking for $ac_word... " >&6; }
8072 if ${ac_cv_prog_AR+:} false; then :
8073   $as_echo_n "(cached) " >&6
8074 else
8075   if test -n "$AR"; then
8076   ac_cv_prog_AR="$AR" # Let the user override the test.
8077 else
8078 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8079 for as_dir in $PATH
8080 do
8081   IFS=$as_save_IFS
8082   test -z "$as_dir" && as_dir=.
8083     for ac_exec_ext in '' $ac_executable_extensions; do
8084   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8085     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8086     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8087     break 2
8088   fi
8089 done
8090   done
8091 IFS=$as_save_IFS
8092
8093 fi
8094 fi
8095 AR=$ac_cv_prog_AR
8096 if test -n "$AR"; then
8097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8098 $as_echo "$AR" >&6; }
8099 else
8100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8101 $as_echo "no" >&6; }
8102 fi
8103
8104
8105     test -n "$AR" && break
8106   done
8107 fi
8108 if test -z "$AR"; then
8109   ac_ct_AR=$AR
8110   for ac_prog in ar
8111 do
8112   # Extract the first word of "$ac_prog", so it can be a program name with args.
8113 set dummy $ac_prog; ac_word=$2
8114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8115 $as_echo_n "checking for $ac_word... " >&6; }
8116 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8117   $as_echo_n "(cached) " >&6
8118 else
8119   if test -n "$ac_ct_AR"; then
8120   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8121 else
8122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8123 for as_dir in $PATH
8124 do
8125   IFS=$as_save_IFS
8126   test -z "$as_dir" && as_dir=.
8127     for ac_exec_ext in '' $ac_executable_extensions; do
8128   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8129     ac_cv_prog_ac_ct_AR="$ac_prog"
8130     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8131     break 2
8132   fi
8133 done
8134   done
8135 IFS=$as_save_IFS
8136
8137 fi
8138 fi
8139 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8140 if test -n "$ac_ct_AR"; then
8141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8142 $as_echo "$ac_ct_AR" >&6; }
8143 else
8144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8145 $as_echo "no" >&6; }
8146 fi
8147
8148
8149   test -n "$ac_ct_AR" && break
8150 done
8151
8152   if test "x$ac_ct_AR" = x; then
8153     AR="false"
8154   else
8155     case $cross_compiling:$ac_tool_warned in
8156 yes:)
8157 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8158 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8159 ac_tool_warned=yes ;;
8160 esac
8161     AR=$ac_ct_AR
8162   fi
8163 fi
8164
8165 : ${AR=ar}
8166 : ${AR_FLAGS=cru}
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8179 $as_echo_n "checking for archiver @FILE support... " >&6; }
8180 if ${lt_cv_ar_at_file+:} false; then :
8181   $as_echo_n "(cached) " >&6
8182 else
8183   lt_cv_ar_at_file=no
8184    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8185 /* end confdefs.h.  */
8186
8187 int
8188 main ()
8189 {
8190
8191   ;
8192   return 0;
8193 }
8194 _ACEOF
8195 if ac_fn_c_try_compile "$LINENO"; then :
8196   echo conftest.$ac_objext > conftest.lst
8197       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8198       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8199   (eval $lt_ar_try) 2>&5
8200   ac_status=$?
8201   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8202   test $ac_status = 0; }
8203       if test "$ac_status" -eq 0; then
8204         # Ensure the archiver fails upon bogus file names.
8205         rm -f conftest.$ac_objext libconftest.a
8206         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8207   (eval $lt_ar_try) 2>&5
8208   ac_status=$?
8209   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8210   test $ac_status = 0; }
8211         if test "$ac_status" -ne 0; then
8212           lt_cv_ar_at_file=@
8213         fi
8214       fi
8215       rm -f conftest.* libconftest.a
8216
8217 fi
8218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8219
8220 fi
8221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8222 $as_echo "$lt_cv_ar_at_file" >&6; }
8223
8224 if test "x$lt_cv_ar_at_file" = xno; then
8225   archiver_list_spec=
8226 else
8227   archiver_list_spec=$lt_cv_ar_at_file
8228 fi
8229
8230
8231
8232
8233
8234
8235
8236 if test -n "$ac_tool_prefix"; then
8237   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8238 set dummy ${ac_tool_prefix}strip; ac_word=$2
8239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8240 $as_echo_n "checking for $ac_word... " >&6; }
8241 if ${ac_cv_prog_STRIP+:} false; then :
8242   $as_echo_n "(cached) " >&6
8243 else
8244   if test -n "$STRIP"; then
8245   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8246 else
8247 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8248 for as_dir in $PATH
8249 do
8250   IFS=$as_save_IFS
8251   test -z "$as_dir" && as_dir=.
8252     for ac_exec_ext in '' $ac_executable_extensions; do
8253   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8254     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8256     break 2
8257   fi
8258 done
8259   done
8260 IFS=$as_save_IFS
8261
8262 fi
8263 fi
8264 STRIP=$ac_cv_prog_STRIP
8265 if test -n "$STRIP"; then
8266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8267 $as_echo "$STRIP" >&6; }
8268 else
8269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8270 $as_echo "no" >&6; }
8271 fi
8272
8273
8274 fi
8275 if test -z "$ac_cv_prog_STRIP"; then
8276   ac_ct_STRIP=$STRIP
8277   # Extract the first word of "strip", so it can be a program name with args.
8278 set dummy strip; ac_word=$2
8279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8280 $as_echo_n "checking for $ac_word... " >&6; }
8281 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8282   $as_echo_n "(cached) " >&6
8283 else
8284   if test -n "$ac_ct_STRIP"; then
8285   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8286 else
8287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8288 for as_dir in $PATH
8289 do
8290   IFS=$as_save_IFS
8291   test -z "$as_dir" && as_dir=.
8292     for ac_exec_ext in '' $ac_executable_extensions; do
8293   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8294     ac_cv_prog_ac_ct_STRIP="strip"
8295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8296     break 2
8297   fi
8298 done
8299   done
8300 IFS=$as_save_IFS
8301
8302 fi
8303 fi
8304 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8305 if test -n "$ac_ct_STRIP"; then
8306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8307 $as_echo "$ac_ct_STRIP" >&6; }
8308 else
8309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8310 $as_echo "no" >&6; }
8311 fi
8312
8313   if test "x$ac_ct_STRIP" = x; then
8314     STRIP=":"
8315   else
8316     case $cross_compiling:$ac_tool_warned in
8317 yes:)
8318 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8319 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8320 ac_tool_warned=yes ;;
8321 esac
8322     STRIP=$ac_ct_STRIP
8323   fi
8324 else
8325   STRIP="$ac_cv_prog_STRIP"
8326 fi
8327
8328 test -z "$STRIP" && STRIP=:
8329
8330
8331
8332
8333
8334
8335 if test -n "$ac_tool_prefix"; then
8336   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8337 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8339 $as_echo_n "checking for $ac_word... " >&6; }
8340 if ${ac_cv_prog_RANLIB+:} false; then :
8341   $as_echo_n "(cached) " >&6
8342 else
8343   if test -n "$RANLIB"; then
8344   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8345 else
8346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8347 for as_dir in $PATH
8348 do
8349   IFS=$as_save_IFS
8350   test -z "$as_dir" && as_dir=.
8351     for ac_exec_ext in '' $ac_executable_extensions; do
8352   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8353     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8354     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8355     break 2
8356   fi
8357 done
8358   done
8359 IFS=$as_save_IFS
8360
8361 fi
8362 fi
8363 RANLIB=$ac_cv_prog_RANLIB
8364 if test -n "$RANLIB"; then
8365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8366 $as_echo "$RANLIB" >&6; }
8367 else
8368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8369 $as_echo "no" >&6; }
8370 fi
8371
8372
8373 fi
8374 if test -z "$ac_cv_prog_RANLIB"; then
8375   ac_ct_RANLIB=$RANLIB
8376   # Extract the first word of "ranlib", so it can be a program name with args.
8377 set dummy ranlib; ac_word=$2
8378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8379 $as_echo_n "checking for $ac_word... " >&6; }
8380 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8381   $as_echo_n "(cached) " >&6
8382 else
8383   if test -n "$ac_ct_RANLIB"; then
8384   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8385 else
8386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8387 for as_dir in $PATH
8388 do
8389   IFS=$as_save_IFS
8390   test -z "$as_dir" && as_dir=.
8391     for ac_exec_ext in '' $ac_executable_extensions; do
8392   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8393     ac_cv_prog_ac_ct_RANLIB="ranlib"
8394     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8395     break 2
8396   fi
8397 done
8398   done
8399 IFS=$as_save_IFS
8400
8401 fi
8402 fi
8403 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8404 if test -n "$ac_ct_RANLIB"; then
8405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8406 $as_echo "$ac_ct_RANLIB" >&6; }
8407 else
8408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8409 $as_echo "no" >&6; }
8410 fi
8411
8412   if test "x$ac_ct_RANLIB" = x; then
8413     RANLIB=":"
8414   else
8415     case $cross_compiling:$ac_tool_warned in
8416 yes:)
8417 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8418 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8419 ac_tool_warned=yes ;;
8420 esac
8421     RANLIB=$ac_ct_RANLIB
8422   fi
8423 else
8424   RANLIB="$ac_cv_prog_RANLIB"
8425 fi
8426
8427 test -z "$RANLIB" && RANLIB=:
8428
8429
8430
8431
8432
8433
8434 # Determine commands to create old-style static archives.
8435 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8436 old_postinstall_cmds='chmod 644 $oldlib'
8437 old_postuninstall_cmds=
8438
8439 if test -n "$RANLIB"; then
8440   case $host_os in
8441   openbsd*)
8442     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8443     ;;
8444   *)
8445     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8446     ;;
8447   esac
8448   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8449 fi
8450
8451 case $host_os in
8452   darwin*)
8453     lock_old_archive_extraction=yes ;;
8454   *)
8455     lock_old_archive_extraction=no ;;
8456 esac
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478 for ac_prog in gawk mawk nawk awk
8479 do
8480   # Extract the first word of "$ac_prog", so it can be a program name with args.
8481 set dummy $ac_prog; ac_word=$2
8482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8483 $as_echo_n "checking for $ac_word... " >&6; }
8484 if ${ac_cv_prog_AWK+:} false; then :
8485   $as_echo_n "(cached) " >&6
8486 else
8487   if test -n "$AWK"; then
8488   ac_cv_prog_AWK="$AWK" # Let the user override the test.
8489 else
8490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8491 for as_dir in $PATH
8492 do
8493   IFS=$as_save_IFS
8494   test -z "$as_dir" && as_dir=.
8495     for ac_exec_ext in '' $ac_executable_extensions; do
8496   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8497     ac_cv_prog_AWK="$ac_prog"
8498     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8499     break 2
8500   fi
8501 done
8502   done
8503 IFS=$as_save_IFS
8504
8505 fi
8506 fi
8507 AWK=$ac_cv_prog_AWK
8508 if test -n "$AWK"; then
8509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8510 $as_echo "$AWK" >&6; }
8511 else
8512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8513 $as_echo "no" >&6; }
8514 fi
8515
8516
8517   test -n "$AWK" && break
8518 done
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538 # If no C compiler was specified, use CC.
8539 LTCC=${LTCC-"$CC"}
8540
8541 # If no C compiler flags were specified, use CFLAGS.
8542 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8543
8544 # Allow CC to be a program name with arguments.
8545 compiler=$CC
8546
8547
8548 # Check for command to grab the raw symbol name followed by C symbol from nm.
8549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8550 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8551 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8552   $as_echo_n "(cached) " >&6
8553 else
8554
8555 # These are sane defaults that work on at least a few old systems.
8556 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8557
8558 # Character class describing NM global symbol codes.
8559 symcode='[BCDEGRST]'
8560
8561 # Regexp to match symbols that can be accessed directly from C.
8562 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8563
8564 # Define system-specific variables.
8565 case $host_os in
8566 aix*)
8567   symcode='[BCDT]'
8568   ;;
8569 cygwin* | mingw* | pw32* | cegcc*)
8570   symcode='[ABCDGISTW]'
8571   ;;
8572 hpux*)
8573   if test "$host_cpu" = ia64; then
8574     symcode='[ABCDEGRST]'
8575   fi
8576   ;;
8577 irix* | nonstopux*)
8578   symcode='[BCDEGRST]'
8579   ;;
8580 osf*)
8581   symcode='[BCDEGQRST]'
8582   ;;
8583 solaris*)
8584   symcode='[BDRT]'
8585   ;;
8586 sco3.2v5*)
8587   symcode='[DT]'
8588   ;;
8589 sysv4.2uw2*)
8590   symcode='[DT]'
8591   ;;
8592 sysv5* | sco5v6* | unixware* | OpenUNIX*)
8593   symcode='[ABDT]'
8594   ;;
8595 sysv4)
8596   symcode='[DFNSTU]'
8597   ;;
8598 esac
8599
8600 # If we're using GNU nm, then use its standard symbol codes.
8601 case `$NM -V 2>&1` in
8602 *GNU* | *'with BFD'*)
8603   symcode='[ABCDGIRSTW]' ;;
8604 esac
8605
8606 # Transform an extracted symbol line into a proper C declaration.
8607 # Some systems (esp. on ia64) link data and code symbols differently,
8608 # so use this general approach.
8609 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
8610
8611 # Transform an extracted symbol line into symbol name and symbol address
8612 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
8613 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
8614
8615 # Handle CRLF in mingw tool chain
8616 opt_cr=
8617 case $build_os in
8618 mingw*)
8619   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8620   ;;
8621 esac
8622
8623 # Try without a prefix underscore, then with it.
8624 for ac_symprfx in "" "_"; do
8625
8626   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8627   symxfrm="\\1 $ac_symprfx\\2 \\2"
8628
8629   # Write the raw and C identifiers.
8630   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8631     # Fake it for dumpbin and say T for any non-static function
8632     # and D for any global variable.
8633     # Also find C++ and __fastcall symbols from MSVC++,
8634     # which start with @ or ?.
8635     lt_cv_sys_global_symbol_pipe="$AWK '"\
8636 "     {last_section=section; section=\$ 3};"\
8637 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8638 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8639 "     \$ 0!~/External *\|/{next};"\
8640 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8641 "     {if(hide[section]) next};"\
8642 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
8643 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
8644 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
8645 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
8646 "     ' prfx=^$ac_symprfx"
8647   else
8648     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8649   fi
8650   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8651
8652   # Check to see that the pipe works correctly.
8653   pipe_works=no
8654
8655   rm -f conftest*
8656   cat > conftest.$ac_ext <<_LT_EOF
8657 #ifdef __cplusplus
8658 extern "C" {
8659 #endif
8660 char nm_test_var;
8661 void nm_test_func(void);
8662 void nm_test_func(void){}
8663 #ifdef __cplusplus
8664 }
8665 #endif
8666 int main(){nm_test_var='a';nm_test_func();return(0);}
8667 _LT_EOF
8668
8669   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8670   (eval $ac_compile) 2>&5
8671   ac_status=$?
8672   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8673   test $ac_status = 0; }; then
8674     # Now try to grab the symbols.
8675     nlist=conftest.nm
8676     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
8677   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
8678   ac_status=$?
8679   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8680   test $ac_status = 0; } && test -s "$nlist"; then
8681       # Try sorting and uniquifying the output.
8682       if sort "$nlist" | uniq > "$nlist"T; then
8683         mv -f "$nlist"T "$nlist"
8684       else
8685         rm -f "$nlist"T
8686       fi
8687
8688       # Make sure that we snagged all the symbols we need.
8689       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
8690         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
8691           cat <<_LT_EOF > conftest.$ac_ext
8692 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
8693 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
8694 /* DATA imports from DLLs on WIN32 con't be const, because runtime
8695    relocations are performed -- see ld's documentation on pseudo-relocs.  */
8696 # define LT_DLSYM_CONST
8697 #elif defined(__osf__)
8698 /* This system does not cope well with relocations in const data.  */
8699 # define LT_DLSYM_CONST
8700 #else
8701 # define LT_DLSYM_CONST const
8702 #endif
8703
8704 #ifdef __cplusplus
8705 extern "C" {
8706 #endif
8707
8708 _LT_EOF
8709           # Now generate the symbol file.
8710           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
8711
8712           cat <<_LT_EOF >> conftest.$ac_ext
8713
8714 /* The mapping between symbol names and symbols.  */
8715 LT_DLSYM_CONST struct {
8716   const char *name;
8717   void       *address;
8718 }
8719 lt__PROGRAM__LTX_preloaded_symbols[] =
8720 {
8721   { "@PROGRAM@", (void *) 0 },
8722 _LT_EOF
8723           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
8724           cat <<\_LT_EOF >> conftest.$ac_ext
8725   {0, (void *) 0}
8726 };
8727
8728 /* This works around a problem in FreeBSD linker */
8729 #ifdef FREEBSD_WORKAROUND
8730 static const void *lt_preloaded_setup() {
8731   return lt__PROGRAM__LTX_preloaded_symbols;
8732 }
8733 #endif
8734
8735 #ifdef __cplusplus
8736 }
8737 #endif
8738 _LT_EOF
8739           # Now try linking the two files.
8740           mv conftest.$ac_objext conftstm.$ac_objext
8741           lt_globsym_save_LIBS=$LIBS
8742           lt_globsym_save_CFLAGS=$CFLAGS
8743           LIBS="conftstm.$ac_objext"
8744           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
8745           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8746   (eval $ac_link) 2>&5
8747   ac_status=$?
8748   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8749   test $ac_status = 0; } && test -s conftest${ac_exeext}; then
8750             pipe_works=yes
8751           fi
8752           LIBS=$lt_globsym_save_LIBS
8753           CFLAGS=$lt_globsym_save_CFLAGS
8754         else
8755           echo "cannot find nm_test_func in $nlist" >&5
8756         fi
8757       else
8758         echo "cannot find nm_test_var in $nlist" >&5
8759       fi
8760     else
8761       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
8762     fi
8763   else
8764     echo "$progname: failed program was:" >&5
8765     cat conftest.$ac_ext >&5
8766   fi
8767   rm -rf conftest* conftst*
8768
8769   # Do not use the global_symbol_pipe unless it works.
8770   if test "$pipe_works" = yes; then
8771     break
8772   else
8773     lt_cv_sys_global_symbol_pipe=
8774   fi
8775 done
8776
8777 fi
8778
8779 if test -z "$lt_cv_sys_global_symbol_pipe"; then
8780   lt_cv_sys_global_symbol_to_cdecl=
8781 fi
8782 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
8783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
8784 $as_echo "failed" >&6; }
8785 else
8786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
8787 $as_echo "ok" >&6; }
8788 fi
8789
8790 # Response file support.
8791 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8792   nm_file_list_spec='@'
8793 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
8794   nm_file_list_spec='@'
8795 fi
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
8824 $as_echo_n "checking for sysroot... " >&6; }
8825
8826 # Check whether --with-sysroot was given.
8827 if test "${with_sysroot+set}" = set; then :
8828   withval=$with_sysroot;
8829 else
8830   with_sysroot=no
8831 fi
8832
8833
8834 lt_sysroot=
8835 case ${with_sysroot} in #(
8836  yes)
8837    if test "$GCC" = yes; then
8838      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
8839    fi
8840    ;; #(
8841  /*)
8842    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
8843    ;; #(
8844  no|'')
8845    ;; #(
8846  *)
8847    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
8848 $as_echo "${with_sysroot}" >&6; }
8849    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
8850    ;;
8851 esac
8852
8853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
8854 $as_echo "${lt_sysroot:-no}" >&6; }
8855
8856
8857
8858
8859
8860 # Check whether --enable-libtool-lock was given.
8861 if test "${enable_libtool_lock+set}" = set; then :
8862   enableval=$enable_libtool_lock;
8863 fi
8864
8865 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
8866
8867 # Some flags need to be propagated to the compiler or linker for good
8868 # libtool support.
8869 case $host in
8870 ia64-*-hpux*)
8871   # Find out which ABI we are using.
8872   echo 'int i;' > conftest.$ac_ext
8873   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8874   (eval $ac_compile) 2>&5
8875   ac_status=$?
8876   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8877   test $ac_status = 0; }; then
8878     case `/usr/bin/file conftest.$ac_objext` in
8879       *ELF-32*)
8880         HPUX_IA64_MODE="32"
8881         ;;
8882       *ELF-64*)
8883         HPUX_IA64_MODE="64"
8884         ;;
8885     esac
8886   fi
8887   rm -rf conftest*
8888   ;;
8889 *-*-irix6*)
8890   # Find out which ABI we are using.
8891   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
8892   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8893   (eval $ac_compile) 2>&5
8894   ac_status=$?
8895   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8896   test $ac_status = 0; }; then
8897     if test "$lt_cv_prog_gnu_ld" = yes; then
8898       case `/usr/bin/file conftest.$ac_objext` in
8899         *32-bit*)
8900           LD="${LD-ld} -melf32bsmip"
8901           ;;
8902         *N32*)
8903           LD="${LD-ld} -melf32bmipn32"
8904           ;;
8905         *64-bit*)
8906           LD="${LD-ld} -melf64bmip"
8907         ;;
8908       esac
8909     else
8910       case `/usr/bin/file conftest.$ac_objext` in
8911         *32-bit*)
8912           LD="${LD-ld} -32"
8913           ;;
8914         *N32*)
8915           LD="${LD-ld} -n32"
8916           ;;
8917         *64-bit*)
8918           LD="${LD-ld} -64"
8919           ;;
8920       esac
8921     fi
8922   fi
8923   rm -rf conftest*
8924   ;;
8925
8926 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
8927 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
8928   # Find out which ABI we are using.
8929   echo 'int i;' > conftest.$ac_ext
8930   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8931   (eval $ac_compile) 2>&5
8932   ac_status=$?
8933   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8934   test $ac_status = 0; }; then
8935     case `/usr/bin/file conftest.o` in
8936       *32-bit*)
8937         case $host in
8938           x86_64-*kfreebsd*-gnu)
8939             LD="${LD-ld} -m elf_i386_fbsd"
8940             ;;
8941           x86_64-*linux*)
8942             LD="${LD-ld} -m elf_i386"
8943             ;;
8944           powerpc64le-*linux*)
8945             LD="${LD-ld} -m elf32lppclinux"
8946             ;;
8947           powerpc64-*linux*)
8948             LD="${LD-ld} -m elf32ppclinux"
8949             ;;
8950           s390x-*linux*)
8951             LD="${LD-ld} -m elf_s390"
8952             ;;
8953           sparc64-*linux*)
8954             LD="${LD-ld} -m elf32_sparc"
8955             ;;
8956         esac
8957         ;;
8958       *64-bit*)
8959         case $host in
8960           x86_64-*kfreebsd*-gnu)
8961             LD="${LD-ld} -m elf_x86_64_fbsd"
8962             ;;
8963           x86_64-*linux*)
8964             LD="${LD-ld} -m elf_x86_64"
8965             ;;
8966           powerpcle-*linux*)
8967             LD="${LD-ld} -m elf64lppc"
8968             ;;
8969           powerpc-*linux*)
8970             LD="${LD-ld} -m elf64ppc"
8971             ;;
8972           s390*-*linux*|s390*-*tpf*)
8973             LD="${LD-ld} -m elf64_s390"
8974             ;;
8975           sparc*-*linux*)
8976             LD="${LD-ld} -m elf64_sparc"
8977             ;;
8978         esac
8979         ;;
8980     esac
8981   fi
8982   rm -rf conftest*
8983   ;;
8984
8985 *-*-sco3.2v5*)
8986   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
8987   SAVE_CFLAGS="$CFLAGS"
8988   CFLAGS="$CFLAGS -belf"
8989   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
8990 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
8991 if ${lt_cv_cc_needs_belf+:} false; then :
8992   $as_echo_n "(cached) " >&6
8993 else
8994   ac_ext=c
8995 ac_cpp='$CPP $CPPFLAGS'
8996 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8997 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8998 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8999
9000      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9001 /* end confdefs.h.  */
9002
9003 int
9004 main ()
9005 {
9006
9007   ;
9008   return 0;
9009 }
9010 _ACEOF
9011 if ac_fn_c_try_link "$LINENO"; then :
9012   lt_cv_cc_needs_belf=yes
9013 else
9014   lt_cv_cc_needs_belf=no
9015 fi
9016 rm -f core conftest.err conftest.$ac_objext \
9017     conftest$ac_exeext conftest.$ac_ext
9018      ac_ext=c
9019 ac_cpp='$CPP $CPPFLAGS'
9020 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9021 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9022 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9023
9024 fi
9025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9026 $as_echo "$lt_cv_cc_needs_belf" >&6; }
9027   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
9028     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9029     CFLAGS="$SAVE_CFLAGS"
9030   fi
9031   ;;
9032 *-*solaris*)
9033   # Find out which ABI we are using.
9034   echo 'int i;' > conftest.$ac_ext
9035   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9036   (eval $ac_compile) 2>&5
9037   ac_status=$?
9038   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9039   test $ac_status = 0; }; then
9040     case `/usr/bin/file conftest.o` in
9041     *64-bit*)
9042       case $lt_cv_prog_gnu_ld in
9043       yes*)
9044         case $host in
9045         i?86-*-solaris*)
9046           LD="${LD-ld} -m elf_x86_64"
9047           ;;
9048         sparc*-*-solaris*)
9049           LD="${LD-ld} -m elf64_sparc"
9050           ;;
9051         esac
9052         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9053         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9054           LD="${LD-ld}_sol2"
9055         fi
9056         ;;
9057       *)
9058         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9059           LD="${LD-ld} -64"
9060         fi
9061         ;;
9062       esac
9063       ;;
9064     esac
9065   fi
9066   rm -rf conftest*
9067   ;;
9068 esac
9069
9070 need_locks="$enable_libtool_lock"
9071
9072 if test -n "$ac_tool_prefix"; then
9073   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9074 set dummy ${ac_tool_prefix}mt; ac_word=$2
9075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9076 $as_echo_n "checking for $ac_word... " >&6; }
9077 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9078   $as_echo_n "(cached) " >&6
9079 else
9080   if test -n "$MANIFEST_TOOL"; then
9081   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9082 else
9083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9084 for as_dir in $PATH
9085 do
9086   IFS=$as_save_IFS
9087   test -z "$as_dir" && as_dir=.
9088     for ac_exec_ext in '' $ac_executable_extensions; do
9089   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9090     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9091     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9092     break 2
9093   fi
9094 done
9095   done
9096 IFS=$as_save_IFS
9097
9098 fi
9099 fi
9100 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9101 if test -n "$MANIFEST_TOOL"; then
9102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9103 $as_echo "$MANIFEST_TOOL" >&6; }
9104 else
9105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9106 $as_echo "no" >&6; }
9107 fi
9108
9109
9110 fi
9111 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9112   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9113   # Extract the first word of "mt", so it can be a program name with args.
9114 set dummy mt; ac_word=$2
9115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9116 $as_echo_n "checking for $ac_word... " >&6; }
9117 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9118   $as_echo_n "(cached) " >&6
9119 else
9120   if test -n "$ac_ct_MANIFEST_TOOL"; then
9121   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9122 else
9123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9124 for as_dir in $PATH
9125 do
9126   IFS=$as_save_IFS
9127   test -z "$as_dir" && as_dir=.
9128     for ac_exec_ext in '' $ac_executable_extensions; do
9129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9130     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9132     break 2
9133   fi
9134 done
9135   done
9136 IFS=$as_save_IFS
9137
9138 fi
9139 fi
9140 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9141 if test -n "$ac_ct_MANIFEST_TOOL"; then
9142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9143 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9144 else
9145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9146 $as_echo "no" >&6; }
9147 fi
9148
9149   if test "x$ac_ct_MANIFEST_TOOL" = x; then
9150     MANIFEST_TOOL=":"
9151   else
9152     case $cross_compiling:$ac_tool_warned in
9153 yes:)
9154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9155 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9156 ac_tool_warned=yes ;;
9157 esac
9158     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9159   fi
9160 else
9161   MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9162 fi
9163
9164 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9166 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9167 if ${lt_cv_path_mainfest_tool+:} false; then :
9168   $as_echo_n "(cached) " >&6
9169 else
9170   lt_cv_path_mainfest_tool=no
9171   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9172   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9173   cat conftest.err >&5
9174   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9175     lt_cv_path_mainfest_tool=yes
9176   fi
9177   rm -f conftest*
9178 fi
9179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9180 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
9181 if test "x$lt_cv_path_mainfest_tool" != xyes; then
9182   MANIFEST_TOOL=:
9183 fi
9184
9185
9186
9187
9188
9189
9190   case $host_os in
9191     rhapsody* | darwin*)
9192     if test -n "$ac_tool_prefix"; then
9193   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9194 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9196 $as_echo_n "checking for $ac_word... " >&6; }
9197 if ${ac_cv_prog_DSYMUTIL+:} false; then :
9198   $as_echo_n "(cached) " >&6
9199 else
9200   if test -n "$DSYMUTIL"; then
9201   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9202 else
9203 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9204 for as_dir in $PATH
9205 do
9206   IFS=$as_save_IFS
9207   test -z "$as_dir" && as_dir=.
9208     for ac_exec_ext in '' $ac_executable_extensions; do
9209   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9210     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9211     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9212     break 2
9213   fi
9214 done
9215   done
9216 IFS=$as_save_IFS
9217
9218 fi
9219 fi
9220 DSYMUTIL=$ac_cv_prog_DSYMUTIL
9221 if test -n "$DSYMUTIL"; then
9222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9223 $as_echo "$DSYMUTIL" >&6; }
9224 else
9225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9226 $as_echo "no" >&6; }
9227 fi
9228
9229
9230 fi
9231 if test -z "$ac_cv_prog_DSYMUTIL"; then
9232   ac_ct_DSYMUTIL=$DSYMUTIL
9233   # Extract the first word of "dsymutil", so it can be a program name with args.
9234 set dummy dsymutil; ac_word=$2
9235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9236 $as_echo_n "checking for $ac_word... " >&6; }
9237 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9238   $as_echo_n "(cached) " >&6
9239 else
9240   if test -n "$ac_ct_DSYMUTIL"; then
9241   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9242 else
9243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9244 for as_dir in $PATH
9245 do
9246   IFS=$as_save_IFS
9247   test -z "$as_dir" && as_dir=.
9248     for ac_exec_ext in '' $ac_executable_extensions; do
9249   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9250     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9251     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9252     break 2
9253   fi
9254 done
9255   done
9256 IFS=$as_save_IFS
9257
9258 fi
9259 fi
9260 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9261 if test -n "$ac_ct_DSYMUTIL"; then
9262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9263 $as_echo "$ac_ct_DSYMUTIL" >&6; }
9264 else
9265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9266 $as_echo "no" >&6; }
9267 fi
9268
9269   if test "x$ac_ct_DSYMUTIL" = x; then
9270     DSYMUTIL=":"
9271   else
9272     case $cross_compiling:$ac_tool_warned in
9273 yes:)
9274 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9275 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9276 ac_tool_warned=yes ;;
9277 esac
9278     DSYMUTIL=$ac_ct_DSYMUTIL
9279   fi
9280 else
9281   DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9282 fi
9283
9284     if test -n "$ac_tool_prefix"; then
9285   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9286 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9288 $as_echo_n "checking for $ac_word... " >&6; }
9289 if ${ac_cv_prog_NMEDIT+:} false; then :
9290   $as_echo_n "(cached) " >&6
9291 else
9292   if test -n "$NMEDIT"; then
9293   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9294 else
9295 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9296 for as_dir in $PATH
9297 do
9298   IFS=$as_save_IFS
9299   test -z "$as_dir" && as_dir=.
9300     for ac_exec_ext in '' $ac_executable_extensions; do
9301   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9302     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9303     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9304     break 2
9305   fi
9306 done
9307   done
9308 IFS=$as_save_IFS
9309
9310 fi
9311 fi
9312 NMEDIT=$ac_cv_prog_NMEDIT
9313 if test -n "$NMEDIT"; then
9314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9315 $as_echo "$NMEDIT" >&6; }
9316 else
9317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9318 $as_echo "no" >&6; }
9319 fi
9320
9321
9322 fi
9323 if test -z "$ac_cv_prog_NMEDIT"; then
9324   ac_ct_NMEDIT=$NMEDIT
9325   # Extract the first word of "nmedit", so it can be a program name with args.
9326 set dummy nmedit; ac_word=$2
9327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9328 $as_echo_n "checking for $ac_word... " >&6; }
9329 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9330   $as_echo_n "(cached) " >&6
9331 else
9332   if test -n "$ac_ct_NMEDIT"; then
9333   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9334 else
9335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9336 for as_dir in $PATH
9337 do
9338   IFS=$as_save_IFS
9339   test -z "$as_dir" && as_dir=.
9340     for ac_exec_ext in '' $ac_executable_extensions; do
9341   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9342     ac_cv_prog_ac_ct_NMEDIT="nmedit"
9343     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9344     break 2
9345   fi
9346 done
9347   done
9348 IFS=$as_save_IFS
9349
9350 fi
9351 fi
9352 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9353 if test -n "$ac_ct_NMEDIT"; then
9354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9355 $as_echo "$ac_ct_NMEDIT" >&6; }
9356 else
9357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9358 $as_echo "no" >&6; }
9359 fi
9360
9361   if test "x$ac_ct_NMEDIT" = x; then
9362     NMEDIT=":"
9363   else
9364     case $cross_compiling:$ac_tool_warned in
9365 yes:)
9366 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9367 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9368 ac_tool_warned=yes ;;
9369 esac
9370     NMEDIT=$ac_ct_NMEDIT
9371   fi
9372 else
9373   NMEDIT="$ac_cv_prog_NMEDIT"
9374 fi
9375
9376     if test -n "$ac_tool_prefix"; then
9377   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9378 set dummy ${ac_tool_prefix}lipo; ac_word=$2
9379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9380 $as_echo_n "checking for $ac_word... " >&6; }
9381 if ${ac_cv_prog_LIPO+:} false; then :
9382   $as_echo_n "(cached) " >&6
9383 else
9384   if test -n "$LIPO"; then
9385   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9386 else
9387 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9388 for as_dir in $PATH
9389 do
9390   IFS=$as_save_IFS
9391   test -z "$as_dir" && as_dir=.
9392     for ac_exec_ext in '' $ac_executable_extensions; do
9393   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9394     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9395     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9396     break 2
9397   fi
9398 done
9399   done
9400 IFS=$as_save_IFS
9401
9402 fi
9403 fi
9404 LIPO=$ac_cv_prog_LIPO
9405 if test -n "$LIPO"; then
9406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9407 $as_echo "$LIPO" >&6; }
9408 else
9409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9410 $as_echo "no" >&6; }
9411 fi
9412
9413
9414 fi
9415 if test -z "$ac_cv_prog_LIPO"; then
9416   ac_ct_LIPO=$LIPO
9417   # Extract the first word of "lipo", so it can be a program name with args.
9418 set dummy lipo; ac_word=$2
9419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9420 $as_echo_n "checking for $ac_word... " >&6; }
9421 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9422   $as_echo_n "(cached) " >&6
9423 else
9424   if test -n "$ac_ct_LIPO"; then
9425   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9426 else
9427 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9428 for as_dir in $PATH
9429 do
9430   IFS=$as_save_IFS
9431   test -z "$as_dir" && as_dir=.
9432     for ac_exec_ext in '' $ac_executable_extensions; do
9433   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9434     ac_cv_prog_ac_ct_LIPO="lipo"
9435     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9436     break 2
9437   fi
9438 done
9439   done
9440 IFS=$as_save_IFS
9441
9442 fi
9443 fi
9444 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9445 if test -n "$ac_ct_LIPO"; then
9446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9447 $as_echo "$ac_ct_LIPO" >&6; }
9448 else
9449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9450 $as_echo "no" >&6; }
9451 fi
9452
9453   if test "x$ac_ct_LIPO" = x; then
9454     LIPO=":"
9455   else
9456     case $cross_compiling:$ac_tool_warned in
9457 yes:)
9458 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9459 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9460 ac_tool_warned=yes ;;
9461 esac
9462     LIPO=$ac_ct_LIPO
9463   fi
9464 else
9465   LIPO="$ac_cv_prog_LIPO"
9466 fi
9467
9468     if test -n "$ac_tool_prefix"; then
9469   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9470 set dummy ${ac_tool_prefix}otool; ac_word=$2
9471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9472 $as_echo_n "checking for $ac_word... " >&6; }
9473 if ${ac_cv_prog_OTOOL+:} false; then :
9474   $as_echo_n "(cached) " >&6
9475 else
9476   if test -n "$OTOOL"; then
9477   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9478 else
9479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9480 for as_dir in $PATH
9481 do
9482   IFS=$as_save_IFS
9483   test -z "$as_dir" && as_dir=.
9484     for ac_exec_ext in '' $ac_executable_extensions; do
9485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9486     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9487     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9488     break 2
9489   fi
9490 done
9491   done
9492 IFS=$as_save_IFS
9493
9494 fi
9495 fi
9496 OTOOL=$ac_cv_prog_OTOOL
9497 if test -n "$OTOOL"; then
9498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9499 $as_echo "$OTOOL" >&6; }
9500 else
9501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9502 $as_echo "no" >&6; }
9503 fi
9504
9505
9506 fi
9507 if test -z "$ac_cv_prog_OTOOL"; then
9508   ac_ct_OTOOL=$OTOOL
9509   # Extract the first word of "otool", so it can be a program name with args.
9510 set dummy otool; ac_word=$2
9511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9512 $as_echo_n "checking for $ac_word... " >&6; }
9513 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9514   $as_echo_n "(cached) " >&6
9515 else
9516   if test -n "$ac_ct_OTOOL"; then
9517   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
9518 else
9519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9520 for as_dir in $PATH
9521 do
9522   IFS=$as_save_IFS
9523   test -z "$as_dir" && as_dir=.
9524     for ac_exec_ext in '' $ac_executable_extensions; do
9525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9526     ac_cv_prog_ac_ct_OTOOL="otool"
9527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9528     break 2
9529   fi
9530 done
9531   done
9532 IFS=$as_save_IFS
9533
9534 fi
9535 fi
9536 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
9537 if test -n "$ac_ct_OTOOL"; then
9538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
9539 $as_echo "$ac_ct_OTOOL" >&6; }
9540 else
9541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9542 $as_echo "no" >&6; }
9543 fi
9544
9545   if test "x$ac_ct_OTOOL" = x; then
9546     OTOOL=":"
9547   else
9548     case $cross_compiling:$ac_tool_warned in
9549 yes:)
9550 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9551 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9552 ac_tool_warned=yes ;;
9553 esac
9554     OTOOL=$ac_ct_OTOOL
9555   fi
9556 else
9557   OTOOL="$ac_cv_prog_OTOOL"
9558 fi
9559
9560     if test -n "$ac_tool_prefix"; then
9561   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
9562 set dummy ${ac_tool_prefix}otool64; ac_word=$2
9563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9564 $as_echo_n "checking for $ac_word... " >&6; }
9565 if ${ac_cv_prog_OTOOL64+:} false; then :
9566   $as_echo_n "(cached) " >&6
9567 else
9568   if test -n "$OTOOL64"; then
9569   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
9570 else
9571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9572 for as_dir in $PATH
9573 do
9574   IFS=$as_save_IFS
9575   test -z "$as_dir" && as_dir=.
9576     for ac_exec_ext in '' $ac_executable_extensions; do
9577   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9578     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
9579     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9580     break 2
9581   fi
9582 done
9583   done
9584 IFS=$as_save_IFS
9585
9586 fi
9587 fi
9588 OTOOL64=$ac_cv_prog_OTOOL64
9589 if test -n "$OTOOL64"; then
9590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
9591 $as_echo "$OTOOL64" >&6; }
9592 else
9593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9594 $as_echo "no" >&6; }
9595 fi
9596
9597
9598 fi
9599 if test -z "$ac_cv_prog_OTOOL64"; then
9600   ac_ct_OTOOL64=$OTOOL64
9601   # Extract the first word of "otool64", so it can be a program name with args.
9602 set dummy otool64; ac_word=$2
9603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9604 $as_echo_n "checking for $ac_word... " >&6; }
9605 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
9606   $as_echo_n "(cached) " >&6
9607 else
9608   if test -n "$ac_ct_OTOOL64"; then
9609   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
9610 else
9611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9612 for as_dir in $PATH
9613 do
9614   IFS=$as_save_IFS
9615   test -z "$as_dir" && as_dir=.
9616     for ac_exec_ext in '' $ac_executable_extensions; do
9617   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9618     ac_cv_prog_ac_ct_OTOOL64="otool64"
9619     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9620     break 2
9621   fi
9622 done
9623   done
9624 IFS=$as_save_IFS
9625
9626 fi
9627 fi
9628 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
9629 if test -n "$ac_ct_OTOOL64"; then
9630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
9631 $as_echo "$ac_ct_OTOOL64" >&6; }
9632 else
9633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9634 $as_echo "no" >&6; }
9635 fi
9636
9637   if test "x$ac_ct_OTOOL64" = x; then
9638     OTOOL64=":"
9639   else
9640     case $cross_compiling:$ac_tool_warned in
9641 yes:)
9642 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9643 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9644 ac_tool_warned=yes ;;
9645 esac
9646     OTOOL64=$ac_ct_OTOOL64
9647   fi
9648 else
9649   OTOOL64="$ac_cv_prog_OTOOL64"
9650 fi
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
9679 $as_echo_n "checking for -single_module linker flag... " >&6; }
9680 if ${lt_cv_apple_cc_single_mod+:} false; then :
9681   $as_echo_n "(cached) " >&6
9682 else
9683   lt_cv_apple_cc_single_mod=no
9684       if test -z "${LT_MULTI_MODULE}"; then
9685         # By default we will add the -single_module flag. You can override
9686         # by either setting the environment variable LT_MULTI_MODULE
9687         # non-empty at configure time, or by adding -multi_module to the
9688         # link flags.
9689         rm -rf libconftest.dylib*
9690         echo "int foo(void){return 1;}" > conftest.c
9691         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9692 -dynamiclib -Wl,-single_module conftest.c" >&5
9693         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9694           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
9695         _lt_result=$?
9696         # If there is a non-empty error log, and "single_module"
9697         # appears in it, assume the flag caused a linker warning
9698         if test -s conftest.err && $GREP single_module conftest.err; then
9699           cat conftest.err >&5
9700         # Otherwise, if the output was created with a 0 exit code from
9701         # the compiler, it worked.
9702         elif test -f libconftest.dylib && test $_lt_result -eq 0; then
9703           lt_cv_apple_cc_single_mod=yes
9704         else
9705           cat conftest.err >&5
9706         fi
9707         rm -rf libconftest.dylib*
9708         rm -f conftest.*
9709       fi
9710 fi
9711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
9712 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
9713
9714     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
9715 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
9716 if ${lt_cv_ld_exported_symbols_list+:} false; then :
9717   $as_echo_n "(cached) " >&6
9718 else
9719   lt_cv_ld_exported_symbols_list=no
9720       save_LDFLAGS=$LDFLAGS
9721       echo "_main" > conftest.sym
9722       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
9723       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9724 /* end confdefs.h.  */
9725
9726 int
9727 main ()
9728 {
9729
9730   ;
9731   return 0;
9732 }
9733 _ACEOF
9734 if ac_fn_c_try_link "$LINENO"; then :
9735   lt_cv_ld_exported_symbols_list=yes
9736 else
9737   lt_cv_ld_exported_symbols_list=no
9738 fi
9739 rm -f core conftest.err conftest.$ac_objext \
9740     conftest$ac_exeext conftest.$ac_ext
9741         LDFLAGS="$save_LDFLAGS"
9742
9743 fi
9744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
9745 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
9746
9747     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
9748 $as_echo_n "checking for -force_load linker flag... " >&6; }
9749 if ${lt_cv_ld_force_load+:} false; then :
9750   $as_echo_n "(cached) " >&6
9751 else
9752   lt_cv_ld_force_load=no
9753       cat > conftest.c << _LT_EOF
9754 int forced_loaded() { return 2;}
9755 _LT_EOF
9756       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
9757       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
9758       echo "$AR cru libconftest.a conftest.o" >&5
9759       $AR cru libconftest.a conftest.o 2>&5
9760       echo "$RANLIB libconftest.a" >&5
9761       $RANLIB libconftest.a 2>&5
9762       cat > conftest.c << _LT_EOF
9763 int main() { return 0;}
9764 _LT_EOF
9765       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
9766       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
9767       _lt_result=$?
9768       if test -s conftest.err && $GREP force_load conftest.err; then
9769         cat conftest.err >&5
9770       elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
9771         lt_cv_ld_force_load=yes
9772       else
9773         cat conftest.err >&5
9774       fi
9775         rm -f conftest.err libconftest.a conftest conftest.c
9776         rm -rf conftest.dSYM
9777
9778 fi
9779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
9780 $as_echo "$lt_cv_ld_force_load" >&6; }
9781     case $host_os in
9782     rhapsody* | darwin1.[012])
9783       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
9784     darwin1.*)
9785       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
9786     darwin*) # darwin 5.x on
9787       # if running on 10.5 or later, the deployment target defaults
9788       # to the OS version, if on x86, and 10.4, the deployment
9789       # target defaults to 10.4. Don't you love it?
9790       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
9791         10.0,*86*-darwin8*|10.0,*-darwin[91]*)
9792           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
9793         10.[012]*)
9794           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
9795         10.*)
9796           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
9797       esac
9798     ;;
9799   esac
9800     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
9801       _lt_dar_single_mod='$single_module'
9802     fi
9803     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
9804       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
9805     else
9806       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
9807     fi
9808     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
9809       _lt_dsymutil='~$DSYMUTIL $lib || :'
9810     else
9811       _lt_dsymutil=
9812     fi
9813     ;;
9814   esac
9815
9816 for ac_header in dlfcn.h
9817 do :
9818   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
9819 "
9820 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
9821   cat >>confdefs.h <<_ACEOF
9822 #define HAVE_DLFCN_H 1
9823 _ACEOF
9824
9825 fi
9826
9827 done
9828
9829
9830
9831
9832
9833
9834
9835 # Set options
9836
9837
9838
9839         enable_dlopen=no
9840
9841
9842   enable_win32_dll=no
9843
9844
9845             # Check whether --enable-shared was given.
9846 if test "${enable_shared+set}" = set; then :
9847   enableval=$enable_shared; p=${PACKAGE-default}
9848     case $enableval in
9849     yes) enable_shared=yes ;;
9850     no) enable_shared=no ;;
9851     *)
9852       enable_shared=no
9853       # Look at the argument we got.  We use all the common list separators.
9854       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9855       for pkg in $enableval; do
9856         IFS="$lt_save_ifs"
9857         if test "X$pkg" = "X$p"; then
9858           enable_shared=yes
9859         fi
9860       done
9861       IFS="$lt_save_ifs"
9862       ;;
9863     esac
9864 else
9865   enable_shared=yes
9866 fi
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876   # Check whether --enable-static was given.
9877 if test "${enable_static+set}" = set; then :
9878   enableval=$enable_static; p=${PACKAGE-default}
9879     case $enableval in
9880     yes) enable_static=yes ;;
9881     no) enable_static=no ;;
9882     *)
9883      enable_static=no
9884       # Look at the argument we got.  We use all the common list separators.
9885       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9886       for pkg in $enableval; do
9887         IFS="$lt_save_ifs"
9888         if test "X$pkg" = "X$p"; then
9889           enable_static=yes
9890         fi
9891       done
9892       IFS="$lt_save_ifs"
9893       ;;
9894     esac
9895 else
9896   enable_static=yes
9897 fi
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908 # Check whether --with-pic was given.
9909 if test "${with_pic+set}" = set; then :
9910   withval=$with_pic; lt_p=${PACKAGE-default}
9911     case $withval in
9912     yes|no) pic_mode=$withval ;;
9913     *)
9914       pic_mode=default
9915       # Look at the argument we got.  We use all the common list separators.
9916       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9917       for lt_pkg in $withval; do
9918         IFS="$lt_save_ifs"
9919         if test "X$lt_pkg" = "X$lt_p"; then
9920           pic_mode=yes
9921         fi
9922       done
9923       IFS="$lt_save_ifs"
9924       ;;
9925     esac
9926 else
9927   pic_mode=default
9928 fi
9929
9930
9931 test -z "$pic_mode" && pic_mode=default
9932
9933
9934
9935
9936
9937
9938
9939   # Check whether --enable-fast-install was given.
9940 if test "${enable_fast_install+set}" = set; then :
9941   enableval=$enable_fast_install; p=${PACKAGE-default}
9942     case $enableval in
9943     yes) enable_fast_install=yes ;;
9944     no) enable_fast_install=no ;;
9945     *)
9946       enable_fast_install=no
9947       # Look at the argument we got.  We use all the common list separators.
9948       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9949       for pkg in $enableval; do
9950         IFS="$lt_save_ifs"
9951         if test "X$pkg" = "X$p"; then
9952           enable_fast_install=yes
9953         fi
9954       done
9955       IFS="$lt_save_ifs"
9956       ;;
9957     esac
9958 else
9959   enable_fast_install=yes
9960 fi
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972 # This can be used to rebuild libtool when needed
9973 LIBTOOL_DEPS="$ltmain"
9974
9975 # Always use our own libtool.
9976 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007 test -z "$LN_S" && LN_S="ln -s"
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022 if test -n "${ZSH_VERSION+set}" ; then
10023    setopt NO_GLOB_SUBST
10024 fi
10025
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10027 $as_echo_n "checking for objdir... " >&6; }
10028 if ${lt_cv_objdir+:} false; then :
10029   $as_echo_n "(cached) " >&6
10030 else
10031   rm -f .libs 2>/dev/null
10032 mkdir .libs 2>/dev/null
10033 if test -d .libs; then
10034   lt_cv_objdir=.libs
10035 else
10036   # MS-DOS does not allow filenames that begin with a dot.
10037   lt_cv_objdir=_libs
10038 fi
10039 rmdir .libs 2>/dev/null
10040 fi
10041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10042 $as_echo "$lt_cv_objdir" >&6; }
10043 objdir=$lt_cv_objdir
10044
10045
10046
10047
10048
10049 cat >>confdefs.h <<_ACEOF
10050 #define LT_OBJDIR "$lt_cv_objdir/"
10051 _ACEOF
10052
10053
10054
10055
10056 case $host_os in
10057 aix3*)
10058   # AIX sometimes has problems with the GCC collect2 program.  For some
10059   # reason, if we set the COLLECT_NAMES environment variable, the problems
10060   # vanish in a puff of smoke.
10061   if test "X${COLLECT_NAMES+set}" != Xset; then
10062     COLLECT_NAMES=
10063     export COLLECT_NAMES
10064   fi
10065   ;;
10066 esac
10067
10068 # Global variables:
10069 ofile=libtool
10070 can_build_shared=yes
10071
10072 # All known linkers require a `.a' archive for static linking (except MSVC,
10073 # which needs '.lib').
10074 libext=a
10075
10076 with_gnu_ld="$lt_cv_prog_gnu_ld"
10077
10078 old_CC="$CC"
10079 old_CFLAGS="$CFLAGS"
10080
10081 # Set sane defaults for various variables
10082 test -z "$CC" && CC=cc
10083 test -z "$LTCC" && LTCC=$CC
10084 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10085 test -z "$LD" && LD=ld
10086 test -z "$ac_objext" && ac_objext=o
10087
10088 for cc_temp in $compiler""; do
10089   case $cc_temp in
10090     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
10091     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
10092     \-*) ;;
10093     *) break;;
10094   esac
10095 done
10096 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
10097
10098
10099 # Only perform the check for file, if the check method requires it
10100 test -z "$MAGIC_CMD" && MAGIC_CMD=file
10101 case $deplibs_check_method in
10102 file_magic*)
10103   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10104     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10105 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10106 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10107   $as_echo_n "(cached) " >&6
10108 else
10109   case $MAGIC_CMD in
10110 [\\/*] |  ?:[\\/]*)
10111   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
10112   ;;
10113 *)
10114   lt_save_MAGIC_CMD="$MAGIC_CMD"
10115   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
10116   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10117   for ac_dir in $ac_dummy; do
10118     IFS="$lt_save_ifs"
10119     test -z "$ac_dir" && ac_dir=.
10120     if test -f $ac_dir/${ac_tool_prefix}file; then
10121       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
10122       if test -n "$file_magic_test_file"; then
10123         case $deplibs_check_method in
10124         "file_magic "*)
10125           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10126           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
10127           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10128             $EGREP "$file_magic_regex" > /dev/null; then
10129             :
10130           else
10131             cat <<_LT_EOF 1>&2
10132
10133 *** Warning: the command libtool uses to detect shared libraries,
10134 *** $file_magic_cmd, produces output that libtool cannot recognize.
10135 *** The result is that libtool may fail to recognize shared libraries
10136 *** as such.  This will affect the creation of libtool libraries that
10137 *** depend on shared libraries, but programs linked with such libtool
10138 *** libraries will work regardless of this problem.  Nevertheless, you
10139 *** may want to report the problem to your system manager and/or to
10140 *** bug-libtool@gnu.org
10141
10142 _LT_EOF
10143           fi ;;
10144         esac
10145       fi
10146       break
10147     fi
10148   done
10149   IFS="$lt_save_ifs"
10150   MAGIC_CMD="$lt_save_MAGIC_CMD"
10151   ;;
10152 esac
10153 fi
10154
10155 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
10156 if test -n "$MAGIC_CMD"; then
10157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10158 $as_echo "$MAGIC_CMD" >&6; }
10159 else
10160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10161 $as_echo "no" >&6; }
10162 fi
10163
10164
10165
10166
10167
10168 if test -z "$lt_cv_path_MAGIC_CMD"; then
10169   if test -n "$ac_tool_prefix"; then
10170     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10171 $as_echo_n "checking for file... " >&6; }
10172 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10173   $as_echo_n "(cached) " >&6
10174 else
10175   case $MAGIC_CMD in
10176 [\\/*] |  ?:[\\/]*)
10177   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
10178   ;;
10179 *)
10180   lt_save_MAGIC_CMD="$MAGIC_CMD"
10181   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
10182   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10183   for ac_dir in $ac_dummy; do
10184     IFS="$lt_save_ifs"
10185     test -z "$ac_dir" && ac_dir=.
10186     if test -f $ac_dir/file; then
10187       lt_cv_path_MAGIC_CMD="$ac_dir/file"
10188       if test -n "$file_magic_test_file"; then
10189         case $deplibs_check_method in
10190         "file_magic "*)
10191           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10192           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
10193           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10194             $EGREP "$file_magic_regex" > /dev/null; then
10195             :
10196           else
10197             cat <<_LT_EOF 1>&2
10198
10199 *** Warning: the command libtool uses to detect shared libraries,
10200 *** $file_magic_cmd, produces output that libtool cannot recognize.
10201 *** The result is that libtool may fail to recognize shared libraries
10202 *** as such.  This will affect the creation of libtool libraries that
10203 *** depend on shared libraries, but programs linked with such libtool
10204 *** libraries will work regardless of this problem.  Nevertheless, you
10205 *** may want to report the problem to your system manager and/or to
10206 *** bug-libtool@gnu.org
10207
10208 _LT_EOF
10209           fi ;;
10210         esac
10211       fi
10212       break
10213     fi
10214   done
10215   IFS="$lt_save_ifs"
10216   MAGIC_CMD="$lt_save_MAGIC_CMD"
10217   ;;
10218 esac
10219 fi
10220
10221 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
10222 if test -n "$MAGIC_CMD"; then
10223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10224 $as_echo "$MAGIC_CMD" >&6; }
10225 else
10226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10227 $as_echo "no" >&6; }
10228 fi
10229
10230
10231   else
10232     MAGIC_CMD=:
10233   fi
10234 fi
10235
10236   fi
10237   ;;
10238 esac
10239
10240 # Use C for the default configuration in the libtool script
10241
10242 lt_save_CC="$CC"
10243 ac_ext=c
10244 ac_cpp='$CPP $CPPFLAGS'
10245 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10246 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10247 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10248
10249
10250 # Source file extension for C test sources.
10251 ac_ext=c
10252
10253 # Object file extension for compiled C test sources.
10254 objext=o
10255 objext=$objext
10256
10257 # Code to be used in simple compile tests
10258 lt_simple_compile_test_code="int some_variable = 0;"
10259
10260 # Code to be used in simple link tests
10261 lt_simple_link_test_code='int main(){return(0);}'
10262
10263
10264
10265
10266
10267
10268
10269 # If no C compiler was specified, use CC.
10270 LTCC=${LTCC-"$CC"}
10271
10272 # If no C compiler flags were specified, use CFLAGS.
10273 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10274
10275 # Allow CC to be a program name with arguments.
10276 compiler=$CC
10277
10278 # Save the default compiler, since it gets overwritten when the other
10279 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10280 compiler_DEFAULT=$CC
10281
10282 # save warnings/boilerplate of simple test code
10283 ac_outfile=conftest.$ac_objext
10284 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10285 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10286 _lt_compiler_boilerplate=`cat conftest.err`
10287 $RM conftest*
10288
10289 ac_outfile=conftest.$ac_objext
10290 echo "$lt_simple_link_test_code" >conftest.$ac_ext
10291 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10292 _lt_linker_boilerplate=`cat conftest.err`
10293 $RM -r conftest*
10294
10295
10296 if test -n "$compiler"; then
10297
10298 lt_prog_compiler_no_builtin_flag=
10299
10300 if test "$GCC" = yes; then
10301   case $cc_basename in
10302   nvcc*)
10303     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10304   *)
10305     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10306   esac
10307
10308   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10309 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10310 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10311   $as_echo_n "(cached) " >&6
10312 else
10313   lt_cv_prog_compiler_rtti_exceptions=no
10314    ac_outfile=conftest.$ac_objext
10315    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10316    lt_compiler_flag="-fno-rtti -fno-exceptions"
10317    # Insert the option either (1) after the last *FLAGS variable, or
10318    # (2) before a word containing "conftest.", or (3) at the end.
10319    # Note that $ac_compile itself does not contain backslashes and begins
10320    # with a dollar sign (not a hyphen), so the echo should work correctly.
10321    # The option is referenced via a variable to avoid confusing sed.
10322    lt_compile=`echo "$ac_compile" | $SED \
10323    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10324    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10325    -e 's:$: $lt_compiler_flag:'`
10326    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10327    (eval "$lt_compile" 2>conftest.err)
10328    ac_status=$?
10329    cat conftest.err >&5
10330    echo "$as_me:$LINENO: \$? = $ac_status" >&5
10331    if (exit $ac_status) && test -s "$ac_outfile"; then
10332      # The compiler can only warn and ignore the option if not recognized
10333      # So say no if there are warnings other than the usual output.
10334      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10335      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10336      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10337        lt_cv_prog_compiler_rtti_exceptions=yes
10338      fi
10339    fi
10340    $RM conftest*
10341
10342 fi
10343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10344 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10345
10346 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
10347     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10348 else
10349     :
10350 fi
10351
10352 fi
10353
10354
10355
10356
10357
10358
10359   lt_prog_compiler_wl=
10360 lt_prog_compiler_pic=
10361 lt_prog_compiler_static=
10362
10363
10364   if test "$GCC" = yes; then
10365     lt_prog_compiler_wl='-Wl,'
10366     lt_prog_compiler_static='-static'
10367
10368     case $host_os in
10369       aix*)
10370       # All AIX code is PIC.
10371       if test "$host_cpu" = ia64; then
10372         # AIX 5 now supports IA64 processor
10373         lt_prog_compiler_static='-Bstatic'
10374       fi
10375       ;;
10376
10377     amigaos*)
10378       case $host_cpu in
10379       powerpc)
10380             # see comment about AmigaOS4 .so support
10381             lt_prog_compiler_pic='-fPIC'
10382         ;;
10383       m68k)
10384             # FIXME: we need at least 68020 code to build shared libraries, but
10385             # adding the `-m68020' flag to GCC prevents building anything better,
10386             # like `-m68040'.
10387             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10388         ;;
10389       esac
10390       ;;
10391
10392     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10393       # PIC is the default for these OSes.
10394       ;;
10395
10396     mingw* | cygwin* | pw32* | os2* | cegcc*)
10397       # This hack is so that the source file can tell whether it is being
10398       # built for inclusion in a dll (and should export symbols for example).
10399       # Although the cygwin gcc ignores -fPIC, still need this for old-style
10400       # (--disable-auto-import) libraries
10401       lt_prog_compiler_pic='-DDLL_EXPORT'
10402       ;;
10403
10404     darwin* | rhapsody*)
10405       # PIC is the default on this platform
10406       # Common symbols not allowed in MH_DYLIB files
10407       lt_prog_compiler_pic='-fno-common'
10408       ;;
10409
10410     haiku*)
10411       # PIC is the default for Haiku.
10412       # The "-static" flag exists, but is broken.
10413       lt_prog_compiler_static=
10414       ;;
10415
10416     hpux*)
10417       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10418       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10419       # sets the default TLS model and affects inlining.
10420       case $host_cpu in
10421       hppa*64*)
10422         # +Z the default
10423         ;;
10424       *)
10425         lt_prog_compiler_pic='-fPIC'
10426         ;;
10427       esac
10428       ;;
10429
10430     interix[3-9]*)
10431       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10432       # Instead, we relocate shared libraries at runtime.
10433       ;;
10434
10435     msdosdjgpp*)
10436       # Just because we use GCC doesn't mean we suddenly get shared libraries
10437       # on systems that don't support them.
10438       lt_prog_compiler_can_build_shared=no
10439       enable_shared=no
10440       ;;
10441
10442     *nto* | *qnx*)
10443       # QNX uses GNU C++, but need to define -shared option too, otherwise
10444       # it will coredump.
10445       lt_prog_compiler_pic='-fPIC -shared'
10446       ;;
10447
10448     sysv4*MP*)
10449       if test -d /usr/nec; then
10450         lt_prog_compiler_pic=-Kconform_pic
10451       fi
10452       ;;
10453
10454     *)
10455       lt_prog_compiler_pic='-fPIC'
10456       ;;
10457     esac
10458
10459     case $cc_basename in
10460     nvcc*) # Cuda Compiler Driver 2.2
10461       lt_prog_compiler_wl='-Xlinker '
10462       if test -n "$lt_prog_compiler_pic"; then
10463         lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
10464       fi
10465       ;;
10466     esac
10467   else
10468     # PORTME Check for flag to pass linker flags through the system compiler.
10469     case $host_os in
10470     aix*)
10471       lt_prog_compiler_wl='-Wl,'
10472       if test "$host_cpu" = ia64; then
10473         # AIX 5 now supports IA64 processor
10474         lt_prog_compiler_static='-Bstatic'
10475       else
10476         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
10477       fi
10478       ;;
10479
10480     mingw* | cygwin* | pw32* | os2* | cegcc*)
10481       # This hack is so that the source file can tell whether it is being
10482       # built for inclusion in a dll (and should export symbols for example).
10483       lt_prog_compiler_pic='-DDLL_EXPORT'
10484       ;;
10485
10486     hpux9* | hpux10* | hpux11*)
10487       lt_prog_compiler_wl='-Wl,'
10488       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10489       # not for PA HP-UX.
10490       case $host_cpu in
10491       hppa*64*|ia64*)
10492         # +Z the default
10493         ;;
10494       *)
10495         lt_prog_compiler_pic='+Z'
10496         ;;
10497       esac
10498       # Is there a better lt_prog_compiler_static that works with the bundled CC?
10499       lt_prog_compiler_static='${wl}-a ${wl}archive'
10500       ;;
10501
10502     irix5* | irix6* | nonstopux*)
10503       lt_prog_compiler_wl='-Wl,'
10504       # PIC (with -KPIC) is the default.
10505       lt_prog_compiler_static='-non_shared'
10506       ;;
10507
10508     linux* | k*bsd*-gnu | kopensolaris*-gnu)
10509       case $cc_basename in
10510       # old Intel for x86_64 which still supported -KPIC.
10511       ecc*)
10512         lt_prog_compiler_wl='-Wl,'
10513         lt_prog_compiler_pic='-KPIC'
10514         lt_prog_compiler_static='-static'
10515         ;;
10516       # icc used to be incompatible with GCC.
10517       # ICC 10 doesn't accept -KPIC any more.
10518       icc* | ifort*)
10519         lt_prog_compiler_wl='-Wl,'
10520         lt_prog_compiler_pic='-fPIC'
10521         lt_prog_compiler_static='-static'
10522         ;;
10523       # Lahey Fortran 8.1.
10524       lf95*)
10525         lt_prog_compiler_wl='-Wl,'
10526         lt_prog_compiler_pic='--shared'
10527         lt_prog_compiler_static='--static'
10528         ;;
10529       nagfor*)
10530         # NAG Fortran compiler
10531         lt_prog_compiler_wl='-Wl,-Wl,,'
10532         lt_prog_compiler_pic='-PIC'
10533         lt_prog_compiler_static='-Bstatic'
10534         ;;
10535       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
10536         # Portland Group compilers (*not* the Pentium gcc compiler,
10537         # which looks to be a dead project)
10538         lt_prog_compiler_wl='-Wl,'
10539         lt_prog_compiler_pic='-fpic'
10540         lt_prog_compiler_static='-Bstatic'
10541         ;;
10542       ccc*)
10543         lt_prog_compiler_wl='-Wl,'
10544         # All Alpha code is PIC.
10545         lt_prog_compiler_static='-non_shared'
10546         ;;
10547       xl* | bgxl* | bgf* | mpixl*)
10548         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
10549         lt_prog_compiler_wl='-Wl,'
10550         lt_prog_compiler_pic='-qpic'
10551         lt_prog_compiler_static='-qstaticlink'
10552         ;;
10553       *)
10554         case `$CC -V 2>&1 | sed 5q` in
10555         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
10556           # Sun Fortran 8.3 passes all unrecognized flags to the linker
10557           lt_prog_compiler_pic='-KPIC'
10558           lt_prog_compiler_static='-Bstatic'
10559           lt_prog_compiler_wl=''
10560           ;;
10561         *Sun\ F* | *Sun*Fortran*)
10562           lt_prog_compiler_pic='-KPIC'
10563           lt_prog_compiler_static='-Bstatic'
10564           lt_prog_compiler_wl='-Qoption ld '
10565           ;;
10566         *Sun\ C*)
10567           # Sun C 5.9
10568           lt_prog_compiler_pic='-KPIC'
10569           lt_prog_compiler_static='-Bstatic'
10570           lt_prog_compiler_wl='-Wl,'
10571           ;;
10572         *Intel*\ [CF]*Compiler*)
10573           lt_prog_compiler_wl='-Wl,'
10574           lt_prog_compiler_pic='-fPIC'
10575           lt_prog_compiler_static='-static'
10576           ;;
10577         *Portland\ Group*)
10578           lt_prog_compiler_wl='-Wl,'
10579           lt_prog_compiler_pic='-fpic'
10580           lt_prog_compiler_static='-Bstatic'
10581           ;;
10582         esac
10583         ;;
10584       esac
10585       ;;
10586
10587     newsos6)
10588       lt_prog_compiler_pic='-KPIC'
10589       lt_prog_compiler_static='-Bstatic'
10590       ;;
10591
10592     *nto* | *qnx*)
10593       # QNX uses GNU C++, but need to define -shared option too, otherwise
10594       # it will coredump.
10595       lt_prog_compiler_pic='-fPIC -shared'
10596       ;;
10597
10598     osf3* | osf4* | osf5*)
10599       lt_prog_compiler_wl='-Wl,'
10600       # All OSF/1 code is PIC.
10601       lt_prog_compiler_static='-non_shared'
10602       ;;
10603
10604     rdos*)
10605       lt_prog_compiler_static='-non_shared'
10606       ;;
10607
10608     solaris*)
10609       lt_prog_compiler_pic='-KPIC'
10610       lt_prog_compiler_static='-Bstatic'
10611       case $cc_basename in
10612       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
10613         lt_prog_compiler_wl='-Qoption ld ';;
10614       *)
10615         lt_prog_compiler_wl='-Wl,';;
10616       esac
10617       ;;
10618
10619     sunos4*)
10620       lt_prog_compiler_wl='-Qoption ld '
10621       lt_prog_compiler_pic='-PIC'
10622       lt_prog_compiler_static='-Bstatic'
10623       ;;
10624
10625     sysv4 | sysv4.2uw2* | sysv4.3*)
10626       lt_prog_compiler_wl='-Wl,'
10627       lt_prog_compiler_pic='-KPIC'
10628       lt_prog_compiler_static='-Bstatic'
10629       ;;
10630
10631     sysv4*MP*)
10632       if test -d /usr/nec ;then
10633         lt_prog_compiler_pic='-Kconform_pic'
10634         lt_prog_compiler_static='-Bstatic'
10635       fi
10636       ;;
10637
10638     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
10639       lt_prog_compiler_wl='-Wl,'
10640       lt_prog_compiler_pic='-KPIC'
10641       lt_prog_compiler_static='-Bstatic'
10642       ;;
10643
10644     unicos*)
10645       lt_prog_compiler_wl='-Wl,'
10646       lt_prog_compiler_can_build_shared=no
10647       ;;
10648
10649     uts4*)
10650       lt_prog_compiler_pic='-pic'
10651       lt_prog_compiler_static='-Bstatic'
10652       ;;
10653
10654     *)
10655       lt_prog_compiler_can_build_shared=no
10656       ;;
10657     esac
10658   fi
10659
10660 case $host_os in
10661   # For platforms which do not support PIC, -DPIC is meaningless:
10662   *djgpp*)
10663     lt_prog_compiler_pic=
10664     ;;
10665   *)
10666     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
10667     ;;
10668 esac
10669
10670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
10671 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
10672 if ${lt_cv_prog_compiler_pic+:} false; then :
10673   $as_echo_n "(cached) " >&6
10674 else
10675   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
10676 fi
10677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
10678 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
10679 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
10680
10681 #
10682 # Check to make sure the PIC flag actually works.
10683 #
10684 if test -n "$lt_prog_compiler_pic"; then
10685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
10686 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
10687 if ${lt_cv_prog_compiler_pic_works+:} false; then :
10688   $as_echo_n "(cached) " >&6
10689 else
10690   lt_cv_prog_compiler_pic_works=no
10691    ac_outfile=conftest.$ac_objext
10692    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10693    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
10694    # Insert the option either (1) after the last *FLAGS variable, or
10695    # (2) before a word containing "conftest.", or (3) at the end.
10696    # Note that $ac_compile itself does not contain backslashes and begins
10697    # with a dollar sign (not a hyphen), so the echo should work correctly.
10698    # The option is referenced via a variable to avoid confusing sed.
10699    lt_compile=`echo "$ac_compile" | $SED \
10700    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10701    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10702    -e 's:$: $lt_compiler_flag:'`
10703    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10704    (eval "$lt_compile" 2>conftest.err)
10705    ac_status=$?
10706    cat conftest.err >&5
10707    echo "$as_me:$LINENO: \$? = $ac_status" >&5
10708    if (exit $ac_status) && test -s "$ac_outfile"; then
10709      # The compiler can only warn and ignore the option if not recognized
10710      # So say no if there are warnings other than the usual output.
10711      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10712      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10713      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10714        lt_cv_prog_compiler_pic_works=yes
10715      fi
10716    fi
10717    $RM conftest*
10718
10719 fi
10720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
10721 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
10722
10723 if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
10724     case $lt_prog_compiler_pic in
10725      "" | " "*) ;;
10726      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
10727      esac
10728 else
10729     lt_prog_compiler_pic=
10730      lt_prog_compiler_can_build_shared=no
10731 fi
10732
10733 fi
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745 #
10746 # Check to make sure the static flag actually works.
10747 #
10748 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
10749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
10750 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
10751 if ${lt_cv_prog_compiler_static_works+:} false; then :
10752   $as_echo_n "(cached) " >&6
10753 else
10754   lt_cv_prog_compiler_static_works=no
10755    save_LDFLAGS="$LDFLAGS"
10756    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
10757    echo "$lt_simple_link_test_code" > conftest.$ac_ext
10758    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
10759      # The linker can only warn and ignore the option if not recognized
10760      # So say no if there are warnings
10761      if test -s conftest.err; then
10762        # Append any errors to the config.log.
10763        cat conftest.err 1>&5
10764        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
10765        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10766        if diff conftest.exp conftest.er2 >/dev/null; then
10767          lt_cv_prog_compiler_static_works=yes
10768        fi
10769      else
10770        lt_cv_prog_compiler_static_works=yes
10771      fi
10772    fi
10773    $RM -r conftest*
10774    LDFLAGS="$save_LDFLAGS"
10775
10776 fi
10777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
10778 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
10779
10780 if test x"$lt_cv_prog_compiler_static_works" = xyes; then
10781     :
10782 else
10783     lt_prog_compiler_static=
10784 fi
10785
10786
10787
10788
10789
10790
10791
10792   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
10793 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
10794 if ${lt_cv_prog_compiler_c_o+:} false; then :
10795   $as_echo_n "(cached) " >&6
10796 else
10797   lt_cv_prog_compiler_c_o=no
10798    $RM -r conftest 2>/dev/null
10799    mkdir conftest
10800    cd conftest
10801    mkdir out
10802    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10803
10804    lt_compiler_flag="-o out/conftest2.$ac_objext"
10805    # Insert the option either (1) after the last *FLAGS variable, or
10806    # (2) before a word containing "conftest.", or (3) at the end.
10807    # Note that $ac_compile itself does not contain backslashes and begins
10808    # with a dollar sign (not a hyphen), so the echo should work correctly.
10809    lt_compile=`echo "$ac_compile" | $SED \
10810    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10811    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10812    -e 's:$: $lt_compiler_flag:'`
10813    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10814    (eval "$lt_compile" 2>out/conftest.err)
10815    ac_status=$?
10816    cat out/conftest.err >&5
10817    echo "$as_me:$LINENO: \$? = $ac_status" >&5
10818    if (exit $ac_status) && test -s out/conftest2.$ac_objext
10819    then
10820      # The compiler can only warn and ignore the option if not recognized
10821      # So say no if there are warnings
10822      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
10823      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
10824      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
10825        lt_cv_prog_compiler_c_o=yes
10826      fi
10827    fi
10828    chmod u+w . 2>&5
10829    $RM conftest*
10830    # SGI C++ compiler will create directory out/ii_files/ for
10831    # template instantiation
10832    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
10833    $RM out/* && rmdir out
10834    cd ..
10835    $RM -r conftest
10836    $RM conftest*
10837
10838 fi
10839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
10840 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
10841
10842
10843
10844
10845
10846
10847   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
10848 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
10849 if ${lt_cv_prog_compiler_c_o+:} false; then :
10850   $as_echo_n "(cached) " >&6
10851 else
10852   lt_cv_prog_compiler_c_o=no
10853    $RM -r conftest 2>/dev/null
10854    mkdir conftest
10855    cd conftest
10856    mkdir out
10857    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10858
10859    lt_compiler_flag="-o out/conftest2.$ac_objext"
10860    # Insert the option either (1) after the last *FLAGS variable, or
10861    # (2) before a word containing "conftest.", or (3) at the end.
10862    # Note that $ac_compile itself does not contain backslashes and begins
10863    # with a dollar sign (not a hyphen), so the echo should work correctly.
10864    lt_compile=`echo "$ac_compile" | $SED \
10865    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10866    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10867    -e 's:$: $lt_compiler_flag:'`
10868    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10869    (eval "$lt_compile" 2>out/conftest.err)
10870    ac_status=$?
10871    cat out/conftest.err >&5
10872    echo "$as_me:$LINENO: \$? = $ac_status" >&5
10873    if (exit $ac_status) && test -s out/conftest2.$ac_objext
10874    then
10875      # The compiler can only warn and ignore the option if not recognized
10876      # So say no if there are warnings
10877      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
10878      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
10879      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
10880        lt_cv_prog_compiler_c_o=yes
10881      fi
10882    fi
10883    chmod u+w . 2>&5
10884    $RM conftest*
10885    # SGI C++ compiler will create directory out/ii_files/ for
10886    # template instantiation
10887    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
10888    $RM out/* && rmdir out
10889    cd ..
10890    $RM -r conftest
10891    $RM conftest*
10892
10893 fi
10894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
10895 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
10896
10897
10898
10899
10900 hard_links="nottested"
10901 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
10902   # do not overwrite the value of need_locks provided by the user
10903   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
10904 $as_echo_n "checking if we can lock with hard links... " >&6; }
10905   hard_links=yes
10906   $RM conftest*
10907   ln conftest.a conftest.b 2>/dev/null && hard_links=no
10908   touch conftest.a
10909   ln conftest.a conftest.b 2>&5 || hard_links=no
10910   ln conftest.a conftest.b 2>/dev/null && hard_links=no
10911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
10912 $as_echo "$hard_links" >&6; }
10913   if test "$hard_links" = no; then
10914     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
10915 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
10916     need_locks=warn
10917   fi
10918 else
10919   need_locks=no
10920 fi
10921
10922
10923
10924
10925
10926
10927   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
10928 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
10929
10930   runpath_var=
10931   allow_undefined_flag=
10932   always_export_symbols=no
10933   archive_cmds=
10934   archive_expsym_cmds=
10935   compiler_needs_object=no
10936   enable_shared_with_static_runtimes=no
10937   export_dynamic_flag_spec=
10938   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10939   hardcode_automatic=no
10940   hardcode_direct=no
10941   hardcode_direct_absolute=no
10942   hardcode_libdir_flag_spec=
10943   hardcode_libdir_separator=
10944   hardcode_minus_L=no
10945   hardcode_shlibpath_var=unsupported
10946   inherit_rpath=no
10947   link_all_deplibs=unknown
10948   module_cmds=
10949   module_expsym_cmds=
10950   old_archive_from_new_cmds=
10951   old_archive_from_expsyms_cmds=
10952   thread_safe_flag_spec=
10953   whole_archive_flag_spec=
10954   # include_expsyms should be a list of space-separated symbols to be *always*
10955   # included in the symbol list
10956   include_expsyms=
10957   # exclude_expsyms can be an extended regexp of symbols to exclude
10958   # it will be wrapped by ` (' and `)$', so one must not match beginning or
10959   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
10960   # as well as any symbol that contains `d'.
10961   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
10962   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
10963   # platforms (ab)use it in PIC code, but their linkers get confused if
10964   # the symbol is explicitly referenced.  Since portable code cannot
10965   # rely on this symbol name, it's probably fine to never include it in
10966   # preloaded symbol tables.
10967   # Exclude shared library initialization/finalization symbols.
10968   extract_expsyms_cmds=
10969
10970   case $host_os in
10971   cygwin* | mingw* | pw32* | cegcc*)
10972     # FIXME: the MSVC++ port hasn't been tested in a loooong time
10973     # When not using gcc, we currently assume that we are using
10974     # Microsoft Visual C++.
10975     if test "$GCC" != yes; then
10976       with_gnu_ld=no
10977     fi
10978     ;;
10979   interix*)
10980     # we just hope/assume this is gcc and not c89 (= MSVC++)
10981     with_gnu_ld=yes
10982     ;;
10983   openbsd*)
10984     with_gnu_ld=no
10985     ;;
10986   esac
10987
10988   ld_shlibs=yes
10989
10990   # On some targets, GNU ld is compatible enough with the native linker
10991   # that we're better off using the native interface for both.
10992   lt_use_gnu_ld_interface=no
10993   if test "$with_gnu_ld" = yes; then
10994     case $host_os in
10995       aix*)
10996         # The AIX port of GNU ld has always aspired to compatibility
10997         # with the native linker.  However, as the warning in the GNU ld
10998         # block says, versions before 2.19.5* couldn't really create working
10999         # shared libraries, regardless of the interface used.
11000         case `$LD -v 2>&1` in
11001           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11002           *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11003           *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11004           *)
11005             lt_use_gnu_ld_interface=yes
11006             ;;
11007         esac
11008         ;;
11009       *)
11010         lt_use_gnu_ld_interface=yes
11011         ;;
11012     esac
11013   fi
11014
11015   if test "$lt_use_gnu_ld_interface" = yes; then
11016     # If archive_cmds runs LD, not CC, wlarc should be empty
11017     wlarc='${wl}'
11018
11019     # Set some defaults for GNU ld with shared library support. These
11020     # are reset later if shared libraries are not supported. Putting them
11021     # here allows them to be overridden if necessary.
11022     runpath_var=LD_RUN_PATH
11023     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
11024     export_dynamic_flag_spec='${wl}--export-dynamic'
11025     # ancient GNU ld didn't support --whole-archive et. al.
11026     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11027       whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
11028     else
11029       whole_archive_flag_spec=
11030     fi
11031     supports_anon_versioning=no
11032     case `$LD -v 2>&1` in
11033       *GNU\ gold*) supports_anon_versioning=yes ;;
11034       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11035       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11036       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11037       *\ 2.11.*) ;; # other 2.11 versions
11038       *) supports_anon_versioning=yes ;;
11039     esac
11040
11041     # See if GNU ld supports shared libraries.
11042     case $host_os in
11043     aix[3-9]*)
11044       # On AIX/PPC, the GNU linker is very broken
11045       if test "$host_cpu" != ia64; then
11046         ld_shlibs=no
11047         cat <<_LT_EOF 1>&2
11048
11049 *** Warning: the GNU linker, at least up to release 2.19, is reported
11050 *** to be unable to reliably create shared libraries on AIX.
11051 *** Therefore, libtool is disabling shared libraries support.  If you
11052 *** really care for shared libraries, you may want to install binutils
11053 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11054 *** You will then need to restart the configuration process.
11055
11056 _LT_EOF
11057       fi
11058       ;;
11059
11060     amigaos*)
11061       case $host_cpu in
11062       powerpc)
11063             # see comment about AmigaOS4 .so support
11064             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11065             archive_expsym_cmds=''
11066         ;;
11067       m68k)
11068             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)'
11069             hardcode_libdir_flag_spec='-L$libdir'
11070             hardcode_minus_L=yes
11071         ;;
11072       esac
11073       ;;
11074
11075     beos*)
11076       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11077         allow_undefined_flag=unsupported
11078         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11079         # support --undefined.  This deserves some investigation.  FIXME
11080         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11081       else
11082         ld_shlibs=no
11083       fi
11084       ;;
11085
11086     cygwin* | mingw* | pw32* | cegcc*)
11087       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11088       # as there is no search path for DLLs.
11089       hardcode_libdir_flag_spec='-L$libdir'
11090       export_dynamic_flag_spec='${wl}--export-all-symbols'
11091       allow_undefined_flag=unsupported
11092       always_export_symbols=no
11093       enable_shared_with_static_runtimes=yes
11094       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'
11095       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11096
11097       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11098         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11099         # If the export-symbols file already is a .def file (1st line
11100         # is EXPORTS), use it as is; otherwise, prepend...
11101         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
11102           cp $export_symbols $output_objdir/$soname.def;
11103         else
11104           echo EXPORTS > $output_objdir/$soname.def;
11105           cat $export_symbols >> $output_objdir/$soname.def;
11106         fi~
11107         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11108       else
11109         ld_shlibs=no
11110       fi
11111       ;;
11112
11113     haiku*)
11114       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11115       link_all_deplibs=yes
11116       ;;
11117
11118     interix[3-9]*)
11119       hardcode_direct=no
11120       hardcode_shlibpath_var=no
11121       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
11122       export_dynamic_flag_spec='${wl}-E'
11123       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11124       # Instead, shared libraries are loaded at an image base (0x10000000 by
11125       # default) and relocated if they conflict, which is a slow very memory
11126       # consuming and fragmenting process.  To avoid this, we pick a random,
11127       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11128       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11129       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11130       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'
11131       ;;
11132
11133     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11134       tmp_diet=no
11135       if test "$host_os" = linux-dietlibc; then
11136         case $cc_basename in
11137           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
11138         esac
11139       fi
11140       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11141          && test "$tmp_diet" = no
11142       then
11143         tmp_addflag=' $pic_flag'
11144         tmp_sharedflag='-shared'
11145         case $cc_basename,$host_cpu in
11146         pgcc*)                          # Portland Group C compiler
11147           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'
11148           tmp_addflag=' $pic_flag'
11149           ;;
11150         pgf77* | pgf90* | pgf95* | pgfortran*)
11151                                         # Portland Group f77 and f90 compilers
11152           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'
11153           tmp_addflag=' $pic_flag -Mnomain' ;;
11154         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
11155           tmp_addflag=' -i_dynamic' ;;
11156         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
11157           tmp_addflag=' -i_dynamic -nofor_main' ;;
11158         ifc* | ifort*)                  # Intel Fortran compiler
11159           tmp_addflag=' -nofor_main' ;;
11160         lf95*)                          # Lahey Fortran 8.1
11161           whole_archive_flag_spec=
11162           tmp_sharedflag='--shared' ;;
11163         xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11164           tmp_sharedflag='-qmkshrobj'
11165           tmp_addflag= ;;
11166         nvcc*)  # Cuda Compiler Driver 2.2
11167           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'
11168           compiler_needs_object=yes
11169           ;;
11170         esac
11171         case `$CC -V 2>&1 | sed 5q` in
11172         *Sun\ C*)                       # Sun C 5.9
11173           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'
11174           compiler_needs_object=yes
11175           tmp_sharedflag='-G' ;;
11176         *Sun\ F*)                       # Sun Fortran 8.3
11177           tmp_sharedflag='-G' ;;
11178         esac
11179         archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11180
11181         if test "x$supports_anon_versioning" = xyes; then
11182           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11183             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11184             echo "local: *; };" >> $output_objdir/$libname.ver~
11185             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
11186         fi
11187
11188         case $cc_basename in
11189         xlf* | bgf* | bgxlf* | mpixlf*)
11190           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11191           whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11192           hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
11193           archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11194           if test "x$supports_anon_versioning" = xyes; then
11195             archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11196               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11197               echo "local: *; };" >> $output_objdir/$libname.ver~
11198               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11199           fi
11200           ;;
11201         esac
11202       else
11203         ld_shlibs=no
11204       fi
11205       ;;
11206
11207     netbsd*)
11208       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11209         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11210         wlarc=
11211       else
11212         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11213         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11214       fi
11215       ;;
11216
11217     solaris*)
11218       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11219         ld_shlibs=no
11220         cat <<_LT_EOF 1>&2
11221
11222 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
11223 *** create shared libraries on Solaris systems.  Therefore, libtool
11224 *** is disabling shared libraries support.  We urge you to upgrade GNU
11225 *** binutils to release 2.9.1 or newer.  Another option is to modify
11226 *** your PATH or compiler configuration so that the native linker is
11227 *** used, and then restart.
11228
11229 _LT_EOF
11230       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11231         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11232         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11233       else
11234         ld_shlibs=no
11235       fi
11236       ;;
11237
11238     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11239       case `$LD -v 2>&1` in
11240         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11241         ld_shlibs=no
11242         cat <<_LT_EOF 1>&2
11243
11244 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
11245 *** reliably create shared libraries on SCO systems.  Therefore, libtool
11246 *** is disabling shared libraries support.  We urge you to upgrade GNU
11247 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11248 *** your PATH or compiler configuration so that the native linker is
11249 *** used, and then restart.
11250
11251 _LT_EOF
11252         ;;
11253         *)
11254           # For security reasons, it is highly recommended that you always
11255           # use absolute paths for naming shared libraries, and exclude the
11256           # DT_RUNPATH tag from executables and libraries.  But doing so
11257           # requires that you compile everything twice, which is a pain.
11258           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11259             hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
11260             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11261             archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11262           else
11263             ld_shlibs=no
11264           fi
11265         ;;
11266       esac
11267       ;;
11268
11269     sunos4*)
11270       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11271       wlarc=
11272       hardcode_direct=yes
11273       hardcode_shlibpath_var=no
11274       ;;
11275
11276     *)
11277       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11278         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11279         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11280       else
11281         ld_shlibs=no
11282       fi
11283       ;;
11284     esac
11285
11286     if test "$ld_shlibs" = no; then
11287       runpath_var=
11288       hardcode_libdir_flag_spec=
11289       export_dynamic_flag_spec=
11290       whole_archive_flag_spec=
11291     fi
11292   else
11293     # PORTME fill in a description of your system's linker (not GNU ld)
11294     case $host_os in
11295     aix3*)
11296       allow_undefined_flag=unsupported
11297       always_export_symbols=yes
11298       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'
11299       # Note: this linker hardcodes the directories in LIBPATH if there
11300       # are no directories specified by -L.
11301       hardcode_minus_L=yes
11302       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
11303         # Neither direct hardcoding nor static linking is supported with a
11304         # broken collect2.
11305         hardcode_direct=unsupported
11306       fi
11307       ;;
11308
11309     aix[4-9]*)
11310       if test "$host_cpu" = ia64; then
11311         # On IA64, the linker does run time linking by default, so we don't
11312         # have to do anything special.
11313         aix_use_runtimelinking=no
11314         exp_sym_flag='-Bexport'
11315         no_entry_flag=""
11316       else
11317         # If we're using GNU nm, then we don't want the "-C" option.
11318         # -C means demangle to AIX nm, but means don't demangle with GNU nm
11319         # Also, AIX nm treats weak defined symbols like other global
11320         # defined symbols, whereas GNU nm marks them as "W".
11321         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11322           export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
11323         else
11324           export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
11325         fi
11326         aix_use_runtimelinking=no
11327
11328         # Test if we are trying to use run time linking or normal
11329         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
11330         # need to do runtime linking.
11331         case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11332           for ld_flag in $LDFLAGS; do
11333           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
11334             aix_use_runtimelinking=yes
11335             break
11336           fi
11337           done
11338           ;;
11339         esac
11340
11341         exp_sym_flag='-bexport'
11342         no_entry_flag='-bnoentry'
11343       fi
11344
11345       # When large executables or shared objects are built, AIX ld can
11346       # have problems creating the table of contents.  If linking a library
11347       # or program results in "error TOC overflow" add -mminimal-toc to
11348       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11349       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11350
11351       archive_cmds=''
11352       hardcode_direct=yes
11353       hardcode_direct_absolute=yes
11354       hardcode_libdir_separator=':'
11355       link_all_deplibs=yes
11356       file_list_spec='${wl}-f,'
11357
11358       if test "$GCC" = yes; then
11359         case $host_os in aix4.[012]|aix4.[012].*)
11360         # We only want to do this on AIX 4.2 and lower, the check
11361         # below for broken collect2 doesn't work under 4.3+
11362           collect2name=`${CC} -print-prog-name=collect2`
11363           if test -f "$collect2name" &&
11364            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
11365           then
11366           # We have reworked collect2
11367           :
11368           else
11369           # We have old collect2
11370           hardcode_direct=unsupported
11371           # It fails to find uninstalled libraries when the uninstalled
11372           # path is not listed in the libpath.  Setting hardcode_minus_L
11373           # to unsupported forces relinking
11374           hardcode_minus_L=yes
11375           hardcode_libdir_flag_spec='-L$libdir'
11376           hardcode_libdir_separator=
11377           fi
11378           ;;
11379         esac
11380         shared_flag='-shared'
11381         if test "$aix_use_runtimelinking" = yes; then
11382           shared_flag="$shared_flag "'${wl}-G'
11383         fi
11384       else
11385         # not using gcc
11386         if test "$host_cpu" = ia64; then
11387         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11388         # chokes on -Wl,-G. The following line is correct:
11389           shared_flag='-G'
11390         else
11391           if test "$aix_use_runtimelinking" = yes; then
11392             shared_flag='${wl}-G'
11393           else
11394             shared_flag='${wl}-bM:SRE'
11395           fi
11396         fi
11397       fi
11398
11399       export_dynamic_flag_spec='${wl}-bexpall'
11400       # It seems that -bexpall does not export symbols beginning with
11401       # underscore (_), so it is better to generate a list of symbols to export.
11402       always_export_symbols=yes
11403       if test "$aix_use_runtimelinking" = yes; then
11404         # Warning - without using the other runtime loading flags (-brtl),
11405         # -berok will link without error, but may produce a broken library.
11406         allow_undefined_flag='-berok'
11407         # Determine the default libpath from the value encoded in an
11408         # empty executable.
11409         if test "${lt_cv_aix_libpath+set}" = set; then
11410   aix_libpath=$lt_cv_aix_libpath
11411 else
11412   if ${lt_cv_aix_libpath_+:} false; then :
11413   $as_echo_n "(cached) " >&6
11414 else
11415   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11416 /* end confdefs.h.  */
11417
11418 int
11419 main ()
11420 {
11421
11422   ;
11423   return 0;
11424 }
11425 _ACEOF
11426 if ac_fn_c_try_link "$LINENO"; then :
11427
11428   lt_aix_libpath_sed='
11429       /Import File Strings/,/^$/ {
11430           /^0/ {
11431               s/^0  *\([^ ]*\) *$/\1/
11432               p
11433           }
11434       }'
11435   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11436   # Check for a 64-bit object if we didn't find anything.
11437   if test -z "$lt_cv_aix_libpath_"; then
11438     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11439   fi
11440 fi
11441 rm -f core conftest.err conftest.$ac_objext \
11442     conftest$ac_exeext conftest.$ac_ext
11443   if test -z "$lt_cv_aix_libpath_"; then
11444     lt_cv_aix_libpath_="/usr/lib:/lib"
11445   fi
11446
11447 fi
11448
11449   aix_libpath=$lt_cv_aix_libpath_
11450 fi
11451
11452         hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
11453         archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
11454       else
11455         if test "$host_cpu" = ia64; then
11456           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
11457           allow_undefined_flag="-z nodefs"
11458           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"
11459         else
11460          # Determine the default libpath from the value encoded in an
11461          # empty executable.
11462          if test "${lt_cv_aix_libpath+set}" = set; then
11463   aix_libpath=$lt_cv_aix_libpath
11464 else
11465   if ${lt_cv_aix_libpath_+:} false; then :
11466   $as_echo_n "(cached) " >&6
11467 else
11468   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11469 /* end confdefs.h.  */
11470
11471 int
11472 main ()
11473 {
11474
11475   ;
11476   return 0;
11477 }
11478 _ACEOF
11479 if ac_fn_c_try_link "$LINENO"; then :
11480
11481   lt_aix_libpath_sed='
11482       /Import File Strings/,/^$/ {
11483           /^0/ {
11484               s/^0  *\([^ ]*\) *$/\1/
11485               p
11486           }
11487       }'
11488   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11489   # Check for a 64-bit object if we didn't find anything.
11490   if test -z "$lt_cv_aix_libpath_"; then
11491     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11492   fi
11493 fi
11494 rm -f core conftest.err conftest.$ac_objext \
11495     conftest$ac_exeext conftest.$ac_ext
11496   if test -z "$lt_cv_aix_libpath_"; then
11497     lt_cv_aix_libpath_="/usr/lib:/lib"
11498   fi
11499
11500 fi
11501
11502   aix_libpath=$lt_cv_aix_libpath_
11503 fi
11504
11505          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
11506           # Warning - without using the other run time loading flags,
11507           # -berok will link without error, but may produce a broken library.
11508           no_undefined_flag=' ${wl}-bernotok'
11509           allow_undefined_flag=' ${wl}-berok'
11510           if test "$with_gnu_ld" = yes; then
11511             # We only use this code for GNU lds that support --whole-archive.
11512             whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
11513           else
11514             # Exported symbols can be pulled into shared objects from archives
11515             whole_archive_flag_spec='$convenience'
11516           fi
11517           archive_cmds_need_lc=yes
11518           # This is similar to how AIX traditionally builds its shared libraries.
11519           archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
11520         fi
11521       fi
11522       ;;
11523
11524     amigaos*)
11525       case $host_cpu in
11526       powerpc)
11527             # see comment about AmigaOS4 .so support
11528             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11529             archive_expsym_cmds=''
11530         ;;
11531       m68k)
11532             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)'
11533             hardcode_libdir_flag_spec='-L$libdir'
11534             hardcode_minus_L=yes
11535         ;;
11536       esac
11537       ;;
11538
11539     bsdi[45]*)
11540       export_dynamic_flag_spec=-rdynamic
11541       ;;
11542
11543     cygwin* | mingw* | pw32* | cegcc*)
11544       # When not using gcc, we currently assume that we are using
11545       # Microsoft Visual C++.
11546       # hardcode_libdir_flag_spec is actually meaningless, as there is
11547       # no search path for DLLs.
11548       case $cc_basename in
11549       cl*)
11550         # Native MSVC
11551         hardcode_libdir_flag_spec=' '
11552         allow_undefined_flag=unsupported
11553         always_export_symbols=yes
11554         file_list_spec='@'
11555         # Tell ltmain to make .lib files, not .a files.
11556         libext=lib
11557         # Tell ltmain to make .dll files, not .so files.
11558         shrext_cmds=".dll"
11559         # FIXME: Setting linknames here is a bad hack.
11560         archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
11561         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
11562             sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
11563           else
11564             sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
11565           fi~
11566           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
11567           linknames='
11568         # The linker will not automatically build a static lib if we build a DLL.
11569         # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
11570         enable_shared_with_static_runtimes=yes
11571         exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
11572         export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
11573         # Don't use ranlib
11574         old_postinstall_cmds='chmod 644 $oldlib'
11575         postlink_cmds='lt_outputfile="@OUTPUT@"~
11576           lt_tool_outputfile="@TOOL_OUTPUT@"~
11577           case $lt_outputfile in
11578             *.exe|*.EXE) ;;
11579             *)
11580               lt_outputfile="$lt_outputfile.exe"
11581               lt_tool_outputfile="$lt_tool_outputfile.exe"
11582               ;;
11583           esac~
11584           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
11585             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
11586             $RM "$lt_outputfile.manifest";
11587           fi'
11588         ;;
11589       *)
11590         # Assume MSVC wrapper
11591         hardcode_libdir_flag_spec=' '
11592         allow_undefined_flag=unsupported
11593         # Tell ltmain to make .lib files, not .a files.
11594         libext=lib
11595         # Tell ltmain to make .dll files, not .so files.
11596         shrext_cmds=".dll"
11597         # FIXME: Setting linknames here is a bad hack.
11598         archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
11599         # The linker will automatically build a .lib file if we build a DLL.
11600         old_archive_from_new_cmds='true'
11601         # FIXME: Should let the user specify the lib program.
11602         old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
11603         enable_shared_with_static_runtimes=yes
11604         ;;
11605       esac
11606       ;;
11607
11608     darwin* | rhapsody*)
11609
11610
11611   archive_cmds_need_lc=no
11612   hardcode_direct=no
11613   hardcode_automatic=yes
11614   hardcode_shlibpath_var=unsupported
11615   if test "$lt_cv_ld_force_load" = "yes"; then
11616     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\"`'
11617
11618   else
11619     whole_archive_flag_spec=''
11620   fi
11621   link_all_deplibs=yes
11622   allow_undefined_flag="$_lt_dar_allow_undefined"
11623   case $cc_basename in
11624      ifort*) _lt_dar_can_shared=yes ;;
11625      *) _lt_dar_can_shared=$GCC ;;
11626   esac
11627   if test "$_lt_dar_can_shared" = "yes"; then
11628     output_verbose_link_cmd=func_echo_all
11629     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
11630     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
11631     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}"
11632     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}"
11633
11634   else
11635   ld_shlibs=no
11636   fi
11637
11638       ;;
11639
11640     dgux*)
11641       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11642       hardcode_libdir_flag_spec='-L$libdir'
11643       hardcode_shlibpath_var=no
11644       ;;
11645
11646     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
11647     # support.  Future versions do this automatically, but an explicit c++rt0.o
11648     # does not break anything, and helps significantly (at the cost of a little
11649     # extra space).
11650     freebsd2.2*)
11651       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
11652       hardcode_libdir_flag_spec='-R$libdir'
11653       hardcode_direct=yes
11654       hardcode_shlibpath_var=no
11655       ;;
11656
11657     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
11658     freebsd2.*)
11659       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11660       hardcode_direct=yes
11661       hardcode_minus_L=yes
11662       hardcode_shlibpath_var=no
11663       ;;
11664
11665     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
11666     freebsd* | dragonfly*)
11667       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11668       hardcode_libdir_flag_spec='-R$libdir'
11669       hardcode_direct=yes
11670       hardcode_shlibpath_var=no
11671       ;;
11672
11673     hpux9*)
11674       if test "$GCC" = yes; then
11675         archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
11676       else
11677         archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
11678       fi
11679       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
11680       hardcode_libdir_separator=:
11681       hardcode_direct=yes
11682
11683       # hardcode_minus_L: Not really in the search PATH,
11684       # but as the default location of the library.
11685       hardcode_minus_L=yes
11686       export_dynamic_flag_spec='${wl}-E'
11687       ;;
11688
11689     hpux10*)
11690       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
11691         archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11692       else
11693         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11694       fi
11695       if test "$with_gnu_ld" = no; then
11696         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
11697         hardcode_libdir_separator=:
11698         hardcode_direct=yes
11699         hardcode_direct_absolute=yes
11700         export_dynamic_flag_spec='${wl}-E'
11701         # hardcode_minus_L: Not really in the search PATH,
11702         # but as the default location of the library.
11703         hardcode_minus_L=yes
11704       fi
11705       ;;
11706
11707     hpux11*)
11708       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
11709         case $host_cpu in
11710         hppa*64*)
11711           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11712           ;;
11713         ia64*)
11714           archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11715           ;;
11716         *)
11717           archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11718           ;;
11719         esac
11720       else
11721         case $host_cpu in
11722         hppa*64*)
11723           archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11724           ;;
11725         ia64*)
11726           archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11727           ;;
11728         *)
11729
11730           # Older versions of the 11.00 compiler do not understand -b yet
11731           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
11732           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
11733 $as_echo_n "checking if $CC understands -b... " >&6; }
11734 if ${lt_cv_prog_compiler__b+:} false; then :
11735   $as_echo_n "(cached) " >&6
11736 else
11737   lt_cv_prog_compiler__b=no
11738    save_LDFLAGS="$LDFLAGS"
11739    LDFLAGS="$LDFLAGS -b"
11740    echo "$lt_simple_link_test_code" > conftest.$ac_ext
11741    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11742      # The linker can only warn and ignore the option if not recognized
11743      # So say no if there are warnings
11744      if test -s conftest.err; then
11745        # Append any errors to the config.log.
11746        cat conftest.err 1>&5
11747        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11748        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11749        if diff conftest.exp conftest.er2 >/dev/null; then
11750          lt_cv_prog_compiler__b=yes
11751        fi
11752      else
11753        lt_cv_prog_compiler__b=yes
11754      fi
11755    fi
11756    $RM -r conftest*
11757    LDFLAGS="$save_LDFLAGS"
11758
11759 fi
11760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
11761 $as_echo "$lt_cv_prog_compiler__b" >&6; }
11762
11763 if test x"$lt_cv_prog_compiler__b" = xyes; then
11764     archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11765 else
11766     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11767 fi
11768
11769           ;;
11770         esac
11771       fi
11772       if test "$with_gnu_ld" = no; then
11773         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
11774         hardcode_libdir_separator=:
11775
11776         case $host_cpu in
11777         hppa*64*|ia64*)
11778           hardcode_direct=no
11779           hardcode_shlibpath_var=no
11780           ;;
11781         *)
11782           hardcode_direct=yes
11783           hardcode_direct_absolute=yes
11784           export_dynamic_flag_spec='${wl}-E'
11785
11786           # hardcode_minus_L: Not really in the search PATH,
11787           # but as the default location of the library.
11788           hardcode_minus_L=yes
11789           ;;
11790         esac
11791       fi
11792       ;;
11793
11794     irix5* | irix6* | nonstopux*)
11795       if test "$GCC" = yes; then
11796         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'
11797         # Try to use the -exported_symbol ld option, if it does not
11798         # work, assume that -exports_file does not work either and
11799         # implicitly export all symbols.
11800         # This should be the same for all languages, so no per-tag cache variable.
11801         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
11802 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
11803 if ${lt_cv_irix_exported_symbol+:} false; then :
11804   $as_echo_n "(cached) " >&6
11805 else
11806   save_LDFLAGS="$LDFLAGS"
11807            LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
11808            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11809 /* end confdefs.h.  */
11810 int foo (void) { return 0; }
11811 _ACEOF
11812 if ac_fn_c_try_link "$LINENO"; then :
11813   lt_cv_irix_exported_symbol=yes
11814 else
11815   lt_cv_irix_exported_symbol=no
11816 fi
11817 rm -f core conftest.err conftest.$ac_objext \
11818     conftest$ac_exeext conftest.$ac_ext
11819            LDFLAGS="$save_LDFLAGS"
11820 fi
11821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
11822 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
11823         if test "$lt_cv_irix_exported_symbol" = yes; then
11824           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'
11825         fi
11826       else
11827         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'
11828         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'
11829       fi
11830       archive_cmds_need_lc='no'
11831       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
11832       hardcode_libdir_separator=:
11833       inherit_rpath=yes
11834       link_all_deplibs=yes
11835       ;;
11836
11837     netbsd*)
11838       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11839         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
11840       else
11841         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
11842       fi
11843       hardcode_libdir_flag_spec='-R$libdir'
11844       hardcode_direct=yes
11845       hardcode_shlibpath_var=no
11846       ;;
11847
11848     newsos6)
11849       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11850       hardcode_direct=yes
11851       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
11852       hardcode_libdir_separator=:
11853       hardcode_shlibpath_var=no
11854       ;;
11855
11856     *nto* | *qnx*)
11857       ;;
11858
11859     openbsd*)
11860       if test -f /usr/libexec/ld.so; then
11861         hardcode_direct=yes
11862         hardcode_shlibpath_var=no
11863         hardcode_direct_absolute=yes
11864         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11865           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11866           archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
11867           hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
11868           export_dynamic_flag_spec='${wl}-E'
11869         else
11870           case $host_os in
11871            openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
11872              archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11873              hardcode_libdir_flag_spec='-R$libdir'
11874              ;;
11875            *)
11876              archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11877              hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
11878              ;;
11879           esac
11880         fi
11881       else
11882         ld_shlibs=no
11883       fi
11884       ;;
11885
11886     os2*)
11887       hardcode_libdir_flag_spec='-L$libdir'
11888       hardcode_minus_L=yes
11889       allow_undefined_flag=unsupported
11890       archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
11891       old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
11892       ;;
11893
11894     osf3*)
11895       if test "$GCC" = yes; then
11896         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
11897         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'
11898       else
11899         allow_undefined_flag=' -expect_unresolved \*'
11900         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'
11901       fi
11902       archive_cmds_need_lc='no'
11903       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
11904       hardcode_libdir_separator=:
11905       ;;
11906
11907     osf4* | osf5*)      # as osf3* with the addition of -msym flag
11908       if test "$GCC" = yes; then
11909         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
11910         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'
11911         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
11912       else
11913         allow_undefined_flag=' -expect_unresolved \*'
11914         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'
11915         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~
11916         $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'
11917
11918         # Both c and cxx compiler support -rpath directly
11919         hardcode_libdir_flag_spec='-rpath $libdir'
11920       fi
11921       archive_cmds_need_lc='no'
11922       hardcode_libdir_separator=:
11923       ;;
11924
11925     solaris*)
11926       no_undefined_flag=' -z defs'
11927       if test "$GCC" = yes; then
11928         wlarc='${wl}'
11929         archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11930         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11931           $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'
11932       else
11933         case `$CC -V 2>&1` in
11934         *"Compilers 5.0"*)
11935           wlarc=''
11936           archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11937           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11938           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
11939           ;;
11940         *)
11941           wlarc='${wl}'
11942           archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
11943           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11944           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
11945           ;;
11946         esac
11947       fi
11948       hardcode_libdir_flag_spec='-R$libdir'
11949       hardcode_shlibpath_var=no
11950       case $host_os in
11951       solaris2.[0-5] | solaris2.[0-5].*) ;;
11952       *)
11953         # The compiler driver will combine and reorder linker options,
11954         # but understands `-z linker_flag'.  GCC discards it without `$wl',
11955         # but is careful enough not to reorder.
11956         # Supported since Solaris 2.6 (maybe 2.5.1?)
11957         if test "$GCC" = yes; then
11958           whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
11959         else
11960           whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
11961         fi
11962         ;;
11963       esac
11964       link_all_deplibs=yes
11965       ;;
11966
11967     sunos4*)
11968       if test "x$host_vendor" = xsequent; then
11969         # Use $CC to link under sequent, because it throws in some extra .o
11970         # files that make .init and .fini sections work.
11971         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
11972       else
11973         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
11974       fi
11975       hardcode_libdir_flag_spec='-L$libdir'
11976       hardcode_direct=yes
11977       hardcode_minus_L=yes
11978       hardcode_shlibpath_var=no
11979       ;;
11980
11981     sysv4)
11982       case $host_vendor in
11983         sni)
11984           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11985           hardcode_direct=yes # is this really true???
11986         ;;
11987         siemens)
11988           ## LD is ld it makes a PLAMLIB
11989           ## CC just makes a GrossModule.
11990           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11991           reload_cmds='$CC -r -o $output$reload_objs'
11992           hardcode_direct=no
11993         ;;
11994         motorola)
11995           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11996           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
11997         ;;
11998       esac
11999       runpath_var='LD_RUN_PATH'
12000       hardcode_shlibpath_var=no
12001       ;;
12002
12003     sysv4.3*)
12004       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12005       hardcode_shlibpath_var=no
12006       export_dynamic_flag_spec='-Bexport'
12007       ;;
12008
12009     sysv4*MP*)
12010       if test -d /usr/nec; then
12011         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12012         hardcode_shlibpath_var=no
12013         runpath_var=LD_RUN_PATH
12014         hardcode_runpath_var=yes
12015         ld_shlibs=yes
12016       fi
12017       ;;
12018
12019     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12020       no_undefined_flag='${wl}-z,text'
12021       archive_cmds_need_lc=no
12022       hardcode_shlibpath_var=no
12023       runpath_var='LD_RUN_PATH'
12024
12025       if test "$GCC" = yes; then
12026         archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12027         archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12028       else
12029         archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12030         archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12031       fi
12032       ;;
12033
12034     sysv5* | sco3.2v5* | sco5v6*)
12035       # Note: We can NOT use -z defs as we might desire, because we do not
12036       # link with -lc, and that would cause any symbols used from libc to
12037       # always be unresolved, which means just about no library would
12038       # ever link correctly.  If we're not using GNU ld we use -z text
12039       # though, which does catch some bad symbols but isn't as heavy-handed
12040       # as -z defs.
12041       no_undefined_flag='${wl}-z,text'
12042       allow_undefined_flag='${wl}-z,nodefs'
12043       archive_cmds_need_lc=no
12044       hardcode_shlibpath_var=no
12045       hardcode_libdir_flag_spec='${wl}-R,$libdir'
12046       hardcode_libdir_separator=':'
12047       link_all_deplibs=yes
12048       export_dynamic_flag_spec='${wl}-Bexport'
12049       runpath_var='LD_RUN_PATH'
12050
12051       if test "$GCC" = yes; then
12052         archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12053         archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12054       else
12055         archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12056         archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12057       fi
12058       ;;
12059
12060     uts4*)
12061       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12062       hardcode_libdir_flag_spec='-L$libdir'
12063       hardcode_shlibpath_var=no
12064       ;;
12065
12066     *)
12067       ld_shlibs=no
12068       ;;
12069     esac
12070
12071     if test x$host_vendor = xsni; then
12072       case $host in
12073       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12074         export_dynamic_flag_spec='${wl}-Blargedynsym'
12075         ;;
12076       esac
12077     fi
12078   fi
12079
12080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12081 $as_echo "$ld_shlibs" >&6; }
12082 test "$ld_shlibs" = no && can_build_shared=no
12083
12084 with_gnu_ld=$with_gnu_ld
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100 #
12101 # Do we need to explicitly link libc?
12102 #
12103 case "x$archive_cmds_need_lc" in
12104 x|xyes)
12105   # Assume -lc should be added
12106   archive_cmds_need_lc=yes
12107
12108   if test "$enable_shared" = yes && test "$GCC" = yes; then
12109     case $archive_cmds in
12110     *'~'*)
12111       # FIXME: we may have to deal with multi-command sequences.
12112       ;;
12113     '$CC '*)
12114       # Test whether the compiler implicitly links with -lc since on some
12115       # systems, -lgcc has to come before -lc. If gcc already passes -lc
12116       # to ld, don't add -lc before -lgcc.
12117       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12118 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12119 if ${lt_cv_archive_cmds_need_lc+:} false; then :
12120   $as_echo_n "(cached) " >&6
12121 else
12122   $RM conftest*
12123         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12124
12125         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12126   (eval $ac_compile) 2>&5
12127   ac_status=$?
12128   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12129   test $ac_status = 0; } 2>conftest.err; then
12130           soname=conftest
12131           lib=conftest
12132           libobjs=conftest.$ac_objext
12133           deplibs=
12134           wl=$lt_prog_compiler_wl
12135           pic_flag=$lt_prog_compiler_pic
12136           compiler_flags=-v
12137           linker_flags=-v
12138           verstring=
12139           output_objdir=.
12140           libname=conftest
12141           lt_save_allow_undefined_flag=$allow_undefined_flag
12142           allow_undefined_flag=
12143           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12144   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12145   ac_status=$?
12146   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12147   test $ac_status = 0; }
12148           then
12149             lt_cv_archive_cmds_need_lc=no
12150           else
12151             lt_cv_archive_cmds_need_lc=yes
12152           fi
12153           allow_undefined_flag=$lt_save_allow_undefined_flag
12154         else
12155           cat conftest.err 1>&5
12156         fi
12157         $RM conftest*
12158
12159 fi
12160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12161 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12162       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12163       ;;
12164     esac
12165   fi
12166   ;;
12167 esac
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12321 $as_echo_n "checking dynamic linker characteristics... " >&6; }
12322
12323 if test "$GCC" = yes; then
12324   case $host_os in
12325     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
12326     *) lt_awk_arg="/^libraries:/" ;;
12327   esac
12328   case $host_os in
12329     mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
12330     *) lt_sed_strip_eq="s,=/,/,g" ;;
12331   esac
12332   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
12333   case $lt_search_path_spec in
12334   *\;*)
12335     # if the path contains ";" then we assume it to be the separator
12336     # otherwise default to the standard path separator (i.e. ":") - it is
12337     # assumed that no part of a normal pathname contains ";" but that should
12338     # okay in the real world where ";" in dirpaths is itself problematic.
12339     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
12340     ;;
12341   *)
12342     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
12343     ;;
12344   esac
12345   # Ok, now we have the path, separated by spaces, we can step through it
12346   # and add multilib dir if necessary.
12347   lt_tmp_lt_search_path_spec=
12348   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
12349   for lt_sys_path in $lt_search_path_spec; do
12350     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
12351       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
12352     else
12353       test -d "$lt_sys_path" && \
12354         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
12355     fi
12356   done
12357   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
12358 BEGIN {RS=" "; FS="/|\n";} {
12359   lt_foo="";
12360   lt_count=0;
12361   for (lt_i = NF; lt_i > 0; lt_i--) {
12362     if ($lt_i != "" && $lt_i != ".") {
12363       if ($lt_i == "..") {
12364         lt_count++;
12365       } else {
12366         if (lt_count == 0) {
12367           lt_foo="/" $lt_i lt_foo;
12368         } else {
12369           lt_count--;
12370         }
12371       }
12372     }
12373   }
12374   if (lt_foo != "") { lt_freq[lt_foo]++; }
12375   if (lt_freq[lt_foo] == 1) { print lt_foo; }
12376 }'`
12377   # AWK program above erroneously prepends '/' to C:/dos/paths
12378   # for these hosts.
12379   case $host_os in
12380     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
12381       $SED 's,/\([A-Za-z]:\),\1,g'` ;;
12382   esac
12383   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
12384 else
12385   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12386 fi
12387 library_names_spec=
12388 libname_spec='lib$name'
12389 soname_spec=
12390 shrext_cmds=".so"
12391 postinstall_cmds=
12392 postuninstall_cmds=
12393 finish_cmds=
12394 finish_eval=
12395 shlibpath_var=
12396 shlibpath_overrides_runpath=unknown
12397 version_type=none
12398 dynamic_linker="$host_os ld.so"
12399 sys_lib_dlsearch_path_spec="/lib /usr/lib"
12400 need_lib_prefix=unknown
12401 hardcode_into_libs=no
12402
12403 # when you set need_version to no, make sure it does not cause -set_version
12404 # flags to be left without arguments
12405 need_version=unknown
12406
12407 case $host_os in
12408 aix3*)
12409   version_type=linux # correct to gnu/linux during the next big refactor
12410   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
12411   shlibpath_var=LIBPATH
12412
12413   # AIX 3 has no versioning support, so we append a major version to the name.
12414   soname_spec='${libname}${release}${shared_ext}$major'
12415   ;;
12416
12417 aix[4-9]*)
12418   version_type=linux # correct to gnu/linux during the next big refactor
12419   need_lib_prefix=no
12420   need_version=no
12421   hardcode_into_libs=yes
12422   if test "$host_cpu" = ia64; then
12423     # AIX 5 supports IA64
12424     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
12425     shlibpath_var=LD_LIBRARY_PATH
12426   else
12427     # With GCC up to 2.95.x, collect2 would create an import file
12428     # for dependence libraries.  The import file would start with
12429     # the line `#! .'.  This would cause the generated library to
12430     # depend on `.', always an invalid library.  This was fixed in
12431     # development snapshots of GCC prior to 3.0.
12432     case $host_os in
12433       aix4 | aix4.[01] | aix4.[01].*)
12434       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12435            echo ' yes '
12436            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
12437         :
12438       else
12439         can_build_shared=no
12440       fi
12441       ;;
12442     esac
12443     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
12444     # soname into executable. Probably we can add versioning support to
12445     # collect2, so additional links can be useful in future.
12446     if test "$aix_use_runtimelinking" = yes; then
12447       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
12448       # instead of lib<name>.a to let people know that these are not
12449       # typical AIX shared libraries.
12450       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12451     else
12452       # We preserve .a as extension for shared libraries through AIX4.2
12453       # and later when we are not doing run time linking.
12454       library_names_spec='${libname}${release}.a $libname.a'
12455       soname_spec='${libname}${release}${shared_ext}$major'
12456     fi
12457     shlibpath_var=LIBPATH
12458   fi
12459   ;;
12460
12461 amigaos*)
12462   case $host_cpu in
12463   powerpc)
12464     # Since July 2007 AmigaOS4 officially supports .so libraries.
12465     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
12466     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12467     ;;
12468   m68k)
12469     library_names_spec='$libname.ixlibrary $libname.a'
12470     # Create ${libname}_ixlibrary.a entries in /sys/libs.
12471     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $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'
12472     ;;
12473   esac
12474   ;;
12475
12476 beos*)
12477   library_names_spec='${libname}${shared_ext}'
12478   dynamic_linker="$host_os ld.so"
12479   shlibpath_var=LIBRARY_PATH
12480   ;;
12481
12482 bsdi[45]*)
12483   version_type=linux # correct to gnu/linux during the next big refactor
12484   need_version=no
12485   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12486   soname_spec='${libname}${release}${shared_ext}$major'
12487   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
12488   shlibpath_var=LD_LIBRARY_PATH
12489   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
12490   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
12491   # the default ld.so.conf also contains /usr/contrib/lib and
12492   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
12493   # libtool to hard-code these into programs
12494   ;;
12495
12496 cygwin* | mingw* | pw32* | cegcc*)
12497   version_type=windows
12498   shrext_cmds=".dll"
12499   need_version=no
12500   need_lib_prefix=no
12501
12502   case $GCC,$cc_basename in
12503   yes,*)
12504     # gcc
12505     library_names_spec='$libname.dll.a'
12506     # DLL is installed to $(libdir)/../bin by postinstall_cmds
12507     postinstall_cmds='base_file=`basename \${file}`~
12508       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
12509       dldir=$destdir/`dirname \$dlpath`~
12510       test -d \$dldir || mkdir -p \$dldir~
12511       $install_prog $dir/$dlname \$dldir/$dlname~
12512       chmod a+x \$dldir/$dlname~
12513       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
12514         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
12515       fi'
12516     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
12517       dlpath=$dir/\$dldll~
12518        $RM \$dlpath'
12519     shlibpath_overrides_runpath=yes
12520
12521     case $host_os in
12522     cygwin*)
12523       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
12524       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12525
12526       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
12527       ;;
12528     mingw* | cegcc*)
12529       # MinGW DLLs use traditional 'lib' prefix
12530       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12531       ;;
12532     pw32*)
12533       # pw32 DLLs use 'pw' prefix rather than 'lib'
12534       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12535       ;;
12536     esac
12537     dynamic_linker='Win32 ld.exe'
12538     ;;
12539
12540   *,cl*)
12541     # Native MSVC
12542     libname_spec='$name'
12543     soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12544     library_names_spec='${libname}.dll.lib'
12545
12546     case $build_os in
12547     mingw*)
12548       sys_lib_search_path_spec=
12549       lt_save_ifs=$IFS
12550       IFS=';'
12551       for lt_path in $LIB
12552       do
12553         IFS=$lt_save_ifs
12554         # Let DOS variable expansion print the short 8.3 style file name.
12555         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
12556         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
12557       done
12558       IFS=$lt_save_ifs
12559       # Convert to MSYS style.
12560       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
12561       ;;
12562     cygwin*)
12563       # Convert to unix form, then to dos form, then back to unix form
12564       # but this time dos style (no spaces!) so that the unix form looks
12565       # like /cygdrive/c/PROGRA~1:/cygdr...
12566       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
12567       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
12568       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
12569       ;;
12570     *)
12571       sys_lib_search_path_spec="$LIB"
12572       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
12573         # It is most probably a Windows format PATH.
12574         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
12575       else
12576         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
12577       fi
12578       # FIXME: find the short name or the path components, as spaces are
12579       # common. (e.g. "Program Files" -> "PROGRA~1")
12580       ;;
12581     esac
12582
12583     # DLL is installed to $(libdir)/../bin by postinstall_cmds
12584     postinstall_cmds='base_file=`basename \${file}`~
12585       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
12586       dldir=$destdir/`dirname \$dlpath`~
12587       test -d \$dldir || mkdir -p \$dldir~
12588       $install_prog $dir/$dlname \$dldir/$dlname'
12589     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
12590       dlpath=$dir/\$dldll~
12591        $RM \$dlpath'
12592     shlibpath_overrides_runpath=yes
12593     dynamic_linker='Win32 link.exe'
12594     ;;
12595
12596   *)
12597     # Assume MSVC wrapper
12598     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
12599     dynamic_linker='Win32 ld.exe'
12600     ;;
12601   esac
12602   # FIXME: first we should search . and the directory the executable is in
12603   shlibpath_var=PATH
12604   ;;
12605
12606 darwin* | rhapsody*)
12607   dynamic_linker="$host_os dyld"
12608   version_type=darwin
12609   need_lib_prefix=no
12610   need_version=no
12611   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
12612   soname_spec='${libname}${release}${major}$shared_ext'
12613   shlibpath_overrides_runpath=yes
12614   shlibpath_var=DYLD_LIBRARY_PATH
12615   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
12616
12617   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
12618   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
12619   ;;
12620
12621 dgux*)
12622   version_type=linux # correct to gnu/linux during the next big refactor
12623   need_lib_prefix=no
12624   need_version=no
12625   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
12626   soname_spec='${libname}${release}${shared_ext}$major'
12627   shlibpath_var=LD_LIBRARY_PATH
12628   ;;
12629
12630 freebsd* | dragonfly*)
12631   # DragonFly does not have aout.  When/if they implement a new
12632   # versioning mechanism, adjust this.
12633   if test -x /usr/bin/objformat; then
12634     objformat=`/usr/bin/objformat`
12635   else
12636     case $host_os in
12637     freebsd[23].*) objformat=aout ;;
12638     *) objformat=elf ;;
12639     esac
12640   fi
12641   version_type=freebsd-$objformat
12642   case $version_type in
12643     freebsd-elf*)
12644       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
12645       need_version=no
12646       need_lib_prefix=no
12647       ;;
12648     freebsd-*)
12649       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
12650       need_version=yes
12651       ;;
12652   esac
12653   shlibpath_var=LD_LIBRARY_PATH
12654   case $host_os in
12655   freebsd2.*)
12656     shlibpath_overrides_runpath=yes
12657     ;;
12658   freebsd3.[01]* | freebsdelf3.[01]*)
12659     shlibpath_overrides_runpath=yes
12660     hardcode_into_libs=yes
12661     ;;
12662   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
12663   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
12664     shlibpath_overrides_runpath=no
12665     hardcode_into_libs=yes
12666     ;;
12667   *) # from 4.6 on, and DragonFly
12668     shlibpath_overrides_runpath=yes
12669     hardcode_into_libs=yes
12670     ;;
12671   esac
12672   ;;
12673
12674 gnu*)
12675   version_type=linux # correct to gnu/linux during the next big refactor
12676   need_lib_prefix=no
12677   need_version=no
12678   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
12679   soname_spec='${libname}${release}${shared_ext}$major'
12680   shlibpath_var=LD_LIBRARY_PATH
12681   shlibpath_overrides_runpath=no
12682   hardcode_into_libs=yes
12683   ;;
12684
12685 haiku*)
12686   version_type=linux # correct to gnu/linux during the next big refactor
12687   need_lib_prefix=no
12688   need_version=no
12689   dynamic_linker="$host_os runtime_loader"
12690   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
12691   soname_spec='${libname}${release}${shared_ext}$major'
12692   shlibpath_var=LIBRARY_PATH
12693   shlibpath_overrides_runpath=yes
12694   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
12695   hardcode_into_libs=yes
12696   ;;
12697
12698 hpux9* | hpux10* | hpux11*)
12699   # Give a soname corresponding to the major version so that dld.sl refuses to
12700   # link against other versions.
12701   version_type=sunos
12702   need_lib_prefix=no
12703   need_version=no
12704   case $host_cpu in
12705   ia64*)
12706     shrext_cmds='.so'
12707     hardcode_into_libs=yes
12708     dynamic_linker="$host_os dld.so"
12709     shlibpath_var=LD_LIBRARY_PATH
12710     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12711     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12712     soname_spec='${libname}${release}${shared_ext}$major'
12713     if test "X$HPUX_IA64_MODE" = X32; then
12714       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
12715     else
12716       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
12717     fi
12718     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12719     ;;
12720   hppa*64*)
12721     shrext_cmds='.sl'
12722     hardcode_into_libs=yes
12723     dynamic_linker="$host_os dld.sl"
12724     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
12725     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12726     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12727     soname_spec='${libname}${release}${shared_ext}$major'
12728     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
12729     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12730     ;;
12731   *)
12732     shrext_cmds='.sl'
12733     dynamic_linker="$host_os dld.sl"
12734     shlibpath_var=SHLIB_PATH
12735     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
12736     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12737     soname_spec='${libname}${release}${shared_ext}$major'
12738     ;;
12739   esac
12740   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
12741   postinstall_cmds='chmod 555 $lib'
12742   # or fails outright, so override atomically:
12743   install_override_mode=555
12744   ;;
12745
12746 interix[3-9]*)
12747   version_type=linux # correct to gnu/linux during the next big refactor
12748   need_lib_prefix=no
12749   need_version=no
12750   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12751   soname_spec='${libname}${release}${shared_ext}$major'
12752   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
12753   shlibpath_var=LD_LIBRARY_PATH
12754   shlibpath_overrides_runpath=no
12755   hardcode_into_libs=yes
12756   ;;
12757
12758 irix5* | irix6* | nonstopux*)
12759   case $host_os in
12760     nonstopux*) version_type=nonstopux ;;
12761     *)
12762         if test "$lt_cv_prog_gnu_ld" = yes; then
12763                 version_type=linux # correct to gnu/linux during the next big refactor
12764         else
12765                 version_type=irix
12766         fi ;;
12767   esac
12768   need_lib_prefix=no
12769   need_version=no
12770   soname_spec='${libname}${release}${shared_ext}$major'
12771   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
12772   case $host_os in
12773   irix5* | nonstopux*)
12774     libsuff= shlibsuff=
12775     ;;
12776   *)
12777     case $LD in # libtool.m4 will add one of these switches to LD
12778     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
12779       libsuff= shlibsuff= libmagic=32-bit;;
12780     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
12781       libsuff=32 shlibsuff=N32 libmagic=N32;;
12782     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
12783       libsuff=64 shlibsuff=64 libmagic=64-bit;;
12784     *) libsuff= shlibsuff= libmagic=never-match;;
12785     esac
12786     ;;
12787   esac
12788   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
12789   shlibpath_overrides_runpath=no
12790   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
12791   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
12792   hardcode_into_libs=yes
12793   ;;
12794
12795 # No shared lib support for Linux oldld, aout, or coff.
12796 linux*oldld* | linux*aout* | linux*coff*)
12797   dynamic_linker=no
12798   ;;
12799
12800 # This must be glibc/ELF.
12801 linux* | k*bsd*-gnu | kopensolaris*-gnu)
12802   version_type=linux # correct to gnu/linux during the next big refactor
12803   need_lib_prefix=no
12804   need_version=no
12805   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12806   soname_spec='${libname}${release}${shared_ext}$major'
12807   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
12808   shlibpath_var=LD_LIBRARY_PATH
12809   shlibpath_overrides_runpath=no
12810
12811   # Some binutils ld are patched to set DT_RUNPATH
12812   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
12813   $as_echo_n "(cached) " >&6
12814 else
12815   lt_cv_shlibpath_overrides_runpath=no
12816     save_LDFLAGS=$LDFLAGS
12817     save_libdir=$libdir
12818     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
12819          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
12820     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12821 /* end confdefs.h.  */
12822
12823 int
12824 main ()
12825 {
12826
12827   ;
12828   return 0;
12829 }
12830 _ACEOF
12831 if ac_fn_c_try_link "$LINENO"; then :
12832   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
12833   lt_cv_shlibpath_overrides_runpath=yes
12834 fi
12835 fi
12836 rm -f core conftest.err conftest.$ac_objext \
12837     conftest$ac_exeext conftest.$ac_ext
12838     LDFLAGS=$save_LDFLAGS
12839     libdir=$save_libdir
12840
12841 fi
12842
12843   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
12844
12845   # This implies no fast_install, which is unacceptable.
12846   # Some rework will be needed to allow for fast_install
12847   # before this can be enabled.
12848   hardcode_into_libs=yes
12849
12850   # Add ABI-specific directories to the system library path.
12851   sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
12852
12853   # Append ld.so.conf contents to the search path
12854   if test -f /etc/ld.so.conf; then
12855     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' ' '`
12856     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
12857
12858   fi
12859
12860   # We used to test for /lib/ld.so.1 and disable shared libraries on
12861   # powerpc, because MkLinux only supported shared libraries with the
12862   # GNU dynamic linker.  Since this was broken with cross compilers,
12863   # most powerpc-linux boxes support dynamic linking these days and
12864   # people can always --disable-shared, the test was removed, and we
12865   # assume the GNU/Linux dynamic linker is in use.
12866   dynamic_linker='GNU/Linux ld.so'
12867   ;;
12868
12869 netbsd*)
12870   version_type=sunos
12871   need_lib_prefix=no
12872   need_version=no
12873   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12874     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
12875     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
12876     dynamic_linker='NetBSD (a.out) ld.so'
12877   else
12878     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12879     soname_spec='${libname}${release}${shared_ext}$major'
12880     dynamic_linker='NetBSD ld.elf_so'
12881   fi
12882   shlibpath_var=LD_LIBRARY_PATH
12883   shlibpath_overrides_runpath=yes
12884   hardcode_into_libs=yes
12885   ;;
12886
12887 newsos6)
12888   version_type=linux # correct to gnu/linux during the next big refactor
12889   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12890   shlibpath_var=LD_LIBRARY_PATH
12891   shlibpath_overrides_runpath=yes
12892   ;;
12893
12894 *nto* | *qnx*)
12895   version_type=qnx
12896   need_lib_prefix=no
12897   need_version=no
12898   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12899   soname_spec='${libname}${release}${shared_ext}$major'
12900   shlibpath_var=LD_LIBRARY_PATH
12901   shlibpath_overrides_runpath=no
12902   hardcode_into_libs=yes
12903   dynamic_linker='ldqnx.so'
12904   ;;
12905
12906 openbsd*)
12907   version_type=sunos
12908   sys_lib_dlsearch_path_spec="/usr/lib"
12909   need_lib_prefix=no
12910   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
12911   case $host_os in
12912     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
12913     *)                          need_version=no  ;;
12914   esac
12915   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
12916   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
12917   shlibpath_var=LD_LIBRARY_PATH
12918   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
12919     case $host_os in
12920       openbsd2.[89] | openbsd2.[89].*)
12921         shlibpath_overrides_runpath=no
12922         ;;
12923       *)
12924         shlibpath_overrides_runpath=yes
12925         ;;
12926       esac
12927   else
12928     shlibpath_overrides_runpath=yes
12929   fi
12930   ;;
12931
12932 os2*)
12933   libname_spec='$name'
12934   shrext_cmds=".dll"
12935   need_lib_prefix=no
12936   library_names_spec='$libname${shared_ext} $libname.a'
12937   dynamic_linker='OS/2 ld.exe'
12938   shlibpath_var=LIBPATH
12939   ;;
12940
12941 osf3* | osf4* | osf5*)
12942   version_type=osf
12943   need_lib_prefix=no
12944   need_version=no
12945   soname_spec='${libname}${release}${shared_ext}$major'
12946   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12947   shlibpath_var=LD_LIBRARY_PATH
12948   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
12949   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
12950   ;;
12951
12952 rdos*)
12953   dynamic_linker=no
12954   ;;
12955
12956 solaris*)
12957   version_type=linux # correct to gnu/linux during the next big refactor
12958   need_lib_prefix=no
12959   need_version=no
12960   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12961   soname_spec='${libname}${release}${shared_ext}$major'
12962   shlibpath_var=LD_LIBRARY_PATH
12963   shlibpath_overrides_runpath=yes
12964   hardcode_into_libs=yes
12965   # ldd complains unless libraries are executable
12966   postinstall_cmds='chmod +x $lib'
12967   ;;
12968
12969 sunos4*)
12970   version_type=sunos
12971   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
12972   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
12973   shlibpath_var=LD_LIBRARY_PATH
12974   shlibpath_overrides_runpath=yes
12975   if test "$with_gnu_ld" = yes; then
12976     need_lib_prefix=no
12977   fi
12978   need_version=yes
12979   ;;
12980
12981 sysv4 | sysv4.3*)
12982   version_type=linux # correct to gnu/linux during the next big refactor
12983   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12984   soname_spec='${libname}${release}${shared_ext}$major'
12985   shlibpath_var=LD_LIBRARY_PATH
12986   case $host_vendor in
12987     sni)
12988       shlibpath_overrides_runpath=no
12989       need_lib_prefix=no
12990       runpath_var=LD_RUN_PATH
12991       ;;
12992     siemens)
12993       need_lib_prefix=no
12994       ;;
12995     motorola)
12996       need_lib_prefix=no
12997       need_version=no
12998       shlibpath_overrides_runpath=no
12999       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13000       ;;
13001   esac
13002   ;;
13003
13004 sysv4*MP*)
13005   if test -d /usr/nec ;then
13006     version_type=linux # correct to gnu/linux during the next big refactor
13007     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
13008     soname_spec='$libname${shared_ext}.$major'
13009     shlibpath_var=LD_LIBRARY_PATH
13010   fi
13011   ;;
13012
13013 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13014   version_type=freebsd-elf
13015   need_lib_prefix=no
13016   need_version=no
13017   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
13018   soname_spec='${libname}${release}${shared_ext}$major'
13019   shlibpath_var=LD_LIBRARY_PATH
13020   shlibpath_overrides_runpath=yes
13021   hardcode_into_libs=yes
13022   if test "$with_gnu_ld" = yes; then
13023     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13024   else
13025     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13026     case $host_os in
13027       sco3.2v5*)
13028         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13029         ;;
13030     esac
13031   fi
13032   sys_lib_dlsearch_path_spec='/usr/lib'
13033   ;;
13034
13035 tpf*)
13036   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13037   version_type=linux # correct to gnu/linux during the next big refactor
13038   need_lib_prefix=no
13039   need_version=no
13040   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13041   shlibpath_var=LD_LIBRARY_PATH
13042   shlibpath_overrides_runpath=no
13043   hardcode_into_libs=yes
13044   ;;
13045
13046 uts4*)
13047   version_type=linux # correct to gnu/linux during the next big refactor
13048   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13049   soname_spec='${libname}${release}${shared_ext}$major'
13050   shlibpath_var=LD_LIBRARY_PATH
13051   ;;
13052
13053 *)
13054   dynamic_linker=no
13055   ;;
13056 esac
13057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13058 $as_echo "$dynamic_linker" >&6; }
13059 test "$dynamic_linker" = no && can_build_shared=no
13060
13061 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13062 if test "$GCC" = yes; then
13063   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13064 fi
13065
13066 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
13067   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
13068 fi
13069 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
13070   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
13071 fi
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13165 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13166 hardcode_action=
13167 if test -n "$hardcode_libdir_flag_spec" ||
13168    test -n "$runpath_var" ||
13169    test "X$hardcode_automatic" = "Xyes" ; then
13170
13171   # We can hardcode non-existent directories.
13172   if test "$hardcode_direct" != no &&
13173      # If the only mechanism to avoid hardcoding is shlibpath_var, we
13174      # have to relink, otherwise we might link with an installed library
13175      # when we should be linking with a yet-to-be-installed one
13176      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
13177      test "$hardcode_minus_L" != no; then
13178     # Linking always hardcodes the temporary library directory.
13179     hardcode_action=relink
13180   else
13181     # We can link without hardcoding, and we can hardcode nonexisting dirs.
13182     hardcode_action=immediate
13183   fi
13184 else
13185   # We cannot hardcode anything, or else we can only hardcode existing
13186   # directories.
13187   hardcode_action=unsupported
13188 fi
13189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13190 $as_echo "$hardcode_action" >&6; }
13191
13192 if test "$hardcode_action" = relink ||
13193    test "$inherit_rpath" = yes; then
13194   # Fast installation is not supported
13195   enable_fast_install=no
13196 elif test "$shlibpath_overrides_runpath" = yes ||
13197      test "$enable_shared" = no; then
13198   # Fast installation is not necessary
13199   enable_fast_install=needless
13200 fi
13201
13202
13203
13204
13205
13206
13207   if test "x$enable_dlopen" != xyes; then
13208   enable_dlopen=unknown
13209   enable_dlopen_self=unknown
13210   enable_dlopen_self_static=unknown
13211 else
13212   lt_cv_dlopen=no
13213   lt_cv_dlopen_libs=
13214
13215   case $host_os in
13216   beos*)
13217     lt_cv_dlopen="load_add_on"
13218     lt_cv_dlopen_libs=
13219     lt_cv_dlopen_self=yes
13220     ;;
13221
13222   mingw* | pw32* | cegcc*)
13223     lt_cv_dlopen="LoadLibrary"
13224     lt_cv_dlopen_libs=
13225     ;;
13226
13227   cygwin*)
13228     lt_cv_dlopen="dlopen"
13229     lt_cv_dlopen_libs=
13230     ;;
13231
13232   darwin*)
13233   # if libdl is installed we need to link against it
13234     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13235 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13236 if ${ac_cv_lib_dl_dlopen+:} false; then :
13237   $as_echo_n "(cached) " >&6
13238 else
13239   ac_check_lib_save_LIBS=$LIBS
13240 LIBS="-ldl  $LIBS"
13241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13242 /* end confdefs.h.  */
13243
13244 /* Override any GCC internal prototype to avoid an error.
13245    Use char because int might match the return type of a GCC
13246    builtin and then its argument prototype would still apply.  */
13247 #ifdef __cplusplus
13248 extern "C"
13249 #endif
13250 char dlopen ();
13251 int
13252 main ()
13253 {
13254 return dlopen ();
13255   ;
13256   return 0;
13257 }
13258 _ACEOF
13259 if ac_fn_c_try_link "$LINENO"; then :
13260   ac_cv_lib_dl_dlopen=yes
13261 else
13262   ac_cv_lib_dl_dlopen=no
13263 fi
13264 rm -f core conftest.err conftest.$ac_objext \
13265     conftest$ac_exeext conftest.$ac_ext
13266 LIBS=$ac_check_lib_save_LIBS
13267 fi
13268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13269 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13270 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13271   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
13272 else
13273
13274     lt_cv_dlopen="dyld"
13275     lt_cv_dlopen_libs=
13276     lt_cv_dlopen_self=yes
13277
13278 fi
13279
13280     ;;
13281
13282   *)
13283     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
13284 if test "x$ac_cv_func_shl_load" = xyes; then :
13285   lt_cv_dlopen="shl_load"
13286 else
13287   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
13288 $as_echo_n "checking for shl_load in -ldld... " >&6; }
13289 if ${ac_cv_lib_dld_shl_load+:} false; then :
13290   $as_echo_n "(cached) " >&6
13291 else
13292   ac_check_lib_save_LIBS=$LIBS
13293 LIBS="-ldld  $LIBS"
13294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13295 /* end confdefs.h.  */
13296
13297 /* Override any GCC internal prototype to avoid an error.
13298    Use char because int might match the return type of a GCC
13299    builtin and then its argument prototype would still apply.  */
13300 #ifdef __cplusplus
13301 extern "C"
13302 #endif
13303 char shl_load ();
13304 int
13305 main ()
13306 {
13307 return shl_load ();
13308   ;
13309   return 0;
13310 }
13311 _ACEOF
13312 if ac_fn_c_try_link "$LINENO"; then :
13313   ac_cv_lib_dld_shl_load=yes
13314 else
13315   ac_cv_lib_dld_shl_load=no
13316 fi
13317 rm -f core conftest.err conftest.$ac_objext \
13318     conftest$ac_exeext conftest.$ac_ext
13319 LIBS=$ac_check_lib_save_LIBS
13320 fi
13321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
13322 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
13323 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
13324   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
13325 else
13326   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
13327 if test "x$ac_cv_func_dlopen" = xyes; then :
13328   lt_cv_dlopen="dlopen"
13329 else
13330   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13331 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13332 if ${ac_cv_lib_dl_dlopen+:} false; then :
13333   $as_echo_n "(cached) " >&6
13334 else
13335   ac_check_lib_save_LIBS=$LIBS
13336 LIBS="-ldl  $LIBS"
13337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13338 /* end confdefs.h.  */
13339
13340 /* Override any GCC internal prototype to avoid an error.
13341    Use char because int might match the return type of a GCC
13342    builtin and then its argument prototype would still apply.  */
13343 #ifdef __cplusplus
13344 extern "C"
13345 #endif
13346 char dlopen ();
13347 int
13348 main ()
13349 {
13350 return dlopen ();
13351   ;
13352   return 0;
13353 }
13354 _ACEOF
13355 if ac_fn_c_try_link "$LINENO"; then :
13356   ac_cv_lib_dl_dlopen=yes
13357 else
13358   ac_cv_lib_dl_dlopen=no
13359 fi
13360 rm -f core conftest.err conftest.$ac_objext \
13361     conftest$ac_exeext conftest.$ac_ext
13362 LIBS=$ac_check_lib_save_LIBS
13363 fi
13364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13365 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13366 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13367   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
13368 else
13369   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
13370 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
13371 if ${ac_cv_lib_svld_dlopen+:} false; then :
13372   $as_echo_n "(cached) " >&6
13373 else
13374   ac_check_lib_save_LIBS=$LIBS
13375 LIBS="-lsvld  $LIBS"
13376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13377 /* end confdefs.h.  */
13378
13379 /* Override any GCC internal prototype to avoid an error.
13380    Use char because int might match the return type of a GCC
13381    builtin and then its argument prototype would still apply.  */
13382 #ifdef __cplusplus
13383 extern "C"
13384 #endif
13385 char dlopen ();
13386 int
13387 main ()
13388 {
13389 return dlopen ();
13390   ;
13391   return 0;
13392 }
13393 _ACEOF
13394 if ac_fn_c_try_link "$LINENO"; then :
13395   ac_cv_lib_svld_dlopen=yes
13396 else
13397   ac_cv_lib_svld_dlopen=no
13398 fi
13399 rm -f core conftest.err conftest.$ac_objext \
13400     conftest$ac_exeext conftest.$ac_ext
13401 LIBS=$ac_check_lib_save_LIBS
13402 fi
13403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
13404 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
13405 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
13406   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
13407 else
13408   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
13409 $as_echo_n "checking for dld_link in -ldld... " >&6; }
13410 if ${ac_cv_lib_dld_dld_link+:} false; then :
13411   $as_echo_n "(cached) " >&6
13412 else
13413   ac_check_lib_save_LIBS=$LIBS
13414 LIBS="-ldld  $LIBS"
13415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13416 /* end confdefs.h.  */
13417
13418 /* Override any GCC internal prototype to avoid an error.
13419    Use char because int might match the return type of a GCC
13420    builtin and then its argument prototype would still apply.  */
13421 #ifdef __cplusplus
13422 extern "C"
13423 #endif
13424 char dld_link ();
13425 int
13426 main ()
13427 {
13428 return dld_link ();
13429   ;
13430   return 0;
13431 }
13432 _ACEOF
13433 if ac_fn_c_try_link "$LINENO"; then :
13434   ac_cv_lib_dld_dld_link=yes
13435 else
13436   ac_cv_lib_dld_dld_link=no
13437 fi
13438 rm -f core conftest.err conftest.$ac_objext \
13439     conftest$ac_exeext conftest.$ac_ext
13440 LIBS=$ac_check_lib_save_LIBS
13441 fi
13442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
13443 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
13444 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
13445   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
13446 fi
13447
13448
13449 fi
13450
13451
13452 fi
13453
13454
13455 fi
13456
13457
13458 fi
13459
13460
13461 fi
13462
13463     ;;
13464   esac
13465
13466   if test "x$lt_cv_dlopen" != xno; then
13467     enable_dlopen=yes
13468   else
13469     enable_dlopen=no
13470   fi
13471
13472   case $lt_cv_dlopen in
13473   dlopen)
13474     save_CPPFLAGS="$CPPFLAGS"
13475     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
13476
13477     save_LDFLAGS="$LDFLAGS"
13478     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
13479
13480     save_LIBS="$LIBS"
13481     LIBS="$lt_cv_dlopen_libs $LIBS"
13482
13483     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
13484 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
13485 if ${lt_cv_dlopen_self+:} false; then :
13486   $as_echo_n "(cached) " >&6
13487 else
13488           if test "$cross_compiling" = yes; then :
13489   lt_cv_dlopen_self=cross
13490 else
13491   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13492   lt_status=$lt_dlunknown
13493   cat > conftest.$ac_ext <<_LT_EOF
13494 #line $LINENO "configure"
13495 #include "confdefs.h"
13496
13497 #if HAVE_DLFCN_H
13498 #include <dlfcn.h>
13499 #endif
13500
13501 #include <stdio.h>
13502
13503 #ifdef RTLD_GLOBAL
13504 #  define LT_DLGLOBAL           RTLD_GLOBAL
13505 #else
13506 #  ifdef DL_GLOBAL
13507 #    define LT_DLGLOBAL         DL_GLOBAL
13508 #  else
13509 #    define LT_DLGLOBAL         0
13510 #  endif
13511 #endif
13512
13513 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
13514    find out it does not work in some platform. */
13515 #ifndef LT_DLLAZY_OR_NOW
13516 #  ifdef RTLD_LAZY
13517 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
13518 #  else
13519 #    ifdef DL_LAZY
13520 #      define LT_DLLAZY_OR_NOW          DL_LAZY
13521 #    else
13522 #      ifdef RTLD_NOW
13523 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
13524 #      else
13525 #        ifdef DL_NOW
13526 #          define LT_DLLAZY_OR_NOW      DL_NOW
13527 #        else
13528 #          define LT_DLLAZY_OR_NOW      0
13529 #        endif
13530 #      endif
13531 #    endif
13532 #  endif
13533 #endif
13534
13535 /* When -fvisbility=hidden is used, assume the code has been annotated
13536    correspondingly for the symbols needed.  */
13537 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
13538 int fnord () __attribute__((visibility("default")));
13539 #endif
13540
13541 int fnord () { return 42; }
13542 int main ()
13543 {
13544   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
13545   int status = $lt_dlunknown;
13546
13547   if (self)
13548     {
13549       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
13550       else
13551         {
13552           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
13553           else puts (dlerror ());
13554         }
13555       /* dlclose (self); */
13556     }
13557   else
13558     puts (dlerror ());
13559
13560   return status;
13561 }
13562 _LT_EOF
13563   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13564   (eval $ac_link) 2>&5
13565   ac_status=$?
13566   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13567   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
13568     (./conftest; exit; ) >&5 2>/dev/null
13569     lt_status=$?
13570     case x$lt_status in
13571       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
13572       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
13573       x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
13574     esac
13575   else :
13576     # compilation failed
13577     lt_cv_dlopen_self=no
13578   fi
13579 fi
13580 rm -fr conftest*
13581
13582
13583 fi
13584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
13585 $as_echo "$lt_cv_dlopen_self" >&6; }
13586
13587     if test "x$lt_cv_dlopen_self" = xyes; then
13588       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
13589       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
13590 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
13591 if ${lt_cv_dlopen_self_static+:} false; then :
13592   $as_echo_n "(cached) " >&6
13593 else
13594           if test "$cross_compiling" = yes; then :
13595   lt_cv_dlopen_self_static=cross
13596 else
13597   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13598   lt_status=$lt_dlunknown
13599   cat > conftest.$ac_ext <<_LT_EOF
13600 #line $LINENO "configure"
13601 #include "confdefs.h"
13602
13603 #if HAVE_DLFCN_H
13604 #include <dlfcn.h>
13605 #endif
13606
13607 #include <stdio.h>
13608
13609 #ifdef RTLD_GLOBAL
13610 #  define LT_DLGLOBAL           RTLD_GLOBAL
13611 #else
13612 #  ifdef DL_GLOBAL
13613 #    define LT_DLGLOBAL         DL_GLOBAL
13614 #  else
13615 #    define LT_DLGLOBAL         0
13616 #  endif
13617 #endif
13618
13619 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
13620    find out it does not work in some platform. */
13621 #ifndef LT_DLLAZY_OR_NOW
13622 #  ifdef RTLD_LAZY
13623 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
13624 #  else
13625 #    ifdef DL_LAZY
13626 #      define LT_DLLAZY_OR_NOW          DL_LAZY
13627 #    else
13628 #      ifdef RTLD_NOW
13629 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
13630 #      else
13631 #        ifdef DL_NOW
13632 #          define LT_DLLAZY_OR_NOW      DL_NOW
13633 #        else
13634 #          define LT_DLLAZY_OR_NOW      0
13635 #        endif
13636 #      endif
13637 #    endif
13638 #  endif
13639 #endif
13640
13641 /* When -fvisbility=hidden is used, assume the code has been annotated
13642    correspondingly for the symbols needed.  */
13643 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
13644 int fnord () __attribute__((visibility("default")));
13645 #endif
13646
13647 int fnord () { return 42; }
13648 int main ()
13649 {
13650   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
13651   int status = $lt_dlunknown;
13652
13653   if (self)
13654     {
13655       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
13656       else
13657         {
13658           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
13659           else puts (dlerror ());
13660         }
13661       /* dlclose (self); */
13662     }
13663   else
13664     puts (dlerror ());
13665
13666   return status;
13667 }
13668 _LT_EOF
13669   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13670   (eval $ac_link) 2>&5
13671   ac_status=$?
13672   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13673   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
13674     (./conftest; exit; ) >&5 2>/dev/null
13675     lt_status=$?
13676     case x$lt_status in
13677       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
13678       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
13679       x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
13680     esac
13681   else :
13682     # compilation failed
13683     lt_cv_dlopen_self_static=no
13684   fi
13685 fi
13686 rm -fr conftest*
13687
13688
13689 fi
13690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
13691 $as_echo "$lt_cv_dlopen_self_static" >&6; }
13692     fi
13693
13694     CPPFLAGS="$save_CPPFLAGS"
13695     LDFLAGS="$save_LDFLAGS"
13696     LIBS="$save_LIBS"
13697     ;;
13698   esac
13699
13700   case $lt_cv_dlopen_self in
13701   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
13702   *) enable_dlopen_self=unknown ;;
13703   esac
13704
13705   case $lt_cv_dlopen_self_static in
13706   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
13707   *) enable_dlopen_self_static=unknown ;;
13708   esac
13709 fi
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727 striplib=
13728 old_striplib=
13729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
13730 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
13731 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
13732   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
13733   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
13734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13735 $as_echo "yes" >&6; }
13736 else
13737 # FIXME - insert some real tests, host_os isn't really good enough
13738   case $host_os in
13739   darwin*)
13740     if test -n "$STRIP" ; then
13741       striplib="$STRIP -x"
13742       old_striplib="$STRIP -S"
13743       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13744 $as_echo "yes" >&6; }
13745     else
13746       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13747 $as_echo "no" >&6; }
13748     fi
13749     ;;
13750   *)
13751     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13752 $as_echo "no" >&6; }
13753     ;;
13754   esac
13755 fi
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768   # Report which library types will actually be built
13769   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
13770 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
13771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
13772 $as_echo "$can_build_shared" >&6; }
13773
13774   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
13775 $as_echo_n "checking whether to build shared libraries... " >&6; }
13776   test "$can_build_shared" = "no" && enable_shared=no
13777
13778   # On AIX, shared libraries and static libraries use the same namespace, and
13779   # are all built from PIC.
13780   case $host_os in
13781   aix3*)
13782     test "$enable_shared" = yes && enable_static=no
13783     if test -n "$RANLIB"; then
13784       archive_cmds="$archive_cmds~\$RANLIB \$lib"
13785       postinstall_cmds='$RANLIB $lib'
13786     fi
13787     ;;
13788
13789   aix[4-9]*)
13790     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
13791       test "$enable_shared" = yes && enable_static=no
13792     fi
13793     ;;
13794   esac
13795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
13796 $as_echo "$enable_shared" >&6; }
13797
13798   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
13799 $as_echo_n "checking whether to build static libraries... " >&6; }
13800   # Make sure either enable_shared or enable_static is yes.
13801   test "$enable_shared" = yes || enable_static=yes
13802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
13803 $as_echo "$enable_static" >&6; }
13804
13805
13806
13807
13808 fi
13809 ac_ext=c
13810 ac_cpp='$CPP $CPPFLAGS'
13811 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13812 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13813 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13814
13815 CC="$lt_save_CC"
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831         ac_config_commands="$ac_config_commands libtool"
13832
13833
13834
13835
13836 # Only expand once:
13837
13838
13839
13840
13841 # Checks for header files.
13842 for ac_header in stdarg.h stdbool.h netinet/in.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
13843 do :
13844   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13845 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
13846 "
13847 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13848   cat >>confdefs.h <<_ACEOF
13849 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13850 _ACEOF
13851
13852 fi
13853
13854 done
13855
13856
13857 # check for types.
13858 # Using own tests for int64* because autoconf builtin only give 32bit.
13859 ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
13860 if test "x$ac_cv_type_int8_t" = xyes; then :
13861
13862 else
13863
13864 cat >>confdefs.h <<_ACEOF
13865 #define int8_t signed char
13866 _ACEOF
13867
13868 fi
13869
13870 ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
13871 if test "x$ac_cv_type_int16_t" = xyes; then :
13872
13873 else
13874
13875 cat >>confdefs.h <<_ACEOF
13876 #define int16_t short
13877 _ACEOF
13878
13879 fi
13880
13881 ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
13882 if test "x$ac_cv_type_int32_t" = xyes; then :
13883
13884 else
13885
13886 cat >>confdefs.h <<_ACEOF
13887 #define int32_t int
13888 _ACEOF
13889
13890 fi
13891
13892 ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
13893 if test "x$ac_cv_type_int64_t" = xyes; then :
13894
13895 else
13896
13897 cat >>confdefs.h <<_ACEOF
13898 #define int64_t long long
13899 _ACEOF
13900
13901 fi
13902
13903 ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
13904 if test "x$ac_cv_type_uint8_t" = xyes; then :
13905
13906 else
13907
13908 cat >>confdefs.h <<_ACEOF
13909 #define uint8_t unsigned char
13910 _ACEOF
13911
13912 fi
13913
13914 ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
13915 if test "x$ac_cv_type_uint16_t" = xyes; then :
13916
13917 else
13918
13919 cat >>confdefs.h <<_ACEOF
13920 #define uint16_t unsigned short
13921 _ACEOF
13922
13923 fi
13924
13925 ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
13926 if test "x$ac_cv_type_uint32_t" = xyes; then :
13927
13928 else
13929
13930 cat >>confdefs.h <<_ACEOF
13931 #define uint32_t unsigned int
13932 _ACEOF
13933
13934 fi
13935
13936 ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
13937 if test "x$ac_cv_type_uint64_t" = xyes; then :
13938
13939 else
13940
13941 cat >>confdefs.h <<_ACEOF
13942 #define uint64_t unsigned long long
13943 _ACEOF
13944
13945 fi
13946
13947 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13948 if test "x$ac_cv_type_size_t" = xyes; then :
13949
13950 else
13951
13952 cat >>confdefs.h <<_ACEOF
13953 #define size_t unsigned int
13954 _ACEOF
13955
13956 fi
13957
13958 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
13959 if test "x$ac_cv_type_ssize_t" = xyes; then :
13960
13961 else
13962
13963 cat >>confdefs.h <<_ACEOF
13964 #define ssize_t int
13965 _ACEOF
13966
13967 fi
13968
13969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
13970 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
13971 if ${ac_cv_type_uid_t+:} false; then :
13972   $as_echo_n "(cached) " >&6
13973 else
13974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13975 /* end confdefs.h.  */
13976 #include <sys/types.h>
13977
13978 _ACEOF
13979 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13980   $EGREP "uid_t" >/dev/null 2>&1; then :
13981   ac_cv_type_uid_t=yes
13982 else
13983   ac_cv_type_uid_t=no
13984 fi
13985 rm -f conftest*
13986
13987 fi
13988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
13989 $as_echo "$ac_cv_type_uid_t" >&6; }
13990 if test $ac_cv_type_uid_t = no; then
13991
13992 $as_echo "#define uid_t int" >>confdefs.h
13993
13994
13995 $as_echo "#define gid_t int" >>confdefs.h
13996
13997 fi
13998
13999 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14000 if test "x$ac_cv_type_pid_t" = xyes; then :
14001
14002 else
14003
14004 cat >>confdefs.h <<_ACEOF
14005 #define pid_t int
14006 _ACEOF
14007
14008 fi
14009
14010 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
14011 if test "x$ac_cv_type_off_t" = xyes; then :
14012
14013 else
14014
14015 cat >>confdefs.h <<_ACEOF
14016 #define off_t long int
14017 _ACEOF
14018
14019 fi
14020
14021 ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
14022 $ac_includes_default
14023 #ifdef HAVE_WINSOCK2_H
14024 #  include <winsock2.h>
14025 #endif
14026
14027 "
14028 if test "x$ac_cv_type_u_char" = xyes; then :
14029
14030 else
14031
14032 $as_echo "#define u_char unsigned char" >>confdefs.h
14033
14034 fi
14035
14036 ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
14037 $ac_includes_default
14038 #ifdef HAVE_SYS_RESOURCE_H
14039 #  include <sys/resource.h>
14040 #endif
14041
14042 "
14043 if test "x$ac_cv_type_rlim_t" = xyes; then :
14044
14045 else
14046
14047 $as_echo "#define rlim_t unsigned long" >>confdefs.h
14048
14049 fi
14050
14051
14052 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
14053 $ac_includes_default
14054 #ifdef HAVE_SYS_SOCKET_H
14055 #  include <sys/socket.h>
14056 #endif
14057 #ifdef HAVE_WS2TCPIP_H
14058 #  include <ws2tcpip.h>
14059 #endif
14060
14061 "
14062 if test "x$ac_cv_type_socklen_t" = xyes; then :
14063
14064 else
14065
14066 $as_echo "#define socklen_t int" >>confdefs.h
14067
14068 fi
14069
14070  ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
14071 $ac_includes_default
14072 #ifdef HAVE_SYS_TYPES_H
14073 # include <sys/types.h>
14074 #endif
14075 #ifdef HAVE_NETINET_IN_H
14076 # include <netinet/in.h>
14077 #endif
14078
14079 "
14080 if test "x$ac_cv_type_in_addr_t" = xyes; then :
14081
14082 else
14083
14084 $as_echo "#define in_addr_t uint32_t" >>confdefs.h
14085
14086 fi
14087
14088  ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
14089 $ac_includes_default
14090 #ifdef HAVE_SYS_TYPES_H
14091 # include <sys/types.h>
14092 #endif
14093 #ifdef HAVE_NETINET_IN_H
14094 # include <netinet/in.h>
14095 #endif
14096
14097 "
14098 if test "x$ac_cv_type_in_port_t" = xyes; then :
14099
14100 else
14101
14102 $as_echo "#define in_port_t uint16_t" >>confdefs.h
14103
14104 fi
14105
14106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
14107 $as_echo_n "checking if memcmp compares unsigned... " >&6; }
14108 if test "$cross_compiling" = yes; then :
14109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
14110 $as_echo "cross-compile no" >&6; }
14111
14112 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14113
14114   case " $LIBOBJS " in
14115   *" memcmp.$ac_objext "* ) ;;
14116   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14117  ;;
14118 esac
14119
14120
14121 else
14122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14123 /* end confdefs.h.  */
14124
14125 #include <stdio.h>
14126 #include <stdlib.h>
14127 #include <string.h>
14128 int main(void)
14129 {
14130         char a = 255, b = 0;
14131         if(memcmp(&a, &b, 1) < 0)
14132                 return 1;
14133         return 0;
14134 }
14135
14136 _ACEOF
14137 if ac_fn_c_try_run "$LINENO"; then :
14138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14139 $as_echo "yes" >&6; }
14140 else
14141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14142 $as_echo "no" >&6; }
14143
14144 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14145
14146   case " $LIBOBJS " in
14147   *" memcmp.$ac_objext "* ) ;;
14148   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14149  ;;
14150 esac
14151
14152
14153 fi
14154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14155   conftest.$ac_objext conftest.beam conftest.$ac_ext
14156 fi
14157
14158
14159 # The cast to long int works around a bug in the HP C Compiler
14160 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14161 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14162 # This bug is HP SR number 8606223364.
14163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
14164 $as_echo_n "checking size of time_t... " >&6; }
14165 if ${ac_cv_sizeof_time_t+:} false; then :
14166   $as_echo_n "(cached) " >&6
14167 else
14168   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
14169 $ac_includes_default
14170 #ifdef TIME_WITH_SYS_TIME
14171 # include <sys/time.h>
14172 # include <time.h>
14173 #else
14174 # ifdef HAVE_SYS_TIME_H
14175 #  include <sys/time.h>
14176 # else
14177 #  include <time.h>
14178 # endif
14179 #endif
14180
14181 "; then :
14182
14183 else
14184   if test "$ac_cv_type_time_t" = yes; then
14185      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14186 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14187 as_fn_error 77 "cannot compute sizeof (time_t)
14188 See \`config.log' for more details" "$LINENO" 5; }
14189    else
14190      ac_cv_sizeof_time_t=0
14191    fi
14192 fi
14193
14194 fi
14195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
14196 $as_echo "$ac_cv_sizeof_time_t" >&6; }
14197
14198
14199
14200 cat >>confdefs.h <<_ACEOF
14201 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
14202 _ACEOF
14203
14204
14205
14206 # add option to disable the evil rpath
14207
14208 # Check whether --enable-rpath was given.
14209 if test "${enable_rpath+set}" = set; then :
14210   enableval=$enable_rpath; enable_rpath=$enableval
14211 else
14212   enable_rpath=yes
14213 fi
14214
14215 if test "x$enable_rpath" = xno; then
14216                 ac_config_commands="$ac_config_commands disable-rpath"
14217
14218 fi
14219
14220
14221
14222 # check to see if libraries are needed for these functions.
14223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
14224 $as_echo_n "checking for library containing inet_pton... " >&6; }
14225 if ${ac_cv_search_inet_pton+:} false; then :
14226   $as_echo_n "(cached) " >&6
14227 else
14228   ac_func_search_save_LIBS=$LIBS
14229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14230 /* end confdefs.h.  */
14231
14232 /* Override any GCC internal prototype to avoid an error.
14233    Use char because int might match the return type of a GCC
14234    builtin and then its argument prototype would still apply.  */
14235 #ifdef __cplusplus
14236 extern "C"
14237 #endif
14238 char inet_pton ();
14239 int
14240 main ()
14241 {
14242 return inet_pton ();
14243   ;
14244   return 0;
14245 }
14246 _ACEOF
14247 for ac_lib in '' nsl; do
14248   if test -z "$ac_lib"; then
14249     ac_res="none required"
14250   else
14251     ac_res=-l$ac_lib
14252     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14253   fi
14254   if ac_fn_c_try_link "$LINENO"; then :
14255   ac_cv_search_inet_pton=$ac_res
14256 fi
14257 rm -f core conftest.err conftest.$ac_objext \
14258     conftest$ac_exeext
14259   if ${ac_cv_search_inet_pton+:} false; then :
14260   break
14261 fi
14262 done
14263 if ${ac_cv_search_inet_pton+:} false; then :
14264
14265 else
14266   ac_cv_search_inet_pton=no
14267 fi
14268 rm conftest.$ac_ext
14269 LIBS=$ac_func_search_save_LIBS
14270 fi
14271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
14272 $as_echo "$ac_cv_search_inet_pton" >&6; }
14273 ac_res=$ac_cv_search_inet_pton
14274 if test "$ac_res" != no; then :
14275   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14276
14277 fi
14278
14279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
14280 $as_echo_n "checking for library containing socket... " >&6; }
14281 if ${ac_cv_search_socket+:} false; then :
14282   $as_echo_n "(cached) " >&6
14283 else
14284   ac_func_search_save_LIBS=$LIBS
14285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14286 /* end confdefs.h.  */
14287
14288 /* Override any GCC internal prototype to avoid an error.
14289    Use char because int might match the return type of a GCC
14290    builtin and then its argument prototype would still apply.  */
14291 #ifdef __cplusplus
14292 extern "C"
14293 #endif
14294 char socket ();
14295 int
14296 main ()
14297 {
14298 return socket ();
14299   ;
14300   return 0;
14301 }
14302 _ACEOF
14303 for ac_lib in '' socket; do
14304   if test -z "$ac_lib"; then
14305     ac_res="none required"
14306   else
14307     ac_res=-l$ac_lib
14308     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14309   fi
14310   if ac_fn_c_try_link "$LINENO"; then :
14311   ac_cv_search_socket=$ac_res
14312 fi
14313 rm -f core conftest.err conftest.$ac_objext \
14314     conftest$ac_exeext
14315   if ${ac_cv_search_socket+:} false; then :
14316   break
14317 fi
14318 done
14319 if ${ac_cv_search_socket+:} false; then :
14320
14321 else
14322   ac_cv_search_socket=no
14323 fi
14324 rm conftest.$ac_ext
14325 LIBS=$ac_func_search_save_LIBS
14326 fi
14327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
14328 $as_echo "$ac_cv_search_socket" >&6; }
14329 ac_res=$ac_cv_search_socket
14330 if test "$ac_res" != no; then :
14331   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14332
14333 fi
14334
14335
14336 # check wether strptime also works
14337
14338 # check some functions of the OS before linking libs (while still runnable).
14339 for ac_header in unistd.h
14340 do :
14341   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
14342 if test "x$ac_cv_header_unistd_h" = xyes; then :
14343   cat >>confdefs.h <<_ACEOF
14344 #define HAVE_UNISTD_H 1
14345 _ACEOF
14346
14347 fi
14348
14349 done
14350
14351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
14352 $as_echo_n "checking for working chown... " >&6; }
14353 if ${ac_cv_func_chown_works+:} false; then :
14354   $as_echo_n "(cached) " >&6
14355 else
14356   if test "$cross_compiling" = yes; then :
14357   ac_cv_func_chown_works=no
14358 else
14359   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14360 /* end confdefs.h.  */
14361 $ac_includes_default
14362 #include <fcntl.h>
14363
14364 int
14365 main ()
14366 {
14367   char *f = "conftest.chown";
14368   struct stat before, after;
14369
14370   if (creat (f, 0600) < 0)
14371     return 1;
14372   if (stat (f, &before) < 0)
14373     return 1;
14374   if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
14375     return 1;
14376   if (stat (f, &after) < 0)
14377     return 1;
14378   return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
14379
14380   ;
14381   return 0;
14382 }
14383 _ACEOF
14384 if ac_fn_c_try_run "$LINENO"; then :
14385   ac_cv_func_chown_works=yes
14386 else
14387   ac_cv_func_chown_works=no
14388 fi
14389 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14390   conftest.$ac_objext conftest.beam conftest.$ac_ext
14391 fi
14392
14393 rm -f conftest.chown
14394
14395 fi
14396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
14397 $as_echo "$ac_cv_func_chown_works" >&6; }
14398 if test $ac_cv_func_chown_works = yes; then
14399
14400 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
14401
14402 fi
14403
14404 for ac_header in vfork.h
14405 do :
14406   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
14407 if test "x$ac_cv_header_vfork_h" = xyes; then :
14408   cat >>confdefs.h <<_ACEOF
14409 #define HAVE_VFORK_H 1
14410 _ACEOF
14411
14412 fi
14413
14414 done
14415
14416 for ac_func in fork vfork
14417 do :
14418   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14419 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14420 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14421   cat >>confdefs.h <<_ACEOF
14422 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14423 _ACEOF
14424
14425 fi
14426 done
14427
14428 if test "x$ac_cv_func_fork" = xyes; then
14429   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
14430 $as_echo_n "checking for working fork... " >&6; }
14431 if ${ac_cv_func_fork_works+:} false; then :
14432   $as_echo_n "(cached) " >&6
14433 else
14434   if test "$cross_compiling" = yes; then :
14435   ac_cv_func_fork_works=cross
14436 else
14437   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14438 /* end confdefs.h.  */
14439 $ac_includes_default
14440 int
14441 main ()
14442 {
14443
14444           /* By Ruediger Kuhlmann. */
14445           return fork () < 0;
14446
14447   ;
14448   return 0;
14449 }
14450 _ACEOF
14451 if ac_fn_c_try_run "$LINENO"; then :
14452   ac_cv_func_fork_works=yes
14453 else
14454   ac_cv_func_fork_works=no
14455 fi
14456 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14457   conftest.$ac_objext conftest.beam conftest.$ac_ext
14458 fi
14459
14460 fi
14461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
14462 $as_echo "$ac_cv_func_fork_works" >&6; }
14463
14464 else
14465   ac_cv_func_fork_works=$ac_cv_func_fork
14466 fi
14467 if test "x$ac_cv_func_fork_works" = xcross; then
14468   case $host in
14469     *-*-amigaos* | *-*-msdosdjgpp*)
14470       # Override, as these systems have only a dummy fork() stub
14471       ac_cv_func_fork_works=no
14472       ;;
14473     *)
14474       ac_cv_func_fork_works=yes
14475       ;;
14476   esac
14477   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
14478 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
14479 fi
14480 ac_cv_func_vfork_works=$ac_cv_func_vfork
14481 if test "x$ac_cv_func_vfork" = xyes; then
14482   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
14483 $as_echo_n "checking for working vfork... " >&6; }
14484 if ${ac_cv_func_vfork_works+:} false; then :
14485   $as_echo_n "(cached) " >&6
14486 else
14487   if test "$cross_compiling" = yes; then :
14488   ac_cv_func_vfork_works=cross
14489 else
14490   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14491 /* end confdefs.h.  */
14492 /* Thanks to Paul Eggert for this test.  */
14493 $ac_includes_default
14494 #include <sys/wait.h>
14495 #ifdef HAVE_VFORK_H
14496 # include <vfork.h>
14497 #endif
14498 /* On some sparc systems, changes by the child to local and incoming
14499    argument registers are propagated back to the parent.  The compiler
14500    is told about this with #include <vfork.h>, but some compilers
14501    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
14502    static variable whose address is put into a register that is
14503    clobbered by the vfork.  */
14504 static void
14505 #ifdef __cplusplus
14506 sparc_address_test (int arg)
14507 # else
14508 sparc_address_test (arg) int arg;
14509 #endif
14510 {
14511   static pid_t child;
14512   if (!child) {
14513     child = vfork ();
14514     if (child < 0) {
14515       perror ("vfork");
14516       _exit(2);
14517     }
14518     if (!child) {
14519       arg = getpid();
14520       write(-1, "", 0);
14521       _exit (arg);
14522     }
14523   }
14524 }
14525
14526 int
14527 main ()
14528 {
14529   pid_t parent = getpid ();
14530   pid_t child;
14531
14532   sparc_address_test (0);
14533
14534   child = vfork ();
14535
14536   if (child == 0) {
14537     /* Here is another test for sparc vfork register problems.  This
14538        test uses lots of local variables, at least as many local
14539        variables as main has allocated so far including compiler
14540        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
14541        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
14542        reuse the register of parent for one of the local variables,
14543        since it will think that parent can't possibly be used any more
14544        in this routine.  Assigning to the local variable will thus
14545        munge parent in the parent process.  */
14546     pid_t
14547       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
14548       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
14549     /* Convince the compiler that p..p7 are live; otherwise, it might
14550        use the same hardware register for all 8 local variables.  */
14551     if (p != p1 || p != p2 || p != p3 || p != p4
14552         || p != p5 || p != p6 || p != p7)
14553       _exit(1);
14554
14555     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
14556        from child file descriptors.  If the child closes a descriptor
14557        before it execs or exits, this munges the parent's descriptor
14558        as well.  Test for this by closing stdout in the child.  */
14559     _exit(close(fileno(stdout)) != 0);
14560   } else {
14561     int status;
14562     struct stat st;
14563
14564     while (wait(&status) != child)
14565       ;
14566     return (
14567          /* Was there some problem with vforking?  */
14568          child < 0
14569
14570          /* Did the child fail?  (This shouldn't happen.)  */
14571          || status
14572
14573          /* Did the vfork/compiler bug occur?  */
14574          || parent != getpid()
14575
14576          /* Did the file descriptor bug occur?  */
14577          || fstat(fileno(stdout), &st) != 0
14578          );
14579   }
14580 }
14581 _ACEOF
14582 if ac_fn_c_try_run "$LINENO"; then :
14583   ac_cv_func_vfork_works=yes
14584 else
14585   ac_cv_func_vfork_works=no
14586 fi
14587 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14588   conftest.$ac_objext conftest.beam conftest.$ac_ext
14589 fi
14590
14591 fi
14592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
14593 $as_echo "$ac_cv_func_vfork_works" >&6; }
14594
14595 fi;
14596 if test "x$ac_cv_func_fork_works" = xcross; then
14597   ac_cv_func_vfork_works=$ac_cv_func_vfork
14598   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
14599 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
14600 fi
14601
14602 if test "x$ac_cv_func_vfork_works" = xyes; then
14603
14604 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
14605
14606 else
14607
14608 $as_echo "#define vfork fork" >>confdefs.h
14609
14610 fi
14611 if test "x$ac_cv_func_fork_works" = xyes; then
14612
14613 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
14614
14615 fi
14616
14617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
14618 $as_echo_n "checking return type of signal handlers... " >&6; }
14619 if ${ac_cv_type_signal+:} false; then :
14620   $as_echo_n "(cached) " >&6
14621 else
14622   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14623 /* end confdefs.h.  */
14624 #include <sys/types.h>
14625 #include <signal.h>
14626
14627 int
14628 main ()
14629 {
14630 return *(signal (0, 0)) (0) == 1;
14631   ;
14632   return 0;
14633 }
14634 _ACEOF
14635 if ac_fn_c_try_compile "$LINENO"; then :
14636   ac_cv_type_signal=int
14637 else
14638   ac_cv_type_signal=void
14639 fi
14640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14641 fi
14642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
14643 $as_echo "$ac_cv_type_signal" >&6; }
14644
14645 cat >>confdefs.h <<_ACEOF
14646 #define RETSIGTYPE $ac_cv_type_signal
14647 _ACEOF
14648
14649
14650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14651 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
14652 if ${ac_cv_sys_largefile_source+:} false; then :
14653   $as_echo_n "(cached) " >&6
14654 else
14655   while :; do
14656   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14657 /* end confdefs.h.  */
14658 #include <sys/types.h> /* for off_t */
14659      #include <stdio.h>
14660 int
14661 main ()
14662 {
14663 int (*fp) (FILE *, off_t, int) = fseeko;
14664      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14665   ;
14666   return 0;
14667 }
14668 _ACEOF
14669 if ac_fn_c_try_link "$LINENO"; then :
14670   ac_cv_sys_largefile_source=no; break
14671 fi
14672 rm -f core conftest.err conftest.$ac_objext \
14673     conftest$ac_exeext conftest.$ac_ext
14674   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14675 /* end confdefs.h.  */
14676 #define _LARGEFILE_SOURCE 1
14677 #include <sys/types.h> /* for off_t */
14678      #include <stdio.h>
14679 int
14680 main ()
14681 {
14682 int (*fp) (FILE *, off_t, int) = fseeko;
14683      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14684   ;
14685   return 0;
14686 }
14687 _ACEOF
14688 if ac_fn_c_try_link "$LINENO"; then :
14689   ac_cv_sys_largefile_source=1; break
14690 fi
14691 rm -f core conftest.err conftest.$ac_objext \
14692     conftest$ac_exeext conftest.$ac_ext
14693   ac_cv_sys_largefile_source=unknown
14694   break
14695 done
14696 fi
14697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
14698 $as_echo "$ac_cv_sys_largefile_source" >&6; }
14699 case $ac_cv_sys_largefile_source in #(
14700   no | unknown) ;;
14701   *)
14702 cat >>confdefs.h <<_ACEOF
14703 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14704 _ACEOF
14705 ;;
14706 esac
14707 rm -rf conftest*
14708
14709 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14710 # in glibc 2.1.3, but that breaks too many other things.
14711 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14712 if test $ac_cv_sys_largefile_source != unknown; then
14713
14714 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14715
14716 fi
14717
14718
14719 # Check whether --enable-largefile was given.
14720 if test "${enable_largefile+set}" = set; then :
14721   enableval=$enable_largefile;
14722 fi
14723
14724 if test "$enable_largefile" != no; then
14725
14726   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14727 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14728 if ${ac_cv_sys_largefile_CC+:} false; then :
14729   $as_echo_n "(cached) " >&6
14730 else
14731   ac_cv_sys_largefile_CC=no
14732      if test "$GCC" != yes; then
14733        ac_save_CC=$CC
14734        while :; do
14735          # IRIX 6.2 and later do not support large files by default,
14736          # so use the C compiler's -n32 option if that helps.
14737          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14738 /* end confdefs.h.  */
14739 #include <sys/types.h>
14740  /* Check that off_t can represent 2**63 - 1 correctly.
14741     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14742     since some C++ compilers masquerading as C compilers
14743     incorrectly reject 9223372036854775807.  */
14744 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14745   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14746                        && LARGE_OFF_T % 2147483647 == 1)
14747                       ? 1 : -1];
14748 int
14749 main ()
14750 {
14751
14752   ;
14753   return 0;
14754 }
14755 _ACEOF
14756          if ac_fn_c_try_compile "$LINENO"; then :
14757   break
14758 fi
14759 rm -f core conftest.err conftest.$ac_objext
14760          CC="$CC -n32"
14761          if ac_fn_c_try_compile "$LINENO"; then :
14762   ac_cv_sys_largefile_CC=' -n32'; break
14763 fi
14764 rm -f core conftest.err conftest.$ac_objext
14765          break
14766        done
14767        CC=$ac_save_CC
14768        rm -f conftest.$ac_ext
14769     fi
14770 fi
14771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14772 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14773   if test "$ac_cv_sys_largefile_CC" != no; then
14774     CC=$CC$ac_cv_sys_largefile_CC
14775   fi
14776
14777   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14778 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14779 if ${ac_cv_sys_file_offset_bits+:} false; then :
14780   $as_echo_n "(cached) " >&6
14781 else
14782   while :; do
14783   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14784 /* end confdefs.h.  */
14785 #include <sys/types.h>
14786  /* Check that off_t can represent 2**63 - 1 correctly.
14787     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14788     since some C++ compilers masquerading as C compilers
14789     incorrectly reject 9223372036854775807.  */
14790 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14791   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14792                        && LARGE_OFF_T % 2147483647 == 1)
14793                       ? 1 : -1];
14794 int
14795 main ()
14796 {
14797
14798   ;
14799   return 0;
14800 }
14801 _ACEOF
14802 if ac_fn_c_try_compile "$LINENO"; then :
14803   ac_cv_sys_file_offset_bits=no; break
14804 fi
14805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14807 /* end confdefs.h.  */
14808 #define _FILE_OFFSET_BITS 64
14809 #include <sys/types.h>
14810  /* Check that off_t can represent 2**63 - 1 correctly.
14811     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14812     since some C++ compilers masquerading as C compilers
14813     incorrectly reject 9223372036854775807.  */
14814 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14815   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14816                        && LARGE_OFF_T % 2147483647 == 1)
14817                       ? 1 : -1];
14818 int
14819 main ()
14820 {
14821
14822   ;
14823   return 0;
14824 }
14825 _ACEOF
14826 if ac_fn_c_try_compile "$LINENO"; then :
14827   ac_cv_sys_file_offset_bits=64; break
14828 fi
14829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14830   ac_cv_sys_file_offset_bits=unknown
14831   break
14832 done
14833 fi
14834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14835 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14836 case $ac_cv_sys_file_offset_bits in #(
14837   no | unknown) ;;
14838   *)
14839 cat >>confdefs.h <<_ACEOF
14840 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14841 _ACEOF
14842 ;;
14843 esac
14844 rm -rf conftest*
14845   if test $ac_cv_sys_file_offset_bits = unknown; then
14846     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14847 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14848 if ${ac_cv_sys_large_files+:} false; then :
14849   $as_echo_n "(cached) " >&6
14850 else
14851   while :; do
14852   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14853 /* end confdefs.h.  */
14854 #include <sys/types.h>
14855  /* Check that off_t can represent 2**63 - 1 correctly.
14856     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14857     since some C++ compilers masquerading as C compilers
14858     incorrectly reject 9223372036854775807.  */
14859 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14860   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14861                        && LARGE_OFF_T % 2147483647 == 1)
14862                       ? 1 : -1];
14863 int
14864 main ()
14865 {
14866
14867   ;
14868   return 0;
14869 }
14870 _ACEOF
14871 if ac_fn_c_try_compile "$LINENO"; then :
14872   ac_cv_sys_large_files=no; break
14873 fi
14874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14875   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14876 /* end confdefs.h.  */
14877 #define _LARGE_FILES 1
14878 #include <sys/types.h>
14879  /* Check that off_t can represent 2**63 - 1 correctly.
14880     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14881     since some C++ compilers masquerading as C compilers
14882     incorrectly reject 9223372036854775807.  */
14883 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14884   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14885                        && LARGE_OFF_T % 2147483647 == 1)
14886                       ? 1 : -1];
14887 int
14888 main ()
14889 {
14890
14891   ;
14892   return 0;
14893 }
14894 _ACEOF
14895 if ac_fn_c_try_compile "$LINENO"; then :
14896   ac_cv_sys_large_files=1; break
14897 fi
14898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14899   ac_cv_sys_large_files=unknown
14900   break
14901 done
14902 fi
14903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14904 $as_echo "$ac_cv_sys_large_files" >&6; }
14905 case $ac_cv_sys_large_files in #(
14906   no | unknown) ;;
14907   *)
14908 cat >>confdefs.h <<_ACEOF
14909 #define _LARGE_FILES $ac_cv_sys_large_files
14910 _ACEOF
14911 ;;
14912 esac
14913 rm -rf conftest*
14914   fi
14915
14916
14917 fi
14918
14919
14920
14921
14922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
14923 $as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
14924 cache=_D_LARGEFILE_SOURCE_1
14925 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
14926   $as_echo_n "(cached) " >&6
14927 else
14928
14929 echo '
14930 #include <stdio.h>
14931 int test() {
14932         int a = fseeko(stdin, 0, 0);
14933         return a;
14934 }
14935 ' > conftest.c
14936 echo 'void f(){}' >>conftest.c
14937 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
14938 eval "cv_prog_cc_flag_needed_$cache=no"
14939 else
14940
14941 if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
14942 eval "cv_prog_cc_flag_needed_$cache=yes"
14943 else
14944 eval "cv_prog_cc_flag_needed_$cache=fail"
14945 #echo 'Test with flag fails too!'
14946 #cat conftest.c
14947 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
14948 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
14949 #exit 1
14950 fi
14951
14952 fi
14953 rm -f conftest conftest.c conftest.o
14954
14955 fi
14956
14957 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
14958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14959 $as_echo "yes" >&6; }
14960 :
14961 CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
14962 else
14963 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
14964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14965 $as_echo "no" >&6; }
14966 #echo 'Test with flag is no!'
14967 #cat conftest.c
14968 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
14969 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
14970 #exit 1
14971 :
14972
14973 else
14974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
14975 $as_echo "failed" >&6; }
14976 :
14977
14978 fi
14979 fi
14980
14981
14982
14983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
14984 $as_echo_n "checking if nonblocking sockets work... " >&6; }
14985 if echo $target | grep mingw32 >/dev/null; then
14986         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
14987 $as_echo "no (windows)" >&6; }
14988
14989 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
14990
14991 else
14992 if test "$cross_compiling" = yes; then :
14993
14994         { $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
14995 $as_echo "crosscompile(yes)" >&6; }
14996
14997 else
14998   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14999 /* end confdefs.h.  */
15000
15001
15002 #include <stdio.h>
15003 #include <string.h>
15004 #include <stdlib.h>
15005 #include <fcntl.h>
15006 #include <errno.h>
15007 #ifdef HAVE_SYS_TYPES_H
15008 #include <sys/types.h>
15009 #endif
15010 #ifdef HAVE_SYS_SOCKET_H
15011 #include <sys/socket.h>
15012 #endif
15013 #ifdef HAVE_NETINET_IN_H
15014 #include <netinet/in.h>
15015 #endif
15016 #ifdef HAVE_ARPA_INET_H
15017 #include <arpa/inet.h>
15018 #endif
15019 #ifdef HAVE_UNISTD_H
15020 #include <unistd.h>
15021 #endif
15022 #ifdef HAVE_TIME_H
15023 #include <time.h>
15024 #endif
15025
15026 int main(void)
15027 {
15028         int port;
15029         int sfd, cfd;
15030         int num = 10;
15031         int i, p;
15032         struct sockaddr_in a;
15033         /* test if select and nonblocking reads work well together */
15034         /* open port.
15035            fork child to send 10 messages.
15036            select to read.
15037            then try to nonblocking read the 10 messages
15038            then, nonblocking read must give EAGAIN
15039         */
15040
15041         port = 12345 + (time(0)%32);
15042         sfd = socket(PF_INET, SOCK_DGRAM, 0);
15043         if(sfd == -1) {
15044                 perror("socket");
15045                 return 1;
15046         }
15047         memset(&a, 0, sizeof(a));
15048         a.sin_family = AF_INET;
15049         a.sin_port = htons(port);
15050         a.sin_addr.s_addr = inet_addr("127.0.0.1");
15051         if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15052                 perror("bind");
15053                 return 1;
15054         }
15055         if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
15056                 perror("fcntl");
15057                 return 1;
15058         }
15059
15060         cfd = socket(PF_INET, SOCK_DGRAM, 0);
15061         if(cfd == -1) {
15062                 perror("client socket");
15063                 return 1;
15064         }
15065         a.sin_port = 0;
15066         if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15067                 perror("client bind");
15068                 return 1;
15069         }
15070         a.sin_port = htons(port);
15071
15072         /* no handler, causes exit in 10 seconds */
15073         alarm(10);
15074
15075         /* send and receive on the socket */
15076         if((p=fork()) == 0) {
15077                 for(i=0; i<num; i++) {
15078                         if(sendto(cfd, &i, sizeof(i), 0,
15079                                 (struct sockaddr*)&a, sizeof(a)) < 0) {
15080                                 perror("sendto");
15081                                 return 1;
15082                         }
15083                 }
15084         } else {
15085                 /* parent */
15086                 fd_set rset;
15087                 int x;
15088                 if(p == -1) {
15089                         perror("fork");
15090                         return 1;
15091                 }
15092                 FD_ZERO(&rset);
15093                 FD_SET(sfd, &rset);
15094                 if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
15095                         perror("select");
15096                         return 1;
15097                 }
15098                 i = 0;
15099                 while(i < num) {
15100                         if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
15101                                 if(errno == EAGAIN)
15102                                         continue;
15103                                 perror("recv");
15104                                 return 1;
15105                         }
15106                         i++;
15107                 }
15108                 /* now we want to get EAGAIN: nonblocking goodness */
15109                 errno = 0;
15110                 recv(sfd, &x, sizeof(x), 0);
15111                 if(errno != EAGAIN) {
15112                         perror("trying to recv again");
15113                         return 1;
15114                 }
15115                 /* EAGAIN encountered */
15116         }
15117
15118         close(sfd);
15119         close(cfd);
15120         return 0;
15121 }
15122
15123 _ACEOF
15124 if ac_fn_c_try_run "$LINENO"; then :
15125
15126         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15127 $as_echo "yes" >&6; }
15128
15129 else
15130
15131         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15132 $as_echo "no" >&6; }
15133
15134 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15135
15136
15137 fi
15138 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15139   conftest.$ac_objext conftest.beam conftest.$ac_ext
15140 fi
15141
15142 fi
15143
15144
15145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
15146 $as_echo_n "checking whether mkdir has one arg... " >&6; }
15147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15148 /* end confdefs.h.  */
15149
15150 #include <stdio.h>
15151 #include <unistd.h>
15152 #ifdef HAVE_WINSOCK2_H
15153 #include <winsock2.h>
15154 #endif
15155 #ifdef HAVE_SYS_STAT_H
15156 #include <sys/stat.h>
15157 #endif
15158
15159 int
15160 main ()
15161 {
15162
15163         (void)mkdir("directory");
15164
15165   ;
15166   return 0;
15167 }
15168 _ACEOF
15169 if ac_fn_c_try_compile "$LINENO"; then :
15170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15171 $as_echo "yes" >&6; }
15172
15173 $as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
15174
15175
15176 else
15177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15178 $as_echo "no" >&6; }
15179
15180 fi
15181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15182
15183 for ac_func in strptime
15184 do :
15185   ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
15186 if test "x$ac_cv_func_strptime" = xyes; then :
15187   cat >>confdefs.h <<_ACEOF
15188 #define HAVE_STRPTIME 1
15189 _ACEOF
15190
15191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
15192 $as_echo_n "checking whether strptime works... " >&6; }
15193 if test c${cross_compiling} = cno; then
15194 if test "$cross_compiling" = yes; then :
15195   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15196 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15197 as_fn_error $? "cannot run test program while cross compiling
15198 See \`config.log' for more details" "$LINENO" 5; }
15199 else
15200   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15201 /* end confdefs.h.  */
15202
15203 #define _XOPEN_SOURCE 600
15204 #include <time.h>
15205 int main(void) { struct tm tm; char *res;
15206 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);
15207 if (!res) return 2;
15208 res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
15209 if (!res) return 1; return 0; }
15210
15211 _ACEOF
15212 if ac_fn_c_try_run "$LINENO"; then :
15213   eval "ac_cv_c_strptime_works=yes"
15214 else
15215   eval "ac_cv_c_strptime_works=no"
15216 fi
15217 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15218   conftest.$ac_objext conftest.beam conftest.$ac_ext
15219 fi
15220
15221 else
15222 eval "ac_cv_c_strptime_works=maybe"
15223 fi
15224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
15225 $as_echo "$ac_cv_c_strptime_works" >&6; }
15226 if test $ac_cv_c_strptime_works = no; then
15227 case " $LIBOBJS " in
15228   *" strptime.$ac_objext "* ) ;;
15229   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15230  ;;
15231 esac
15232
15233 else
15234
15235 cat >>confdefs.h <<_ACEOF
15236 #define STRPTIME_WORKS 1
15237 _ACEOF
15238
15239 fi
15240
15241 else
15242   case " $LIBOBJS " in
15243   *" strptime.$ac_objext "* ) ;;
15244   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15245  ;;
15246 esac
15247
15248 fi
15249 done
15250
15251
15252 # set memory allocation checking if requested
15253 # Check whether --enable-alloc-checks was given.
15254 if test "${enable_alloc_checks+set}" = set; then :
15255   enableval=$enable_alloc_checks;
15256 fi
15257
15258 # Check whether --enable-alloc-lite was given.
15259 if test "${enable_alloc_lite+set}" = set; then :
15260   enableval=$enable_alloc_lite;
15261 fi
15262
15263 # Check whether --enable-alloc-nonregional was given.
15264 if test "${enable_alloc_nonregional+set}" = set; then :
15265   enableval=$enable_alloc_nonregional;
15266 fi
15267
15268 if test x_$enable_alloc_nonregional = x_yes; then
15269
15270 $as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
15271
15272 fi
15273 if test x_$enable_alloc_checks = x_yes; then
15274
15275 $as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
15276
15277 else
15278         if test x_$enable_alloc_lite = x_yes; then
15279
15280 $as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
15281
15282         else
15283
15284         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15285 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15286         if test "$cross_compiling" = yes; then :
15287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
15288 $as_echo "no (crosscompile)" >&6; }
15289         case " $LIBOBJS " in
15290   *" malloc.$ac_objext "* ) ;;
15291   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15292  ;;
15293 esac
15294
15295
15296 cat >>confdefs.h <<_ACEOF
15297 #define malloc rpl_malloc_unbound
15298 _ACEOF
15299
15300 else
15301   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15302 /* end confdefs.h.  */
15303 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
15304 #include <stdlib.h>
15305 #else
15306 char *malloc ();
15307 #endif
15308
15309 int
15310 main ()
15311 {
15312  if(malloc(0) != 0) return 1;
15313   ;
15314   return 0;
15315 }
15316
15317 _ACEOF
15318 if ac_fn_c_try_run "$LINENO"; then :
15319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15320 $as_echo "no" >&6; }
15321         case " $LIBOBJS " in
15322   *" malloc.$ac_objext "* ) ;;
15323   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15324  ;;
15325 esac
15326
15327
15328 cat >>confdefs.h <<_ACEOF
15329 #define malloc rpl_malloc_unbound
15330 _ACEOF
15331
15332 else
15333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15334 $as_echo "yes" >&6; }
15335
15336 $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
15337
15338 fi
15339 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15340   conftest.$ac_objext conftest.beam conftest.$ac_ext
15341 fi
15342
15343
15344         fi
15345 fi
15346
15347 # check windows threads (we use them, not pthreads, on windows).
15348 if test "$on_mingw" = "yes"; then
15349 # check windows threads
15350         for ac_header in windows.h
15351 do :
15352   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
15353 "
15354 if test "x$ac_cv_header_windows_h" = xyes; then :
15355   cat >>confdefs.h <<_ACEOF
15356 #define HAVE_WINDOWS_H 1
15357 _ACEOF
15358
15359 fi
15360
15361 done
15362
15363         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
15364 $as_echo_n "checking for CreateThread... " >&6; }
15365         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15366 /* end confdefs.h.  */
15367
15368 #ifdef HAVE_WINDOWS_H
15369 #include <windows.h>
15370 #endif
15371
15372 int
15373 main ()
15374 {
15375
15376         HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
15377
15378   ;
15379   return 0;
15380 }
15381 _ACEOF
15382 if ac_fn_c_try_compile "$LINENO"; then :
15383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15384 $as_echo "yes" >&6; }
15385
15386 $as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
15387
15388
15389 else
15390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15391 $as_echo "no" >&6; }
15392
15393 fi
15394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15395
15396 else
15397 # not on mingw, check thread libraries.
15398
15399 # check for thread library.
15400 # check this first, so that the pthread lib does not get linked in via
15401 # libssl or libpython, and thus distorts the tests, and we end up using
15402 # the non-threadsafe C libraries.
15403
15404 # Check whether --with-pthreads was given.
15405 if test "${with_pthreads+set}" = set; then :
15406   withval=$with_pthreads;
15407 else
15408    withval="yes"
15409 fi
15410
15411 ub_have_pthreads=no
15412 if test x_$withval != x_no; then
15413
15414
15415 ac_ext=c
15416 ac_cpp='$CPP $CPPFLAGS'
15417 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15418 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15419 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15420
15421 ax_pthread_ok=no
15422
15423 # We used to check for pthread.h first, but this fails if pthread.h
15424 # requires special compiler flags (e.g. on True64 or Sequent).
15425 # It gets checked for in the link test anyway.
15426
15427 # First of all, check if the user has set any of the PTHREAD_LIBS,
15428 # etcetera environment variables, and if threads linking works using
15429 # them:
15430 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
15431         save_CFLAGS="$CFLAGS"
15432         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
15433         save_LIBS="$LIBS"
15434         LIBS="$PTHREAD_LIBS $LIBS"
15435         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
15436 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
15437         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15438 /* end confdefs.h.  */
15439
15440 /* Override any GCC internal prototype to avoid an error.
15441    Use char because int might match the return type of a GCC
15442    builtin and then its argument prototype would still apply.  */
15443 #ifdef __cplusplus
15444 extern "C"
15445 #endif
15446 char pthread_join ();
15447 int
15448 main ()
15449 {
15450 return pthread_join ();
15451   ;
15452   return 0;
15453 }
15454 _ACEOF
15455 if ac_fn_c_try_link "$LINENO"; then :
15456   ax_pthread_ok=yes
15457 fi
15458 rm -f core conftest.err conftest.$ac_objext \
15459     conftest$ac_exeext conftest.$ac_ext
15460         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
15461 $as_echo "$ax_pthread_ok" >&6; }
15462         if test x"$ax_pthread_ok" = xno; then
15463                 PTHREAD_LIBS=""
15464                 PTHREAD_CFLAGS=""
15465         fi
15466         LIBS="$save_LIBS"
15467         CFLAGS="$save_CFLAGS"
15468 fi
15469
15470 # We must check for the threads library under a number of different
15471 # names; the ordering is very important because some systems
15472 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
15473 # libraries is broken (non-POSIX).
15474
15475 # Create a list of thread flags to try.  Items starting with a "-" are
15476 # C compiler flags, and other items are library names, except for "none"
15477 # which indicates that we try without any flags at all, and "pthread-config"
15478 # which is a program returning the flags for the Pth emulation library.
15479
15480 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
15481
15482 # The ordering *is* (sometimes) important.  Some notes on the
15483 # individual items follow:
15484
15485 # pthreads: AIX (must check this before -lpthread)
15486 # none: in case threads are in libc; should be tried before -Kthread and
15487 #       other compiler flags to prevent continual compiler warnings
15488 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
15489 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
15490 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
15491 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
15492 # -pthreads: Solaris/gcc
15493 # -mthreads: Mingw32/gcc, Lynx/gcc
15494 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
15495 #      doesn't hurt to check since this sometimes defines pthreads too;
15496 #      also defines -D_REENTRANT)
15497 #      ... -mt is also the pthreads flag for HP/aCC
15498 # pthread: Linux, etcetera
15499 # --thread-safe: KAI C++
15500 # pthread-config: use pthread-config program (for GNU Pth library)
15501
15502 case ${host_os} in
15503         solaris*)
15504
15505         # On Solaris (at least, for some versions), libc contains stubbed
15506         # (non-functional) versions of the pthreads routines, so link-based
15507         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
15508         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
15509         # a function called by this macro, so we could check for that, but
15510         # who knows whether they'll stub that too in a future libc.)  So,
15511         # we'll just look for -pthreads and -lpthread first:
15512
15513         ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
15514         ;;
15515
15516         darwin*)
15517         ax_pthread_flags="-pthread $ax_pthread_flags"
15518         ;;
15519 esac
15520
15521 if test x"$ax_pthread_ok" = xno; then
15522 for flag in $ax_pthread_flags; do
15523
15524         case $flag in
15525                 none)
15526                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
15527 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
15528                 ;;
15529
15530                 -*)
15531                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
15532 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
15533                 PTHREAD_CFLAGS="$flag"
15534                 ;;
15535
15536                 pthread-config)
15537                 # Extract the first word of "pthread-config", so it can be a program name with args.
15538 set dummy pthread-config; ac_word=$2
15539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15540 $as_echo_n "checking for $ac_word... " >&6; }
15541 if ${ac_cv_prog_ax_pthread_config+:} false; then :
15542   $as_echo_n "(cached) " >&6
15543 else
15544   if test -n "$ax_pthread_config"; then
15545   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
15546 else
15547 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15548 for as_dir in $PATH
15549 do
15550   IFS=$as_save_IFS
15551   test -z "$as_dir" && as_dir=.
15552     for ac_exec_ext in '' $ac_executable_extensions; do
15553   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15554     ac_cv_prog_ax_pthread_config="yes"
15555     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15556     break 2
15557   fi
15558 done
15559   done
15560 IFS=$as_save_IFS
15561
15562   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
15563 fi
15564 fi
15565 ax_pthread_config=$ac_cv_prog_ax_pthread_config
15566 if test -n "$ax_pthread_config"; then
15567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
15568 $as_echo "$ax_pthread_config" >&6; }
15569 else
15570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15571 $as_echo "no" >&6; }
15572 fi
15573
15574
15575                 if test x"$ax_pthread_config" = xno; then continue; fi
15576                 PTHREAD_CFLAGS="`pthread-config --cflags`"
15577                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
15578                 ;;
15579
15580                 *)
15581                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
15582 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
15583                 PTHREAD_LIBS="-l$flag"
15584                 ;;
15585         esac
15586
15587         save_LIBS="$LIBS"
15588         save_CFLAGS="$CFLAGS"
15589         LIBS="$PTHREAD_LIBS $LIBS"
15590         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
15591
15592         # Check for various functions.  We must include pthread.h,
15593         # since some functions may be macros.  (On the Sequent, we
15594         # need a special flag -Kthread to make this header compile.)
15595         # We check for pthread_join because it is in -lpthread on IRIX
15596         # while pthread_create is in libc.  We check for pthread_attr_init
15597         # due to DEC craziness with -lpthreads.  We check for
15598         # pthread_cleanup_push because it is one of the few pthread
15599         # functions on Solaris that doesn't have a non-functional libc stub.
15600         # We try pthread_create on general principles.
15601         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15602 /* end confdefs.h.  */
15603 #include <pthread.h>
15604                         static void routine(void *a) { *((int*)a) = 0; }
15605                         static void *start_routine(void *a) { return a; }
15606 int
15607 main ()
15608 {
15609 pthread_t th; pthread_attr_t attr;
15610                         pthread_create(&th, 0, start_routine, 0);
15611                         pthread_join(th, 0);
15612                         pthread_attr_init(&attr);
15613                         pthread_cleanup_push(routine, 0);
15614                         pthread_cleanup_pop(0) /* ; */
15615   ;
15616   return 0;
15617 }
15618 _ACEOF
15619 if ac_fn_c_try_link "$LINENO"; then :
15620   ax_pthread_ok=yes
15621 fi
15622 rm -f core conftest.err conftest.$ac_objext \
15623     conftest$ac_exeext conftest.$ac_ext
15624
15625         LIBS="$save_LIBS"
15626         CFLAGS="$save_CFLAGS"
15627
15628         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
15629 $as_echo "$ax_pthread_ok" >&6; }
15630         if test "x$ax_pthread_ok" = xyes; then
15631                 break;
15632         fi
15633
15634         PTHREAD_LIBS=""
15635         PTHREAD_CFLAGS=""
15636 done
15637 fi
15638
15639 # Various other checks:
15640 if test "x$ax_pthread_ok" = xyes; then
15641         save_LIBS="$LIBS"
15642         LIBS="$PTHREAD_LIBS $LIBS"
15643         save_CFLAGS="$CFLAGS"
15644         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
15645
15646         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
15647         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
15648 $as_echo_n "checking for joinable pthread attribute... " >&6; }
15649         attr_name=unknown
15650         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
15651             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15652 /* end confdefs.h.  */
15653 #include <pthread.h>
15654 int
15655 main ()
15656 {
15657 int attr = $attr; return attr /* ; */
15658   ;
15659   return 0;
15660 }
15661 _ACEOF
15662 if ac_fn_c_try_link "$LINENO"; then :
15663   attr_name=$attr; break
15664 fi
15665 rm -f core conftest.err conftest.$ac_objext \
15666     conftest$ac_exeext conftest.$ac_ext
15667         done
15668         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
15669 $as_echo "$attr_name" >&6; }
15670         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
15671
15672 cat >>confdefs.h <<_ACEOF
15673 #define PTHREAD_CREATE_JOINABLE $attr_name
15674 _ACEOF
15675
15676         fi
15677
15678         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
15679 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
15680         flag=no
15681         case ${host_os} in
15682             aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
15683             osf* | hpux*) flag="-D_REENTRANT";;
15684             solaris*)
15685             if test "$GCC" = "yes"; then
15686                 flag="-D_REENTRANT"
15687             else
15688                 flag="-mt -D_REENTRANT"
15689             fi
15690             ;;
15691         esac
15692         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
15693 $as_echo "${flag}" >&6; }
15694         if test "x$flag" != xno; then
15695             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
15696         fi
15697
15698         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
15699 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
15700 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
15701   $as_echo_n "(cached) " >&6
15702 else
15703
15704                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15705 /* end confdefs.h.  */
15706
15707                     #include <pthread.h>
15708 int
15709 main ()
15710 {
15711 int i = PTHREAD_PRIO_INHERIT;
15712   ;
15713   return 0;
15714 }
15715 _ACEOF
15716 if ac_fn_c_try_link "$LINENO"; then :
15717   ax_cv_PTHREAD_PRIO_INHERIT=yes
15718 else
15719   ax_cv_PTHREAD_PRIO_INHERIT=no
15720 fi
15721 rm -f core conftest.err conftest.$ac_objext \
15722     conftest$ac_exeext conftest.$ac_ext
15723
15724 fi
15725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
15726 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
15727         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
15728
15729 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
15730
15731 fi
15732
15733         LIBS="$save_LIBS"
15734         CFLAGS="$save_CFLAGS"
15735
15736         # More AIX lossage: compile with *_r variant
15737         if test "x$GCC" != xyes; then
15738             case $host_os in
15739                 aix*)
15740                 case "x/$CC" in #(
15741   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
15742     #handle absolute path differently from PATH based program lookup
15743                    case "x$CC" in #(
15744   x/*) :
15745     if as_fn_executable_p ${CC}_r; then :
15746   PTHREAD_CC="${CC}_r"
15747 fi ;; #(
15748   *) :
15749     for ac_prog in ${CC}_r
15750 do
15751   # Extract the first word of "$ac_prog", so it can be a program name with args.
15752 set dummy $ac_prog; ac_word=$2
15753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15754 $as_echo_n "checking for $ac_word... " >&6; }
15755 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
15756   $as_echo_n "(cached) " >&6
15757 else
15758   if test -n "$PTHREAD_CC"; then
15759   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
15760 else
15761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15762 for as_dir in $PATH
15763 do
15764   IFS=$as_save_IFS
15765   test -z "$as_dir" && as_dir=.
15766     for ac_exec_ext in '' $ac_executable_extensions; do
15767   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15768     ac_cv_prog_PTHREAD_CC="$ac_prog"
15769     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15770     break 2
15771   fi
15772 done
15773   done
15774 IFS=$as_save_IFS
15775
15776 fi
15777 fi
15778 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
15779 if test -n "$PTHREAD_CC"; then
15780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
15781 $as_echo "$PTHREAD_CC" >&6; }
15782 else
15783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15784 $as_echo "no" >&6; }
15785 fi
15786
15787
15788   test -n "$PTHREAD_CC" && break
15789 done
15790 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
15791  ;;
15792 esac ;; #(
15793   *) :
15794      ;;
15795 esac
15796                 ;;
15797             esac
15798         fi
15799 fi
15800
15801 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
15802
15803
15804
15805
15806
15807 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
15808 if test x"$ax_pthread_ok" = xyes; then
15809
15810
15811 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
15812
15813                 LIBS="$PTHREAD_LIBS $LIBS"
15814                 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
15815                 CC="$PTHREAD_CC"
15816                 ub_have_pthreads=yes
15817                 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
15818 "
15819 if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
15820
15821 cat >>confdefs.h <<_ACEOF
15822 #define HAVE_PTHREAD_SPINLOCK_T 1
15823 _ACEOF
15824
15825
15826 fi
15827 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
15828 "
15829 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
15830
15831 cat >>confdefs.h <<_ACEOF
15832 #define HAVE_PTHREAD_RWLOCK_T 1
15833 _ACEOF
15834
15835
15836 fi
15837
15838
15839         :
15840 else
15841         ax_pthread_ok=no
15842
15843 fi
15844 ac_ext=c
15845 ac_cpp='$CPP $CPPFLAGS'
15846 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15847 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15848 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15849
15850
15851 fi
15852
15853 # check solaris thread library
15854
15855 # Check whether --with-solaris-threads was given.
15856 if test "${with_solaris_threads+set}" = set; then :
15857   withval=$with_solaris_threads;
15858 else
15859    withval="no"
15860 fi
15861
15862 ub_have_sol_threads=no
15863 if test x_$withval != x_no; then
15864         if test x_$ub_have_pthreads != x_no; then
15865             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
15866 $as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
15867         else
15868         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
15869 $as_echo_n "checking for library containing thr_create... " >&6; }
15870 if ${ac_cv_search_thr_create+:} false; then :
15871   $as_echo_n "(cached) " >&6
15872 else
15873   ac_func_search_save_LIBS=$LIBS
15874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15875 /* end confdefs.h.  */
15876
15877 /* Override any GCC internal prototype to avoid an error.
15878    Use char because int might match the return type of a GCC
15879    builtin and then its argument prototype would still apply.  */
15880 #ifdef __cplusplus
15881 extern "C"
15882 #endif
15883 char thr_create ();
15884 int
15885 main ()
15886 {
15887 return thr_create ();
15888   ;
15889   return 0;
15890 }
15891 _ACEOF
15892 for ac_lib in '' thread; do
15893   if test -z "$ac_lib"; then
15894     ac_res="none required"
15895   else
15896     ac_res=-l$ac_lib
15897     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15898   fi
15899   if ac_fn_c_try_link "$LINENO"; then :
15900   ac_cv_search_thr_create=$ac_res
15901 fi
15902 rm -f core conftest.err conftest.$ac_objext \
15903     conftest$ac_exeext
15904   if ${ac_cv_search_thr_create+:} false; then :
15905   break
15906 fi
15907 done
15908 if ${ac_cv_search_thr_create+:} false; then :
15909
15910 else
15911   ac_cv_search_thr_create=no
15912 fi
15913 rm conftest.$ac_ext
15914 LIBS=$ac_func_search_save_LIBS
15915 fi
15916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
15917 $as_echo "$ac_cv_search_thr_create" >&6; }
15918 ac_res=$ac_cv_search_thr_create
15919 if test "$ac_res" != no; then :
15920   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15921
15922
15923 $as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
15924
15925
15926
15927
15928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
15929 $as_echo_n "checking whether $CC supports -mt... " >&6; }
15930 cache=`echo mt | sed 'y%.=/+-%___p_%'`
15931 if eval \${cv_prog_cc_flag_$cache+:} false; then :
15932   $as_echo_n "(cached) " >&6
15933 else
15934
15935 echo 'void f(void){}' >conftest.c
15936 if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
15937 eval "cv_prog_cc_flag_$cache=yes"
15938 else
15939 eval "cv_prog_cc_flag_$cache=no"
15940 fi
15941 rm -f conftest conftest.o conftest.c
15942
15943 fi
15944
15945 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
15946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15947 $as_echo "yes" >&6; }
15948 :
15949 CFLAGS="$CFLAGS -mt"
15950 else
15951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15952 $as_echo "no" >&6; }
15953 :
15954 CFLAGS="$CFLAGS -D_REENTRANT"
15955 fi
15956
15957                 ub_have_sol_threads=yes
15958
15959 else
15960
15961                 as_fn_error $? "no solaris threads found." "$LINENO" 5
15962
15963 fi
15964
15965         fi
15966 fi
15967
15968 fi # end of non-mingw check of thread libraries
15969
15970 # Check for PyUnbound
15971
15972 # Check whether --with-pyunbound was given.
15973 if test "${with_pyunbound+set}" = set; then :
15974   withval=$with_pyunbound;
15975 else
15976    withval="no"
15977 fi
15978
15979
15980 ub_test_python=no
15981 ub_with_pyunbound=no
15982 if test x_$withval != x_no; then
15983    ub_with_pyunbound=yes
15984    ub_test_python=yes
15985 fi
15986
15987 # Check for Python module
15988
15989 # Check whether --with-pythonmodule was given.
15990 if test "${with_pythonmodule+set}" = set; then :
15991   withval=$with_pythonmodule;
15992 else
15993    withval="no"
15994 fi
15995
15996
15997 ub_with_pythonmod=no
15998 if test x_$withval != x_no; then
15999    ub_with_pythonmod=yes
16000    ub_test_python=yes
16001 fi
16002
16003 # Check for Python & SWIG only on PyUnbound or PyModule
16004 if test x_$ub_test_python != x_no; then
16005
16006    # Check for Python
16007    ub_have_python=no
16008    ac_save_LIBS="$LIBS"
16009         #
16010         # Allow the use of a (user set) custom python version
16011         #
16012
16013
16014         # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
16015 set dummy python$PYTHON_VERSION; ac_word=$2
16016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16017 $as_echo_n "checking for $ac_word... " >&6; }
16018 if ${ac_cv_path_PYTHON+:} false; then :
16019   $as_echo_n "(cached) " >&6
16020 else
16021   case $PYTHON in
16022   [\\/]* | ?:[\\/]*)
16023   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
16024   ;;
16025   *)
16026   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16027 for as_dir in $PATH
16028 do
16029   IFS=$as_save_IFS
16030   test -z "$as_dir" && as_dir=.
16031     for ac_exec_ext in '' $ac_executable_extensions; do
16032   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16033     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
16034     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16035     break 2
16036   fi
16037 done
16038   done
16039 IFS=$as_save_IFS
16040
16041   ;;
16042 esac
16043 fi
16044 PYTHON=$ac_cv_path_PYTHON
16045 if test -n "$PYTHON"; then
16046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
16047 $as_echo "$PYTHON" >&6; }
16048 else
16049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16050 $as_echo "no" >&6; }
16051 fi
16052
16053
16054         if test -z "$PYTHON"; then
16055            as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
16056            PYTHON_VERSION=""
16057         fi
16058
16059         if test -z "$PYTHON_VERSION"; then
16060                 PYTHON_VERSION=`$PYTHON -c "import sys; \
16061                         print(sys.version.split()[0])"`
16062         fi
16063
16064         #
16065         # Check if you have distutils, else fail
16066         #
16067         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
16068 $as_echo_n "checking for the distutils Python package... " >&6; }
16069         ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
16070         if test -z "$ac_distutils_result"; then
16071                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16072 $as_echo "yes" >&6; }
16073         else
16074                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16075 $as_echo "no" >&6; }
16076                 as_fn_error $? "cannot import Python module \"distutils\".
16077 Please check your Python installation. The error was:
16078 $ac_distutils_result" "$LINENO" 5
16079                 PYTHON_VERSION=""
16080         fi
16081
16082         #
16083         # Check for Python include path
16084         #
16085         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
16086 $as_echo_n "checking for Python include path... " >&6; }
16087         if test -z "$PYTHON_CPPFLAGS"; then
16088                 python_path=`$PYTHON -c "import distutils.sysconfig; \
16089                         print(distutils.sysconfig.get_python_inc());"`
16090                 if test -n "${python_path}"; then
16091                         python_path="-I$python_path"
16092                 fi
16093                 PYTHON_CPPFLAGS=$python_path
16094         fi
16095         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
16096 $as_echo "$PYTHON_CPPFLAGS" >&6; }
16097
16098
16099         #
16100         # Check for Python library path
16101         #
16102         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
16103 $as_echo_n "checking for Python library path... " >&6; }
16104         if test -z "$PYTHON_LDFLAGS"; then
16105                 PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
16106                         print(get_config_var('BLDLIBRARY'));"`
16107         fi
16108         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
16109 $as_echo "$PYTHON_LDFLAGS" >&6; }
16110
16111
16112         #
16113         # Check for site packages
16114         #
16115         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
16116 $as_echo_n "checking for Python site-packages path... " >&6; }
16117         if test -z "$PYTHON_SITE_PKG"; then
16118                 PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
16119                         print(distutils.sysconfig.get_python_lib(1,0));"`
16120         fi
16121         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
16122 $as_echo "$PYTHON_SITE_PKG" >&6; }
16123
16124
16125         #
16126         # final check to see if everything compiles alright
16127         #
16128         { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
16129 $as_echo_n "checking consistency of all components of python development environment... " >&6; }
16130         ac_ext=c
16131 ac_cpp='$CPP $CPPFLAGS'
16132 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16133 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16134 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16135
16136         # save current global flags
16137         ac_save_LIBS="$LIBS"
16138         ac_save_CPPFLAGS="$CPPFLAGS"
16139
16140         LIBS="$LIBS $PYTHON_LDFLAGS"
16141         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16142         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16143 /* end confdefs.h.  */
16144
16145                 #include <Python.h>
16146
16147 int
16148 main ()
16149 {
16150
16151                 Py_Initialize();
16152
16153   ;
16154   return 0;
16155 }
16156 _ACEOF
16157 if ac_fn_c_try_link "$LINENO"; then :
16158   pythonexists=yes
16159 else
16160   pythonexists=no
16161 fi
16162 rm -f core conftest.err conftest.$ac_objext \
16163     conftest$ac_exeext conftest.$ac_ext
16164
16165         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
16166 $as_echo "$pythonexists" >&6; }
16167
16168         if test ! "$pythonexists" = "yes"; then
16169            as_fn_error $? "
16170   Could not link test program to Python. Maybe the main Python library has been
16171   installed in some non-standard library path. If so, pass it to configure,
16172   via the LDFLAGS environment variable.
16173   Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
16174   ============================================================================
16175    ERROR!
16176    You probably have to install the development version of the Python package
16177    for your distribution.  The exact name of this package varies among them.
16178   ============================================================================
16179            " "$LINENO" 5
16180           PYTHON_VERSION=""
16181         fi
16182         ac_ext=c
16183 ac_cpp='$CPP $CPPFLAGS'
16184 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16185 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16186 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16187
16188         # turn back to default flags
16189         CPPFLAGS="$ac_save_CPPFLAGS"
16190         LIBS="$ac_save_LIBS"
16191
16192         #
16193         # all done!
16194         #
16195
16196    if test ! -z "$PYTHON_VERSION"; then
16197         if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
16198                 as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
16199         fi
16200
16201       PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
16202
16203       # Have Python
16204
16205 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
16206
16207       LIBS="$PYTHON_LDFLAGS $LIBS"
16208       CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16209       ub_have_python=yes
16210
16211       # Check for SWIG
16212       ub_have_swig=no
16213
16214         # Extract the first word of "swig", so it can be a program name with args.
16215 set dummy swig; ac_word=$2
16216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16217 $as_echo_n "checking for $ac_word... " >&6; }
16218 if ${ac_cv_path_SWIG+:} false; then :
16219   $as_echo_n "(cached) " >&6
16220 else
16221   case $SWIG in
16222   [\\/]* | ?:[\\/]*)
16223   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
16224   ;;
16225   *)
16226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16227 for as_dir in $PATH
16228 do
16229   IFS=$as_save_IFS
16230   test -z "$as_dir" && as_dir=.
16231     for ac_exec_ext in '' $ac_executable_extensions; do
16232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16233     ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
16234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16235     break 2
16236   fi
16237 done
16238   done
16239 IFS=$as_save_IFS
16240
16241   ;;
16242 esac
16243 fi
16244 SWIG=$ac_cv_path_SWIG
16245 if test -n "$SWIG"; then
16246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
16247 $as_echo "$SWIG" >&6; }
16248 else
16249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16250 $as_echo "no" >&6; }
16251 fi
16252
16253
16254         if test -z "$SWIG" ; then
16255                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
16256 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
16257                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
16258         elif test -n "" ; then
16259                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
16260 $as_echo_n "checking for SWIG version... " >&6; }
16261                 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'`
16262                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
16263 $as_echo "$swig_version" >&6; }
16264                 if test -n "$swig_version" ; then
16265                         # Calculate the required version number components
16266                         required=
16267                         required_major=`echo $required | sed 's/[^0-9].*//'`
16268                         if test -z "$required_major" ; then
16269                                 required_major=0
16270                         fi
16271                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
16272                         required_minor=`echo $required | sed 's/[^0-9].*//'`
16273                         if test -z "$required_minor" ; then
16274                                 required_minor=0
16275                         fi
16276                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
16277                         required_patch=`echo $required | sed 's/[^0-9].*//'`
16278                         if test -z "$required_patch" ; then
16279                                 required_patch=0
16280                         fi
16281                         # Calculate the available version number components
16282                         available=$swig_version
16283                         available_major=`echo $available | sed 's/[^0-9].*//'`
16284                         if test -z "$available_major" ; then
16285                                 available_major=0
16286                         fi
16287                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
16288                         available_minor=`echo $available | sed 's/[^0-9].*//'`
16289                         if test -z "$available_minor" ; then
16290                                 available_minor=0
16291                         fi
16292                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
16293                         available_patch=`echo $available | sed 's/[^0-9].*//'`
16294                         if test -z "$available_patch" ; then
16295                                 available_patch=0
16296                         fi
16297                         if test $available_major -ne $required_major \
16298                                 -o $available_minor -ne $required_minor \
16299                                 -o $available_patch -lt $required_patch ; then
16300                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&5
16301 $as_echo "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
16302                                 SWIG='echo "Error: SWIG version >=  is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
16303                         else
16304                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
16305 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
16306                                 SWIG_LIB=`$SWIG -swiglib`
16307                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
16308 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
16309                         fi
16310                 else
16311                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
16312 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
16313                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
16314                 fi
16315         fi
16316
16317
16318       { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
16319 $as_echo_n "checking SWIG... " >&6; }
16320       if test ! -x "$SWIG"; then
16321          as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
16322       else
16323
16324 $as_echo "#define HAVE_SWIG 1" >>confdefs.h
16325
16326          swig="$SWIG"
16327
16328          { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
16329 $as_echo "present" >&6; }
16330
16331          # If have Python & SWIG
16332          # Declare PythonMod
16333          if test x_$ub_with_pythonmod != x_no; then
16334
16335 $as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
16336
16337             WITH_PYTHONMODULE=yes
16338
16339             PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
16340
16341             PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
16342
16343             PYTHONMOD_INSTALL=pythonmod-install
16344
16345             PYTHONMOD_UNINSTALL=pythonmod-uninstall
16346
16347          fi
16348
16349          # Declare PyUnbound
16350          if test x_$ub_with_pyunbound != x_no; then
16351
16352 $as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
16353
16354             WITH_PYUNBOUND=yes
16355
16356             PYUNBOUND_OBJ="libunbound_wrap.lo"
16357
16358             PYUNBOUND_TARGET="_unbound.la"
16359
16360             PYUNBOUND_INSTALL=pyunbound-install
16361
16362             PYUNBOUND_UNINSTALL=pyunbound-uninstall
16363
16364          fi
16365       fi
16366    else
16367       { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
16368 $as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
16369       ub_with_pyunbound=no
16370       ub_with_pythonmod=no
16371    fi
16372 fi
16373
16374 if test "`uname`" = "NetBSD"; then
16375         NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
16376
16377 fi
16378 CONFIG_DATE=`date +%Y%m%d`
16379
16380
16381 # Checks for libraries.
16382
16383 # libnss
16384 USE_NSS="no"
16385
16386 # Check whether --with-nss was given.
16387 if test "${with_nss+set}" = set; then :
16388   withval=$with_nss;
16389         USE_NSS="yes"
16390
16391 $as_echo "#define HAVE_NSS 1" >>confdefs.h
16392
16393         if test "$withval" != "" -a "$withval" != "yes"; then
16394                 CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
16395                 LDFLAGS="$LDFLAGS -L$withval/lib"
16396
16397         if test "x$enable_rpath" = xyes; then
16398                 if echo "$withval/lib" | grep "^/" >/dev/null; then
16399                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
16400                 fi
16401         fi
16402
16403                 CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
16404         else
16405                 CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
16406                 CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
16407         fi
16408         LIBS="$LIBS -lnss3 -lnspr4"
16409
16410
16411 fi
16412
16413
16414 # openssl
16415 if test $USE_NSS = "no"; then
16416
16417
16418 # Check whether --with-ssl was given.
16419 if test "${with_ssl+set}" = set; then :
16420   withval=$with_ssl;
16421
16422 else
16423
16424             withval="yes"
16425
16426 fi
16427
16428     if test x_$withval = x_no; then
16429         as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
16430     fi
16431
16432     withval=$withval
16433     if test x_$withval != x_no; then
16434         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
16435 $as_echo_n "checking for SSL... " >&6; }
16436         if test x_$withval = x_ -o x_$withval = x_yes; then
16437             withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
16438         fi
16439         for dir in $withval; do
16440             ssldir="$dir"
16441             if test -f "$dir/include/openssl/ssl.h"; then
16442                 found_ssl="yes"
16443
16444 cat >>confdefs.h <<_ACEOF
16445 #define HAVE_SSL /**/
16446 _ACEOF
16447
16448                                 if test "$ssldir" != "/usr"; then
16449                         CPPFLAGS="$CPPFLAGS -I$ssldir/include"
16450                         LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
16451                 fi
16452                 break;
16453             fi
16454         done
16455         if test x_$found_ssl != x_yes; then
16456             as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
16457         else
16458             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
16459 $as_echo "found in $ssldir" >&6; }
16460             HAVE_SSL=yes
16461                         if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
16462                 LDFLAGS="$LDFLAGS -L$ssldir/lib"
16463                 LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
16464
16465         if test "x$enable_rpath" = xyes; then
16466                 if echo "$ssldir/lib" | grep "^/" >/dev/null; then
16467                         RUNTIME_PATH="$RUNTIME_PATH -R$ssldir/lib"
16468                 fi
16469         fi
16470
16471             fi
16472
16473             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_CTX_init in -lcrypto" >&5
16474 $as_echo_n "checking for HMAC_CTX_init in -lcrypto... " >&6; }
16475             LIBS="$LIBS -lcrypto"
16476             LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
16477             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16478 /* end confdefs.h.  */
16479
16480 int
16481 main ()
16482 {
16483
16484                 int HMAC_CTX_init(void);
16485                 (void)HMAC_CTX_init();
16486
16487   ;
16488   return 0;
16489 }
16490 _ACEOF
16491 if ac_fn_c_try_link "$LINENO"; then :
16492
16493                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16494 $as_echo "yes" >&6; }
16495
16496 $as_echo "#define HAVE_HMAC_CTX_INIT 1" >>confdefs.h
16497
16498
16499 else
16500
16501                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16502 $as_echo "no" >&6; }
16503                 # check if -lwsock32 or -lgdi32 are needed.
16504                 BAKLIBS="$LIBS"
16505                 BAKSSLLIBS="$LIBSSL_LIBS"
16506                 LIBS="$LIBS -lgdi32"
16507                 LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32"
16508                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
16509 $as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
16510                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16511 /* end confdefs.h.  */
16512
16513 int
16514 main ()
16515 {
16516
16517                     int HMAC_CTX_init(void);
16518                     (void)HMAC_CTX_init();
16519
16520   ;
16521   return 0;
16522 }
16523 _ACEOF
16524 if ac_fn_c_try_link "$LINENO"; then :
16525
16526
16527 $as_echo "#define HAVE_HMAC_CTX_INIT 1" >>confdefs.h
16528
16529                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16530 $as_echo "yes" >&6; }
16531
16532 else
16533
16534                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16535 $as_echo "no" >&6; }
16536                     LIBS="$BAKLIBS"
16537                     LIBSSL_LIBS="$BAKSSLLIBS"
16538                     LIBS="$LIBS -ldl"
16539                     LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
16540                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
16541 $as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
16542                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16543 /* end confdefs.h.  */
16544
16545 int
16546 main ()
16547 {
16548
16549                         int HMAC_CTX_init(void);
16550                         (void)HMAC_CTX_init();
16551
16552   ;
16553   return 0;
16554 }
16555 _ACEOF
16556 if ac_fn_c_try_link "$LINENO"; then :
16557
16558
16559 $as_echo "#define HAVE_HMAC_CTX_INIT 1" >>confdefs.h
16560
16561                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16562 $as_echo "yes" >&6; }
16563
16564 else
16565
16566                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16567 $as_echo "no" >&6; }
16568                     as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
16569
16570 fi
16571 rm -f core conftest.err conftest.$ac_objext \
16572     conftest$ac_exeext conftest.$ac_ext
16573
16574 fi
16575 rm -f core conftest.err conftest.$ac_objext \
16576     conftest$ac_exeext conftest.$ac_ext
16577
16578 fi
16579 rm -f core conftest.err conftest.$ac_objext \
16580     conftest$ac_exeext conftest.$ac_ext
16581         fi
16582
16583
16584         # openssl engine functionality needs dlopen().
16585         BAKLIBS="$LIBS"
16586         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16587 $as_echo_n "checking for library containing dlopen... " >&6; }
16588 if ${ac_cv_search_dlopen+:} false; then :
16589   $as_echo_n "(cached) " >&6
16590 else
16591   ac_func_search_save_LIBS=$LIBS
16592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16593 /* end confdefs.h.  */
16594
16595 /* Override any GCC internal prototype to avoid an error.
16596    Use char because int might match the return type of a GCC
16597    builtin and then its argument prototype would still apply.  */
16598 #ifdef __cplusplus
16599 extern "C"
16600 #endif
16601 char dlopen ();
16602 int
16603 main ()
16604 {
16605 return dlopen ();
16606   ;
16607   return 0;
16608 }
16609 _ACEOF
16610 for ac_lib in '' dl; do
16611   if test -z "$ac_lib"; then
16612     ac_res="none required"
16613   else
16614     ac_res=-l$ac_lib
16615     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16616   fi
16617   if ac_fn_c_try_link "$LINENO"; then :
16618   ac_cv_search_dlopen=$ac_res
16619 fi
16620 rm -f core conftest.err conftest.$ac_objext \
16621     conftest$ac_exeext
16622   if ${ac_cv_search_dlopen+:} false; then :
16623   break
16624 fi
16625 done
16626 if ${ac_cv_search_dlopen+:} false; then :
16627
16628 else
16629   ac_cv_search_dlopen=no
16630 fi
16631 rm conftest.$ac_ext
16632 LIBS=$ac_func_search_save_LIBS
16633 fi
16634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16635 $as_echo "$ac_cv_search_dlopen" >&6; }
16636 ac_res=$ac_cv_search_dlopen
16637 if test "$ac_res" != no; then :
16638   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16639
16640 fi
16641
16642         if test "$LIBS" != "$BAKLIBS"; then
16643                 LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
16644         fi
16645     fi
16646 for ac_header in openssl/ssl.h
16647 do :
16648   ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
16649 "
16650 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
16651   cat >>confdefs.h <<_ACEOF
16652 #define HAVE_OPENSSL_SSL_H 1
16653 _ACEOF
16654
16655 fi
16656
16657 done
16658
16659 for ac_header in openssl/err.h
16660 do :
16661   ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
16662 "
16663 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
16664   cat >>confdefs.h <<_ACEOF
16665 #define HAVE_OPENSSL_ERR_H 1
16666 _ACEOF
16667
16668 fi
16669
16670 done
16671
16672 for ac_header in openssl/rand.h
16673 do :
16674   ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
16675 "
16676 if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
16677   cat >>confdefs.h <<_ACEOF
16678 #define HAVE_OPENSSL_RAND_H 1
16679 _ACEOF
16680
16681 fi
16682
16683 done
16684
16685
16686
16687
16688 # check if libssl needs libdl
16689 BAKLIBS="$LIBS"
16690 LIBS="-lssl $LIBS"
16691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
16692 $as_echo_n "checking if libssl needs libdl... " >&6; }
16693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16694 /* end confdefs.h.  */
16695
16696 /* Override any GCC internal prototype to avoid an error.
16697    Use char because int might match the return type of a GCC
16698    builtin and then its argument prototype would still apply.  */
16699 #ifdef __cplusplus
16700 extern "C"
16701 #endif
16702 char SSL_CTX_new ();
16703 int
16704 main ()
16705 {
16706 return SSL_CTX_new ();
16707   ;
16708   return 0;
16709 }
16710 _ACEOF
16711 if ac_fn_c_try_link "$LINENO"; then :
16712
16713         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16714 $as_echo "no" >&6; }
16715         LIBS="$BAKLIBS"
16716
16717 else
16718
16719         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16720 $as_echo "yes" >&6; }
16721         LIBS="$BAKLIBS"
16722         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16723 $as_echo_n "checking for library containing dlopen... " >&6; }
16724 if ${ac_cv_search_dlopen+:} false; then :
16725   $as_echo_n "(cached) " >&6
16726 else
16727   ac_func_search_save_LIBS=$LIBS
16728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16729 /* end confdefs.h.  */
16730
16731 /* Override any GCC internal prototype to avoid an error.
16732    Use char because int might match the return type of a GCC
16733    builtin and then its argument prototype would still apply.  */
16734 #ifdef __cplusplus
16735 extern "C"
16736 #endif
16737 char dlopen ();
16738 int
16739 main ()
16740 {
16741 return dlopen ();
16742   ;
16743   return 0;
16744 }
16745 _ACEOF
16746 for ac_lib in '' dl; do
16747   if test -z "$ac_lib"; then
16748     ac_res="none required"
16749   else
16750     ac_res=-l$ac_lib
16751     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16752   fi
16753   if ac_fn_c_try_link "$LINENO"; then :
16754   ac_cv_search_dlopen=$ac_res
16755 fi
16756 rm -f core conftest.err conftest.$ac_objext \
16757     conftest$ac_exeext
16758   if ${ac_cv_search_dlopen+:} false; then :
16759   break
16760 fi
16761 done
16762 if ${ac_cv_search_dlopen+:} false; then :
16763
16764 else
16765   ac_cv_search_dlopen=no
16766 fi
16767 rm conftest.$ac_ext
16768 LIBS=$ac_func_search_save_LIBS
16769 fi
16770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16771 $as_echo "$ac_cv_search_dlopen" >&6; }
16772 ac_res=$ac_cv_search_dlopen
16773 if test "$ac_res" != no; then :
16774   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16775
16776 fi
16777
16778
16779 fi
16780 rm -f core conftest.err conftest.$ac_objext \
16781     conftest$ac_exeext conftest.$ac_ext
16782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
16783 $as_echo_n "checking for LibreSSL... " >&6; }
16784 if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
16785         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16786 $as_echo "yes" >&6; }
16787
16788 $as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
16789
16790         # libressl provides these compat functions, but they may also be
16791         # declared by the OS in libc.  See if they have been declared.
16792         ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
16793 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
16794   ac_have_decl=1
16795 else
16796   ac_have_decl=0
16797 fi
16798
16799 cat >>confdefs.h <<_ACEOF
16800 #define HAVE_DECL_STRLCPY $ac_have_decl
16801 _ACEOF
16802 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
16803 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
16804   ac_have_decl=1
16805 else
16806   ac_have_decl=0
16807 fi
16808
16809 cat >>confdefs.h <<_ACEOF
16810 #define HAVE_DECL_STRLCAT $ac_have_decl
16811 _ACEOF
16812 ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
16813 if test "x$ac_cv_have_decl_arc4random" = xyes; then :
16814   ac_have_decl=1
16815 else
16816   ac_have_decl=0
16817 fi
16818
16819 cat >>confdefs.h <<_ACEOF
16820 #define HAVE_DECL_ARC4RANDOM $ac_have_decl
16821 _ACEOF
16822 ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
16823 if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
16824   ac_have_decl=1
16825 else
16826   ac_have_decl=0
16827 fi
16828
16829 cat >>confdefs.h <<_ACEOF
16830 #define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
16831 _ACEOF
16832 ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
16833 if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
16834   ac_have_decl=1
16835 else
16836   ac_have_decl=0
16837 fi
16838
16839 cat >>confdefs.h <<_ACEOF
16840 #define HAVE_DECL_REALLOCARRAY $ac_have_decl
16841 _ACEOF
16842
16843 else
16844         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16845 $as_echo "no" >&6; }
16846 fi
16847 for ac_header in openssl/conf.h
16848 do :
16849   ac_fn_c_check_header_compile "$LINENO" "openssl/conf.h" "ac_cv_header_openssl_conf_h" "$ac_includes_default
16850 "
16851 if test "x$ac_cv_header_openssl_conf_h" = xyes; then :
16852   cat >>confdefs.h <<_ACEOF
16853 #define HAVE_OPENSSL_CONF_H 1
16854 _ACEOF
16855
16856 fi
16857
16858 done
16859
16860 for ac_header in openssl/engine.h
16861 do :
16862   ac_fn_c_check_header_compile "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default
16863 "
16864 if test "x$ac_cv_header_openssl_engine_h" = xyes; then :
16865   cat >>confdefs.h <<_ACEOF
16866 #define HAVE_OPENSSL_ENGINE_H 1
16867 _ACEOF
16868
16869 fi
16870
16871 done
16872
16873 for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode
16874 do :
16875   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16876 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16877 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16878   cat >>confdefs.h <<_ACEOF
16879 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16880 _ACEOF
16881
16882 fi
16883 done
16884
16885 ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
16886 $ac_includes_default
16887 #ifdef HAVE_OPENSSL_ERR_H
16888 #include <openssl/err.h>
16889 #endif
16890
16891 #ifdef HAVE_OPENSSL_RAND_H
16892 #include <openssl/rand.h>
16893 #endif
16894
16895 #ifdef HAVE_OPENSSL_CONF_H
16896 #include <openssl/conf.h>
16897 #endif
16898
16899 #ifdef HAVE_OPENSSL_ENGINE_H
16900 #include <openssl/engine.h>
16901 #endif
16902 #include <openssl/ssl.h>
16903 #include <openssl/evp.h>
16904
16905 "
16906 if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
16907   ac_have_decl=1
16908 else
16909   ac_have_decl=0
16910 fi
16911
16912 cat >>confdefs.h <<_ACEOF
16913 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
16914 _ACEOF
16915 ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
16916 $ac_includes_default
16917 #ifdef HAVE_OPENSSL_ERR_H
16918 #include <openssl/err.h>
16919 #endif
16920
16921 #ifdef HAVE_OPENSSL_RAND_H
16922 #include <openssl/rand.h>
16923 #endif
16924
16925 #ifdef HAVE_OPENSSL_CONF_H
16926 #include <openssl/conf.h>
16927 #endif
16928
16929 #ifdef HAVE_OPENSSL_ENGINE_H
16930 #include <openssl/engine.h>
16931 #endif
16932 #include <openssl/ssl.h>
16933 #include <openssl/evp.h>
16934
16935 "
16936 if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
16937   ac_have_decl=1
16938 else
16939   ac_have_decl=0
16940 fi
16941
16942 cat >>confdefs.h <<_ACEOF
16943 #define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
16944 _ACEOF
16945 ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
16946 $ac_includes_default
16947 #ifdef HAVE_OPENSSL_ERR_H
16948 #include <openssl/err.h>
16949 #endif
16950
16951 #ifdef HAVE_OPENSSL_RAND_H
16952 #include <openssl/rand.h>
16953 #endif
16954
16955 #ifdef HAVE_OPENSSL_CONF_H
16956 #include <openssl/conf.h>
16957 #endif
16958
16959 #ifdef HAVE_OPENSSL_ENGINE_H
16960 #include <openssl/engine.h>
16961 #endif
16962 #include <openssl/ssl.h>
16963 #include <openssl/evp.h>
16964
16965 "
16966 if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
16967   ac_have_decl=1
16968 else
16969   ac_have_decl=0
16970 fi
16971
16972 cat >>confdefs.h <<_ACEOF
16973 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
16974 _ACEOF
16975
16976 fi
16977
16978
16979 # Check whether --enable-sha2 was given.
16980 if test "${enable_sha2+set}" = set; then :
16981   enableval=$enable_sha2;
16982 fi
16983
16984 case "$enable_sha2" in
16985         no)
16986         ;;
16987         yes|*)
16988
16989 $as_echo "#define USE_SHA2 1" >>confdefs.h
16990
16991         ;;
16992 esac
16993
16994 # check wether gost also works
16995
16996 # Check whether --enable-gost was given.
16997 if test "${enable_gost+set}" = set; then :
16998   enableval=$enable_gost;
16999 fi
17000
17001 use_gost="no"
17002 if test $USE_NSS = "no"; then
17003 case "$enable_gost" in
17004         no)
17005         ;;
17006         *)
17007         ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
17008 if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
17009   :
17010 else
17011   as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
17012 fi
17013
17014         ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
17015 if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
17016
17017 else
17018   as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
17019 fi
17020
17021
17022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
17023 $as_echo_n "checking if GOST works... " >&6; }
17024 if test c${cross_compiling} = cno; then
17025 BAKCFLAGS="$CFLAGS"
17026 if test -n "$ssldir"; then
17027         CFLAGS="$CFLAGS -Wl,-rpath,$ssldir/lib"
17028 fi
17029 if test "$cross_compiling" = yes; then :
17030   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17031 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17032 as_fn_error $? "cannot run test program while cross compiling
17033 See \`config.log' for more details" "$LINENO" 5; }
17034 else
17035   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17036 /* end confdefs.h.  */
17037
17038 #include <string.h>
17039 #include <openssl/ssl.h>
17040 #include <openssl/evp.h>
17041 #include <openssl/engine.h>
17042 #include <openssl/conf.h>
17043 /* routine to load gost (from sldns) */
17044 int load_gost_id(void)
17045 {
17046         static int gost_id = 0;
17047         const EVP_PKEY_ASN1_METHOD* meth;
17048         ENGINE* e;
17049
17050         if(gost_id) return gost_id;
17051
17052         /* see if configuration loaded gost implementation from other engine*/
17053         meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
17054         if(meth) {
17055                 EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
17056                 return gost_id;
17057         }
17058
17059         /* see if engine can be loaded already */
17060         e = ENGINE_by_id("gost");
17061         if(!e) {
17062                 /* load it ourself, in case statically linked */
17063                 ENGINE_load_builtin_engines();
17064                 ENGINE_load_dynamic();
17065                 e = ENGINE_by_id("gost");
17066         }
17067         if(!e) {
17068                 /* no gost engine in openssl */
17069                 return 0;
17070         }
17071         if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
17072                 ENGINE_finish(e);
17073                 ENGINE_free(e);
17074                 return 0;
17075         }
17076
17077         meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
17078         if(!meth) {
17079                 /* algo not found */
17080                 ENGINE_finish(e);
17081                 ENGINE_free(e);
17082                 return 0;
17083         }
17084         EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
17085         return gost_id;
17086 }
17087 int main(void) {
17088         EVP_MD_CTX* ctx;
17089         const EVP_MD* md;
17090         unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
17091         const char* str = "Hello world";
17092         const unsigned char check[] = {
17093                 0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
17094                 0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
17095                 0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
17096                 0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
17097         };
17098         OPENSSL_config(NULL);
17099         (void)load_gost_id();
17100         md = EVP_get_digestbyname("md_gost94");
17101         if(!md) return 1;
17102         memset(digest, 0, sizeof(digest));
17103         ctx = EVP_MD_CTX_create();
17104         if(!ctx) return 2;
17105         if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
17106         if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
17107         if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
17108         /* uncomment to see the hash calculated.
17109                 {int i;
17110                 for(i=0; i<32; i++)
17111                         printf(" %2.2x", (int)digest[i]);
17112                 printf("\n");}
17113         */
17114         if(memcmp(digest, check, sizeof(check)) != 0)
17115                 return 6;
17116         return 0;
17117 }
17118
17119 _ACEOF
17120 if ac_fn_c_try_run "$LINENO"; then :
17121   eval "ac_cv_c_gost_works=yes"
17122 else
17123   eval "ac_cv_c_gost_works=no"
17124 fi
17125 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17126   conftest.$ac_objext conftest.beam conftest.$ac_ext
17127 fi
17128
17129 CFLAGS="$BAKCFLAGS"
17130 else
17131 eval "ac_cv_c_gost_works=maybe"
17132 fi
17133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
17134 $as_echo "$ac_cv_c_gost_works" >&6; }
17135
17136         if test "$ac_cv_c_gost_works" != no; then
17137                 use_gost="yes"
17138
17139 $as_echo "#define USE_GOST 1" >>confdefs.h
17140
17141         fi
17142         ;;
17143 esac
17144 fi
17145 # Check whether --enable-ecdsa was given.
17146 if test "${enable_ecdsa+set}" = set; then :
17147   enableval=$enable_ecdsa;
17148 fi
17149
17150 use_ecdsa="no"
17151 case "$enable_ecdsa" in
17152     no)
17153       ;;
17154     *)
17155       if test $USE_NSS = "no"; then
17156               ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
17157 if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
17158
17159 else
17160   as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17161 fi
17162
17163               ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
17164 if test "x$ac_cv_func_SHA384_Init" = xyes; then :
17165
17166 else
17167   as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17168 fi
17169
17170               ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
17171 #include <openssl/evp.h>
17172
17173 "
17174 if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
17175   ac_have_decl=1
17176 else
17177   ac_have_decl=0
17178 fi
17179
17180 cat >>confdefs.h <<_ACEOF
17181 #define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
17182 _ACEOF
17183 if test $ac_have_decl = 1; then :
17184
17185 else
17186   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17187 fi
17188 ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
17189 #include <openssl/evp.h>
17190
17191 "
17192 if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
17193   ac_have_decl=1
17194 else
17195   ac_have_decl=0
17196 fi
17197
17198 cat >>confdefs.h <<_ACEOF
17199 #define HAVE_DECL_NID_SECP384R1 $ac_have_decl
17200 _ACEOF
17201 if test $ac_have_decl = 1; then :
17202
17203 else
17204   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17205 fi
17206
17207               # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
17208               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
17209 $as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
17210               if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
17211                 if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
17212                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17213 $as_echo "no" >&6; }
17214
17215 cat >>confdefs.h <<_ACEOF
17216 #define USE_ECDSA_EVP_WORKAROUND 1
17217 _ACEOF
17218
17219                 else
17220                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17221 $as_echo "yes" >&6; }
17222                 fi
17223               else
17224                 # not OpenSSL, thus likely LibreSSL, which supports it
17225                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17226 $as_echo "yes" >&6; }
17227               fi
17228       fi
17229       # we now know we have ECDSA and the required curves.
17230
17231 cat >>confdefs.h <<_ACEOF
17232 #define USE_ECDSA 1
17233 _ACEOF
17234
17235       use_ecdsa="yes"
17236       ;;
17237 esac
17238
17239 # Check whether --enable-event-api was given.
17240 if test "${enable_event_api+set}" = set; then :
17241   enableval=$enable_event_api;
17242 fi
17243
17244 use_unbound_event="no"
17245 case "$enable_event_api" in
17246     yes)
17247       use_unbound_event="yes"
17248       ;;
17249     *)
17250       ;;
17251 esac
17252
17253 # check for libevent
17254
17255 # Check whether --with-libevent was given.
17256 if test "${with_libevent+set}" = set; then :
17257   withval=$with_libevent;
17258 else
17259    withval="no"
17260 fi
17261
17262 if test x_$withval = x_yes -o x_$withval != x_no; then
17263         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
17264 $as_echo_n "checking for libevent... " >&6; }
17265         if test x_$withval = x_ -o x_$withval = x_yes; then
17266             withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
17267         fi
17268         for dir in $withval; do
17269             thedir="$dir"
17270             if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
17271                 found_libevent="yes"
17272                                 if test "$thedir" != "/usr"; then
17273                     CPPFLAGS="$CPPFLAGS -I$thedir/include"
17274                 fi
17275                 break;
17276             fi
17277         done
17278         if test x_$found_libevent != x_yes; then
17279                 if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
17280                         # libevent source directory
17281                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
17282 $as_echo "found in $thedir" >&6; }
17283                         CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
17284                         BAK_LDFLAGS_SET="1"
17285                         BAK_LDFLAGS="$LDFLAGS"
17286                         # remove evdns from linking
17287                         mkdir build >/dev/null 2>&1
17288                         mkdir build/libevent >/dev/null 2>&1
17289                         mkdir build/libevent/.libs >/dev/null 2>&1
17290                         ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
17291                         ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
17292                         ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
17293                         cp $ev_files_o build/libevent
17294                         cp $ev_files_lo build/libevent
17295                         cp $ev_files_libso build/libevent/.libs
17296                         LATE_LDFLAGS="build/libevent/*.lo -lm"
17297                         LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
17298                 else
17299                         as_fn_error $? "Cannot find the libevent library in $withval
17300 You can restart ./configure --with-libevent=no to use a builtin alternative.
17301 Please note that this alternative is not as capable as libevent when using
17302 large outgoing port ranges.  " "$LINENO" 5
17303                 fi
17304         else
17305             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
17306 $as_echo "found in $thedir" >&6; }
17307                     if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
17308                     LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
17309
17310         if test "x$enable_rpath" = xyes; then
17311                 if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
17312                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
17313                 fi
17314         fi
17315
17316             else
17317                                     if test "$thedir" != "/usr" -a "$thedir" != ""; then
17318                         LDFLAGS="$LDFLAGS -L$thedir/lib"
17319
17320         if test "x$enable_rpath" = xyes; then
17321                 if echo "$thedir/lib" | grep "^/" >/dev/null; then
17322                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
17323                 fi
17324         fi
17325
17326                     fi
17327             fi
17328         fi
17329         # check for library used by libevent after 1.3c
17330         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17331 $as_echo_n "checking for library containing clock_gettime... " >&6; }
17332 if ${ac_cv_search_clock_gettime+:} false; then :
17333   $as_echo_n "(cached) " >&6
17334 else
17335   ac_func_search_save_LIBS=$LIBS
17336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17337 /* end confdefs.h.  */
17338
17339 /* Override any GCC internal prototype to avoid an error.
17340    Use char because int might match the return type of a GCC
17341    builtin and then its argument prototype would still apply.  */
17342 #ifdef __cplusplus
17343 extern "C"
17344 #endif
17345 char clock_gettime ();
17346 int
17347 main ()
17348 {
17349 return clock_gettime ();
17350   ;
17351   return 0;
17352 }
17353 _ACEOF
17354 for ac_lib in '' rt; do
17355   if test -z "$ac_lib"; then
17356     ac_res="none required"
17357   else
17358     ac_res=-l$ac_lib
17359     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17360   fi
17361   if ac_fn_c_try_link "$LINENO"; then :
17362   ac_cv_search_clock_gettime=$ac_res
17363 fi
17364 rm -f core conftest.err conftest.$ac_objext \
17365     conftest$ac_exeext
17366   if ${ac_cv_search_clock_gettime+:} false; then :
17367   break
17368 fi
17369 done
17370 if ${ac_cv_search_clock_gettime+:} false; then :
17371
17372 else
17373   ac_cv_search_clock_gettime=no
17374 fi
17375 rm conftest.$ac_ext
17376 LIBS=$ac_func_search_save_LIBS
17377 fi
17378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
17379 $as_echo "$ac_cv_search_clock_gettime" >&6; }
17380 ac_res=$ac_cv_search_clock_gettime
17381 if test "$ac_res" != no; then :
17382   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17383
17384 fi
17385
17386
17387         # is the event.h header libev or libevent?
17388         for ac_header in event.h
17389 do :
17390   ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
17391 "
17392 if test "x$ac_cv_header_event_h" = xyes; then :
17393   cat >>confdefs.h <<_ACEOF
17394 #define HAVE_EVENT_H 1
17395 _ACEOF
17396
17397 fi
17398
17399 done
17400
17401         ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
17402 #include <event.h>
17403
17404 "
17405 if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
17406
17407                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
17408 $as_echo_n "checking for library containing event_set... " >&6; }
17409 if ${ac_cv_search_event_set+:} false; then :
17410   $as_echo_n "(cached) " >&6
17411 else
17412   ac_func_search_save_LIBS=$LIBS
17413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17414 /* end confdefs.h.  */
17415
17416 /* Override any GCC internal prototype to avoid an error.
17417    Use char because int might match the return type of a GCC
17418    builtin and then its argument prototype would still apply.  */
17419 #ifdef __cplusplus
17420 extern "C"
17421 #endif
17422 char event_set ();
17423 int
17424 main ()
17425 {
17426 return event_set ();
17427   ;
17428   return 0;
17429 }
17430 _ACEOF
17431 for ac_lib in '' ev; do
17432   if test -z "$ac_lib"; then
17433     ac_res="none required"
17434   else
17435     ac_res=-l$ac_lib
17436     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17437   fi
17438   if ac_fn_c_try_link "$LINENO"; then :
17439   ac_cv_search_event_set=$ac_res
17440 fi
17441 rm -f core conftest.err conftest.$ac_objext \
17442     conftest$ac_exeext
17443   if ${ac_cv_search_event_set+:} false; then :
17444   break
17445 fi
17446 done
17447 if ${ac_cv_search_event_set+:} false; then :
17448
17449 else
17450   ac_cv_search_event_set=no
17451 fi
17452 rm conftest.$ac_ext
17453 LIBS=$ac_func_search_save_LIBS
17454 fi
17455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
17456 $as_echo "$ac_cv_search_event_set" >&6; }
17457 ac_res=$ac_cv_search_event_set
17458 if test "$ac_res" != no; then :
17459   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17460
17461 fi
17462
17463
17464 else
17465
17466                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
17467 $as_echo_n "checking for library containing event_set... " >&6; }
17468 if ${ac_cv_search_event_set+:} false; then :
17469   $as_echo_n "(cached) " >&6
17470 else
17471   ac_func_search_save_LIBS=$LIBS
17472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17473 /* end confdefs.h.  */
17474
17475 /* Override any GCC internal prototype to avoid an error.
17476    Use char because int might match the return type of a GCC
17477    builtin and then its argument prototype would still apply.  */
17478 #ifdef __cplusplus
17479 extern "C"
17480 #endif
17481 char event_set ();
17482 int
17483 main ()
17484 {
17485 return event_set ();
17486   ;
17487   return 0;
17488 }
17489 _ACEOF
17490 for ac_lib in '' event; do
17491   if test -z "$ac_lib"; then
17492     ac_res="none required"
17493   else
17494     ac_res=-l$ac_lib
17495     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17496   fi
17497   if ac_fn_c_try_link "$LINENO"; then :
17498   ac_cv_search_event_set=$ac_res
17499 fi
17500 rm -f core conftest.err conftest.$ac_objext \
17501     conftest$ac_exeext
17502   if ${ac_cv_search_event_set+:} false; then :
17503   break
17504 fi
17505 done
17506 if ${ac_cv_search_event_set+:} false; then :
17507
17508 else
17509   ac_cv_search_event_set=no
17510 fi
17511 rm conftest.$ac_ext
17512 LIBS=$ac_func_search_save_LIBS
17513 fi
17514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
17515 $as_echo "$ac_cv_search_event_set" >&6; }
17516 ac_res=$ac_cv_search_event_set
17517 if test "$ac_res" != no; then :
17518   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17519
17520 fi
17521
17522
17523 fi
17524
17525         for ac_func in event_base_free
17526 do :
17527   ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
17528 if test "x$ac_cv_func_event_base_free" = xyes; then :
17529   cat >>confdefs.h <<_ACEOF
17530 #define HAVE_EVENT_BASE_FREE 1
17531 _ACEOF
17532
17533 fi
17534 done
17535  # only in libevent 1.2 and later
17536         for ac_func in event_base_once
17537 do :
17538   ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
17539 if test "x$ac_cv_func_event_base_once" = xyes; then :
17540   cat >>confdefs.h <<_ACEOF
17541 #define HAVE_EVENT_BASE_ONCE 1
17542 _ACEOF
17543
17544 fi
17545 done
17546  # only in libevent 1.4.1 and later
17547         for ac_func in event_base_new
17548 do :
17549   ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
17550 if test "x$ac_cv_func_event_base_new" = xyes; then :
17551   cat >>confdefs.h <<_ACEOF
17552 #define HAVE_EVENT_BASE_NEW 1
17553 _ACEOF
17554
17555 fi
17556 done
17557  # only in libevent 1.4.1 and later
17558         for ac_func in event_base_get_method
17559 do :
17560   ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
17561 if test "x$ac_cv_func_event_base_get_method" = xyes; then :
17562   cat >>confdefs.h <<_ACEOF
17563 #define HAVE_EVENT_BASE_GET_METHOD 1
17564 _ACEOF
17565
17566 fi
17567 done
17568  # only in libevent 1.4.3 and later
17569         for ac_func in ev_loop
17570 do :
17571   ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
17572 if test "x$ac_cv_func_ev_loop" = xyes; then :
17573   cat >>confdefs.h <<_ACEOF
17574 #define HAVE_EV_LOOP 1
17575 _ACEOF
17576
17577 fi
17578 done
17579  # only in libev. (tested on 3.51)
17580         for ac_func in ev_default_loop
17581 do :
17582   ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
17583 if test "x$ac_cv_func_ev_default_loop" = xyes; then :
17584   cat >>confdefs.h <<_ACEOF
17585 #define HAVE_EV_DEFAULT_LOOP 1
17586 _ACEOF
17587
17588 fi
17589 done
17590  # only in libev. (tested on 4.00)
17591         if test -n "$BAK_LDFLAGS_SET"; then
17592                 LDFLAGS="$BAK_LDFLAGS"
17593         fi
17594         if test "$use_unbound_event" = "yes"; then
17595                 UNBOUND_EVENT_INSTALL=unbound-event-install
17596
17597                 UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
17598
17599         fi
17600 else
17601
17602 $as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
17603
17604 fi
17605
17606 # check for libexpat
17607
17608 # Check whether --with-libexpat was given.
17609 if test "${with_libexpat+set}" = set; then :
17610   withval=$with_libexpat;
17611 else
17612    withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
17613 fi
17614
17615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
17616 $as_echo_n "checking for libexpat... " >&6; }
17617 found_libexpat="no"
17618 for dir in $withval ; do
17619             if test -f "$dir/include/expat.h"; then
17620                 found_libexpat="yes"
17621                                 if test "$dir" != "/usr"; then
17622                     CPPFLAGS="$CPPFLAGS -I$dir/include"
17623                     LDFLAGS="$LDFLAGS -L$dir/lib"
17624                 fi
17625                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
17626 $as_echo "found in $dir" >&6; }
17627                 break;
17628             fi
17629 done
17630 if test x_$found_libexpat != x_yes; then
17631         as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
17632 fi
17633 for ac_header in expat.h
17634 do :
17635   ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
17636 "
17637 if test "x$ac_cv_header_expat_h" = xyes; then :
17638   cat >>confdefs.h <<_ACEOF
17639 #define HAVE_EXPAT_H 1
17640 _ACEOF
17641
17642 fi
17643
17644 done
17645
17646
17647 # set static linking if requested
17648
17649 staticexe=""
17650 # Check whether --enable-static-exe was given.
17651 if test "${enable_static_exe+set}" = set; then :
17652   enableval=$enable_static_exe;
17653 fi
17654
17655 if test x_$enable_static_exe = x_yes; then
17656         staticexe="-static"
17657         if test "$on_mingw" = yes; then
17658                 staticexe="-all-static"
17659                 # for static crosscompile, include gdi32 and zlib here.
17660                 if test "`uname`" = "Linux"; then
17661                         LIBS="$LIBS -lgdi32 -lz"
17662                 fi
17663         fi
17664 fi
17665
17666 # set lock checking if requested
17667 # Check whether --enable-lock_checks was given.
17668 if test "${enable_lock_checks+set}" = set; then :
17669   enableval=$enable_lock_checks;
17670 fi
17671
17672 if test x_$enable_lock_checks = x_yes; then
17673
17674 $as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
17675
17676         CHECKLOCK_OBJ="checklocks.lo"
17677
17678 fi
17679
17680
17681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
17682 $as_echo_n "checking for getaddrinfo... " >&6; }
17683 ac_cv_func_getaddrinfo=no
17684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17685 /* end confdefs.h.  */
17686
17687 #ifdef __cplusplus
17688 extern "C"
17689 {
17690 #endif
17691 char* getaddrinfo();
17692 char* (*f) () = getaddrinfo;
17693 #ifdef __cplusplus
17694 }
17695 #endif
17696 int main() {
17697         ;
17698         return 0;
17699 }
17700
17701 _ACEOF
17702 if ac_fn_c_try_link "$LINENO"; then :
17703   ac_cv_func_getaddrinfo="yes"
17704 if test "$ac_cv_header_windows_h" = "yes"; then
17705
17706 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
17707
17708         USE_WINSOCK="1"
17709         LIBS="$LIBS -lws2_32"
17710 fi
17711
17712 else
17713   ORIGLIBS="$LIBS"
17714 LIBS="$LIBS -lws2_32"
17715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17716 /* end confdefs.h.  */
17717
17718 #ifdef HAVE_WS2TCPIP_H
17719 #include <ws2tcpip.h>
17720 #endif
17721
17722 int
17723 main ()
17724 {
17725
17726         (void)getaddrinfo(NULL, NULL, NULL, NULL);
17727
17728
17729   ;
17730   return 0;
17731 }
17732 _ACEOF
17733 if ac_fn_c_try_link "$LINENO"; then :
17734
17735 ac_cv_func_getaddrinfo="yes"
17736
17737 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
17738
17739 USE_WINSOCK="1"
17740
17741 else
17742
17743 ac_cv_func_getaddrinfo="no"
17744 LIBS="$ORIGLIBS"
17745
17746 fi
17747 rm -f core conftest.err conftest.$ac_objext \
17748     conftest$ac_exeext conftest.$ac_ext
17749
17750 fi
17751 rm -f core conftest.err conftest.$ac_objext \
17752     conftest$ac_exeext conftest.$ac_ext
17753
17754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
17755 $as_echo "$ac_cv_func_getaddrinfo" >&6; }
17756 if test $ac_cv_func_getaddrinfo = yes; then
17757
17758 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
17759
17760 fi
17761
17762 if test "$USE_WINSOCK" = 1; then
17763
17764 $as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
17765
17766         for ac_header in iphlpapi.h
17767 do :
17768   ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
17769 #include <windows.h>
17770
17771 "
17772 if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
17773   cat >>confdefs.h <<_ACEOF
17774 #define HAVE_IPHLPAPI_H 1
17775 _ACEOF
17776
17777 fi
17778
17779 done
17780
17781         if test -n "$ac_tool_prefix"; then
17782   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
17783 set dummy ${ac_tool_prefix}windres; ac_word=$2
17784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17785 $as_echo_n "checking for $ac_word... " >&6; }
17786 if ${ac_cv_prog_WINDRES+:} false; then :
17787   $as_echo_n "(cached) " >&6
17788 else
17789   if test -n "$WINDRES"; then
17790   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
17791 else
17792 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17793 for as_dir in $PATH
17794 do
17795   IFS=$as_save_IFS
17796   test -z "$as_dir" && as_dir=.
17797     for ac_exec_ext in '' $ac_executable_extensions; do
17798   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17799     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
17800     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17801     break 2
17802   fi
17803 done
17804   done
17805 IFS=$as_save_IFS
17806
17807 fi
17808 fi
17809 WINDRES=$ac_cv_prog_WINDRES
17810 if test -n "$WINDRES"; then
17811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
17812 $as_echo "$WINDRES" >&6; }
17813 else
17814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17815 $as_echo "no" >&6; }
17816 fi
17817
17818
17819 fi
17820 if test -z "$ac_cv_prog_WINDRES"; then
17821   ac_ct_WINDRES=$WINDRES
17822   # Extract the first word of "windres", so it can be a program name with args.
17823 set dummy windres; ac_word=$2
17824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17825 $as_echo_n "checking for $ac_word... " >&6; }
17826 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
17827   $as_echo_n "(cached) " >&6
17828 else
17829   if test -n "$ac_ct_WINDRES"; then
17830   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
17831 else
17832 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17833 for as_dir in $PATH
17834 do
17835   IFS=$as_save_IFS
17836   test -z "$as_dir" && as_dir=.
17837     for ac_exec_ext in '' $ac_executable_extensions; do
17838   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17839     ac_cv_prog_ac_ct_WINDRES="windres"
17840     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17841     break 2
17842   fi
17843 done
17844   done
17845 IFS=$as_save_IFS
17846
17847 fi
17848 fi
17849 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
17850 if test -n "$ac_ct_WINDRES"; then
17851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
17852 $as_echo "$ac_ct_WINDRES" >&6; }
17853 else
17854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17855 $as_echo "no" >&6; }
17856 fi
17857
17858   if test "x$ac_ct_WINDRES" = x; then
17859     WINDRES=""
17860   else
17861     case $cross_compiling:$ac_tool_warned in
17862 yes:)
17863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17864 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17865 ac_tool_warned=yes ;;
17866 esac
17867     WINDRES=$ac_ct_WINDRES
17868   fi
17869 else
17870   WINDRES="$ac_cv_prog_WINDRES"
17871 fi
17872
17873         LIBS="$LIBS -liphlpapi"
17874         WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
17875
17876         WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
17877
17878         WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
17879
17880         WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
17881
17882         WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
17883
17884         WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
17885
17886         WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
17887
17888         WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
17889
17890 fi
17891 if test $ac_cv_func_getaddrinfo = no; then
17892         case " $LIBOBJS " in
17893   *" fake-rfc2553.$ac_objext "* ) ;;
17894   *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
17895  ;;
17896 esac
17897
17898 fi
17899 # check after getaddrinfo for its libraries
17900
17901 # check ioctlsocket
17902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
17903 $as_echo_n "checking for ioctlsocket... " >&6; }
17904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17905 /* end confdefs.h.  */
17906
17907 #ifdef HAVE_WINSOCK2_H
17908 #include <winsock2.h>
17909 #endif
17910
17911 int
17912 main ()
17913 {
17914
17915         (void)ioctlsocket(0, 0, NULL);
17916
17917   ;
17918   return 0;
17919 }
17920 _ACEOF
17921 if ac_fn_c_try_link "$LINENO"; then :
17922
17923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17924 $as_echo "yes" >&6; }
17925
17926 $as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
17927
17928
17929 else
17930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17931 $as_echo "no" >&6; }
17932 fi
17933 rm -f core conftest.err conftest.$ac_objext \
17934     conftest$ac_exeext conftest.$ac_ext
17935
17936
17937 # see if daemon(3) exists, and if it is deprecated.
17938 for ac_func in daemon
17939 do :
17940   ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
17941 if test "x$ac_cv_func_daemon" = xyes; then :
17942   cat >>confdefs.h <<_ACEOF
17943 #define HAVE_DAEMON 1
17944 _ACEOF
17945
17946 fi
17947 done
17948
17949 if test $ac_cv_func_daemon = yes; then
17950
17951
17952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
17953 $as_echo_n "checking if daemon is deprecated... " >&6; }
17954 cache=`echo daemon | sed 'y%.=/+-%___p_%'`
17955 if eval \${cv_cc_deprecated_$cache+:} false; then :
17956   $as_echo_n "(cached) " >&6
17957 else
17958
17959 echo '
17960 #include <stdlib.h>
17961 ' >conftest.c
17962 echo 'void f(){ (void)daemon(0, 0); }' >>conftest.c
17963 if test -z "`$CC -c conftest.c 2>&1 | grep deprecated`"; then
17964 eval "cv_cc_deprecated_$cache=no"
17965 else
17966 eval "cv_cc_deprecated_$cache=yes"
17967 fi
17968 rm -f conftest conftest.o conftest.c
17969
17970 fi
17971
17972 if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
17973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17974 $as_echo "yes" >&6; }
17975
17976 cat >>confdefs.h <<_ACEOF
17977 #define DEPRECATED_DAEMON 1
17978 _ACEOF
17979
17980 :
17981
17982 else
17983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17984 $as_echo "no" >&6; }
17985 :
17986
17987 fi
17988
17989 fi
17990
17991 ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
17992 $ac_includes_default
17993 #ifdef HAVE_SYS_UN_H
17994 #include <sys/un.h>
17995 #endif
17996
17997 "
17998 if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
17999
18000 cat >>confdefs.h <<_ACEOF
18001 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
18002 _ACEOF
18003
18004
18005 fi
18006
18007 ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
18008 $ac_includes_default
18009 #if HAVE_SYS_PARAM_H
18010 #include <sys/param.h>
18011 #endif
18012
18013 #ifdef HAVE_SYS_SOCKET_H
18014 #include <sys/socket.h>
18015 #endif
18016
18017 #ifdef HAVE_SYS_UIO_H
18018 #include <sys/uio.h>
18019 #endif
18020
18021 #ifdef HAVE_NETINET_IN_H
18022 #include <netinet/in.h>
18023 #endif
18024
18025 #ifdef HAVE_ARPA_INET_H
18026 #include <arpa/inet.h>
18027 #endif
18028
18029 #ifdef HAVE_WINSOCK2_H
18030 #include <winsock2.h>
18031 #endif
18032
18033 #ifdef HAVE_WS2TCPIP_H
18034 #include <ws2tcpip.h>
18035 #endif
18036
18037 "
18038 if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
18039
18040 cat >>confdefs.h <<_ACEOF
18041 #define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
18042 _ACEOF
18043
18044
18045 fi
18046
18047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
18048 $as_echo_n "checking for library containing setusercontext... " >&6; }
18049 if ${ac_cv_search_setusercontext+:} false; then :
18050   $as_echo_n "(cached) " >&6
18051 else
18052   ac_func_search_save_LIBS=$LIBS
18053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18054 /* end confdefs.h.  */
18055
18056 /* Override any GCC internal prototype to avoid an error.
18057    Use char because int might match the return type of a GCC
18058    builtin and then its argument prototype would still apply.  */
18059 #ifdef __cplusplus
18060 extern "C"
18061 #endif
18062 char setusercontext ();
18063 int
18064 main ()
18065 {
18066 return setusercontext ();
18067   ;
18068   return 0;
18069 }
18070 _ACEOF
18071 for ac_lib in '' util; do
18072   if test -z "$ac_lib"; then
18073     ac_res="none required"
18074   else
18075     ac_res=-l$ac_lib
18076     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18077   fi
18078   if ac_fn_c_try_link "$LINENO"; then :
18079   ac_cv_search_setusercontext=$ac_res
18080 fi
18081 rm -f core conftest.err conftest.$ac_objext \
18082     conftest$ac_exeext
18083   if ${ac_cv_search_setusercontext+:} false; then :
18084   break
18085 fi
18086 done
18087 if ${ac_cv_search_setusercontext+:} false; then :
18088
18089 else
18090   ac_cv_search_setusercontext=no
18091 fi
18092 rm conftest.$ac_ext
18093 LIBS=$ac_func_search_save_LIBS
18094 fi
18095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
18096 $as_echo "$ac_cv_search_setusercontext" >&6; }
18097 ac_res=$ac_cv_search_setusercontext
18098 if test "$ac_res" != no; then :
18099   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18100
18101 fi
18102
18103 for ac_func in tzset sigprocmask fcntl getpwnam getrlimit setrlimit setsid sbrk chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent
18104 do :
18105   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18106 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18107 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18108   cat >>confdefs.h <<_ACEOF
18109 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18110 _ACEOF
18111
18112 fi
18113 done
18114
18115 for ac_func in setresuid
18116 do :
18117   ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
18118 if test "x$ac_cv_func_setresuid" = xyes; then :
18119   cat >>confdefs.h <<_ACEOF
18120 #define HAVE_SETRESUID 1
18121 _ACEOF
18122
18123 else
18124   for ac_func in setreuid
18125 do :
18126   ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
18127 if test "x$ac_cv_func_setreuid" = xyes; then :
18128   cat >>confdefs.h <<_ACEOF
18129 #define HAVE_SETREUID 1
18130 _ACEOF
18131
18132 fi
18133 done
18134
18135 fi
18136 done
18137
18138 for ac_func in setresgid
18139 do :
18140   ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
18141 if test "x$ac_cv_func_setresgid" = xyes; then :
18142   cat >>confdefs.h <<_ACEOF
18143 #define HAVE_SETRESGID 1
18144 _ACEOF
18145
18146 else
18147   for ac_func in setregid
18148 do :
18149   ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
18150 if test "x$ac_cv_func_setregid" = xyes; then :
18151   cat >>confdefs.h <<_ACEOF
18152 #define HAVE_SETREGID 1
18153 _ACEOF
18154
18155 fi
18156 done
18157
18158 fi
18159 done
18160
18161
18162 # check if setreuid en setregid fail, on MacOSX10.4(darwin8).
18163 if echo $build_os | grep darwin8 > /dev/null; then
18164
18165 $as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
18166
18167 fi
18168 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
18169 if test "x$ac_cv_func_inet_aton" = xyes; then :
18170   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
18171
18172 else
18173   case " $LIBOBJS " in
18174   *" inet_aton.$ac_objext "* ) ;;
18175   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
18176  ;;
18177 esac
18178
18179 fi
18180
18181
18182 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
18183 if test "x$ac_cv_func_inet_pton" = xyes; then :
18184   $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
18185
18186 else
18187   case " $LIBOBJS " in
18188   *" inet_pton.$ac_objext "* ) ;;
18189   *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
18190  ;;
18191 esac
18192
18193 fi
18194
18195
18196 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
18197 if test "x$ac_cv_func_inet_ntop" = xyes; then :
18198   $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
18199
18200 else
18201   case " $LIBOBJS " in
18202   *" inet_ntop.$ac_objext "* ) ;;
18203   *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
18204  ;;
18205 esac
18206
18207 fi
18208
18209
18210 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
18211 if test "x$ac_cv_func_snprintf" = xyes; then :
18212   $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
18213
18214 else
18215   case " $LIBOBJS " in
18216   *" snprintf.$ac_objext "* ) ;;
18217   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
18218  ;;
18219 esac
18220
18221 fi
18222
18223
18224 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
18225 if test "x$ac_cv_func_strlcat" = xyes; then :
18226   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
18227
18228 else
18229   case " $LIBOBJS " in
18230   *" strlcat.$ac_objext "* ) ;;
18231   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
18232  ;;
18233 esac
18234
18235 fi
18236
18237
18238 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
18239 if test "x$ac_cv_func_strlcpy" = xyes; then :
18240   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
18241
18242 else
18243   case " $LIBOBJS " in
18244   *" strlcpy.$ac_objext "* ) ;;
18245   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
18246  ;;
18247 esac
18248
18249 fi
18250
18251
18252 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
18253 if test "x$ac_cv_func_memmove" = xyes; then :
18254   $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
18255
18256 else
18257   case " $LIBOBJS " in
18258   *" memmove.$ac_objext "* ) ;;
18259   *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
18260  ;;
18261 esac
18262
18263 fi
18264
18265
18266 ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
18267 if test "x$ac_cv_func_gmtime_r" = xyes; then :
18268   $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
18269
18270 else
18271   case " $LIBOBJS " in
18272   *" gmtime_r.$ac_objext "* ) ;;
18273   *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
18274  ;;
18275 esac
18276
18277 fi
18278
18279
18280 LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
18281
18282 ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
18283 if test "x$ac_cv_func_reallocarray" = xyes; then :
18284   $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
18285
18286 else
18287   case " $LIBOBJS " in
18288   *" reallocarray.$ac_objext "* ) ;;
18289   *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
18290  ;;
18291 esac
18292
18293 fi
18294
18295
18296 if test "$USE_NSS" = "no"; then
18297         ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
18298 if test "x$ac_cv_func_arc4random" = xyes; then :
18299   $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
18300
18301 else
18302   case " $LIBOBJS " in
18303   *" arc4random.$ac_objext "* ) ;;
18304   *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
18305  ;;
18306 esac
18307
18308 fi
18309
18310
18311         ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
18312 if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
18313   $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
18314
18315 else
18316   case " $LIBOBJS " in
18317   *" arc4random_uniform.$ac_objext "* ) ;;
18318   *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
18319  ;;
18320 esac
18321
18322 fi
18323
18324
18325         if test "$ac_cv_func_arc4random" = "no"; then
18326                 case " $LIBOBJS " in
18327   *" explicit_bzero.$ac_objext "* ) ;;
18328   *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
18329  ;;
18330 esac
18331
18332                 case " $LIBOBJS " in
18333   *" arc4_lock.$ac_objext "* ) ;;
18334   *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
18335  ;;
18336 esac
18337
18338                 for ac_func in getentropy
18339 do :
18340   ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
18341 if test "x$ac_cv_func_getentropy" = xyes; then :
18342   cat >>confdefs.h <<_ACEOF
18343 #define HAVE_GETENTROPY 1
18344 _ACEOF
18345
18346 else
18347
18348                     if test "$USE_WINSOCK" = 1; then
18349                         case " $LIBOBJS " in
18350   *" getentropy_win.$ac_objext "* ) ;;
18351   *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
18352  ;;
18353 esac
18354
18355                     else
18356                         case `uname` in
18357                         Darwin)
18358                                 case " $LIBOBJS " in
18359   *" getentropy_osx.$ac_objext "* ) ;;
18360   *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
18361  ;;
18362 esac
18363
18364                         ;;
18365                         SunOS)
18366                                 case " $LIBOBJS " in
18367   *" getentropy_solaris.$ac_objext "* ) ;;
18368   *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
18369  ;;
18370 esac
18371
18372                                 for ac_header in sys/sha2.h
18373 do :
18374   ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
18375 "
18376 if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
18377   cat >>confdefs.h <<_ACEOF
18378 #define HAVE_SYS_SHA2_H 1
18379 _ACEOF
18380
18381 else
18382
18383                                         for ac_func in SHA512_Update
18384 do :
18385   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
18386 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
18387   cat >>confdefs.h <<_ACEOF
18388 #define HAVE_SHA512_UPDATE 1
18389 _ACEOF
18390
18391 else
18392
18393                                                 case " $LIBOBJS " in
18394   *" sha512.$ac_objext "* ) ;;
18395   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
18396  ;;
18397 esac
18398
18399
18400 fi
18401 done
18402
18403
18404 fi
18405
18406 done
18407
18408                                 if test "$ac_cv_header_sys_sha2_h" = "yes"; then
18409                                         # this lib needed for sha2 on solaris
18410                                         LIBS="$LIBS -lmd"
18411                                 fi
18412                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18413 $as_echo_n "checking for library containing clock_gettime... " >&6; }
18414 if ${ac_cv_search_clock_gettime+:} false; then :
18415   $as_echo_n "(cached) " >&6
18416 else
18417   ac_func_search_save_LIBS=$LIBS
18418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18419 /* end confdefs.h.  */
18420
18421 /* Override any GCC internal prototype to avoid an error.
18422    Use char because int might match the return type of a GCC
18423    builtin and then its argument prototype would still apply.  */
18424 #ifdef __cplusplus
18425 extern "C"
18426 #endif
18427 char clock_gettime ();
18428 int
18429 main ()
18430 {
18431 return clock_gettime ();
18432   ;
18433   return 0;
18434 }
18435 _ACEOF
18436 for ac_lib in '' rt; do
18437   if test -z "$ac_lib"; then
18438     ac_res="none required"
18439   else
18440     ac_res=-l$ac_lib
18441     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18442   fi
18443   if ac_fn_c_try_link "$LINENO"; then :
18444   ac_cv_search_clock_gettime=$ac_res
18445 fi
18446 rm -f core conftest.err conftest.$ac_objext \
18447     conftest$ac_exeext
18448   if ${ac_cv_search_clock_gettime+:} false; then :
18449   break
18450 fi
18451 done
18452 if ${ac_cv_search_clock_gettime+:} false; then :
18453
18454 else
18455   ac_cv_search_clock_gettime=no
18456 fi
18457 rm conftest.$ac_ext
18458 LIBS=$ac_func_search_save_LIBS
18459 fi
18460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18461 $as_echo "$ac_cv_search_clock_gettime" >&6; }
18462 ac_res=$ac_cv_search_clock_gettime
18463 if test "$ac_res" != no; then :
18464   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18465
18466 fi
18467
18468                         ;;
18469                         Linux|*)
18470                                 case " $LIBOBJS " in
18471   *" getentropy_linux.$ac_objext "* ) ;;
18472   *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
18473  ;;
18474 esac
18475
18476                                 for ac_func in SHA512_Update
18477 do :
18478   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
18479 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
18480   cat >>confdefs.h <<_ACEOF
18481 #define HAVE_SHA512_UPDATE 1
18482 _ACEOF
18483
18484 else
18485
18486
18487 $as_echo "#define COMPAT_SHA512 1" >>confdefs.h
18488
18489                                         case " $LIBOBJS " in
18490   *" sha512.$ac_objext "* ) ;;
18491   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
18492  ;;
18493 esac
18494
18495
18496 fi
18497 done
18498
18499                                 for ac_header in sys/sysctl.h
18500 do :
18501   ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
18502 "
18503 if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
18504   cat >>confdefs.h <<_ACEOF
18505 #define HAVE_SYS_SYSCTL_H 1
18506 _ACEOF
18507
18508 fi
18509
18510 done
18511
18512                                 for ac_func in getauxval
18513 do :
18514   ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
18515 if test "x$ac_cv_func_getauxval" = xyes; then :
18516   cat >>confdefs.h <<_ACEOF
18517 #define HAVE_GETAUXVAL 1
18518 _ACEOF
18519
18520 fi
18521 done
18522
18523                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18524 $as_echo_n "checking for library containing clock_gettime... " >&6; }
18525 if ${ac_cv_search_clock_gettime+:} false; then :
18526   $as_echo_n "(cached) " >&6
18527 else
18528   ac_func_search_save_LIBS=$LIBS
18529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18530 /* end confdefs.h.  */
18531
18532 /* Override any GCC internal prototype to avoid an error.
18533    Use char because int might match the return type of a GCC
18534    builtin and then its argument prototype would still apply.  */
18535 #ifdef __cplusplus
18536 extern "C"
18537 #endif
18538 char clock_gettime ();
18539 int
18540 main ()
18541 {
18542 return clock_gettime ();
18543   ;
18544   return 0;
18545 }
18546 _ACEOF
18547 for ac_lib in '' rt; do
18548   if test -z "$ac_lib"; then
18549     ac_res="none required"
18550   else
18551     ac_res=-l$ac_lib
18552     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18553   fi
18554   if ac_fn_c_try_link "$LINENO"; then :
18555   ac_cv_search_clock_gettime=$ac_res
18556 fi
18557 rm -f core conftest.err conftest.$ac_objext \
18558     conftest$ac_exeext
18559   if ${ac_cv_search_clock_gettime+:} false; then :
18560   break
18561 fi
18562 done
18563 if ${ac_cv_search_clock_gettime+:} false; then :
18564
18565 else
18566   ac_cv_search_clock_gettime=no
18567 fi
18568 rm conftest.$ac_ext
18569 LIBS=$ac_func_search_save_LIBS
18570 fi
18571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18572 $as_echo "$ac_cv_search_clock_gettime" >&6; }
18573 ac_res=$ac_cv_search_clock_gettime
18574 if test "$ac_res" != no; then :
18575   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18576
18577 fi
18578
18579                         ;;
18580                         esac
18581                     fi
18582
18583 fi
18584 done
18585
18586         fi
18587 fi
18588 LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
18589
18590 ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
18591 if test "x$ac_cv_func_ctime_r" = xyes; then :
18592   $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
18593
18594 else
18595   case " $LIBOBJS " in
18596   *" ctime_r.$ac_objext "* ) ;;
18597   *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
18598  ;;
18599 esac
18600
18601 fi
18602
18603
18604
18605 # Check whether --enable-allsymbols was given.
18606 if test "${enable_allsymbols+set}" = set; then :
18607   enableval=$enable_allsymbols;
18608 fi
18609
18610 case "$enable_allsymbols" in
18611         yes)
18612         COMMON_OBJ_ALL_SYMBOLS=""
18613         UBSYMS=""
18614         EXTRALINK="-L. -L.libs -lunbound"
18615
18616 $as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
18617
18618         ;;
18619         no|*)
18620         COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
18621         UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
18622         EXTRALINK=""
18623         ;;
18624 esac
18625
18626
18627
18628 if test x_$enable_lock_checks = x_yes; then
18629         UBSYMS="-export-symbols clubsyms.def"
18630         cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
18631         echo lock_protect >> clubsyms.def
18632         echo lock_unprotect >> clubsyms.def
18633         echo lock_get_mem >> clubsyms.def
18634         echo checklock_start >> clubsyms.def
18635         echo checklock_stop >> clubsyms.def
18636         echo checklock_lock >> clubsyms.def
18637         echo checklock_unlock >> clubsyms.def
18638         echo checklock_init >> clubsyms.def
18639         echo checklock_thrcreate >> clubsyms.def
18640         echo checklock_thrjoin >> clubsyms.def
18641 fi
18642
18643 # check for dnstap if requested
18644
18645   # Check whether --enable-dnstap was given.
18646 if test "${enable_dnstap+set}" = set; then :
18647   enableval=$enable_dnstap; opt_dnstap=$enableval
18648 else
18649   opt_dnstap=no
18650 fi
18651
18652
18653
18654 # Check whether --with-dnstap-socket-path was given.
18655 if test "${with_dnstap_socket_path+set}" = set; then :
18656   withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
18657 else
18658   opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
18659 fi
18660
18661
18662   if test "x$opt_dnstap" != "xno"; then
18663     # Extract the first word of "protoc-c", so it can be a program name with args.
18664 set dummy protoc-c; ac_word=$2
18665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18666 $as_echo_n "checking for $ac_word... " >&6; }
18667 if ${ac_cv_path_PROTOC_C+:} false; then :
18668   $as_echo_n "(cached) " >&6
18669 else
18670   case $PROTOC_C in
18671   [\\/]* | ?:[\\/]*)
18672   ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
18673   ;;
18674   *)
18675   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18676 for as_dir in $PATH
18677 do
18678   IFS=$as_save_IFS
18679   test -z "$as_dir" && as_dir=.
18680     for ac_exec_ext in '' $ac_executable_extensions; do
18681   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18682     ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
18683     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18684     break 2
18685   fi
18686 done
18687   done
18688 IFS=$as_save_IFS
18689
18690   ;;
18691 esac
18692 fi
18693 PROTOC_C=$ac_cv_path_PROTOC_C
18694 if test -n "$PROTOC_C"; then
18695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
18696 $as_echo "$PROTOC_C" >&6; }
18697 else
18698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18699 $as_echo "no" >&6; }
18700 fi
18701
18702
18703     if test -z "$PROTOC_C"; then
18704       as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
18705     fi
18706
18707 # Check whether --with-protobuf-c was given.
18708 if test "${with_protobuf_c+set}" = set; then :
18709   withval=$with_protobuf_c;
18710           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
18711           if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
18712             CFLAGS="$CFLAGS -I$withval/include/google"
18713           else
18714             CFLAGS="$CFLAGS -I$withval/include"
18715           fi
18716           LDFLAGS="$LDFLAGS -L$withval/lib"
18717
18718 else
18719
18720           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
18721           if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
18722             CFLAGS="$CFLAGS -I/usr/include/google"
18723           else
18724             if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
18725               CFLAGS="$CFLAGS -I/usr/local/include/google"
18726               LDFLAGS="$LDFLAGS -L/usr/local/lib"
18727             fi
18728           fi
18729
18730 fi
18731
18732
18733 # Check whether --with-libfstrm was given.
18734 if test "${with_libfstrm+set}" = set; then :
18735   withval=$with_libfstrm;
18736         CFLAGS="$CFLAGS -I$withval/include"
18737         LDFLAGS="$LDFLAGS -L$withval/lib"
18738
18739 fi
18740
18741     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fstrm_iothr_init" >&5
18742 $as_echo_n "checking for library containing fstrm_iothr_init... " >&6; }
18743 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
18744   $as_echo_n "(cached) " >&6
18745 else
18746   ac_func_search_save_LIBS=$LIBS
18747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18748 /* end confdefs.h.  */
18749
18750 /* Override any GCC internal prototype to avoid an error.
18751    Use char because int might match the return type of a GCC
18752    builtin and then its argument prototype would still apply.  */
18753 #ifdef __cplusplus
18754 extern "C"
18755 #endif
18756 char fstrm_iothr_init ();
18757 int
18758 main ()
18759 {
18760 return fstrm_iothr_init ();
18761   ;
18762   return 0;
18763 }
18764 _ACEOF
18765 for ac_lib in '' fstrm; do
18766   if test -z "$ac_lib"; then
18767     ac_res="none required"
18768   else
18769     ac_res=-l$ac_lib
18770     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18771   fi
18772   if ac_fn_c_try_link "$LINENO"; then :
18773   ac_cv_search_fstrm_iothr_init=$ac_res
18774 fi
18775 rm -f core conftest.err conftest.$ac_objext \
18776     conftest$ac_exeext
18777   if ${ac_cv_search_fstrm_iothr_init+:} false; then :
18778   break
18779 fi
18780 done
18781 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
18782
18783 else
18784   ac_cv_search_fstrm_iothr_init=no
18785 fi
18786 rm conftest.$ac_ext
18787 LIBS=$ac_func_search_save_LIBS
18788 fi
18789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fstrm_iothr_init" >&5
18790 $as_echo "$ac_cv_search_fstrm_iothr_init" >&6; }
18791 ac_res=$ac_cv_search_fstrm_iothr_init
18792 if test "$ac_res" != no; then :
18793   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18794
18795 else
18796   as_fn_error $? "The fstrm library was not found. Please install fstrm!" "$LINENO" 5
18797 fi
18798
18799     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
18800 $as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
18801 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
18802   $as_echo_n "(cached) " >&6
18803 else
18804   ac_func_search_save_LIBS=$LIBS
18805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18806 /* end confdefs.h.  */
18807
18808 /* Override any GCC internal prototype to avoid an error.
18809    Use char because int might match the return type of a GCC
18810    builtin and then its argument prototype would still apply.  */
18811 #ifdef __cplusplus
18812 extern "C"
18813 #endif
18814 char protobuf_c_message_pack ();
18815 int
18816 main ()
18817 {
18818 return protobuf_c_message_pack ();
18819   ;
18820   return 0;
18821 }
18822 _ACEOF
18823 for ac_lib in '' protobuf-c; do
18824   if test -z "$ac_lib"; then
18825     ac_res="none required"
18826   else
18827     ac_res=-l$ac_lib
18828     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18829   fi
18830   if ac_fn_c_try_link "$LINENO"; then :
18831   ac_cv_search_protobuf_c_message_pack=$ac_res
18832 fi
18833 rm -f core conftest.err conftest.$ac_objext \
18834     conftest$ac_exeext
18835   if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
18836   break
18837 fi
18838 done
18839 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
18840
18841 else
18842   ac_cv_search_protobuf_c_message_pack=no
18843 fi
18844 rm conftest.$ac_ext
18845 LIBS=$ac_func_search_save_LIBS
18846 fi
18847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
18848 $as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
18849 ac_res=$ac_cv_search_protobuf_c_message_pack
18850 if test "$ac_res" != no; then :
18851   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18852
18853 else
18854   as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
18855 fi
18856
18857
18858
18859 $as_echo "#define USE_DNSTAP 1" >>confdefs.h
18860
18861         ENABLE_DNSTAP=1
18862
18863
18864
18865         hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
18866
18867
18868 cat >>confdefs.h <<_ACEOF
18869 #define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
18870 _ACEOF
18871
18872
18873         DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c"
18874
18875         DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo"
18876
18877
18878   else
18879
18880         ENABLE_DNSTAP=0
18881
18882
18883
18884   fi
18885
18886
18887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
18888 $as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
18889 # on openBSD, the implicit rule make $< work.
18890 # on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
18891 # gmake works.
18892 cat >conftest.make <<EOF
18893 all:    conftest.lo
18894
18895 conftest.lo foo.lo bla.lo:
18896         if test -f "\$<"; then touch \$@; fi
18897
18898 .SUFFIXES: .lo
18899 .c.lo:
18900         if test -f "\$<"; then touch \$@; fi
18901
18902 conftest.lo:        conftest.dir/conftest.c
18903 EOF
18904 mkdir conftest.dir
18905 touch conftest.dir/conftest.c
18906 rm -f conftest.lo conftest.c
18907 ${MAKE:-make} -f conftest.make >/dev/null
18908 rm -f conftest.make conftest.c conftest.dir/conftest.c
18909 rm -rf conftest.dir
18910 if test ! -f conftest.lo; then
18911         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18912 $as_echo "no" >&6; }
18913         SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
18914         SOURCEFILE='`cat .source`'
18915 else
18916         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18917 $as_echo "yes" >&6; }
18918         SOURCEDETERMINE=':'
18919         SOURCEFILE='$<'
18920 fi
18921 rm -f conftest.lo
18922
18923
18924
18925 # see if we want to build the library or everything
18926 ALLTARGET="alltargets"
18927 INSTALLTARGET="install-all"
18928
18929 # Check whether --with-libunbound-only was given.
18930 if test "${with_libunbound_only+set}" = set; then :
18931   withval=$with_libunbound_only;
18932         if test "$withval" = "yes"; then
18933                 ALLTARGET="lib"
18934                 INSTALLTARGET="install-lib"
18935         fi
18936
18937 fi
18938
18939
18940
18941
18942
18943   { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
18944 $as_echo "$as_me: Stripping extension flags..." >&6;}
18945
18946   if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
18947     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
18948
18949 $as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
18950
18951   fi
18952
18953
18954   if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
18955     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
18956
18957 $as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
18958
18959   fi
18960
18961
18962   if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
18963     CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
18964
18965 $as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
18966
18967   fi
18968
18969
18970   if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
18971     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
18972
18973 $as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
18974
18975   fi
18976
18977
18978   if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
18979     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
18980
18981 $as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
18982
18983   fi
18984
18985
18986   if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
18987     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
18988
18989 $as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
18990
18991   fi
18992
18993
18994   if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
18995     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
18996
18997 $as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
18998
18999   fi
19000
19001
19002   if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
19003     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
19004
19005 $as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
19006
19007   fi
19008
19009
19010 LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
19011
19012
19013 cat >>confdefs.h <<_ACEOF
19014 #define MAXSYSLOGMSGLEN 10240
19015 _ACEOF
19016
19017
19018
19019
19020 version=1.5.5
19021
19022 date=`date +'%b %e, %Y'`
19023
19024
19025 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"
19026
19027 ac_config_headers="$ac_config_headers config.h"
19028
19029 cat >confcache <<\_ACEOF
19030 # This file is a shell script that caches the results of configure
19031 # tests run on this system so they can be shared between configure
19032 # scripts and configure runs, see configure's option --config-cache.
19033 # It is not useful on other systems.  If it contains results you don't
19034 # want to keep, you may remove or edit it.
19035 #
19036 # config.status only pays attention to the cache file if you give it
19037 # the --recheck option to rerun configure.
19038 #
19039 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19040 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19041 # following values.
19042
19043 _ACEOF
19044
19045 # The following way of writing the cache mishandles newlines in values,
19046 # but we know of no workaround that is simple, portable, and efficient.
19047 # So, we kill variables containing newlines.
19048 # Ultrix sh set writes to stderr and can't be redirected directly,
19049 # and sets the high bit in the cache file unless we assign to the vars.
19050 (
19051   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19052     eval ac_val=\$$ac_var
19053     case $ac_val in #(
19054     *${as_nl}*)
19055       case $ac_var in #(
19056       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19057 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19058       esac
19059       case $ac_var in #(
19060       _ | IFS | as_nl) ;; #(
19061       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19062       *) { eval $ac_var=; unset $ac_var;} ;;
19063       esac ;;
19064     esac
19065   done
19066
19067   (set) 2>&1 |
19068     case $as_nl`(ac_space=' '; set) 2>&1` in #(
19069     *${as_nl}ac_space=\ *)
19070       # `set' does not quote correctly, so add quotes: double-quote
19071       # substitution turns \\\\ into \\, and sed turns \\ into \.
19072       sed -n \
19073         "s/'/'\\\\''/g;
19074           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19075       ;; #(
19076     *)
19077       # `set' quotes correctly as required by POSIX, so do not add quotes.
19078       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19079       ;;
19080     esac |
19081     sort
19082 ) |
19083   sed '
19084      /^ac_cv_env_/b end
19085      t clear
19086      :clear
19087      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19088      t end
19089      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19090      :end' >>confcache
19091 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19092   if test -w "$cache_file"; then
19093     if test "x$cache_file" != "x/dev/null"; then
19094       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19095 $as_echo "$as_me: updating cache $cache_file" >&6;}
19096       if test ! -f "$cache_file" || test -h "$cache_file"; then
19097         cat confcache >"$cache_file"
19098       else
19099         case $cache_file in #(
19100         */* | ?:*)
19101           mv -f confcache "$cache_file"$$ &&
19102           mv -f "$cache_file"$$ "$cache_file" ;; #(
19103         *)
19104           mv -f confcache "$cache_file" ;;
19105         esac
19106       fi
19107     fi
19108   else
19109     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19110 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19111   fi
19112 fi
19113 rm -f confcache
19114
19115 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19116 # Let make expand exec_prefix.
19117 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19118
19119 DEFS=-DHAVE_CONFIG_H
19120
19121 ac_libobjs=
19122 ac_ltlibobjs=
19123 U=
19124 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19125   # 1. Remove the extension, and $U if already installed.
19126   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19127   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19128   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19129   #    will be set to the directory where LIBOBJS objects are built.
19130   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19131   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19132 done
19133 LIBOBJS=$ac_libobjs
19134
19135 LTLIBOBJS=$ac_ltlibobjs
19136
19137
19138
19139 : "${CONFIG_STATUS=./config.status}"
19140 ac_write_fail=0
19141 ac_clean_files_save=$ac_clean_files
19142 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19143 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19144 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19145 as_write_fail=0
19146 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19147 #! $SHELL
19148 # Generated by $as_me.
19149 # Run this file to recreate the current configuration.
19150 # Compiler output produced by configure, useful for debugging
19151 # configure, is in config.log if it exists.
19152
19153 debug=false
19154 ac_cs_recheck=false
19155 ac_cs_silent=false
19156
19157 SHELL=\${CONFIG_SHELL-$SHELL}
19158 export SHELL
19159 _ASEOF
19160 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19161 ## -------------------- ##
19162 ## M4sh Initialization. ##
19163 ## -------------------- ##
19164
19165 # Be more Bourne compatible
19166 DUALCASE=1; export DUALCASE # for MKS sh
19167 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19168   emulate sh
19169   NULLCMD=:
19170   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19171   # is contrary to our usage.  Disable this feature.
19172   alias -g '${1+"$@"}'='"$@"'
19173   setopt NO_GLOB_SUBST
19174 else
19175   case `(set -o) 2>/dev/null` in #(
19176   *posix*) :
19177     set -o posix ;; #(
19178   *) :
19179      ;;
19180 esac
19181 fi
19182
19183
19184 as_nl='
19185 '
19186 export as_nl
19187 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19188 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19189 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19190 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19191 # Prefer a ksh shell builtin over an external printf program on Solaris,
19192 # but without wasting forks for bash or zsh.
19193 if test -z "$BASH_VERSION$ZSH_VERSION" \
19194     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19195   as_echo='print -r --'
19196   as_echo_n='print -rn --'
19197 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19198   as_echo='printf %s\n'
19199   as_echo_n='printf %s'
19200 else
19201   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19202     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19203     as_echo_n='/usr/ucb/echo -n'
19204   else
19205     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19206     as_echo_n_body='eval
19207       arg=$1;
19208       case $arg in #(
19209       *"$as_nl"*)
19210         expr "X$arg" : "X\\(.*\\)$as_nl";
19211         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19212       esac;
19213       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19214     '
19215     export as_echo_n_body
19216     as_echo_n='sh -c $as_echo_n_body as_echo'
19217   fi
19218   export as_echo_body
19219   as_echo='sh -c $as_echo_body as_echo'
19220 fi
19221
19222 # The user is always right.
19223 if test "${PATH_SEPARATOR+set}" != set; then
19224   PATH_SEPARATOR=:
19225   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19226     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19227       PATH_SEPARATOR=';'
19228   }
19229 fi
19230
19231
19232 # IFS
19233 # We need space, tab and new line, in precisely that order.  Quoting is
19234 # there to prevent editors from complaining about space-tab.
19235 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19236 # splitting by setting IFS to empty value.)
19237 IFS=" ""        $as_nl"
19238
19239 # Find who we are.  Look in the path if we contain no directory separator.
19240 as_myself=
19241 case $0 in #((
19242   *[\\/]* ) as_myself=$0 ;;
19243   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19244 for as_dir in $PATH
19245 do
19246   IFS=$as_save_IFS
19247   test -z "$as_dir" && as_dir=.
19248     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19249   done
19250 IFS=$as_save_IFS
19251
19252      ;;
19253 esac
19254 # We did not find ourselves, most probably we were run as `sh COMMAND'
19255 # in which case we are not to be found in the path.
19256 if test "x$as_myself" = x; then
19257   as_myself=$0
19258 fi
19259 if test ! -f "$as_myself"; then
19260   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19261   exit 1
19262 fi
19263
19264 # Unset variables that we do not need and which cause bugs (e.g. in
19265 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19266 # suppresses any "Segmentation fault" message there.  '((' could
19267 # trigger a bug in pdksh 5.2.14.
19268 for as_var in BASH_ENV ENV MAIL MAILPATH
19269 do eval test x\${$as_var+set} = xset \
19270   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19271 done
19272 PS1='$ '
19273 PS2='> '
19274 PS4='+ '
19275
19276 # NLS nuisances.
19277 LC_ALL=C
19278 export LC_ALL
19279 LANGUAGE=C
19280 export LANGUAGE
19281
19282 # CDPATH.
19283 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19284
19285
19286 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19287 # ----------------------------------------
19288 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19289 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19290 # script with STATUS, using 1 if that was 0.
19291 as_fn_error ()
19292 {
19293   as_status=$1; test $as_status -eq 0 && as_status=1
19294   if test "$4"; then
19295     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19296     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19297   fi
19298   $as_echo "$as_me: error: $2" >&2
19299   as_fn_exit $as_status
19300 } # as_fn_error
19301
19302
19303 # as_fn_set_status STATUS
19304 # -----------------------
19305 # Set $? to STATUS, without forking.
19306 as_fn_set_status ()
19307 {
19308   return $1
19309 } # as_fn_set_status
19310
19311 # as_fn_exit STATUS
19312 # -----------------
19313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19314 as_fn_exit ()
19315 {
19316   set +e
19317   as_fn_set_status $1
19318   exit $1
19319 } # as_fn_exit
19320
19321 # as_fn_unset VAR
19322 # ---------------
19323 # Portably unset VAR.
19324 as_fn_unset ()
19325 {
19326   { eval $1=; unset $1;}
19327 }
19328 as_unset=as_fn_unset
19329 # as_fn_append VAR VALUE
19330 # ----------------------
19331 # Append the text in VALUE to the end of the definition contained in VAR. Take
19332 # advantage of any shell optimizations that allow amortized linear growth over
19333 # repeated appends, instead of the typical quadratic growth present in naive
19334 # implementations.
19335 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19336   eval 'as_fn_append ()
19337   {
19338     eval $1+=\$2
19339   }'
19340 else
19341   as_fn_append ()
19342   {
19343     eval $1=\$$1\$2
19344   }
19345 fi # as_fn_append
19346
19347 # as_fn_arith ARG...
19348 # ------------------
19349 # Perform arithmetic evaluation on the ARGs, and store the result in the
19350 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19351 # must be portable across $(()) and expr.
19352 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19353   eval 'as_fn_arith ()
19354   {
19355     as_val=$(( $* ))
19356   }'
19357 else
19358   as_fn_arith ()
19359   {
19360     as_val=`expr "$@" || test $? -eq 1`
19361   }
19362 fi # as_fn_arith
19363
19364
19365 if expr a : '\(a\)' >/dev/null 2>&1 &&
19366    test "X`expr 00001 : '.*\(...\)'`" = X001; then
19367   as_expr=expr
19368 else
19369   as_expr=false
19370 fi
19371
19372 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19373   as_basename=basename
19374 else
19375   as_basename=false
19376 fi
19377
19378 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19379   as_dirname=dirname
19380 else
19381   as_dirname=false
19382 fi
19383
19384 as_me=`$as_basename -- "$0" ||
19385 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19386          X"$0" : 'X\(//\)$' \| \
19387          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19388 $as_echo X/"$0" |
19389     sed '/^.*\/\([^/][^/]*\)\/*$/{
19390             s//\1/
19391             q
19392           }
19393           /^X\/\(\/\/\)$/{
19394             s//\1/
19395             q
19396           }
19397           /^X\/\(\/\).*/{
19398             s//\1/
19399             q
19400           }
19401           s/.*/./; q'`
19402
19403 # Avoid depending upon Character Ranges.
19404 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19405 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19406 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19407 as_cr_digits='0123456789'
19408 as_cr_alnum=$as_cr_Letters$as_cr_digits
19409
19410 ECHO_C= ECHO_N= ECHO_T=
19411 case `echo -n x` in #(((((
19412 -n*)
19413   case `echo 'xy\c'` in
19414   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
19415   xy)  ECHO_C='\c';;
19416   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19417        ECHO_T=' ';;
19418   esac;;
19419 *)
19420   ECHO_N='-n';;
19421 esac
19422
19423 rm -f conf$$ conf$$.exe conf$$.file
19424 if test -d conf$$.dir; then
19425   rm -f conf$$.dir/conf$$.file
19426 else
19427   rm -f conf$$.dir
19428   mkdir conf$$.dir 2>/dev/null
19429 fi
19430 if (echo >conf$$.file) 2>/dev/null; then
19431   if ln -s conf$$.file conf$$ 2>/dev/null; then
19432     as_ln_s='ln -s'
19433     # ... but there are two gotchas:
19434     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19435     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19436     # In both cases, we have to default to `cp -pR'.
19437     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19438       as_ln_s='cp -pR'
19439   elif ln conf$$.file conf$$ 2>/dev/null; then
19440     as_ln_s=ln
19441   else
19442     as_ln_s='cp -pR'
19443   fi
19444 else
19445   as_ln_s='cp -pR'
19446 fi
19447 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19448 rmdir conf$$.dir 2>/dev/null
19449
19450
19451 # as_fn_mkdir_p
19452 # -------------
19453 # Create "$as_dir" as a directory, including parents if necessary.
19454 as_fn_mkdir_p ()
19455 {
19456
19457   case $as_dir in #(
19458   -*) as_dir=./$as_dir;;
19459   esac
19460   test -d "$as_dir" || eval $as_mkdir_p || {
19461     as_dirs=
19462     while :; do
19463       case $as_dir in #(
19464       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19465       *) as_qdir=$as_dir;;
19466       esac
19467       as_dirs="'$as_qdir' $as_dirs"
19468       as_dir=`$as_dirname -- "$as_dir" ||
19469 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19470          X"$as_dir" : 'X\(//\)[^/]' \| \
19471          X"$as_dir" : 'X\(//\)$' \| \
19472          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19473 $as_echo X"$as_dir" |
19474     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19475             s//\1/
19476             q
19477           }
19478           /^X\(\/\/\)[^/].*/{
19479             s//\1/
19480             q
19481           }
19482           /^X\(\/\/\)$/{
19483             s//\1/
19484             q
19485           }
19486           /^X\(\/\).*/{
19487             s//\1/
19488             q
19489           }
19490           s/.*/./; q'`
19491       test -d "$as_dir" && break
19492     done
19493     test -z "$as_dirs" || eval "mkdir $as_dirs"
19494   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19495
19496
19497 } # as_fn_mkdir_p
19498 if mkdir -p . 2>/dev/null; then
19499   as_mkdir_p='mkdir -p "$as_dir"'
19500 else
19501   test -d ./-p && rmdir ./-p
19502   as_mkdir_p=false
19503 fi
19504
19505
19506 # as_fn_executable_p FILE
19507 # -----------------------
19508 # Test if FILE is an executable regular file.
19509 as_fn_executable_p ()
19510 {
19511   test -f "$1" && test -x "$1"
19512 } # as_fn_executable_p
19513 as_test_x='test -x'
19514 as_executable_p=as_fn_executable_p
19515
19516 # Sed expression to map a string onto a valid CPP name.
19517 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19518
19519 # Sed expression to map a string onto a valid variable name.
19520 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19521
19522
19523 exec 6>&1
19524 ## ----------------------------------- ##
19525 ## Main body of $CONFIG_STATUS script. ##
19526 ## ----------------------------------- ##
19527 _ASEOF
19528 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19529
19530 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19531 # Save the log message, to keep $0 and so on meaningful, and to
19532 # report actual input values of CONFIG_FILES etc. instead of their
19533 # values after options handling.
19534 ac_log="
19535 This file was extended by unbound $as_me 1.5.5, which was
19536 generated by GNU Autoconf 2.69.  Invocation command line was
19537
19538   CONFIG_FILES    = $CONFIG_FILES
19539   CONFIG_HEADERS  = $CONFIG_HEADERS
19540   CONFIG_LINKS    = $CONFIG_LINKS
19541   CONFIG_COMMANDS = $CONFIG_COMMANDS
19542   $ $0 $@
19543
19544 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19545 "
19546
19547 _ACEOF
19548
19549 case $ac_config_files in *"
19550 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19551 esac
19552
19553 case $ac_config_headers in *"
19554 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19555 esac
19556
19557
19558 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19559 # Files that config.status was made for.
19560 config_files="$ac_config_files"
19561 config_headers="$ac_config_headers"
19562 config_commands="$ac_config_commands"
19563
19564 _ACEOF
19565
19566 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19567 ac_cs_usage="\
19568 \`$as_me' instantiates files and other configuration actions
19569 from templates according to the current configuration.  Unless the files
19570 and actions are specified as TAGs, all are instantiated by default.
19571
19572 Usage: $0 [OPTION]... [TAG]...
19573
19574   -h, --help       print this help, then exit
19575   -V, --version    print version number and configuration settings, then exit
19576       --config     print configuration, then exit
19577   -q, --quiet, --silent
19578                    do not print progress messages
19579   -d, --debug      don't remove temporary files
19580       --recheck    update $as_me by reconfiguring in the same conditions
19581       --file=FILE[:TEMPLATE]
19582                    instantiate the configuration file FILE
19583       --header=FILE[:TEMPLATE]
19584                    instantiate the configuration header FILE
19585
19586 Configuration files:
19587 $config_files
19588
19589 Configuration headers:
19590 $config_headers
19591
19592 Configuration commands:
19593 $config_commands
19594
19595 Report bugs to <unbound-bugs@nlnetlabs.nl>."
19596
19597 _ACEOF
19598 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19599 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19600 ac_cs_version="\\
19601 unbound config.status 1.5.5
19602 configured by $0, generated by GNU Autoconf 2.69,
19603   with options \\"\$ac_cs_config\\"
19604
19605 Copyright (C) 2012 Free Software Foundation, Inc.
19606 This config.status script is free software; the Free Software Foundation
19607 gives unlimited permission to copy, distribute and modify it."
19608
19609 ac_pwd='$ac_pwd'
19610 srcdir='$srcdir'
19611 AWK='$AWK'
19612 test -n "\$AWK" || AWK=awk
19613 _ACEOF
19614
19615 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19616 # The default lists apply if the user does not specify any file.
19617 ac_need_defaults=:
19618 while test $# != 0
19619 do
19620   case $1 in
19621   --*=?*)
19622     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19623     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19624     ac_shift=:
19625     ;;
19626   --*=)
19627     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19628     ac_optarg=
19629     ac_shift=:
19630     ;;
19631   *)
19632     ac_option=$1
19633     ac_optarg=$2
19634     ac_shift=shift
19635     ;;
19636   esac
19637
19638   case $ac_option in
19639   # Handling of the options.
19640   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19641     ac_cs_recheck=: ;;
19642   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19643     $as_echo "$ac_cs_version"; exit ;;
19644   --config | --confi | --conf | --con | --co | --c )
19645     $as_echo "$ac_cs_config"; exit ;;
19646   --debug | --debu | --deb | --de | --d | -d )
19647     debug=: ;;
19648   --file | --fil | --fi | --f )
19649     $ac_shift
19650     case $ac_optarg in
19651     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19652     '') as_fn_error $? "missing file argument" ;;
19653     esac
19654     as_fn_append CONFIG_FILES " '$ac_optarg'"
19655     ac_need_defaults=false;;
19656   --header | --heade | --head | --hea )
19657     $ac_shift
19658     case $ac_optarg in
19659     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19660     esac
19661     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19662     ac_need_defaults=false;;
19663   --he | --h)
19664     # Conflict between --help and --header
19665     as_fn_error $? "ambiguous option: \`$1'
19666 Try \`$0 --help' for more information.";;
19667   --help | --hel | -h )
19668     $as_echo "$ac_cs_usage"; exit ;;
19669   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19670   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19671     ac_cs_silent=: ;;
19672
19673   # This is an error.
19674   -*) as_fn_error $? "unrecognized option: \`$1'
19675 Try \`$0 --help' for more information." ;;
19676
19677   *) as_fn_append ac_config_targets " $1"
19678      ac_need_defaults=false ;;
19679
19680   esac
19681   shift
19682 done
19683
19684 ac_configure_extra_args=
19685
19686 if $ac_cs_silent; then
19687   exec 6>/dev/null
19688   ac_configure_extra_args="$ac_configure_extra_args --silent"
19689 fi
19690
19691 _ACEOF
19692 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19693 if \$ac_cs_recheck; then
19694   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19695   shift
19696   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19697   CONFIG_SHELL='$SHELL'
19698   export CONFIG_SHELL
19699   exec "\$@"
19700 fi
19701
19702 _ACEOF
19703 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19704 exec 5>>config.log
19705 {
19706   echo
19707   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19708 ## Running $as_me. ##
19709 _ASBOX
19710   $as_echo "$ac_log"
19711 } >&5
19712
19713 _ACEOF
19714 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19715 #
19716 # INIT-COMMANDS
19717 #
19718
19719
19720 # The HP-UX ksh and POSIX shell print the target directory to stdout
19721 # if CDPATH is set.
19722 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19723
19724 sed_quote_subst='$sed_quote_subst'
19725 double_quote_subst='$double_quote_subst'
19726 delay_variable_subst='$delay_variable_subst'
19727 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
19728 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
19729 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
19730 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
19731 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
19732 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
19733 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
19734 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
19735 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
19736 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
19737 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
19738 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
19739 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
19740 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
19741 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
19742 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
19743 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
19744 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
19745 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
19746 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
19747 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
19748 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
19749 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
19750 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
19751 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
19752 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
19753 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
19754 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
19755 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
19756 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
19757 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
19758 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
19759 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
19760 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
19761 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
19762 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
19763 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
19764 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
19765 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
19766 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
19767 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
19768 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
19769 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
19770 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
19771 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
19772 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
19773 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
19774 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
19775 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
19776 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
19777 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
19778 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
19779 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
19780 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
19781 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
19782 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
19783 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"`'
19784 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
19785 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
19786 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
19787 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
19788 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
19789 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
19790 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
19791 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
19792 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
19793 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
19794 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
19795 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
19796 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
19797 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
19798 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
19799 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
19800 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
19801 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
19802 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
19803 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
19804 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
19805 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
19806 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
19807 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
19808 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
19809 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
19810 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
19811 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
19812 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
19813 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
19814 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
19815 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
19816 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
19817 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
19818 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
19819 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
19820 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
19821 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
19822 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
19823 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
19824 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
19825 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
19826 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
19827 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
19828 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
19829 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
19830 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
19831 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
19832 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
19833 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
19834 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
19835 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
19836 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
19837 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
19838 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
19839 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
19840 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
19841 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
19842 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
19843 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
19844 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
19845 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
19846 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
19847 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
19848 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
19849 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
19850 sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
19851 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
19852 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
19853 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
19854 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
19855 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
19856 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
19857
19858 LTCC='$LTCC'
19859 LTCFLAGS='$LTCFLAGS'
19860 compiler='$compiler_DEFAULT'
19861
19862 # A function that is used when there is no print builtin or printf.
19863 func_fallback_echo ()
19864 {
19865   eval 'cat <<_LTECHO_EOF
19866 \$1
19867 _LTECHO_EOF'
19868 }
19869
19870 # Quote evaled strings.
19871 for var in SHELL \
19872 ECHO \
19873 PATH_SEPARATOR \
19874 SED \
19875 GREP \
19876 EGREP \
19877 FGREP \
19878 LD \
19879 NM \
19880 LN_S \
19881 lt_SP2NL \
19882 lt_NL2SP \
19883 reload_flag \
19884 OBJDUMP \
19885 deplibs_check_method \
19886 file_magic_cmd \
19887 file_magic_glob \
19888 want_nocaseglob \
19889 DLLTOOL \
19890 sharedlib_from_linklib_cmd \
19891 AR \
19892 AR_FLAGS \
19893 archiver_list_spec \
19894 STRIP \
19895 RANLIB \
19896 CC \
19897 CFLAGS \
19898 compiler \
19899 lt_cv_sys_global_symbol_pipe \
19900 lt_cv_sys_global_symbol_to_cdecl \
19901 lt_cv_sys_global_symbol_to_c_name_address \
19902 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
19903 nm_file_list_spec \
19904 lt_prog_compiler_no_builtin_flag \
19905 lt_prog_compiler_pic \
19906 lt_prog_compiler_wl \
19907 lt_prog_compiler_static \
19908 lt_cv_prog_compiler_c_o \
19909 need_locks \
19910 MANIFEST_TOOL \
19911 DSYMUTIL \
19912 NMEDIT \
19913 LIPO \
19914 OTOOL \
19915 OTOOL64 \
19916 shrext_cmds \
19917 export_dynamic_flag_spec \
19918 whole_archive_flag_spec \
19919 compiler_needs_object \
19920 with_gnu_ld \
19921 allow_undefined_flag \
19922 no_undefined_flag \
19923 hardcode_libdir_flag_spec \
19924 hardcode_libdir_separator \
19925 exclude_expsyms \
19926 include_expsyms \
19927 file_list_spec \
19928 variables_saved_for_relink \
19929 libname_spec \
19930 library_names_spec \
19931 soname_spec \
19932 install_override_mode \
19933 finish_eval \
19934 old_striplib \
19935 striplib; do
19936     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
19937     *[\\\\\\\`\\"\\\$]*)
19938       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
19939       ;;
19940     *)
19941       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
19942       ;;
19943     esac
19944 done
19945
19946 # Double-quote double-evaled strings.
19947 for var in reload_cmds \
19948 old_postinstall_cmds \
19949 old_postuninstall_cmds \
19950 old_archive_cmds \
19951 extract_expsyms_cmds \
19952 old_archive_from_new_cmds \
19953 old_archive_from_expsyms_cmds \
19954 archive_cmds \
19955 archive_expsym_cmds \
19956 module_cmds \
19957 module_expsym_cmds \
19958 export_symbols_cmds \
19959 prelink_cmds \
19960 postlink_cmds \
19961 postinstall_cmds \
19962 postuninstall_cmds \
19963 finish_cmds \
19964 sys_lib_search_path_spec \
19965 sys_lib_dlsearch_path_spec; do
19966     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
19967     *[\\\\\\\`\\"\\\$]*)
19968       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
19969       ;;
19970     *)
19971       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
19972       ;;
19973     esac
19974 done
19975
19976 ac_aux_dir='$ac_aux_dir'
19977 xsi_shell='$xsi_shell'
19978 lt_shell_append='$lt_shell_append'
19979
19980 # See if we are running on zsh, and set the options which allow our
19981 # commands through without removal of \ escapes INIT.
19982 if test -n "\${ZSH_VERSION+set}" ; then
19983    setopt NO_GLOB_SUBST
19984 fi
19985
19986
19987     PACKAGE='$PACKAGE'
19988     VERSION='$VERSION'
19989     TIMESTAMP='$TIMESTAMP'
19990     RM='$RM'
19991     ofile='$ofile'
19992
19993
19994
19995
19996 _ACEOF
19997
19998 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19999
20000 # Handling of arguments.
20001 for ac_config_target in $ac_config_targets
20002 do
20003   case $ac_config_target in
20004     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
20005     "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
20006     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20007     "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
20008     "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
20009     "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
20010     "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
20011     "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
20012     "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
20013     "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
20014     "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
20015     "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
20016     "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
20017     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
20018
20019   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20020   esac
20021 done
20022
20023
20024 # If the user did not use the arguments to specify the items to instantiate,
20025 # then the envvar interface is used.  Set only those that are not.
20026 # We use the long form for the default assignment because of an extremely
20027 # bizarre bug on SunOS 4.1.3.
20028 if $ac_need_defaults; then
20029   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20030   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20031   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20032 fi
20033
20034 # Have a temporary directory for convenience.  Make it in the build tree
20035 # simply because there is no reason against having it here, and in addition,
20036 # creating and moving files from /tmp can sometimes cause problems.
20037 # Hook for its removal unless debugging.
20038 # Note that there is a small window in which the directory will not be cleaned:
20039 # after its creation but before its name has been assigned to `$tmp'.
20040 $debug ||
20041 {
20042   tmp= ac_tmp=
20043   trap 'exit_status=$?
20044   : "${ac_tmp:=$tmp}"
20045   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20046 ' 0
20047   trap 'as_fn_exit 1' 1 2 13 15
20048 }
20049 # Create a (secure) tmp directory for tmp files.
20050
20051 {
20052   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20053   test -d "$tmp"
20054 }  ||
20055 {
20056   tmp=./conf$$-$RANDOM
20057   (umask 077 && mkdir "$tmp")
20058 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20059 ac_tmp=$tmp
20060
20061 # Set up the scripts for CONFIG_FILES section.
20062 # No need to generate them if there are no CONFIG_FILES.
20063 # This happens for instance with `./config.status config.h'.
20064 if test -n "$CONFIG_FILES"; then
20065
20066
20067 ac_cr=`echo X | tr X '\015'`
20068 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20069 # But we know of no other shell where ac_cr would be empty at this
20070 # point, so we can use a bashism as a fallback.
20071 if test "x$ac_cr" = x; then
20072   eval ac_cr=\$\'\\r\'
20073 fi
20074 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20075 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20076   ac_cs_awk_cr='\\r'
20077 else
20078   ac_cs_awk_cr=$ac_cr
20079 fi
20080
20081 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20082 _ACEOF
20083
20084
20085 {
20086   echo "cat >conf$$subs.awk <<_ACEOF" &&
20087   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20088   echo "_ACEOF"
20089 } >conf$$subs.sh ||
20090   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20091 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20092 ac_delim='%!_!# '
20093 for ac_last_try in false false false false false :; do
20094   . ./conf$$subs.sh ||
20095     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20096
20097   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20098   if test $ac_delim_n = $ac_delim_num; then
20099     break
20100   elif $ac_last_try; then
20101     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20102   else
20103     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20104   fi
20105 done
20106 rm -f conf$$subs.sh
20107
20108 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20109 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20110 _ACEOF
20111 sed -n '
20112 h
20113 s/^/S["/; s/!.*/"]=/
20114 p
20115 g
20116 s/^[^!]*!//
20117 :repl
20118 t repl
20119 s/'"$ac_delim"'$//
20120 t delim
20121 :nl
20122 h
20123 s/\(.\{148\}\)..*/\1/
20124 t more1
20125 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20126 p
20127 n
20128 b repl
20129 :more1
20130 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20131 p
20132 g
20133 s/.\{148\}//
20134 t nl
20135 :delim
20136 h
20137 s/\(.\{148\}\)..*/\1/
20138 t more2
20139 s/["\\]/\\&/g; s/^/"/; s/$/"/
20140 p
20141 b
20142 :more2
20143 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20144 p
20145 g
20146 s/.\{148\}//
20147 t delim
20148 ' <conf$$subs.awk | sed '
20149 /^[^""]/{
20150   N
20151   s/\n//
20152 }
20153 ' >>$CONFIG_STATUS || ac_write_fail=1
20154 rm -f conf$$subs.awk
20155 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20156 _ACAWK
20157 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20158   for (key in S) S_is_set[key] = 1
20159   FS = "\a"
20160
20161 }
20162 {
20163   line = $ 0
20164   nfields = split(line, field, "@")
20165   substed = 0
20166   len = length(field[1])
20167   for (i = 2; i < nfields; i++) {
20168     key = field[i]
20169     keylen = length(key)
20170     if (S_is_set[key]) {
20171       value = S[key]
20172       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20173       len += length(value) + length(field[++i])
20174       substed = 1
20175     } else
20176       len += 1 + keylen
20177   }
20178
20179   print line
20180 }
20181
20182 _ACAWK
20183 _ACEOF
20184 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20185 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20186   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20187 else
20188   cat
20189 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20190   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20191 _ACEOF
20192
20193 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20194 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20195 # trailing colons and then remove the whole line if VPATH becomes empty
20196 # (actually we leave an empty line to preserve line numbers).
20197 if test "x$srcdir" = x.; then
20198   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
20199 h
20200 s///
20201 s/^/:/
20202 s/[      ]*$/:/
20203 s/:\$(srcdir):/:/g
20204 s/:\${srcdir}:/:/g
20205 s/:@srcdir@:/:/g
20206 s/^:*//
20207 s/:*$//
20208 x
20209 s/\(=[   ]*\).*/\1/
20210 G
20211 s/\n//
20212 s/^[^=]*=[       ]*$//
20213 }'
20214 fi
20215
20216 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20217 fi # test -n "$CONFIG_FILES"
20218
20219 # Set up the scripts for CONFIG_HEADERS section.
20220 # No need to generate them if there are no CONFIG_HEADERS.
20221 # This happens for instance with `./config.status Makefile'.
20222 if test -n "$CONFIG_HEADERS"; then
20223 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20224 BEGIN {
20225 _ACEOF
20226
20227 # Transform confdefs.h into an awk script `defines.awk', embedded as
20228 # here-document in config.status, that substitutes the proper values into
20229 # config.h.in to produce config.h.
20230
20231 # Create a delimiter string that does not exist in confdefs.h, to ease
20232 # handling of long lines.
20233 ac_delim='%!_!# '
20234 for ac_last_try in false false :; do
20235   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20236   if test -z "$ac_tt"; then
20237     break
20238   elif $ac_last_try; then
20239     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20240   else
20241     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20242   fi
20243 done
20244
20245 # For the awk script, D is an array of macro values keyed by name,
20246 # likewise P contains macro parameters if any.  Preserve backslash
20247 # newline sequences.
20248
20249 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20250 sed -n '
20251 s/.\{148\}/&'"$ac_delim"'/g
20252 t rset
20253 :rset
20254 s/^[     ]*#[    ]*define[       ][      ]*/ /
20255 t def
20256 d
20257 :def
20258 s/\\$//
20259 t bsnl
20260 s/["\\]/\\&/g
20261 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20262 D["\1"]=" \3"/p
20263 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
20264 d
20265 :bsnl
20266 s/["\\]/\\&/g
20267 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20268 D["\1"]=" \3\\\\\\n"\\/p
20269 t cont
20270 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20271 t cont
20272 d
20273 :cont
20274 n
20275 s/.\{148\}/&'"$ac_delim"'/g
20276 t clear
20277 :clear
20278 s/\\$//
20279 t bsnlc
20280 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20281 d
20282 :bsnlc
20283 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20284 b cont
20285 ' <confdefs.h | sed '
20286 s/'"$ac_delim"'/"\\\
20287 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20288
20289 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20290   for (key in D) D_is_set[key] = 1
20291   FS = "\a"
20292 }
20293 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20294   line = \$ 0
20295   split(line, arg, " ")
20296   if (arg[1] == "#") {
20297     defundef = arg[2]
20298     mac1 = arg[3]
20299   } else {
20300     defundef = substr(arg[1], 2)
20301     mac1 = arg[2]
20302   }
20303   split(mac1, mac2, "(") #)
20304   macro = mac2[1]
20305   prefix = substr(line, 1, index(line, defundef) - 1)
20306   if (D_is_set[macro]) {
20307     # Preserve the white space surrounding the "#".
20308     print prefix "define", macro P[macro] D[macro]
20309     next
20310   } else {
20311     # Replace #undef with comments.  This is necessary, for example,
20312     # in the case of _POSIX_SOURCE, which is predefined and required
20313     # on some systems where configure will not decide to define it.
20314     if (defundef == "undef") {
20315       print "/*", prefix defundef, macro, "*/"
20316       next
20317     }
20318   }
20319 }
20320 { print }
20321 _ACAWK
20322 _ACEOF
20323 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20324   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20325 fi # test -n "$CONFIG_HEADERS"
20326
20327
20328 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
20329 shift
20330 for ac_tag
20331 do
20332   case $ac_tag in
20333   :[FHLC]) ac_mode=$ac_tag; continue;;
20334   esac
20335   case $ac_mode$ac_tag in
20336   :[FHL]*:*);;
20337   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20338   :[FH]-) ac_tag=-:-;;
20339   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20340   esac
20341   ac_save_IFS=$IFS
20342   IFS=:
20343   set x $ac_tag
20344   IFS=$ac_save_IFS
20345   shift
20346   ac_file=$1
20347   shift
20348
20349   case $ac_mode in
20350   :L) ac_source=$1;;
20351   :[FH])
20352     ac_file_inputs=
20353     for ac_f
20354     do
20355       case $ac_f in
20356       -) ac_f="$ac_tmp/stdin";;
20357       *) # Look for the file first in the build tree, then in the source tree
20358          # (if the path is not absolute).  The absolute path cannot be DOS-style,
20359          # because $ac_f cannot contain `:'.
20360          test -f "$ac_f" ||
20361            case $ac_f in
20362            [\\/$]*) false;;
20363            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20364            esac ||
20365            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20366       esac
20367       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20368       as_fn_append ac_file_inputs " '$ac_f'"
20369     done
20370
20371     # Let's still pretend it is `configure' which instantiates (i.e., don't
20372     # use $as_me), people would be surprised to read:
20373     #    /* config.h.  Generated by config.status.  */
20374     configure_input='Generated from '`
20375           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20376         `' by configure.'
20377     if test x"$ac_file" != x-; then
20378       configure_input="$ac_file.  $configure_input"
20379       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20380 $as_echo "$as_me: creating $ac_file" >&6;}
20381     fi
20382     # Neutralize special characters interpreted by sed in replacement strings.
20383     case $configure_input in #(
20384     *\&* | *\|* | *\\* )
20385        ac_sed_conf_input=`$as_echo "$configure_input" |
20386        sed 's/[\\\\&|]/\\\\&/g'`;; #(
20387     *) ac_sed_conf_input=$configure_input;;
20388     esac
20389
20390     case $ac_tag in
20391     *:-:* | *:-) cat >"$ac_tmp/stdin" \
20392       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20393     esac
20394     ;;
20395   esac
20396
20397   ac_dir=`$as_dirname -- "$ac_file" ||
20398 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20399          X"$ac_file" : 'X\(//\)[^/]' \| \
20400          X"$ac_file" : 'X\(//\)$' \| \
20401          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20402 $as_echo X"$ac_file" |
20403     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20404             s//\1/
20405             q
20406           }
20407           /^X\(\/\/\)[^/].*/{
20408             s//\1/
20409             q
20410           }
20411           /^X\(\/\/\)$/{
20412             s//\1/
20413             q
20414           }
20415           /^X\(\/\).*/{
20416             s//\1/
20417             q
20418           }
20419           s/.*/./; q'`
20420   as_dir="$ac_dir"; as_fn_mkdir_p
20421   ac_builddir=.
20422
20423 case "$ac_dir" in
20424 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20425 *)
20426   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20427   # A ".." for each directory in $ac_dir_suffix.
20428   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20429   case $ac_top_builddir_sub in
20430   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20431   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20432   esac ;;
20433 esac
20434 ac_abs_top_builddir=$ac_pwd
20435 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20436 # for backward compatibility:
20437 ac_top_builddir=$ac_top_build_prefix
20438
20439 case $srcdir in
20440   .)  # We are building in place.
20441     ac_srcdir=.
20442     ac_top_srcdir=$ac_top_builddir_sub
20443     ac_abs_top_srcdir=$ac_pwd ;;
20444   [\\/]* | ?:[\\/]* )  # Absolute name.
20445     ac_srcdir=$srcdir$ac_dir_suffix;
20446     ac_top_srcdir=$srcdir
20447     ac_abs_top_srcdir=$srcdir ;;
20448   *) # Relative name.
20449     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20450     ac_top_srcdir=$ac_top_build_prefix$srcdir
20451     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20452 esac
20453 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20454
20455
20456   case $ac_mode in
20457   :F)
20458   #
20459   # CONFIG_FILE
20460   #
20461
20462 _ACEOF
20463
20464 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20465 # If the template does not know about datarootdir, expand it.
20466 # FIXME: This hack should be removed a few years after 2.60.
20467 ac_datarootdir_hack=; ac_datarootdir_seen=
20468 ac_sed_dataroot='
20469 /datarootdir/ {
20470   p
20471   q
20472 }
20473 /@datadir@/p
20474 /@docdir@/p
20475 /@infodir@/p
20476 /@localedir@/p
20477 /@mandir@/p'
20478 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20479 *datarootdir*) ac_datarootdir_seen=yes;;
20480 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20481   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20482 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20483 _ACEOF
20484 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20485   ac_datarootdir_hack='
20486   s&@datadir@&$datadir&g
20487   s&@docdir@&$docdir&g
20488   s&@infodir@&$infodir&g
20489   s&@localedir@&$localedir&g
20490   s&@mandir@&$mandir&g
20491   s&\\\${datarootdir}&$datarootdir&g' ;;
20492 esac
20493 _ACEOF
20494
20495 # Neutralize VPATH when `$srcdir' = `.'.
20496 # Shell code in configure.ac might set extrasub.
20497 # FIXME: do we really want to maintain this feature?
20498 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20499 ac_sed_extra="$ac_vpsub
20500 $extrasub
20501 _ACEOF
20502 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20503 :t
20504 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20505 s|@configure_input@|$ac_sed_conf_input|;t t
20506 s&@top_builddir@&$ac_top_builddir_sub&;t t
20507 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20508 s&@srcdir@&$ac_srcdir&;t t
20509 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20510 s&@top_srcdir@&$ac_top_srcdir&;t t
20511 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20512 s&@builddir@&$ac_builddir&;t t
20513 s&@abs_builddir@&$ac_abs_builddir&;t t
20514 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20515 $ac_datarootdir_hack
20516 "
20517 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20518   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20519
20520 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20521   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20522   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
20523       "$ac_tmp/out"`; test -z "$ac_out"; } &&
20524   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20525 which seems to be undefined.  Please make sure it is defined" >&5
20526 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20527 which seems to be undefined.  Please make sure it is defined" >&2;}
20528
20529   rm -f "$ac_tmp/stdin"
20530   case $ac_file in
20531   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20532   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20533   esac \
20534   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20535  ;;
20536   :H)
20537   #
20538   # CONFIG_HEADER
20539   #
20540   if test x"$ac_file" != x-; then
20541     {
20542       $as_echo "/* $configure_input  */" \
20543       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20544     } >"$ac_tmp/config.h" \
20545       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20546     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20547       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20548 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20549     else
20550       rm -f "$ac_file"
20551       mv "$ac_tmp/config.h" "$ac_file" \
20552         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20553     fi
20554   else
20555     $as_echo "/* $configure_input  */" \
20556       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20557       || as_fn_error $? "could not create -" "$LINENO" 5
20558   fi
20559  ;;
20560
20561   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20562 $as_echo "$as_me: executing $ac_file commands" >&6;}
20563  ;;
20564   esac
20565
20566
20567   case $ac_file$ac_mode in
20568     "libtool":C)
20569
20570     # See if we are running on zsh, and set the options which allow our
20571     # commands through without removal of \ escapes.
20572     if test -n "${ZSH_VERSION+set}" ; then
20573       setopt NO_GLOB_SUBST
20574     fi
20575
20576     cfgfile="${ofile}T"
20577     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
20578     $RM "$cfgfile"
20579
20580     cat <<_LT_EOF >> "$cfgfile"
20581 #! $SHELL
20582
20583 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
20584 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
20585 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
20586 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
20587 #
20588 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
20589 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
20590 #                 Foundation, Inc.
20591 #   Written by Gordon Matzigkeit, 1996
20592 #
20593 #   This file is part of GNU Libtool.
20594 #
20595 # GNU Libtool is free software; you can redistribute it and/or
20596 # modify it under the terms of the GNU General Public License as
20597 # published by the Free Software Foundation; either version 2 of
20598 # the License, or (at your option) any later version.
20599 #
20600 # As a special exception to the GNU General Public License,
20601 # if you distribute this file as part of a program or library that
20602 # is built using GNU Libtool, you may include this file under the
20603 # same distribution terms that you use for the rest of that program.
20604 #
20605 # GNU Libtool is distributed in the hope that it will be useful,
20606 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20607 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20608 # GNU General Public License for more details.
20609 #
20610 # You should have received a copy of the GNU General Public License
20611 # along with GNU Libtool; see the file COPYING.  If not, a copy
20612 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
20613 # obtained by writing to the Free Software Foundation, Inc.,
20614 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20615
20616
20617 # The names of the tagged configurations supported by this script.
20618 available_tags=""
20619
20620 # ### BEGIN LIBTOOL CONFIG
20621
20622 # Which release of libtool.m4 was used?
20623 macro_version=$macro_version
20624 macro_revision=$macro_revision
20625
20626 # Whether or not to build shared libraries.
20627 build_libtool_libs=$enable_shared
20628
20629 # Whether or not to build static libraries.
20630 build_old_libs=$enable_static
20631
20632 # What type of objects to build.
20633 pic_mode=$pic_mode
20634
20635 # Whether or not to optimize for fast installation.
20636 fast_install=$enable_fast_install
20637
20638 # Shell to use when invoking shell scripts.
20639 SHELL=$lt_SHELL
20640
20641 # An echo program that protects backslashes.
20642 ECHO=$lt_ECHO
20643
20644 # The PATH separator for the build system.
20645 PATH_SEPARATOR=$lt_PATH_SEPARATOR
20646
20647 # The host system.
20648 host_alias=$host_alias
20649 host=$host
20650 host_os=$host_os
20651
20652 # The build system.
20653 build_alias=$build_alias
20654 build=$build
20655 build_os=$build_os
20656
20657 # A sed program that does not truncate output.
20658 SED=$lt_SED
20659
20660 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
20661 Xsed="\$SED -e 1s/^X//"
20662
20663 # A grep program that handles long lines.
20664 GREP=$lt_GREP
20665
20666 # An ERE matcher.
20667 EGREP=$lt_EGREP
20668
20669 # A literal string matcher.
20670 FGREP=$lt_FGREP
20671
20672 # A BSD- or MS-compatible name lister.
20673 NM=$lt_NM
20674
20675 # Whether we need soft or hard links.
20676 LN_S=$lt_LN_S
20677
20678 # What is the maximum length of a command?
20679 max_cmd_len=$max_cmd_len
20680
20681 # Object file suffix (normally "o").
20682 objext=$ac_objext
20683
20684 # Executable file suffix (normally "").
20685 exeext=$exeext
20686
20687 # whether the shell understands "unset".
20688 lt_unset=$lt_unset
20689
20690 # turn spaces into newlines.
20691 SP2NL=$lt_lt_SP2NL
20692
20693 # turn newlines into spaces.
20694 NL2SP=$lt_lt_NL2SP
20695
20696 # convert \$build file names to \$host format.
20697 to_host_file_cmd=$lt_cv_to_host_file_cmd
20698
20699 # convert \$build files to toolchain format.
20700 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
20701
20702 # An object symbol dumper.
20703 OBJDUMP=$lt_OBJDUMP
20704
20705 # Method to check whether dependent libraries are shared objects.
20706 deplibs_check_method=$lt_deplibs_check_method
20707
20708 # Command to use when deplibs_check_method = "file_magic".
20709 file_magic_cmd=$lt_file_magic_cmd
20710
20711 # How to find potential files when deplibs_check_method = "file_magic".
20712 file_magic_glob=$lt_file_magic_glob
20713
20714 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
20715 want_nocaseglob=$lt_want_nocaseglob
20716
20717 # DLL creation program.
20718 DLLTOOL=$lt_DLLTOOL
20719
20720 # Command to associate shared and link libraries.
20721 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
20722
20723 # The archiver.
20724 AR=$lt_AR
20725
20726 # Flags to create an archive.
20727 AR_FLAGS=$lt_AR_FLAGS
20728
20729 # How to feed a file listing to the archiver.
20730 archiver_list_spec=$lt_archiver_list_spec
20731
20732 # A symbol stripping program.
20733 STRIP=$lt_STRIP
20734
20735 # Commands used to install an old-style archive.
20736 RANLIB=$lt_RANLIB
20737 old_postinstall_cmds=$lt_old_postinstall_cmds
20738 old_postuninstall_cmds=$lt_old_postuninstall_cmds
20739
20740 # Whether to use a lock for old archive extraction.
20741 lock_old_archive_extraction=$lock_old_archive_extraction
20742
20743 # A C compiler.
20744 LTCC=$lt_CC
20745
20746 # LTCC compiler flags.
20747 LTCFLAGS=$lt_CFLAGS
20748
20749 # Take the output of nm and produce a listing of raw symbols and C names.
20750 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
20751
20752 # Transform the output of nm in a proper C declaration.
20753 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
20754
20755 # Transform the output of nm in a C name address pair.
20756 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
20757
20758 # Transform the output of nm in a C name address pair when lib prefix is needed.
20759 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
20760
20761 # Specify filename containing input files for \$NM.
20762 nm_file_list_spec=$lt_nm_file_list_spec
20763
20764 # The root where to search for dependent libraries,and in which our libraries should be installed.
20765 lt_sysroot=$lt_sysroot
20766
20767 # The name of the directory that contains temporary libtool files.
20768 objdir=$objdir
20769
20770 # Used to examine libraries when file_magic_cmd begins with "file".
20771 MAGIC_CMD=$MAGIC_CMD
20772
20773 # Must we lock files when doing compilation?
20774 need_locks=$lt_need_locks
20775
20776 # Manifest tool.
20777 MANIFEST_TOOL=$lt_MANIFEST_TOOL
20778
20779 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
20780 DSYMUTIL=$lt_DSYMUTIL
20781
20782 # Tool to change global to local symbols on Mac OS X.
20783 NMEDIT=$lt_NMEDIT
20784
20785 # Tool to manipulate fat objects and archives on Mac OS X.
20786 LIPO=$lt_LIPO
20787
20788 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
20789 OTOOL=$lt_OTOOL
20790
20791 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
20792 OTOOL64=$lt_OTOOL64
20793
20794 # Old archive suffix (normally "a").
20795 libext=$libext
20796
20797 # Shared library suffix (normally ".so").
20798 shrext_cmds=$lt_shrext_cmds
20799
20800 # The commands to extract the exported symbol list from a shared archive.
20801 extract_expsyms_cmds=$lt_extract_expsyms_cmds
20802
20803 # Variables whose values should be saved in libtool wrapper scripts and
20804 # restored at link time.
20805 variables_saved_for_relink=$lt_variables_saved_for_relink
20806
20807 # Do we need the "lib" prefix for modules?
20808 need_lib_prefix=$need_lib_prefix
20809
20810 # Do we need a version for libraries?
20811 need_version=$need_version
20812
20813 # Library versioning type.
20814 version_type=$version_type
20815
20816 # Shared library runtime path variable.
20817 runpath_var=$runpath_var
20818
20819 # Shared library path variable.
20820 shlibpath_var=$shlibpath_var
20821
20822 # Is shlibpath searched before the hard-coded library search path?
20823 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
20824
20825 # Format of library name prefix.
20826 libname_spec=$lt_libname_spec
20827
20828 # List of archive names.  First name is the real one, the rest are links.
20829 # The last name is the one that the linker finds with -lNAME
20830 library_names_spec=$lt_library_names_spec
20831
20832 # The coded name of the library, if different from the real name.
20833 soname_spec=$lt_soname_spec
20834
20835 # Permission mode override for installation of shared libraries.
20836 install_override_mode=$lt_install_override_mode
20837
20838 # Command to use after installation of a shared archive.
20839 postinstall_cmds=$lt_postinstall_cmds
20840
20841 # Command to use after uninstallation of a shared archive.
20842 postuninstall_cmds=$lt_postuninstall_cmds
20843
20844 # Commands used to finish a libtool library installation in a directory.
20845 finish_cmds=$lt_finish_cmds
20846
20847 # As "finish_cmds", except a single script fragment to be evaled but
20848 # not shown.
20849 finish_eval=$lt_finish_eval
20850
20851 # Whether we should hardcode library paths into libraries.
20852 hardcode_into_libs=$hardcode_into_libs
20853
20854 # Compile-time system search path for libraries.
20855 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
20856
20857 # Run-time system search path for libraries.
20858 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
20859
20860 # Whether dlopen is supported.
20861 dlopen_support=$enable_dlopen
20862
20863 # Whether dlopen of programs is supported.
20864 dlopen_self=$enable_dlopen_self
20865
20866 # Whether dlopen of statically linked programs is supported.
20867 dlopen_self_static=$enable_dlopen_self_static
20868
20869 # Commands to strip libraries.
20870 old_striplib=$lt_old_striplib
20871 striplib=$lt_striplib
20872
20873
20874 # The linker used to build libraries.
20875 LD=$lt_LD
20876
20877 # How to create reloadable object files.
20878 reload_flag=$lt_reload_flag
20879 reload_cmds=$lt_reload_cmds
20880
20881 # Commands used to build an old-style archive.
20882 old_archive_cmds=$lt_old_archive_cmds
20883
20884 # A language specific compiler.
20885 CC=$lt_compiler
20886
20887 # Is the compiler the GNU compiler?
20888 with_gcc=$GCC
20889
20890 # Compiler flag to turn off builtin functions.
20891 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
20892
20893 # Additional compiler flags for building library objects.
20894 pic_flag=$lt_lt_prog_compiler_pic
20895
20896 # How to pass a linker flag through the compiler.
20897 wl=$lt_lt_prog_compiler_wl
20898
20899 # Compiler flag to prevent dynamic linking.
20900 link_static_flag=$lt_lt_prog_compiler_static
20901
20902 # Does compiler simultaneously support -c and -o options?
20903 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
20904
20905 # Whether or not to add -lc for building shared libraries.
20906 build_libtool_need_lc=$archive_cmds_need_lc
20907
20908 # Whether or not to disallow shared libs when runtime libs are static.
20909 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
20910
20911 # Compiler flag to allow reflexive dlopens.
20912 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
20913
20914 # Compiler flag to generate shared objects directly from archives.
20915 whole_archive_flag_spec=$lt_whole_archive_flag_spec
20916
20917 # Whether the compiler copes with passing no objects directly.
20918 compiler_needs_object=$lt_compiler_needs_object
20919
20920 # Create an old-style archive from a shared archive.
20921 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
20922
20923 # Create a temporary old-style archive to link instead of a shared archive.
20924 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
20925
20926 # Commands used to build a shared archive.
20927 archive_cmds=$lt_archive_cmds
20928 archive_expsym_cmds=$lt_archive_expsym_cmds
20929
20930 # Commands used to build a loadable module if different from building
20931 # a shared archive.
20932 module_cmds=$lt_module_cmds
20933 module_expsym_cmds=$lt_module_expsym_cmds
20934
20935 # Whether we are building with GNU ld or not.
20936 with_gnu_ld=$lt_with_gnu_ld
20937
20938 # Flag that allows shared libraries with undefined symbols to be built.
20939 allow_undefined_flag=$lt_allow_undefined_flag
20940
20941 # Flag that enforces no undefined symbols.
20942 no_undefined_flag=$lt_no_undefined_flag
20943
20944 # Flag to hardcode \$libdir into a binary during linking.
20945 # This must work even if \$libdir does not exist
20946 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
20947
20948 # Whether we need a single "-rpath" flag with a separated argument.
20949 hardcode_libdir_separator=$lt_hardcode_libdir_separator
20950
20951 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
20952 # DIR into the resulting binary.
20953 hardcode_direct=$hardcode_direct
20954
20955 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
20956 # DIR into the resulting binary and the resulting library dependency is
20957 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
20958 # library is relocated.
20959 hardcode_direct_absolute=$hardcode_direct_absolute
20960
20961 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
20962 # into the resulting binary.
20963 hardcode_minus_L=$hardcode_minus_L
20964
20965 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
20966 # into the resulting binary.
20967 hardcode_shlibpath_var=$hardcode_shlibpath_var
20968
20969 # Set to "yes" if building a shared library automatically hardcodes DIR
20970 # into the library and all subsequent libraries and executables linked
20971 # against it.
20972 hardcode_automatic=$hardcode_automatic
20973
20974 # Set to yes if linker adds runtime paths of dependent libraries
20975 # to runtime path list.
20976 inherit_rpath=$inherit_rpath
20977
20978 # Whether libtool must link a program against all its dependency libraries.
20979 link_all_deplibs=$link_all_deplibs
20980
20981 # Set to "yes" if exported symbols are required.
20982 always_export_symbols=$always_export_symbols
20983
20984 # The commands to list exported symbols.
20985 export_symbols_cmds=$lt_export_symbols_cmds
20986
20987 # Symbols that should not be listed in the preloaded symbols.
20988 exclude_expsyms=$lt_exclude_expsyms
20989
20990 # Symbols that must always be exported.
20991 include_expsyms=$lt_include_expsyms
20992
20993 # Commands necessary for linking programs (against libraries) with templates.
20994 prelink_cmds=$lt_prelink_cmds
20995
20996 # Commands necessary for finishing linking programs.
20997 postlink_cmds=$lt_postlink_cmds
20998
20999 # Specify filename containing input files.
21000 file_list_spec=$lt_file_list_spec
21001
21002 # How to hardcode a shared library path into an executable.
21003 hardcode_action=$hardcode_action
21004
21005 # ### END LIBTOOL CONFIG
21006
21007 _LT_EOF
21008
21009   case $host_os in
21010   aix3*)
21011     cat <<\_LT_EOF >> "$cfgfile"
21012 # AIX sometimes has problems with the GCC collect2 program.  For some
21013 # reason, if we set the COLLECT_NAMES environment variable, the problems
21014 # vanish in a puff of smoke.
21015 if test "X${COLLECT_NAMES+set}" != Xset; then
21016   COLLECT_NAMES=
21017   export COLLECT_NAMES
21018 fi
21019 _LT_EOF
21020     ;;
21021   esac
21022
21023
21024 ltmain="$ac_aux_dir/ltmain.sh"
21025
21026
21027   # We use sed instead of cat because bash on DJGPP gets confused if
21028   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
21029   # text mode, it properly converts lines to CR/LF.  This bash problem
21030   # is reportedly fixed, but why not run on old versions too?
21031   sed '$q' "$ltmain" >> "$cfgfile" \
21032      || (rm -f "$cfgfile"; exit 1)
21033
21034   if test x"$xsi_shell" = xyes; then
21035   sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
21036 func_dirname ()\
21037 {\
21038 \    case ${1} in\
21039 \      */*) func_dirname_result="${1%/*}${2}" ;;\
21040 \      *  ) func_dirname_result="${3}" ;;\
21041 \    esac\
21042 } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
21043   && mv -f "$cfgfile.tmp" "$cfgfile" \
21044     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21045 test 0 -eq $? || _lt_function_replace_fail=:
21046
21047
21048   sed -e '/^func_basename ()$/,/^} # func_basename /c\
21049 func_basename ()\
21050 {\
21051 \    func_basename_result="${1##*/}"\
21052 } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
21053   && mv -f "$cfgfile.tmp" "$cfgfile" \
21054     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21055 test 0 -eq $? || _lt_function_replace_fail=:
21056
21057
21058   sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
21059 func_dirname_and_basename ()\
21060 {\
21061 \    case ${1} in\
21062 \      */*) func_dirname_result="${1%/*}${2}" ;;\
21063 \      *  ) func_dirname_result="${3}" ;;\
21064 \    esac\
21065 \    func_basename_result="${1##*/}"\
21066 } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
21067   && mv -f "$cfgfile.tmp" "$cfgfile" \
21068     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21069 test 0 -eq $? || _lt_function_replace_fail=:
21070
21071
21072   sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
21073 func_stripname ()\
21074 {\
21075 \    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
21076 \    # positional parameters, so assign one to ordinary parameter first.\
21077 \    func_stripname_result=${3}\
21078 \    func_stripname_result=${func_stripname_result#"${1}"}\
21079 \    func_stripname_result=${func_stripname_result%"${2}"}\
21080 } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
21081   && mv -f "$cfgfile.tmp" "$cfgfile" \
21082     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21083 test 0 -eq $? || _lt_function_replace_fail=:
21084
21085
21086   sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
21087 func_split_long_opt ()\
21088 {\
21089 \    func_split_long_opt_name=${1%%=*}\
21090 \    func_split_long_opt_arg=${1#*=}\
21091 } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
21092   && mv -f "$cfgfile.tmp" "$cfgfile" \
21093     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21094 test 0 -eq $? || _lt_function_replace_fail=:
21095
21096
21097   sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
21098 func_split_short_opt ()\
21099 {\
21100 \    func_split_short_opt_arg=${1#??}\
21101 \    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
21102 } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
21103   && mv -f "$cfgfile.tmp" "$cfgfile" \
21104     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21105 test 0 -eq $? || _lt_function_replace_fail=:
21106
21107
21108   sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
21109 func_lo2o ()\
21110 {\
21111 \    case ${1} in\
21112 \      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
21113 \      *)    func_lo2o_result=${1} ;;\
21114 \    esac\
21115 } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
21116   && mv -f "$cfgfile.tmp" "$cfgfile" \
21117     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21118 test 0 -eq $? || _lt_function_replace_fail=:
21119
21120
21121   sed -e '/^func_xform ()$/,/^} # func_xform /c\
21122 func_xform ()\
21123 {\
21124     func_xform_result=${1%.*}.lo\
21125 } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
21126   && mv -f "$cfgfile.tmp" "$cfgfile" \
21127     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21128 test 0 -eq $? || _lt_function_replace_fail=:
21129
21130
21131   sed -e '/^func_arith ()$/,/^} # func_arith /c\
21132 func_arith ()\
21133 {\
21134     func_arith_result=$(( $* ))\
21135 } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
21136   && mv -f "$cfgfile.tmp" "$cfgfile" \
21137     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21138 test 0 -eq $? || _lt_function_replace_fail=:
21139
21140
21141   sed -e '/^func_len ()$/,/^} # func_len /c\
21142 func_len ()\
21143 {\
21144     func_len_result=${#1}\
21145 } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
21146   && mv -f "$cfgfile.tmp" "$cfgfile" \
21147     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21148 test 0 -eq $? || _lt_function_replace_fail=:
21149
21150 fi
21151
21152 if test x"$lt_shell_append" = xyes; then
21153   sed -e '/^func_append ()$/,/^} # func_append /c\
21154 func_append ()\
21155 {\
21156     eval "${1}+=\\${2}"\
21157 } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
21158   && mv -f "$cfgfile.tmp" "$cfgfile" \
21159     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21160 test 0 -eq $? || _lt_function_replace_fail=:
21161
21162
21163   sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
21164 func_append_quoted ()\
21165 {\
21166 \    func_quote_for_eval "${2}"\
21167 \    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
21168 } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
21169   && mv -f "$cfgfile.tmp" "$cfgfile" \
21170     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21171 test 0 -eq $? || _lt_function_replace_fail=:
21172
21173
21174   # Save a `func_append' function call where possible by direct use of '+='
21175   sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
21176     && mv -f "$cfgfile.tmp" "$cfgfile" \
21177       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21178   test 0 -eq $? || _lt_function_replace_fail=:
21179 else
21180   # Save a `func_append' function call even when '+=' is not available
21181   sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
21182     && mv -f "$cfgfile.tmp" "$cfgfile" \
21183       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21184   test 0 -eq $? || _lt_function_replace_fail=:
21185 fi
21186
21187 if test x"$_lt_function_replace_fail" = x":"; then
21188   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
21189 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
21190 fi
21191
21192
21193    mv -f "$cfgfile" "$ofile" ||
21194     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
21195   chmod +x "$ofile"
21196
21197  ;;
21198     "disable-rpath":C)
21199         sed < libtool > libtool-2 \
21200         's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
21201         mv libtool-2 libtool
21202         chmod 755 libtool
21203         libtool="./libtool"
21204          ;;
21205
21206   esac
21207 done # for ac_tag
21208
21209
21210 as_fn_exit 0
21211 _ACEOF
21212 ac_clean_files=$ac_clean_files_save
21213
21214 test $ac_write_fail = 0 ||
21215   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
21216
21217
21218 # configure is writing to config.log, and then calls config.status.
21219 # config.status does its own redirection, appending to config.log.
21220 # Unfortunately, on DOS this fails, as config.log is still kept open
21221 # by configure, so config.status won't be able to write to it; its
21222 # output is simply discarded.  So we exec the FD to /dev/null,
21223 # effectively closing config.log, so it can be properly (re)opened and
21224 # appended to by config.status.  When coming back to configure, we
21225 # need to make the FD available again.
21226 if test "$no_create" != yes; then
21227   ac_cs_success=:
21228   ac_config_status_args=
21229   test "$silent" = yes &&
21230     ac_config_status_args="$ac_config_status_args --quiet"
21231   exec 5>/dev/null
21232   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21233   exec 5>>config.log
21234   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21235   # would make configure fail if this is the last instruction.
21236   $ac_cs_success || as_fn_exit 1
21237 fi
21238 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21239   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21240 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
21241 fi
21242