]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/unbound/configure
Merge libxo 0.4.6
[FreeBSD/FreeBSD.git] / contrib / unbound / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for unbound 1.5.8.
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.8'
594 PACKAGE_STRING='unbound 1.5.8'
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 SSLLIB
665 HAVE_SSL
666 CONFIG_DATE
667 NETBSD_LINTFLAGS
668 PYUNBOUND_UNINSTALL
669 PYUNBOUND_INSTALL
670 PYUNBOUND_TARGET
671 PYUNBOUND_OBJ
672 WITH_PYUNBOUND
673 PYTHONMOD_UNINSTALL
674 PYTHONMOD_INSTALL
675 PYTHONMOD_HEADER
676 PYTHONMOD_OBJ
677 WITH_PYTHONMODULE
678 swig
679 SWIG_LIB
680 SWIG
681 PY_MAJOR_VERSION
682 PYTHON_SITE_PKG
683 PYTHON_LDFLAGS
684 PYTHON_CPPFLAGS
685 PYTHON
686 PYTHON_VERSION
687 PTHREAD_CFLAGS_ONLY
688 PTHREAD_CFLAGS
689 PTHREAD_LIBS
690 PTHREAD_CC
691 ax_pthread_config
692 RUNTIME_PATH
693 LIBOBJS
694 LT_SYS_LIBRARY_PATH
695 OTOOL64
696 OTOOL
697 LIPO
698 NMEDIT
699 DSYMUTIL
700 MANIFEST_TOOL
701 AWK
702 RANLIB
703 ac_ct_AR
704 DLLTOOL
705 OBJDUMP
706 LN_S
707 NM
708 ac_ct_DUMPBIN
709 DUMPBIN
710 LD
711 FGREP
712 SED
713 LIBTOOL
714 AR
715 host_os
716 host_vendor
717 host_cpu
718 host
719 build_os
720 build_vendor
721 build_cpu
722 build
723 libtool
724 STRIP
725 doxygen
726 YFLAGS
727 YACC
728 LEXLIB
729 LEX_OUTPUT_ROOT
730 LEX
731 debug_enabled
732 DEPFLAG
733 UNBOUND_USERNAME
734 UNBOUND_ROOTCERT_FILE
735 UNBOUND_ROOTKEY_FILE
736 UNBOUND_PIDFILE
737 UNBOUND_SHARE_DIR
738 UNBOUND_CHROOT_DIR
739 UNBOUND_RUN_DIR
740 ub_conf_dir
741 ub_conf_file
742 EGREP
743 GREP
744 CPP
745 OBJEXT
746 EXEEXT
747 ac_ct_CC
748 CPPFLAGS
749 LDFLAGS
750 CFLAGS
751 CC
752 LIBUNBOUND_AGE
753 LIBUNBOUND_REVISION
754 LIBUNBOUND_CURRENT
755 UNBOUND_VERSION_MICRO
756 UNBOUND_VERSION_MINOR
757 UNBOUND_VERSION_MAJOR
758 target_alias
759 host_alias
760 build_alias
761 LIBS
762 ECHO_T
763 ECHO_N
764 ECHO_C
765 DEFS
766 mandir
767 localedir
768 libdir
769 psdir
770 pdfdir
771 dvidir
772 htmldir
773 infodir
774 docdir
775 oldincludedir
776 includedir
777 localstatedir
778 sharedstatedir
779 sysconfdir
780 datadir
781 datarootdir
782 libexecdir
783 sbindir
784 bindir
785 program_transform_name
786 prefix
787 exec_prefix
788 PACKAGE_URL
789 PACKAGE_BUGREPORT
790 PACKAGE_STRING
791 PACKAGE_VERSION
792 PACKAGE_TARNAME
793 PACKAGE_NAME
794 PATH_SEPARATOR
795 SHELL'
796 ac_subst_files=''
797 ac_user_opts='
798 enable_option_checking
799 with_conf_file
800 with_run_dir
801 with_chroot_dir
802 with_share_dir
803 with_pidfile
804 with_rootkey_file
805 with_rootcert_file
806 with_username
807 enable_checking
808 enable_debug
809 enable_flto
810 enable_pie
811 enable_relro_now
812 enable_shared
813 enable_static
814 with_pic
815 enable_fast_install
816 with_aix_soname
817 with_gnu_ld
818 with_sysroot
819 enable_libtool_lock
820 enable_rpath
821 enable_largefile
822 enable_alloc_checks
823 enable_alloc_lite
824 enable_alloc_nonregional
825 with_pthreads
826 with_solaris_threads
827 with_pyunbound
828 with_pythonmodule
829 with_nss
830 with_nettle
831 with_ssl
832 enable_sha2
833 enable_gost
834 enable_ecdsa
835 enable_event_api
836 with_libevent
837 with_libexpat
838 enable_static_exe
839 enable_lock_checks
840 enable_allsymbols
841 enable_dnstap
842 with_dnstap_socket_path
843 with_protobuf_c
844 with_libfstrm
845 with_libunbound_only
846 '
847       ac_precious_vars='build_alias
848 host_alias
849 target_alias
850 CC
851 CFLAGS
852 LDFLAGS
853 LIBS
854 CPPFLAGS
855 CPP
856 YACC
857 YFLAGS
858 LT_SYS_LIBRARY_PATH
859 PYTHON_VERSION'
860
861
862 # Initialize some variables set by options.
863 ac_init_help=
864 ac_init_version=false
865 ac_unrecognized_opts=
866 ac_unrecognized_sep=
867 # The variables have the same names as the options, with
868 # dashes changed to underlines.
869 cache_file=/dev/null
870 exec_prefix=NONE
871 no_create=
872 no_recursion=
873 prefix=NONE
874 program_prefix=NONE
875 program_suffix=NONE
876 program_transform_name=s,x,x,
877 silent=
878 site=
879 srcdir=
880 verbose=
881 x_includes=NONE
882 x_libraries=NONE
883
884 # Installation directory options.
885 # These are left unexpanded so users can "make install exec_prefix=/foo"
886 # and all the variables that are supposed to be based on exec_prefix
887 # by default will actually change.
888 # Use braces instead of parens because sh, perl, etc. also accept them.
889 # (The list follows the same order as the GNU Coding Standards.)
890 bindir='${exec_prefix}/bin'
891 sbindir='${exec_prefix}/sbin'
892 libexecdir='${exec_prefix}/libexec'
893 datarootdir='${prefix}/share'
894 datadir='${datarootdir}'
895 sysconfdir='${prefix}/etc'
896 sharedstatedir='${prefix}/com'
897 localstatedir='${prefix}/var'
898 includedir='${prefix}/include'
899 oldincludedir='/usr/include'
900 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
901 infodir='${datarootdir}/info'
902 htmldir='${docdir}'
903 dvidir='${docdir}'
904 pdfdir='${docdir}'
905 psdir='${docdir}'
906 libdir='${exec_prefix}/lib'
907 localedir='${datarootdir}/locale'
908 mandir='${datarootdir}/man'
909
910 ac_prev=
911 ac_dashdash=
912 for ac_option
913 do
914   # If the previous option needs an argument, assign it.
915   if test -n "$ac_prev"; then
916     eval $ac_prev=\$ac_option
917     ac_prev=
918     continue
919   fi
920
921   case $ac_option in
922   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
923   *=)   ac_optarg= ;;
924   *)    ac_optarg=yes ;;
925   esac
926
927   # Accept the important Cygnus configure options, so we can diagnose typos.
928
929   case $ac_dashdash$ac_option in
930   --)
931     ac_dashdash=yes ;;
932
933   -bindir | --bindir | --bindi | --bind | --bin | --bi)
934     ac_prev=bindir ;;
935   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
936     bindir=$ac_optarg ;;
937
938   -build | --build | --buil | --bui | --bu)
939     ac_prev=build_alias ;;
940   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
941     build_alias=$ac_optarg ;;
942
943   -cache-file | --cache-file | --cache-fil | --cache-fi \
944   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945     ac_prev=cache_file ;;
946   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
948     cache_file=$ac_optarg ;;
949
950   --config-cache | -C)
951     cache_file=config.cache ;;
952
953   -datadir | --datadir | --datadi | --datad)
954     ac_prev=datadir ;;
955   -datadir=* | --datadir=* | --datadi=* | --datad=*)
956     datadir=$ac_optarg ;;
957
958   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959   | --dataroo | --dataro | --datar)
960     ac_prev=datarootdir ;;
961   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963     datarootdir=$ac_optarg ;;
964
965   -disable-* | --disable-*)
966     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
967     # Reject names that are not valid shell variable names.
968     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
969       as_fn_error $? "invalid feature name: $ac_useropt"
970     ac_useropt_orig=$ac_useropt
971     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972     case $ac_user_opts in
973       *"
974 "enable_$ac_useropt"
975 "*) ;;
976       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977          ac_unrecognized_sep=', ';;
978     esac
979     eval enable_$ac_useropt=no ;;
980
981   -docdir | --docdir | --docdi | --doc | --do)
982     ac_prev=docdir ;;
983   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984     docdir=$ac_optarg ;;
985
986   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987     ac_prev=dvidir ;;
988   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989     dvidir=$ac_optarg ;;
990
991   -enable-* | --enable-*)
992     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
993     # Reject names that are not valid shell variable names.
994     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
995       as_fn_error $? "invalid feature name: $ac_useropt"
996     ac_useropt_orig=$ac_useropt
997     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998     case $ac_user_opts in
999       *"
1000 "enable_$ac_useropt"
1001 "*) ;;
1002       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003          ac_unrecognized_sep=', ';;
1004     esac
1005     eval enable_$ac_useropt=\$ac_optarg ;;
1006
1007   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009   | --exec | --exe | --ex)
1010     ac_prev=exec_prefix ;;
1011   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013   | --exec=* | --exe=* | --ex=*)
1014     exec_prefix=$ac_optarg ;;
1015
1016   -gas | --gas | --ga | --g)
1017     # Obsolete; use --with-gas.
1018     with_gas=yes ;;
1019
1020   -help | --help | --hel | --he | -h)
1021     ac_init_help=long ;;
1022   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023     ac_init_help=recursive ;;
1024   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025     ac_init_help=short ;;
1026
1027   -host | --host | --hos | --ho)
1028     ac_prev=host_alias ;;
1029   -host=* | --host=* | --hos=* | --ho=*)
1030     host_alias=$ac_optarg ;;
1031
1032   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033     ac_prev=htmldir ;;
1034   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035   | --ht=*)
1036     htmldir=$ac_optarg ;;
1037
1038   -includedir | --includedir | --includedi | --included | --include \
1039   | --includ | --inclu | --incl | --inc)
1040     ac_prev=includedir ;;
1041   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042   | --includ=* | --inclu=* | --incl=* | --inc=*)
1043     includedir=$ac_optarg ;;
1044
1045   -infodir | --infodir | --infodi | --infod | --info | --inf)
1046     ac_prev=infodir ;;
1047   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1048     infodir=$ac_optarg ;;
1049
1050   -libdir | --libdir | --libdi | --libd)
1051     ac_prev=libdir ;;
1052   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1053     libdir=$ac_optarg ;;
1054
1055   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056   | --libexe | --libex | --libe)
1057     ac_prev=libexecdir ;;
1058   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059   | --libexe=* | --libex=* | --libe=*)
1060     libexecdir=$ac_optarg ;;
1061
1062   -localedir | --localedir | --localedi | --localed | --locale)
1063     ac_prev=localedir ;;
1064   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065     localedir=$ac_optarg ;;
1066
1067   -localstatedir | --localstatedir | --localstatedi | --localstated \
1068   | --localstate | --localstat | --localsta | --localst | --locals)
1069     ac_prev=localstatedir ;;
1070   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1071   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1072     localstatedir=$ac_optarg ;;
1073
1074   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075     ac_prev=mandir ;;
1076   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1077     mandir=$ac_optarg ;;
1078
1079   -nfp | --nfp | --nf)
1080     # Obsolete; use --without-fp.
1081     with_fp=no ;;
1082
1083   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1084   | --no-cr | --no-c | -n)
1085     no_create=yes ;;
1086
1087   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089     no_recursion=yes ;;
1090
1091   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093   | --oldin | --oldi | --old | --ol | --o)
1094     ac_prev=oldincludedir ;;
1095   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1098     oldincludedir=$ac_optarg ;;
1099
1100   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101     ac_prev=prefix ;;
1102   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1103     prefix=$ac_optarg ;;
1104
1105   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106   | --program-pre | --program-pr | --program-p)
1107     ac_prev=program_prefix ;;
1108   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1110     program_prefix=$ac_optarg ;;
1111
1112   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113   | --program-suf | --program-su | --program-s)
1114     ac_prev=program_suffix ;;
1115   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1117     program_suffix=$ac_optarg ;;
1118
1119   -program-transform-name | --program-transform-name \
1120   | --program-transform-nam | --program-transform-na \
1121   | --program-transform-n | --program-transform- \
1122   | --program-transform | --program-transfor \
1123   | --program-transfo | --program-transf \
1124   | --program-trans | --program-tran \
1125   | --progr-tra | --program-tr | --program-t)
1126     ac_prev=program_transform_name ;;
1127   -program-transform-name=* | --program-transform-name=* \
1128   | --program-transform-nam=* | --program-transform-na=* \
1129   | --program-transform-n=* | --program-transform-=* \
1130   | --program-transform=* | --program-transfor=* \
1131   | --program-transfo=* | --program-transf=* \
1132   | --program-trans=* | --program-tran=* \
1133   | --progr-tra=* | --program-tr=* | --program-t=*)
1134     program_transform_name=$ac_optarg ;;
1135
1136   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137     ac_prev=pdfdir ;;
1138   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139     pdfdir=$ac_optarg ;;
1140
1141   -psdir | --psdir | --psdi | --psd | --ps)
1142     ac_prev=psdir ;;
1143   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144     psdir=$ac_optarg ;;
1145
1146   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147   | -silent | --silent | --silen | --sile | --sil)
1148     silent=yes ;;
1149
1150   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1151     ac_prev=sbindir ;;
1152   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1153   | --sbi=* | --sb=*)
1154     sbindir=$ac_optarg ;;
1155
1156   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1157   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1158   | --sharedst | --shareds | --shared | --share | --shar \
1159   | --sha | --sh)
1160     ac_prev=sharedstatedir ;;
1161   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1162   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1163   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1164   | --sha=* | --sh=*)
1165     sharedstatedir=$ac_optarg ;;
1166
1167   -site | --site | --sit)
1168     ac_prev=site ;;
1169   -site=* | --site=* | --sit=*)
1170     site=$ac_optarg ;;
1171
1172   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1173     ac_prev=srcdir ;;
1174   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1175     srcdir=$ac_optarg ;;
1176
1177   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1178   | --syscon | --sysco | --sysc | --sys | --sy)
1179     ac_prev=sysconfdir ;;
1180   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1181   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1182     sysconfdir=$ac_optarg ;;
1183
1184   -target | --target | --targe | --targ | --tar | --ta | --t)
1185     ac_prev=target_alias ;;
1186   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1187     target_alias=$ac_optarg ;;
1188
1189   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1190     verbose=yes ;;
1191
1192   -version | --version | --versio | --versi | --vers | -V)
1193     ac_init_version=: ;;
1194
1195   -with-* | --with-*)
1196     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1197     # Reject names that are not valid shell variable names.
1198     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1199       as_fn_error $? "invalid package name: $ac_useropt"
1200     ac_useropt_orig=$ac_useropt
1201     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202     case $ac_user_opts in
1203       *"
1204 "with_$ac_useropt"
1205 "*) ;;
1206       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1207          ac_unrecognized_sep=', ';;
1208     esac
1209     eval with_$ac_useropt=\$ac_optarg ;;
1210
1211   -without-* | --without-*)
1212     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1213     # Reject names that are not valid shell variable names.
1214     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1215       as_fn_error $? "invalid package name: $ac_useropt"
1216     ac_useropt_orig=$ac_useropt
1217     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1218     case $ac_user_opts in
1219       *"
1220 "with_$ac_useropt"
1221 "*) ;;
1222       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1223          ac_unrecognized_sep=', ';;
1224     esac
1225     eval with_$ac_useropt=no ;;
1226
1227   --x)
1228     # Obsolete; use --with-x.
1229     with_x=yes ;;
1230
1231   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1232   | --x-incl | --x-inc | --x-in | --x-i)
1233     ac_prev=x_includes ;;
1234   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1235   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1236     x_includes=$ac_optarg ;;
1237
1238   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1239   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1240     ac_prev=x_libraries ;;
1241   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1242   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1243     x_libraries=$ac_optarg ;;
1244
1245   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1246 Try \`$0 --help' for more information"
1247     ;;
1248
1249   *=*)
1250     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1251     # Reject names that are not valid shell variable names.
1252     case $ac_envvar in #(
1253       '' | [0-9]* | *[!_$as_cr_alnum]* )
1254       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1255     esac
1256     eval $ac_envvar=\$ac_optarg
1257     export $ac_envvar ;;
1258
1259   *)
1260     # FIXME: should be removed in autoconf 3.0.
1261     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1262     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1263       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1264     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1265     ;;
1266
1267   esac
1268 done
1269
1270 if test -n "$ac_prev"; then
1271   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1272   as_fn_error $? "missing argument to $ac_option"
1273 fi
1274
1275 if test -n "$ac_unrecognized_opts"; then
1276   case $enable_option_checking in
1277     no) ;;
1278     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1279     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1280   esac
1281 fi
1282
1283 # Check all directory arguments for consistency.
1284 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1285                 datadir sysconfdir sharedstatedir localstatedir includedir \
1286                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1287                 libdir localedir mandir
1288 do
1289   eval ac_val=\$$ac_var
1290   # Remove trailing slashes.
1291   case $ac_val in
1292     */ )
1293       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1294       eval $ac_var=\$ac_val;;
1295   esac
1296   # Be sure to have absolute directory names.
1297   case $ac_val in
1298     [\\/$]* | ?:[\\/]* )  continue;;
1299     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1300   esac
1301   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1302 done
1303
1304 # There might be people who depend on the old broken behavior: `$host'
1305 # used to hold the argument of --host etc.
1306 # FIXME: To remove some day.
1307 build=$build_alias
1308 host=$host_alias
1309 target=$target_alias
1310
1311 # FIXME: To remove some day.
1312 if test "x$host_alias" != x; then
1313   if test "x$build_alias" = x; then
1314     cross_compiling=maybe
1315   elif test "x$build_alias" != "x$host_alias"; then
1316     cross_compiling=yes
1317   fi
1318 fi
1319
1320 ac_tool_prefix=
1321 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1322
1323 test "$silent" = yes && exec 6>/dev/null
1324
1325
1326 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1327 ac_ls_di=`ls -di .` &&
1328 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1329   as_fn_error $? "working directory cannot be determined"
1330 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1331   as_fn_error $? "pwd does not report name of working directory"
1332
1333
1334 # Find the source files, if location was not specified.
1335 if test -z "$srcdir"; then
1336   ac_srcdir_defaulted=yes
1337   # Try the directory containing this script, then the parent directory.
1338   ac_confdir=`$as_dirname -- "$as_myself" ||
1339 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1340          X"$as_myself" : 'X\(//\)[^/]' \| \
1341          X"$as_myself" : 'X\(//\)$' \| \
1342          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1343 $as_echo X"$as_myself" |
1344     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1345             s//\1/
1346             q
1347           }
1348           /^X\(\/\/\)[^/].*/{
1349             s//\1/
1350             q
1351           }
1352           /^X\(\/\/\)$/{
1353             s//\1/
1354             q
1355           }
1356           /^X\(\/\).*/{
1357             s//\1/
1358             q
1359           }
1360           s/.*/./; q'`
1361   srcdir=$ac_confdir
1362   if test ! -r "$srcdir/$ac_unique_file"; then
1363     srcdir=..
1364   fi
1365 else
1366   ac_srcdir_defaulted=no
1367 fi
1368 if test ! -r "$srcdir/$ac_unique_file"; then
1369   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1370   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1371 fi
1372 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1373 ac_abs_confdir=`(
1374         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1375         pwd)`
1376 # When building in place, set srcdir=.
1377 if test "$ac_abs_confdir" = "$ac_pwd"; then
1378   srcdir=.
1379 fi
1380 # Remove unnecessary trailing slashes from srcdir.
1381 # Double slashes in file names in object file debugging info
1382 # mess up M-x gdb in Emacs.
1383 case $srcdir in
1384 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1385 esac
1386 for ac_var in $ac_precious_vars; do
1387   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1388   eval ac_env_${ac_var}_value=\$${ac_var}
1389   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1390   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1391 done
1392
1393 #
1394 # Report the --help message.
1395 #
1396 if test "$ac_init_help" = "long"; then
1397   # Omit some internal or obsolete options to make the list less imposing.
1398   # This message is too long to be a string in the A/UX 3.1 sh.
1399   cat <<_ACEOF
1400 \`configure' configures unbound 1.5.8 to adapt to many kinds of systems.
1401
1402 Usage: $0 [OPTION]... [VAR=VALUE]...
1403
1404 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1405 VAR=VALUE.  See below for descriptions of some of the useful variables.
1406
1407 Defaults for the options are specified in brackets.
1408
1409 Configuration:
1410   -h, --help              display this help and exit
1411       --help=short        display options specific to this package
1412       --help=recursive    display the short help of all the included packages
1413   -V, --version           display version information and exit
1414   -q, --quiet, --silent   do not print \`checking ...' messages
1415       --cache-file=FILE   cache test results in FILE [disabled]
1416   -C, --config-cache      alias for \`--cache-file=config.cache'
1417   -n, --no-create         do not create output files
1418       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1419
1420 Installation directories:
1421   --prefix=PREFIX         install architecture-independent files in PREFIX
1422                           [$ac_default_prefix]
1423   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1424                           [PREFIX]
1425
1426 By default, \`make install' will install all the files in
1427 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1428 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1429 for instance \`--prefix=\$HOME'.
1430
1431 For better control, use the options below.
1432
1433 Fine tuning of the installation directories:
1434   --bindir=DIR            user executables [EPREFIX/bin]
1435   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1436   --libexecdir=DIR        program executables [EPREFIX/libexec]
1437   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1438   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1439   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1440   --libdir=DIR            object code libraries [EPREFIX/lib]
1441   --includedir=DIR        C header files [PREFIX/include]
1442   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1443   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1444   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1445   --infodir=DIR           info documentation [DATAROOTDIR/info]
1446   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1447   --mandir=DIR            man documentation [DATAROOTDIR/man]
1448   --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1449   --htmldir=DIR           html documentation [DOCDIR]
1450   --dvidir=DIR            dvi documentation [DOCDIR]
1451   --pdfdir=DIR            pdf documentation [DOCDIR]
1452   --psdir=DIR             ps documentation [DOCDIR]
1453 _ACEOF
1454
1455   cat <<\_ACEOF
1456
1457 System types:
1458   --build=BUILD     configure for building on BUILD [guessed]
1459   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1460 _ACEOF
1461 fi
1462
1463 if test -n "$ac_init_help"; then
1464   case $ac_init_help in
1465      short | recursive ) echo "Configuration of unbound 1.5.8:";;
1466    esac
1467   cat <<\_ACEOF
1468
1469 Optional Features:
1470   --disable-option-checking  ignore unrecognized --enable/--with options
1471   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1472   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1473   --enable-checking       Enable warnings, asserts, makefile-dependencies
1474   --enable-debug          same as enable-checking
1475   --disable-flto          Disable link-time optimization (gcc specific option)
1476   --enable-pie            Enable Position-Independent Executable (eg. to fully
1477                           benefit from ASLR, small performance penalty)
1478   --enable-relro-now      Enable full relocation binding at load-time (RELRO
1479                           NOW, to protect GOT and .dtor areas)
1480   --enable-shared[=PKGS]  build shared libraries [default=yes]
1481   --enable-static[=PKGS]  build static libraries [default=yes]
1482   --enable-fast-install[=PKGS]
1483                           optimize for fast installation [default=yes]
1484   --disable-libtool-lock  avoid locking (might break parallel builds)
1485   --disable-rpath         disable hardcoded rpath (default=enabled)
1486   --disable-largefile     omit support for large files
1487   --enable-alloc-checks   enable to memory allocation statistics, for debug
1488                           purposes
1489   --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1490                           purposes
1491   --enable-alloc-nonregional
1492                           enable nonregional allocs, slow but exposes regional
1493                           allocations to other memory purifiers, for debug
1494                           purposes
1495   --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1496   --disable-gost          Disable GOST support
1497   --disable-ecdsa         Disable ECDSA support
1498   --enable-event-api      Enable (experimental) libevent-based libunbound API
1499                           installed to unbound-event.h
1500   --enable-static-exe     enable to compile executables statically against
1501                           (event) libs, for debug purposes
1502   --enable-lock-checks    enable to check lock and unlock calls, for debug
1503                           purposes
1504   --enable-allsymbols     export all symbols from libunbound and link binaries
1505                           to it, smaller install size but libunbound export
1506                           table is polluted by internal symbols
1507   --enable-dnstap         Enable dnstap support (requires fstrm, protobuf-c)
1508
1509 Optional Packages:
1510   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1511   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1512   --with-conf-file=path   Pathname to the Unbound configuration file
1513   --with-run-dir=path     set default directory to chdir to (by default dir
1514                           part of cfg file)
1515   --with-chroot-dir=path  set default directory to chroot to (by default same
1516                           as run-dir)
1517   --with-share-dir=path   set default directory with shared data (by default
1518                           same as share/unbound)
1519   --with-pidfile=filename set default pathname to unbound pidfile (default
1520                           run-dir/unbound.pid)
1521   --with-rootkey-file=filename
1522                           set default pathname to root key file (default
1523                           run-dir/root.key). This file is read and written.
1524   --with-rootcert-file=filename
1525                           set default pathname to root update certificate file
1526                           (default run-dir/icannbundle.pem). This file need
1527                           not exist if you are content with the builtin.
1528   --with-username=user    set default user that unbound changes to (default
1529                           user is unbound)
1530   --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1531                           both]
1532   --with-aix-soname=aix|svr4|both
1533                           shared library versioning (aka "SONAME") variant to
1534                           provide on AIX, [default=aix].
1535   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1536   --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1537                           compiler's sysroot if not specified).
1538   --with-pthreads         use pthreads library, or --without-pthreads to
1539                           disable threading support.
1540   --with-solaris-threads  use solaris native thread library.
1541   --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1542                           (default=no)
1543   --with-pythonmodule     build Python module, or --without-pythonmodule to
1544                           disable script engine. (default=no)
1545   --with-nss=path         use libnss instead of openssl, installed at path.
1546   --with-nettle=path      use libnettle as crypto library, installed at path.
1547   --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1548                           /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1549                           /usr)
1550   --with-libevent=pathname
1551                           use libevent (will check /usr/local /opt/local
1552                           /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1553                           an explicit path). Slower, but allows use of large
1554                           outgoing port ranges.
1555   --with-libexpat=path    specify explicit path for libexpat.
1556   --with-dnstap-socket-path=pathname
1557                           set default dnstap socket path
1558   --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1559   --with-libfstrm=path    Path where libfstrm is installed, for dnstap
1560   --with-libunbound-only  do not build daemon and tool programs
1561
1562 Some influential environment variables:
1563   CC          C compiler command
1564   CFLAGS      C compiler flags
1565   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1566               nonstandard directory <lib dir>
1567   LIBS        libraries to pass to the linker, e.g. -l<library>
1568   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1569               you have headers in a nonstandard directory <include dir>
1570   CPP         C preprocessor
1571   YACC        The `Yet Another Compiler Compiler' implementation to use.
1572               Defaults to the first program found out of: `bison -y', `byacc',
1573               `yacc'.
1574   YFLAGS      The list of arguments that will be passed by default to $YACC.
1575               This script will default YFLAGS to the empty string to avoid a
1576               default value of `-d' given by some make applications.
1577   LT_SYS_LIBRARY_PATH
1578               User-defined run-time library search path.
1579   PYTHON_VERSION
1580               The installed Python version to use, for example '2.3'. This
1581               string will be appended to the Python interpreter canonical
1582               name.
1583
1584 Use these variables to override the choices made by `configure' or to help
1585 it to find libraries and programs with nonstandard names/locations.
1586
1587 Report bugs to <unbound-bugs@nlnetlabs.nl>.
1588 _ACEOF
1589 ac_status=$?
1590 fi
1591
1592 if test "$ac_init_help" = "recursive"; then
1593   # If there are subdirs, report their specific --help.
1594   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1595     test -d "$ac_dir" ||
1596       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1597       continue
1598     ac_builddir=.
1599
1600 case "$ac_dir" in
1601 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1602 *)
1603   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1604   # A ".." for each directory in $ac_dir_suffix.
1605   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1606   case $ac_top_builddir_sub in
1607   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1608   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1609   esac ;;
1610 esac
1611 ac_abs_top_builddir=$ac_pwd
1612 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1613 # for backward compatibility:
1614 ac_top_builddir=$ac_top_build_prefix
1615
1616 case $srcdir in
1617   .)  # We are building in place.
1618     ac_srcdir=.
1619     ac_top_srcdir=$ac_top_builddir_sub
1620     ac_abs_top_srcdir=$ac_pwd ;;
1621   [\\/]* | ?:[\\/]* )  # Absolute name.
1622     ac_srcdir=$srcdir$ac_dir_suffix;
1623     ac_top_srcdir=$srcdir
1624     ac_abs_top_srcdir=$srcdir ;;
1625   *) # Relative name.
1626     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1627     ac_top_srcdir=$ac_top_build_prefix$srcdir
1628     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1629 esac
1630 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1631
1632     cd "$ac_dir" || { ac_status=$?; continue; }
1633     # Check for guested configure.
1634     if test -f "$ac_srcdir/configure.gnu"; then
1635       echo &&
1636       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1637     elif test -f "$ac_srcdir/configure"; then
1638       echo &&
1639       $SHELL "$ac_srcdir/configure" --help=recursive
1640     else
1641       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1642     fi || ac_status=$?
1643     cd "$ac_pwd" || { ac_status=$?; break; }
1644   done
1645 fi
1646
1647 test -n "$ac_init_help" && exit $ac_status
1648 if $ac_init_version; then
1649   cat <<\_ACEOF
1650 unbound configure 1.5.8
1651 generated by GNU Autoconf 2.69
1652
1653 Copyright (C) 2012 Free Software Foundation, Inc.
1654 This configure script is free software; the Free Software Foundation
1655 gives unlimited permission to copy, distribute and modify it.
1656 _ACEOF
1657   exit
1658 fi
1659
1660 ## ------------------------ ##
1661 ## Autoconf initialization. ##
1662 ## ------------------------ ##
1663
1664 # ac_fn_c_try_compile LINENO
1665 # --------------------------
1666 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1667 ac_fn_c_try_compile ()
1668 {
1669   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1670   rm -f conftest.$ac_objext
1671   if { { ac_try="$ac_compile"
1672 case "(($ac_try" in
1673   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1674   *) ac_try_echo=$ac_try;;
1675 esac
1676 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1677 $as_echo "$ac_try_echo"; } >&5
1678   (eval "$ac_compile") 2>conftest.err
1679   ac_status=$?
1680   if test -s conftest.err; then
1681     grep -v '^ *+' conftest.err >conftest.er1
1682     cat conftest.er1 >&5
1683     mv -f conftest.er1 conftest.err
1684   fi
1685   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1686   test $ac_status = 0; } && {
1687          test -z "$ac_c_werror_flag" ||
1688          test ! -s conftest.err
1689        } && test -s conftest.$ac_objext; then :
1690   ac_retval=0
1691 else
1692   $as_echo "$as_me: failed program was:" >&5
1693 sed 's/^/| /' conftest.$ac_ext >&5
1694
1695         ac_retval=1
1696 fi
1697   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1698   as_fn_set_status $ac_retval
1699
1700 } # ac_fn_c_try_compile
1701
1702 # ac_fn_c_try_cpp LINENO
1703 # ----------------------
1704 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1705 ac_fn_c_try_cpp ()
1706 {
1707   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1708   if { { ac_try="$ac_cpp conftest.$ac_ext"
1709 case "(($ac_try" in
1710   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1711   *) ac_try_echo=$ac_try;;
1712 esac
1713 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1714 $as_echo "$ac_try_echo"; } >&5
1715   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1716   ac_status=$?
1717   if test -s conftest.err; then
1718     grep -v '^ *+' conftest.err >conftest.er1
1719     cat conftest.er1 >&5
1720     mv -f conftest.er1 conftest.err
1721   fi
1722   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1723   test $ac_status = 0; } > conftest.i && {
1724          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1725          test ! -s conftest.err
1726        }; then :
1727   ac_retval=0
1728 else
1729   $as_echo "$as_me: failed program was:" >&5
1730 sed 's/^/| /' conftest.$ac_ext >&5
1731
1732     ac_retval=1
1733 fi
1734   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1735   as_fn_set_status $ac_retval
1736
1737 } # ac_fn_c_try_cpp
1738
1739 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1740 # -------------------------------------------------------
1741 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1742 # the include files in INCLUDES and setting the cache variable VAR
1743 # accordingly.
1744 ac_fn_c_check_header_mongrel ()
1745 {
1746   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1747   if eval \${$3+:} false; then :
1748   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1749 $as_echo_n "checking for $2... " >&6; }
1750 if eval \${$3+:} false; then :
1751   $as_echo_n "(cached) " >&6
1752 fi
1753 eval ac_res=\$$3
1754                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1755 $as_echo "$ac_res" >&6; }
1756 else
1757   # Is the header compilable?
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1759 $as_echo_n "checking $2 usability... " >&6; }
1760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1761 /* end confdefs.h.  */
1762 $4
1763 #include <$2>
1764 _ACEOF
1765 if ac_fn_c_try_compile "$LINENO"; then :
1766   ac_header_compiler=yes
1767 else
1768   ac_header_compiler=no
1769 fi
1770 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1772 $as_echo "$ac_header_compiler" >&6; }
1773
1774 # Is the header present?
1775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1776 $as_echo_n "checking $2 presence... " >&6; }
1777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1778 /* end confdefs.h.  */
1779 #include <$2>
1780 _ACEOF
1781 if ac_fn_c_try_cpp "$LINENO"; then :
1782   ac_header_preproc=yes
1783 else
1784   ac_header_preproc=no
1785 fi
1786 rm -f conftest.err conftest.i conftest.$ac_ext
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1788 $as_echo "$ac_header_preproc" >&6; }
1789
1790 # So?  What about this header?
1791 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1792   yes:no: )
1793     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1794 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&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     ;;
1798   no:yes:* )
1799     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1800 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1801     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1802 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1803     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1804 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1805     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1806 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1807     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1808 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1809 ( $as_echo "## ---------------------------------------- ##
1810 ## Report this to unbound-bugs@nlnetlabs.nl ##
1811 ## ---------------------------------------- ##"
1812      ) | sed "s/^/$as_me: WARNING:     /" >&2
1813     ;;
1814 esac
1815   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1816 $as_echo_n "checking for $2... " >&6; }
1817 if eval \${$3+:} false; then :
1818   $as_echo_n "(cached) " >&6
1819 else
1820   eval "$3=\$ac_header_compiler"
1821 fi
1822 eval ac_res=\$$3
1823                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1824 $as_echo "$ac_res" >&6; }
1825 fi
1826   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1827
1828 } # ac_fn_c_check_header_mongrel
1829
1830 # ac_fn_c_try_run LINENO
1831 # ----------------------
1832 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1833 # that executables *can* be run.
1834 ac_fn_c_try_run ()
1835 {
1836   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1837   if { { ac_try="$ac_link"
1838 case "(($ac_try" in
1839   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1840   *) ac_try_echo=$ac_try;;
1841 esac
1842 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1843 $as_echo "$ac_try_echo"; } >&5
1844   (eval "$ac_link") 2>&5
1845   ac_status=$?
1846   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1847   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1848   { { case "(($ac_try" in
1849   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1850   *) ac_try_echo=$ac_try;;
1851 esac
1852 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1853 $as_echo "$ac_try_echo"; } >&5
1854   (eval "$ac_try") 2>&5
1855   ac_status=$?
1856   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1857   test $ac_status = 0; }; }; then :
1858   ac_retval=0
1859 else
1860   $as_echo "$as_me: program exited with status $ac_status" >&5
1861        $as_echo "$as_me: failed program was:" >&5
1862 sed 's/^/| /' conftest.$ac_ext >&5
1863
1864        ac_retval=$ac_status
1865 fi
1866   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1867   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1868   as_fn_set_status $ac_retval
1869
1870 } # ac_fn_c_try_run
1871
1872 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1873 # -------------------------------------------------------
1874 # Tests whether HEADER exists and can be compiled using the include files in
1875 # INCLUDES, setting the cache variable VAR accordingly.
1876 ac_fn_c_check_header_compile ()
1877 {
1878   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1879   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1880 $as_echo_n "checking for $2... " >&6; }
1881 if eval \${$3+:} false; then :
1882   $as_echo_n "(cached) " >&6
1883 else
1884   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1885 /* end confdefs.h.  */
1886 $4
1887 #include <$2>
1888 _ACEOF
1889 if ac_fn_c_try_compile "$LINENO"; then :
1890   eval "$3=yes"
1891 else
1892   eval "$3=no"
1893 fi
1894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1895 fi
1896 eval ac_res=\$$3
1897                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1898 $as_echo "$ac_res" >&6; }
1899   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1900
1901 } # ac_fn_c_check_header_compile
1902
1903 # ac_fn_c_try_link LINENO
1904 # -----------------------
1905 # Try to link conftest.$ac_ext, and return whether this succeeded.
1906 ac_fn_c_try_link ()
1907 {
1908   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1909   rm -f conftest.$ac_objext conftest$ac_exeext
1910   if { { ac_try="$ac_link"
1911 case "(($ac_try" in
1912   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1913   *) ac_try_echo=$ac_try;;
1914 esac
1915 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1916 $as_echo "$ac_try_echo"; } >&5
1917   (eval "$ac_link") 2>conftest.err
1918   ac_status=$?
1919   if test -s conftest.err; then
1920     grep -v '^ *+' conftest.err >conftest.er1
1921     cat conftest.er1 >&5
1922     mv -f conftest.er1 conftest.err
1923   fi
1924   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1925   test $ac_status = 0; } && {
1926          test -z "$ac_c_werror_flag" ||
1927          test ! -s conftest.err
1928        } && test -s conftest$ac_exeext && {
1929          test "$cross_compiling" = yes ||
1930          test -x conftest$ac_exeext
1931        }; then :
1932   ac_retval=0
1933 else
1934   $as_echo "$as_me: failed program was:" >&5
1935 sed 's/^/| /' conftest.$ac_ext >&5
1936
1937         ac_retval=1
1938 fi
1939   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1940   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1941   # interfere with the next link command; also delete a directory that is
1942   # left behind by Apple's compiler.  We do this before executing the actions.
1943   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1944   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1945   as_fn_set_status $ac_retval
1946
1947 } # ac_fn_c_try_link
1948
1949 # ac_fn_c_check_func LINENO FUNC VAR
1950 # ----------------------------------
1951 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1952 ac_fn_c_check_func ()
1953 {
1954   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1956 $as_echo_n "checking for $2... " >&6; }
1957 if eval \${$3+:} false; then :
1958   $as_echo_n "(cached) " >&6
1959 else
1960   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1961 /* end confdefs.h.  */
1962 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1963    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1964 #define $2 innocuous_$2
1965
1966 /* System header to define __stub macros and hopefully few prototypes,
1967     which can conflict with char $2 (); below.
1968     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1969     <limits.h> exists even on freestanding compilers.  */
1970
1971 #ifdef __STDC__
1972 # include <limits.h>
1973 #else
1974 # include <assert.h>
1975 #endif
1976
1977 #undef $2
1978
1979 /* Override any GCC internal prototype to avoid an error.
1980    Use char because int might match the return type of a GCC
1981    builtin and then its argument prototype would still apply.  */
1982 #ifdef __cplusplus
1983 extern "C"
1984 #endif
1985 char $2 ();
1986 /* The GNU C library defines this for functions which it implements
1987     to always fail with ENOSYS.  Some functions are actually named
1988     something starting with __ and the normal name is an alias.  */
1989 #if defined __stub_$2 || defined __stub___$2
1990 choke me
1991 #endif
1992
1993 int
1994 main ()
1995 {
1996 return $2 ();
1997   ;
1998   return 0;
1999 }
2000 _ACEOF
2001 if ac_fn_c_try_link "$LINENO"; then :
2002   eval "$3=yes"
2003 else
2004   eval "$3=no"
2005 fi
2006 rm -f core conftest.err conftest.$ac_objext \
2007     conftest$ac_exeext conftest.$ac_ext
2008 fi
2009 eval ac_res=\$$3
2010                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2011 $as_echo "$ac_res" >&6; }
2012   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2013
2014 } # ac_fn_c_check_func
2015
2016 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2017 # -------------------------------------------
2018 # Tests whether TYPE exists after having included INCLUDES, setting cache
2019 # variable VAR accordingly.
2020 ac_fn_c_check_type ()
2021 {
2022   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2023   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2024 $as_echo_n "checking for $2... " >&6; }
2025 if eval \${$3+:} false; then :
2026   $as_echo_n "(cached) " >&6
2027 else
2028   eval "$3=no"
2029   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2030 /* end confdefs.h.  */
2031 $4
2032 int
2033 main ()
2034 {
2035 if (sizeof ($2))
2036          return 0;
2037   ;
2038   return 0;
2039 }
2040 _ACEOF
2041 if ac_fn_c_try_compile "$LINENO"; then :
2042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043 /* end confdefs.h.  */
2044 $4
2045 int
2046 main ()
2047 {
2048 if (sizeof (($2)))
2049             return 0;
2050   ;
2051   return 0;
2052 }
2053 _ACEOF
2054 if ac_fn_c_try_compile "$LINENO"; then :
2055
2056 else
2057   eval "$3=yes"
2058 fi
2059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2060 fi
2061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2062 fi
2063 eval ac_res=\$$3
2064                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2065 $as_echo "$ac_res" >&6; }
2066   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2067
2068 } # ac_fn_c_check_type
2069
2070 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2071 # --------------------------------------------
2072 # Tries to find the compile-time value of EXPR in a program that includes
2073 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2074 # computed
2075 ac_fn_c_compute_int ()
2076 {
2077   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2078   if test "$cross_compiling" = yes; then
2079     # Depending upon the size, compute the lo and hi bounds.
2080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2081 /* end confdefs.h.  */
2082 $4
2083 int
2084 main ()
2085 {
2086 static int test_array [1 - 2 * !(($2) >= 0)];
2087 test_array [0] = 0;
2088 return test_array [0];
2089
2090   ;
2091   return 0;
2092 }
2093 _ACEOF
2094 if ac_fn_c_try_compile "$LINENO"; then :
2095   ac_lo=0 ac_mid=0
2096   while :; do
2097     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2098 /* end confdefs.h.  */
2099 $4
2100 int
2101 main ()
2102 {
2103 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2104 test_array [0] = 0;
2105 return test_array [0];
2106
2107   ;
2108   return 0;
2109 }
2110 _ACEOF
2111 if ac_fn_c_try_compile "$LINENO"; then :
2112   ac_hi=$ac_mid; break
2113 else
2114   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2115                         if test $ac_lo -le $ac_mid; then
2116                           ac_lo= ac_hi=
2117                           break
2118                         fi
2119                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2120 fi
2121 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122   done
2123 else
2124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125 /* end confdefs.h.  */
2126 $4
2127 int
2128 main ()
2129 {
2130 static int test_array [1 - 2 * !(($2) < 0)];
2131 test_array [0] = 0;
2132 return test_array [0];
2133
2134   ;
2135   return 0;
2136 }
2137 _ACEOF
2138 if ac_fn_c_try_compile "$LINENO"; then :
2139   ac_hi=-1 ac_mid=-1
2140   while :; do
2141     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2142 /* end confdefs.h.  */
2143 $4
2144 int
2145 main ()
2146 {
2147 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2148 test_array [0] = 0;
2149 return test_array [0];
2150
2151   ;
2152   return 0;
2153 }
2154 _ACEOF
2155 if ac_fn_c_try_compile "$LINENO"; then :
2156   ac_lo=$ac_mid; break
2157 else
2158   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2159                         if test $ac_mid -le $ac_hi; then
2160                           ac_lo= ac_hi=
2161                           break
2162                         fi
2163                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2164 fi
2165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2166   done
2167 else
2168   ac_lo= ac_hi=
2169 fi
2170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2171 fi
2172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2173 # Binary search between lo and hi bounds.
2174 while test "x$ac_lo" != "x$ac_hi"; do
2175   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2176   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177 /* end confdefs.h.  */
2178 $4
2179 int
2180 main ()
2181 {
2182 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2183 test_array [0] = 0;
2184 return test_array [0];
2185
2186   ;
2187   return 0;
2188 }
2189 _ACEOF
2190 if ac_fn_c_try_compile "$LINENO"; then :
2191   ac_hi=$ac_mid
2192 else
2193   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2194 fi
2195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2196 done
2197 case $ac_lo in #((
2198 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2199 '') ac_retval=1 ;;
2200 esac
2201   else
2202     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203 /* end confdefs.h.  */
2204 $4
2205 static long int longval () { return $2; }
2206 static unsigned long int ulongval () { return $2; }
2207 #include <stdio.h>
2208 #include <stdlib.h>
2209 int
2210 main ()
2211 {
2212
2213   FILE *f = fopen ("conftest.val", "w");
2214   if (! f)
2215     return 1;
2216   if (($2) < 0)
2217     {
2218       long int i = longval ();
2219       if (i != ($2))
2220         return 1;
2221       fprintf (f, "%ld", i);
2222     }
2223   else
2224     {
2225       unsigned long int i = ulongval ();
2226       if (i != ($2))
2227         return 1;
2228       fprintf (f, "%lu", i);
2229     }
2230   /* Do not output a trailing newline, as this causes \r\n confusion
2231      on some platforms.  */
2232   return ferror (f) || fclose (f) != 0;
2233
2234   ;
2235   return 0;
2236 }
2237 _ACEOF
2238 if ac_fn_c_try_run "$LINENO"; then :
2239   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2240 else
2241   ac_retval=1
2242 fi
2243 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2244   conftest.$ac_objext conftest.beam conftest.$ac_ext
2245 rm -f conftest.val
2246
2247   fi
2248   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2249   as_fn_set_status $ac_retval
2250
2251 } # ac_fn_c_compute_int
2252
2253 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2254 # ---------------------------------------------
2255 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2256 # accordingly.
2257 ac_fn_c_check_decl ()
2258 {
2259   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2260   as_decl_name=`echo $2|sed 's/ *(.*//'`
2261   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2262   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2263 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2264 if eval \${$3+:} false; then :
2265   $as_echo_n "(cached) " >&6
2266 else
2267   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2268 /* end confdefs.h.  */
2269 $4
2270 int
2271 main ()
2272 {
2273 #ifndef $as_decl_name
2274 #ifdef __cplusplus
2275   (void) $as_decl_use;
2276 #else
2277   (void) $as_decl_name;
2278 #endif
2279 #endif
2280
2281   ;
2282   return 0;
2283 }
2284 _ACEOF
2285 if ac_fn_c_try_compile "$LINENO"; then :
2286   eval "$3=yes"
2287 else
2288   eval "$3=no"
2289 fi
2290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2291 fi
2292 eval ac_res=\$$3
2293                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2294 $as_echo "$ac_res" >&6; }
2295   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2296
2297 } # ac_fn_c_check_decl
2298
2299 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2300 # ----------------------------------------------------
2301 # Tries to find if the field MEMBER exists in type AGGR, after including
2302 # INCLUDES, setting cache variable VAR accordingly.
2303 ac_fn_c_check_member ()
2304 {
2305   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2306   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2307 $as_echo_n "checking for $2.$3... " >&6; }
2308 if eval \${$4+:} false; then :
2309   $as_echo_n "(cached) " >&6
2310 else
2311   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312 /* end confdefs.h.  */
2313 $5
2314 int
2315 main ()
2316 {
2317 static $2 ac_aggr;
2318 if (ac_aggr.$3)
2319 return 0;
2320   ;
2321   return 0;
2322 }
2323 _ACEOF
2324 if ac_fn_c_try_compile "$LINENO"; then :
2325   eval "$4=yes"
2326 else
2327   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2328 /* end confdefs.h.  */
2329 $5
2330 int
2331 main ()
2332 {
2333 static $2 ac_aggr;
2334 if (sizeof ac_aggr.$3)
2335 return 0;
2336   ;
2337   return 0;
2338 }
2339 _ACEOF
2340 if ac_fn_c_try_compile "$LINENO"; then :
2341   eval "$4=yes"
2342 else
2343   eval "$4=no"
2344 fi
2345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346 fi
2347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2348 fi
2349 eval ac_res=\$$4
2350                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2351 $as_echo "$ac_res" >&6; }
2352   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2353
2354 } # ac_fn_c_check_member
2355 cat >config.log <<_ACEOF
2356 This file contains any messages produced by compilers while
2357 running configure, to aid debugging if configure makes a mistake.
2358
2359 It was created by unbound $as_me 1.5.8, which was
2360 generated by GNU Autoconf 2.69.  Invocation command line was
2361
2362   $ $0 $@
2363
2364 _ACEOF
2365 exec 5>>config.log
2366 {
2367 cat <<_ASUNAME
2368 ## --------- ##
2369 ## Platform. ##
2370 ## --------- ##
2371
2372 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2373 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2374 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2375 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2376 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2377
2378 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2379 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2380
2381 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2382 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2383 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2384 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2385 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2386 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2387 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2388
2389 _ASUNAME
2390
2391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2392 for as_dir in $PATH
2393 do
2394   IFS=$as_save_IFS
2395   test -z "$as_dir" && as_dir=.
2396     $as_echo "PATH: $as_dir"
2397   done
2398 IFS=$as_save_IFS
2399
2400 } >&5
2401
2402 cat >&5 <<_ACEOF
2403
2404
2405 ## ----------- ##
2406 ## Core tests. ##
2407 ## ----------- ##
2408
2409 _ACEOF
2410
2411
2412 # Keep a trace of the command line.
2413 # Strip out --no-create and --no-recursion so they do not pile up.
2414 # Strip out --silent because we don't want to record it for future runs.
2415 # Also quote any args containing shell meta-characters.
2416 # Make two passes to allow for proper duplicate-argument suppression.
2417 ac_configure_args=
2418 ac_configure_args0=
2419 ac_configure_args1=
2420 ac_must_keep_next=false
2421 for ac_pass in 1 2
2422 do
2423   for ac_arg
2424   do
2425     case $ac_arg in
2426     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2427     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2428     | -silent | --silent | --silen | --sile | --sil)
2429       continue ;;
2430     *\'*)
2431       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2432     esac
2433     case $ac_pass in
2434     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2435     2)
2436       as_fn_append ac_configure_args1 " '$ac_arg'"
2437       if test $ac_must_keep_next = true; then
2438         ac_must_keep_next=false # Got value, back to normal.
2439       else
2440         case $ac_arg in
2441           *=* | --config-cache | -C | -disable-* | --disable-* \
2442           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2443           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2444           | -with-* | --with-* | -without-* | --without-* | --x)
2445             case "$ac_configure_args0 " in
2446               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2447             esac
2448             ;;
2449           -* ) ac_must_keep_next=true ;;
2450         esac
2451       fi
2452       as_fn_append ac_configure_args " '$ac_arg'"
2453       ;;
2454     esac
2455   done
2456 done
2457 { ac_configure_args0=; unset ac_configure_args0;}
2458 { ac_configure_args1=; unset ac_configure_args1;}
2459
2460 # When interrupted or exit'd, cleanup temporary files, and complete
2461 # config.log.  We remove comments because anyway the quotes in there
2462 # would cause problems or look ugly.
2463 # WARNING: Use '\'' to represent an apostrophe within the trap.
2464 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2465 trap 'exit_status=$?
2466   # Save into config.log some information that might help in debugging.
2467   {
2468     echo
2469
2470     $as_echo "## ---------------- ##
2471 ## Cache variables. ##
2472 ## ---------------- ##"
2473     echo
2474     # The following way of writing the cache mishandles newlines in values,
2475 (
2476   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2477     eval ac_val=\$$ac_var
2478     case $ac_val in #(
2479     *${as_nl}*)
2480       case $ac_var in #(
2481       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2482 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2483       esac
2484       case $ac_var in #(
2485       _ | IFS | as_nl) ;; #(
2486       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2487       *) { eval $ac_var=; unset $ac_var;} ;;
2488       esac ;;
2489     esac
2490   done
2491   (set) 2>&1 |
2492     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2493     *${as_nl}ac_space=\ *)
2494       sed -n \
2495         "s/'\''/'\''\\\\'\'''\''/g;
2496           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2497       ;; #(
2498     *)
2499       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2500       ;;
2501     esac |
2502     sort
2503 )
2504     echo
2505
2506     $as_echo "## ----------------- ##
2507 ## Output variables. ##
2508 ## ----------------- ##"
2509     echo
2510     for ac_var in $ac_subst_vars
2511     do
2512       eval ac_val=\$$ac_var
2513       case $ac_val in
2514       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2515       esac
2516       $as_echo "$ac_var='\''$ac_val'\''"
2517     done | sort
2518     echo
2519
2520     if test -n "$ac_subst_files"; then
2521       $as_echo "## ------------------- ##
2522 ## File substitutions. ##
2523 ## ------------------- ##"
2524       echo
2525       for ac_var in $ac_subst_files
2526       do
2527         eval ac_val=\$$ac_var
2528         case $ac_val in
2529         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2530         esac
2531         $as_echo "$ac_var='\''$ac_val'\''"
2532       done | sort
2533       echo
2534     fi
2535
2536     if test -s confdefs.h; then
2537       $as_echo "## ----------- ##
2538 ## confdefs.h. ##
2539 ## ----------- ##"
2540       echo
2541       cat confdefs.h
2542       echo
2543     fi
2544     test "$ac_signal" != 0 &&
2545       $as_echo "$as_me: caught signal $ac_signal"
2546     $as_echo "$as_me: exit $exit_status"
2547   } >&5
2548   rm -f core *.core core.conftest.* &&
2549     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2550     exit $exit_status
2551 ' 0
2552 for ac_signal in 1 2 13 15; do
2553   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2554 done
2555 ac_signal=0
2556
2557 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2558 rm -f -r conftest* confdefs.h
2559
2560 $as_echo "/* confdefs.h */" > confdefs.h
2561
2562 # Predefined preprocessor variables.
2563
2564 cat >>confdefs.h <<_ACEOF
2565 #define PACKAGE_NAME "$PACKAGE_NAME"
2566 _ACEOF
2567
2568 cat >>confdefs.h <<_ACEOF
2569 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2570 _ACEOF
2571
2572 cat >>confdefs.h <<_ACEOF
2573 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2574 _ACEOF
2575
2576 cat >>confdefs.h <<_ACEOF
2577 #define PACKAGE_STRING "$PACKAGE_STRING"
2578 _ACEOF
2579
2580 cat >>confdefs.h <<_ACEOF
2581 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2582 _ACEOF
2583
2584 cat >>confdefs.h <<_ACEOF
2585 #define PACKAGE_URL "$PACKAGE_URL"
2586 _ACEOF
2587
2588
2589 # Let the site file select an alternate cache file if it wants to.
2590 # Prefer an explicitly selected file to automatically selected ones.
2591 ac_site_file1=NONE
2592 ac_site_file2=NONE
2593 if test -n "$CONFIG_SITE"; then
2594   # We do not want a PATH search for config.site.
2595   case $CONFIG_SITE in #((
2596     -*)  ac_site_file1=./$CONFIG_SITE;;
2597     */*) ac_site_file1=$CONFIG_SITE;;
2598     *)   ac_site_file1=./$CONFIG_SITE;;
2599   esac
2600 elif test "x$prefix" != xNONE; then
2601   ac_site_file1=$prefix/share/config.site
2602   ac_site_file2=$prefix/etc/config.site
2603 else
2604   ac_site_file1=$ac_default_prefix/share/config.site
2605   ac_site_file2=$ac_default_prefix/etc/config.site
2606 fi
2607 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2608 do
2609   test "x$ac_site_file" = xNONE && continue
2610   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2611     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2612 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2613     sed 's/^/| /' "$ac_site_file" >&5
2614     . "$ac_site_file" \
2615       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2616 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2617 as_fn_error $? "failed to load site script $ac_site_file
2618 See \`config.log' for more details" "$LINENO" 5; }
2619   fi
2620 done
2621
2622 if test -r "$cache_file"; then
2623   # Some versions of bash will fail to source /dev/null (special files
2624   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2625   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2626     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2627 $as_echo "$as_me: loading cache $cache_file" >&6;}
2628     case $cache_file in
2629       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2630       *)                      . "./$cache_file";;
2631     esac
2632   fi
2633 else
2634   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2635 $as_echo "$as_me: creating cache $cache_file" >&6;}
2636   >$cache_file
2637 fi
2638
2639 # Check that the precious variables saved in the cache have kept the same
2640 # value.
2641 ac_cache_corrupted=false
2642 for ac_var in $ac_precious_vars; do
2643   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2644   eval ac_new_set=\$ac_env_${ac_var}_set
2645   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2646   eval ac_new_val=\$ac_env_${ac_var}_value
2647   case $ac_old_set,$ac_new_set in
2648     set,)
2649       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2650 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2651       ac_cache_corrupted=: ;;
2652     ,set)
2653       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2654 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2655       ac_cache_corrupted=: ;;
2656     ,);;
2657     *)
2658       if test "x$ac_old_val" != "x$ac_new_val"; then
2659         # differences in whitespace do not lead to failure.
2660         ac_old_val_w=`echo x $ac_old_val`
2661         ac_new_val_w=`echo x $ac_new_val`
2662         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2663           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2664 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2665           ac_cache_corrupted=:
2666         else
2667           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2668 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2669           eval $ac_var=\$ac_old_val
2670         fi
2671         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2672 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2673         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2674 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2675       fi;;
2676   esac
2677   # Pass precious variables to config.status.
2678   if test "$ac_new_set" = set; then
2679     case $ac_new_val in
2680     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2681     *) ac_arg=$ac_var=$ac_new_val ;;
2682     esac
2683     case " $ac_configure_args " in
2684       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2685       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2686     esac
2687   fi
2688 done
2689 if $ac_cache_corrupted; then
2690   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2691 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2692   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2693 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2694   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2695 fi
2696 ## -------------------- ##
2697 ## Main body of script. ##
2698 ## -------------------- ##
2699
2700 ac_ext=c
2701 ac_cpp='$CPP $CPPFLAGS'
2702 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2703 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2704 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2705
2706
2707 UNBOUND_VERSION_MAJOR=1
2708
2709 UNBOUND_VERSION_MINOR=5
2710
2711 UNBOUND_VERSION_MICRO=8
2712
2713
2714 LIBUNBOUND_CURRENT=6
2715 LIBUNBOUND_REVISION=0
2716 LIBUNBOUND_AGE=4
2717 # 1.0.0 had 0:12:0
2718 # 1.0.1 had 0:13:0
2719 # 1.0.2 had 0:14:0
2720 # 1.1.0 had 0:15:0
2721 # 1.1.1 had 0:16:0
2722 # 1.2.0 had 0:17:0
2723 # 1.2.1 had 0:18:0
2724 # 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
2725 # 1.3.1 had 1:1:0
2726 # 1.3.2 had 1:2:0
2727 # 1.3.3 had 1:3:0
2728 # 1.3.4 had 1:4:0
2729 # 1.4.0-snapshots had 1:5:0
2730 # 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
2731 # 1.4.1 had 2:1:0
2732 # 1.4.2 had 2:2:0
2733 # 1.4.3 had 2:3:0
2734 # 1.4.4 had 2:4:0
2735 # 1.4.5 had 2:5:0
2736 # 1.4.6 had 2:6:0
2737 # 1.4.7 had 2:7:0
2738 # 1.4.8 had 2:8:0
2739 # 1.4.9 had 2:9:0
2740 # 1.4.10 had 2:10:0
2741 # 1.4.11 had 2:11:0
2742 # 1.4.12 had 2:12:0
2743 # 1.4.13 had 2:13:0
2744 # and 1.4.13p1 and 1.4.13.p2
2745 # 1.4.14 had 2:14:0
2746 # 1.4.15 had 3:0:1 # adds ub_version()
2747 # 1.4.16 had 3:1:1
2748 # 1.4.17 had 3:2:1
2749 # 1.4.18 had 3:3:1
2750 # 1.4.19 had 3:4:1
2751 # 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
2752 # 1.4.21 had 4:1:2
2753 # 1.4.22 had 4:1:2
2754 # 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2755 # 1.5.1 had 5:3:3
2756 # 1.5.2 had 5:5:3
2757 # 1.5.3 had 5:6:3
2758 # 1.5.4 had 5:7:3
2759 # 1.5.5 had 5:8:3
2760 # 1.5.6 had 5:9:3
2761 # 1.5.7 had 5:10:3
2762 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
2763
2764 #   Current  -- the number of the binary API that we're implementing
2765 #   Revision -- which iteration of the implementation of the binary
2766 #               API are we supplying?
2767 #   Age      -- How many previous binary API versions do we also
2768 #               support?
2769 #
2770 # If we release a new version that does not change the binary API,
2771 # increment Revision.
2772 #
2773 # If we release a new version that changes the binary API, but does
2774 # not break programs compiled against the old binary API, increment
2775 # Current and Age.  Set Revision to 0, since this is the first
2776 # implementation of the new API.
2777 #
2778 # Otherwise, we're changing the binary API and breaking bakward
2779 # compatibility with old binaries.  Increment Current.  Set Age to 0,
2780 # since we're backward compatible with no previous APIs.  Set Revision
2781 # to 0 too.
2782
2783
2784
2785
2786 CFLAGS="$CFLAGS"
2787 ac_ext=c
2788 ac_cpp='$CPP $CPPFLAGS'
2789 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2790 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2791 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2792 if test -n "$ac_tool_prefix"; then
2793   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2794 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2796 $as_echo_n "checking for $ac_word... " >&6; }
2797 if ${ac_cv_prog_CC+:} false; then :
2798   $as_echo_n "(cached) " >&6
2799 else
2800   if test -n "$CC"; then
2801   ac_cv_prog_CC="$CC" # Let the user override the test.
2802 else
2803 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2804 for as_dir in $PATH
2805 do
2806   IFS=$as_save_IFS
2807   test -z "$as_dir" && as_dir=.
2808     for ac_exec_ext in '' $ac_executable_extensions; do
2809   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2810     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2811     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2812     break 2
2813   fi
2814 done
2815   done
2816 IFS=$as_save_IFS
2817
2818 fi
2819 fi
2820 CC=$ac_cv_prog_CC
2821 if test -n "$CC"; then
2822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2823 $as_echo "$CC" >&6; }
2824 else
2825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2826 $as_echo "no" >&6; }
2827 fi
2828
2829
2830 fi
2831 if test -z "$ac_cv_prog_CC"; then
2832   ac_ct_CC=$CC
2833   # Extract the first word of "gcc", so it can be a program name with args.
2834 set dummy gcc; ac_word=$2
2835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2836 $as_echo_n "checking for $ac_word... " >&6; }
2837 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2838   $as_echo_n "(cached) " >&6
2839 else
2840   if test -n "$ac_ct_CC"; then
2841   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2842 else
2843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2844 for as_dir in $PATH
2845 do
2846   IFS=$as_save_IFS
2847   test -z "$as_dir" && as_dir=.
2848     for ac_exec_ext in '' $ac_executable_extensions; do
2849   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2850     ac_cv_prog_ac_ct_CC="gcc"
2851     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2852     break 2
2853   fi
2854 done
2855   done
2856 IFS=$as_save_IFS
2857
2858 fi
2859 fi
2860 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2861 if test -n "$ac_ct_CC"; then
2862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2863 $as_echo "$ac_ct_CC" >&6; }
2864 else
2865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2866 $as_echo "no" >&6; }
2867 fi
2868
2869   if test "x$ac_ct_CC" = x; then
2870     CC=""
2871   else
2872     case $cross_compiling:$ac_tool_warned in
2873 yes:)
2874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2875 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2876 ac_tool_warned=yes ;;
2877 esac
2878     CC=$ac_ct_CC
2879   fi
2880 else
2881   CC="$ac_cv_prog_CC"
2882 fi
2883
2884 if test -z "$CC"; then
2885           if test -n "$ac_tool_prefix"; then
2886     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2887 set dummy ${ac_tool_prefix}cc; ac_word=$2
2888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2889 $as_echo_n "checking for $ac_word... " >&6; }
2890 if ${ac_cv_prog_CC+:} false; then :
2891   $as_echo_n "(cached) " >&6
2892 else
2893   if test -n "$CC"; then
2894   ac_cv_prog_CC="$CC" # Let the user override the test.
2895 else
2896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2897 for as_dir in $PATH
2898 do
2899   IFS=$as_save_IFS
2900   test -z "$as_dir" && as_dir=.
2901     for ac_exec_ext in '' $ac_executable_extensions; do
2902   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2903     ac_cv_prog_CC="${ac_tool_prefix}cc"
2904     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2905     break 2
2906   fi
2907 done
2908   done
2909 IFS=$as_save_IFS
2910
2911 fi
2912 fi
2913 CC=$ac_cv_prog_CC
2914 if test -n "$CC"; then
2915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2916 $as_echo "$CC" >&6; }
2917 else
2918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2919 $as_echo "no" >&6; }
2920 fi
2921
2922
2923   fi
2924 fi
2925 if test -z "$CC"; then
2926   # Extract the first word of "cc", so it can be a program name with args.
2927 set dummy cc; ac_word=$2
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2929 $as_echo_n "checking for $ac_word... " >&6; }
2930 if ${ac_cv_prog_CC+:} false; then :
2931   $as_echo_n "(cached) " >&6
2932 else
2933   if test -n "$CC"; then
2934   ac_cv_prog_CC="$CC" # Let the user override the test.
2935 else
2936   ac_prog_rejected=no
2937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2938 for as_dir in $PATH
2939 do
2940   IFS=$as_save_IFS
2941   test -z "$as_dir" && as_dir=.
2942     for ac_exec_ext in '' $ac_executable_extensions; do
2943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2944     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2945        ac_prog_rejected=yes
2946        continue
2947      fi
2948     ac_cv_prog_CC="cc"
2949     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2950     break 2
2951   fi
2952 done
2953   done
2954 IFS=$as_save_IFS
2955
2956 if test $ac_prog_rejected = yes; then
2957   # We found a bogon in the path, so make sure we never use it.
2958   set dummy $ac_cv_prog_CC
2959   shift
2960   if test $# != 0; then
2961     # We chose a different compiler from the bogus one.
2962     # However, it has the same basename, so the bogon will be chosen
2963     # first if we set CC to just the basename; use the full file name.
2964     shift
2965     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2966   fi
2967 fi
2968 fi
2969 fi
2970 CC=$ac_cv_prog_CC
2971 if test -n "$CC"; then
2972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2973 $as_echo "$CC" >&6; }
2974 else
2975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2976 $as_echo "no" >&6; }
2977 fi
2978
2979
2980 fi
2981 if test -z "$CC"; then
2982   if test -n "$ac_tool_prefix"; then
2983   for ac_prog in cl.exe
2984   do
2985     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2986 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2988 $as_echo_n "checking for $ac_word... " >&6; }
2989 if ${ac_cv_prog_CC+:} false; then :
2990   $as_echo_n "(cached) " >&6
2991 else
2992   if test -n "$CC"; then
2993   ac_cv_prog_CC="$CC" # Let the user override the test.
2994 else
2995 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2996 for as_dir in $PATH
2997 do
2998   IFS=$as_save_IFS
2999   test -z "$as_dir" && as_dir=.
3000     for ac_exec_ext in '' $ac_executable_extensions; do
3001   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3002     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3003     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3004     break 2
3005   fi
3006 done
3007   done
3008 IFS=$as_save_IFS
3009
3010 fi
3011 fi
3012 CC=$ac_cv_prog_CC
3013 if test -n "$CC"; then
3014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3015 $as_echo "$CC" >&6; }
3016 else
3017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3018 $as_echo "no" >&6; }
3019 fi
3020
3021
3022     test -n "$CC" && break
3023   done
3024 fi
3025 if test -z "$CC"; then
3026   ac_ct_CC=$CC
3027   for ac_prog in cl.exe
3028 do
3029   # Extract the first word of "$ac_prog", so it can be a program name with args.
3030 set dummy $ac_prog; ac_word=$2
3031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3032 $as_echo_n "checking for $ac_word... " >&6; }
3033 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3034   $as_echo_n "(cached) " >&6
3035 else
3036   if test -n "$ac_ct_CC"; then
3037   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3038 else
3039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3040 for as_dir in $PATH
3041 do
3042   IFS=$as_save_IFS
3043   test -z "$as_dir" && as_dir=.
3044     for ac_exec_ext in '' $ac_executable_extensions; do
3045   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3046     ac_cv_prog_ac_ct_CC="$ac_prog"
3047     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3048     break 2
3049   fi
3050 done
3051   done
3052 IFS=$as_save_IFS
3053
3054 fi
3055 fi
3056 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3057 if test -n "$ac_ct_CC"; then
3058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3059 $as_echo "$ac_ct_CC" >&6; }
3060 else
3061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3062 $as_echo "no" >&6; }
3063 fi
3064
3065
3066   test -n "$ac_ct_CC" && break
3067 done
3068
3069   if test "x$ac_ct_CC" = x; then
3070     CC=""
3071   else
3072     case $cross_compiling:$ac_tool_warned in
3073 yes:)
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3075 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3076 ac_tool_warned=yes ;;
3077 esac
3078     CC=$ac_ct_CC
3079   fi
3080 fi
3081
3082 fi
3083
3084
3085 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3086 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3087 as_fn_error $? "no acceptable C compiler found in \$PATH
3088 See \`config.log' for more details" "$LINENO" 5; }
3089
3090 # Provide some information about the compiler.
3091 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3092 set X $ac_compile
3093 ac_compiler=$2
3094 for ac_option in --version -v -V -qversion; do
3095   { { ac_try="$ac_compiler $ac_option >&5"
3096 case "(($ac_try" in
3097   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3098   *) ac_try_echo=$ac_try;;
3099 esac
3100 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3101 $as_echo "$ac_try_echo"; } >&5
3102   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3103   ac_status=$?
3104   if test -s conftest.err; then
3105     sed '10a\
3106 ... rest of stderr output deleted ...
3107          10q' conftest.err >conftest.er1
3108     cat conftest.er1 >&5
3109   fi
3110   rm -f conftest.er1 conftest.err
3111   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3112   test $ac_status = 0; }
3113 done
3114
3115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3116 /* end confdefs.h.  */
3117
3118 int
3119 main ()
3120 {
3121
3122   ;
3123   return 0;
3124 }
3125 _ACEOF
3126 ac_clean_files_save=$ac_clean_files
3127 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3128 # Try to create an executable without -o first, disregard a.out.
3129 # It will help us diagnose broken compilers, and finding out an intuition
3130 # of exeext.
3131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3132 $as_echo_n "checking whether the C compiler works... " >&6; }
3133 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3134
3135 # The possible output files:
3136 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3137
3138 ac_rmfiles=
3139 for ac_file in $ac_files
3140 do
3141   case $ac_file in
3142     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3143     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3144   esac
3145 done
3146 rm -f $ac_rmfiles
3147
3148 if { { ac_try="$ac_link_default"
3149 case "(($ac_try" in
3150   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3151   *) ac_try_echo=$ac_try;;
3152 esac
3153 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3154 $as_echo "$ac_try_echo"; } >&5
3155   (eval "$ac_link_default") 2>&5
3156   ac_status=$?
3157   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3158   test $ac_status = 0; }; then :
3159   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3160 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3161 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3162 # so that the user can short-circuit this test for compilers unknown to
3163 # Autoconf.
3164 for ac_file in $ac_files ''
3165 do
3166   test -f "$ac_file" || continue
3167   case $ac_file in
3168     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3169         ;;
3170     [ab].out )
3171         # We found the default executable, but exeext='' is most
3172         # certainly right.
3173         break;;
3174     *.* )
3175         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3176         then :; else
3177            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3178         fi
3179         # We set ac_cv_exeext here because the later test for it is not
3180         # safe: cross compilers may not add the suffix if given an `-o'
3181         # argument, so we may need to know it at that point already.
3182         # Even if this section looks crufty: it has the advantage of
3183         # actually working.
3184         break;;
3185     * )
3186         break;;
3187   esac
3188 done
3189 test "$ac_cv_exeext" = no && ac_cv_exeext=
3190
3191 else
3192   ac_file=''
3193 fi
3194 if test -z "$ac_file"; then :
3195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3196 $as_echo "no" >&6; }
3197 $as_echo "$as_me: failed program was:" >&5
3198 sed 's/^/| /' conftest.$ac_ext >&5
3199
3200 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3201 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3202 as_fn_error 77 "C compiler cannot create executables
3203 See \`config.log' for more details" "$LINENO" 5; }
3204 else
3205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3206 $as_echo "yes" >&6; }
3207 fi
3208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3209 $as_echo_n "checking for C compiler default output file name... " >&6; }
3210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3211 $as_echo "$ac_file" >&6; }
3212 ac_exeext=$ac_cv_exeext
3213
3214 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3215 ac_clean_files=$ac_clean_files_save
3216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3217 $as_echo_n "checking for suffix of executables... " >&6; }
3218 if { { ac_try="$ac_link"
3219 case "(($ac_try" in
3220   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3221   *) ac_try_echo=$ac_try;;
3222 esac
3223 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3224 $as_echo "$ac_try_echo"; } >&5
3225   (eval "$ac_link") 2>&5
3226   ac_status=$?
3227   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3228   test $ac_status = 0; }; then :
3229   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3230 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3231 # work properly (i.e., refer to `conftest.exe'), while it won't with
3232 # `rm'.
3233 for ac_file in conftest.exe conftest conftest.*; do
3234   test -f "$ac_file" || continue
3235   case $ac_file in
3236     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3237     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3238           break;;
3239     * ) break;;
3240   esac
3241 done
3242 else
3243   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3244 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3245 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3246 See \`config.log' for more details" "$LINENO" 5; }
3247 fi
3248 rm -f conftest conftest$ac_cv_exeext
3249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3250 $as_echo "$ac_cv_exeext" >&6; }
3251
3252 rm -f conftest.$ac_ext
3253 EXEEXT=$ac_cv_exeext
3254 ac_exeext=$EXEEXT
3255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3256 /* end confdefs.h.  */
3257 #include <stdio.h>
3258 int
3259 main ()
3260 {
3261 FILE *f = fopen ("conftest.out", "w");
3262  return ferror (f) || fclose (f) != 0;
3263
3264   ;
3265   return 0;
3266 }
3267 _ACEOF
3268 ac_clean_files="$ac_clean_files conftest.out"
3269 # Check that the compiler produces executables we can run.  If not, either
3270 # the compiler is broken, or we cross compile.
3271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3272 $as_echo_n "checking whether we are cross compiling... " >&6; }
3273 if test "$cross_compiling" != yes; then
3274   { { ac_try="$ac_link"
3275 case "(($ac_try" in
3276   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3277   *) ac_try_echo=$ac_try;;
3278 esac
3279 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3280 $as_echo "$ac_try_echo"; } >&5
3281   (eval "$ac_link") 2>&5
3282   ac_status=$?
3283   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3284   test $ac_status = 0; }
3285   if { ac_try='./conftest$ac_cv_exeext'
3286   { { case "(($ac_try" in
3287   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3288   *) ac_try_echo=$ac_try;;
3289 esac
3290 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3291 $as_echo "$ac_try_echo"; } >&5
3292   (eval "$ac_try") 2>&5
3293   ac_status=$?
3294   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3295   test $ac_status = 0; }; }; then
3296     cross_compiling=no
3297   else
3298     if test "$cross_compiling" = maybe; then
3299         cross_compiling=yes
3300     else
3301         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3302 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3303 as_fn_error $? "cannot run C compiled programs.
3304 If you meant to cross compile, use \`--host'.
3305 See \`config.log' for more details" "$LINENO" 5; }
3306     fi
3307   fi
3308 fi
3309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3310 $as_echo "$cross_compiling" >&6; }
3311
3312 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3313 ac_clean_files=$ac_clean_files_save
3314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3315 $as_echo_n "checking for suffix of object files... " >&6; }
3316 if ${ac_cv_objext+:} false; then :
3317   $as_echo_n "(cached) " >&6
3318 else
3319   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3320 /* end confdefs.h.  */
3321
3322 int
3323 main ()
3324 {
3325
3326   ;
3327   return 0;
3328 }
3329 _ACEOF
3330 rm -f conftest.o conftest.obj
3331 if { { ac_try="$ac_compile"
3332 case "(($ac_try" in
3333   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3334   *) ac_try_echo=$ac_try;;
3335 esac
3336 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3337 $as_echo "$ac_try_echo"; } >&5
3338   (eval "$ac_compile") 2>&5
3339   ac_status=$?
3340   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3341   test $ac_status = 0; }; then :
3342   for ac_file in conftest.o conftest.obj conftest.*; do
3343   test -f "$ac_file" || continue;
3344   case $ac_file in
3345     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3346     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3347        break;;
3348   esac
3349 done
3350 else
3351   $as_echo "$as_me: failed program was:" >&5
3352 sed 's/^/| /' conftest.$ac_ext >&5
3353
3354 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3355 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3356 as_fn_error $? "cannot compute suffix of object files: cannot compile
3357 See \`config.log' for more details" "$LINENO" 5; }
3358 fi
3359 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3360 fi
3361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3362 $as_echo "$ac_cv_objext" >&6; }
3363 OBJEXT=$ac_cv_objext
3364 ac_objext=$OBJEXT
3365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3366 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3367 if ${ac_cv_c_compiler_gnu+:} false; then :
3368   $as_echo_n "(cached) " >&6
3369 else
3370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3371 /* end confdefs.h.  */
3372
3373 int
3374 main ()
3375 {
3376 #ifndef __GNUC__
3377        choke me
3378 #endif
3379
3380   ;
3381   return 0;
3382 }
3383 _ACEOF
3384 if ac_fn_c_try_compile "$LINENO"; then :
3385   ac_compiler_gnu=yes
3386 else
3387   ac_compiler_gnu=no
3388 fi
3389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3390 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3391
3392 fi
3393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3394 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3395 if test $ac_compiler_gnu = yes; then
3396   GCC=yes
3397 else
3398   GCC=
3399 fi
3400 ac_test_CFLAGS=${CFLAGS+set}
3401 ac_save_CFLAGS=$CFLAGS
3402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3403 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3404 if ${ac_cv_prog_cc_g+:} false; then :
3405   $as_echo_n "(cached) " >&6
3406 else
3407   ac_save_c_werror_flag=$ac_c_werror_flag
3408    ac_c_werror_flag=yes
3409    ac_cv_prog_cc_g=no
3410    CFLAGS="-g"
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   ac_cv_prog_cc_g=yes
3424 else
3425   CFLAGS=""
3426       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3427 /* end confdefs.h.  */
3428
3429 int
3430 main ()
3431 {
3432
3433   ;
3434   return 0;
3435 }
3436 _ACEOF
3437 if ac_fn_c_try_compile "$LINENO"; then :
3438
3439 else
3440   ac_c_werror_flag=$ac_save_c_werror_flag
3441          CFLAGS="-g"
3442          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3443 /* end confdefs.h.  */
3444
3445 int
3446 main ()
3447 {
3448
3449   ;
3450   return 0;
3451 }
3452 _ACEOF
3453 if ac_fn_c_try_compile "$LINENO"; then :
3454   ac_cv_prog_cc_g=yes
3455 fi
3456 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3457 fi
3458 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3459 fi
3460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3461    ac_c_werror_flag=$ac_save_c_werror_flag
3462 fi
3463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3464 $as_echo "$ac_cv_prog_cc_g" >&6; }
3465 if test "$ac_test_CFLAGS" = set; then
3466   CFLAGS=$ac_save_CFLAGS
3467 elif test $ac_cv_prog_cc_g = yes; then
3468   if test "$GCC" = yes; then
3469     CFLAGS="-g -O2"
3470   else
3471     CFLAGS="-g"
3472   fi
3473 else
3474   if test "$GCC" = yes; then
3475     CFLAGS="-O2"
3476   else
3477     CFLAGS=
3478   fi
3479 fi
3480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3481 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3482 if ${ac_cv_prog_cc_c89+:} false; then :
3483   $as_echo_n "(cached) " >&6
3484 else
3485   ac_cv_prog_cc_c89=no
3486 ac_save_CC=$CC
3487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3488 /* end confdefs.h.  */
3489 #include <stdarg.h>
3490 #include <stdio.h>
3491 struct stat;
3492 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3493 struct buf { int x; };
3494 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3495 static char *e (p, i)
3496      char **p;
3497      int i;
3498 {
3499   return p[i];
3500 }
3501 static char *f (char * (*g) (char **, int), char **p, ...)
3502 {
3503   char *s;
3504   va_list v;
3505   va_start (v,p);
3506   s = g (p, va_arg (v,int));
3507   va_end (v);
3508   return s;
3509 }
3510
3511 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3512    function prototypes and stuff, but not '\xHH' hex character constants.
3513    These don't provoke an error unfortunately, instead are silently treated
3514    as 'x'.  The following induces an error, until -std is added to get
3515    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3516    array size at least.  It's necessary to write '\x00'==0 to get something
3517    that's true only with -std.  */
3518 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3519
3520 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3521    inside strings and character constants.  */
3522 #define FOO(x) 'x'
3523 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3524
3525 int test (int i, double x);
3526 struct s1 {int (*f) (int a);};
3527 struct s2 {int (*f) (double a);};
3528 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3529 int argc;
3530 char **argv;
3531 int
3532 main ()
3533 {
3534 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3535   ;
3536   return 0;
3537 }
3538 _ACEOF
3539 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3540         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3541 do
3542   CC="$ac_save_CC $ac_arg"
3543   if ac_fn_c_try_compile "$LINENO"; then :
3544   ac_cv_prog_cc_c89=$ac_arg
3545 fi
3546 rm -f core conftest.err conftest.$ac_objext
3547   test "x$ac_cv_prog_cc_c89" != "xno" && break
3548 done
3549 rm -f conftest.$ac_ext
3550 CC=$ac_save_CC
3551
3552 fi
3553 # AC_CACHE_VAL
3554 case "x$ac_cv_prog_cc_c89" in
3555   x)
3556     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3557 $as_echo "none needed" >&6; } ;;
3558   xno)
3559     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3560 $as_echo "unsupported" >&6; } ;;
3561   *)
3562     CC="$CC $ac_cv_prog_cc_c89"
3563     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3564 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3565 esac
3566 if test "x$ac_cv_prog_cc_c89" != xno; then :
3567
3568 fi
3569
3570 ac_ext=c
3571 ac_cpp='$CPP $CPPFLAGS'
3572 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3573 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3574 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3575
3576
3577 ac_ext=c
3578 ac_cpp='$CPP $CPPFLAGS'
3579 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3580 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3581 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3583 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3584 # On Suns, sometimes $CPP names a directory.
3585 if test -n "$CPP" && test -d "$CPP"; then
3586   CPP=
3587 fi
3588 if test -z "$CPP"; then
3589   if ${ac_cv_prog_CPP+:} false; then :
3590   $as_echo_n "(cached) " >&6
3591 else
3592       # Double quotes because CPP needs to be expanded
3593     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3594     do
3595       ac_preproc_ok=false
3596 for ac_c_preproc_warn_flag in '' yes
3597 do
3598   # Use a header file that comes with gcc, so configuring glibc
3599   # with a fresh cross-compiler works.
3600   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3601   # <limits.h> exists even on freestanding compilers.
3602   # On the NeXT, cc -E runs the code through the compiler's parser,
3603   # not just through cpp. "Syntax error" is here to catch this case.
3604   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3605 /* end confdefs.h.  */
3606 #ifdef __STDC__
3607 # include <limits.h>
3608 #else
3609 # include <assert.h>
3610 #endif
3611                      Syntax error
3612 _ACEOF
3613 if ac_fn_c_try_cpp "$LINENO"; then :
3614
3615 else
3616   # Broken: fails on valid input.
3617 continue
3618 fi
3619 rm -f conftest.err conftest.i conftest.$ac_ext
3620
3621   # OK, works on sane cases.  Now check whether nonexistent headers
3622   # can be detected and how.
3623   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3624 /* end confdefs.h.  */
3625 #include <ac_nonexistent.h>
3626 _ACEOF
3627 if ac_fn_c_try_cpp "$LINENO"; then :
3628   # Broken: success on invalid input.
3629 continue
3630 else
3631   # Passes both tests.
3632 ac_preproc_ok=:
3633 break
3634 fi
3635 rm -f conftest.err conftest.i conftest.$ac_ext
3636
3637 done
3638 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3639 rm -f conftest.i conftest.err conftest.$ac_ext
3640 if $ac_preproc_ok; then :
3641   break
3642 fi
3643
3644     done
3645     ac_cv_prog_CPP=$CPP
3646
3647 fi
3648   CPP=$ac_cv_prog_CPP
3649 else
3650   ac_cv_prog_CPP=$CPP
3651 fi
3652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3653 $as_echo "$CPP" >&6; }
3654 ac_preproc_ok=false
3655 for ac_c_preproc_warn_flag in '' yes
3656 do
3657   # Use a header file that comes with gcc, so configuring glibc
3658   # with a fresh cross-compiler works.
3659   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3660   # <limits.h> exists even on freestanding compilers.
3661   # On the NeXT, cc -E runs the code through the compiler's parser,
3662   # not just through cpp. "Syntax error" is here to catch this case.
3663   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3664 /* end confdefs.h.  */
3665 #ifdef __STDC__
3666 # include <limits.h>
3667 #else
3668 # include <assert.h>
3669 #endif
3670                      Syntax error
3671 _ACEOF
3672 if ac_fn_c_try_cpp "$LINENO"; then :
3673
3674 else
3675   # Broken: fails on valid input.
3676 continue
3677 fi
3678 rm -f conftest.err conftest.i conftest.$ac_ext
3679
3680   # OK, works on sane cases.  Now check whether nonexistent headers
3681   # can be detected and how.
3682   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3683 /* end confdefs.h.  */
3684 #include <ac_nonexistent.h>
3685 _ACEOF
3686 if ac_fn_c_try_cpp "$LINENO"; then :
3687   # Broken: success on invalid input.
3688 continue
3689 else
3690   # Passes both tests.
3691 ac_preproc_ok=:
3692 break
3693 fi
3694 rm -f conftest.err conftest.i conftest.$ac_ext
3695
3696 done
3697 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3698 rm -f conftest.i conftest.err conftest.$ac_ext
3699 if $ac_preproc_ok; then :
3700
3701 else
3702   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3703 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3704 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3705 See \`config.log' for more details" "$LINENO" 5; }
3706 fi
3707
3708 ac_ext=c
3709 ac_cpp='$CPP $CPPFLAGS'
3710 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3711 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3712 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3713
3714
3715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3716 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3717 if ${ac_cv_path_GREP+:} false; then :
3718   $as_echo_n "(cached) " >&6
3719 else
3720   if test -z "$GREP"; then
3721   ac_path_GREP_found=false
3722   # Loop through the user's path and test for each of PROGNAME-LIST
3723   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3724 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3725 do
3726   IFS=$as_save_IFS
3727   test -z "$as_dir" && as_dir=.
3728     for ac_prog in grep ggrep; do
3729     for ac_exec_ext in '' $ac_executable_extensions; do
3730       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3731       as_fn_executable_p "$ac_path_GREP" || continue
3732 # Check for GNU ac_path_GREP and select it if it is found.
3733   # Check for GNU $ac_path_GREP
3734 case `"$ac_path_GREP" --version 2>&1` in
3735 *GNU*)
3736   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3737 *)
3738   ac_count=0
3739   $as_echo_n 0123456789 >"conftest.in"
3740   while :
3741   do
3742     cat "conftest.in" "conftest.in" >"conftest.tmp"
3743     mv "conftest.tmp" "conftest.in"
3744     cp "conftest.in" "conftest.nl"
3745     $as_echo 'GREP' >> "conftest.nl"
3746     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3747     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3748     as_fn_arith $ac_count + 1 && ac_count=$as_val
3749     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3750       # Best one so far, save it but keep looking for a better one
3751       ac_cv_path_GREP="$ac_path_GREP"
3752       ac_path_GREP_max=$ac_count
3753     fi
3754     # 10*(2^10) chars as input seems more than enough
3755     test $ac_count -gt 10 && break
3756   done
3757   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3758 esac
3759
3760       $ac_path_GREP_found && break 3
3761     done
3762   done
3763   done
3764 IFS=$as_save_IFS
3765   if test -z "$ac_cv_path_GREP"; then
3766     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3767   fi
3768 else
3769   ac_cv_path_GREP=$GREP
3770 fi
3771
3772 fi
3773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3774 $as_echo "$ac_cv_path_GREP" >&6; }
3775  GREP="$ac_cv_path_GREP"
3776
3777
3778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3779 $as_echo_n "checking for egrep... " >&6; }
3780 if ${ac_cv_path_EGREP+:} false; then :
3781   $as_echo_n "(cached) " >&6
3782 else
3783   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3784    then ac_cv_path_EGREP="$GREP -E"
3785    else
3786      if test -z "$EGREP"; then
3787   ac_path_EGREP_found=false
3788   # Loop through the user's path and test for each of PROGNAME-LIST
3789   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3790 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3791 do
3792   IFS=$as_save_IFS
3793   test -z "$as_dir" && as_dir=.
3794     for ac_prog in egrep; do
3795     for ac_exec_ext in '' $ac_executable_extensions; do
3796       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3797       as_fn_executable_p "$ac_path_EGREP" || continue
3798 # Check for GNU ac_path_EGREP and select it if it is found.
3799   # Check for GNU $ac_path_EGREP
3800 case `"$ac_path_EGREP" --version 2>&1` in
3801 *GNU*)
3802   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3803 *)
3804   ac_count=0
3805   $as_echo_n 0123456789 >"conftest.in"
3806   while :
3807   do
3808     cat "conftest.in" "conftest.in" >"conftest.tmp"
3809     mv "conftest.tmp" "conftest.in"
3810     cp "conftest.in" "conftest.nl"
3811     $as_echo 'EGREP' >> "conftest.nl"
3812     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3813     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3814     as_fn_arith $ac_count + 1 && ac_count=$as_val
3815     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3816       # Best one so far, save it but keep looking for a better one
3817       ac_cv_path_EGREP="$ac_path_EGREP"
3818       ac_path_EGREP_max=$ac_count
3819     fi
3820     # 10*(2^10) chars as input seems more than enough
3821     test $ac_count -gt 10 && break
3822   done
3823   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3824 esac
3825
3826       $ac_path_EGREP_found && break 3
3827     done
3828   done
3829   done
3830 IFS=$as_save_IFS
3831   if test -z "$ac_cv_path_EGREP"; then
3832     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3833   fi
3834 else
3835   ac_cv_path_EGREP=$EGREP
3836 fi
3837
3838    fi
3839 fi
3840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3841 $as_echo "$ac_cv_path_EGREP" >&6; }
3842  EGREP="$ac_cv_path_EGREP"
3843
3844
3845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3846 $as_echo_n "checking for ANSI C header files... " >&6; }
3847 if ${ac_cv_header_stdc+:} false; then :
3848   $as_echo_n "(cached) " >&6
3849 else
3850   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3851 /* end confdefs.h.  */
3852 #include <stdlib.h>
3853 #include <stdarg.h>
3854 #include <string.h>
3855 #include <float.h>
3856
3857 int
3858 main ()
3859 {
3860
3861   ;
3862   return 0;
3863 }
3864 _ACEOF
3865 if ac_fn_c_try_compile "$LINENO"; then :
3866   ac_cv_header_stdc=yes
3867 else
3868   ac_cv_header_stdc=no
3869 fi
3870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3871
3872 if test $ac_cv_header_stdc = yes; then
3873   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3874   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3875 /* end confdefs.h.  */
3876 #include <string.h>
3877
3878 _ACEOF
3879 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3880   $EGREP "memchr" >/dev/null 2>&1; then :
3881
3882 else
3883   ac_cv_header_stdc=no
3884 fi
3885 rm -f conftest*
3886
3887 fi
3888
3889 if test $ac_cv_header_stdc = yes; then
3890   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3892 /* end confdefs.h.  */
3893 #include <stdlib.h>
3894
3895 _ACEOF
3896 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3897   $EGREP "free" >/dev/null 2>&1; then :
3898
3899 else
3900   ac_cv_header_stdc=no
3901 fi
3902 rm -f conftest*
3903
3904 fi
3905
3906 if test $ac_cv_header_stdc = yes; then
3907   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3908   if test "$cross_compiling" = yes; then :
3909   :
3910 else
3911   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3912 /* end confdefs.h.  */
3913 #include <ctype.h>
3914 #include <stdlib.h>
3915 #if ((' ' & 0x0FF) == 0x020)
3916 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3917 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3918 #else
3919 # define ISLOWER(c) \
3920                    (('a' <= (c) && (c) <= 'i') \
3921                      || ('j' <= (c) && (c) <= 'r') \
3922                      || ('s' <= (c) && (c) <= 'z'))
3923 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3924 #endif
3925
3926 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3927 int
3928 main ()
3929 {
3930   int i;
3931   for (i = 0; i < 256; i++)
3932     if (XOR (islower (i), ISLOWER (i))
3933         || toupper (i) != TOUPPER (i))
3934       return 2;
3935   return 0;
3936 }
3937 _ACEOF
3938 if ac_fn_c_try_run "$LINENO"; then :
3939
3940 else
3941   ac_cv_header_stdc=no
3942 fi
3943 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3944   conftest.$ac_objext conftest.beam conftest.$ac_ext
3945 fi
3946
3947 fi
3948 fi
3949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3950 $as_echo "$ac_cv_header_stdc" >&6; }
3951 if test $ac_cv_header_stdc = yes; then
3952
3953 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
3954
3955 fi
3956
3957 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3958 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3959                   inttypes.h stdint.h unistd.h
3960 do :
3961   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3962 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3963 "
3964 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3965   cat >>confdefs.h <<_ACEOF
3966 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3967 _ACEOF
3968
3969 fi
3970
3971 done
3972
3973
3974
3975   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3976 if test "x$ac_cv_header_minix_config_h" = xyes; then :
3977   MINIX=yes
3978 else
3979   MINIX=
3980 fi
3981
3982
3983   if test "$MINIX" = yes; then
3984
3985 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
3986
3987
3988 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
3989
3990
3991 $as_echo "#define _MINIX 1" >>confdefs.h
3992
3993   fi
3994
3995
3996   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3997 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3998 if ${ac_cv_safe_to_define___extensions__+:} false; then :
3999   $as_echo_n "(cached) " >&6
4000 else
4001   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4002 /* end confdefs.h.  */
4003
4004 #         define __EXTENSIONS__ 1
4005           $ac_includes_default
4006 int
4007 main ()
4008 {
4009
4010   ;
4011   return 0;
4012 }
4013 _ACEOF
4014 if ac_fn_c_try_compile "$LINENO"; then :
4015   ac_cv_safe_to_define___extensions__=yes
4016 else
4017   ac_cv_safe_to_define___extensions__=no
4018 fi
4019 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4020 fi
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4022 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4023   test $ac_cv_safe_to_define___extensions__ = yes &&
4024     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4025
4026   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4027
4028   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4029
4030   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4031
4032   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4033
4034
4035
4036 if test "$ac_cv_header_minix_config_h" = "yes"; then
4037
4038 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4039
4040 fi
4041
4042 case "$prefix" in
4043         NONE)
4044                 prefix="/usr/local"
4045         ;;
4046 esac
4047
4048 # are we on MinGW?
4049 if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
4050 else
4051         if echo $target | grep mingw32 >/dev/null; then on_mingw="yes"
4052         else on_mingw="no"; fi
4053 fi
4054
4055 #
4056 # Determine configuration file
4057 # the eval is to evaluate shell expansion twice
4058 if test $on_mingw = "no"; then
4059   ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4060 else
4061   ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4062 fi
4063
4064 # Check whether --with-conf_file was given.
4065 if test "${with_conf_file+set}" = set; then :
4066   withval=$with_conf_file; ub_conf_file="$withval"
4067 fi
4068
4069
4070 hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4071
4072
4073 cat >>confdefs.h <<_ACEOF
4074 #define CONFIGFILE "$hdr_config"
4075 _ACEOF
4076
4077 ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4078 $as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4079          X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4080          X"$ub_conf_file" : 'X\(//\)$' \| \
4081          X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4082 $as_echo X"$ub_conf_file" |
4083     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4084             s//\1/
4085             q
4086           }
4087           /^X\(\/\/\)[^/].*/{
4088             s//\1/
4089             q
4090           }
4091           /^X\(\/\/\)$/{
4092             s//\1/
4093             q
4094           }
4095           /^X\(\/\).*/{
4096             s//\1/
4097             q
4098           }
4099           s/.*/./; q'`
4100
4101
4102 # Determine run, chroot directory and pidfile locations
4103
4104 # Check whether --with-run-dir was given.
4105 if test "${with_run_dir+set}" = set; then :
4106   withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4107 else
4108   if test $on_mingw = no; then
4109     UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4110 else
4111     UNBOUND_RUN_DIR=""
4112 fi
4113
4114 fi
4115
4116
4117 hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4118
4119
4120 cat >>confdefs.h <<_ACEOF
4121 #define RUN_DIR "$hdr_run"
4122 _ACEOF
4123
4124
4125
4126 # Check whether --with-chroot-dir was given.
4127 if test "${with_chroot_dir+set}" = set; then :
4128   withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4129 else
4130   if test $on_mingw = no; then
4131     UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4132 else
4133     UNBOUND_CHROOT_DIR=""
4134 fi
4135
4136 fi
4137
4138
4139 hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4140
4141
4142 cat >>confdefs.h <<_ACEOF
4143 #define CHROOT_DIR "$hdr_chroot"
4144 _ACEOF
4145
4146
4147
4148 # Check whether --with-share-dir was given.
4149 if test "${with_share_dir+set}" = set; then :
4150   withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4151 else
4152   UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4153 fi
4154
4155
4156
4157 cat >>confdefs.h <<_ACEOF
4158 #define SHARE_DIR "$UNBOUND_SHARE_DIR"
4159 _ACEOF
4160
4161
4162
4163 # Check whether --with-pidfile was given.
4164 if test "${with_pidfile+set}" = set; then :
4165   withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4166 else
4167   if test $on_mingw = no; then
4168     UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4169 else
4170     UNBOUND_PIDFILE=""
4171 fi
4172
4173 fi
4174
4175
4176 hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4177
4178
4179 cat >>confdefs.h <<_ACEOF
4180 #define PIDFILE "$hdr_pid"
4181 _ACEOF
4182
4183
4184
4185 # Check whether --with-rootkey-file was given.
4186 if test "${with_rootkey_file+set}" = set; then :
4187   withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4188 else
4189   if test $on_mingw = no; then
4190     UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4191 else
4192     UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4193 fi
4194
4195 fi
4196
4197
4198 hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4199
4200
4201 cat >>confdefs.h <<_ACEOF
4202 #define ROOT_ANCHOR_FILE "$hdr_rkey"
4203 _ACEOF
4204
4205
4206
4207 # Check whether --with-rootcert-file was given.
4208 if test "${with_rootcert_file+set}" = set; then :
4209   withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4210 else
4211   if test $on_mingw = no; then
4212     UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4213 else
4214     UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4215 fi
4216
4217 fi
4218
4219
4220 hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4221
4222
4223 cat >>confdefs.h <<_ACEOF
4224 #define ROOT_CERT_FILE "$hdr_rpem"
4225 _ACEOF
4226
4227
4228
4229 # Check whether --with-username was given.
4230 if test "${with_username+set}" = set; then :
4231   withval=$with_username; UNBOUND_USERNAME="$withval"
4232 else
4233   UNBOUND_USERNAME="unbound"
4234 fi
4235
4236
4237
4238 cat >>confdefs.h <<_ACEOF
4239 #define UB_USERNAME "$UNBOUND_USERNAME"
4240 _ACEOF
4241
4242
4243
4244 $as_echo "#define WINVER 0x0502" >>confdefs.h
4245
4246 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/' `
4247
4248
4249 cat >>confdefs.h <<_ACEOF
4250 #define RSRC_PACKAGE_VERSION $wnvs
4251 _ACEOF
4252
4253
4254 # Checks for typedefs, structures, and compiler characteristics.
4255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4256 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4257 if ${ac_cv_c_const+:} false; then :
4258   $as_echo_n "(cached) " >&6
4259 else
4260   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4261 /* end confdefs.h.  */
4262
4263 int
4264 main ()
4265 {
4266
4267 #ifndef __cplusplus
4268   /* Ultrix mips cc rejects this sort of thing.  */
4269   typedef int charset[2];
4270   const charset cs = { 0, 0 };
4271   /* SunOS 4.1.1 cc rejects this.  */
4272   char const *const *pcpcc;
4273   char **ppc;
4274   /* NEC SVR4.0.2 mips cc rejects this.  */
4275   struct point {int x, y;};
4276   static struct point const zero = {0,0};
4277   /* AIX XL C 1.02.0.0 rejects this.
4278      It does not let you subtract one const X* pointer from another in
4279      an arm of an if-expression whose if-part is not a constant
4280      expression */
4281   const char *g = "string";
4282   pcpcc = &g + (g ? g-g : 0);
4283   /* HPUX 7.0 cc rejects these. */
4284   ++pcpcc;
4285   ppc = (char**) pcpcc;
4286   pcpcc = (char const *const *) ppc;
4287   { /* SCO 3.2v4 cc rejects this sort of thing.  */
4288     char tx;
4289     char *t = &tx;
4290     char const *s = 0 ? (char *) 0 : (char const *) 0;
4291
4292     *t++ = 0;
4293     if (s) return 0;
4294   }
4295   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4296     int x[] = {25, 17};
4297     const int *foo = &x[0];
4298     ++foo;
4299   }
4300   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4301     typedef const int *iptr;
4302     iptr p = 0;
4303     ++p;
4304   }
4305   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4306        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4307     struct s { int j; const int *ap[3]; } bx;
4308     struct s *b = &bx; b->j = 5;
4309   }
4310   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4311     const int foo = 10;
4312     if (!foo) return 0;
4313   }
4314   return !cs[0] && !zero.x;
4315 #endif
4316
4317   ;
4318   return 0;
4319 }
4320 _ACEOF
4321 if ac_fn_c_try_compile "$LINENO"; then :
4322   ac_cv_c_const=yes
4323 else
4324   ac_cv_c_const=no
4325 fi
4326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4327 fi
4328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4329 $as_echo "$ac_cv_c_const" >&6; }
4330 if test $ac_cv_c_const = no; then
4331
4332 $as_echo "#define const /**/" >>confdefs.h
4333
4334 fi
4335
4336 ac_ext=c
4337 ac_cpp='$CPP $CPPFLAGS'
4338 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4339 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4340 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4341
4342 # allow user to override the -g -O2 flags.
4343 if test "x$CFLAGS" = "x" ; then
4344
4345
4346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4347 $as_echo_n "checking whether $CC supports -g... " >&6; }
4348 cache=`echo g | sed 'y%.=/+-%___p_%'`
4349 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4350   $as_echo_n "(cached) " >&6
4351 else
4352
4353 echo 'void f(void){}' >conftest.c
4354 if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4355 eval "cv_prog_cc_flag_$cache=yes"
4356 else
4357 eval "cv_prog_cc_flag_$cache=no"
4358 fi
4359 rm -f conftest conftest.o conftest.c
4360
4361 fi
4362
4363 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4365 $as_echo "yes" >&6; }
4366 :
4367 CFLAGS="$CFLAGS -g"
4368 else
4369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4370 $as_echo "no" >&6; }
4371 :
4372
4373 fi
4374
4375
4376
4377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4378 $as_echo_n "checking whether $CC supports -O2... " >&6; }
4379 cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4380 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4381   $as_echo_n "(cached) " >&6
4382 else
4383
4384 echo 'void f(void){}' >conftest.c
4385 if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4386 eval "cv_prog_cc_flag_$cache=yes"
4387 else
4388 eval "cv_prog_cc_flag_$cache=no"
4389 fi
4390 rm -f conftest conftest.o conftest.c
4391
4392 fi
4393
4394 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4396 $as_echo "yes" >&6; }
4397 :
4398 CFLAGS="$CFLAGS -O2"
4399 else
4400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4401 $as_echo "no" >&6; }
4402 :
4403
4404 fi
4405
4406 fi
4407 ac_ext=c
4408 ac_cpp='$CPP $CPPFLAGS'
4409 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4410 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4411 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4412 if test -n "$ac_tool_prefix"; then
4413   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4414 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4416 $as_echo_n "checking for $ac_word... " >&6; }
4417 if ${ac_cv_prog_CC+:} false; then :
4418   $as_echo_n "(cached) " >&6
4419 else
4420   if test -n "$CC"; then
4421   ac_cv_prog_CC="$CC" # Let the user override the test.
4422 else
4423 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4424 for as_dir in $PATH
4425 do
4426   IFS=$as_save_IFS
4427   test -z "$as_dir" && as_dir=.
4428     for ac_exec_ext in '' $ac_executable_extensions; do
4429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4430     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4432     break 2
4433   fi
4434 done
4435   done
4436 IFS=$as_save_IFS
4437
4438 fi
4439 fi
4440 CC=$ac_cv_prog_CC
4441 if test -n "$CC"; then
4442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4443 $as_echo "$CC" >&6; }
4444 else
4445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4446 $as_echo "no" >&6; }
4447 fi
4448
4449
4450 fi
4451 if test -z "$ac_cv_prog_CC"; then
4452   ac_ct_CC=$CC
4453   # Extract the first word of "gcc", so it can be a program name with args.
4454 set dummy gcc; ac_word=$2
4455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4456 $as_echo_n "checking for $ac_word... " >&6; }
4457 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4458   $as_echo_n "(cached) " >&6
4459 else
4460   if test -n "$ac_ct_CC"; then
4461   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4462 else
4463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4464 for as_dir in $PATH
4465 do
4466   IFS=$as_save_IFS
4467   test -z "$as_dir" && as_dir=.
4468     for ac_exec_ext in '' $ac_executable_extensions; do
4469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4470     ac_cv_prog_ac_ct_CC="gcc"
4471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4472     break 2
4473   fi
4474 done
4475   done
4476 IFS=$as_save_IFS
4477
4478 fi
4479 fi
4480 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4481 if test -n "$ac_ct_CC"; then
4482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4483 $as_echo "$ac_ct_CC" >&6; }
4484 else
4485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4486 $as_echo "no" >&6; }
4487 fi
4488
4489   if test "x$ac_ct_CC" = x; then
4490     CC=""
4491   else
4492     case $cross_compiling:$ac_tool_warned in
4493 yes:)
4494 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4495 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4496 ac_tool_warned=yes ;;
4497 esac
4498     CC=$ac_ct_CC
4499   fi
4500 else
4501   CC="$ac_cv_prog_CC"
4502 fi
4503
4504 if test -z "$CC"; then
4505           if test -n "$ac_tool_prefix"; then
4506     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4507 set dummy ${ac_tool_prefix}cc; ac_word=$2
4508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4509 $as_echo_n "checking for $ac_word... " >&6; }
4510 if ${ac_cv_prog_CC+:} false; then :
4511   $as_echo_n "(cached) " >&6
4512 else
4513   if test -n "$CC"; then
4514   ac_cv_prog_CC="$CC" # Let the user override the test.
4515 else
4516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4517 for as_dir in $PATH
4518 do
4519   IFS=$as_save_IFS
4520   test -z "$as_dir" && as_dir=.
4521     for ac_exec_ext in '' $ac_executable_extensions; do
4522   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4523     ac_cv_prog_CC="${ac_tool_prefix}cc"
4524     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4525     break 2
4526   fi
4527 done
4528   done
4529 IFS=$as_save_IFS
4530
4531 fi
4532 fi
4533 CC=$ac_cv_prog_CC
4534 if test -n "$CC"; then
4535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4536 $as_echo "$CC" >&6; }
4537 else
4538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4539 $as_echo "no" >&6; }
4540 fi
4541
4542
4543   fi
4544 fi
4545 if test -z "$CC"; then
4546   # Extract the first word of "cc", so it can be a program name with args.
4547 set dummy cc; ac_word=$2
4548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4549 $as_echo_n "checking for $ac_word... " >&6; }
4550 if ${ac_cv_prog_CC+:} false; then :
4551   $as_echo_n "(cached) " >&6
4552 else
4553   if test -n "$CC"; then
4554   ac_cv_prog_CC="$CC" # Let the user override the test.
4555 else
4556   ac_prog_rejected=no
4557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4558 for as_dir in $PATH
4559 do
4560   IFS=$as_save_IFS
4561   test -z "$as_dir" && as_dir=.
4562     for ac_exec_ext in '' $ac_executable_extensions; do
4563   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4564     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4565        ac_prog_rejected=yes
4566        continue
4567      fi
4568     ac_cv_prog_CC="cc"
4569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4570     break 2
4571   fi
4572 done
4573   done
4574 IFS=$as_save_IFS
4575
4576 if test $ac_prog_rejected = yes; then
4577   # We found a bogon in the path, so make sure we never use it.
4578   set dummy $ac_cv_prog_CC
4579   shift
4580   if test $# != 0; then
4581     # We chose a different compiler from the bogus one.
4582     # However, it has the same basename, so the bogon will be chosen
4583     # first if we set CC to just the basename; use the full file name.
4584     shift
4585     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4586   fi
4587 fi
4588 fi
4589 fi
4590 CC=$ac_cv_prog_CC
4591 if test -n "$CC"; then
4592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4593 $as_echo "$CC" >&6; }
4594 else
4595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4596 $as_echo "no" >&6; }
4597 fi
4598
4599
4600 fi
4601 if test -z "$CC"; then
4602   if test -n "$ac_tool_prefix"; then
4603   for ac_prog in cl.exe
4604   do
4605     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4606 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4608 $as_echo_n "checking for $ac_word... " >&6; }
4609 if ${ac_cv_prog_CC+:} false; then :
4610   $as_echo_n "(cached) " >&6
4611 else
4612   if test -n "$CC"; then
4613   ac_cv_prog_CC="$CC" # Let the user override the test.
4614 else
4615 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4616 for as_dir in $PATH
4617 do
4618   IFS=$as_save_IFS
4619   test -z "$as_dir" && as_dir=.
4620     for ac_exec_ext in '' $ac_executable_extensions; do
4621   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4622     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4623     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4624     break 2
4625   fi
4626 done
4627   done
4628 IFS=$as_save_IFS
4629
4630 fi
4631 fi
4632 CC=$ac_cv_prog_CC
4633 if test -n "$CC"; then
4634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4635 $as_echo "$CC" >&6; }
4636 else
4637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4638 $as_echo "no" >&6; }
4639 fi
4640
4641
4642     test -n "$CC" && break
4643   done
4644 fi
4645 if test -z "$CC"; then
4646   ac_ct_CC=$CC
4647   for ac_prog in cl.exe
4648 do
4649   # Extract the first word of "$ac_prog", so it can be a program name with args.
4650 set dummy $ac_prog; ac_word=$2
4651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4652 $as_echo_n "checking for $ac_word... " >&6; }
4653 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4654   $as_echo_n "(cached) " >&6
4655 else
4656   if test -n "$ac_ct_CC"; then
4657   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4658 else
4659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4660 for as_dir in $PATH
4661 do
4662   IFS=$as_save_IFS
4663   test -z "$as_dir" && as_dir=.
4664     for ac_exec_ext in '' $ac_executable_extensions; do
4665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4666     ac_cv_prog_ac_ct_CC="$ac_prog"
4667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4668     break 2
4669   fi
4670 done
4671   done
4672 IFS=$as_save_IFS
4673
4674 fi
4675 fi
4676 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4677 if test -n "$ac_ct_CC"; then
4678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4679 $as_echo "$ac_ct_CC" >&6; }
4680 else
4681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4682 $as_echo "no" >&6; }
4683 fi
4684
4685
4686   test -n "$ac_ct_CC" && break
4687 done
4688
4689   if test "x$ac_ct_CC" = x; then
4690     CC=""
4691   else
4692     case $cross_compiling:$ac_tool_warned in
4693 yes:)
4694 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4695 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4696 ac_tool_warned=yes ;;
4697 esac
4698     CC=$ac_ct_CC
4699   fi
4700 fi
4701
4702 fi
4703
4704
4705 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4706 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4707 as_fn_error $? "no acceptable C compiler found in \$PATH
4708 See \`config.log' for more details" "$LINENO" 5; }
4709
4710 # Provide some information about the compiler.
4711 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4712 set X $ac_compile
4713 ac_compiler=$2
4714 for ac_option in --version -v -V -qversion; do
4715   { { ac_try="$ac_compiler $ac_option >&5"
4716 case "(($ac_try" in
4717   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4718   *) ac_try_echo=$ac_try;;
4719 esac
4720 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4721 $as_echo "$ac_try_echo"; } >&5
4722   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4723   ac_status=$?
4724   if test -s conftest.err; then
4725     sed '10a\
4726 ... rest of stderr output deleted ...
4727          10q' conftest.err >conftest.er1
4728     cat conftest.er1 >&5
4729   fi
4730   rm -f conftest.er1 conftest.err
4731   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4732   test $ac_status = 0; }
4733 done
4734
4735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4736 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4737 if ${ac_cv_c_compiler_gnu+:} false; then :
4738   $as_echo_n "(cached) " >&6
4739 else
4740   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4741 /* end confdefs.h.  */
4742
4743 int
4744 main ()
4745 {
4746 #ifndef __GNUC__
4747        choke me
4748 #endif
4749
4750   ;
4751   return 0;
4752 }
4753 _ACEOF
4754 if ac_fn_c_try_compile "$LINENO"; then :
4755   ac_compiler_gnu=yes
4756 else
4757   ac_compiler_gnu=no
4758 fi
4759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4760 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4761
4762 fi
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4764 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4765 if test $ac_compiler_gnu = yes; then
4766   GCC=yes
4767 else
4768   GCC=
4769 fi
4770 ac_test_CFLAGS=${CFLAGS+set}
4771 ac_save_CFLAGS=$CFLAGS
4772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4773 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4774 if ${ac_cv_prog_cc_g+:} false; then :
4775   $as_echo_n "(cached) " >&6
4776 else
4777   ac_save_c_werror_flag=$ac_c_werror_flag
4778    ac_c_werror_flag=yes
4779    ac_cv_prog_cc_g=no
4780    CFLAGS="-g"
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   ac_cv_prog_cc_g=yes
4794 else
4795   CFLAGS=""
4796       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4797 /* end confdefs.h.  */
4798
4799 int
4800 main ()
4801 {
4802
4803   ;
4804   return 0;
4805 }
4806 _ACEOF
4807 if ac_fn_c_try_compile "$LINENO"; then :
4808
4809 else
4810   ac_c_werror_flag=$ac_save_c_werror_flag
4811          CFLAGS="-g"
4812          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4813 /* end confdefs.h.  */
4814
4815 int
4816 main ()
4817 {
4818
4819   ;
4820   return 0;
4821 }
4822 _ACEOF
4823 if ac_fn_c_try_compile "$LINENO"; then :
4824   ac_cv_prog_cc_g=yes
4825 fi
4826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4827 fi
4828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4829 fi
4830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4831    ac_c_werror_flag=$ac_save_c_werror_flag
4832 fi
4833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4834 $as_echo "$ac_cv_prog_cc_g" >&6; }
4835 if test "$ac_test_CFLAGS" = set; then
4836   CFLAGS=$ac_save_CFLAGS
4837 elif test $ac_cv_prog_cc_g = yes; then
4838   if test "$GCC" = yes; then
4839     CFLAGS="-g -O2"
4840   else
4841     CFLAGS="-g"
4842   fi
4843 else
4844   if test "$GCC" = yes; then
4845     CFLAGS="-O2"
4846   else
4847     CFLAGS=
4848   fi
4849 fi
4850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4851 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4852 if ${ac_cv_prog_cc_c89+:} false; then :
4853   $as_echo_n "(cached) " >&6
4854 else
4855   ac_cv_prog_cc_c89=no
4856 ac_save_CC=$CC
4857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4858 /* end confdefs.h.  */
4859 #include <stdarg.h>
4860 #include <stdio.h>
4861 struct stat;
4862 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4863 struct buf { int x; };
4864 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4865 static char *e (p, i)
4866      char **p;
4867      int i;
4868 {
4869   return p[i];
4870 }
4871 static char *f (char * (*g) (char **, int), char **p, ...)
4872 {
4873   char *s;
4874   va_list v;
4875   va_start (v,p);
4876   s = g (p, va_arg (v,int));
4877   va_end (v);
4878   return s;
4879 }
4880
4881 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4882    function prototypes and stuff, but not '\xHH' hex character constants.
4883    These don't provoke an error unfortunately, instead are silently treated
4884    as 'x'.  The following induces an error, until -std is added to get
4885    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4886    array size at least.  It's necessary to write '\x00'==0 to get something
4887    that's true only with -std.  */
4888 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4889
4890 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4891    inside strings and character constants.  */
4892 #define FOO(x) 'x'
4893 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4894
4895 int test (int i, double x);
4896 struct s1 {int (*f) (int a);};
4897 struct s2 {int (*f) (double a);};
4898 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4899 int argc;
4900 char **argv;
4901 int
4902 main ()
4903 {
4904 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4905   ;
4906   return 0;
4907 }
4908 _ACEOF
4909 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4910         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4911 do
4912   CC="$ac_save_CC $ac_arg"
4913   if ac_fn_c_try_compile "$LINENO"; then :
4914   ac_cv_prog_cc_c89=$ac_arg
4915 fi
4916 rm -f core conftest.err conftest.$ac_objext
4917   test "x$ac_cv_prog_cc_c89" != "xno" && break
4918 done
4919 rm -f conftest.$ac_ext
4920 CC=$ac_save_CC
4921
4922 fi
4923 # AC_CACHE_VAL
4924 case "x$ac_cv_prog_cc_c89" in
4925   x)
4926     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4927 $as_echo "none needed" >&6; } ;;
4928   xno)
4929     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4930 $as_echo "unsupported" >&6; } ;;
4931   *)
4932     CC="$CC $ac_cv_prog_cc_c89"
4933     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4934 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4935 esac
4936 if test "x$ac_cv_prog_cc_c89" != xno; then :
4937
4938 fi
4939
4940 ac_ext=c
4941 ac_cpp='$CPP $CPPFLAGS'
4942 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4943 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4944 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4945
4946
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
4948 $as_echo_n "checking $CC dependency flag... " >&6; }
4949 echo 'void f(){}' >conftest.c
4950 if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
4951         DEPFLAG="-MM"
4952 else
4953   if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
4954         DEPFLAG="-xM1"
4955   else
4956         DEPFLAG="-MM"  # dunno do something
4957   fi
4958 fi
4959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
4960 $as_echo "$DEPFLAG" >&6; }
4961 rm -f conftest.c
4962
4963
4964
4965
4966
4967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
4968 $as_echo_n "checking whether $CC supports -Werror... " >&6; }
4969 cache=`echo Werror | sed 'y%.=/+-%___p_%'`
4970 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4971   $as_echo_n "(cached) " >&6
4972 else
4973
4974 echo 'void f(void){}' >conftest.c
4975 if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
4976 eval "cv_prog_cc_flag_$cache=yes"
4977 else
4978 eval "cv_prog_cc_flag_$cache=no"
4979 fi
4980 rm -f conftest conftest.o conftest.c
4981
4982 fi
4983
4984 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4986 $as_echo "yes" >&6; }
4987 :
4988 ERRFLAG="-Werror"
4989 else
4990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4991 $as_echo "no" >&6; }
4992 :
4993 ERRFLAG="-errwarn"
4994 fi
4995
4996
4997
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
4999 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5000 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5001 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5002   $as_echo_n "(cached) " >&6
5003 else
5004
5005 echo 'void f(void){}' >conftest.c
5006 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5007 eval "cv_prog_cc_flag_$cache=yes"
5008 else
5009 eval "cv_prog_cc_flag_$cache=no"
5010 fi
5011 rm -f conftest conftest.o conftest.c
5012
5013 fi
5014
5015 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5017 $as_echo "yes" >&6; }
5018 :
5019 ERRFLAG="$ERRFLAG -Wall"
5020 else
5021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5022 $as_echo "no" >&6; }
5023 :
5024 ERRFLAG="$ERRFLAG -errfmt"
5025 fi
5026
5027
5028
5029
5030
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5032 $as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5033 cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5034 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5035   $as_echo_n "(cached) " >&6
5036 else
5037
5038 echo 'void f(void){}' >conftest.c
5039 if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5040 eval "cv_prog_cc_flag_$cache=yes"
5041 else
5042 eval "cv_prog_cc_flag_$cache=no"
5043 fi
5044 rm -f conftest conftest.o conftest.c
5045
5046 fi
5047
5048 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5050 $as_echo "yes" >&6; }
5051 :
5052 C99FLAG="-std=c99"
5053 else
5054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5055 $as_echo "no" >&6; }
5056 :
5057
5058 fi
5059
5060
5061
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5063 $as_echo_n "checking whether $CC supports -xc99... " >&6; }
5064 cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5065 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5066   $as_echo_n "(cached) " >&6
5067 else
5068
5069 echo 'void f(void){}' >conftest.c
5070 if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5071 eval "cv_prog_cc_flag_$cache=yes"
5072 else
5073 eval "cv_prog_cc_flag_$cache=no"
5074 fi
5075 rm -f conftest conftest.o conftest.c
5076
5077 fi
5078
5079 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5081 $as_echo "yes" >&6; }
5082 :
5083 C99FLAG="-xc99"
5084 else
5085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5086 $as_echo "no" >&6; }
5087 :
5088
5089 fi
5090
5091
5092 for ac_header in getopt.h time.h
5093 do :
5094   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5095 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5096 "
5097 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5098   cat >>confdefs.h <<_ACEOF
5099 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5100 _ACEOF
5101
5102 fi
5103
5104 done
5105
5106
5107
5108
5109
5110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC" >&5
5111 $as_echo_n "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC... " >&6; }
5112 cache=`$as_echo "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE" | $as_tr_sh`
5113 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5114   $as_echo_n "(cached) " >&6
5115 else
5116
5117 echo '
5118 #include "confdefs.h"
5119 #include <stdlib.h>
5120 #include <ctype.h>
5121 #include <sys/time.h>
5122 #ifdef HAVE_TIME_H
5123 #include <time.h>
5124 #endif
5125 #include <unistd.h>
5126 #include <netdb.h>
5127 #ifdef HAVE_GETOPT_H
5128 #include <getopt.h>
5129 #endif
5130
5131 int test() {
5132         int a;
5133         char **opts = NULL;
5134         struct timeval tv;
5135         char *t;
5136         time_t time = 0;
5137         char *buf = NULL;
5138         const char* str = NULL;
5139         struct msghdr msg;
5140         msg.msg_control = 0;
5141         t = ctime_r(&time, buf);
5142         tv.tv_usec = 10;
5143         srandom(32);
5144         a = getopt(2, opts, "a");
5145         a = isascii(32);
5146         str = gai_strerror(0);
5147         if(str && t && tv.tv_usec && msg.msg_control)
5148                 a = 0;
5149         return a;
5150 }
5151 ' > conftest.c
5152 echo 'void f(){}' >>conftest.c
5153 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5154 eval "cv_prog_cc_flag_needed_$cache=no"
5155 else
5156
5157 if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5158 eval "cv_prog_cc_flag_needed_$cache=yes"
5159 else
5160 eval "cv_prog_cc_flag_needed_$cache=fail"
5161 #echo 'Test with flag fails too!'
5162 #cat conftest.c
5163 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5164 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5165 #exit 1
5166 fi
5167
5168 fi
5169 rm -f conftest conftest.c conftest.o
5170
5171 fi
5172
5173 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5175 $as_echo "yes" >&6; }
5176 :
5177 CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE"
5178 else
5179 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5181 $as_echo "no" >&6; }
5182 #echo 'Test with flag is no!'
5183 #cat conftest.c
5184 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5185 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5186 #exit 1
5187 :
5188
5189 else
5190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5191 $as_echo "failed" >&6; }
5192 :
5193
5194 fi
5195 fi
5196
5197
5198
5199
5200
5201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC" >&5
5202 $as_echo_n "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC... " >&6; }
5203 cache=`$as_echo "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE" | $as_tr_sh`
5204 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5205   $as_echo_n "(cached) " >&6
5206 else
5207
5208 echo '
5209 #include "confdefs.h"
5210 #include <stdlib.h>
5211 #include <ctype.h>
5212 #include <sys/time.h>
5213 #ifdef HAVE_TIME_H
5214 #include <time.h>
5215 #endif
5216 #include <unistd.h>
5217 #include <netdb.h>
5218 #ifdef HAVE_GETOPT_H
5219 #include <getopt.h>
5220 #endif
5221
5222 int test() {
5223         int a;
5224         char **opts = NULL;
5225         struct timeval tv;
5226         char *t;
5227         time_t time = 0;
5228         char *buf = NULL;
5229         const char* str = NULL;
5230         struct msghdr msg;
5231         msg.msg_control = 0;
5232         t = ctime_r(&time, buf);
5233         tv.tv_usec = 10;
5234         srandom(32);
5235         a = getopt(2, opts, "a");
5236         a = isascii(32);
5237         str = gai_strerror(0);
5238         if(str && t && tv.tv_usec && msg.msg_control)
5239                 a = 0;
5240         return a;
5241 }
5242 ' > conftest.c
5243 echo 'void f(){}' >>conftest.c
5244 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5245 eval "cv_prog_cc_flag_needed_$cache=no"
5246 else
5247
5248 if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5249 eval "cv_prog_cc_flag_needed_$cache=yes"
5250 else
5251 eval "cv_prog_cc_flag_needed_$cache=fail"
5252 #echo 'Test with flag fails too!'
5253 #cat conftest.c
5254 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5255 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5256 #exit 1
5257 fi
5258
5259 fi
5260 rm -f conftest conftest.c conftest.o
5261
5262 fi
5263
5264 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5266 $as_echo "yes" >&6; }
5267 :
5268 CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5269 else
5270 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5272 $as_echo "no" >&6; }
5273 #echo 'Test with flag is no!'
5274 #cat conftest.c
5275 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5276 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5277 #exit 1
5278 :
5279
5280 else
5281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5282 $as_echo "failed" >&6; }
5283 :
5284
5285 fi
5286 fi
5287
5288
5289
5290
5291
5292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5293 $as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5294 cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5295 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5296   $as_echo_n "(cached) " >&6
5297 else
5298
5299 echo '
5300 #include <stdbool.h>
5301 #include <ctype.h>
5302 int test() {
5303         int a = 0;
5304         return a;
5305 }
5306 ' > conftest.c
5307 echo 'void f(){}' >>conftest.c
5308 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5309 eval "cv_prog_cc_flag_needed_$cache=no"
5310 else
5311
5312 if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5313 eval "cv_prog_cc_flag_needed_$cache=yes"
5314 else
5315 eval "cv_prog_cc_flag_needed_$cache=fail"
5316 #echo 'Test with flag fails too!'
5317 #cat conftest.c
5318 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5319 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5320 #exit 1
5321 fi
5322
5323 fi
5324 rm -f conftest conftest.c conftest.o
5325
5326 fi
5327
5328 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5330 $as_echo "yes" >&6; }
5331 :
5332 CFLAGS="$CFLAGS $C99FLAG"
5333 else
5334 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5336 $as_echo "no" >&6; }
5337 #echo 'Test with flag is no!'
5338 #cat conftest.c
5339 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5340 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5341 #exit 1
5342 :
5343
5344 else
5345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5346 $as_echo "failed" >&6; }
5347 :
5348
5349 fi
5350 fi
5351
5352
5353
5354
5355
5356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
5357 $as_echo_n "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
5358 cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
5359 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5360   $as_echo_n "(cached) " >&6
5361 else
5362
5363 echo '
5364 #include <ctype.h>
5365
5366 int test() {
5367         int a;
5368         a = isascii(32);
5369         return a;
5370 }
5371 ' > conftest.c
5372 echo 'void f(){}' >>conftest.c
5373 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5374 eval "cv_prog_cc_flag_needed_$cache=no"
5375 else
5376
5377 if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5378 eval "cv_prog_cc_flag_needed_$cache=yes"
5379 else
5380 eval "cv_prog_cc_flag_needed_$cache=fail"
5381 #echo 'Test with flag fails too!'
5382 #cat conftest.c
5383 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5384 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5385 #exit 1
5386 fi
5387
5388 fi
5389 rm -f conftest conftest.c conftest.o
5390
5391 fi
5392
5393 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5395 $as_echo "yes" >&6; }
5396 :
5397 CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
5398 else
5399 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5401 $as_echo "no" >&6; }
5402 #echo 'Test with flag is no!'
5403 #cat conftest.c
5404 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5405 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5406 #exit 1
5407 :
5408
5409 else
5410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5411 $as_echo "failed" >&6; }
5412 :
5413
5414 fi
5415 fi
5416
5417
5418
5419
5420
5421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5422 $as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5423 cache=_D_GNU_SOURCE
5424 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5425   $as_echo_n "(cached) " >&6
5426 else
5427
5428 echo '
5429 #include <netinet/in.h>
5430
5431 int test() {
5432         struct in6_pktinfo inf;
5433         int a = (int)sizeof(inf);
5434         return a;
5435 }
5436 ' > conftest.c
5437 echo 'void f(){}' >>conftest.c
5438 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5439 eval "cv_prog_cc_flag_needed_$cache=no"
5440 else
5441
5442 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5443 eval "cv_prog_cc_flag_needed_$cache=yes"
5444 else
5445 eval "cv_prog_cc_flag_needed_$cache=fail"
5446 #echo 'Test with flag fails too!'
5447 #cat conftest.c
5448 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5449 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5450 #exit 1
5451 fi
5452
5453 fi
5454 rm -f conftest conftest.c conftest.o
5455
5456 fi
5457
5458 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5460 $as_echo "yes" >&6; }
5461 :
5462 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5463 else
5464 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5466 $as_echo "no" >&6; }
5467 #echo 'Test with flag is no!'
5468 #cat conftest.c
5469 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5470 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5471 #exit 1
5472 :
5473
5474 else
5475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5476 $as_echo "failed" >&6; }
5477 :
5478
5479 fi
5480 fi
5481
5482
5483 # check again for GNU_SOURCE for setresgid. May fail if setresgid
5484 # is not available at all. -D_FRSRESGID is to make this check unique.
5485 # otherwise we would get the previous cached result.
5486
5487
5488
5489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5490 $as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5491 cache=_D_GNU_SOURCE__D_FRSRESGID
5492 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5493   $as_echo_n "(cached) " >&6
5494 else
5495
5496 echo '
5497 #include <unistd.h>
5498
5499 int test() {
5500         int a = setresgid(0,0,0);
5501         a = setresuid(0,0,0);
5502         return a;
5503 }
5504 ' > conftest.c
5505 echo 'void f(){}' >>conftest.c
5506 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5507 eval "cv_prog_cc_flag_needed_$cache=no"
5508 else
5509
5510 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5511 eval "cv_prog_cc_flag_needed_$cache=yes"
5512 else
5513 eval "cv_prog_cc_flag_needed_$cache=fail"
5514 #echo 'Test with flag fails too!'
5515 #cat conftest.c
5516 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5517 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5518 #exit 1
5519 fi
5520
5521 fi
5522 rm -f conftest conftest.c conftest.o
5523
5524 fi
5525
5526 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5528 $as_echo "yes" >&6; }
5529 :
5530 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5531 else
5532 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5534 $as_echo "no" >&6; }
5535 #echo 'Test with flag is no!'
5536 #cat conftest.c
5537 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5538 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5539 #exit 1
5540 :
5541
5542 else
5543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5544 $as_echo "failed" >&6; }
5545 :
5546
5547 fi
5548 fi
5549
5550
5551
5552
5553
5554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5555 $as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5556 cache=_D_POSIX_C_SOURCE_200112
5557 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5558   $as_echo_n "(cached) " >&6
5559 else
5560
5561 echo '
5562 #include "confdefs.h"
5563 #ifdef HAVE_TIME_H
5564 #include <time.h>
5565 #endif
5566 #include <netdb.h>
5567
5568 int test() {
5569         int a = 0;
5570         char *t;
5571         time_t time = 0;
5572         char *buf = NULL;
5573         const char* str = NULL;
5574         t = ctime_r(&time, buf);
5575         str = gai_strerror(0);
5576         if(t && str)
5577                 a = 0;
5578         return a;
5579 }
5580 ' > conftest.c
5581 echo 'void f(){}' >>conftest.c
5582 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5583 eval "cv_prog_cc_flag_needed_$cache=no"
5584 else
5585
5586 if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5587 eval "cv_prog_cc_flag_needed_$cache=yes"
5588 else
5589 eval "cv_prog_cc_flag_needed_$cache=fail"
5590 #echo 'Test with flag fails too!'
5591 #cat conftest.c
5592 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5593 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5594 #exit 1
5595 fi
5596
5597 fi
5598 rm -f conftest conftest.c conftest.o
5599
5600 fi
5601
5602 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5604 $as_echo "yes" >&6; }
5605 :
5606 CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5607 else
5608 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5610 $as_echo "no" >&6; }
5611 #echo 'Test with flag is no!'
5612 #cat conftest.c
5613 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5614 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5615 #exit 1
5616 :
5617
5618 else
5619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5620 $as_echo "failed" >&6; }
5621 :
5622
5623 fi
5624 fi
5625
5626
5627
5628
5629
5630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5631 $as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5632 cache=_D__EXTENSIONS__
5633 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5634   $as_echo_n "(cached) " >&6
5635 else
5636
5637 echo '
5638 #include "confdefs.h"
5639 #include <stdlib.h>
5640 #include <ctype.h>
5641 #include <sys/time.h>
5642 #ifdef HAVE_TIME_H
5643 #include <time.h>
5644 #endif
5645 #include <unistd.h>
5646 #ifdef HAVE_GETOPT_H
5647 #include <getopt.h>
5648 #endif
5649
5650 int test() {
5651         int a;
5652         char **opts = NULL;
5653         struct timeval tv;
5654         tv.tv_usec = 10;
5655         srandom(32);
5656         a = getopt(2, opts, "a");
5657         a = isascii(32);
5658         if(tv.tv_usec)
5659                 a = 0;
5660         return a;
5661 }
5662 ' > conftest.c
5663 echo 'void f(){}' >>conftest.c
5664 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5665 eval "cv_prog_cc_flag_needed_$cache=no"
5666 else
5667
5668 if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5669 eval "cv_prog_cc_flag_needed_$cache=yes"
5670 else
5671 eval "cv_prog_cc_flag_needed_$cache=fail"
5672 #echo 'Test with flag fails too!'
5673 #cat conftest.c
5674 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5675 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5676 #exit 1
5677 fi
5678
5679 fi
5680 rm -f conftest conftest.c conftest.o
5681
5682 fi
5683
5684 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5686 $as_echo "yes" >&6; }
5687 :
5688 CFLAGS="$CFLAGS -D__EXTENSIONS__"
5689 else
5690 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692 $as_echo "no" >&6; }
5693 #echo 'Test with flag is no!'
5694 #cat conftest.c
5695 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5696 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5697 #exit 1
5698 :
5699
5700 else
5701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5702 $as_echo "failed" >&6; }
5703 :
5704
5705 fi
5706 fi
5707
5708
5709
5710
5711 # debug mode flags warnings
5712 # Check whether --enable-checking was given.
5713 if test "${enable_checking+set}" = set; then :
5714   enableval=$enable_checking;
5715 fi
5716
5717 # Check whether --enable-debug was given.
5718 if test "${enable_debug+set}" = set; then :
5719   enableval=$enable_debug;
5720 fi
5721
5722 if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5723 else debug_enabled="$enable_checking"; fi
5724
5725 case "$debug_enabled" in
5726         yes)
5727
5728
5729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5730 $as_echo_n "checking whether $CC supports -W... " >&6; }
5731 cache=`echo W | sed 'y%.=/+-%___p_%'`
5732 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5733   $as_echo_n "(cached) " >&6
5734 else
5735
5736 echo 'void f(void){}' >conftest.c
5737 if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5738 eval "cv_prog_cc_flag_$cache=yes"
5739 else
5740 eval "cv_prog_cc_flag_$cache=no"
5741 fi
5742 rm -f conftest conftest.o conftest.c
5743
5744 fi
5745
5746 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5748 $as_echo "yes" >&6; }
5749 :
5750 CFLAGS="$CFLAGS -W"
5751 else
5752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5753 $as_echo "no" >&6; }
5754 :
5755
5756 fi
5757
5758
5759
5760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5761 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5762 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5763 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5764   $as_echo_n "(cached) " >&6
5765 else
5766
5767 echo 'void f(void){}' >conftest.c
5768 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5769 eval "cv_prog_cc_flag_$cache=yes"
5770 else
5771 eval "cv_prog_cc_flag_$cache=no"
5772 fi
5773 rm -f conftest conftest.o conftest.c
5774
5775 fi
5776
5777 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5779 $as_echo "yes" >&6; }
5780 :
5781 CFLAGS="$CFLAGS -Wall"
5782 else
5783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5784 $as_echo "no" >&6; }
5785 :
5786
5787 fi
5788
5789
5790
5791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5792 $as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5793 cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5794 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5795   $as_echo_n "(cached) " >&6
5796 else
5797
5798 echo 'void f(void){}' >conftest.c
5799 if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5800 eval "cv_prog_cc_flag_$cache=yes"
5801 else
5802 eval "cv_prog_cc_flag_$cache=no"
5803 fi
5804 rm -f conftest conftest.o conftest.c
5805
5806 fi
5807
5808 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5810 $as_echo "yes" >&6; }
5811 :
5812 CFLAGS="$CFLAGS -Wextra"
5813 else
5814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5815 $as_echo "no" >&6; }
5816 :
5817
5818 fi
5819
5820
5821
5822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
5823 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
5824 cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
5825 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5826   $as_echo_n "(cached) " >&6
5827 else
5828
5829 echo 'void f(void){}' >conftest.c
5830 if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
5831 eval "cv_prog_cc_flag_$cache=yes"
5832 else
5833 eval "cv_prog_cc_flag_$cache=no"
5834 fi
5835 rm -f conftest conftest.o conftest.c
5836
5837 fi
5838
5839 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5841 $as_echo "yes" >&6; }
5842 :
5843 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
5844 else
5845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5846 $as_echo "no" >&6; }
5847 :
5848
5849 fi
5850
5851
5852 $as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
5853
5854                 ;;
5855         no|*)
5856                 # nothing to do.
5857                 ;;
5858 esac
5859
5860     # Check whether --enable-flto was given.
5861 if test "${enable_flto+set}" = set; then :
5862   enableval=$enable_flto;
5863 fi
5864
5865     if test "x$enable_flto" != "xno"; then :
5866
5867         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
5868 $as_echo_n "checking if $CC supports -flto... " >&6; }
5869         BAKCFLAGS="$CFLAGS"
5870         CFLAGS="$CFLAGS -flto"
5871         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5872 /* end confdefs.h.  */
5873
5874 int
5875 main ()
5876 {
5877
5878   ;
5879   return 0;
5880 }
5881 _ACEOF
5882 if ac_fn_c_try_link "$LINENO"; then :
5883
5884             if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
5885                 CFLAGS="$BAKCFLAGS"
5886                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5887 $as_echo "no" >&6; }
5888             else
5889                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5890 $as_echo "yes" >&6; }
5891             fi
5892             rm -f conftest conftest.c conftest.o
5893
5894 else
5895   CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5896 $as_echo "no" >&6; }
5897 fi
5898 rm -f core conftest.err conftest.$ac_objext \
5899     conftest$ac_exeext conftest.$ac_ext
5900
5901 fi
5902
5903
5904     # Check whether --enable-pie was given.
5905 if test "${enable_pie+set}" = set; then :
5906   enableval=$enable_pie;
5907 fi
5908
5909     if test "x$enable_pie" = "xyes"; then :
5910
5911         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
5912 $as_echo_n "checking if $CC supports PIE... " >&6; }
5913         BAKLDFLAGS="$LDFLAGS"
5914         BAKCFLAGS="$CFLAGS"
5915         LDFLAGS="$LDFLAGS -pie"
5916         CFLAGS="$CFLAGS -fPIE"
5917         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5918 /* end confdefs.h.  */
5919
5920 int
5921 main ()
5922 {
5923
5924   ;
5925   return 0;
5926 }
5927 _ACEOF
5928 if ac_fn_c_try_link "$LINENO"; then :
5929
5930             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
5931                 LDFLAGS="$BAKLDFLAGS"
5932                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5933 $as_echo "no" >&6; }
5934             else
5935                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5936 $as_echo "yes" >&6; }
5937             fi
5938             rm -f conftest conftest.c conftest.o
5939
5940 else
5941   LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5942 $as_echo "no" >&6; }
5943 fi
5944 rm -f core conftest.err conftest.$ac_objext \
5945     conftest$ac_exeext conftest.$ac_ext
5946
5947 fi
5948
5949
5950     # Check whether --enable-relro_now was given.
5951 if test "${enable_relro_now+set}" = set; then :
5952   enableval=$enable_relro_now;
5953 fi
5954
5955     if test "x$enable_relro_now" = "xyes"; then :
5956
5957         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
5958 $as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
5959         BAKLDFLAGS="$LDFLAGS"
5960         LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
5961         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5962 /* end confdefs.h.  */
5963
5964 int
5965 main ()
5966 {
5967
5968   ;
5969   return 0;
5970 }
5971 _ACEOF
5972 if ac_fn_c_try_link "$LINENO"; then :
5973
5974             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
5975                 LDFLAGS="$BAKLDFLAGS"
5976                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977 $as_echo "no" >&6; }
5978             else
5979                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5980 $as_echo "yes" >&6; }
5981             fi
5982             rm -f conftest conftest.c conftest.o
5983
5984 else
5985   LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5986 $as_echo "no" >&6; }
5987 fi
5988 rm -f core conftest.err conftest.$ac_objext \
5989     conftest$ac_exeext conftest.$ac_ext
5990
5991 fi
5992
5993
5994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5995 $as_echo_n "checking for inline... " >&6; }
5996 if ${ac_cv_c_inline+:} false; then :
5997   $as_echo_n "(cached) " >&6
5998 else
5999   ac_cv_c_inline=no
6000 for ac_kw in inline __inline__ __inline; do
6001   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6002 /* end confdefs.h.  */
6003 #ifndef __cplusplus
6004 typedef int foo_t;
6005 static $ac_kw foo_t static_foo () {return 0; }
6006 $ac_kw foo_t foo () {return 0; }
6007 #endif
6008
6009 _ACEOF
6010 if ac_fn_c_try_compile "$LINENO"; then :
6011   ac_cv_c_inline=$ac_kw
6012 fi
6013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6014   test "$ac_cv_c_inline" != no && break
6015 done
6016
6017 fi
6018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6019 $as_echo "$ac_cv_c_inline" >&6; }
6020
6021 case $ac_cv_c_inline in
6022   inline | yes) ;;
6023   *)
6024     case $ac_cv_c_inline in
6025       no) ac_val=;;
6026       *) ac_val=$ac_cv_c_inline;;
6027     esac
6028     cat >>confdefs.h <<_ACEOF
6029 #ifndef __cplusplus
6030 #define inline $ac_val
6031 #endif
6032 _ACEOF
6033     ;;
6034 esac
6035
6036
6037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6038 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6039 if ${ac_cv_c_format_attribute+:} false; then :
6040   $as_echo_n "(cached) " >&6
6041 else
6042   ac_cv_c_format_attribute=no
6043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6044 /* end confdefs.h.  */
6045 #include <stdio.h>
6046 void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6047 void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6048
6049 int
6050 main ()
6051 {
6052
6053    f ("%s", "str");
6054
6055   ;
6056   return 0;
6057 }
6058 _ACEOF
6059 if ac_fn_c_try_compile "$LINENO"; then :
6060   ac_cv_c_format_attribute="yes"
6061 else
6062   ac_cv_c_format_attribute="no"
6063 fi
6064 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6065
6066 fi
6067
6068
6069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6070 $as_echo "$ac_cv_c_format_attribute" >&6; }
6071 if test $ac_cv_c_format_attribute = yes; then
6072
6073 $as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6074
6075 fi
6076
6077
6078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6079 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6080 if ${ac_cv_c_unused_attribute+:} false; then :
6081   $as_echo_n "(cached) " >&6
6082 else
6083   ac_cv_c_unused_attribute=no
6084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6085 /* end confdefs.h.  */
6086 #include <stdio.h>
6087 void f (char *u __attribute__((unused)));
6088
6089 int
6090 main ()
6091 {
6092
6093    f ("x");
6094
6095   ;
6096   return 0;
6097 }
6098 _ACEOF
6099 if ac_fn_c_try_compile "$LINENO"; then :
6100   ac_cv_c_unused_attribute="yes"
6101 else
6102   ac_cv_c_unused_attribute="no"
6103 fi
6104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6105
6106 fi
6107
6108
6109
6110
6111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6112 $as_echo "$ac_cv_c_unused_attribute" >&6; }
6113 if test $ac_cv_c_unused_attribute = yes; then
6114
6115 $as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6116
6117 fi
6118
6119
6120 if test "$srcdir" != "."; then
6121         CPPFLAGS="$CPPFLAGS -I$srcdir"
6122 fi
6123
6124
6125
6126 for ac_prog in flex lex
6127 do
6128   # Extract the first word of "$ac_prog", so it can be a program name with args.
6129 set dummy $ac_prog; ac_word=$2
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6131 $as_echo_n "checking for $ac_word... " >&6; }
6132 if ${ac_cv_prog_LEX+:} false; then :
6133   $as_echo_n "(cached) " >&6
6134 else
6135   if test -n "$LEX"; then
6136   ac_cv_prog_LEX="$LEX" # Let the user override the test.
6137 else
6138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6139 for as_dir in $PATH
6140 do
6141   IFS=$as_save_IFS
6142   test -z "$as_dir" && as_dir=.
6143     for ac_exec_ext in '' $ac_executable_extensions; do
6144   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6145     ac_cv_prog_LEX="$ac_prog"
6146     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6147     break 2
6148   fi
6149 done
6150   done
6151 IFS=$as_save_IFS
6152
6153 fi
6154 fi
6155 LEX=$ac_cv_prog_LEX
6156 if test -n "$LEX"; then
6157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6158 $as_echo "$LEX" >&6; }
6159 else
6160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6161 $as_echo "no" >&6; }
6162 fi
6163
6164
6165   test -n "$LEX" && break
6166 done
6167 test -n "$LEX" || LEX=":"
6168
6169 if test "x$LEX" != "x:"; then
6170   cat >conftest.l <<_ACEOF
6171 %%
6172 a { ECHO; }
6173 b { REJECT; }
6174 c { yymore (); }
6175 d { yyless (1); }
6176 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6177     yyless ((input () != 0)); }
6178 f { unput (yytext[0]); }
6179 . { BEGIN INITIAL; }
6180 %%
6181 #ifdef YYTEXT_POINTER
6182 extern char *yytext;
6183 #endif
6184 int
6185 main (void)
6186 {
6187   return ! yylex () + ! yywrap ();
6188 }
6189 _ACEOF
6190 { { ac_try="$LEX conftest.l"
6191 case "(($ac_try" in
6192   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6193   *) ac_try_echo=$ac_try;;
6194 esac
6195 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6196 $as_echo "$ac_try_echo"; } >&5
6197   (eval "$LEX conftest.l") 2>&5
6198   ac_status=$?
6199   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6200   test $ac_status = 0; }
6201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6202 $as_echo_n "checking lex output file root... " >&6; }
6203 if ${ac_cv_prog_lex_root+:} false; then :
6204   $as_echo_n "(cached) " >&6
6205 else
6206
6207 if test -f lex.yy.c; then
6208   ac_cv_prog_lex_root=lex.yy
6209 elif test -f lexyy.c; then
6210   ac_cv_prog_lex_root=lexyy
6211 else
6212   as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6213 fi
6214 fi
6215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6216 $as_echo "$ac_cv_prog_lex_root" >&6; }
6217 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6218
6219 if test -z "${LEXLIB+set}"; then
6220   { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6221 $as_echo_n "checking lex library... " >&6; }
6222 if ${ac_cv_lib_lex+:} false; then :
6223   $as_echo_n "(cached) " >&6
6224 else
6225
6226     ac_save_LIBS=$LIBS
6227     ac_cv_lib_lex='none needed'
6228     for ac_lib in '' -lfl -ll; do
6229       LIBS="$ac_lib $ac_save_LIBS"
6230       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6231 /* end confdefs.h.  */
6232 `cat $LEX_OUTPUT_ROOT.c`
6233 _ACEOF
6234 if ac_fn_c_try_link "$LINENO"; then :
6235   ac_cv_lib_lex=$ac_lib
6236 fi
6237 rm -f core conftest.err conftest.$ac_objext \
6238     conftest$ac_exeext conftest.$ac_ext
6239       test "$ac_cv_lib_lex" != 'none needed' && break
6240     done
6241     LIBS=$ac_save_LIBS
6242
6243 fi
6244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6245 $as_echo "$ac_cv_lib_lex" >&6; }
6246   test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6247 fi
6248
6249
6250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6251 $as_echo_n "checking whether yytext is a pointer... " >&6; }
6252 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6253   $as_echo_n "(cached) " >&6
6254 else
6255   # POSIX says lex can declare yytext either as a pointer or an array; the
6256 # default is implementation-dependent.  Figure out which it is, since
6257 # not all implementations provide the %pointer and %array declarations.
6258 ac_cv_prog_lex_yytext_pointer=no
6259 ac_save_LIBS=$LIBS
6260 LIBS="$LEXLIB $ac_save_LIBS"
6261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6262 /* end confdefs.h.  */
6263
6264   #define YYTEXT_POINTER 1
6265 `cat $LEX_OUTPUT_ROOT.c`
6266 _ACEOF
6267 if ac_fn_c_try_link "$LINENO"; then :
6268   ac_cv_prog_lex_yytext_pointer=yes
6269 fi
6270 rm -f core conftest.err conftest.$ac_objext \
6271     conftest$ac_exeext conftest.$ac_ext
6272 LIBS=$ac_save_LIBS
6273
6274 fi
6275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6276 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6277 if test $ac_cv_prog_lex_yytext_pointer = yes; then
6278
6279 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6280
6281 fi
6282 rm -f conftest.l $LEX_OUTPUT_ROOT.c
6283
6284 fi
6285
6286         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6287 $as_echo_n "checking for yylex_destroy... " >&6; }
6288         if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6289
6290 $as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6291
6292                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6293 $as_echo "yes" >&6; }
6294         else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6295 $as_echo "no" >&6; }; fi
6296
6297 for ac_prog in 'bison -y' byacc
6298 do
6299   # Extract the first word of "$ac_prog", so it can be a program name with args.
6300 set dummy $ac_prog; ac_word=$2
6301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6302 $as_echo_n "checking for $ac_word... " >&6; }
6303 if ${ac_cv_prog_YACC+:} false; then :
6304   $as_echo_n "(cached) " >&6
6305 else
6306   if test -n "$YACC"; then
6307   ac_cv_prog_YACC="$YACC" # Let the user override the test.
6308 else
6309 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6310 for as_dir in $PATH
6311 do
6312   IFS=$as_save_IFS
6313   test -z "$as_dir" && as_dir=.
6314     for ac_exec_ext in '' $ac_executable_extensions; do
6315   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6316     ac_cv_prog_YACC="$ac_prog"
6317     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6318     break 2
6319   fi
6320 done
6321   done
6322 IFS=$as_save_IFS
6323
6324 fi
6325 fi
6326 YACC=$ac_cv_prog_YACC
6327 if test -n "$YACC"; then
6328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6329 $as_echo "$YACC" >&6; }
6330 else
6331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6332 $as_echo "no" >&6; }
6333 fi
6334
6335
6336   test -n "$YACC" && break
6337 done
6338 test -n "$YACC" || YACC="yacc"
6339
6340 # Extract the first word of "doxygen", so it can be a program name with args.
6341 set dummy doxygen; ac_word=$2
6342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6343 $as_echo_n "checking for $ac_word... " >&6; }
6344 if ${ac_cv_prog_doxygen+:} false; then :
6345   $as_echo_n "(cached) " >&6
6346 else
6347   if test -n "$doxygen"; then
6348   ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6349 else
6350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6351 for as_dir in $PATH
6352 do
6353   IFS=$as_save_IFS
6354   test -z "$as_dir" && as_dir=.
6355     for ac_exec_ext in '' $ac_executable_extensions; do
6356   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6357     ac_cv_prog_doxygen="doxygen"
6358     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6359     break 2
6360   fi
6361 done
6362   done
6363 IFS=$as_save_IFS
6364
6365 fi
6366 fi
6367 doxygen=$ac_cv_prog_doxygen
6368 if test -n "$doxygen"; then
6369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6370 $as_echo "$doxygen" >&6; }
6371 else
6372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6373 $as_echo "no" >&6; }
6374 fi
6375
6376
6377 if test -n "$ac_tool_prefix"; then
6378   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6379 set dummy ${ac_tool_prefix}strip; ac_word=$2
6380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6381 $as_echo_n "checking for $ac_word... " >&6; }
6382 if ${ac_cv_prog_STRIP+:} false; then :
6383   $as_echo_n "(cached) " >&6
6384 else
6385   if test -n "$STRIP"; then
6386   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6387 else
6388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6389 for as_dir in $PATH
6390 do
6391   IFS=$as_save_IFS
6392   test -z "$as_dir" && as_dir=.
6393     for ac_exec_ext in '' $ac_executable_extensions; do
6394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6395     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6397     break 2
6398   fi
6399 done
6400   done
6401 IFS=$as_save_IFS
6402
6403 fi
6404 fi
6405 STRIP=$ac_cv_prog_STRIP
6406 if test -n "$STRIP"; then
6407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6408 $as_echo "$STRIP" >&6; }
6409 else
6410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6411 $as_echo "no" >&6; }
6412 fi
6413
6414
6415 fi
6416 if test -z "$ac_cv_prog_STRIP"; then
6417   ac_ct_STRIP=$STRIP
6418   # Extract the first word of "strip", so it can be a program name with args.
6419 set dummy strip; ac_word=$2
6420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6421 $as_echo_n "checking for $ac_word... " >&6; }
6422 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6423   $as_echo_n "(cached) " >&6
6424 else
6425   if test -n "$ac_ct_STRIP"; then
6426   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6427 else
6428 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6429 for as_dir in $PATH
6430 do
6431   IFS=$as_save_IFS
6432   test -z "$as_dir" && as_dir=.
6433     for ac_exec_ext in '' $ac_executable_extensions; do
6434   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6435     ac_cv_prog_ac_ct_STRIP="strip"
6436     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6437     break 2
6438   fi
6439 done
6440   done
6441 IFS=$as_save_IFS
6442
6443 fi
6444 fi
6445 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6446 if test -n "$ac_ct_STRIP"; then
6447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6448 $as_echo "$ac_ct_STRIP" >&6; }
6449 else
6450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451 $as_echo "no" >&6; }
6452 fi
6453
6454   if test "x$ac_ct_STRIP" = x; then
6455     STRIP=""
6456   else
6457     case $cross_compiling:$ac_tool_warned in
6458 yes:)
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6460 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6461 ac_tool_warned=yes ;;
6462 esac
6463     STRIP=$ac_ct_STRIP
6464   fi
6465 else
6466   STRIP="$ac_cv_prog_STRIP"
6467 fi
6468
6469 ac_aux_dir=
6470 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6471   if test -f "$ac_dir/install-sh"; then
6472     ac_aux_dir=$ac_dir
6473     ac_install_sh="$ac_aux_dir/install-sh -c"
6474     break
6475   elif test -f "$ac_dir/install.sh"; then
6476     ac_aux_dir=$ac_dir
6477     ac_install_sh="$ac_aux_dir/install.sh -c"
6478     break
6479   elif test -f "$ac_dir/shtool"; then
6480     ac_aux_dir=$ac_dir
6481     ac_install_sh="$ac_aux_dir/shtool install -c"
6482     break
6483   fi
6484 done
6485 if test -z "$ac_aux_dir"; then
6486   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6487 fi
6488
6489 # These three variables are undocumented and unsupported,
6490 # and are intended to be withdrawn in a future Autoconf release.
6491 # They can cause serious problems if a builder's source tree is in a directory
6492 # whose full name contains unusual characters.
6493 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6494 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6495 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6496
6497
6498 # Make sure we can run config.sub.
6499 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6500   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6501
6502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6503 $as_echo_n "checking build system type... " >&6; }
6504 if ${ac_cv_build+:} false; then :
6505   $as_echo_n "(cached) " >&6
6506 else
6507   ac_build_alias=$build_alias
6508 test "x$ac_build_alias" = x &&
6509   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6510 test "x$ac_build_alias" = x &&
6511   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6512 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6513   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6514
6515 fi
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6517 $as_echo "$ac_cv_build" >&6; }
6518 case $ac_cv_build in
6519 *-*-*) ;;
6520 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6521 esac
6522 build=$ac_cv_build
6523 ac_save_IFS=$IFS; IFS='-'
6524 set x $ac_cv_build
6525 shift
6526 build_cpu=$1
6527 build_vendor=$2
6528 shift; shift
6529 # Remember, the first character of IFS is used to create $*,
6530 # except with old shells:
6531 build_os=$*
6532 IFS=$ac_save_IFS
6533 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6534
6535
6536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6537 $as_echo_n "checking host system type... " >&6; }
6538 if ${ac_cv_host+:} false; then :
6539   $as_echo_n "(cached) " >&6
6540 else
6541   if test "x$host_alias" = x; then
6542   ac_cv_host=$ac_cv_build
6543 else
6544   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6545     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6546 fi
6547
6548 fi
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6550 $as_echo "$ac_cv_host" >&6; }
6551 case $ac_cv_host in
6552 *-*-*) ;;
6553 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6554 esac
6555 host=$ac_cv_host
6556 ac_save_IFS=$IFS; IFS='-'
6557 set x $ac_cv_host
6558 shift
6559 host_cpu=$1
6560 host_vendor=$2
6561 shift; shift
6562 # Remember, the first character of IFS is used to create $*,
6563 # except with old shells:
6564 host_os=$*
6565 IFS=$ac_save_IFS
6566 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6567
6568
6569
6570 # skip these tests, we do not need them.
6571
6572
6573
6574
6575
6576
6577
6578
6579 # always use ./libtool unless override from commandline (libtool=mylibtool)
6580 if test -z "$libtool"; then
6581         libtool="./libtool"
6582 fi
6583
6584 # avoid libtool max commandline length test on systems that fork slowly.
6585
6586 if echo "$host_os" | grep "sunos4" >/dev/null; then
6587         lt_cv_sys_max_cmd_len=32750;
6588 fi
6589 if test -n "$ac_tool_prefix"; then
6590   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6591 set dummy ${ac_tool_prefix}ar; ac_word=$2
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6593 $as_echo_n "checking for $ac_word... " >&6; }
6594 if ${ac_cv_path_AR+:} false; then :
6595   $as_echo_n "(cached) " >&6
6596 else
6597   case $AR in
6598   [\\/]* | ?:[\\/]*)
6599   ac_cv_path_AR="$AR" # Let the user override the test with a path.
6600   ;;
6601   *)
6602   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6603 for as_dir in $PATH
6604 do
6605   IFS=$as_save_IFS
6606   test -z "$as_dir" && as_dir=.
6607     for ac_exec_ext in '' $ac_executable_extensions; do
6608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6609     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6611     break 2
6612   fi
6613 done
6614   done
6615 IFS=$as_save_IFS
6616
6617   ;;
6618 esac
6619 fi
6620 AR=$ac_cv_path_AR
6621 if test -n "$AR"; then
6622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6623 $as_echo "$AR" >&6; }
6624 else
6625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6626 $as_echo "no" >&6; }
6627 fi
6628
6629
6630 fi
6631 if test -z "$ac_cv_path_AR"; then
6632   ac_pt_AR=$AR
6633   # Extract the first word of "ar", so it can be a program name with args.
6634 set dummy ar; ac_word=$2
6635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6636 $as_echo_n "checking for $ac_word... " >&6; }
6637 if ${ac_cv_path_ac_pt_AR+:} false; then :
6638   $as_echo_n "(cached) " >&6
6639 else
6640   case $ac_pt_AR in
6641   [\\/]* | ?:[\\/]*)
6642   ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6643   ;;
6644   *)
6645   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6646 for as_dir in $PATH
6647 do
6648   IFS=$as_save_IFS
6649   test -z "$as_dir" && as_dir=.
6650     for ac_exec_ext in '' $ac_executable_extensions; do
6651   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6652     ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6653     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6654     break 2
6655   fi
6656 done
6657   done
6658 IFS=$as_save_IFS
6659
6660   ;;
6661 esac
6662 fi
6663 ac_pt_AR=$ac_cv_path_ac_pt_AR
6664 if test -n "$ac_pt_AR"; then
6665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6666 $as_echo "$ac_pt_AR" >&6; }
6667 else
6668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6669 $as_echo "no" >&6; }
6670 fi
6671
6672   if test "x$ac_pt_AR" = x; then
6673     AR="false"
6674   else
6675     case $cross_compiling:$ac_tool_warned in
6676 yes:)
6677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6678 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6679 ac_tool_warned=yes ;;
6680 esac
6681     AR=$ac_pt_AR
6682   fi
6683 else
6684   AR="$ac_cv_path_AR"
6685 fi
6686
6687 if test $AR = false; then
6688         as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
6689 fi
6690
6691 case `pwd` in
6692   *\ * | *\     *)
6693     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
6694 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
6695 esac
6696
6697
6698
6699 macro_version='2.4.6'
6700 macro_revision='2.4.6'
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714 ltmain=$ac_aux_dir/ltmain.sh
6715
6716 # Backslashify metacharacters that are still active within
6717 # double-quoted strings.
6718 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6719
6720 # Same as above, but do not quote variable references.
6721 double_quote_subst='s/\(["`\\]\)/\\\1/g'
6722
6723 # Sed substitution to delay expansion of an escaped shell variable in a
6724 # double_quote_subst'ed string.
6725 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6726
6727 # Sed substitution to delay expansion of an escaped single quote.
6728 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
6729
6730 # Sed substitution to avoid accidental globbing in evaled expressions
6731 no_glob_subst='s/\*/\\\*/g'
6732
6733 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6734 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
6735 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
6736
6737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
6738 $as_echo_n "checking how to print strings... " >&6; }
6739 # Test print first, because it will be a builtin if present.
6740 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6741    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6742   ECHO='print -r --'
6743 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6744   ECHO='printf %s\n'
6745 else
6746   # Use this function as a fallback that always works.
6747   func_fallback_echo ()
6748   {
6749     eval 'cat <<_LTECHO_EOF
6750 $1
6751 _LTECHO_EOF'
6752   }
6753   ECHO='func_fallback_echo'
6754 fi
6755
6756 # func_echo_all arg...
6757 # Invoke $ECHO with all args, space-separated.
6758 func_echo_all ()
6759 {
6760     $ECHO ""
6761 }
6762
6763 case $ECHO in
6764   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
6765 $as_echo "printf" >&6; } ;;
6766   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
6767 $as_echo "print -r" >&6; } ;;
6768   *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
6769 $as_echo "cat" >&6; } ;;
6770 esac
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6786 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6787 if ${ac_cv_path_SED+:} false; then :
6788   $as_echo_n "(cached) " >&6
6789 else
6790             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6791      for ac_i in 1 2 3 4 5 6 7; do
6792        ac_script="$ac_script$as_nl$ac_script"
6793      done
6794      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6795      { ac_script=; unset ac_script;}
6796      if test -z "$SED"; then
6797   ac_path_SED_found=false
6798   # Loop through the user's path and test for each of PROGNAME-LIST
6799   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6800 for as_dir in $PATH
6801 do
6802   IFS=$as_save_IFS
6803   test -z "$as_dir" && as_dir=.
6804     for ac_prog in sed gsed; do
6805     for ac_exec_ext in '' $ac_executable_extensions; do
6806       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6807       as_fn_executable_p "$ac_path_SED" || continue
6808 # Check for GNU ac_path_SED and select it if it is found.
6809   # Check for GNU $ac_path_SED
6810 case `"$ac_path_SED" --version 2>&1` in
6811 *GNU*)
6812   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6813 *)
6814   ac_count=0
6815   $as_echo_n 0123456789 >"conftest.in"
6816   while :
6817   do
6818     cat "conftest.in" "conftest.in" >"conftest.tmp"
6819     mv "conftest.tmp" "conftest.in"
6820     cp "conftest.in" "conftest.nl"
6821     $as_echo '' >> "conftest.nl"
6822     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6823     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6824     as_fn_arith $ac_count + 1 && ac_count=$as_val
6825     if test $ac_count -gt ${ac_path_SED_max-0}; then
6826       # Best one so far, save it but keep looking for a better one
6827       ac_cv_path_SED="$ac_path_SED"
6828       ac_path_SED_max=$ac_count
6829     fi
6830     # 10*(2^10) chars as input seems more than enough
6831     test $ac_count -gt 10 && break
6832   done
6833   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6834 esac
6835
6836       $ac_path_SED_found && break 3
6837     done
6838   done
6839   done
6840 IFS=$as_save_IFS
6841   if test -z "$ac_cv_path_SED"; then
6842     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6843   fi
6844 else
6845   ac_cv_path_SED=$SED
6846 fi
6847
6848 fi
6849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6850 $as_echo "$ac_cv_path_SED" >&6; }
6851  SED="$ac_cv_path_SED"
6852   rm -f conftest.sed
6853
6854 test -z "$SED" && SED=sed
6855 Xsed="$SED -e 1s/^X//"
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6868 $as_echo_n "checking for fgrep... " >&6; }
6869 if ${ac_cv_path_FGREP+:} false; then :
6870   $as_echo_n "(cached) " >&6
6871 else
6872   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6873    then ac_cv_path_FGREP="$GREP -F"
6874    else
6875      if test -z "$FGREP"; then
6876   ac_path_FGREP_found=false
6877   # Loop through the user's path and test for each of PROGNAME-LIST
6878   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6879 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6880 do
6881   IFS=$as_save_IFS
6882   test -z "$as_dir" && as_dir=.
6883     for ac_prog in fgrep; do
6884     for ac_exec_ext in '' $ac_executable_extensions; do
6885       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6886       as_fn_executable_p "$ac_path_FGREP" || continue
6887 # Check for GNU ac_path_FGREP and select it if it is found.
6888   # Check for GNU $ac_path_FGREP
6889 case `"$ac_path_FGREP" --version 2>&1` in
6890 *GNU*)
6891   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6892 *)
6893   ac_count=0
6894   $as_echo_n 0123456789 >"conftest.in"
6895   while :
6896   do
6897     cat "conftest.in" "conftest.in" >"conftest.tmp"
6898     mv "conftest.tmp" "conftest.in"
6899     cp "conftest.in" "conftest.nl"
6900     $as_echo 'FGREP' >> "conftest.nl"
6901     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6902     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6903     as_fn_arith $ac_count + 1 && ac_count=$as_val
6904     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6905       # Best one so far, save it but keep looking for a better one
6906       ac_cv_path_FGREP="$ac_path_FGREP"
6907       ac_path_FGREP_max=$ac_count
6908     fi
6909     # 10*(2^10) chars as input seems more than enough
6910     test $ac_count -gt 10 && break
6911   done
6912   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6913 esac
6914
6915       $ac_path_FGREP_found && break 3
6916     done
6917   done
6918   done
6919 IFS=$as_save_IFS
6920   if test -z "$ac_cv_path_FGREP"; then
6921     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6922   fi
6923 else
6924   ac_cv_path_FGREP=$FGREP
6925 fi
6926
6927    fi
6928 fi
6929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6930 $as_echo "$ac_cv_path_FGREP" >&6; }
6931  FGREP="$ac_cv_path_FGREP"
6932
6933
6934 test -z "$GREP" && GREP=grep
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954 # Check whether --with-gnu-ld was given.
6955 if test "${with_gnu_ld+set}" = set; then :
6956   withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
6957 else
6958   with_gnu_ld=no
6959 fi
6960
6961 ac_prog=ld
6962 if test yes = "$GCC"; then
6963   # Check if gcc -print-prog-name=ld gives a path.
6964   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
6965 $as_echo_n "checking for ld used by $CC... " >&6; }
6966   case $host in
6967   *-*-mingw*)
6968     # gcc leaves a trailing carriage return, which upsets mingw
6969     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6970   *)
6971     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6972   esac
6973   case $ac_prog in
6974     # Accept absolute paths.
6975     [\\/]* | ?:[\\/]*)
6976       re_direlt='/[^/][^/]*/\.\./'
6977       # Canonicalize the pathname of ld
6978       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
6979       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
6980         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
6981       done
6982       test -z "$LD" && LD=$ac_prog
6983       ;;
6984   "")
6985     # If it fails, then pretend we aren't using GCC.
6986     ac_prog=ld
6987     ;;
6988   *)
6989     # If it is relative, then search for the first ld in PATH.
6990     with_gnu_ld=unknown
6991     ;;
6992   esac
6993 elif test yes = "$with_gnu_ld"; then
6994   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6995 $as_echo_n "checking for GNU ld... " >&6; }
6996 else
6997   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6998 $as_echo_n "checking for non-GNU ld... " >&6; }
6999 fi
7000 if ${lt_cv_path_LD+:} false; then :
7001   $as_echo_n "(cached) " >&6
7002 else
7003   if test -z "$LD"; then
7004   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7005   for ac_dir in $PATH; do
7006     IFS=$lt_save_ifs
7007     test -z "$ac_dir" && ac_dir=.
7008     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7009       lt_cv_path_LD=$ac_dir/$ac_prog
7010       # Check to see if the program is GNU ld.  I'd rather use --version,
7011       # but apparently some variants of GNU ld only accept -v.
7012       # Break only if it was the GNU/non-GNU ld that we prefer.
7013       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7014       *GNU* | *'with BFD'*)
7015         test no != "$with_gnu_ld" && break
7016         ;;
7017       *)
7018         test yes != "$with_gnu_ld" && break
7019         ;;
7020       esac
7021     fi
7022   done
7023   IFS=$lt_save_ifs
7024 else
7025   lt_cv_path_LD=$LD # Let the user override the test with a path.
7026 fi
7027 fi
7028
7029 LD=$lt_cv_path_LD
7030 if test -n "$LD"; then
7031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7032 $as_echo "$LD" >&6; }
7033 else
7034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7035 $as_echo "no" >&6; }
7036 fi
7037 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7039 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7040 if ${lt_cv_prog_gnu_ld+:} false; then :
7041   $as_echo_n "(cached) " >&6
7042 else
7043   # I'd rather use --version here, but apparently some GNU lds only accept -v.
7044 case `$LD -v 2>&1 </dev/null` in
7045 *GNU* | *'with BFD'*)
7046   lt_cv_prog_gnu_ld=yes
7047   ;;
7048 *)
7049   lt_cv_prog_gnu_ld=no
7050   ;;
7051 esac
7052 fi
7053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7054 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
7055 with_gnu_ld=$lt_cv_prog_gnu_ld
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7066 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7067 if ${lt_cv_path_NM+:} false; then :
7068   $as_echo_n "(cached) " >&6
7069 else
7070   if test -n "$NM"; then
7071   # Let the user override the test.
7072   lt_cv_path_NM=$NM
7073 else
7074   lt_nm_to_check=${ac_tool_prefix}nm
7075   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7076     lt_nm_to_check="$lt_nm_to_check nm"
7077   fi
7078   for lt_tmp_nm in $lt_nm_to_check; do
7079     lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7080     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7081       IFS=$lt_save_ifs
7082       test -z "$ac_dir" && ac_dir=.
7083       tmp_nm=$ac_dir/$lt_tmp_nm
7084       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7085         # Check to see if the nm accepts a BSD-compat flag.
7086         # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7087         #   nm: unknown option "B" ignored
7088         # Tru64's nm complains that /dev/null is an invalid object file
7089         # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7090         case $build_os in
7091         mingw*) lt_bad_file=conftest.nm/nofile ;;
7092         *) lt_bad_file=/dev/null ;;
7093         esac
7094         case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7095         *$lt_bad_file* | *'Invalid file or object type'*)
7096           lt_cv_path_NM="$tmp_nm -B"
7097           break 2
7098           ;;
7099         *)
7100           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7101           */dev/null*)
7102             lt_cv_path_NM="$tmp_nm -p"
7103             break 2
7104             ;;
7105           *)
7106             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7107             continue # so that we can try to find one that supports BSD flags
7108             ;;
7109           esac
7110           ;;
7111         esac
7112       fi
7113     done
7114     IFS=$lt_save_ifs
7115   done
7116   : ${lt_cv_path_NM=no}
7117 fi
7118 fi
7119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7120 $as_echo "$lt_cv_path_NM" >&6; }
7121 if test no != "$lt_cv_path_NM"; then
7122   NM=$lt_cv_path_NM
7123 else
7124   # Didn't find any BSD compatible name lister, look for dumpbin.
7125   if test -n "$DUMPBIN"; then :
7126     # Let the user override the test.
7127   else
7128     if test -n "$ac_tool_prefix"; then
7129   for ac_prog in dumpbin "link -dump"
7130   do
7131     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7132 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7134 $as_echo_n "checking for $ac_word... " >&6; }
7135 if ${ac_cv_prog_DUMPBIN+:} false; then :
7136   $as_echo_n "(cached) " >&6
7137 else
7138   if test -n "$DUMPBIN"; then
7139   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7140 else
7141 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7142 for as_dir in $PATH
7143 do
7144   IFS=$as_save_IFS
7145   test -z "$as_dir" && as_dir=.
7146     for ac_exec_ext in '' $ac_executable_extensions; do
7147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7148     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7150     break 2
7151   fi
7152 done
7153   done
7154 IFS=$as_save_IFS
7155
7156 fi
7157 fi
7158 DUMPBIN=$ac_cv_prog_DUMPBIN
7159 if test -n "$DUMPBIN"; then
7160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7161 $as_echo "$DUMPBIN" >&6; }
7162 else
7163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7164 $as_echo "no" >&6; }
7165 fi
7166
7167
7168     test -n "$DUMPBIN" && break
7169   done
7170 fi
7171 if test -z "$DUMPBIN"; then
7172   ac_ct_DUMPBIN=$DUMPBIN
7173   for ac_prog in dumpbin "link -dump"
7174 do
7175   # Extract the first word of "$ac_prog", so it can be a program name with args.
7176 set dummy $ac_prog; ac_word=$2
7177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7178 $as_echo_n "checking for $ac_word... " >&6; }
7179 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7180   $as_echo_n "(cached) " >&6
7181 else
7182   if test -n "$ac_ct_DUMPBIN"; then
7183   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7184 else
7185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7186 for as_dir in $PATH
7187 do
7188   IFS=$as_save_IFS
7189   test -z "$as_dir" && as_dir=.
7190     for ac_exec_ext in '' $ac_executable_extensions; do
7191   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7192     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7194     break 2
7195   fi
7196 done
7197   done
7198 IFS=$as_save_IFS
7199
7200 fi
7201 fi
7202 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7203 if test -n "$ac_ct_DUMPBIN"; then
7204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7205 $as_echo "$ac_ct_DUMPBIN" >&6; }
7206 else
7207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7208 $as_echo "no" >&6; }
7209 fi
7210
7211
7212   test -n "$ac_ct_DUMPBIN" && break
7213 done
7214
7215   if test "x$ac_ct_DUMPBIN" = x; then
7216     DUMPBIN=":"
7217   else
7218     case $cross_compiling:$ac_tool_warned in
7219 yes:)
7220 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7221 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7222 ac_tool_warned=yes ;;
7223 esac
7224     DUMPBIN=$ac_ct_DUMPBIN
7225   fi
7226 fi
7227
7228     case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7229     *COFF*)
7230       DUMPBIN="$DUMPBIN -symbols -headers"
7231       ;;
7232     *)
7233       DUMPBIN=:
7234       ;;
7235     esac
7236   fi
7237
7238   if test : != "$DUMPBIN"; then
7239     NM=$DUMPBIN
7240   fi
7241 fi
7242 test -z "$NM" && NM=nm
7243
7244
7245
7246
7247
7248
7249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7250 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
7251 if ${lt_cv_nm_interface+:} false; then :
7252   $as_echo_n "(cached) " >&6
7253 else
7254   lt_cv_nm_interface="BSD nm"
7255   echo "int some_variable = 0;" > conftest.$ac_ext
7256   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7257   (eval "$ac_compile" 2>conftest.err)
7258   cat conftest.err >&5
7259   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7260   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7261   cat conftest.err >&5
7262   (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7263   cat conftest.out >&5
7264   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7265     lt_cv_nm_interface="MS dumpbin"
7266   fi
7267   rm -f conftest*
7268 fi
7269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7270 $as_echo "$lt_cv_nm_interface" >&6; }
7271
7272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7273 $as_echo_n "checking whether ln -s works... " >&6; }
7274 LN_S=$as_ln_s
7275 if test "$LN_S" = "ln -s"; then
7276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7277 $as_echo "yes" >&6; }
7278 else
7279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7280 $as_echo "no, using $LN_S" >&6; }
7281 fi
7282
7283 # find the maximum length of command line arguments
7284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7285 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7286 if ${lt_cv_sys_max_cmd_len+:} false; then :
7287   $as_echo_n "(cached) " >&6
7288 else
7289     i=0
7290   teststring=ABCD
7291
7292   case $build_os in
7293   msdosdjgpp*)
7294     # On DJGPP, this test can blow up pretty badly due to problems in libc
7295     # (any single argument exceeding 2000 bytes causes a buffer overrun
7296     # during glob expansion).  Even if it were fixed, the result of this
7297     # check would be larger than it should be.
7298     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7299     ;;
7300
7301   gnu*)
7302     # Under GNU Hurd, this test is not required because there is
7303     # no limit to the length of command line arguments.
7304     # Libtool will interpret -1 as no limit whatsoever
7305     lt_cv_sys_max_cmd_len=-1;
7306     ;;
7307
7308   cygwin* | mingw* | cegcc*)
7309     # On Win9x/ME, this test blows up -- it succeeds, but takes
7310     # about 5 minutes as the teststring grows exponentially.
7311     # Worse, since 9x/ME are not pre-emptively multitasking,
7312     # you end up with a "frozen" computer, even though with patience
7313     # the test eventually succeeds (with a max line length of 256k).
7314     # Instead, let's just punt: use the minimum linelength reported by
7315     # all of the supported platforms: 8192 (on NT/2K/XP).
7316     lt_cv_sys_max_cmd_len=8192;
7317     ;;
7318
7319   mint*)
7320     # On MiNT this can take a long time and run out of memory.
7321     lt_cv_sys_max_cmd_len=8192;
7322     ;;
7323
7324   amigaos*)
7325     # On AmigaOS with pdksh, this test takes hours, literally.
7326     # So we just punt and use a minimum line length of 8192.
7327     lt_cv_sys_max_cmd_len=8192;
7328     ;;
7329
7330   bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7331     # This has been around since 386BSD, at least.  Likely further.
7332     if test -x /sbin/sysctl; then
7333       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7334     elif test -x /usr/sbin/sysctl; then
7335       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7336     else
7337       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7338     fi
7339     # And add a safety zone
7340     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7341     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7342     ;;
7343
7344   interix*)
7345     # We know the value 262144 and hardcode it with a safety zone (like BSD)
7346     lt_cv_sys_max_cmd_len=196608
7347     ;;
7348
7349   os2*)
7350     # The test takes a long time on OS/2.
7351     lt_cv_sys_max_cmd_len=8192
7352     ;;
7353
7354   osf*)
7355     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7356     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7357     # nice to cause kernel panics so lets avoid the loop below.
7358     # First set a reasonable default.
7359     lt_cv_sys_max_cmd_len=16384
7360     #
7361     if test -x /sbin/sysconfig; then
7362       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7363         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7364       esac
7365     fi
7366     ;;
7367   sco3.2v5*)
7368     lt_cv_sys_max_cmd_len=102400
7369     ;;
7370   sysv5* | sco5v6* | sysv4.2uw2*)
7371     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7372     if test -n "$kargmax"; then
7373       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[  ]//'`
7374     else
7375       lt_cv_sys_max_cmd_len=32768
7376     fi
7377     ;;
7378   *)
7379     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7380     if test -n "$lt_cv_sys_max_cmd_len" && \
7381        test undefined != "$lt_cv_sys_max_cmd_len"; then
7382       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7383       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7384     else
7385       # Make teststring a little bigger before we do anything with it.
7386       # a 1K string should be a reasonable start.
7387       for i in 1 2 3 4 5 6 7 8; do
7388         teststring=$teststring$teststring
7389       done
7390       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7391       # If test is not a shell built-in, we'll probably end up computing a
7392       # maximum length that is only half of the actual maximum length, but
7393       # we can't tell.
7394       while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7395                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7396               test 17 != "$i" # 1/2 MB should be enough
7397       do
7398         i=`expr $i + 1`
7399         teststring=$teststring$teststring
7400       done
7401       # Only check the string length outside the loop.
7402       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7403       teststring=
7404       # Add a significant safety factor because C++ compilers can tack on
7405       # massive amounts of additional arguments before passing them to the
7406       # linker.  It appears as though 1/2 is a usable value.
7407       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7408     fi
7409     ;;
7410   esac
7411
7412 fi
7413
7414 if test -n "$lt_cv_sys_max_cmd_len"; then
7415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7416 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7417 else
7418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7419 $as_echo "none" >&6; }
7420 fi
7421 max_cmd_len=$lt_cv_sys_max_cmd_len
7422
7423
7424
7425
7426
7427
7428 : ${CP="cp -f"}
7429 : ${MV="mv -f"}
7430 : ${RM="rm -f"}
7431
7432 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7433   lt_unset=unset
7434 else
7435   lt_unset=false
7436 fi
7437
7438
7439
7440
7441
7442 # test EBCDIC or ASCII
7443 case `echo X|tr X '\101'` in
7444  A) # ASCII based system
7445     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7446   lt_SP2NL='tr \040 \012'
7447   lt_NL2SP='tr \015\012 \040\040'
7448   ;;
7449  *) # EBCDIC based system
7450   lt_SP2NL='tr \100 \n'
7451   lt_NL2SP='tr \r\n \100\100'
7452   ;;
7453 esac
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7464 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7465 if ${lt_cv_to_host_file_cmd+:} false; then :
7466   $as_echo_n "(cached) " >&6
7467 else
7468   case $host in
7469   *-*-mingw* )
7470     case $build in
7471       *-*-mingw* ) # actually msys
7472         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7473         ;;
7474       *-*-cygwin* )
7475         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7476         ;;
7477       * ) # otherwise, assume *nix
7478         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7479         ;;
7480     esac
7481     ;;
7482   *-*-cygwin* )
7483     case $build in
7484       *-*-mingw* ) # actually msys
7485         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7486         ;;
7487       *-*-cygwin* )
7488         lt_cv_to_host_file_cmd=func_convert_file_noop
7489         ;;
7490       * ) # otherwise, assume *nix
7491         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7492         ;;
7493     esac
7494     ;;
7495   * ) # unhandled hosts (and "normal" native builds)
7496     lt_cv_to_host_file_cmd=func_convert_file_noop
7497     ;;
7498 esac
7499
7500 fi
7501
7502 to_host_file_cmd=$lt_cv_to_host_file_cmd
7503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7504 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
7505
7506
7507
7508
7509
7510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7511 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7512 if ${lt_cv_to_tool_file_cmd+:} false; then :
7513   $as_echo_n "(cached) " >&6
7514 else
7515   #assume ordinary cross tools, or native build.
7516 lt_cv_to_tool_file_cmd=func_convert_file_noop
7517 case $host in
7518   *-*-mingw* )
7519     case $build in
7520       *-*-mingw* ) # actually msys
7521         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7522         ;;
7523     esac
7524     ;;
7525 esac
7526
7527 fi
7528
7529 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7531 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7532
7533
7534
7535
7536
7537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7538 $as_echo_n "checking for $LD option to reload object files... " >&6; }
7539 if ${lt_cv_ld_reload_flag+:} false; then :
7540   $as_echo_n "(cached) " >&6
7541 else
7542   lt_cv_ld_reload_flag='-r'
7543 fi
7544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7545 $as_echo "$lt_cv_ld_reload_flag" >&6; }
7546 reload_flag=$lt_cv_ld_reload_flag
7547 case $reload_flag in
7548 "" | " "*) ;;
7549 *) reload_flag=" $reload_flag" ;;
7550 esac
7551 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7552 case $host_os in
7553   cygwin* | mingw* | pw32* | cegcc*)
7554     if test yes != "$GCC"; then
7555       reload_cmds=false
7556     fi
7557     ;;
7558   darwin*)
7559     if test yes = "$GCC"; then
7560       reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7561     else
7562       reload_cmds='$LD$reload_flag -o $output$reload_objs'
7563     fi
7564     ;;
7565 esac
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575 if test -n "$ac_tool_prefix"; then
7576   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7577 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7579 $as_echo_n "checking for $ac_word... " >&6; }
7580 if ${ac_cv_prog_OBJDUMP+:} false; then :
7581   $as_echo_n "(cached) " >&6
7582 else
7583   if test -n "$OBJDUMP"; then
7584   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7585 else
7586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7587 for as_dir in $PATH
7588 do
7589   IFS=$as_save_IFS
7590   test -z "$as_dir" && as_dir=.
7591     for ac_exec_ext in '' $ac_executable_extensions; do
7592   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7593     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7594     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7595     break 2
7596   fi
7597 done
7598   done
7599 IFS=$as_save_IFS
7600
7601 fi
7602 fi
7603 OBJDUMP=$ac_cv_prog_OBJDUMP
7604 if test -n "$OBJDUMP"; then
7605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7606 $as_echo "$OBJDUMP" >&6; }
7607 else
7608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7609 $as_echo "no" >&6; }
7610 fi
7611
7612
7613 fi
7614 if test -z "$ac_cv_prog_OBJDUMP"; then
7615   ac_ct_OBJDUMP=$OBJDUMP
7616   # Extract the first word of "objdump", so it can be a program name with args.
7617 set dummy objdump; ac_word=$2
7618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7619 $as_echo_n "checking for $ac_word... " >&6; }
7620 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7621   $as_echo_n "(cached) " >&6
7622 else
7623   if test -n "$ac_ct_OBJDUMP"; then
7624   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7625 else
7626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7627 for as_dir in $PATH
7628 do
7629   IFS=$as_save_IFS
7630   test -z "$as_dir" && as_dir=.
7631     for ac_exec_ext in '' $ac_executable_extensions; do
7632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7633     ac_cv_prog_ac_ct_OBJDUMP="objdump"
7634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7635     break 2
7636   fi
7637 done
7638   done
7639 IFS=$as_save_IFS
7640
7641 fi
7642 fi
7643 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7644 if test -n "$ac_ct_OBJDUMP"; then
7645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7646 $as_echo "$ac_ct_OBJDUMP" >&6; }
7647 else
7648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7649 $as_echo "no" >&6; }
7650 fi
7651
7652   if test "x$ac_ct_OBJDUMP" = x; then
7653     OBJDUMP="false"
7654   else
7655     case $cross_compiling:$ac_tool_warned in
7656 yes:)
7657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7658 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7659 ac_tool_warned=yes ;;
7660 esac
7661     OBJDUMP=$ac_ct_OBJDUMP
7662   fi
7663 else
7664   OBJDUMP="$ac_cv_prog_OBJDUMP"
7665 fi
7666
7667 test -z "$OBJDUMP" && OBJDUMP=objdump
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7678 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
7679 if ${lt_cv_deplibs_check_method+:} false; then :
7680   $as_echo_n "(cached) " >&6
7681 else
7682   lt_cv_file_magic_cmd='$MAGIC_CMD'
7683 lt_cv_file_magic_test_file=
7684 lt_cv_deplibs_check_method='unknown'
7685 # Need to set the preceding variable on all platforms that support
7686 # interlibrary dependencies.
7687 # 'none' -- dependencies not supported.
7688 # 'unknown' -- same as none, but documents that we really don't know.
7689 # 'pass_all' -- all dependencies passed with no checks.
7690 # 'test_compile' -- check by making test program.
7691 # 'file_magic [[regex]]' -- check by looking for files in library path
7692 # that responds to the $file_magic_cmd with a given extended regex.
7693 # If you have 'file' or equivalent on your system and you're not sure
7694 # whether 'pass_all' will *always* work, you probably want this one.
7695
7696 case $host_os in
7697 aix[4-9]*)
7698   lt_cv_deplibs_check_method=pass_all
7699   ;;
7700
7701 beos*)
7702   lt_cv_deplibs_check_method=pass_all
7703   ;;
7704
7705 bsdi[45]*)
7706   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
7707   lt_cv_file_magic_cmd='/usr/bin/file -L'
7708   lt_cv_file_magic_test_file=/shlib/libc.so
7709   ;;
7710
7711 cygwin*)
7712   # func_win32_libid is a shell function defined in ltmain.sh
7713   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7714   lt_cv_file_magic_cmd='func_win32_libid'
7715   ;;
7716
7717 mingw* | pw32*)
7718   # Base MSYS/MinGW do not provide the 'file' command needed by
7719   # func_win32_libid shell function, so use a weaker test based on 'objdump',
7720   # unless we find 'file', for example because we are cross-compiling.
7721   if ( file / ) >/dev/null 2>&1; then
7722     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7723     lt_cv_file_magic_cmd='func_win32_libid'
7724   else
7725     # Keep this pattern in sync with the one in func_win32_libid.
7726     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
7727     lt_cv_file_magic_cmd='$OBJDUMP -f'
7728   fi
7729   ;;
7730
7731 cegcc*)
7732   # use the weaker test based on 'objdump'. See mingw*.
7733   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
7734   lt_cv_file_magic_cmd='$OBJDUMP -f'
7735   ;;
7736
7737 darwin* | rhapsody*)
7738   lt_cv_deplibs_check_method=pass_all
7739   ;;
7740
7741 freebsd* | dragonfly*)
7742   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7743     case $host_cpu in
7744     i*86 )
7745       # Not sure whether the presence of OpenBSD here was a mistake.
7746       # Let's accept both of them until this is cleared up.
7747       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
7748       lt_cv_file_magic_cmd=/usr/bin/file
7749       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7750       ;;
7751     esac
7752   else
7753     lt_cv_deplibs_check_method=pass_all
7754   fi
7755   ;;
7756
7757 haiku*)
7758   lt_cv_deplibs_check_method=pass_all
7759   ;;
7760
7761 hpux10.20* | hpux11*)
7762   lt_cv_file_magic_cmd=/usr/bin/file
7763   case $host_cpu in
7764   ia64*)
7765     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
7766     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7767     ;;
7768   hppa*64*)
7769     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]'
7770     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7771     ;;
7772   *)
7773     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
7774     lt_cv_file_magic_test_file=/usr/lib/libc.sl
7775     ;;
7776   esac
7777   ;;
7778
7779 interix[3-9]*)
7780   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
7781   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
7782   ;;
7783
7784 irix5* | irix6* | nonstopux*)
7785   case $LD in
7786   *-32|*"-32 ") libmagic=32-bit;;
7787   *-n32|*"-n32 ") libmagic=N32;;
7788   *-64|*"-64 ") libmagic=64-bit;;
7789   *) libmagic=never-match;;
7790   esac
7791   lt_cv_deplibs_check_method=pass_all
7792   ;;
7793
7794 # This must be glibc/ELF.
7795 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7796   lt_cv_deplibs_check_method=pass_all
7797   ;;
7798
7799 netbsd*)
7800   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7801     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7802   else
7803     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
7804   fi
7805   ;;
7806
7807 newos6*)
7808   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
7809   lt_cv_file_magic_cmd=/usr/bin/file
7810   lt_cv_file_magic_test_file=/usr/lib/libnls.so
7811   ;;
7812
7813 *nto* | *qnx*)
7814   lt_cv_deplibs_check_method=pass_all
7815   ;;
7816
7817 openbsd* | bitrig*)
7818   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
7819     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
7820   else
7821     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7822   fi
7823   ;;
7824
7825 osf3* | osf4* | osf5*)
7826   lt_cv_deplibs_check_method=pass_all
7827   ;;
7828
7829 rdos*)
7830   lt_cv_deplibs_check_method=pass_all
7831   ;;
7832
7833 solaris*)
7834   lt_cv_deplibs_check_method=pass_all
7835   ;;
7836
7837 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
7838   lt_cv_deplibs_check_method=pass_all
7839   ;;
7840
7841 sysv4 | sysv4.3*)
7842   case $host_vendor in
7843   motorola)
7844     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]'
7845     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7846     ;;
7847   ncr)
7848     lt_cv_deplibs_check_method=pass_all
7849     ;;
7850   sequent)
7851     lt_cv_file_magic_cmd='/bin/file'
7852     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
7853     ;;
7854   sni)
7855     lt_cv_file_magic_cmd='/bin/file'
7856     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
7857     lt_cv_file_magic_test_file=/lib/libc.so
7858     ;;
7859   siemens)
7860     lt_cv_deplibs_check_method=pass_all
7861     ;;
7862   pc)
7863     lt_cv_deplibs_check_method=pass_all
7864     ;;
7865   esac
7866   ;;
7867
7868 tpf*)
7869   lt_cv_deplibs_check_method=pass_all
7870   ;;
7871 os2*)
7872   lt_cv_deplibs_check_method=pass_all
7873   ;;
7874 esac
7875
7876 fi
7877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
7878 $as_echo "$lt_cv_deplibs_check_method" >&6; }
7879
7880 file_magic_glob=
7881 want_nocaseglob=no
7882 if test "$build" = "$host"; then
7883   case $host_os in
7884   mingw* | pw32*)
7885     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
7886       want_nocaseglob=yes
7887     else
7888       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
7889     fi
7890     ;;
7891   esac
7892 fi
7893
7894 file_magic_cmd=$lt_cv_file_magic_cmd
7895 deplibs_check_method=$lt_cv_deplibs_check_method
7896 test -z "$deplibs_check_method" && deplibs_check_method=unknown
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919 if test -n "$ac_tool_prefix"; then
7920   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7921 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7923 $as_echo_n "checking for $ac_word... " >&6; }
7924 if ${ac_cv_prog_DLLTOOL+:} false; then :
7925   $as_echo_n "(cached) " >&6
7926 else
7927   if test -n "$DLLTOOL"; then
7928   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7929 else
7930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7931 for as_dir in $PATH
7932 do
7933   IFS=$as_save_IFS
7934   test -z "$as_dir" && as_dir=.
7935     for ac_exec_ext in '' $ac_executable_extensions; do
7936   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7937     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7938     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7939     break 2
7940   fi
7941 done
7942   done
7943 IFS=$as_save_IFS
7944
7945 fi
7946 fi
7947 DLLTOOL=$ac_cv_prog_DLLTOOL
7948 if test -n "$DLLTOOL"; then
7949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7950 $as_echo "$DLLTOOL" >&6; }
7951 else
7952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7953 $as_echo "no" >&6; }
7954 fi
7955
7956
7957 fi
7958 if test -z "$ac_cv_prog_DLLTOOL"; then
7959   ac_ct_DLLTOOL=$DLLTOOL
7960   # Extract the first word of "dlltool", so it can be a program name with args.
7961 set dummy dlltool; ac_word=$2
7962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7963 $as_echo_n "checking for $ac_word... " >&6; }
7964 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7965   $as_echo_n "(cached) " >&6
7966 else
7967   if test -n "$ac_ct_DLLTOOL"; then
7968   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7969 else
7970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7971 for as_dir in $PATH
7972 do
7973   IFS=$as_save_IFS
7974   test -z "$as_dir" && as_dir=.
7975     for ac_exec_ext in '' $ac_executable_extensions; do
7976   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7977     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7978     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7979     break 2
7980   fi
7981 done
7982   done
7983 IFS=$as_save_IFS
7984
7985 fi
7986 fi
7987 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7988 if test -n "$ac_ct_DLLTOOL"; then
7989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7990 $as_echo "$ac_ct_DLLTOOL" >&6; }
7991 else
7992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7993 $as_echo "no" >&6; }
7994 fi
7995
7996   if test "x$ac_ct_DLLTOOL" = x; then
7997     DLLTOOL="false"
7998   else
7999     case $cross_compiling:$ac_tool_warned in
8000 yes:)
8001 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8002 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8003 ac_tool_warned=yes ;;
8004 esac
8005     DLLTOOL=$ac_ct_DLLTOOL
8006   fi
8007 else
8008   DLLTOOL="$ac_cv_prog_DLLTOOL"
8009 fi
8010
8011 test -z "$DLLTOOL" && DLLTOOL=dlltool
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8023 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8024 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8025   $as_echo_n "(cached) " >&6
8026 else
8027   lt_cv_sharedlib_from_linklib_cmd='unknown'
8028
8029 case $host_os in
8030 cygwin* | mingw* | pw32* | cegcc*)
8031   # two different shell functions defined in ltmain.sh;
8032   # decide which one to use based on capabilities of $DLLTOOL
8033   case `$DLLTOOL --help 2>&1` in
8034   *--identify-strict*)
8035     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8036     ;;
8037   *)
8038     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8039     ;;
8040   esac
8041   ;;
8042 *)
8043   # fallback: assume linklib IS sharedlib
8044   lt_cv_sharedlib_from_linklib_cmd=$ECHO
8045   ;;
8046 esac
8047
8048 fi
8049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8050 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8051 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8052 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8053
8054
8055
8056
8057
8058
8059
8060 if test -n "$ac_tool_prefix"; then
8061   for ac_prog in ar
8062   do
8063     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8064 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8066 $as_echo_n "checking for $ac_word... " >&6; }
8067 if ${ac_cv_prog_AR+:} false; then :
8068   $as_echo_n "(cached) " >&6
8069 else
8070   if test -n "$AR"; then
8071   ac_cv_prog_AR="$AR" # Let the user override the test.
8072 else
8073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8074 for as_dir in $PATH
8075 do
8076   IFS=$as_save_IFS
8077   test -z "$as_dir" && as_dir=.
8078     for ac_exec_ext in '' $ac_executable_extensions; do
8079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8080     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8082     break 2
8083   fi
8084 done
8085   done
8086 IFS=$as_save_IFS
8087
8088 fi
8089 fi
8090 AR=$ac_cv_prog_AR
8091 if test -n "$AR"; then
8092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8093 $as_echo "$AR" >&6; }
8094 else
8095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8096 $as_echo "no" >&6; }
8097 fi
8098
8099
8100     test -n "$AR" && break
8101   done
8102 fi
8103 if test -z "$AR"; then
8104   ac_ct_AR=$AR
8105   for ac_prog in ar
8106 do
8107   # Extract the first word of "$ac_prog", so it can be a program name with args.
8108 set dummy $ac_prog; ac_word=$2
8109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8110 $as_echo_n "checking for $ac_word... " >&6; }
8111 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8112   $as_echo_n "(cached) " >&6
8113 else
8114   if test -n "$ac_ct_AR"; then
8115   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8116 else
8117 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8118 for as_dir in $PATH
8119 do
8120   IFS=$as_save_IFS
8121   test -z "$as_dir" && as_dir=.
8122     for ac_exec_ext in '' $ac_executable_extensions; do
8123   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8124     ac_cv_prog_ac_ct_AR="$ac_prog"
8125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8126     break 2
8127   fi
8128 done
8129   done
8130 IFS=$as_save_IFS
8131
8132 fi
8133 fi
8134 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8135 if test -n "$ac_ct_AR"; then
8136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8137 $as_echo "$ac_ct_AR" >&6; }
8138 else
8139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8140 $as_echo "no" >&6; }
8141 fi
8142
8143
8144   test -n "$ac_ct_AR" && break
8145 done
8146
8147   if test "x$ac_ct_AR" = x; then
8148     AR="false"
8149   else
8150     case $cross_compiling:$ac_tool_warned in
8151 yes:)
8152 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8153 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8154 ac_tool_warned=yes ;;
8155 esac
8156     AR=$ac_ct_AR
8157   fi
8158 fi
8159
8160 : ${AR=ar}
8161 : ${AR_FLAGS=cru}
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8174 $as_echo_n "checking for archiver @FILE support... " >&6; }
8175 if ${lt_cv_ar_at_file+:} false; then :
8176   $as_echo_n "(cached) " >&6
8177 else
8178   lt_cv_ar_at_file=no
8179    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8180 /* end confdefs.h.  */
8181
8182 int
8183 main ()
8184 {
8185
8186   ;
8187   return 0;
8188 }
8189 _ACEOF
8190 if ac_fn_c_try_compile "$LINENO"; then :
8191   echo conftest.$ac_objext > conftest.lst
8192       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8193       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8194   (eval $lt_ar_try) 2>&5
8195   ac_status=$?
8196   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8197   test $ac_status = 0; }
8198       if test 0 -eq "$ac_status"; then
8199         # Ensure the archiver fails upon bogus file names.
8200         rm -f conftest.$ac_objext libconftest.a
8201         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8202   (eval $lt_ar_try) 2>&5
8203   ac_status=$?
8204   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8205   test $ac_status = 0; }
8206         if test 0 -ne "$ac_status"; then
8207           lt_cv_ar_at_file=@
8208         fi
8209       fi
8210       rm -f conftest.* libconftest.a
8211
8212 fi
8213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8214
8215 fi
8216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8217 $as_echo "$lt_cv_ar_at_file" >&6; }
8218
8219 if test no = "$lt_cv_ar_at_file"; then
8220   archiver_list_spec=
8221 else
8222   archiver_list_spec=$lt_cv_ar_at_file
8223 fi
8224
8225
8226
8227
8228
8229
8230
8231 if test -n "$ac_tool_prefix"; then
8232   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8233 set dummy ${ac_tool_prefix}strip; ac_word=$2
8234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8235 $as_echo_n "checking for $ac_word... " >&6; }
8236 if ${ac_cv_prog_STRIP+:} false; then :
8237   $as_echo_n "(cached) " >&6
8238 else
8239   if test -n "$STRIP"; then
8240   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8241 else
8242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8243 for as_dir in $PATH
8244 do
8245   IFS=$as_save_IFS
8246   test -z "$as_dir" && as_dir=.
8247     for ac_exec_ext in '' $ac_executable_extensions; do
8248   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8249     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8250     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8251     break 2
8252   fi
8253 done
8254   done
8255 IFS=$as_save_IFS
8256
8257 fi
8258 fi
8259 STRIP=$ac_cv_prog_STRIP
8260 if test -n "$STRIP"; then
8261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8262 $as_echo "$STRIP" >&6; }
8263 else
8264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8265 $as_echo "no" >&6; }
8266 fi
8267
8268
8269 fi
8270 if test -z "$ac_cv_prog_STRIP"; then
8271   ac_ct_STRIP=$STRIP
8272   # Extract the first word of "strip", so it can be a program name with args.
8273 set dummy strip; ac_word=$2
8274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8275 $as_echo_n "checking for $ac_word... " >&6; }
8276 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8277   $as_echo_n "(cached) " >&6
8278 else
8279   if test -n "$ac_ct_STRIP"; then
8280   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8281 else
8282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8283 for as_dir in $PATH
8284 do
8285   IFS=$as_save_IFS
8286   test -z "$as_dir" && as_dir=.
8287     for ac_exec_ext in '' $ac_executable_extensions; do
8288   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8289     ac_cv_prog_ac_ct_STRIP="strip"
8290     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8291     break 2
8292   fi
8293 done
8294   done
8295 IFS=$as_save_IFS
8296
8297 fi
8298 fi
8299 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8300 if test -n "$ac_ct_STRIP"; then
8301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8302 $as_echo "$ac_ct_STRIP" >&6; }
8303 else
8304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8305 $as_echo "no" >&6; }
8306 fi
8307
8308   if test "x$ac_ct_STRIP" = x; then
8309     STRIP=":"
8310   else
8311     case $cross_compiling:$ac_tool_warned in
8312 yes:)
8313 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8314 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8315 ac_tool_warned=yes ;;
8316 esac
8317     STRIP=$ac_ct_STRIP
8318   fi
8319 else
8320   STRIP="$ac_cv_prog_STRIP"
8321 fi
8322
8323 test -z "$STRIP" && STRIP=:
8324
8325
8326
8327
8328
8329
8330 if test -n "$ac_tool_prefix"; then
8331   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8332 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8334 $as_echo_n "checking for $ac_word... " >&6; }
8335 if ${ac_cv_prog_RANLIB+:} false; then :
8336   $as_echo_n "(cached) " >&6
8337 else
8338   if test -n "$RANLIB"; then
8339   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8340 else
8341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8342 for as_dir in $PATH
8343 do
8344   IFS=$as_save_IFS
8345   test -z "$as_dir" && as_dir=.
8346     for ac_exec_ext in '' $ac_executable_extensions; do
8347   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8348     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8349     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8350     break 2
8351   fi
8352 done
8353   done
8354 IFS=$as_save_IFS
8355
8356 fi
8357 fi
8358 RANLIB=$ac_cv_prog_RANLIB
8359 if test -n "$RANLIB"; then
8360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8361 $as_echo "$RANLIB" >&6; }
8362 else
8363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8364 $as_echo "no" >&6; }
8365 fi
8366
8367
8368 fi
8369 if test -z "$ac_cv_prog_RANLIB"; then
8370   ac_ct_RANLIB=$RANLIB
8371   # Extract the first word of "ranlib", so it can be a program name with args.
8372 set dummy ranlib; ac_word=$2
8373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8374 $as_echo_n "checking for $ac_word... " >&6; }
8375 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8376   $as_echo_n "(cached) " >&6
8377 else
8378   if test -n "$ac_ct_RANLIB"; then
8379   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8380 else
8381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8382 for as_dir in $PATH
8383 do
8384   IFS=$as_save_IFS
8385   test -z "$as_dir" && as_dir=.
8386     for ac_exec_ext in '' $ac_executable_extensions; do
8387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8388     ac_cv_prog_ac_ct_RANLIB="ranlib"
8389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8390     break 2
8391   fi
8392 done
8393   done
8394 IFS=$as_save_IFS
8395
8396 fi
8397 fi
8398 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8399 if test -n "$ac_ct_RANLIB"; then
8400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8401 $as_echo "$ac_ct_RANLIB" >&6; }
8402 else
8403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8404 $as_echo "no" >&6; }
8405 fi
8406
8407   if test "x$ac_ct_RANLIB" = x; then
8408     RANLIB=":"
8409   else
8410     case $cross_compiling:$ac_tool_warned in
8411 yes:)
8412 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8413 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8414 ac_tool_warned=yes ;;
8415 esac
8416     RANLIB=$ac_ct_RANLIB
8417   fi
8418 else
8419   RANLIB="$ac_cv_prog_RANLIB"
8420 fi
8421
8422 test -z "$RANLIB" && RANLIB=:
8423
8424
8425
8426
8427
8428
8429 # Determine commands to create old-style static archives.
8430 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8431 old_postinstall_cmds='chmod 644 $oldlib'
8432 old_postuninstall_cmds=
8433
8434 if test -n "$RANLIB"; then
8435   case $host_os in
8436   bitrig* | openbsd*)
8437     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8438     ;;
8439   *)
8440     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8441     ;;
8442   esac
8443   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8444 fi
8445
8446 case $host_os in
8447   darwin*)
8448     lock_old_archive_extraction=yes ;;
8449   *)
8450     lock_old_archive_extraction=no ;;
8451 esac
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473 for ac_prog in gawk mawk nawk awk
8474 do
8475   # Extract the first word of "$ac_prog", so it can be a program name with args.
8476 set dummy $ac_prog; ac_word=$2
8477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8478 $as_echo_n "checking for $ac_word... " >&6; }
8479 if ${ac_cv_prog_AWK+:} false; then :
8480   $as_echo_n "(cached) " >&6
8481 else
8482   if test -n "$AWK"; then
8483   ac_cv_prog_AWK="$AWK" # Let the user override the test.
8484 else
8485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8486 for as_dir in $PATH
8487 do
8488   IFS=$as_save_IFS
8489   test -z "$as_dir" && as_dir=.
8490     for ac_exec_ext in '' $ac_executable_extensions; do
8491   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8492     ac_cv_prog_AWK="$ac_prog"
8493     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8494     break 2
8495   fi
8496 done
8497   done
8498 IFS=$as_save_IFS
8499
8500 fi
8501 fi
8502 AWK=$ac_cv_prog_AWK
8503 if test -n "$AWK"; then
8504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8505 $as_echo "$AWK" >&6; }
8506 else
8507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8508 $as_echo "no" >&6; }
8509 fi
8510
8511
8512   test -n "$AWK" && break
8513 done
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533 # If no C compiler was specified, use CC.
8534 LTCC=${LTCC-"$CC"}
8535
8536 # If no C compiler flags were specified, use CFLAGS.
8537 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8538
8539 # Allow CC to be a program name with arguments.
8540 compiler=$CC
8541
8542
8543 # Check for command to grab the raw symbol name followed by C symbol from nm.
8544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8545 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8546 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8547   $as_echo_n "(cached) " >&6
8548 else
8549
8550 # These are sane defaults that work on at least a few old systems.
8551 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8552
8553 # Character class describing NM global symbol codes.
8554 symcode='[BCDEGRST]'
8555
8556 # Regexp to match symbols that can be accessed directly from C.
8557 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8558
8559 # Define system-specific variables.
8560 case $host_os in
8561 aix*)
8562   symcode='[BCDT]'
8563   ;;
8564 cygwin* | mingw* | pw32* | cegcc*)
8565   symcode='[ABCDGISTW]'
8566   ;;
8567 hpux*)
8568   if test ia64 = "$host_cpu"; then
8569     symcode='[ABCDEGRST]'
8570   fi
8571   ;;
8572 irix* | nonstopux*)
8573   symcode='[BCDEGRST]'
8574   ;;
8575 osf*)
8576   symcode='[BCDEGQRST]'
8577   ;;
8578 solaris*)
8579   symcode='[BDRT]'
8580   ;;
8581 sco3.2v5*)
8582   symcode='[DT]'
8583   ;;
8584 sysv4.2uw2*)
8585   symcode='[DT]'
8586   ;;
8587 sysv5* | sco5v6* | unixware* | OpenUNIX*)
8588   symcode='[ABDT]'
8589   ;;
8590 sysv4)
8591   symcode='[DFNSTU]'
8592   ;;
8593 esac
8594
8595 # If we're using GNU nm, then use its standard symbol codes.
8596 case `$NM -V 2>&1` in
8597 *GNU* | *'with BFD'*)
8598   symcode='[ABCDGIRSTW]' ;;
8599 esac
8600
8601 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8602   # Gets list of data symbols to import.
8603   lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8604   # Adjust the below global symbol transforms to fixup imported variables.
8605   lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8606   lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
8607   lt_c_name_lib_hook="\
8608   -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
8609   -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
8610 else
8611   # Disable hooks by default.
8612   lt_cv_sys_global_symbol_to_import=
8613   lt_cdecl_hook=
8614   lt_c_name_hook=
8615   lt_c_name_lib_hook=
8616 fi
8617
8618 # Transform an extracted symbol line into a proper C declaration.
8619 # Some systems (esp. on ia64) link data and code symbols differently,
8620 # so use this general approach.
8621 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8622 $lt_cdecl_hook\
8623 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8624 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8625
8626 # Transform an extracted symbol line into symbol name and symbol address
8627 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8628 $lt_c_name_hook\
8629 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8630 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8631
8632 # Transform an extracted symbol line into symbol name with lib prefix and
8633 # symbol address.
8634 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8635 $lt_c_name_lib_hook\
8636 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8637 " -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8638 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8639
8640 # Handle CRLF in mingw tool chain
8641 opt_cr=
8642 case $build_os in
8643 mingw*)
8644   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8645   ;;
8646 esac
8647
8648 # Try without a prefix underscore, then with it.
8649 for ac_symprfx in "" "_"; do
8650
8651   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8652   symxfrm="\\1 $ac_symprfx\\2 \\2"
8653
8654   # Write the raw and C identifiers.
8655   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8656     # Fake it for dumpbin and say T for any non-static function,
8657     # D for any global variable and I for any imported variable.
8658     # Also find C++ and __fastcall symbols from MSVC++,
8659     # which start with @ or ?.
8660     lt_cv_sys_global_symbol_pipe="$AWK '"\
8661 "     {last_section=section; section=\$ 3};"\
8662 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8663 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8664 "     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8665 "     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8666 "     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8667 "     \$ 0!~/External *\|/{next};"\
8668 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8669 "     {if(hide[section]) next};"\
8670 "     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8671 "     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8672 "     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8673 "     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8674 "     ' prfx=^$ac_symprfx"
8675   else
8676     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8677   fi
8678   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8679
8680   # Check to see that the pipe works correctly.
8681   pipe_works=no
8682
8683   rm -f conftest*
8684   cat > conftest.$ac_ext <<_LT_EOF
8685 #ifdef __cplusplus
8686 extern "C" {
8687 #endif
8688 char nm_test_var;
8689 void nm_test_func(void);
8690 void nm_test_func(void){}
8691 #ifdef __cplusplus
8692 }
8693 #endif
8694 int main(){nm_test_var='a';nm_test_func();return(0);}
8695 _LT_EOF
8696
8697   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8698   (eval $ac_compile) 2>&5
8699   ac_status=$?
8700   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8701   test $ac_status = 0; }; then
8702     # Now try to grab the symbols.
8703     nlist=conftest.nm
8704     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
8705   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
8706   ac_status=$?
8707   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8708   test $ac_status = 0; } && test -s "$nlist"; then
8709       # Try sorting and uniquifying the output.
8710       if sort "$nlist" | uniq > "$nlist"T; then
8711         mv -f "$nlist"T "$nlist"
8712       else
8713         rm -f "$nlist"T
8714       fi
8715
8716       # Make sure that we snagged all the symbols we need.
8717       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
8718         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
8719           cat <<_LT_EOF > conftest.$ac_ext
8720 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
8721 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
8722 /* DATA imports from DLLs on WIN32 can't be const, because runtime
8723    relocations are performed -- see ld's documentation on pseudo-relocs.  */
8724 # define LT_DLSYM_CONST
8725 #elif defined __osf__
8726 /* This system does not cope well with relocations in const data.  */
8727 # define LT_DLSYM_CONST
8728 #else
8729 # define LT_DLSYM_CONST const
8730 #endif
8731
8732 #ifdef __cplusplus
8733 extern "C" {
8734 #endif
8735
8736 _LT_EOF
8737           # Now generate the symbol file.
8738           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
8739
8740           cat <<_LT_EOF >> conftest.$ac_ext
8741
8742 /* The mapping between symbol names and symbols.  */
8743 LT_DLSYM_CONST struct {
8744   const char *name;
8745   void       *address;
8746 }
8747 lt__PROGRAM__LTX_preloaded_symbols[] =
8748 {
8749   { "@PROGRAM@", (void *) 0 },
8750 _LT_EOF
8751           $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
8752           cat <<\_LT_EOF >> conftest.$ac_ext
8753   {0, (void *) 0}
8754 };
8755
8756 /* This works around a problem in FreeBSD linker */
8757 #ifdef FREEBSD_WORKAROUND
8758 static const void *lt_preloaded_setup() {
8759   return lt__PROGRAM__LTX_preloaded_symbols;
8760 }
8761 #endif
8762
8763 #ifdef __cplusplus
8764 }
8765 #endif
8766 _LT_EOF
8767           # Now try linking the two files.
8768           mv conftest.$ac_objext conftstm.$ac_objext
8769           lt_globsym_save_LIBS=$LIBS
8770           lt_globsym_save_CFLAGS=$CFLAGS
8771           LIBS=conftstm.$ac_objext
8772           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
8773           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8774   (eval $ac_link) 2>&5
8775   ac_status=$?
8776   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8777   test $ac_status = 0; } && test -s conftest$ac_exeext; then
8778             pipe_works=yes
8779           fi
8780           LIBS=$lt_globsym_save_LIBS
8781           CFLAGS=$lt_globsym_save_CFLAGS
8782         else
8783           echo "cannot find nm_test_func in $nlist" >&5
8784         fi
8785       else
8786         echo "cannot find nm_test_var in $nlist" >&5
8787       fi
8788     else
8789       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
8790     fi
8791   else
8792     echo "$progname: failed program was:" >&5
8793     cat conftest.$ac_ext >&5
8794   fi
8795   rm -rf conftest* conftst*
8796
8797   # Do not use the global_symbol_pipe unless it works.
8798   if test yes = "$pipe_works"; then
8799     break
8800   else
8801     lt_cv_sys_global_symbol_pipe=
8802   fi
8803 done
8804
8805 fi
8806
8807 if test -z "$lt_cv_sys_global_symbol_pipe"; then
8808   lt_cv_sys_global_symbol_to_cdecl=
8809 fi
8810 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
8811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
8812 $as_echo "failed" >&6; }
8813 else
8814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
8815 $as_echo "ok" >&6; }
8816 fi
8817
8818 # Response file support.
8819 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8820   nm_file_list_spec='@'
8821 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
8822   nm_file_list_spec='@'
8823 fi
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
8862 $as_echo_n "checking for sysroot... " >&6; }
8863
8864 # Check whether --with-sysroot was given.
8865 if test "${with_sysroot+set}" = set; then :
8866   withval=$with_sysroot;
8867 else
8868   with_sysroot=no
8869 fi
8870
8871
8872 lt_sysroot=
8873 case $with_sysroot in #(
8874  yes)
8875    if test yes = "$GCC"; then
8876      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
8877    fi
8878    ;; #(
8879  /*)
8880    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
8881    ;; #(
8882  no|'')
8883    ;; #(
8884  *)
8885    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
8886 $as_echo "$with_sysroot" >&6; }
8887    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
8888    ;;
8889 esac
8890
8891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
8892 $as_echo "${lt_sysroot:-no}" >&6; }
8893
8894
8895
8896
8897
8898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
8899 $as_echo_n "checking for a working dd... " >&6; }
8900 if ${ac_cv_path_lt_DD+:} false; then :
8901   $as_echo_n "(cached) " >&6
8902 else
8903   printf 0123456789abcdef0123456789abcdef >conftest.i
8904 cat conftest.i conftest.i >conftest2.i
8905 : ${lt_DD:=$DD}
8906 if test -z "$lt_DD"; then
8907   ac_path_lt_DD_found=false
8908   # Loop through the user's path and test for each of PROGNAME-LIST
8909   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8910 for as_dir in $PATH
8911 do
8912   IFS=$as_save_IFS
8913   test -z "$as_dir" && as_dir=.
8914     for ac_prog in dd; do
8915     for ac_exec_ext in '' $ac_executable_extensions; do
8916       ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
8917       as_fn_executable_p "$ac_path_lt_DD" || continue
8918 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
8919   cmp -s conftest.i conftest.out \
8920   && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
8921 fi
8922       $ac_path_lt_DD_found && break 3
8923     done
8924   done
8925   done
8926 IFS=$as_save_IFS
8927   if test -z "$ac_cv_path_lt_DD"; then
8928     :
8929   fi
8930 else
8931   ac_cv_path_lt_DD=$lt_DD
8932 fi
8933
8934 rm -f conftest.i conftest2.i conftest.out
8935 fi
8936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
8937 $as_echo "$ac_cv_path_lt_DD" >&6; }
8938
8939
8940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
8941 $as_echo_n "checking how to truncate binary pipes... " >&6; }
8942 if ${lt_cv_truncate_bin+:} false; then :
8943   $as_echo_n "(cached) " >&6
8944 else
8945   printf 0123456789abcdef0123456789abcdef >conftest.i
8946 cat conftest.i conftest.i >conftest2.i
8947 lt_cv_truncate_bin=
8948 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
8949   cmp -s conftest.i conftest.out \
8950   && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
8951 fi
8952 rm -f conftest.i conftest2.i conftest.out
8953 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
8954 fi
8955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
8956 $as_echo "$lt_cv_truncate_bin" >&6; }
8957
8958
8959
8960
8961
8962
8963
8964 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
8965 func_cc_basename ()
8966 {
8967     for cc_temp in $*""; do
8968       case $cc_temp in
8969         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8970         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8971         \-*) ;;
8972         *) break;;
8973       esac
8974     done
8975     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
8976 }
8977
8978 # Check whether --enable-libtool-lock was given.
8979 if test "${enable_libtool_lock+set}" = set; then :
8980   enableval=$enable_libtool_lock;
8981 fi
8982
8983 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
8984
8985 # Some flags need to be propagated to the compiler or linker for good
8986 # libtool support.
8987 case $host in
8988 ia64-*-hpux*)
8989   # Find out what ABI is being produced by ac_compile, and set mode
8990   # options accordingly.
8991   echo 'int i;' > conftest.$ac_ext
8992   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8993   (eval $ac_compile) 2>&5
8994   ac_status=$?
8995   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8996   test $ac_status = 0; }; then
8997     case `/usr/bin/file conftest.$ac_objext` in
8998       *ELF-32*)
8999         HPUX_IA64_MODE=32
9000         ;;
9001       *ELF-64*)
9002         HPUX_IA64_MODE=64
9003         ;;
9004     esac
9005   fi
9006   rm -rf conftest*
9007   ;;
9008 *-*-irix6*)
9009   # Find out what ABI is being produced by ac_compile, and set linker
9010   # options accordingly.
9011   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9012   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9013   (eval $ac_compile) 2>&5
9014   ac_status=$?
9015   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9016   test $ac_status = 0; }; then
9017     if test yes = "$lt_cv_prog_gnu_ld"; then
9018       case `/usr/bin/file conftest.$ac_objext` in
9019         *32-bit*)
9020           LD="${LD-ld} -melf32bsmip"
9021           ;;
9022         *N32*)
9023           LD="${LD-ld} -melf32bmipn32"
9024           ;;
9025         *64-bit*)
9026           LD="${LD-ld} -melf64bmip"
9027         ;;
9028       esac
9029     else
9030       case `/usr/bin/file conftest.$ac_objext` in
9031         *32-bit*)
9032           LD="${LD-ld} -32"
9033           ;;
9034         *N32*)
9035           LD="${LD-ld} -n32"
9036           ;;
9037         *64-bit*)
9038           LD="${LD-ld} -64"
9039           ;;
9040       esac
9041     fi
9042   fi
9043   rm -rf conftest*
9044   ;;
9045
9046 mips64*-*linux*)
9047   # Find out what ABI is being produced by ac_compile, and set linker
9048   # options accordingly.
9049   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9050   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9051   (eval $ac_compile) 2>&5
9052   ac_status=$?
9053   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9054   test $ac_status = 0; }; then
9055     emul=elf
9056     case `/usr/bin/file conftest.$ac_objext` in
9057       *32-bit*)
9058         emul="${emul}32"
9059         ;;
9060       *64-bit*)
9061         emul="${emul}64"
9062         ;;
9063     esac
9064     case `/usr/bin/file conftest.$ac_objext` in
9065       *MSB*)
9066         emul="${emul}btsmip"
9067         ;;
9068       *LSB*)
9069         emul="${emul}ltsmip"
9070         ;;
9071     esac
9072     case `/usr/bin/file conftest.$ac_objext` in
9073       *N32*)
9074         emul="${emul}n32"
9075         ;;
9076     esac
9077     LD="${LD-ld} -m $emul"
9078   fi
9079   rm -rf conftest*
9080   ;;
9081
9082 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9083 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9084   # Find out what ABI is being produced by ac_compile, and set linker
9085   # options accordingly.  Note that the listed cases only cover the
9086   # situations where additional linker options are needed (such as when
9087   # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9088   # vice versa); the common cases where no linker options are needed do
9089   # not appear in the list.
9090   echo 'int i;' > conftest.$ac_ext
9091   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9092   (eval $ac_compile) 2>&5
9093   ac_status=$?
9094   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9095   test $ac_status = 0; }; then
9096     case `/usr/bin/file conftest.o` in
9097       *32-bit*)
9098         case $host in
9099           x86_64-*kfreebsd*-gnu)
9100             LD="${LD-ld} -m elf_i386_fbsd"
9101             ;;
9102           x86_64-*linux*)
9103             case `/usr/bin/file conftest.o` in
9104               *x86-64*)
9105                 LD="${LD-ld} -m elf32_x86_64"
9106                 ;;
9107               *)
9108                 LD="${LD-ld} -m elf_i386"
9109                 ;;
9110             esac
9111             ;;
9112           powerpc64le-*linux*)
9113             LD="${LD-ld} -m elf32lppclinux"
9114             ;;
9115           powerpc64-*linux*)
9116             LD="${LD-ld} -m elf32ppclinux"
9117             ;;
9118           s390x-*linux*)
9119             LD="${LD-ld} -m elf_s390"
9120             ;;
9121           sparc64-*linux*)
9122             LD="${LD-ld} -m elf32_sparc"
9123             ;;
9124         esac
9125         ;;
9126       *64-bit*)
9127         case $host in
9128           x86_64-*kfreebsd*-gnu)
9129             LD="${LD-ld} -m elf_x86_64_fbsd"
9130             ;;
9131           x86_64-*linux*)
9132             LD="${LD-ld} -m elf_x86_64"
9133             ;;
9134           powerpcle-*linux*)
9135             LD="${LD-ld} -m elf64lppc"
9136             ;;
9137           powerpc-*linux*)
9138             LD="${LD-ld} -m elf64ppc"
9139             ;;
9140           s390*-*linux*|s390*-*tpf*)
9141             LD="${LD-ld} -m elf64_s390"
9142             ;;
9143           sparc*-*linux*)
9144             LD="${LD-ld} -m elf64_sparc"
9145             ;;
9146         esac
9147         ;;
9148     esac
9149   fi
9150   rm -rf conftest*
9151   ;;
9152
9153 *-*-sco3.2v5*)
9154   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9155   SAVE_CFLAGS=$CFLAGS
9156   CFLAGS="$CFLAGS -belf"
9157   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9158 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
9159 if ${lt_cv_cc_needs_belf+:} false; then :
9160   $as_echo_n "(cached) " >&6
9161 else
9162   ac_ext=c
9163 ac_cpp='$CPP $CPPFLAGS'
9164 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9165 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9166 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9167
9168      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9169 /* end confdefs.h.  */
9170
9171 int
9172 main ()
9173 {
9174
9175   ;
9176   return 0;
9177 }
9178 _ACEOF
9179 if ac_fn_c_try_link "$LINENO"; then :
9180   lt_cv_cc_needs_belf=yes
9181 else
9182   lt_cv_cc_needs_belf=no
9183 fi
9184 rm -f core conftest.err conftest.$ac_objext \
9185     conftest$ac_exeext conftest.$ac_ext
9186      ac_ext=c
9187 ac_cpp='$CPP $CPPFLAGS'
9188 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9189 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9190 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9191
9192 fi
9193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9194 $as_echo "$lt_cv_cc_needs_belf" >&6; }
9195   if test yes != "$lt_cv_cc_needs_belf"; then
9196     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9197     CFLAGS=$SAVE_CFLAGS
9198   fi
9199   ;;
9200 *-*solaris*)
9201   # Find out what ABI is being produced by ac_compile, and set linker
9202   # options accordingly.
9203   echo 'int i;' > conftest.$ac_ext
9204   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9205   (eval $ac_compile) 2>&5
9206   ac_status=$?
9207   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9208   test $ac_status = 0; }; then
9209     case `/usr/bin/file conftest.o` in
9210     *64-bit*)
9211       case $lt_cv_prog_gnu_ld in
9212       yes*)
9213         case $host in
9214         i?86-*-solaris*|x86_64-*-solaris*)
9215           LD="${LD-ld} -m elf_x86_64"
9216           ;;
9217         sparc*-*-solaris*)
9218           LD="${LD-ld} -m elf64_sparc"
9219           ;;
9220         esac
9221         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9222         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9223           LD=${LD-ld}_sol2
9224         fi
9225         ;;
9226       *)
9227         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9228           LD="${LD-ld} -64"
9229         fi
9230         ;;
9231       esac
9232       ;;
9233     esac
9234   fi
9235   rm -rf conftest*
9236   ;;
9237 esac
9238
9239 need_locks=$enable_libtool_lock
9240
9241 if test -n "$ac_tool_prefix"; then
9242   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9243 set dummy ${ac_tool_prefix}mt; ac_word=$2
9244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9245 $as_echo_n "checking for $ac_word... " >&6; }
9246 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9247   $as_echo_n "(cached) " >&6
9248 else
9249   if test -n "$MANIFEST_TOOL"; then
9250   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9251 else
9252 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9253 for as_dir in $PATH
9254 do
9255   IFS=$as_save_IFS
9256   test -z "$as_dir" && as_dir=.
9257     for ac_exec_ext in '' $ac_executable_extensions; do
9258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9259     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9261     break 2
9262   fi
9263 done
9264   done
9265 IFS=$as_save_IFS
9266
9267 fi
9268 fi
9269 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9270 if test -n "$MANIFEST_TOOL"; then
9271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9272 $as_echo "$MANIFEST_TOOL" >&6; }
9273 else
9274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9275 $as_echo "no" >&6; }
9276 fi
9277
9278
9279 fi
9280 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9281   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9282   # Extract the first word of "mt", so it can be a program name with args.
9283 set dummy mt; ac_word=$2
9284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9285 $as_echo_n "checking for $ac_word... " >&6; }
9286 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9287   $as_echo_n "(cached) " >&6
9288 else
9289   if test -n "$ac_ct_MANIFEST_TOOL"; then
9290   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9291 else
9292 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9293 for as_dir in $PATH
9294 do
9295   IFS=$as_save_IFS
9296   test -z "$as_dir" && as_dir=.
9297     for ac_exec_ext in '' $ac_executable_extensions; do
9298   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9299     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9300     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9301     break 2
9302   fi
9303 done
9304   done
9305 IFS=$as_save_IFS
9306
9307 fi
9308 fi
9309 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9310 if test -n "$ac_ct_MANIFEST_TOOL"; then
9311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9312 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9313 else
9314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9315 $as_echo "no" >&6; }
9316 fi
9317
9318   if test "x$ac_ct_MANIFEST_TOOL" = x; then
9319     MANIFEST_TOOL=":"
9320   else
9321     case $cross_compiling:$ac_tool_warned in
9322 yes:)
9323 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9324 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9325 ac_tool_warned=yes ;;
9326 esac
9327     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9328   fi
9329 else
9330   MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9331 fi
9332
9333 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9335 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9336 if ${lt_cv_path_mainfest_tool+:} false; then :
9337   $as_echo_n "(cached) " >&6
9338 else
9339   lt_cv_path_mainfest_tool=no
9340   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9341   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9342   cat conftest.err >&5
9343   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9344     lt_cv_path_mainfest_tool=yes
9345   fi
9346   rm -f conftest*
9347 fi
9348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9349 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
9350 if test yes != "$lt_cv_path_mainfest_tool"; then
9351   MANIFEST_TOOL=:
9352 fi
9353
9354
9355
9356
9357
9358
9359   case $host_os in
9360     rhapsody* | darwin*)
9361     if test -n "$ac_tool_prefix"; then
9362   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9363 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9365 $as_echo_n "checking for $ac_word... " >&6; }
9366 if ${ac_cv_prog_DSYMUTIL+:} false; then :
9367   $as_echo_n "(cached) " >&6
9368 else
9369   if test -n "$DSYMUTIL"; then
9370   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9371 else
9372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9373 for as_dir in $PATH
9374 do
9375   IFS=$as_save_IFS
9376   test -z "$as_dir" && as_dir=.
9377     for ac_exec_ext in '' $ac_executable_extensions; do
9378   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9379     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9381     break 2
9382   fi
9383 done
9384   done
9385 IFS=$as_save_IFS
9386
9387 fi
9388 fi
9389 DSYMUTIL=$ac_cv_prog_DSYMUTIL
9390 if test -n "$DSYMUTIL"; then
9391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9392 $as_echo "$DSYMUTIL" >&6; }
9393 else
9394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9395 $as_echo "no" >&6; }
9396 fi
9397
9398
9399 fi
9400 if test -z "$ac_cv_prog_DSYMUTIL"; then
9401   ac_ct_DSYMUTIL=$DSYMUTIL
9402   # Extract the first word of "dsymutil", so it can be a program name with args.
9403 set dummy dsymutil; ac_word=$2
9404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9405 $as_echo_n "checking for $ac_word... " >&6; }
9406 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9407   $as_echo_n "(cached) " >&6
9408 else
9409   if test -n "$ac_ct_DSYMUTIL"; then
9410   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9411 else
9412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9413 for as_dir in $PATH
9414 do
9415   IFS=$as_save_IFS
9416   test -z "$as_dir" && as_dir=.
9417     for ac_exec_ext in '' $ac_executable_extensions; do
9418   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9419     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9420     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9421     break 2
9422   fi
9423 done
9424   done
9425 IFS=$as_save_IFS
9426
9427 fi
9428 fi
9429 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9430 if test -n "$ac_ct_DSYMUTIL"; then
9431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9432 $as_echo "$ac_ct_DSYMUTIL" >&6; }
9433 else
9434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9435 $as_echo "no" >&6; }
9436 fi
9437
9438   if test "x$ac_ct_DSYMUTIL" = x; then
9439     DSYMUTIL=":"
9440   else
9441     case $cross_compiling:$ac_tool_warned in
9442 yes:)
9443 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9444 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9445 ac_tool_warned=yes ;;
9446 esac
9447     DSYMUTIL=$ac_ct_DSYMUTIL
9448   fi
9449 else
9450   DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9451 fi
9452
9453     if test -n "$ac_tool_prefix"; then
9454   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9455 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9457 $as_echo_n "checking for $ac_word... " >&6; }
9458 if ${ac_cv_prog_NMEDIT+:} false; then :
9459   $as_echo_n "(cached) " >&6
9460 else
9461   if test -n "$NMEDIT"; then
9462   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9463 else
9464 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9465 for as_dir in $PATH
9466 do
9467   IFS=$as_save_IFS
9468   test -z "$as_dir" && as_dir=.
9469     for ac_exec_ext in '' $ac_executable_extensions; do
9470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9471     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9473     break 2
9474   fi
9475 done
9476   done
9477 IFS=$as_save_IFS
9478
9479 fi
9480 fi
9481 NMEDIT=$ac_cv_prog_NMEDIT
9482 if test -n "$NMEDIT"; then
9483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9484 $as_echo "$NMEDIT" >&6; }
9485 else
9486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9487 $as_echo "no" >&6; }
9488 fi
9489
9490
9491 fi
9492 if test -z "$ac_cv_prog_NMEDIT"; then
9493   ac_ct_NMEDIT=$NMEDIT
9494   # Extract the first word of "nmedit", so it can be a program name with args.
9495 set dummy nmedit; ac_word=$2
9496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9497 $as_echo_n "checking for $ac_word... " >&6; }
9498 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9499   $as_echo_n "(cached) " >&6
9500 else
9501   if test -n "$ac_ct_NMEDIT"; then
9502   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9503 else
9504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9505 for as_dir in $PATH
9506 do
9507   IFS=$as_save_IFS
9508   test -z "$as_dir" && as_dir=.
9509     for ac_exec_ext in '' $ac_executable_extensions; do
9510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9511     ac_cv_prog_ac_ct_NMEDIT="nmedit"
9512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9513     break 2
9514   fi
9515 done
9516   done
9517 IFS=$as_save_IFS
9518
9519 fi
9520 fi
9521 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9522 if test -n "$ac_ct_NMEDIT"; then
9523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9524 $as_echo "$ac_ct_NMEDIT" >&6; }
9525 else
9526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9527 $as_echo "no" >&6; }
9528 fi
9529
9530   if test "x$ac_ct_NMEDIT" = x; then
9531     NMEDIT=":"
9532   else
9533     case $cross_compiling:$ac_tool_warned in
9534 yes:)
9535 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9536 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9537 ac_tool_warned=yes ;;
9538 esac
9539     NMEDIT=$ac_ct_NMEDIT
9540   fi
9541 else
9542   NMEDIT="$ac_cv_prog_NMEDIT"
9543 fi
9544
9545     if test -n "$ac_tool_prefix"; then
9546   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9547 set dummy ${ac_tool_prefix}lipo; ac_word=$2
9548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9549 $as_echo_n "checking for $ac_word... " >&6; }
9550 if ${ac_cv_prog_LIPO+:} false; then :
9551   $as_echo_n "(cached) " >&6
9552 else
9553   if test -n "$LIPO"; then
9554   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9555 else
9556 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9557 for as_dir in $PATH
9558 do
9559   IFS=$as_save_IFS
9560   test -z "$as_dir" && as_dir=.
9561     for ac_exec_ext in '' $ac_executable_extensions; do
9562   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9563     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9564     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9565     break 2
9566   fi
9567 done
9568   done
9569 IFS=$as_save_IFS
9570
9571 fi
9572 fi
9573 LIPO=$ac_cv_prog_LIPO
9574 if test -n "$LIPO"; then
9575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9576 $as_echo "$LIPO" >&6; }
9577 else
9578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9579 $as_echo "no" >&6; }
9580 fi
9581
9582
9583 fi
9584 if test -z "$ac_cv_prog_LIPO"; then
9585   ac_ct_LIPO=$LIPO
9586   # Extract the first word of "lipo", so it can be a program name with args.
9587 set dummy lipo; ac_word=$2
9588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9589 $as_echo_n "checking for $ac_word... " >&6; }
9590 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9591   $as_echo_n "(cached) " >&6
9592 else
9593   if test -n "$ac_ct_LIPO"; then
9594   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9595 else
9596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9597 for as_dir in $PATH
9598 do
9599   IFS=$as_save_IFS
9600   test -z "$as_dir" && as_dir=.
9601     for ac_exec_ext in '' $ac_executable_extensions; do
9602   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9603     ac_cv_prog_ac_ct_LIPO="lipo"
9604     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9605     break 2
9606   fi
9607 done
9608   done
9609 IFS=$as_save_IFS
9610
9611 fi
9612 fi
9613 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9614 if test -n "$ac_ct_LIPO"; then
9615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9616 $as_echo "$ac_ct_LIPO" >&6; }
9617 else
9618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9619 $as_echo "no" >&6; }
9620 fi
9621
9622   if test "x$ac_ct_LIPO" = x; then
9623     LIPO=":"
9624   else
9625     case $cross_compiling:$ac_tool_warned in
9626 yes:)
9627 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9628 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9629 ac_tool_warned=yes ;;
9630 esac
9631     LIPO=$ac_ct_LIPO
9632   fi
9633 else
9634   LIPO="$ac_cv_prog_LIPO"
9635 fi
9636
9637     if test -n "$ac_tool_prefix"; then
9638   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9639 set dummy ${ac_tool_prefix}otool; ac_word=$2
9640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9641 $as_echo_n "checking for $ac_word... " >&6; }
9642 if ${ac_cv_prog_OTOOL+:} false; then :
9643   $as_echo_n "(cached) " >&6
9644 else
9645   if test -n "$OTOOL"; then
9646   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9647 else
9648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9649 for as_dir in $PATH
9650 do
9651   IFS=$as_save_IFS
9652   test -z "$as_dir" && as_dir=.
9653     for ac_exec_ext in '' $ac_executable_extensions; do
9654   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9655     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9657     break 2
9658   fi
9659 done
9660   done
9661 IFS=$as_save_IFS
9662
9663 fi
9664 fi
9665 OTOOL=$ac_cv_prog_OTOOL
9666 if test -n "$OTOOL"; then
9667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9668 $as_echo "$OTOOL" >&6; }
9669 else
9670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9671 $as_echo "no" >&6; }
9672 fi
9673
9674
9675 fi
9676 if test -z "$ac_cv_prog_OTOOL"; then
9677   ac_ct_OTOOL=$OTOOL
9678   # Extract the first word of "otool", so it can be a program name with args.
9679 set dummy otool; ac_word=$2
9680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9681 $as_echo_n "checking for $ac_word... " >&6; }
9682 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9683   $as_echo_n "(cached) " >&6
9684 else
9685   if test -n "$ac_ct_OTOOL"; then
9686   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
9687 else
9688 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9689 for as_dir in $PATH
9690 do
9691   IFS=$as_save_IFS
9692   test -z "$as_dir" && as_dir=.
9693     for ac_exec_ext in '' $ac_executable_extensions; do
9694   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9695     ac_cv_prog_ac_ct_OTOOL="otool"
9696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9697     break 2
9698   fi
9699 done
9700   done
9701 IFS=$as_save_IFS
9702
9703 fi
9704 fi
9705 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
9706 if test -n "$ac_ct_OTOOL"; then
9707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
9708 $as_echo "$ac_ct_OTOOL" >&6; }
9709 else
9710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9711 $as_echo "no" >&6; }
9712 fi
9713
9714   if test "x$ac_ct_OTOOL" = x; then
9715     OTOOL=":"
9716   else
9717     case $cross_compiling:$ac_tool_warned in
9718 yes:)
9719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9720 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9721 ac_tool_warned=yes ;;
9722 esac
9723     OTOOL=$ac_ct_OTOOL
9724   fi
9725 else
9726   OTOOL="$ac_cv_prog_OTOOL"
9727 fi
9728
9729     if test -n "$ac_tool_prefix"; then
9730   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
9731 set dummy ${ac_tool_prefix}otool64; ac_word=$2
9732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9733 $as_echo_n "checking for $ac_word... " >&6; }
9734 if ${ac_cv_prog_OTOOL64+:} false; then :
9735   $as_echo_n "(cached) " >&6
9736 else
9737   if test -n "$OTOOL64"; then
9738   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
9739 else
9740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9741 for as_dir in $PATH
9742 do
9743   IFS=$as_save_IFS
9744   test -z "$as_dir" && as_dir=.
9745     for ac_exec_ext in '' $ac_executable_extensions; do
9746   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9747     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
9748     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9749     break 2
9750   fi
9751 done
9752   done
9753 IFS=$as_save_IFS
9754
9755 fi
9756 fi
9757 OTOOL64=$ac_cv_prog_OTOOL64
9758 if test -n "$OTOOL64"; then
9759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
9760 $as_echo "$OTOOL64" >&6; }
9761 else
9762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9763 $as_echo "no" >&6; }
9764 fi
9765
9766
9767 fi
9768 if test -z "$ac_cv_prog_OTOOL64"; then
9769   ac_ct_OTOOL64=$OTOOL64
9770   # Extract the first word of "otool64", so it can be a program name with args.
9771 set dummy otool64; ac_word=$2
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9773 $as_echo_n "checking for $ac_word... " >&6; }
9774 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
9775   $as_echo_n "(cached) " >&6
9776 else
9777   if test -n "$ac_ct_OTOOL64"; then
9778   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
9779 else
9780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9781 for as_dir in $PATH
9782 do
9783   IFS=$as_save_IFS
9784   test -z "$as_dir" && as_dir=.
9785     for ac_exec_ext in '' $ac_executable_extensions; do
9786   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9787     ac_cv_prog_ac_ct_OTOOL64="otool64"
9788     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9789     break 2
9790   fi
9791 done
9792   done
9793 IFS=$as_save_IFS
9794
9795 fi
9796 fi
9797 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
9798 if test -n "$ac_ct_OTOOL64"; then
9799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
9800 $as_echo "$ac_ct_OTOOL64" >&6; }
9801 else
9802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9803 $as_echo "no" >&6; }
9804 fi
9805
9806   if test "x$ac_ct_OTOOL64" = x; then
9807     OTOOL64=":"
9808   else
9809     case $cross_compiling:$ac_tool_warned in
9810 yes:)
9811 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9812 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9813 ac_tool_warned=yes ;;
9814 esac
9815     OTOOL64=$ac_ct_OTOOL64
9816   fi
9817 else
9818   OTOOL64="$ac_cv_prog_OTOOL64"
9819 fi
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
9848 $as_echo_n "checking for -single_module linker flag... " >&6; }
9849 if ${lt_cv_apple_cc_single_mod+:} false; then :
9850   $as_echo_n "(cached) " >&6
9851 else
9852   lt_cv_apple_cc_single_mod=no
9853       if test -z "$LT_MULTI_MODULE"; then
9854         # By default we will add the -single_module flag. You can override
9855         # by either setting the environment variable LT_MULTI_MODULE
9856         # non-empty at configure time, or by adding -multi_module to the
9857         # link flags.
9858         rm -rf libconftest.dylib*
9859         echo "int foo(void){return 1;}" > conftest.c
9860         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9861 -dynamiclib -Wl,-single_module conftest.c" >&5
9862         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9863           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
9864         _lt_result=$?
9865         # If there is a non-empty error log, and "single_module"
9866         # appears in it, assume the flag caused a linker warning
9867         if test -s conftest.err && $GREP single_module conftest.err; then
9868           cat conftest.err >&5
9869         # Otherwise, if the output was created with a 0 exit code from
9870         # the compiler, it worked.
9871         elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
9872           lt_cv_apple_cc_single_mod=yes
9873         else
9874           cat conftest.err >&5
9875         fi
9876         rm -rf libconftest.dylib*
9877         rm -f conftest.*
9878       fi
9879 fi
9880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
9881 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
9882
9883     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
9884 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
9885 if ${lt_cv_ld_exported_symbols_list+:} false; then :
9886   $as_echo_n "(cached) " >&6
9887 else
9888   lt_cv_ld_exported_symbols_list=no
9889       save_LDFLAGS=$LDFLAGS
9890       echo "_main" > conftest.sym
9891       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
9892       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9893 /* end confdefs.h.  */
9894
9895 int
9896 main ()
9897 {
9898
9899   ;
9900   return 0;
9901 }
9902 _ACEOF
9903 if ac_fn_c_try_link "$LINENO"; then :
9904   lt_cv_ld_exported_symbols_list=yes
9905 else
9906   lt_cv_ld_exported_symbols_list=no
9907 fi
9908 rm -f core conftest.err conftest.$ac_objext \
9909     conftest$ac_exeext conftest.$ac_ext
9910         LDFLAGS=$save_LDFLAGS
9911
9912 fi
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
9914 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
9915
9916     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
9917 $as_echo_n "checking for -force_load linker flag... " >&6; }
9918 if ${lt_cv_ld_force_load+:} false; then :
9919   $as_echo_n "(cached) " >&6
9920 else
9921   lt_cv_ld_force_load=no
9922       cat > conftest.c << _LT_EOF
9923 int forced_loaded() { return 2;}
9924 _LT_EOF
9925       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
9926       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
9927       echo "$AR cru libconftest.a conftest.o" >&5
9928       $AR cru libconftest.a conftest.o 2>&5
9929       echo "$RANLIB libconftest.a" >&5
9930       $RANLIB libconftest.a 2>&5
9931       cat > conftest.c << _LT_EOF
9932 int main() { return 0;}
9933 _LT_EOF
9934       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
9935       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
9936       _lt_result=$?
9937       if test -s conftest.err && $GREP force_load conftest.err; then
9938         cat conftest.err >&5
9939       elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
9940         lt_cv_ld_force_load=yes
9941       else
9942         cat conftest.err >&5
9943       fi
9944         rm -f conftest.err libconftest.a conftest conftest.c
9945         rm -rf conftest.dSYM
9946
9947 fi
9948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
9949 $as_echo "$lt_cv_ld_force_load" >&6; }
9950     case $host_os in
9951     rhapsody* | darwin1.[012])
9952       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
9953     darwin1.*)
9954       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
9955     darwin*) # darwin 5.x on
9956       # if running on 10.5 or later, the deployment target defaults
9957       # to the OS version, if on x86, and 10.4, the deployment
9958       # target defaults to 10.4. Don't you love it?
9959       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
9960         10.0,*86*-darwin8*|10.0,*-darwin[91]*)
9961           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
9962         10.[012][,.]*)
9963           _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
9964         10.*)
9965           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
9966       esac
9967     ;;
9968   esac
9969     if test yes = "$lt_cv_apple_cc_single_mod"; then
9970       _lt_dar_single_mod='$single_module'
9971     fi
9972     if test yes = "$lt_cv_ld_exported_symbols_list"; then
9973       _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
9974     else
9975       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
9976     fi
9977     if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
9978       _lt_dsymutil='~$DSYMUTIL $lib || :'
9979     else
9980       _lt_dsymutil=
9981     fi
9982     ;;
9983   esac
9984
9985 # func_munge_path_list VARIABLE PATH
9986 # -----------------------------------
9987 # VARIABLE is name of variable containing _space_ separated list of
9988 # directories to be munged by the contents of PATH, which is string
9989 # having a format:
9990 # "DIR[:DIR]:"
9991 #       string "DIR[ DIR]" will be prepended to VARIABLE
9992 # ":DIR[:DIR]"
9993 #       string "DIR[ DIR]" will be appended to VARIABLE
9994 # "DIRP[:DIRP]::[DIRA:]DIRA"
9995 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
9996 #       "DIRA[ DIRA]" will be appended to VARIABLE
9997 # "DIR[:DIR]"
9998 #       VARIABLE will be replaced by "DIR[ DIR]"
9999 func_munge_path_list ()
10000 {
10001     case x$2 in
10002     x)
10003         ;;
10004     *:)
10005         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10006         ;;
10007     x:*)
10008         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10009         ;;
10010     *::*)
10011         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10012         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10013         ;;
10014     *)
10015         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10016         ;;
10017     esac
10018 }
10019
10020 for ac_header in dlfcn.h
10021 do :
10022   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10023 "
10024 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
10025   cat >>confdefs.h <<_ACEOF
10026 #define HAVE_DLFCN_H 1
10027 _ACEOF
10028
10029 fi
10030
10031 done
10032
10033
10034
10035
10036
10037
10038
10039 # Set options
10040
10041
10042
10043         enable_dlopen=no
10044
10045
10046   enable_win32_dll=no
10047
10048
10049             # Check whether --enable-shared was given.
10050 if test "${enable_shared+set}" = set; then :
10051   enableval=$enable_shared; p=${PACKAGE-default}
10052     case $enableval in
10053     yes) enable_shared=yes ;;
10054     no) enable_shared=no ;;
10055     *)
10056       enable_shared=no
10057       # Look at the argument we got.  We use all the common list separators.
10058       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10059       for pkg in $enableval; do
10060         IFS=$lt_save_ifs
10061         if test "X$pkg" = "X$p"; then
10062           enable_shared=yes
10063         fi
10064       done
10065       IFS=$lt_save_ifs
10066       ;;
10067     esac
10068 else
10069   enable_shared=yes
10070 fi
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080   # Check whether --enable-static was given.
10081 if test "${enable_static+set}" = set; then :
10082   enableval=$enable_static; p=${PACKAGE-default}
10083     case $enableval in
10084     yes) enable_static=yes ;;
10085     no) enable_static=no ;;
10086     *)
10087      enable_static=no
10088       # Look at the argument we got.  We use all the common list separators.
10089       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10090       for pkg in $enableval; do
10091         IFS=$lt_save_ifs
10092         if test "X$pkg" = "X$p"; then
10093           enable_static=yes
10094         fi
10095       done
10096       IFS=$lt_save_ifs
10097       ;;
10098     esac
10099 else
10100   enable_static=yes
10101 fi
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112 # Check whether --with-pic was given.
10113 if test "${with_pic+set}" = set; then :
10114   withval=$with_pic; lt_p=${PACKAGE-default}
10115     case $withval in
10116     yes|no) pic_mode=$withval ;;
10117     *)
10118       pic_mode=default
10119       # Look at the argument we got.  We use all the common list separators.
10120       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10121       for lt_pkg in $withval; do
10122         IFS=$lt_save_ifs
10123         if test "X$lt_pkg" = "X$lt_p"; then
10124           pic_mode=yes
10125         fi
10126       done
10127       IFS=$lt_save_ifs
10128       ;;
10129     esac
10130 else
10131   pic_mode=default
10132 fi
10133
10134
10135
10136
10137
10138
10139
10140
10141   # Check whether --enable-fast-install was given.
10142 if test "${enable_fast_install+set}" = set; then :
10143   enableval=$enable_fast_install; p=${PACKAGE-default}
10144     case $enableval in
10145     yes) enable_fast_install=yes ;;
10146     no) enable_fast_install=no ;;
10147     *)
10148       enable_fast_install=no
10149       # Look at the argument we got.  We use all the common list separators.
10150       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10151       for pkg in $enableval; do
10152         IFS=$lt_save_ifs
10153         if test "X$pkg" = "X$p"; then
10154           enable_fast_install=yes
10155         fi
10156       done
10157       IFS=$lt_save_ifs
10158       ;;
10159     esac
10160 else
10161   enable_fast_install=yes
10162 fi
10163
10164
10165
10166
10167
10168
10169
10170
10171   shared_archive_member_spec=
10172 case $host,$enable_shared in
10173 power*-*-aix[5-9]*,yes)
10174   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10175 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
10176
10177 # Check whether --with-aix-soname was given.
10178 if test "${with_aix_soname+set}" = set; then :
10179   withval=$with_aix_soname; case $withval in
10180     aix|svr4|both)
10181       ;;
10182     *)
10183       as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10184       ;;
10185     esac
10186     lt_cv_with_aix_soname=$with_aix_soname
10187 else
10188   if ${lt_cv_with_aix_soname+:} false; then :
10189   $as_echo_n "(cached) " >&6
10190 else
10191   lt_cv_with_aix_soname=aix
10192 fi
10193
10194     with_aix_soname=$lt_cv_with_aix_soname
10195 fi
10196
10197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10198 $as_echo "$with_aix_soname" >&6; }
10199   if test aix != "$with_aix_soname"; then
10200     # For the AIX way of multilib, we name the shared archive member
10201     # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10202     # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10203     # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10204     # the AIX toolchain works better with OBJECT_MODE set (default 32).
10205     if test 64 = "${OBJECT_MODE-32}"; then
10206       shared_archive_member_spec=shr_64
10207     else
10208       shared_archive_member_spec=shr
10209     fi
10210   fi
10211   ;;
10212 *)
10213   with_aix_soname=aix
10214   ;;
10215 esac
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226 # This can be used to rebuild libtool when needed
10227 LIBTOOL_DEPS=$ltmain
10228
10229 # Always use our own libtool.
10230 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261 test -z "$LN_S" && LN_S="ln -s"
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276 if test -n "${ZSH_VERSION+set}"; then
10277    setopt NO_GLOB_SUBST
10278 fi
10279
10280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10281 $as_echo_n "checking for objdir... " >&6; }
10282 if ${lt_cv_objdir+:} false; then :
10283   $as_echo_n "(cached) " >&6
10284 else
10285   rm -f .libs 2>/dev/null
10286 mkdir .libs 2>/dev/null
10287 if test -d .libs; then
10288   lt_cv_objdir=.libs
10289 else
10290   # MS-DOS does not allow filenames that begin with a dot.
10291   lt_cv_objdir=_libs
10292 fi
10293 rmdir .libs 2>/dev/null
10294 fi
10295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10296 $as_echo "$lt_cv_objdir" >&6; }
10297 objdir=$lt_cv_objdir
10298
10299
10300
10301
10302
10303 cat >>confdefs.h <<_ACEOF
10304 #define LT_OBJDIR "$lt_cv_objdir/"
10305 _ACEOF
10306
10307
10308
10309
10310 case $host_os in
10311 aix3*)
10312   # AIX sometimes has problems with the GCC collect2 program.  For some
10313   # reason, if we set the COLLECT_NAMES environment variable, the problems
10314   # vanish in a puff of smoke.
10315   if test set != "${COLLECT_NAMES+set}"; then
10316     COLLECT_NAMES=
10317     export COLLECT_NAMES
10318   fi
10319   ;;
10320 esac
10321
10322 # Global variables:
10323 ofile=libtool
10324 can_build_shared=yes
10325
10326 # All known linkers require a '.a' archive for static linking (except MSVC,
10327 # which needs '.lib').
10328 libext=a
10329
10330 with_gnu_ld=$lt_cv_prog_gnu_ld
10331
10332 old_CC=$CC
10333 old_CFLAGS=$CFLAGS
10334
10335 # Set sane defaults for various variables
10336 test -z "$CC" && CC=cc
10337 test -z "$LTCC" && LTCC=$CC
10338 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10339 test -z "$LD" && LD=ld
10340 test -z "$ac_objext" && ac_objext=o
10341
10342 func_cc_basename $compiler
10343 cc_basename=$func_cc_basename_result
10344
10345
10346 # Only perform the check for file, if the check method requires it
10347 test -z "$MAGIC_CMD" && MAGIC_CMD=file
10348 case $deplibs_check_method in
10349 file_magic*)
10350   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10351     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10352 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10353 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10354   $as_echo_n "(cached) " >&6
10355 else
10356   case $MAGIC_CMD in
10357 [\\/*] |  ?:[\\/]*)
10358   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10359   ;;
10360 *)
10361   lt_save_MAGIC_CMD=$MAGIC_CMD
10362   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10363   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10364   for ac_dir in $ac_dummy; do
10365     IFS=$lt_save_ifs
10366     test -z "$ac_dir" && ac_dir=.
10367     if test -f "$ac_dir/${ac_tool_prefix}file"; then
10368       lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10369       if test -n "$file_magic_test_file"; then
10370         case $deplibs_check_method in
10371         "file_magic "*)
10372           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10373           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10374           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10375             $EGREP "$file_magic_regex" > /dev/null; then
10376             :
10377           else
10378             cat <<_LT_EOF 1>&2
10379
10380 *** Warning: the command libtool uses to detect shared libraries,
10381 *** $file_magic_cmd, produces output that libtool cannot recognize.
10382 *** The result is that libtool may fail to recognize shared libraries
10383 *** as such.  This will affect the creation of libtool libraries that
10384 *** depend on shared libraries, but programs linked with such libtool
10385 *** libraries will work regardless of this problem.  Nevertheless, you
10386 *** may want to report the problem to your system manager and/or to
10387 *** bug-libtool@gnu.org
10388
10389 _LT_EOF
10390           fi ;;
10391         esac
10392       fi
10393       break
10394     fi
10395   done
10396   IFS=$lt_save_ifs
10397   MAGIC_CMD=$lt_save_MAGIC_CMD
10398   ;;
10399 esac
10400 fi
10401
10402 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10403 if test -n "$MAGIC_CMD"; then
10404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10405 $as_echo "$MAGIC_CMD" >&6; }
10406 else
10407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10408 $as_echo "no" >&6; }
10409 fi
10410
10411
10412
10413
10414
10415 if test -z "$lt_cv_path_MAGIC_CMD"; then
10416   if test -n "$ac_tool_prefix"; then
10417     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10418 $as_echo_n "checking for file... " >&6; }
10419 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10420   $as_echo_n "(cached) " >&6
10421 else
10422   case $MAGIC_CMD in
10423 [\\/*] |  ?:[\\/]*)
10424   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10425   ;;
10426 *)
10427   lt_save_MAGIC_CMD=$MAGIC_CMD
10428   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10429   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10430   for ac_dir in $ac_dummy; do
10431     IFS=$lt_save_ifs
10432     test -z "$ac_dir" && ac_dir=.
10433     if test -f "$ac_dir/file"; then
10434       lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10435       if test -n "$file_magic_test_file"; then
10436         case $deplibs_check_method in
10437         "file_magic "*)
10438           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10439           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10440           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10441             $EGREP "$file_magic_regex" > /dev/null; then
10442             :
10443           else
10444             cat <<_LT_EOF 1>&2
10445
10446 *** Warning: the command libtool uses to detect shared libraries,
10447 *** $file_magic_cmd, produces output that libtool cannot recognize.
10448 *** The result is that libtool may fail to recognize shared libraries
10449 *** as such.  This will affect the creation of libtool libraries that
10450 *** depend on shared libraries, but programs linked with such libtool
10451 *** libraries will work regardless of this problem.  Nevertheless, you
10452 *** may want to report the problem to your system manager and/or to
10453 *** bug-libtool@gnu.org
10454
10455 _LT_EOF
10456           fi ;;
10457         esac
10458       fi
10459       break
10460     fi
10461   done
10462   IFS=$lt_save_ifs
10463   MAGIC_CMD=$lt_save_MAGIC_CMD
10464   ;;
10465 esac
10466 fi
10467
10468 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10469 if test -n "$MAGIC_CMD"; then
10470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10471 $as_echo "$MAGIC_CMD" >&6; }
10472 else
10473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10474 $as_echo "no" >&6; }
10475 fi
10476
10477
10478   else
10479     MAGIC_CMD=:
10480   fi
10481 fi
10482
10483   fi
10484   ;;
10485 esac
10486
10487 # Use C for the default configuration in the libtool script
10488
10489 lt_save_CC=$CC
10490 ac_ext=c
10491 ac_cpp='$CPP $CPPFLAGS'
10492 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10493 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10494 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10495
10496
10497 # Source file extension for C test sources.
10498 ac_ext=c
10499
10500 # Object file extension for compiled C test sources.
10501 objext=o
10502 objext=$objext
10503
10504 # Code to be used in simple compile tests
10505 lt_simple_compile_test_code="int some_variable = 0;"
10506
10507 # Code to be used in simple link tests
10508 lt_simple_link_test_code='int main(){return(0);}'
10509
10510
10511
10512
10513
10514
10515
10516 # If no C compiler was specified, use CC.
10517 LTCC=${LTCC-"$CC"}
10518
10519 # If no C compiler flags were specified, use CFLAGS.
10520 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10521
10522 # Allow CC to be a program name with arguments.
10523 compiler=$CC
10524
10525 # Save the default compiler, since it gets overwritten when the other
10526 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10527 compiler_DEFAULT=$CC
10528
10529 # save warnings/boilerplate of simple test code
10530 ac_outfile=conftest.$ac_objext
10531 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10532 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10533 _lt_compiler_boilerplate=`cat conftest.err`
10534 $RM conftest*
10535
10536 ac_outfile=conftest.$ac_objext
10537 echo "$lt_simple_link_test_code" >conftest.$ac_ext
10538 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10539 _lt_linker_boilerplate=`cat conftest.err`
10540 $RM -r conftest*
10541
10542
10543 if test -n "$compiler"; then
10544
10545 lt_prog_compiler_no_builtin_flag=
10546
10547 if test yes = "$GCC"; then
10548   case $cc_basename in
10549   nvcc*)
10550     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10551   *)
10552     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10553   esac
10554
10555   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10556 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10557 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10558   $as_echo_n "(cached) " >&6
10559 else
10560   lt_cv_prog_compiler_rtti_exceptions=no
10561    ac_outfile=conftest.$ac_objext
10562    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10563    lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
10564    # Insert the option either (1) after the last *FLAGS variable, or
10565    # (2) before a word containing "conftest.", or (3) at the end.
10566    # Note that $ac_compile itself does not contain backslashes and begins
10567    # with a dollar sign (not a hyphen), so the echo should work correctly.
10568    # The option is referenced via a variable to avoid confusing sed.
10569    lt_compile=`echo "$ac_compile" | $SED \
10570    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10571    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10572    -e 's:$: $lt_compiler_flag:'`
10573    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10574    (eval "$lt_compile" 2>conftest.err)
10575    ac_status=$?
10576    cat conftest.err >&5
10577    echo "$as_me:$LINENO: \$? = $ac_status" >&5
10578    if (exit $ac_status) && test -s "$ac_outfile"; then
10579      # The compiler can only warn and ignore the option if not recognized
10580      # So say no if there are warnings other than the usual output.
10581      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10582      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10583      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10584        lt_cv_prog_compiler_rtti_exceptions=yes
10585      fi
10586    fi
10587    $RM conftest*
10588
10589 fi
10590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10591 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10592
10593 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10594     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10595 else
10596     :
10597 fi
10598
10599 fi
10600
10601
10602
10603
10604
10605
10606   lt_prog_compiler_wl=
10607 lt_prog_compiler_pic=
10608 lt_prog_compiler_static=
10609
10610
10611   if test yes = "$GCC"; then
10612     lt_prog_compiler_wl='-Wl,'
10613     lt_prog_compiler_static='-static'
10614
10615     case $host_os in
10616       aix*)
10617       # All AIX code is PIC.
10618       if test ia64 = "$host_cpu"; then
10619         # AIX 5 now supports IA64 processor
10620         lt_prog_compiler_static='-Bstatic'
10621       fi
10622       lt_prog_compiler_pic='-fPIC'
10623       ;;
10624
10625     amigaos*)
10626       case $host_cpu in
10627       powerpc)
10628             # see comment about AmigaOS4 .so support
10629             lt_prog_compiler_pic='-fPIC'
10630         ;;
10631       m68k)
10632             # FIXME: we need at least 68020 code to build shared libraries, but
10633             # adding the '-m68020' flag to GCC prevents building anything better,
10634             # like '-m68040'.
10635             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10636         ;;
10637       esac
10638       ;;
10639
10640     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10641       # PIC is the default for these OSes.
10642       ;;
10643
10644     mingw* | cygwin* | pw32* | os2* | cegcc*)
10645       # This hack is so that the source file can tell whether it is being
10646       # built for inclusion in a dll (and should export symbols for example).
10647       # Although the cygwin gcc ignores -fPIC, still need this for old-style
10648       # (--disable-auto-import) libraries
10649       lt_prog_compiler_pic='-DDLL_EXPORT'
10650       case $host_os in
10651       os2*)
10652         lt_prog_compiler_static='$wl-static'
10653         ;;
10654       esac
10655       ;;
10656
10657     darwin* | rhapsody*)
10658       # PIC is the default on this platform
10659       # Common symbols not allowed in MH_DYLIB files
10660       lt_prog_compiler_pic='-fno-common'
10661       ;;
10662
10663     haiku*)
10664       # PIC is the default for Haiku.
10665       # The "-static" flag exists, but is broken.
10666       lt_prog_compiler_static=
10667       ;;
10668
10669     hpux*)
10670       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10671       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10672       # sets the default TLS model and affects inlining.
10673       case $host_cpu in
10674       hppa*64*)
10675         # +Z the default
10676         ;;
10677       *)
10678         lt_prog_compiler_pic='-fPIC'
10679         ;;
10680       esac
10681       ;;
10682
10683     interix[3-9]*)
10684       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10685       # Instead, we relocate shared libraries at runtime.
10686       ;;
10687
10688     msdosdjgpp*)
10689       # Just because we use GCC doesn't mean we suddenly get shared libraries
10690       # on systems that don't support them.
10691       lt_prog_compiler_can_build_shared=no
10692       enable_shared=no
10693       ;;
10694
10695     *nto* | *qnx*)
10696       # QNX uses GNU C++, but need to define -shared option too, otherwise
10697       # it will coredump.
10698       lt_prog_compiler_pic='-fPIC -shared'
10699       ;;
10700
10701     sysv4*MP*)
10702       if test -d /usr/nec; then
10703         lt_prog_compiler_pic=-Kconform_pic
10704       fi
10705       ;;
10706
10707     *)
10708       lt_prog_compiler_pic='-fPIC'
10709       ;;
10710     esac
10711
10712     case $cc_basename in
10713     nvcc*) # Cuda Compiler Driver 2.2
10714       lt_prog_compiler_wl='-Xlinker '
10715       if test -n "$lt_prog_compiler_pic"; then
10716         lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
10717       fi
10718       ;;
10719     esac
10720   else
10721     # PORTME Check for flag to pass linker flags through the system compiler.
10722     case $host_os in
10723     aix*)
10724       lt_prog_compiler_wl='-Wl,'
10725       if test ia64 = "$host_cpu"; then
10726         # AIX 5 now supports IA64 processor
10727         lt_prog_compiler_static='-Bstatic'
10728       else
10729         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
10730       fi
10731       ;;
10732
10733     darwin* | rhapsody*)
10734       # PIC is the default on this platform
10735       # Common symbols not allowed in MH_DYLIB files
10736       lt_prog_compiler_pic='-fno-common'
10737       case $cc_basename in
10738       nagfor*)
10739         # NAG Fortran compiler
10740         lt_prog_compiler_wl='-Wl,-Wl,,'
10741         lt_prog_compiler_pic='-PIC'
10742         lt_prog_compiler_static='-Bstatic'
10743         ;;
10744       esac
10745       ;;
10746
10747     mingw* | cygwin* | pw32* | os2* | cegcc*)
10748       # This hack is so that the source file can tell whether it is being
10749       # built for inclusion in a dll (and should export symbols for example).
10750       lt_prog_compiler_pic='-DDLL_EXPORT'
10751       case $host_os in
10752       os2*)
10753         lt_prog_compiler_static='$wl-static'
10754         ;;
10755       esac
10756       ;;
10757
10758     hpux9* | hpux10* | hpux11*)
10759       lt_prog_compiler_wl='-Wl,'
10760       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10761       # not for PA HP-UX.
10762       case $host_cpu in
10763       hppa*64*|ia64*)
10764         # +Z the default
10765         ;;
10766       *)
10767         lt_prog_compiler_pic='+Z'
10768         ;;
10769       esac
10770       # Is there a better lt_prog_compiler_static that works with the bundled CC?
10771       lt_prog_compiler_static='$wl-a ${wl}archive'
10772       ;;
10773
10774     irix5* | irix6* | nonstopux*)
10775       lt_prog_compiler_wl='-Wl,'
10776       # PIC (with -KPIC) is the default.
10777       lt_prog_compiler_static='-non_shared'
10778       ;;
10779
10780     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
10781       case $cc_basename in
10782       # old Intel for x86_64, which still supported -KPIC.
10783       ecc*)
10784         lt_prog_compiler_wl='-Wl,'
10785         lt_prog_compiler_pic='-KPIC'
10786         lt_prog_compiler_static='-static'
10787         ;;
10788       # icc used to be incompatible with GCC.
10789       # ICC 10 doesn't accept -KPIC any more.
10790       icc* | ifort*)
10791         lt_prog_compiler_wl='-Wl,'
10792         lt_prog_compiler_pic='-fPIC'
10793         lt_prog_compiler_static='-static'
10794         ;;
10795       # Lahey Fortran 8.1.
10796       lf95*)
10797         lt_prog_compiler_wl='-Wl,'
10798         lt_prog_compiler_pic='--shared'
10799         lt_prog_compiler_static='--static'
10800         ;;
10801       nagfor*)
10802         # NAG Fortran compiler
10803         lt_prog_compiler_wl='-Wl,-Wl,,'
10804         lt_prog_compiler_pic='-PIC'
10805         lt_prog_compiler_static='-Bstatic'
10806         ;;
10807       tcc*)
10808         # Fabrice Bellard et al's Tiny C Compiler
10809         lt_prog_compiler_wl='-Wl,'
10810         lt_prog_compiler_pic='-fPIC'
10811         lt_prog_compiler_static='-static'
10812         ;;
10813       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
10814         # Portland Group compilers (*not* the Pentium gcc compiler,
10815         # which looks to be a dead project)
10816         lt_prog_compiler_wl='-Wl,'
10817         lt_prog_compiler_pic='-fpic'
10818         lt_prog_compiler_static='-Bstatic'
10819         ;;
10820       ccc*)
10821         lt_prog_compiler_wl='-Wl,'
10822         # All Alpha code is PIC.
10823         lt_prog_compiler_static='-non_shared'
10824         ;;
10825       xl* | bgxl* | bgf* | mpixl*)
10826         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
10827         lt_prog_compiler_wl='-Wl,'
10828         lt_prog_compiler_pic='-qpic'
10829         lt_prog_compiler_static='-qstaticlink'
10830         ;;
10831       *)
10832         case `$CC -V 2>&1 | sed 5q` in
10833         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
10834           # Sun Fortran 8.3 passes all unrecognized flags to the linker
10835           lt_prog_compiler_pic='-KPIC'
10836           lt_prog_compiler_static='-Bstatic'
10837           lt_prog_compiler_wl=''
10838           ;;
10839         *Sun\ F* | *Sun*Fortran*)
10840           lt_prog_compiler_pic='-KPIC'
10841           lt_prog_compiler_static='-Bstatic'
10842           lt_prog_compiler_wl='-Qoption ld '
10843           ;;
10844         *Sun\ C*)
10845           # Sun C 5.9
10846           lt_prog_compiler_pic='-KPIC'
10847           lt_prog_compiler_static='-Bstatic'
10848           lt_prog_compiler_wl='-Wl,'
10849           ;;
10850         *Intel*\ [CF]*Compiler*)
10851           lt_prog_compiler_wl='-Wl,'
10852           lt_prog_compiler_pic='-fPIC'
10853           lt_prog_compiler_static='-static'
10854           ;;
10855         *Portland\ Group*)
10856           lt_prog_compiler_wl='-Wl,'
10857           lt_prog_compiler_pic='-fpic'
10858           lt_prog_compiler_static='-Bstatic'
10859           ;;
10860         esac
10861         ;;
10862       esac
10863       ;;
10864
10865     newsos6)
10866       lt_prog_compiler_pic='-KPIC'
10867       lt_prog_compiler_static='-Bstatic'
10868       ;;
10869
10870     *nto* | *qnx*)
10871       # QNX uses GNU C++, but need to define -shared option too, otherwise
10872       # it will coredump.
10873       lt_prog_compiler_pic='-fPIC -shared'
10874       ;;
10875
10876     osf3* | osf4* | osf5*)
10877       lt_prog_compiler_wl='-Wl,'
10878       # All OSF/1 code is PIC.
10879       lt_prog_compiler_static='-non_shared'
10880       ;;
10881
10882     rdos*)
10883       lt_prog_compiler_static='-non_shared'
10884       ;;
10885
10886     solaris*)
10887       lt_prog_compiler_pic='-KPIC'
10888       lt_prog_compiler_static='-Bstatic'
10889       case $cc_basename in
10890       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
10891         lt_prog_compiler_wl='-Qoption ld ';;
10892       *)
10893         lt_prog_compiler_wl='-Wl,';;
10894       esac
10895       ;;
10896
10897     sunos4*)
10898       lt_prog_compiler_wl='-Qoption ld '
10899       lt_prog_compiler_pic='-PIC'
10900       lt_prog_compiler_static='-Bstatic'
10901       ;;
10902
10903     sysv4 | sysv4.2uw2* | sysv4.3*)
10904       lt_prog_compiler_wl='-Wl,'
10905       lt_prog_compiler_pic='-KPIC'
10906       lt_prog_compiler_static='-Bstatic'
10907       ;;
10908
10909     sysv4*MP*)
10910       if test -d /usr/nec; then
10911         lt_prog_compiler_pic='-Kconform_pic'
10912         lt_prog_compiler_static='-Bstatic'
10913       fi
10914       ;;
10915
10916     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
10917       lt_prog_compiler_wl='-Wl,'
10918       lt_prog_compiler_pic='-KPIC'
10919       lt_prog_compiler_static='-Bstatic'
10920       ;;
10921
10922     unicos*)
10923       lt_prog_compiler_wl='-Wl,'
10924       lt_prog_compiler_can_build_shared=no
10925       ;;
10926
10927     uts4*)
10928       lt_prog_compiler_pic='-pic'
10929       lt_prog_compiler_static='-Bstatic'
10930       ;;
10931
10932     *)
10933       lt_prog_compiler_can_build_shared=no
10934       ;;
10935     esac
10936   fi
10937
10938 case $host_os in
10939   # For platforms that do not support PIC, -DPIC is meaningless:
10940   *djgpp*)
10941     lt_prog_compiler_pic=
10942     ;;
10943   *)
10944     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
10945     ;;
10946 esac
10947
10948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
10949 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
10950 if ${lt_cv_prog_compiler_pic+:} false; then :
10951   $as_echo_n "(cached) " >&6
10952 else
10953   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
10954 fi
10955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
10956 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
10957 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
10958
10959 #
10960 # Check to make sure the PIC flag actually works.
10961 #
10962 if test -n "$lt_prog_compiler_pic"; then
10963   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
10964 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
10965 if ${lt_cv_prog_compiler_pic_works+:} false; then :
10966   $as_echo_n "(cached) " >&6
10967 else
10968   lt_cv_prog_compiler_pic_works=no
10969    ac_outfile=conftest.$ac_objext
10970    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10971    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
10972    # Insert the option either (1) after the last *FLAGS variable, or
10973    # (2) before a word containing "conftest.", or (3) at the end.
10974    # Note that $ac_compile itself does not contain backslashes and begins
10975    # with a dollar sign (not a hyphen), so the echo should work correctly.
10976    # The option is referenced via a variable to avoid confusing sed.
10977    lt_compile=`echo "$ac_compile" | $SED \
10978    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10979    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10980    -e 's:$: $lt_compiler_flag:'`
10981    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10982    (eval "$lt_compile" 2>conftest.err)
10983    ac_status=$?
10984    cat conftest.err >&5
10985    echo "$as_me:$LINENO: \$? = $ac_status" >&5
10986    if (exit $ac_status) && test -s "$ac_outfile"; then
10987      # The compiler can only warn and ignore the option if not recognized
10988      # So say no if there are warnings other than the usual output.
10989      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10990      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10991      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10992        lt_cv_prog_compiler_pic_works=yes
10993      fi
10994    fi
10995    $RM conftest*
10996
10997 fi
10998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
10999 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
11000
11001 if test yes = "$lt_cv_prog_compiler_pic_works"; then
11002     case $lt_prog_compiler_pic in
11003      "" | " "*) ;;
11004      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11005      esac
11006 else
11007     lt_prog_compiler_pic=
11008      lt_prog_compiler_can_build_shared=no
11009 fi
11010
11011 fi
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023 #
11024 # Check to make sure the static flag actually works.
11025 #
11026 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11028 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11029 if ${lt_cv_prog_compiler_static_works+:} false; then :
11030   $as_echo_n "(cached) " >&6
11031 else
11032   lt_cv_prog_compiler_static_works=no
11033    save_LDFLAGS=$LDFLAGS
11034    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11035    echo "$lt_simple_link_test_code" > conftest.$ac_ext
11036    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11037      # The linker can only warn and ignore the option if not recognized
11038      # So say no if there are warnings
11039      if test -s conftest.err; then
11040        # Append any errors to the config.log.
11041        cat conftest.err 1>&5
11042        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11043        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11044        if diff conftest.exp conftest.er2 >/dev/null; then
11045          lt_cv_prog_compiler_static_works=yes
11046        fi
11047      else
11048        lt_cv_prog_compiler_static_works=yes
11049      fi
11050    fi
11051    $RM -r conftest*
11052    LDFLAGS=$save_LDFLAGS
11053
11054 fi
11055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11056 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
11057
11058 if test yes = "$lt_cv_prog_compiler_static_works"; then
11059     :
11060 else
11061     lt_prog_compiler_static=
11062 fi
11063
11064
11065
11066
11067
11068
11069
11070   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11071 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11072 if ${lt_cv_prog_compiler_c_o+:} false; then :
11073   $as_echo_n "(cached) " >&6
11074 else
11075   lt_cv_prog_compiler_c_o=no
11076    $RM -r conftest 2>/dev/null
11077    mkdir conftest
11078    cd conftest
11079    mkdir out
11080    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11081
11082    lt_compiler_flag="-o out/conftest2.$ac_objext"
11083    # Insert the option either (1) after the last *FLAGS variable, or
11084    # (2) before a word containing "conftest.", or (3) at the end.
11085    # Note that $ac_compile itself does not contain backslashes and begins
11086    # with a dollar sign (not a hyphen), so the echo should work correctly.
11087    lt_compile=`echo "$ac_compile" | $SED \
11088    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11089    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11090    -e 's:$: $lt_compiler_flag:'`
11091    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11092    (eval "$lt_compile" 2>out/conftest.err)
11093    ac_status=$?
11094    cat out/conftest.err >&5
11095    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11096    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11097    then
11098      # The compiler can only warn and ignore the option if not recognized
11099      # So say no if there are warnings
11100      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11101      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11102      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11103        lt_cv_prog_compiler_c_o=yes
11104      fi
11105    fi
11106    chmod u+w . 2>&5
11107    $RM conftest*
11108    # SGI C++ compiler will create directory out/ii_files/ for
11109    # template instantiation
11110    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11111    $RM out/* && rmdir out
11112    cd ..
11113    $RM -r conftest
11114    $RM conftest*
11115
11116 fi
11117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11118 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11119
11120
11121
11122
11123
11124
11125   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11126 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11127 if ${lt_cv_prog_compiler_c_o+:} false; then :
11128   $as_echo_n "(cached) " >&6
11129 else
11130   lt_cv_prog_compiler_c_o=no
11131    $RM -r conftest 2>/dev/null
11132    mkdir conftest
11133    cd conftest
11134    mkdir out
11135    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11136
11137    lt_compiler_flag="-o out/conftest2.$ac_objext"
11138    # Insert the option either (1) after the last *FLAGS variable, or
11139    # (2) before a word containing "conftest.", or (3) at the end.
11140    # Note that $ac_compile itself does not contain backslashes and begins
11141    # with a dollar sign (not a hyphen), so the echo should work correctly.
11142    lt_compile=`echo "$ac_compile" | $SED \
11143    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11144    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11145    -e 's:$: $lt_compiler_flag:'`
11146    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11147    (eval "$lt_compile" 2>out/conftest.err)
11148    ac_status=$?
11149    cat out/conftest.err >&5
11150    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11151    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11152    then
11153      # The compiler can only warn and ignore the option if not recognized
11154      # So say no if there are warnings
11155      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11156      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11157      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11158        lt_cv_prog_compiler_c_o=yes
11159      fi
11160    fi
11161    chmod u+w . 2>&5
11162    $RM conftest*
11163    # SGI C++ compiler will create directory out/ii_files/ for
11164    # template instantiation
11165    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11166    $RM out/* && rmdir out
11167    cd ..
11168    $RM -r conftest
11169    $RM conftest*
11170
11171 fi
11172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11173 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11174
11175
11176
11177
11178 hard_links=nottested
11179 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11180   # do not overwrite the value of need_locks provided by the user
11181   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11182 $as_echo_n "checking if we can lock with hard links... " >&6; }
11183   hard_links=yes
11184   $RM conftest*
11185   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11186   touch conftest.a
11187   ln conftest.a conftest.b 2>&5 || hard_links=no
11188   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11190 $as_echo "$hard_links" >&6; }
11191   if test no = "$hard_links"; then
11192     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11193 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11194     need_locks=warn
11195   fi
11196 else
11197   need_locks=no
11198 fi
11199
11200
11201
11202
11203
11204
11205   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11206 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11207
11208   runpath_var=
11209   allow_undefined_flag=
11210   always_export_symbols=no
11211   archive_cmds=
11212   archive_expsym_cmds=
11213   compiler_needs_object=no
11214   enable_shared_with_static_runtimes=no
11215   export_dynamic_flag_spec=
11216   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11217   hardcode_automatic=no
11218   hardcode_direct=no
11219   hardcode_direct_absolute=no
11220   hardcode_libdir_flag_spec=
11221   hardcode_libdir_separator=
11222   hardcode_minus_L=no
11223   hardcode_shlibpath_var=unsupported
11224   inherit_rpath=no
11225   link_all_deplibs=unknown
11226   module_cmds=
11227   module_expsym_cmds=
11228   old_archive_from_new_cmds=
11229   old_archive_from_expsyms_cmds=
11230   thread_safe_flag_spec=
11231   whole_archive_flag_spec=
11232   # include_expsyms should be a list of space-separated symbols to be *always*
11233   # included in the symbol list
11234   include_expsyms=
11235   # exclude_expsyms can be an extended regexp of symbols to exclude
11236   # it will be wrapped by ' (' and ')$', so one must not match beginning or
11237   # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11238   # as well as any symbol that contains 'd'.
11239   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11240   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11241   # platforms (ab)use it in PIC code, but their linkers get confused if
11242   # the symbol is explicitly referenced.  Since portable code cannot
11243   # rely on this symbol name, it's probably fine to never include it in
11244   # preloaded symbol tables.
11245   # Exclude shared library initialization/finalization symbols.
11246   extract_expsyms_cmds=
11247
11248   case $host_os in
11249   cygwin* | mingw* | pw32* | cegcc*)
11250     # FIXME: the MSVC++ port hasn't been tested in a loooong time
11251     # When not using gcc, we currently assume that we are using
11252     # Microsoft Visual C++.
11253     if test yes != "$GCC"; then
11254       with_gnu_ld=no
11255     fi
11256     ;;
11257   interix*)
11258     # we just hope/assume this is gcc and not c89 (= MSVC++)
11259     with_gnu_ld=yes
11260     ;;
11261   openbsd* | bitrig*)
11262     with_gnu_ld=no
11263     ;;
11264   esac
11265
11266   ld_shlibs=yes
11267
11268   # On some targets, GNU ld is compatible enough with the native linker
11269   # that we're better off using the native interface for both.
11270   lt_use_gnu_ld_interface=no
11271   if test yes = "$with_gnu_ld"; then
11272     case $host_os in
11273       aix*)
11274         # The AIX port of GNU ld has always aspired to compatibility
11275         # with the native linker.  However, as the warning in the GNU ld
11276         # block says, versions before 2.19.5* couldn't really create working
11277         # shared libraries, regardless of the interface used.
11278         case `$LD -v 2>&1` in
11279           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11280           *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11281           *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11282           *)
11283             lt_use_gnu_ld_interface=yes
11284             ;;
11285         esac
11286         ;;
11287       *)
11288         lt_use_gnu_ld_interface=yes
11289         ;;
11290     esac
11291   fi
11292
11293   if test yes = "$lt_use_gnu_ld_interface"; then
11294     # If archive_cmds runs LD, not CC, wlarc should be empty
11295     wlarc='$wl'
11296
11297     # Set some defaults for GNU ld with shared library support. These
11298     # are reset later if shared libraries are not supported. Putting them
11299     # here allows them to be overridden if necessary.
11300     runpath_var=LD_RUN_PATH
11301     hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11302     export_dynamic_flag_spec='$wl--export-dynamic'
11303     # ancient GNU ld didn't support --whole-archive et. al.
11304     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11305       whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11306     else
11307       whole_archive_flag_spec=
11308     fi
11309     supports_anon_versioning=no
11310     case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11311       *GNU\ gold*) supports_anon_versioning=yes ;;
11312       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11313       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11314       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11315       *\ 2.11.*) ;; # other 2.11 versions
11316       *) supports_anon_versioning=yes ;;
11317     esac
11318
11319     # See if GNU ld supports shared libraries.
11320     case $host_os in
11321     aix[3-9]*)
11322       # On AIX/PPC, the GNU linker is very broken
11323       if test ia64 != "$host_cpu"; then
11324         ld_shlibs=no
11325         cat <<_LT_EOF 1>&2
11326
11327 *** Warning: the GNU linker, at least up to release 2.19, is reported
11328 *** to be unable to reliably create shared libraries on AIX.
11329 *** Therefore, libtool is disabling shared libraries support.  If you
11330 *** really care for shared libraries, you may want to install binutils
11331 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11332 *** You will then need to restart the configuration process.
11333
11334 _LT_EOF
11335       fi
11336       ;;
11337
11338     amigaos*)
11339       case $host_cpu in
11340       powerpc)
11341             # see comment about AmigaOS4 .so support
11342             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11343             archive_expsym_cmds=''
11344         ;;
11345       m68k)
11346             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)'
11347             hardcode_libdir_flag_spec='-L$libdir'
11348             hardcode_minus_L=yes
11349         ;;
11350       esac
11351       ;;
11352
11353     beos*)
11354       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11355         allow_undefined_flag=unsupported
11356         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11357         # support --undefined.  This deserves some investigation.  FIXME
11358         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11359       else
11360         ld_shlibs=no
11361       fi
11362       ;;
11363
11364     cygwin* | mingw* | pw32* | cegcc*)
11365       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11366       # as there is no search path for DLLs.
11367       hardcode_libdir_flag_spec='-L$libdir'
11368       export_dynamic_flag_spec='$wl--export-all-symbols'
11369       allow_undefined_flag=unsupported
11370       always_export_symbols=no
11371       enable_shared_with_static_runtimes=yes
11372       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'
11373       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11374
11375       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11376         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11377         # If the export-symbols file already is a .def file, use it as
11378         # is; otherwise, prepend EXPORTS...
11379         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11380           cp $export_symbols $output_objdir/$soname.def;
11381         else
11382           echo EXPORTS > $output_objdir/$soname.def;
11383           cat $export_symbols >> $output_objdir/$soname.def;
11384         fi~
11385         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11386       else
11387         ld_shlibs=no
11388       fi
11389       ;;
11390
11391     haiku*)
11392       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11393       link_all_deplibs=yes
11394       ;;
11395
11396     os2*)
11397       hardcode_libdir_flag_spec='-L$libdir'
11398       hardcode_minus_L=yes
11399       allow_undefined_flag=unsupported
11400       shrext_cmds=.dll
11401       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11402         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11403         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11404         $ECHO EXPORTS >> $output_objdir/$libname.def~
11405         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11406         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11407         emximp -o $lib $output_objdir/$libname.def'
11408       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11409         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11410         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11411         $ECHO EXPORTS >> $output_objdir/$libname.def~
11412         prefix_cmds="$SED"~
11413         if test EXPORTS = "`$SED 1q $export_symbols`"; then
11414           prefix_cmds="$prefix_cmds -e 1d";
11415         fi~
11416         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11417         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11418         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11419         emximp -o $lib $output_objdir/$libname.def'
11420       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11421       enable_shared_with_static_runtimes=yes
11422       ;;
11423
11424     interix[3-9]*)
11425       hardcode_direct=no
11426       hardcode_shlibpath_var=no
11427       hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11428       export_dynamic_flag_spec='$wl-E'
11429       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11430       # Instead, shared libraries are loaded at an image base (0x10000000 by
11431       # default) and relocated if they conflict, which is a slow very memory
11432       # consuming and fragmenting process.  To avoid this, we pick a random,
11433       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11434       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11435       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11436       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'
11437       ;;
11438
11439     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11440       tmp_diet=no
11441       if test linux-dietlibc = "$host_os"; then
11442         case $cc_basename in
11443           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
11444         esac
11445       fi
11446       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11447          && test no = "$tmp_diet"
11448       then
11449         tmp_addflag=' $pic_flag'
11450         tmp_sharedflag='-shared'
11451         case $cc_basename,$host_cpu in
11452         pgcc*)                          # Portland Group C compiler
11453           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'
11454           tmp_addflag=' $pic_flag'
11455           ;;
11456         pgf77* | pgf90* | pgf95* | pgfortran*)
11457                                         # Portland Group f77 and f90 compilers
11458           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'
11459           tmp_addflag=' $pic_flag -Mnomain' ;;
11460         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
11461           tmp_addflag=' -i_dynamic' ;;
11462         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
11463           tmp_addflag=' -i_dynamic -nofor_main' ;;
11464         ifc* | ifort*)                  # Intel Fortran compiler
11465           tmp_addflag=' -nofor_main' ;;
11466         lf95*)                          # Lahey Fortran 8.1
11467           whole_archive_flag_spec=
11468           tmp_sharedflag='--shared' ;;
11469         nagfor*)                        # NAGFOR 5.3
11470           tmp_sharedflag='-Wl,-shared' ;;
11471         xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11472           tmp_sharedflag='-qmkshrobj'
11473           tmp_addflag= ;;
11474         nvcc*)  # Cuda Compiler Driver 2.2
11475           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'
11476           compiler_needs_object=yes
11477           ;;
11478         esac
11479         case `$CC -V 2>&1 | sed 5q` in
11480         *Sun\ C*)                       # Sun C 5.9
11481           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'
11482           compiler_needs_object=yes
11483           tmp_sharedflag='-G' ;;
11484         *Sun\ F*)                       # Sun Fortran 8.3
11485           tmp_sharedflag='-G' ;;
11486         esac
11487         archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11488
11489         if test yes = "$supports_anon_versioning"; then
11490           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11491             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11492             echo "local: *; };" >> $output_objdir/$libname.ver~
11493             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11494         fi
11495
11496         case $cc_basename in
11497         tcc*)
11498           export_dynamic_flag_spec='-rdynamic'
11499           ;;
11500         xlf* | bgf* | bgxlf* | mpixlf*)
11501           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11502           whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11503           hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11504           archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11505           if test yes = "$supports_anon_versioning"; then
11506             archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11507               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11508               echo "local: *; };" >> $output_objdir/$libname.ver~
11509               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11510           fi
11511           ;;
11512         esac
11513       else
11514         ld_shlibs=no
11515       fi
11516       ;;
11517
11518     netbsd*)
11519       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11520         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11521         wlarc=
11522       else
11523         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11524         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11525       fi
11526       ;;
11527
11528     solaris*)
11529       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11530         ld_shlibs=no
11531         cat <<_LT_EOF 1>&2
11532
11533 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
11534 *** create shared libraries on Solaris systems.  Therefore, libtool
11535 *** is disabling shared libraries support.  We urge you to upgrade GNU
11536 *** binutils to release 2.9.1 or newer.  Another option is to modify
11537 *** your PATH or compiler configuration so that the native linker is
11538 *** used, and then restart.
11539
11540 _LT_EOF
11541       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11542         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11543         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11544       else
11545         ld_shlibs=no
11546       fi
11547       ;;
11548
11549     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11550       case `$LD -v 2>&1` in
11551         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11552         ld_shlibs=no
11553         cat <<_LT_EOF 1>&2
11554
11555 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11556 *** reliably create shared libraries on SCO systems.  Therefore, libtool
11557 *** is disabling shared libraries support.  We urge you to upgrade GNU
11558 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11559 *** your PATH or compiler configuration so that the native linker is
11560 *** used, and then restart.
11561
11562 _LT_EOF
11563         ;;
11564         *)
11565           # For security reasons, it is highly recommended that you always
11566           # use absolute paths for naming shared libraries, and exclude the
11567           # DT_RUNPATH tag from executables and libraries.  But doing so
11568           # requires that you compile everything twice, which is a pain.
11569           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11570             hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11571             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11572             archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11573           else
11574             ld_shlibs=no
11575           fi
11576         ;;
11577       esac
11578       ;;
11579
11580     sunos4*)
11581       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11582       wlarc=
11583       hardcode_direct=yes
11584       hardcode_shlibpath_var=no
11585       ;;
11586
11587     *)
11588       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11589         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11590         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11591       else
11592         ld_shlibs=no
11593       fi
11594       ;;
11595     esac
11596
11597     if test no = "$ld_shlibs"; then
11598       runpath_var=
11599       hardcode_libdir_flag_spec=
11600       export_dynamic_flag_spec=
11601       whole_archive_flag_spec=
11602     fi
11603   else
11604     # PORTME fill in a description of your system's linker (not GNU ld)
11605     case $host_os in
11606     aix3*)
11607       allow_undefined_flag=unsupported
11608       always_export_symbols=yes
11609       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'
11610       # Note: this linker hardcodes the directories in LIBPATH if there
11611       # are no directories specified by -L.
11612       hardcode_minus_L=yes
11613       if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11614         # Neither direct hardcoding nor static linking is supported with a
11615         # broken collect2.
11616         hardcode_direct=unsupported
11617       fi
11618       ;;
11619
11620     aix[4-9]*)
11621       if test ia64 = "$host_cpu"; then
11622         # On IA64, the linker does run time linking by default, so we don't
11623         # have to do anything special.
11624         aix_use_runtimelinking=no
11625         exp_sym_flag='-Bexport'
11626         no_entry_flag=
11627       else
11628         # If we're using GNU nm, then we don't want the "-C" option.
11629         # -C means demangle to GNU nm, but means don't demangle to AIX nm.
11630         # Without the "-l" option, or with the "-B" option, AIX nm treats
11631         # weak defined symbols like other global defined symbols, whereas
11632         # GNU nm marks them as "W".
11633         # While the 'weak' keyword is ignored in the Export File, we need
11634         # it in the Import File for the 'aix-soname' feature, so we have
11635         # to replace the "-B" option with "-P" for AIX nm.
11636         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11637           export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
11638         else
11639           export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
11640         fi
11641         aix_use_runtimelinking=no
11642
11643         # Test if we are trying to use run time linking or normal
11644         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
11645         # have runtime linking enabled, and use it for executables.
11646         # For shared libraries, we enable/disable runtime linking
11647         # depending on the kind of the shared library created -
11648         # when "with_aix_soname,aix_use_runtimelinking" is:
11649         # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
11650         # "aix,yes"  lib.so          shared, rtl:yes, for executables
11651         #            lib.a           static archive
11652         # "both,no"  lib.so.V(shr.o) shared, rtl:yes
11653         #            lib.a(lib.so.V) shared, rtl:no,  for executables
11654         # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11655         #            lib.a(lib.so.V) shared, rtl:no
11656         # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
11657         #            lib.a           static archive
11658         case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11659           for ld_flag in $LDFLAGS; do
11660           if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11661             aix_use_runtimelinking=yes
11662             break
11663           fi
11664           done
11665           if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11666             # With aix-soname=svr4, we create the lib.so.V shared archives only,
11667             # so we don't have lib.a shared libs to link our executables.
11668             # We have to force runtime linking in this case.
11669             aix_use_runtimelinking=yes
11670             LDFLAGS="$LDFLAGS -Wl,-brtl"
11671           fi
11672           ;;
11673         esac
11674
11675         exp_sym_flag='-bexport'
11676         no_entry_flag='-bnoentry'
11677       fi
11678
11679       # When large executables or shared objects are built, AIX ld can
11680       # have problems creating the table of contents.  If linking a library
11681       # or program results in "error TOC overflow" add -mminimal-toc to
11682       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11683       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11684
11685       archive_cmds=''
11686       hardcode_direct=yes
11687       hardcode_direct_absolute=yes
11688       hardcode_libdir_separator=':'
11689       link_all_deplibs=yes
11690       file_list_spec='$wl-f,'
11691       case $with_aix_soname,$aix_use_runtimelinking in
11692       aix,*) ;; # traditional, no import file
11693       svr4,* | *,yes) # use import file
11694         # The Import File defines what to hardcode.
11695         hardcode_direct=no
11696         hardcode_direct_absolute=no
11697         ;;
11698       esac
11699
11700       if test yes = "$GCC"; then
11701         case $host_os in aix4.[012]|aix4.[012].*)
11702         # We only want to do this on AIX 4.2 and lower, the check
11703         # below for broken collect2 doesn't work under 4.3+
11704           collect2name=`$CC -print-prog-name=collect2`
11705           if test -f "$collect2name" &&
11706            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
11707           then
11708           # We have reworked collect2
11709           :
11710           else
11711           # We have old collect2
11712           hardcode_direct=unsupported
11713           # It fails to find uninstalled libraries when the uninstalled
11714           # path is not listed in the libpath.  Setting hardcode_minus_L
11715           # to unsupported forces relinking
11716           hardcode_minus_L=yes
11717           hardcode_libdir_flag_spec='-L$libdir'
11718           hardcode_libdir_separator=
11719           fi
11720           ;;
11721         esac
11722         shared_flag='-shared'
11723         if test yes = "$aix_use_runtimelinking"; then
11724           shared_flag="$shared_flag "'$wl-G'
11725         fi
11726         # Need to ensure runtime linking is disabled for the traditional
11727         # shared library, or the linker may eventually find shared libraries
11728         # /with/ Import File - we do not want to mix them.
11729         shared_flag_aix='-shared'
11730         shared_flag_svr4='-shared $wl-G'
11731       else
11732         # not using gcc
11733         if test ia64 = "$host_cpu"; then
11734         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11735         # chokes on -Wl,-G. The following line is correct:
11736           shared_flag='-G'
11737         else
11738           if test yes = "$aix_use_runtimelinking"; then
11739             shared_flag='$wl-G'
11740           else
11741             shared_flag='$wl-bM:SRE'
11742           fi
11743           shared_flag_aix='$wl-bM:SRE'
11744           shared_flag_svr4='$wl-G'
11745         fi
11746       fi
11747
11748       export_dynamic_flag_spec='$wl-bexpall'
11749       # It seems that -bexpall does not export symbols beginning with
11750       # underscore (_), so it is better to generate a list of symbols to export.
11751       always_export_symbols=yes
11752       if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
11753         # Warning - without using the other runtime loading flags (-brtl),
11754         # -berok will link without error, but may produce a broken library.
11755         allow_undefined_flag='-berok'
11756         # Determine the default libpath from the value encoded in an
11757         # empty executable.
11758         if test set = "${lt_cv_aix_libpath+set}"; then
11759   aix_libpath=$lt_cv_aix_libpath
11760 else
11761   if ${lt_cv_aix_libpath_+:} false; then :
11762   $as_echo_n "(cached) " >&6
11763 else
11764   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11765 /* end confdefs.h.  */
11766
11767 int
11768 main ()
11769 {
11770
11771   ;
11772   return 0;
11773 }
11774 _ACEOF
11775 if ac_fn_c_try_link "$LINENO"; then :
11776
11777   lt_aix_libpath_sed='
11778       /Import File Strings/,/^$/ {
11779           /^0/ {
11780               s/^0  *\([^ ]*\) *$/\1/
11781               p
11782           }
11783       }'
11784   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11785   # Check for a 64-bit object if we didn't find anything.
11786   if test -z "$lt_cv_aix_libpath_"; then
11787     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11788   fi
11789 fi
11790 rm -f core conftest.err conftest.$ac_objext \
11791     conftest$ac_exeext conftest.$ac_ext
11792   if test -z "$lt_cv_aix_libpath_"; then
11793     lt_cv_aix_libpath_=/usr/lib:/lib
11794   fi
11795
11796 fi
11797
11798   aix_libpath=$lt_cv_aix_libpath_
11799 fi
11800
11801         hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
11802         archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
11803       else
11804         if test ia64 = "$host_cpu"; then
11805           hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
11806           allow_undefined_flag="-z nodefs"
11807           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"
11808         else
11809          # Determine the default libpath from the value encoded in an
11810          # empty executable.
11811          if test set = "${lt_cv_aix_libpath+set}"; then
11812   aix_libpath=$lt_cv_aix_libpath
11813 else
11814   if ${lt_cv_aix_libpath_+:} false; then :
11815   $as_echo_n "(cached) " >&6
11816 else
11817   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11818 /* end confdefs.h.  */
11819
11820 int
11821 main ()
11822 {
11823
11824   ;
11825   return 0;
11826 }
11827 _ACEOF
11828 if ac_fn_c_try_link "$LINENO"; then :
11829
11830   lt_aix_libpath_sed='
11831       /Import File Strings/,/^$/ {
11832           /^0/ {
11833               s/^0  *\([^ ]*\) *$/\1/
11834               p
11835           }
11836       }'
11837   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11838   # Check for a 64-bit object if we didn't find anything.
11839   if test -z "$lt_cv_aix_libpath_"; then
11840     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11841   fi
11842 fi
11843 rm -f core conftest.err conftest.$ac_objext \
11844     conftest$ac_exeext conftest.$ac_ext
11845   if test -z "$lt_cv_aix_libpath_"; then
11846     lt_cv_aix_libpath_=/usr/lib:/lib
11847   fi
11848
11849 fi
11850
11851   aix_libpath=$lt_cv_aix_libpath_
11852 fi
11853
11854          hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
11855           # Warning - without using the other run time loading flags,
11856           # -berok will link without error, but may produce a broken library.
11857           no_undefined_flag=' $wl-bernotok'
11858           allow_undefined_flag=' $wl-berok'
11859           if test yes = "$with_gnu_ld"; then
11860             # We only use this code for GNU lds that support --whole-archive.
11861             whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
11862           else
11863             # Exported symbols can be pulled into shared objects from archives
11864             whole_archive_flag_spec='$convenience'
11865           fi
11866           archive_cmds_need_lc=yes
11867           archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
11868           # -brtl affects multiple linker settings, -berok does not and is overridden later
11869           compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
11870           if test svr4 != "$with_aix_soname"; then
11871             # This is similar to how AIX traditionally builds its shared libraries.
11872             archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
11873           fi
11874           if test aix != "$with_aix_soname"; then
11875             archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
11876           else
11877             # used by -dlpreopen to get the symbols
11878             archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
11879           fi
11880           archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
11881         fi
11882       fi
11883       ;;
11884
11885     amigaos*)
11886       case $host_cpu in
11887       powerpc)
11888             # see comment about AmigaOS4 .so support
11889             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11890             archive_expsym_cmds=''
11891         ;;
11892       m68k)
11893             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)'
11894             hardcode_libdir_flag_spec='-L$libdir'
11895             hardcode_minus_L=yes
11896         ;;
11897       esac
11898       ;;
11899
11900     bsdi[45]*)
11901       export_dynamic_flag_spec=-rdynamic
11902       ;;
11903
11904     cygwin* | mingw* | pw32* | cegcc*)
11905       # When not using gcc, we currently assume that we are using
11906       # Microsoft Visual C++.
11907       # hardcode_libdir_flag_spec is actually meaningless, as there is
11908       # no search path for DLLs.
11909       case $cc_basename in
11910       cl*)
11911         # Native MSVC
11912         hardcode_libdir_flag_spec=' '
11913         allow_undefined_flag=unsupported
11914         always_export_symbols=yes
11915         file_list_spec='@'
11916         # Tell ltmain to make .lib files, not .a files.
11917         libext=lib
11918         # Tell ltmain to make .dll files, not .so files.
11919         shrext_cmds=.dll
11920         # FIXME: Setting linknames here is a bad hack.
11921         archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
11922         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11923             cp "$export_symbols" "$output_objdir/$soname.def";
11924             echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
11925           else
11926             $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
11927           fi~
11928           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
11929           linknames='
11930         # The linker will not automatically build a static lib if we build a DLL.
11931         # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
11932         enable_shared_with_static_runtimes=yes
11933         exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
11934         export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
11935         # Don't use ranlib
11936         old_postinstall_cmds='chmod 644 $oldlib'
11937         postlink_cmds='lt_outputfile="@OUTPUT@"~
11938           lt_tool_outputfile="@TOOL_OUTPUT@"~
11939           case $lt_outputfile in
11940             *.exe|*.EXE) ;;
11941             *)
11942               lt_outputfile=$lt_outputfile.exe
11943               lt_tool_outputfile=$lt_tool_outputfile.exe
11944               ;;
11945           esac~
11946           if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
11947             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
11948             $RM "$lt_outputfile.manifest";
11949           fi'
11950         ;;
11951       *)
11952         # Assume MSVC wrapper
11953         hardcode_libdir_flag_spec=' '
11954         allow_undefined_flag=unsupported
11955         # Tell ltmain to make .lib files, not .a files.
11956         libext=lib
11957         # Tell ltmain to make .dll files, not .so files.
11958         shrext_cmds=.dll
11959         # FIXME: Setting linknames here is a bad hack.
11960         archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
11961         # The linker will automatically build a .lib file if we build a DLL.
11962         old_archive_from_new_cmds='true'
11963         # FIXME: Should let the user specify the lib program.
11964         old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
11965         enable_shared_with_static_runtimes=yes
11966         ;;
11967       esac
11968       ;;
11969
11970     darwin* | rhapsody*)
11971
11972
11973   archive_cmds_need_lc=no
11974   hardcode_direct=no
11975   hardcode_automatic=yes
11976   hardcode_shlibpath_var=unsupported
11977   if test yes = "$lt_cv_ld_force_load"; then
11978     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\"`'
11979
11980   else
11981     whole_archive_flag_spec=''
11982   fi
11983   link_all_deplibs=yes
11984   allow_undefined_flag=$_lt_dar_allow_undefined
11985   case $cc_basename in
11986      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
11987      *) _lt_dar_can_shared=$GCC ;;
11988   esac
11989   if test yes = "$_lt_dar_can_shared"; then
11990     output_verbose_link_cmd=func_echo_all
11991     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
11992     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
11993     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"
11994     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"
11995
11996   else
11997   ld_shlibs=no
11998   fi
11999
12000       ;;
12001
12002     dgux*)
12003       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12004       hardcode_libdir_flag_spec='-L$libdir'
12005       hardcode_shlibpath_var=no
12006       ;;
12007
12008     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12009     # support.  Future versions do this automatically, but an explicit c++rt0.o
12010     # does not break anything, and helps significantly (at the cost of a little
12011     # extra space).
12012     freebsd2.2*)
12013       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12014       hardcode_libdir_flag_spec='-R$libdir'
12015       hardcode_direct=yes
12016       hardcode_shlibpath_var=no
12017       ;;
12018
12019     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12020     freebsd2.*)
12021       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12022       hardcode_direct=yes
12023       hardcode_minus_L=yes
12024       hardcode_shlibpath_var=no
12025       ;;
12026
12027     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12028     freebsd* | dragonfly*)
12029       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12030       hardcode_libdir_flag_spec='-R$libdir'
12031       hardcode_direct=yes
12032       hardcode_shlibpath_var=no
12033       ;;
12034
12035     hpux9*)
12036       if test yes = "$GCC"; then
12037         archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
12038       else
12039         archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
12040       fi
12041       hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12042       hardcode_libdir_separator=:
12043       hardcode_direct=yes
12044
12045       # hardcode_minus_L: Not really in the search PATH,
12046       # but as the default location of the library.
12047       hardcode_minus_L=yes
12048       export_dynamic_flag_spec='$wl-E'
12049       ;;
12050
12051     hpux10*)
12052       if test yes,no = "$GCC,$with_gnu_ld"; then
12053         archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12054       else
12055         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12056       fi
12057       if test no = "$with_gnu_ld"; then
12058         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12059         hardcode_libdir_separator=:
12060         hardcode_direct=yes
12061         hardcode_direct_absolute=yes
12062         export_dynamic_flag_spec='$wl-E'
12063         # hardcode_minus_L: Not really in the search PATH,
12064         # but as the default location of the library.
12065         hardcode_minus_L=yes
12066       fi
12067       ;;
12068
12069     hpux11*)
12070       if test yes,no = "$GCC,$with_gnu_ld"; then
12071         case $host_cpu in
12072         hppa*64*)
12073           archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12074           ;;
12075         ia64*)
12076           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12077           ;;
12078         *)
12079           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12080           ;;
12081         esac
12082       else
12083         case $host_cpu in
12084         hppa*64*)
12085           archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12086           ;;
12087         ia64*)
12088           archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12089           ;;
12090         *)
12091
12092           # Older versions of the 11.00 compiler do not understand -b yet
12093           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12094           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12095 $as_echo_n "checking if $CC understands -b... " >&6; }
12096 if ${lt_cv_prog_compiler__b+:} false; then :
12097   $as_echo_n "(cached) " >&6
12098 else
12099   lt_cv_prog_compiler__b=no
12100    save_LDFLAGS=$LDFLAGS
12101    LDFLAGS="$LDFLAGS -b"
12102    echo "$lt_simple_link_test_code" > conftest.$ac_ext
12103    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12104      # The linker can only warn and ignore the option if not recognized
12105      # So say no if there are warnings
12106      if test -s conftest.err; then
12107        # Append any errors to the config.log.
12108        cat conftest.err 1>&5
12109        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12110        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12111        if diff conftest.exp conftest.er2 >/dev/null; then
12112          lt_cv_prog_compiler__b=yes
12113        fi
12114      else
12115        lt_cv_prog_compiler__b=yes
12116      fi
12117    fi
12118    $RM -r conftest*
12119    LDFLAGS=$save_LDFLAGS
12120
12121 fi
12122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12123 $as_echo "$lt_cv_prog_compiler__b" >&6; }
12124
12125 if test yes = "$lt_cv_prog_compiler__b"; then
12126     archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12127 else
12128     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12129 fi
12130
12131           ;;
12132         esac
12133       fi
12134       if test no = "$with_gnu_ld"; then
12135         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12136         hardcode_libdir_separator=:
12137
12138         case $host_cpu in
12139         hppa*64*|ia64*)
12140           hardcode_direct=no
12141           hardcode_shlibpath_var=no
12142           ;;
12143         *)
12144           hardcode_direct=yes
12145           hardcode_direct_absolute=yes
12146           export_dynamic_flag_spec='$wl-E'
12147
12148           # hardcode_minus_L: Not really in the search PATH,
12149           # but as the default location of the library.
12150           hardcode_minus_L=yes
12151           ;;
12152         esac
12153       fi
12154       ;;
12155
12156     irix5* | irix6* | nonstopux*)
12157       if test yes = "$GCC"; then
12158         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'
12159         # Try to use the -exported_symbol ld option, if it does not
12160         # work, assume that -exports_file does not work either and
12161         # implicitly export all symbols.
12162         # This should be the same for all languages, so no per-tag cache variable.
12163         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12164 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12165 if ${lt_cv_irix_exported_symbol+:} false; then :
12166   $as_echo_n "(cached) " >&6
12167 else
12168   save_LDFLAGS=$LDFLAGS
12169            LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12170            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12171 /* end confdefs.h.  */
12172 int foo (void) { return 0; }
12173 _ACEOF
12174 if ac_fn_c_try_link "$LINENO"; then :
12175   lt_cv_irix_exported_symbol=yes
12176 else
12177   lt_cv_irix_exported_symbol=no
12178 fi
12179 rm -f core conftest.err conftest.$ac_objext \
12180     conftest$ac_exeext conftest.$ac_ext
12181            LDFLAGS=$save_LDFLAGS
12182 fi
12183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12184 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
12185         if test yes = "$lt_cv_irix_exported_symbol"; then
12186           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'
12187         fi
12188       else
12189         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'
12190         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'
12191       fi
12192       archive_cmds_need_lc='no'
12193       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12194       hardcode_libdir_separator=:
12195       inherit_rpath=yes
12196       link_all_deplibs=yes
12197       ;;
12198
12199     linux*)
12200       case $cc_basename in
12201       tcc*)
12202         # Fabrice Bellard et al's Tiny C Compiler
12203         ld_shlibs=yes
12204         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12205         ;;
12206       esac
12207       ;;
12208
12209     netbsd*)
12210       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12211         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12212       else
12213         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12214       fi
12215       hardcode_libdir_flag_spec='-R$libdir'
12216       hardcode_direct=yes
12217       hardcode_shlibpath_var=no
12218       ;;
12219
12220     newsos6)
12221       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12222       hardcode_direct=yes
12223       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12224       hardcode_libdir_separator=:
12225       hardcode_shlibpath_var=no
12226       ;;
12227
12228     *nto* | *qnx*)
12229       ;;
12230
12231     openbsd* | bitrig*)
12232       if test -f /usr/libexec/ld.so; then
12233         hardcode_direct=yes
12234         hardcode_shlibpath_var=no
12235         hardcode_direct_absolute=yes
12236         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12237           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12238           archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12239           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12240           export_dynamic_flag_spec='$wl-E'
12241         else
12242           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12243           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12244         fi
12245       else
12246         ld_shlibs=no
12247       fi
12248       ;;
12249
12250     os2*)
12251       hardcode_libdir_flag_spec='-L$libdir'
12252       hardcode_minus_L=yes
12253       allow_undefined_flag=unsupported
12254       shrext_cmds=.dll
12255       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12256         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12257         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12258         $ECHO EXPORTS >> $output_objdir/$libname.def~
12259         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12260         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12261         emximp -o $lib $output_objdir/$libname.def'
12262       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12263         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12264         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12265         $ECHO EXPORTS >> $output_objdir/$libname.def~
12266         prefix_cmds="$SED"~
12267         if test EXPORTS = "`$SED 1q $export_symbols`"; then
12268           prefix_cmds="$prefix_cmds -e 1d";
12269         fi~
12270         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12271         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12272         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12273         emximp -o $lib $output_objdir/$libname.def'
12274       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12275       enable_shared_with_static_runtimes=yes
12276       ;;
12277
12278     osf3*)
12279       if test yes = "$GCC"; then
12280         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12281         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'
12282       else
12283         allow_undefined_flag=' -expect_unresolved \*'
12284         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'
12285       fi
12286       archive_cmds_need_lc='no'
12287       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12288       hardcode_libdir_separator=:
12289       ;;
12290
12291     osf4* | osf5*)      # as osf3* with the addition of -msym flag
12292       if test yes = "$GCC"; then
12293         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12294         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'
12295         hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12296       else
12297         allow_undefined_flag=' -expect_unresolved \*'
12298         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'
12299         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~
12300           $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'
12301
12302         # Both c and cxx compiler support -rpath directly
12303         hardcode_libdir_flag_spec='-rpath $libdir'
12304       fi
12305       archive_cmds_need_lc='no'
12306       hardcode_libdir_separator=:
12307       ;;
12308
12309     solaris*)
12310       no_undefined_flag=' -z defs'
12311       if test yes = "$GCC"; then
12312         wlarc='$wl'
12313         archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12314         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12315           $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'
12316       else
12317         case `$CC -V 2>&1` in
12318         *"Compilers 5.0"*)
12319           wlarc=''
12320           archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12321           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12322             $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12323           ;;
12324         *)
12325           wlarc='$wl'
12326           archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12327           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12328             $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12329           ;;
12330         esac
12331       fi
12332       hardcode_libdir_flag_spec='-R$libdir'
12333       hardcode_shlibpath_var=no
12334       case $host_os in
12335       solaris2.[0-5] | solaris2.[0-5].*) ;;
12336       *)
12337         # The compiler driver will combine and reorder linker options,
12338         # but understands '-z linker_flag'.  GCC discards it without '$wl',
12339         # but is careful enough not to reorder.
12340         # Supported since Solaris 2.6 (maybe 2.5.1?)
12341         if test yes = "$GCC"; then
12342           whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12343         else
12344           whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12345         fi
12346         ;;
12347       esac
12348       link_all_deplibs=yes
12349       ;;
12350
12351     sunos4*)
12352       if test sequent = "$host_vendor"; then
12353         # Use $CC to link under sequent, because it throws in some extra .o
12354         # files that make .init and .fini sections work.
12355         archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12356       else
12357         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12358       fi
12359       hardcode_libdir_flag_spec='-L$libdir'
12360       hardcode_direct=yes
12361       hardcode_minus_L=yes
12362       hardcode_shlibpath_var=no
12363       ;;
12364
12365     sysv4)
12366       case $host_vendor in
12367         sni)
12368           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12369           hardcode_direct=yes # is this really true???
12370         ;;
12371         siemens)
12372           ## LD is ld it makes a PLAMLIB
12373           ## CC just makes a GrossModule.
12374           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12375           reload_cmds='$CC -r -o $output$reload_objs'
12376           hardcode_direct=no
12377         ;;
12378         motorola)
12379           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12380           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12381         ;;
12382       esac
12383       runpath_var='LD_RUN_PATH'
12384       hardcode_shlibpath_var=no
12385       ;;
12386
12387     sysv4.3*)
12388       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12389       hardcode_shlibpath_var=no
12390       export_dynamic_flag_spec='-Bexport'
12391       ;;
12392
12393     sysv4*MP*)
12394       if test -d /usr/nec; then
12395         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12396         hardcode_shlibpath_var=no
12397         runpath_var=LD_RUN_PATH
12398         hardcode_runpath_var=yes
12399         ld_shlibs=yes
12400       fi
12401       ;;
12402
12403     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12404       no_undefined_flag='$wl-z,text'
12405       archive_cmds_need_lc=no
12406       hardcode_shlibpath_var=no
12407       runpath_var='LD_RUN_PATH'
12408
12409       if test yes = "$GCC"; then
12410         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12411         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12412       else
12413         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12414         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12415       fi
12416       ;;
12417
12418     sysv5* | sco3.2v5* | sco5v6*)
12419       # Note: We CANNOT use -z defs as we might desire, because we do not
12420       # link with -lc, and that would cause any symbols used from libc to
12421       # always be unresolved, which means just about no library would
12422       # ever link correctly.  If we're not using GNU ld we use -z text
12423       # though, which does catch some bad symbols but isn't as heavy-handed
12424       # as -z defs.
12425       no_undefined_flag='$wl-z,text'
12426       allow_undefined_flag='$wl-z,nodefs'
12427       archive_cmds_need_lc=no
12428       hardcode_shlibpath_var=no
12429       hardcode_libdir_flag_spec='$wl-R,$libdir'
12430       hardcode_libdir_separator=':'
12431       link_all_deplibs=yes
12432       export_dynamic_flag_spec='$wl-Bexport'
12433       runpath_var='LD_RUN_PATH'
12434
12435       if test yes = "$GCC"; then
12436         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12437         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12438       else
12439         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12440         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12441       fi
12442       ;;
12443
12444     uts4*)
12445       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12446       hardcode_libdir_flag_spec='-L$libdir'
12447       hardcode_shlibpath_var=no
12448       ;;
12449
12450     *)
12451       ld_shlibs=no
12452       ;;
12453     esac
12454
12455     if test sni = "$host_vendor"; then
12456       case $host in
12457       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12458         export_dynamic_flag_spec='$wl-Blargedynsym'
12459         ;;
12460       esac
12461     fi
12462   fi
12463
12464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12465 $as_echo "$ld_shlibs" >&6; }
12466 test no = "$ld_shlibs" && can_build_shared=no
12467
12468 with_gnu_ld=$with_gnu_ld
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484 #
12485 # Do we need to explicitly link libc?
12486 #
12487 case "x$archive_cmds_need_lc" in
12488 x|xyes)
12489   # Assume -lc should be added
12490   archive_cmds_need_lc=yes
12491
12492   if test yes,yes = "$GCC,$enable_shared"; then
12493     case $archive_cmds in
12494     *'~'*)
12495       # FIXME: we may have to deal with multi-command sequences.
12496       ;;
12497     '$CC '*)
12498       # Test whether the compiler implicitly links with -lc since on some
12499       # systems, -lgcc has to come before -lc. If gcc already passes -lc
12500       # to ld, don't add -lc before -lgcc.
12501       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12502 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12503 if ${lt_cv_archive_cmds_need_lc+:} false; then :
12504   $as_echo_n "(cached) " >&6
12505 else
12506   $RM conftest*
12507         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12508
12509         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12510   (eval $ac_compile) 2>&5
12511   ac_status=$?
12512   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12513   test $ac_status = 0; } 2>conftest.err; then
12514           soname=conftest
12515           lib=conftest
12516           libobjs=conftest.$ac_objext
12517           deplibs=
12518           wl=$lt_prog_compiler_wl
12519           pic_flag=$lt_prog_compiler_pic
12520           compiler_flags=-v
12521           linker_flags=-v
12522           verstring=
12523           output_objdir=.
12524           libname=conftest
12525           lt_save_allow_undefined_flag=$allow_undefined_flag
12526           allow_undefined_flag=
12527           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12528   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12529   ac_status=$?
12530   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12531   test $ac_status = 0; }
12532           then
12533             lt_cv_archive_cmds_need_lc=no
12534           else
12535             lt_cv_archive_cmds_need_lc=yes
12536           fi
12537           allow_undefined_flag=$lt_save_allow_undefined_flag
12538         else
12539           cat conftest.err 1>&5
12540         fi
12541         $RM conftest*
12542
12543 fi
12544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12545 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12546       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12547       ;;
12548     esac
12549   fi
12550   ;;
12551 esac
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12705 $as_echo_n "checking dynamic linker characteristics... " >&6; }
12706
12707 if test yes = "$GCC"; then
12708   case $host_os in
12709     darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
12710     *) lt_awk_arg='/^libraries:/' ;;
12711   esac
12712   case $host_os in
12713     mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
12714     *) lt_sed_strip_eq='s|=/|/|g' ;;
12715   esac
12716   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
12717   case $lt_search_path_spec in
12718   *\;*)
12719     # if the path contains ";" then we assume it to be the separator
12720     # otherwise default to the standard path separator (i.e. ":") - it is
12721     # assumed that no part of a normal pathname contains ";" but that should
12722     # okay in the real world where ";" in dirpaths is itself problematic.
12723     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
12724     ;;
12725   *)
12726     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
12727     ;;
12728   esac
12729   # Ok, now we have the path, separated by spaces, we can step through it
12730   # and add multilib dir if necessary...
12731   lt_tmp_lt_search_path_spec=
12732   lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
12733   # ...but if some path component already ends with the multilib dir we assume
12734   # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
12735   case "$lt_multi_os_dir; $lt_search_path_spec " in
12736   "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
12737     lt_multi_os_dir=
12738     ;;
12739   esac
12740   for lt_sys_path in $lt_search_path_spec; do
12741     if test -d "$lt_sys_path$lt_multi_os_dir"; then
12742       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
12743     elif test -n "$lt_multi_os_dir"; then
12744       test -d "$lt_sys_path" && \
12745         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
12746     fi
12747   done
12748   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
12749 BEGIN {RS = " "; FS = "/|\n";} {
12750   lt_foo = "";
12751   lt_count = 0;
12752   for (lt_i = NF; lt_i > 0; lt_i--) {
12753     if ($lt_i != "" && $lt_i != ".") {
12754       if ($lt_i == "..") {
12755         lt_count++;
12756       } else {
12757         if (lt_count == 0) {
12758           lt_foo = "/" $lt_i lt_foo;
12759         } else {
12760           lt_count--;
12761         }
12762       }
12763     }
12764   }
12765   if (lt_foo != "") { lt_freq[lt_foo]++; }
12766   if (lt_freq[lt_foo] == 1) { print lt_foo; }
12767 }'`
12768   # AWK program above erroneously prepends '/' to C:/dos/paths
12769   # for these hosts.
12770   case $host_os in
12771     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
12772       $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
12773   esac
12774   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
12775 else
12776   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12777 fi
12778 library_names_spec=
12779 libname_spec='lib$name'
12780 soname_spec=
12781 shrext_cmds=.so
12782 postinstall_cmds=
12783 postuninstall_cmds=
12784 finish_cmds=
12785 finish_eval=
12786 shlibpath_var=
12787 shlibpath_overrides_runpath=unknown
12788 version_type=none
12789 dynamic_linker="$host_os ld.so"
12790 sys_lib_dlsearch_path_spec="/lib /usr/lib"
12791 need_lib_prefix=unknown
12792 hardcode_into_libs=no
12793
12794 # when you set need_version to no, make sure it does not cause -set_version
12795 # flags to be left without arguments
12796 need_version=unknown
12797
12798
12799
12800 case $host_os in
12801 aix3*)
12802   version_type=linux # correct to gnu/linux during the next big refactor
12803   library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
12804   shlibpath_var=LIBPATH
12805
12806   # AIX 3 has no versioning support, so we append a major version to the name.
12807   soname_spec='$libname$release$shared_ext$major'
12808   ;;
12809
12810 aix[4-9]*)
12811   version_type=linux # correct to gnu/linux during the next big refactor
12812   need_lib_prefix=no
12813   need_version=no
12814   hardcode_into_libs=yes
12815   if test ia64 = "$host_cpu"; then
12816     # AIX 5 supports IA64
12817     library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
12818     shlibpath_var=LD_LIBRARY_PATH
12819   else
12820     # With GCC up to 2.95.x, collect2 would create an import file
12821     # for dependence libraries.  The import file would start with
12822     # the line '#! .'.  This would cause the generated library to
12823     # depend on '.', always an invalid library.  This was fixed in
12824     # development snapshots of GCC prior to 3.0.
12825     case $host_os in
12826       aix4 | aix4.[01] | aix4.[01].*)
12827       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12828            echo ' yes '
12829            echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
12830         :
12831       else
12832         can_build_shared=no
12833       fi
12834       ;;
12835     esac
12836     # Using Import Files as archive members, it is possible to support
12837     # filename-based versioning of shared library archives on AIX. While
12838     # this would work for both with and without runtime linking, it will
12839     # prevent static linking of such archives. So we do filename-based
12840     # shared library versioning with .so extension only, which is used
12841     # when both runtime linking and shared linking is enabled.
12842     # Unfortunately, runtime linking may impact performance, so we do
12843     # not want this to be the default eventually. Also, we use the
12844     # versioned .so libs for executables only if there is the -brtl
12845     # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
12846     # To allow for filename-based versioning support, we need to create
12847     # libNAME.so.V as an archive file, containing:
12848     # *) an Import File, referring to the versioned filename of the
12849     #    archive as well as the shared archive member, telling the
12850     #    bitwidth (32 or 64) of that shared object, and providing the
12851     #    list of exported symbols of that shared object, eventually
12852     #    decorated with the 'weak' keyword
12853     # *) the shared object with the F_LOADONLY flag set, to really avoid
12854     #    it being seen by the linker.
12855     # At run time we better use the real file rather than another symlink,
12856     # but for link time we create the symlink libNAME.so -> libNAME.so.V
12857
12858     case $with_aix_soname,$aix_use_runtimelinking in
12859     # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
12860     # soname into executable. Probably we can add versioning support to
12861     # collect2, so additional links can be useful in future.
12862     aix,yes) # traditional libtool
12863       dynamic_linker='AIX unversionable lib.so'
12864       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
12865       # instead of lib<name>.a to let people know that these are not
12866       # typical AIX shared libraries.
12867       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12868       ;;
12869     aix,no) # traditional AIX only
12870       dynamic_linker='AIX lib.a(lib.so.V)'
12871       # We preserve .a as extension for shared libraries through AIX4.2
12872       # and later when we are not doing run time linking.
12873       library_names_spec='$libname$release.a $libname.a'
12874       soname_spec='$libname$release$shared_ext$major'
12875       ;;
12876     svr4,*) # full svr4 only
12877       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
12878       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
12879       # We do not specify a path in Import Files, so LIBPATH fires.
12880       shlibpath_overrides_runpath=yes
12881       ;;
12882     *,yes) # both, prefer svr4
12883       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
12884       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
12885       # unpreferred sharedlib libNAME.a needs extra handling
12886       postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
12887       postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
12888       # We do not specify a path in Import Files, so LIBPATH fires.
12889       shlibpath_overrides_runpath=yes
12890       ;;
12891     *,no) # both, prefer aix
12892       dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
12893       library_names_spec='$libname$release.a $libname.a'
12894       soname_spec='$libname$release$shared_ext$major'
12895       # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
12896       postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
12897       postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
12898       ;;
12899     esac
12900     shlibpath_var=LIBPATH
12901   fi
12902   ;;
12903
12904 amigaos*)
12905   case $host_cpu in
12906   powerpc)
12907     # Since July 2007 AmigaOS4 officially supports .so libraries.
12908     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
12909     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12910     ;;
12911   m68k)
12912     library_names_spec='$libname.ixlibrary $libname.a'
12913     # Create ${libname}_ixlibrary.a entries in /sys/libs.
12914     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
12915     ;;
12916   esac
12917   ;;
12918
12919 beos*)
12920   library_names_spec='$libname$shared_ext'
12921   dynamic_linker="$host_os ld.so"
12922   shlibpath_var=LIBRARY_PATH
12923   ;;
12924
12925 bsdi[45]*)
12926   version_type=linux # correct to gnu/linux during the next big refactor
12927   need_version=no
12928   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12929   soname_spec='$libname$release$shared_ext$major'
12930   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
12931   shlibpath_var=LD_LIBRARY_PATH
12932   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
12933   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
12934   # the default ld.so.conf also contains /usr/contrib/lib and
12935   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
12936   # libtool to hard-code these into programs
12937   ;;
12938
12939 cygwin* | mingw* | pw32* | cegcc*)
12940   version_type=windows
12941   shrext_cmds=.dll
12942   need_version=no
12943   need_lib_prefix=no
12944
12945   case $GCC,$cc_basename in
12946   yes,*)
12947     # gcc
12948     library_names_spec='$libname.dll.a'
12949     # DLL is installed to $(libdir)/../bin by postinstall_cmds
12950     postinstall_cmds='base_file=`basename \$file`~
12951       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
12952       dldir=$destdir/`dirname \$dlpath`~
12953       test -d \$dldir || mkdir -p \$dldir~
12954       $install_prog $dir/$dlname \$dldir/$dlname~
12955       chmod a+x \$dldir/$dlname~
12956       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
12957         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
12958       fi'
12959     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
12960       dlpath=$dir/\$dldll~
12961        $RM \$dlpath'
12962     shlibpath_overrides_runpath=yes
12963
12964     case $host_os in
12965     cygwin*)
12966       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
12967       soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
12968
12969       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
12970       ;;
12971     mingw* | cegcc*)
12972       # MinGW DLLs use traditional 'lib' prefix
12973       soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
12974       ;;
12975     pw32*)
12976       # pw32 DLLs use 'pw' prefix rather than 'lib'
12977       library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
12978       ;;
12979     esac
12980     dynamic_linker='Win32 ld.exe'
12981     ;;
12982
12983   *,cl*)
12984     # Native MSVC
12985     libname_spec='$name'
12986     soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
12987     library_names_spec='$libname.dll.lib'
12988
12989     case $build_os in
12990     mingw*)
12991       sys_lib_search_path_spec=
12992       lt_save_ifs=$IFS
12993       IFS=';'
12994       for lt_path in $LIB
12995       do
12996         IFS=$lt_save_ifs
12997         # Let DOS variable expansion print the short 8.3 style file name.
12998         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
12999         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13000       done
13001       IFS=$lt_save_ifs
13002       # Convert to MSYS style.
13003       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13004       ;;
13005     cygwin*)
13006       # Convert to unix form, then to dos form, then back to unix form
13007       # but this time dos style (no spaces!) so that the unix form looks
13008       # like /cygdrive/c/PROGRA~1:/cygdr...
13009       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13010       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13011       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13012       ;;
13013     *)
13014       sys_lib_search_path_spec=$LIB
13015       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13016         # It is most probably a Windows format PATH.
13017         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13018       else
13019         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13020       fi
13021       # FIXME: find the short name or the path components, as spaces are
13022       # common. (e.g. "Program Files" -> "PROGRA~1")
13023       ;;
13024     esac
13025
13026     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13027     postinstall_cmds='base_file=`basename \$file`~
13028       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13029       dldir=$destdir/`dirname \$dlpath`~
13030       test -d \$dldir || mkdir -p \$dldir~
13031       $install_prog $dir/$dlname \$dldir/$dlname'
13032     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13033       dlpath=$dir/\$dldll~
13034        $RM \$dlpath'
13035     shlibpath_overrides_runpath=yes
13036     dynamic_linker='Win32 link.exe'
13037     ;;
13038
13039   *)
13040     # Assume MSVC wrapper
13041     library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13042     dynamic_linker='Win32 ld.exe'
13043     ;;
13044   esac
13045   # FIXME: first we should search . and the directory the executable is in
13046   shlibpath_var=PATH
13047   ;;
13048
13049 darwin* | rhapsody*)
13050   dynamic_linker="$host_os dyld"
13051   version_type=darwin
13052   need_lib_prefix=no
13053   need_version=no
13054   library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13055   soname_spec='$libname$release$major$shared_ext'
13056   shlibpath_overrides_runpath=yes
13057   shlibpath_var=DYLD_LIBRARY_PATH
13058   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13059
13060   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13061   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13062   ;;
13063
13064 dgux*)
13065   version_type=linux # correct to gnu/linux during the next big refactor
13066   need_lib_prefix=no
13067   need_version=no
13068   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13069   soname_spec='$libname$release$shared_ext$major'
13070   shlibpath_var=LD_LIBRARY_PATH
13071   ;;
13072
13073 freebsd* | dragonfly*)
13074   # DragonFly does not have aout.  When/if they implement a new
13075   # versioning mechanism, adjust this.
13076   if test -x /usr/bin/objformat; then
13077     objformat=`/usr/bin/objformat`
13078   else
13079     case $host_os in
13080     freebsd[23].*) objformat=aout ;;
13081     *) objformat=elf ;;
13082     esac
13083   fi
13084   version_type=freebsd-$objformat
13085   case $version_type in
13086     freebsd-elf*)
13087       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13088       soname_spec='$libname$release$shared_ext$major'
13089       need_version=no
13090       need_lib_prefix=no
13091       ;;
13092     freebsd-*)
13093       library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13094       need_version=yes
13095       ;;
13096   esac
13097   shlibpath_var=LD_LIBRARY_PATH
13098   case $host_os in
13099   freebsd2.*)
13100     shlibpath_overrides_runpath=yes
13101     ;;
13102   freebsd3.[01]* | freebsdelf3.[01]*)
13103     shlibpath_overrides_runpath=yes
13104     hardcode_into_libs=yes
13105     ;;
13106   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13107   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13108     shlibpath_overrides_runpath=no
13109     hardcode_into_libs=yes
13110     ;;
13111   *) # from 4.6 on, and DragonFly
13112     shlibpath_overrides_runpath=yes
13113     hardcode_into_libs=yes
13114     ;;
13115   esac
13116   ;;
13117
13118 haiku*)
13119   version_type=linux # correct to gnu/linux during the next big refactor
13120   need_lib_prefix=no
13121   need_version=no
13122   dynamic_linker="$host_os runtime_loader"
13123   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13124   soname_spec='$libname$release$shared_ext$major'
13125   shlibpath_var=LIBRARY_PATH
13126   shlibpath_overrides_runpath=no
13127   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13128   hardcode_into_libs=yes
13129   ;;
13130
13131 hpux9* | hpux10* | hpux11*)
13132   # Give a soname corresponding to the major version so that dld.sl refuses to
13133   # link against other versions.
13134   version_type=sunos
13135   need_lib_prefix=no
13136   need_version=no
13137   case $host_cpu in
13138   ia64*)
13139     shrext_cmds='.so'
13140     hardcode_into_libs=yes
13141     dynamic_linker="$host_os dld.so"
13142     shlibpath_var=LD_LIBRARY_PATH
13143     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13144     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13145     soname_spec='$libname$release$shared_ext$major'
13146     if test 32 = "$HPUX_IA64_MODE"; then
13147       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13148       sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13149     else
13150       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13151       sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13152     fi
13153     ;;
13154   hppa*64*)
13155     shrext_cmds='.sl'
13156     hardcode_into_libs=yes
13157     dynamic_linker="$host_os dld.sl"
13158     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13159     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13160     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13161     soname_spec='$libname$release$shared_ext$major'
13162     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13163     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13164     ;;
13165   *)
13166     shrext_cmds='.sl'
13167     dynamic_linker="$host_os dld.sl"
13168     shlibpath_var=SHLIB_PATH
13169     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13170     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13171     soname_spec='$libname$release$shared_ext$major'
13172     ;;
13173   esac
13174   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13175   postinstall_cmds='chmod 555 $lib'
13176   # or fails outright, so override atomically:
13177   install_override_mode=555
13178   ;;
13179
13180 interix[3-9]*)
13181   version_type=linux # correct to gnu/linux during the next big refactor
13182   need_lib_prefix=no
13183   need_version=no
13184   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13185   soname_spec='$libname$release$shared_ext$major'
13186   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13187   shlibpath_var=LD_LIBRARY_PATH
13188   shlibpath_overrides_runpath=no
13189   hardcode_into_libs=yes
13190   ;;
13191
13192 irix5* | irix6* | nonstopux*)
13193   case $host_os in
13194     nonstopux*) version_type=nonstopux ;;
13195     *)
13196         if test yes = "$lt_cv_prog_gnu_ld"; then
13197                 version_type=linux # correct to gnu/linux during the next big refactor
13198         else
13199                 version_type=irix
13200         fi ;;
13201   esac
13202   need_lib_prefix=no
13203   need_version=no
13204   soname_spec='$libname$release$shared_ext$major'
13205   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13206   case $host_os in
13207   irix5* | nonstopux*)
13208     libsuff= shlibsuff=
13209     ;;
13210   *)
13211     case $LD in # libtool.m4 will add one of these switches to LD
13212     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13213       libsuff= shlibsuff= libmagic=32-bit;;
13214     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13215       libsuff=32 shlibsuff=N32 libmagic=N32;;
13216     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13217       libsuff=64 shlibsuff=64 libmagic=64-bit;;
13218     *) libsuff= shlibsuff= libmagic=never-match;;
13219     esac
13220     ;;
13221   esac
13222   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13223   shlibpath_overrides_runpath=no
13224   sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13225   sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13226   hardcode_into_libs=yes
13227   ;;
13228
13229 # No shared lib support for Linux oldld, aout, or coff.
13230 linux*oldld* | linux*aout* | linux*coff*)
13231   dynamic_linker=no
13232   ;;
13233
13234 linux*android*)
13235   version_type=none # Android doesn't support versioned libraries.
13236   need_lib_prefix=no
13237   need_version=no
13238   library_names_spec='$libname$release$shared_ext'
13239   soname_spec='$libname$release$shared_ext'
13240   finish_cmds=
13241   shlibpath_var=LD_LIBRARY_PATH
13242   shlibpath_overrides_runpath=yes
13243
13244   # This implies no fast_install, which is unacceptable.
13245   # Some rework will be needed to allow for fast_install
13246   # before this can be enabled.
13247   hardcode_into_libs=yes
13248
13249   dynamic_linker='Android linker'
13250   # Don't embed -rpath directories since the linker doesn't support them.
13251   hardcode_libdir_flag_spec='-L$libdir'
13252   ;;
13253
13254 # This must be glibc/ELF.
13255 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13256   version_type=linux # correct to gnu/linux during the next big refactor
13257   need_lib_prefix=no
13258   need_version=no
13259   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13260   soname_spec='$libname$release$shared_ext$major'
13261   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13262   shlibpath_var=LD_LIBRARY_PATH
13263   shlibpath_overrides_runpath=no
13264
13265   # Some binutils ld are patched to set DT_RUNPATH
13266   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
13267   $as_echo_n "(cached) " >&6
13268 else
13269   lt_cv_shlibpath_overrides_runpath=no
13270     save_LDFLAGS=$LDFLAGS
13271     save_libdir=$libdir
13272     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13273          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13274     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13275 /* end confdefs.h.  */
13276
13277 int
13278 main ()
13279 {
13280
13281   ;
13282   return 0;
13283 }
13284 _ACEOF
13285 if ac_fn_c_try_link "$LINENO"; then :
13286   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
13287   lt_cv_shlibpath_overrides_runpath=yes
13288 fi
13289 fi
13290 rm -f core conftest.err conftest.$ac_objext \
13291     conftest$ac_exeext conftest.$ac_ext
13292     LDFLAGS=$save_LDFLAGS
13293     libdir=$save_libdir
13294
13295 fi
13296
13297   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13298
13299   # This implies no fast_install, which is unacceptable.
13300   # Some rework will be needed to allow for fast_install
13301   # before this can be enabled.
13302   hardcode_into_libs=yes
13303
13304   # Add ABI-specific directories to the system library path.
13305   sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
13306
13307   # Ideally, we could use ldconfig to report *all* directores which are
13308   # searched for libraries, however this is still not possible.  Aside from not
13309   # being certain /sbin/ldconfig is available, command
13310   # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13311   # even though it is searched at run-time.  Try to do the best guess by
13312   # appending ld.so.conf contents (and includes) to the search path.
13313   if test -f /etc/ld.so.conf; then
13314     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' ' '`
13315     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
13316   fi
13317
13318   # We used to test for /lib/ld.so.1 and disable shared libraries on
13319   # powerpc, because MkLinux only supported shared libraries with the
13320   # GNU dynamic linker.  Since this was broken with cross compilers,
13321   # most powerpc-linux boxes support dynamic linking these days and
13322   # people can always --disable-shared, the test was removed, and we
13323   # assume the GNU/Linux dynamic linker is in use.
13324   dynamic_linker='GNU/Linux ld.so'
13325   ;;
13326
13327 netbsd*)
13328   version_type=sunos
13329   need_lib_prefix=no
13330   need_version=no
13331   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13332     library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13333     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13334     dynamic_linker='NetBSD (a.out) ld.so'
13335   else
13336     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13337     soname_spec='$libname$release$shared_ext$major'
13338     dynamic_linker='NetBSD ld.elf_so'
13339   fi
13340   shlibpath_var=LD_LIBRARY_PATH
13341   shlibpath_overrides_runpath=yes
13342   hardcode_into_libs=yes
13343   ;;
13344
13345 newsos6)
13346   version_type=linux # correct to gnu/linux during the next big refactor
13347   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13348   shlibpath_var=LD_LIBRARY_PATH
13349   shlibpath_overrides_runpath=yes
13350   ;;
13351
13352 *nto* | *qnx*)
13353   version_type=qnx
13354   need_lib_prefix=no
13355   need_version=no
13356   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13357   soname_spec='$libname$release$shared_ext$major'
13358   shlibpath_var=LD_LIBRARY_PATH
13359   shlibpath_overrides_runpath=no
13360   hardcode_into_libs=yes
13361   dynamic_linker='ldqnx.so'
13362   ;;
13363
13364 openbsd* | bitrig*)
13365   version_type=sunos
13366   sys_lib_dlsearch_path_spec=/usr/lib
13367   need_lib_prefix=no
13368   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13369     need_version=no
13370   else
13371     need_version=yes
13372   fi
13373   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13374   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13375   shlibpath_var=LD_LIBRARY_PATH
13376   shlibpath_overrides_runpath=yes
13377   ;;
13378
13379 os2*)
13380   libname_spec='$name'
13381   version_type=windows
13382   shrext_cmds=.dll
13383   need_version=no
13384   need_lib_prefix=no
13385   # OS/2 can only load a DLL with a base name of 8 characters or less.
13386   soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13387     v=$($ECHO $release$versuffix | tr -d .-);
13388     n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13389     $ECHO $n$v`$shared_ext'
13390   library_names_spec='${libname}_dll.$libext'
13391   dynamic_linker='OS/2 ld.exe'
13392   shlibpath_var=BEGINLIBPATH
13393   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13394   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13395   postinstall_cmds='base_file=`basename \$file`~
13396     dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13397     dldir=$destdir/`dirname \$dlpath`~
13398     test -d \$dldir || mkdir -p \$dldir~
13399     $install_prog $dir/$dlname \$dldir/$dlname~
13400     chmod a+x \$dldir/$dlname~
13401     if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13402       eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13403     fi'
13404   postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13405     dlpath=$dir/\$dldll~
13406     $RM \$dlpath'
13407   ;;
13408
13409 osf3* | osf4* | osf5*)
13410   version_type=osf
13411   need_lib_prefix=no
13412   need_version=no
13413   soname_spec='$libname$release$shared_ext$major'
13414   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13415   shlibpath_var=LD_LIBRARY_PATH
13416   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13417   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13418   ;;
13419
13420 rdos*)
13421   dynamic_linker=no
13422   ;;
13423
13424 solaris*)
13425   version_type=linux # correct to gnu/linux during the next big refactor
13426   need_lib_prefix=no
13427   need_version=no
13428   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13429   soname_spec='$libname$release$shared_ext$major'
13430   shlibpath_var=LD_LIBRARY_PATH
13431   shlibpath_overrides_runpath=yes
13432   hardcode_into_libs=yes
13433   # ldd complains unless libraries are executable
13434   postinstall_cmds='chmod +x $lib'
13435   ;;
13436
13437 sunos4*)
13438   version_type=sunos
13439   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13440   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13441   shlibpath_var=LD_LIBRARY_PATH
13442   shlibpath_overrides_runpath=yes
13443   if test yes = "$with_gnu_ld"; then
13444     need_lib_prefix=no
13445   fi
13446   need_version=yes
13447   ;;
13448
13449 sysv4 | sysv4.3*)
13450   version_type=linux # correct to gnu/linux during the next big refactor
13451   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13452   soname_spec='$libname$release$shared_ext$major'
13453   shlibpath_var=LD_LIBRARY_PATH
13454   case $host_vendor in
13455     sni)
13456       shlibpath_overrides_runpath=no
13457       need_lib_prefix=no
13458       runpath_var=LD_RUN_PATH
13459       ;;
13460     siemens)
13461       need_lib_prefix=no
13462       ;;
13463     motorola)
13464       need_lib_prefix=no
13465       need_version=no
13466       shlibpath_overrides_runpath=no
13467       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13468       ;;
13469   esac
13470   ;;
13471
13472 sysv4*MP*)
13473   if test -d /usr/nec; then
13474     version_type=linux # correct to gnu/linux during the next big refactor
13475     library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13476     soname_spec='$libname$shared_ext.$major'
13477     shlibpath_var=LD_LIBRARY_PATH
13478   fi
13479   ;;
13480
13481 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13482   version_type=sco
13483   need_lib_prefix=no
13484   need_version=no
13485   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13486   soname_spec='$libname$release$shared_ext$major'
13487   shlibpath_var=LD_LIBRARY_PATH
13488   shlibpath_overrides_runpath=yes
13489   hardcode_into_libs=yes
13490   if test yes = "$with_gnu_ld"; then
13491     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13492   else
13493     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13494     case $host_os in
13495       sco3.2v5*)
13496         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13497         ;;
13498     esac
13499   fi
13500   sys_lib_dlsearch_path_spec='/usr/lib'
13501   ;;
13502
13503 tpf*)
13504   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13505   version_type=linux # correct to gnu/linux during the next big refactor
13506   need_lib_prefix=no
13507   need_version=no
13508   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13509   shlibpath_var=LD_LIBRARY_PATH
13510   shlibpath_overrides_runpath=no
13511   hardcode_into_libs=yes
13512   ;;
13513
13514 uts4*)
13515   version_type=linux # correct to gnu/linux during the next big refactor
13516   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13517   soname_spec='$libname$release$shared_ext$major'
13518   shlibpath_var=LD_LIBRARY_PATH
13519   ;;
13520
13521 *)
13522   dynamic_linker=no
13523   ;;
13524 esac
13525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13526 $as_echo "$dynamic_linker" >&6; }
13527 test no = "$dynamic_linker" && can_build_shared=no
13528
13529 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13530 if test yes = "$GCC"; then
13531   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13532 fi
13533
13534 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13535   sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13536 fi
13537
13538 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13539   sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13540 fi
13541
13542 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13543 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13544
13545 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13546 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13547
13548 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13549 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13648 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13649 hardcode_action=
13650 if test -n "$hardcode_libdir_flag_spec" ||
13651    test -n "$runpath_var" ||
13652    test yes = "$hardcode_automatic"; then
13653
13654   # We can hardcode non-existent directories.
13655   if test no != "$hardcode_direct" &&
13656      # If the only mechanism to avoid hardcoding is shlibpath_var, we
13657      # have to relink, otherwise we might link with an installed library
13658      # when we should be linking with a yet-to-be-installed one
13659      ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13660      test no != "$hardcode_minus_L"; then
13661     # Linking always hardcodes the temporary library directory.
13662     hardcode_action=relink
13663   else
13664     # We can link without hardcoding, and we can hardcode nonexisting dirs.
13665     hardcode_action=immediate
13666   fi
13667 else
13668   # We cannot hardcode anything, or else we can only hardcode existing
13669   # directories.
13670   hardcode_action=unsupported
13671 fi
13672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13673 $as_echo "$hardcode_action" >&6; }
13674
13675 if test relink = "$hardcode_action" ||
13676    test yes = "$inherit_rpath"; then
13677   # Fast installation is not supported
13678   enable_fast_install=no
13679 elif test yes = "$shlibpath_overrides_runpath" ||
13680      test no = "$enable_shared"; then
13681   # Fast installation is not necessary
13682   enable_fast_install=needless
13683 fi
13684
13685
13686
13687
13688
13689
13690   if test yes != "$enable_dlopen"; then
13691   enable_dlopen=unknown
13692   enable_dlopen_self=unknown
13693   enable_dlopen_self_static=unknown
13694 else
13695   lt_cv_dlopen=no
13696   lt_cv_dlopen_libs=
13697
13698   case $host_os in
13699   beos*)
13700     lt_cv_dlopen=load_add_on
13701     lt_cv_dlopen_libs=
13702     lt_cv_dlopen_self=yes
13703     ;;
13704
13705   mingw* | pw32* | cegcc*)
13706     lt_cv_dlopen=LoadLibrary
13707     lt_cv_dlopen_libs=
13708     ;;
13709
13710   cygwin*)
13711     lt_cv_dlopen=dlopen
13712     lt_cv_dlopen_libs=
13713     ;;
13714
13715   darwin*)
13716     # if libdl is installed we need to link against it
13717     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13718 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13719 if ${ac_cv_lib_dl_dlopen+:} false; then :
13720   $as_echo_n "(cached) " >&6
13721 else
13722   ac_check_lib_save_LIBS=$LIBS
13723 LIBS="-ldl  $LIBS"
13724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13725 /* end confdefs.h.  */
13726
13727 /* Override any GCC internal prototype to avoid an error.
13728    Use char because int might match the return type of a GCC
13729    builtin and then its argument prototype would still apply.  */
13730 #ifdef __cplusplus
13731 extern "C"
13732 #endif
13733 char dlopen ();
13734 int
13735 main ()
13736 {
13737 return dlopen ();
13738   ;
13739   return 0;
13740 }
13741 _ACEOF
13742 if ac_fn_c_try_link "$LINENO"; then :
13743   ac_cv_lib_dl_dlopen=yes
13744 else
13745   ac_cv_lib_dl_dlopen=no
13746 fi
13747 rm -f core conftest.err conftest.$ac_objext \
13748     conftest$ac_exeext conftest.$ac_ext
13749 LIBS=$ac_check_lib_save_LIBS
13750 fi
13751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13752 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13753 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13754   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13755 else
13756
13757     lt_cv_dlopen=dyld
13758     lt_cv_dlopen_libs=
13759     lt_cv_dlopen_self=yes
13760
13761 fi
13762
13763     ;;
13764
13765   tpf*)
13766     # Don't try to run any link tests for TPF.  We know it's impossible
13767     # because TPF is a cross-compiler, and we know how we open DSOs.
13768     lt_cv_dlopen=dlopen
13769     lt_cv_dlopen_libs=
13770     lt_cv_dlopen_self=no
13771     ;;
13772
13773   *)
13774     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
13775 if test "x$ac_cv_func_shl_load" = xyes; then :
13776   lt_cv_dlopen=shl_load
13777 else
13778   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
13779 $as_echo_n "checking for shl_load in -ldld... " >&6; }
13780 if ${ac_cv_lib_dld_shl_load+:} false; then :
13781   $as_echo_n "(cached) " >&6
13782 else
13783   ac_check_lib_save_LIBS=$LIBS
13784 LIBS="-ldld  $LIBS"
13785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13786 /* end confdefs.h.  */
13787
13788 /* Override any GCC internal prototype to avoid an error.
13789    Use char because int might match the return type of a GCC
13790    builtin and then its argument prototype would still apply.  */
13791 #ifdef __cplusplus
13792 extern "C"
13793 #endif
13794 char shl_load ();
13795 int
13796 main ()
13797 {
13798 return shl_load ();
13799   ;
13800   return 0;
13801 }
13802 _ACEOF
13803 if ac_fn_c_try_link "$LINENO"; then :
13804   ac_cv_lib_dld_shl_load=yes
13805 else
13806   ac_cv_lib_dld_shl_load=no
13807 fi
13808 rm -f core conftest.err conftest.$ac_objext \
13809     conftest$ac_exeext conftest.$ac_ext
13810 LIBS=$ac_check_lib_save_LIBS
13811 fi
13812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
13813 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
13814 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
13815   lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
13816 else
13817   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
13818 if test "x$ac_cv_func_dlopen" = xyes; then :
13819   lt_cv_dlopen=dlopen
13820 else
13821   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13822 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13823 if ${ac_cv_lib_dl_dlopen+:} false; then :
13824   $as_echo_n "(cached) " >&6
13825 else
13826   ac_check_lib_save_LIBS=$LIBS
13827 LIBS="-ldl  $LIBS"
13828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13829 /* end confdefs.h.  */
13830
13831 /* Override any GCC internal prototype to avoid an error.
13832    Use char because int might match the return type of a GCC
13833    builtin and then its argument prototype would still apply.  */
13834 #ifdef __cplusplus
13835 extern "C"
13836 #endif
13837 char dlopen ();
13838 int
13839 main ()
13840 {
13841 return dlopen ();
13842   ;
13843   return 0;
13844 }
13845 _ACEOF
13846 if ac_fn_c_try_link "$LINENO"; then :
13847   ac_cv_lib_dl_dlopen=yes
13848 else
13849   ac_cv_lib_dl_dlopen=no
13850 fi
13851 rm -f core conftest.err conftest.$ac_objext \
13852     conftest$ac_exeext conftest.$ac_ext
13853 LIBS=$ac_check_lib_save_LIBS
13854 fi
13855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13856 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13857 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13858   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13859 else
13860   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
13861 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
13862 if ${ac_cv_lib_svld_dlopen+:} false; then :
13863   $as_echo_n "(cached) " >&6
13864 else
13865   ac_check_lib_save_LIBS=$LIBS
13866 LIBS="-lsvld  $LIBS"
13867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13868 /* end confdefs.h.  */
13869
13870 /* Override any GCC internal prototype to avoid an error.
13871    Use char because int might match the return type of a GCC
13872    builtin and then its argument prototype would still apply.  */
13873 #ifdef __cplusplus
13874 extern "C"
13875 #endif
13876 char dlopen ();
13877 int
13878 main ()
13879 {
13880 return dlopen ();
13881   ;
13882   return 0;
13883 }
13884 _ACEOF
13885 if ac_fn_c_try_link "$LINENO"; then :
13886   ac_cv_lib_svld_dlopen=yes
13887 else
13888   ac_cv_lib_svld_dlopen=no
13889 fi
13890 rm -f core conftest.err conftest.$ac_objext \
13891     conftest$ac_exeext conftest.$ac_ext
13892 LIBS=$ac_check_lib_save_LIBS
13893 fi
13894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
13895 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
13896 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
13897   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
13898 else
13899   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
13900 $as_echo_n "checking for dld_link in -ldld... " >&6; }
13901 if ${ac_cv_lib_dld_dld_link+:} false; then :
13902   $as_echo_n "(cached) " >&6
13903 else
13904   ac_check_lib_save_LIBS=$LIBS
13905 LIBS="-ldld  $LIBS"
13906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13907 /* end confdefs.h.  */
13908
13909 /* Override any GCC internal prototype to avoid an error.
13910    Use char because int might match the return type of a GCC
13911    builtin and then its argument prototype would still apply.  */
13912 #ifdef __cplusplus
13913 extern "C"
13914 #endif
13915 char dld_link ();
13916 int
13917 main ()
13918 {
13919 return dld_link ();
13920   ;
13921   return 0;
13922 }
13923 _ACEOF
13924 if ac_fn_c_try_link "$LINENO"; then :
13925   ac_cv_lib_dld_dld_link=yes
13926 else
13927   ac_cv_lib_dld_dld_link=no
13928 fi
13929 rm -f core conftest.err conftest.$ac_objext \
13930     conftest$ac_exeext conftest.$ac_ext
13931 LIBS=$ac_check_lib_save_LIBS
13932 fi
13933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
13934 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
13935 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
13936   lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
13937 fi
13938
13939
13940 fi
13941
13942
13943 fi
13944
13945
13946 fi
13947
13948
13949 fi
13950
13951
13952 fi
13953
13954     ;;
13955   esac
13956
13957   if test no = "$lt_cv_dlopen"; then
13958     enable_dlopen=no
13959   else
13960     enable_dlopen=yes
13961   fi
13962
13963   case $lt_cv_dlopen in
13964   dlopen)
13965     save_CPPFLAGS=$CPPFLAGS
13966     test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
13967
13968     save_LDFLAGS=$LDFLAGS
13969     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
13970
13971     save_LIBS=$LIBS
13972     LIBS="$lt_cv_dlopen_libs $LIBS"
13973
13974     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
13975 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
13976 if ${lt_cv_dlopen_self+:} false; then :
13977   $as_echo_n "(cached) " >&6
13978 else
13979           if test yes = "$cross_compiling"; then :
13980   lt_cv_dlopen_self=cross
13981 else
13982   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13983   lt_status=$lt_dlunknown
13984   cat > conftest.$ac_ext <<_LT_EOF
13985 #line $LINENO "configure"
13986 #include "confdefs.h"
13987
13988 #if HAVE_DLFCN_H
13989 #include <dlfcn.h>
13990 #endif
13991
13992 #include <stdio.h>
13993
13994 #ifdef RTLD_GLOBAL
13995 #  define LT_DLGLOBAL           RTLD_GLOBAL
13996 #else
13997 #  ifdef DL_GLOBAL
13998 #    define LT_DLGLOBAL         DL_GLOBAL
13999 #  else
14000 #    define LT_DLGLOBAL         0
14001 #  endif
14002 #endif
14003
14004 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14005    find out it does not work in some platform. */
14006 #ifndef LT_DLLAZY_OR_NOW
14007 #  ifdef RTLD_LAZY
14008 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14009 #  else
14010 #    ifdef DL_LAZY
14011 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14012 #    else
14013 #      ifdef RTLD_NOW
14014 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14015 #      else
14016 #        ifdef DL_NOW
14017 #          define LT_DLLAZY_OR_NOW      DL_NOW
14018 #        else
14019 #          define LT_DLLAZY_OR_NOW      0
14020 #        endif
14021 #      endif
14022 #    endif
14023 #  endif
14024 #endif
14025
14026 /* When -fvisibility=hidden is used, assume the code has been annotated
14027    correspondingly for the symbols needed.  */
14028 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14029 int fnord () __attribute__((visibility("default")));
14030 #endif
14031
14032 int fnord () { return 42; }
14033 int main ()
14034 {
14035   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14036   int status = $lt_dlunknown;
14037
14038   if (self)
14039     {
14040       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14041       else
14042         {
14043           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14044           else puts (dlerror ());
14045         }
14046       /* dlclose (self); */
14047     }
14048   else
14049     puts (dlerror ());
14050
14051   return status;
14052 }
14053 _LT_EOF
14054   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14055   (eval $ac_link) 2>&5
14056   ac_status=$?
14057   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14058   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14059     (./conftest; exit; ) >&5 2>/dev/null
14060     lt_status=$?
14061     case x$lt_status in
14062       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14063       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14064       x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14065     esac
14066   else :
14067     # compilation failed
14068     lt_cv_dlopen_self=no
14069   fi
14070 fi
14071 rm -fr conftest*
14072
14073
14074 fi
14075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14076 $as_echo "$lt_cv_dlopen_self" >&6; }
14077
14078     if test yes = "$lt_cv_dlopen_self"; then
14079       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14080       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14081 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
14082 if ${lt_cv_dlopen_self_static+:} false; then :
14083   $as_echo_n "(cached) " >&6
14084 else
14085           if test yes = "$cross_compiling"; then :
14086   lt_cv_dlopen_self_static=cross
14087 else
14088   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14089   lt_status=$lt_dlunknown
14090   cat > conftest.$ac_ext <<_LT_EOF
14091 #line $LINENO "configure"
14092 #include "confdefs.h"
14093
14094 #if HAVE_DLFCN_H
14095 #include <dlfcn.h>
14096 #endif
14097
14098 #include <stdio.h>
14099
14100 #ifdef RTLD_GLOBAL
14101 #  define LT_DLGLOBAL           RTLD_GLOBAL
14102 #else
14103 #  ifdef DL_GLOBAL
14104 #    define LT_DLGLOBAL         DL_GLOBAL
14105 #  else
14106 #    define LT_DLGLOBAL         0
14107 #  endif
14108 #endif
14109
14110 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14111    find out it does not work in some platform. */
14112 #ifndef LT_DLLAZY_OR_NOW
14113 #  ifdef RTLD_LAZY
14114 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14115 #  else
14116 #    ifdef DL_LAZY
14117 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14118 #    else
14119 #      ifdef RTLD_NOW
14120 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14121 #      else
14122 #        ifdef DL_NOW
14123 #          define LT_DLLAZY_OR_NOW      DL_NOW
14124 #        else
14125 #          define LT_DLLAZY_OR_NOW      0
14126 #        endif
14127 #      endif
14128 #    endif
14129 #  endif
14130 #endif
14131
14132 /* When -fvisibility=hidden is used, assume the code has been annotated
14133    correspondingly for the symbols needed.  */
14134 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14135 int fnord () __attribute__((visibility("default")));
14136 #endif
14137
14138 int fnord () { return 42; }
14139 int main ()
14140 {
14141   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14142   int status = $lt_dlunknown;
14143
14144   if (self)
14145     {
14146       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14147       else
14148         {
14149           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14150           else puts (dlerror ());
14151         }
14152       /* dlclose (self); */
14153     }
14154   else
14155     puts (dlerror ());
14156
14157   return status;
14158 }
14159 _LT_EOF
14160   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14161   (eval $ac_link) 2>&5
14162   ac_status=$?
14163   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14164   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14165     (./conftest; exit; ) >&5 2>/dev/null
14166     lt_status=$?
14167     case x$lt_status in
14168       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14169       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14170       x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14171     esac
14172   else :
14173     # compilation failed
14174     lt_cv_dlopen_self_static=no
14175   fi
14176 fi
14177 rm -fr conftest*
14178
14179
14180 fi
14181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14182 $as_echo "$lt_cv_dlopen_self_static" >&6; }
14183     fi
14184
14185     CPPFLAGS=$save_CPPFLAGS
14186     LDFLAGS=$save_LDFLAGS
14187     LIBS=$save_LIBS
14188     ;;
14189   esac
14190
14191   case $lt_cv_dlopen_self in
14192   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14193   *) enable_dlopen_self=unknown ;;
14194   esac
14195
14196   case $lt_cv_dlopen_self_static in
14197   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14198   *) enable_dlopen_self_static=unknown ;;
14199   esac
14200 fi
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218 striplib=
14219 old_striplib=
14220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14221 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
14222 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14223   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14224   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14226 $as_echo "yes" >&6; }
14227 else
14228 # FIXME - insert some real tests, host_os isn't really good enough
14229   case $host_os in
14230   darwin*)
14231     if test -n "$STRIP"; then
14232       striplib="$STRIP -x"
14233       old_striplib="$STRIP -S"
14234       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14235 $as_echo "yes" >&6; }
14236     else
14237       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14238 $as_echo "no" >&6; }
14239     fi
14240     ;;
14241   *)
14242     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14243 $as_echo "no" >&6; }
14244     ;;
14245   esac
14246 fi
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259   # Report what library types will actually be built
14260   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14261 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
14262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14263 $as_echo "$can_build_shared" >&6; }
14264
14265   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14266 $as_echo_n "checking whether to build shared libraries... " >&6; }
14267   test no = "$can_build_shared" && enable_shared=no
14268
14269   # On AIX, shared libraries and static libraries use the same namespace, and
14270   # are all built from PIC.
14271   case $host_os in
14272   aix3*)
14273     test yes = "$enable_shared" && enable_static=no
14274     if test -n "$RANLIB"; then
14275       archive_cmds="$archive_cmds~\$RANLIB \$lib"
14276       postinstall_cmds='$RANLIB $lib'
14277     fi
14278     ;;
14279
14280   aix[4-9]*)
14281     if test ia64 != "$host_cpu"; then
14282       case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14283       yes,aix,yes) ;;                   # shared object as lib.so file only
14284       yes,svr4,*) ;;                    # shared object as lib.so archive member only
14285       yes,*) enable_static=no ;;        # shared object in lib.a archive as well
14286       esac
14287     fi
14288     ;;
14289   esac
14290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14291 $as_echo "$enable_shared" >&6; }
14292
14293   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14294 $as_echo_n "checking whether to build static libraries... " >&6; }
14295   # Make sure either enable_shared or enable_static is yes.
14296   test yes = "$enable_shared" || enable_static=yes
14297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14298 $as_echo "$enable_static" >&6; }
14299
14300
14301
14302
14303 fi
14304 ac_ext=c
14305 ac_cpp='$CPP $CPPFLAGS'
14306 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14307 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14308 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14309
14310 CC=$lt_save_CC
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326         ac_config_commands="$ac_config_commands libtool"
14327
14328
14329
14330
14331 # Only expand once:
14332
14333
14334
14335
14336 # Checks for header files.
14337 for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h
14338 do :
14339   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14340 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
14341 "
14342 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14343   cat >>confdefs.h <<_ACEOF
14344 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14345 _ACEOF
14346
14347 fi
14348
14349 done
14350
14351
14352 # check for types.
14353 # Using own tests for int64* because autoconf builtin only give 32bit.
14354 ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
14355 if test "x$ac_cv_type_int8_t" = xyes; then :
14356
14357 else
14358
14359 cat >>confdefs.h <<_ACEOF
14360 #define int8_t signed char
14361 _ACEOF
14362
14363 fi
14364
14365 ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
14366 if test "x$ac_cv_type_int16_t" = xyes; then :
14367
14368 else
14369
14370 cat >>confdefs.h <<_ACEOF
14371 #define int16_t short
14372 _ACEOF
14373
14374 fi
14375
14376 ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
14377 if test "x$ac_cv_type_int32_t" = xyes; then :
14378
14379 else
14380
14381 cat >>confdefs.h <<_ACEOF
14382 #define int32_t int
14383 _ACEOF
14384
14385 fi
14386
14387 ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
14388 if test "x$ac_cv_type_int64_t" = xyes; then :
14389
14390 else
14391
14392 cat >>confdefs.h <<_ACEOF
14393 #define int64_t long long
14394 _ACEOF
14395
14396 fi
14397
14398 ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
14399 if test "x$ac_cv_type_uint8_t" = xyes; then :
14400
14401 else
14402
14403 cat >>confdefs.h <<_ACEOF
14404 #define uint8_t unsigned char
14405 _ACEOF
14406
14407 fi
14408
14409 ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
14410 if test "x$ac_cv_type_uint16_t" = xyes; then :
14411
14412 else
14413
14414 cat >>confdefs.h <<_ACEOF
14415 #define uint16_t unsigned short
14416 _ACEOF
14417
14418 fi
14419
14420 ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
14421 if test "x$ac_cv_type_uint32_t" = xyes; then :
14422
14423 else
14424
14425 cat >>confdefs.h <<_ACEOF
14426 #define uint32_t unsigned int
14427 _ACEOF
14428
14429 fi
14430
14431 ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
14432 if test "x$ac_cv_type_uint64_t" = xyes; then :
14433
14434 else
14435
14436 cat >>confdefs.h <<_ACEOF
14437 #define uint64_t unsigned long long
14438 _ACEOF
14439
14440 fi
14441
14442 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14443 if test "x$ac_cv_type_size_t" = xyes; then :
14444
14445 else
14446
14447 cat >>confdefs.h <<_ACEOF
14448 #define size_t unsigned int
14449 _ACEOF
14450
14451 fi
14452
14453 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
14454 if test "x$ac_cv_type_ssize_t" = xyes; then :
14455
14456 else
14457
14458 cat >>confdefs.h <<_ACEOF
14459 #define ssize_t int
14460 _ACEOF
14461
14462 fi
14463
14464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
14465 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
14466 if ${ac_cv_type_uid_t+:} false; then :
14467   $as_echo_n "(cached) " >&6
14468 else
14469   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14470 /* end confdefs.h.  */
14471 #include <sys/types.h>
14472
14473 _ACEOF
14474 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14475   $EGREP "uid_t" >/dev/null 2>&1; then :
14476   ac_cv_type_uid_t=yes
14477 else
14478   ac_cv_type_uid_t=no
14479 fi
14480 rm -f conftest*
14481
14482 fi
14483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
14484 $as_echo "$ac_cv_type_uid_t" >&6; }
14485 if test $ac_cv_type_uid_t = no; then
14486
14487 $as_echo "#define uid_t int" >>confdefs.h
14488
14489
14490 $as_echo "#define gid_t int" >>confdefs.h
14491
14492 fi
14493
14494 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14495 if test "x$ac_cv_type_pid_t" = xyes; then :
14496
14497 else
14498
14499 cat >>confdefs.h <<_ACEOF
14500 #define pid_t int
14501 _ACEOF
14502
14503 fi
14504
14505 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
14506 if test "x$ac_cv_type_off_t" = xyes; then :
14507
14508 else
14509
14510 cat >>confdefs.h <<_ACEOF
14511 #define off_t long int
14512 _ACEOF
14513
14514 fi
14515
14516 ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
14517 $ac_includes_default
14518 #ifdef HAVE_WINSOCK2_H
14519 #  include <winsock2.h>
14520 #endif
14521
14522 "
14523 if test "x$ac_cv_type_u_char" = xyes; then :
14524
14525 else
14526
14527 $as_echo "#define u_char unsigned char" >>confdefs.h
14528
14529 fi
14530
14531 ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
14532 $ac_includes_default
14533 #ifdef HAVE_SYS_RESOURCE_H
14534 #  include <sys/resource.h>
14535 #endif
14536
14537 "
14538 if test "x$ac_cv_type_rlim_t" = xyes; then :
14539
14540 else
14541
14542 $as_echo "#define rlim_t unsigned long" >>confdefs.h
14543
14544 fi
14545
14546
14547 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
14548 $ac_includes_default
14549 #ifdef HAVE_SYS_SOCKET_H
14550 #  include <sys/socket.h>
14551 #endif
14552 #ifdef HAVE_WS2TCPIP_H
14553 #  include <ws2tcpip.h>
14554 #endif
14555
14556 "
14557 if test "x$ac_cv_type_socklen_t" = xyes; then :
14558
14559 else
14560
14561 $as_echo "#define socklen_t int" >>confdefs.h
14562
14563 fi
14564
14565  ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
14566 $ac_includes_default
14567 #ifdef HAVE_SYS_TYPES_H
14568 # include <sys/types.h>
14569 #endif
14570 #ifdef HAVE_NETINET_IN_H
14571 # include <netinet/in.h>
14572 #endif
14573
14574 "
14575 if test "x$ac_cv_type_in_addr_t" = xyes; then :
14576
14577 else
14578
14579 $as_echo "#define in_addr_t uint32_t" >>confdefs.h
14580
14581 fi
14582
14583  ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
14584 $ac_includes_default
14585 #ifdef HAVE_SYS_TYPES_H
14586 # include <sys/types.h>
14587 #endif
14588 #ifdef HAVE_NETINET_IN_H
14589 # include <netinet/in.h>
14590 #endif
14591
14592 "
14593 if test "x$ac_cv_type_in_port_t" = xyes; then :
14594
14595 else
14596
14597 $as_echo "#define in_port_t uint16_t" >>confdefs.h
14598
14599 fi
14600
14601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
14602 $as_echo_n "checking if memcmp compares unsigned... " >&6; }
14603 if test "$cross_compiling" = yes; then :
14604    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
14605 $as_echo "cross-compile no" >&6; }
14606
14607 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14608
14609   case " $LIBOBJS " in
14610   *" memcmp.$ac_objext "* ) ;;
14611   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14612  ;;
14613 esac
14614
14615
14616 else
14617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14618 /* end confdefs.h.  */
14619
14620 #include <stdio.h>
14621 #include <stdlib.h>
14622 #include <string.h>
14623 int main(void)
14624 {
14625         char a = 255, b = 0;
14626         if(memcmp(&a, &b, 1) < 0)
14627                 return 1;
14628         return 0;
14629 }
14630
14631 _ACEOF
14632 if ac_fn_c_try_run "$LINENO"; then :
14633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14634 $as_echo "yes" >&6; }
14635 else
14636    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14637 $as_echo "no" >&6; }
14638
14639 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14640
14641   case " $LIBOBJS " in
14642   *" memcmp.$ac_objext "* ) ;;
14643   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14644  ;;
14645 esac
14646
14647
14648 fi
14649 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14650   conftest.$ac_objext conftest.beam conftest.$ac_ext
14651 fi
14652
14653
14654 # The cast to long int works around a bug in the HP C Compiler
14655 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14656 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14657 # This bug is HP SR number 8606223364.
14658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
14659 $as_echo_n "checking size of time_t... " >&6; }
14660 if ${ac_cv_sizeof_time_t+:} false; then :
14661   $as_echo_n "(cached) " >&6
14662 else
14663   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
14664 $ac_includes_default
14665 #ifdef TIME_WITH_SYS_TIME
14666 # include <sys/time.h>
14667 # include <time.h>
14668 #else
14669 # ifdef HAVE_SYS_TIME_H
14670 #  include <sys/time.h>
14671 # else
14672 #  include <time.h>
14673 # endif
14674 #endif
14675
14676 "; then :
14677
14678 else
14679   if test "$ac_cv_type_time_t" = yes; then
14680      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14681 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14682 as_fn_error 77 "cannot compute sizeof (time_t)
14683 See \`config.log' for more details" "$LINENO" 5; }
14684    else
14685      ac_cv_sizeof_time_t=0
14686    fi
14687 fi
14688
14689 fi
14690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
14691 $as_echo "$ac_cv_sizeof_time_t" >&6; }
14692
14693
14694
14695 cat >>confdefs.h <<_ACEOF
14696 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
14697 _ACEOF
14698
14699
14700
14701 # add option to disable the evil rpath
14702
14703 # Check whether --enable-rpath was given.
14704 if test "${enable_rpath+set}" = set; then :
14705   enableval=$enable_rpath; enable_rpath=$enableval
14706 else
14707   enable_rpath=yes
14708 fi
14709
14710 if test "x$enable_rpath" = xno; then
14711                 ac_config_commands="$ac_config_commands disable-rpath"
14712
14713 fi
14714
14715
14716
14717 # check to see if libraries are needed for these functions.
14718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
14719 $as_echo_n "checking for library containing inet_pton... " >&6; }
14720 if ${ac_cv_search_inet_pton+:} false; then :
14721   $as_echo_n "(cached) " >&6
14722 else
14723   ac_func_search_save_LIBS=$LIBS
14724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14725 /* end confdefs.h.  */
14726
14727 /* Override any GCC internal prototype to avoid an error.
14728    Use char because int might match the return type of a GCC
14729    builtin and then its argument prototype would still apply.  */
14730 #ifdef __cplusplus
14731 extern "C"
14732 #endif
14733 char inet_pton ();
14734 int
14735 main ()
14736 {
14737 return inet_pton ();
14738   ;
14739   return 0;
14740 }
14741 _ACEOF
14742 for ac_lib in '' nsl; do
14743   if test -z "$ac_lib"; then
14744     ac_res="none required"
14745   else
14746     ac_res=-l$ac_lib
14747     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14748   fi
14749   if ac_fn_c_try_link "$LINENO"; then :
14750   ac_cv_search_inet_pton=$ac_res
14751 fi
14752 rm -f core conftest.err conftest.$ac_objext \
14753     conftest$ac_exeext
14754   if ${ac_cv_search_inet_pton+:} false; then :
14755   break
14756 fi
14757 done
14758 if ${ac_cv_search_inet_pton+:} false; then :
14759
14760 else
14761   ac_cv_search_inet_pton=no
14762 fi
14763 rm conftest.$ac_ext
14764 LIBS=$ac_func_search_save_LIBS
14765 fi
14766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
14767 $as_echo "$ac_cv_search_inet_pton" >&6; }
14768 ac_res=$ac_cv_search_inet_pton
14769 if test "$ac_res" != no; then :
14770   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14771
14772 fi
14773
14774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
14775 $as_echo_n "checking for library containing socket... " >&6; }
14776 if ${ac_cv_search_socket+:} false; then :
14777   $as_echo_n "(cached) " >&6
14778 else
14779   ac_func_search_save_LIBS=$LIBS
14780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14781 /* end confdefs.h.  */
14782
14783 /* Override any GCC internal prototype to avoid an error.
14784    Use char because int might match the return type of a GCC
14785    builtin and then its argument prototype would still apply.  */
14786 #ifdef __cplusplus
14787 extern "C"
14788 #endif
14789 char socket ();
14790 int
14791 main ()
14792 {
14793 return socket ();
14794   ;
14795   return 0;
14796 }
14797 _ACEOF
14798 for ac_lib in '' socket; do
14799   if test -z "$ac_lib"; then
14800     ac_res="none required"
14801   else
14802     ac_res=-l$ac_lib
14803     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14804   fi
14805   if ac_fn_c_try_link "$LINENO"; then :
14806   ac_cv_search_socket=$ac_res
14807 fi
14808 rm -f core conftest.err conftest.$ac_objext \
14809     conftest$ac_exeext
14810   if ${ac_cv_search_socket+:} false; then :
14811   break
14812 fi
14813 done
14814 if ${ac_cv_search_socket+:} false; then :
14815
14816 else
14817   ac_cv_search_socket=no
14818 fi
14819 rm conftest.$ac_ext
14820 LIBS=$ac_func_search_save_LIBS
14821 fi
14822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
14823 $as_echo "$ac_cv_search_socket" >&6; }
14824 ac_res=$ac_cv_search_socket
14825 if test "$ac_res" != no; then :
14826   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14827
14828 fi
14829
14830
14831 # check wether strptime also works
14832
14833 # check some functions of the OS before linking libs (while still runnable).
14834 for ac_header in unistd.h
14835 do :
14836   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
14837 if test "x$ac_cv_header_unistd_h" = xyes; then :
14838   cat >>confdefs.h <<_ACEOF
14839 #define HAVE_UNISTD_H 1
14840 _ACEOF
14841
14842 fi
14843
14844 done
14845
14846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
14847 $as_echo_n "checking for working chown... " >&6; }
14848 if ${ac_cv_func_chown_works+:} false; then :
14849   $as_echo_n "(cached) " >&6
14850 else
14851   if test "$cross_compiling" = yes; then :
14852   ac_cv_func_chown_works=no
14853 else
14854   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14855 /* end confdefs.h.  */
14856 $ac_includes_default
14857 #include <fcntl.h>
14858
14859 int
14860 main ()
14861 {
14862   char *f = "conftest.chown";
14863   struct stat before, after;
14864
14865   if (creat (f, 0600) < 0)
14866     return 1;
14867   if (stat (f, &before) < 0)
14868     return 1;
14869   if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
14870     return 1;
14871   if (stat (f, &after) < 0)
14872     return 1;
14873   return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
14874
14875   ;
14876   return 0;
14877 }
14878 _ACEOF
14879 if ac_fn_c_try_run "$LINENO"; then :
14880   ac_cv_func_chown_works=yes
14881 else
14882   ac_cv_func_chown_works=no
14883 fi
14884 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14885   conftest.$ac_objext conftest.beam conftest.$ac_ext
14886 fi
14887
14888 rm -f conftest.chown
14889
14890 fi
14891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
14892 $as_echo "$ac_cv_func_chown_works" >&6; }
14893 if test $ac_cv_func_chown_works = yes; then
14894
14895 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
14896
14897 fi
14898
14899 for ac_header in vfork.h
14900 do :
14901   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
14902 if test "x$ac_cv_header_vfork_h" = xyes; then :
14903   cat >>confdefs.h <<_ACEOF
14904 #define HAVE_VFORK_H 1
14905 _ACEOF
14906
14907 fi
14908
14909 done
14910
14911 for ac_func in fork vfork
14912 do :
14913   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14914 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14915 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14916   cat >>confdefs.h <<_ACEOF
14917 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14918 _ACEOF
14919
14920 fi
14921 done
14922
14923 if test "x$ac_cv_func_fork" = xyes; then
14924   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
14925 $as_echo_n "checking for working fork... " >&6; }
14926 if ${ac_cv_func_fork_works+:} false; then :
14927   $as_echo_n "(cached) " >&6
14928 else
14929   if test "$cross_compiling" = yes; then :
14930   ac_cv_func_fork_works=cross
14931 else
14932   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14933 /* end confdefs.h.  */
14934 $ac_includes_default
14935 int
14936 main ()
14937 {
14938
14939           /* By Ruediger Kuhlmann. */
14940           return fork () < 0;
14941
14942   ;
14943   return 0;
14944 }
14945 _ACEOF
14946 if ac_fn_c_try_run "$LINENO"; then :
14947   ac_cv_func_fork_works=yes
14948 else
14949   ac_cv_func_fork_works=no
14950 fi
14951 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14952   conftest.$ac_objext conftest.beam conftest.$ac_ext
14953 fi
14954
14955 fi
14956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
14957 $as_echo "$ac_cv_func_fork_works" >&6; }
14958
14959 else
14960   ac_cv_func_fork_works=$ac_cv_func_fork
14961 fi
14962 if test "x$ac_cv_func_fork_works" = xcross; then
14963   case $host in
14964     *-*-amigaos* | *-*-msdosdjgpp*)
14965       # Override, as these systems have only a dummy fork() stub
14966       ac_cv_func_fork_works=no
14967       ;;
14968     *)
14969       ac_cv_func_fork_works=yes
14970       ;;
14971   esac
14972   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
14973 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
14974 fi
14975 ac_cv_func_vfork_works=$ac_cv_func_vfork
14976 if test "x$ac_cv_func_vfork" = xyes; then
14977   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
14978 $as_echo_n "checking for working vfork... " >&6; }
14979 if ${ac_cv_func_vfork_works+:} false; then :
14980   $as_echo_n "(cached) " >&6
14981 else
14982   if test "$cross_compiling" = yes; then :
14983   ac_cv_func_vfork_works=cross
14984 else
14985   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14986 /* end confdefs.h.  */
14987 /* Thanks to Paul Eggert for this test.  */
14988 $ac_includes_default
14989 #include <sys/wait.h>
14990 #ifdef HAVE_VFORK_H
14991 # include <vfork.h>
14992 #endif
14993 /* On some sparc systems, changes by the child to local and incoming
14994    argument registers are propagated back to the parent.  The compiler
14995    is told about this with #include <vfork.h>, but some compilers
14996    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
14997    static variable whose address is put into a register that is
14998    clobbered by the vfork.  */
14999 static void
15000 #ifdef __cplusplus
15001 sparc_address_test (int arg)
15002 # else
15003 sparc_address_test (arg) int arg;
15004 #endif
15005 {
15006   static pid_t child;
15007   if (!child) {
15008     child = vfork ();
15009     if (child < 0) {
15010       perror ("vfork");
15011       _exit(2);
15012     }
15013     if (!child) {
15014       arg = getpid();
15015       write(-1, "", 0);
15016       _exit (arg);
15017     }
15018   }
15019 }
15020
15021 int
15022 main ()
15023 {
15024   pid_t parent = getpid ();
15025   pid_t child;
15026
15027   sparc_address_test (0);
15028
15029   child = vfork ();
15030
15031   if (child == 0) {
15032     /* Here is another test for sparc vfork register problems.  This
15033        test uses lots of local variables, at least as many local
15034        variables as main has allocated so far including compiler
15035        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15036        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15037        reuse the register of parent for one of the local variables,
15038        since it will think that parent can't possibly be used any more
15039        in this routine.  Assigning to the local variable will thus
15040        munge parent in the parent process.  */
15041     pid_t
15042       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15043       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15044     /* Convince the compiler that p..p7 are live; otherwise, it might
15045        use the same hardware register for all 8 local variables.  */
15046     if (p != p1 || p != p2 || p != p3 || p != p4
15047         || p != p5 || p != p6 || p != p7)
15048       _exit(1);
15049
15050     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15051        from child file descriptors.  If the child closes a descriptor
15052        before it execs or exits, this munges the parent's descriptor
15053        as well.  Test for this by closing stdout in the child.  */
15054     _exit(close(fileno(stdout)) != 0);
15055   } else {
15056     int status;
15057     struct stat st;
15058
15059     while (wait(&status) != child)
15060       ;
15061     return (
15062          /* Was there some problem with vforking?  */
15063          child < 0
15064
15065          /* Did the child fail?  (This shouldn't happen.)  */
15066          || status
15067
15068          /* Did the vfork/compiler bug occur?  */
15069          || parent != getpid()
15070
15071          /* Did the file descriptor bug occur?  */
15072          || fstat(fileno(stdout), &st) != 0
15073          );
15074   }
15075 }
15076 _ACEOF
15077 if ac_fn_c_try_run "$LINENO"; then :
15078   ac_cv_func_vfork_works=yes
15079 else
15080   ac_cv_func_vfork_works=no
15081 fi
15082 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15083   conftest.$ac_objext conftest.beam conftest.$ac_ext
15084 fi
15085
15086 fi
15087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15088 $as_echo "$ac_cv_func_vfork_works" >&6; }
15089
15090 fi;
15091 if test "x$ac_cv_func_fork_works" = xcross; then
15092   ac_cv_func_vfork_works=$ac_cv_func_vfork
15093   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15094 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15095 fi
15096
15097 if test "x$ac_cv_func_vfork_works" = xyes; then
15098
15099 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15100
15101 else
15102
15103 $as_echo "#define vfork fork" >>confdefs.h
15104
15105 fi
15106 if test "x$ac_cv_func_fork_works" = xyes; then
15107
15108 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15109
15110 fi
15111
15112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
15113 $as_echo_n "checking return type of signal handlers... " >&6; }
15114 if ${ac_cv_type_signal+:} false; then :
15115   $as_echo_n "(cached) " >&6
15116 else
15117   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15118 /* end confdefs.h.  */
15119 #include <sys/types.h>
15120 #include <signal.h>
15121
15122 int
15123 main ()
15124 {
15125 return *(signal (0, 0)) (0) == 1;
15126   ;
15127   return 0;
15128 }
15129 _ACEOF
15130 if ac_fn_c_try_compile "$LINENO"; then :
15131   ac_cv_type_signal=int
15132 else
15133   ac_cv_type_signal=void
15134 fi
15135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15136 fi
15137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
15138 $as_echo "$ac_cv_type_signal" >&6; }
15139
15140 cat >>confdefs.h <<_ACEOF
15141 #define RETSIGTYPE $ac_cv_type_signal
15142 _ACEOF
15143
15144
15145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15146 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15147 if ${ac_cv_sys_largefile_source+:} false; then :
15148   $as_echo_n "(cached) " >&6
15149 else
15150   while :; do
15151   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15152 /* end confdefs.h.  */
15153 #include <sys/types.h> /* for off_t */
15154      #include <stdio.h>
15155 int
15156 main ()
15157 {
15158 int (*fp) (FILE *, off_t, int) = fseeko;
15159      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15160   ;
15161   return 0;
15162 }
15163 _ACEOF
15164 if ac_fn_c_try_link "$LINENO"; then :
15165   ac_cv_sys_largefile_source=no; break
15166 fi
15167 rm -f core conftest.err conftest.$ac_objext \
15168     conftest$ac_exeext conftest.$ac_ext
15169   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15170 /* end confdefs.h.  */
15171 #define _LARGEFILE_SOURCE 1
15172 #include <sys/types.h> /* for off_t */
15173      #include <stdio.h>
15174 int
15175 main ()
15176 {
15177 int (*fp) (FILE *, off_t, int) = fseeko;
15178      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15179   ;
15180   return 0;
15181 }
15182 _ACEOF
15183 if ac_fn_c_try_link "$LINENO"; then :
15184   ac_cv_sys_largefile_source=1; break
15185 fi
15186 rm -f core conftest.err conftest.$ac_objext \
15187     conftest$ac_exeext conftest.$ac_ext
15188   ac_cv_sys_largefile_source=unknown
15189   break
15190 done
15191 fi
15192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15193 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15194 case $ac_cv_sys_largefile_source in #(
15195   no | unknown) ;;
15196   *)
15197 cat >>confdefs.h <<_ACEOF
15198 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15199 _ACEOF
15200 ;;
15201 esac
15202 rm -rf conftest*
15203
15204 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15205 # in glibc 2.1.3, but that breaks too many other things.
15206 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15207 if test $ac_cv_sys_largefile_source != unknown; then
15208
15209 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15210
15211 fi
15212
15213
15214 # Check whether --enable-largefile was given.
15215 if test "${enable_largefile+set}" = set; then :
15216   enableval=$enable_largefile;
15217 fi
15218
15219 if test "$enable_largefile" != no; then
15220
15221   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15222 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15223 if ${ac_cv_sys_largefile_CC+:} false; then :
15224   $as_echo_n "(cached) " >&6
15225 else
15226   ac_cv_sys_largefile_CC=no
15227      if test "$GCC" != yes; then
15228        ac_save_CC=$CC
15229        while :; do
15230          # IRIX 6.2 and later do not support large files by default,
15231          # so use the C compiler's -n32 option if that helps.
15232          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15233 /* end confdefs.h.  */
15234 #include <sys/types.h>
15235  /* Check that off_t can represent 2**63 - 1 correctly.
15236     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15237     since some C++ compilers masquerading as C compilers
15238     incorrectly reject 9223372036854775807.  */
15239 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15240   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15241                        && LARGE_OFF_T % 2147483647 == 1)
15242                       ? 1 : -1];
15243 int
15244 main ()
15245 {
15246
15247   ;
15248   return 0;
15249 }
15250 _ACEOF
15251          if ac_fn_c_try_compile "$LINENO"; then :
15252   break
15253 fi
15254 rm -f core conftest.err conftest.$ac_objext
15255          CC="$CC -n32"
15256          if ac_fn_c_try_compile "$LINENO"; then :
15257   ac_cv_sys_largefile_CC=' -n32'; break
15258 fi
15259 rm -f core conftest.err conftest.$ac_objext
15260          break
15261        done
15262        CC=$ac_save_CC
15263        rm -f conftest.$ac_ext
15264     fi
15265 fi
15266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15267 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15268   if test "$ac_cv_sys_largefile_CC" != no; then
15269     CC=$CC$ac_cv_sys_largefile_CC
15270   fi
15271
15272   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15273 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15274 if ${ac_cv_sys_file_offset_bits+:} false; then :
15275   $as_echo_n "(cached) " >&6
15276 else
15277   while :; do
15278   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15279 /* end confdefs.h.  */
15280 #include <sys/types.h>
15281  /* Check that off_t can represent 2**63 - 1 correctly.
15282     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15283     since some C++ compilers masquerading as C compilers
15284     incorrectly reject 9223372036854775807.  */
15285 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15286   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15287                        && LARGE_OFF_T % 2147483647 == 1)
15288                       ? 1 : -1];
15289 int
15290 main ()
15291 {
15292
15293   ;
15294   return 0;
15295 }
15296 _ACEOF
15297 if ac_fn_c_try_compile "$LINENO"; then :
15298   ac_cv_sys_file_offset_bits=no; break
15299 fi
15300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15301   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15302 /* end confdefs.h.  */
15303 #define _FILE_OFFSET_BITS 64
15304 #include <sys/types.h>
15305  /* Check that off_t can represent 2**63 - 1 correctly.
15306     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15307     since some C++ compilers masquerading as C compilers
15308     incorrectly reject 9223372036854775807.  */
15309 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15310   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15311                        && LARGE_OFF_T % 2147483647 == 1)
15312                       ? 1 : -1];
15313 int
15314 main ()
15315 {
15316
15317   ;
15318   return 0;
15319 }
15320 _ACEOF
15321 if ac_fn_c_try_compile "$LINENO"; then :
15322   ac_cv_sys_file_offset_bits=64; break
15323 fi
15324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15325   ac_cv_sys_file_offset_bits=unknown
15326   break
15327 done
15328 fi
15329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15330 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15331 case $ac_cv_sys_file_offset_bits in #(
15332   no | unknown) ;;
15333   *)
15334 cat >>confdefs.h <<_ACEOF
15335 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15336 _ACEOF
15337 ;;
15338 esac
15339 rm -rf conftest*
15340   if test $ac_cv_sys_file_offset_bits = unknown; then
15341     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15342 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15343 if ${ac_cv_sys_large_files+:} false; then :
15344   $as_echo_n "(cached) " >&6
15345 else
15346   while :; do
15347   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15348 /* end confdefs.h.  */
15349 #include <sys/types.h>
15350  /* Check that off_t can represent 2**63 - 1 correctly.
15351     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15352     since some C++ compilers masquerading as C compilers
15353     incorrectly reject 9223372036854775807.  */
15354 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15355   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15356                        && LARGE_OFF_T % 2147483647 == 1)
15357                       ? 1 : -1];
15358 int
15359 main ()
15360 {
15361
15362   ;
15363   return 0;
15364 }
15365 _ACEOF
15366 if ac_fn_c_try_compile "$LINENO"; then :
15367   ac_cv_sys_large_files=no; break
15368 fi
15369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15371 /* end confdefs.h.  */
15372 #define _LARGE_FILES 1
15373 #include <sys/types.h>
15374  /* Check that off_t can represent 2**63 - 1 correctly.
15375     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15376     since some C++ compilers masquerading as C compilers
15377     incorrectly reject 9223372036854775807.  */
15378 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15379   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15380                        && LARGE_OFF_T % 2147483647 == 1)
15381                       ? 1 : -1];
15382 int
15383 main ()
15384 {
15385
15386   ;
15387   return 0;
15388 }
15389 _ACEOF
15390 if ac_fn_c_try_compile "$LINENO"; then :
15391   ac_cv_sys_large_files=1; break
15392 fi
15393 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15394   ac_cv_sys_large_files=unknown
15395   break
15396 done
15397 fi
15398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15399 $as_echo "$ac_cv_sys_large_files" >&6; }
15400 case $ac_cv_sys_large_files in #(
15401   no | unknown) ;;
15402   *)
15403 cat >>confdefs.h <<_ACEOF
15404 #define _LARGE_FILES $ac_cv_sys_large_files
15405 _ACEOF
15406 ;;
15407 esac
15408 rm -rf conftest*
15409   fi
15410
15411
15412 fi
15413
15414
15415
15416
15417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
15418 $as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
15419 cache=_D_LARGEFILE_SOURCE_1
15420 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
15421   $as_echo_n "(cached) " >&6
15422 else
15423
15424 echo '
15425 #include <stdio.h>
15426 int test() {
15427         int a = fseeko(stdin, 0, 0);
15428         return a;
15429 }
15430 ' > conftest.c
15431 echo 'void f(){}' >>conftest.c
15432 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
15433 eval "cv_prog_cc_flag_needed_$cache=no"
15434 else
15435
15436 if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
15437 eval "cv_prog_cc_flag_needed_$cache=yes"
15438 else
15439 eval "cv_prog_cc_flag_needed_$cache=fail"
15440 #echo 'Test with flag fails too!'
15441 #cat conftest.c
15442 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15443 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15444 #exit 1
15445 fi
15446
15447 fi
15448 rm -f conftest conftest.c conftest.o
15449
15450 fi
15451
15452 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
15453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15454 $as_echo "yes" >&6; }
15455 :
15456 CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
15457 else
15458 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
15459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15460 $as_echo "no" >&6; }
15461 #echo 'Test with flag is no!'
15462 #cat conftest.c
15463 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15464 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15465 #exit 1
15466 :
15467
15468 else
15469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15470 $as_echo "failed" >&6; }
15471 :
15472
15473 fi
15474 fi
15475
15476
15477
15478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
15479 $as_echo_n "checking if nonblocking sockets work... " >&6; }
15480 if echo $target | grep mingw32 >/dev/null; then
15481         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
15482 $as_echo "no (windows)" >&6; }
15483
15484 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15485
15486 else
15487 if test "$cross_compiling" = yes; then :
15488
15489         { $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
15490 $as_echo "crosscompile(yes)" >&6; }
15491
15492 else
15493   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15494 /* end confdefs.h.  */
15495
15496
15497 #include <stdio.h>
15498 #include <string.h>
15499 #include <stdlib.h>
15500 #include <fcntl.h>
15501 #include <errno.h>
15502 #ifdef HAVE_SYS_TYPES_H
15503 #include <sys/types.h>
15504 #endif
15505 #ifdef HAVE_SYS_SOCKET_H
15506 #include <sys/socket.h>
15507 #endif
15508 #ifdef HAVE_NETINET_IN_H
15509 #include <netinet/in.h>
15510 #endif
15511 #ifdef HAVE_ARPA_INET_H
15512 #include <arpa/inet.h>
15513 #endif
15514 #ifdef HAVE_UNISTD_H
15515 #include <unistd.h>
15516 #endif
15517 #ifdef HAVE_TIME_H
15518 #include <time.h>
15519 #endif
15520
15521 int main(void)
15522 {
15523         int port;
15524         int sfd, cfd;
15525         int num = 10;
15526         int i, p;
15527         struct sockaddr_in a;
15528         /* test if select and nonblocking reads work well together */
15529         /* open port.
15530            fork child to send 10 messages.
15531            select to read.
15532            then try to nonblocking read the 10 messages
15533            then, nonblocking read must give EAGAIN
15534         */
15535
15536         port = 12345 + (time(0)%32);
15537         sfd = socket(PF_INET, SOCK_DGRAM, 0);
15538         if(sfd == -1) {
15539                 perror("socket");
15540                 return 1;
15541         }
15542         memset(&a, 0, sizeof(a));
15543         a.sin_family = AF_INET;
15544         a.sin_port = htons(port);
15545         a.sin_addr.s_addr = inet_addr("127.0.0.1");
15546         if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15547                 perror("bind");
15548                 return 1;
15549         }
15550         if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
15551                 perror("fcntl");
15552                 return 1;
15553         }
15554
15555         cfd = socket(PF_INET, SOCK_DGRAM, 0);
15556         if(cfd == -1) {
15557                 perror("client socket");
15558                 return 1;
15559         }
15560         a.sin_port = 0;
15561         if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15562                 perror("client bind");
15563                 return 1;
15564         }
15565         a.sin_port = htons(port);
15566
15567         /* no handler, causes exit in 10 seconds */
15568         alarm(10);
15569
15570         /* send and receive on the socket */
15571         if((p=fork()) == 0) {
15572                 for(i=0; i<num; i++) {
15573                         if(sendto(cfd, &i, sizeof(i), 0,
15574                                 (struct sockaddr*)&a, sizeof(a)) < 0) {
15575                                 perror("sendto");
15576                                 return 1;
15577                         }
15578                 }
15579         } else {
15580                 /* parent */
15581                 fd_set rset;
15582                 int x;
15583                 if(p == -1) {
15584                         perror("fork");
15585                         return 1;
15586                 }
15587                 FD_ZERO(&rset);
15588                 FD_SET(sfd, &rset);
15589                 if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
15590                         perror("select");
15591                         return 1;
15592                 }
15593                 i = 0;
15594                 while(i < num) {
15595                         if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
15596                                 if(errno == EAGAIN)
15597                                         continue;
15598                                 perror("recv");
15599                                 return 1;
15600                         }
15601                         i++;
15602                 }
15603                 /* now we want to get EAGAIN: nonblocking goodness */
15604                 errno = 0;
15605                 recv(sfd, &x, sizeof(x), 0);
15606                 if(errno != EAGAIN) {
15607                         perror("trying to recv again");
15608                         return 1;
15609                 }
15610                 /* EAGAIN encountered */
15611         }
15612
15613         close(sfd);
15614         close(cfd);
15615         return 0;
15616 }
15617
15618 _ACEOF
15619 if ac_fn_c_try_run "$LINENO"; then :
15620
15621         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15622 $as_echo "yes" >&6; }
15623
15624 else
15625
15626         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15627 $as_echo "no" >&6; }
15628
15629 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15630
15631
15632 fi
15633 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15634   conftest.$ac_objext conftest.beam conftest.$ac_ext
15635 fi
15636
15637 fi
15638
15639
15640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
15641 $as_echo_n "checking whether mkdir has one arg... " >&6; }
15642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15643 /* end confdefs.h.  */
15644
15645 #include <stdio.h>
15646 #include <unistd.h>
15647 #ifdef HAVE_WINSOCK2_H
15648 #include <winsock2.h>
15649 #endif
15650 #ifdef HAVE_SYS_STAT_H
15651 #include <sys/stat.h>
15652 #endif
15653
15654 int
15655 main ()
15656 {
15657
15658         (void)mkdir("directory");
15659
15660   ;
15661   return 0;
15662 }
15663 _ACEOF
15664 if ac_fn_c_try_compile "$LINENO"; then :
15665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15666 $as_echo "yes" >&6; }
15667
15668 $as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
15669
15670
15671 else
15672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15673 $as_echo "no" >&6; }
15674
15675 fi
15676 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15677
15678 for ac_func in strptime
15679 do :
15680   ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
15681 if test "x$ac_cv_func_strptime" = xyes; then :
15682   cat >>confdefs.h <<_ACEOF
15683 #define HAVE_STRPTIME 1
15684 _ACEOF
15685
15686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
15687 $as_echo_n "checking whether strptime works... " >&6; }
15688 if test c${cross_compiling} = cno; then
15689 if test "$cross_compiling" = yes; then :
15690   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15691 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15692 as_fn_error $? "cannot run test program while cross compiling
15693 See \`config.log' for more details" "$LINENO" 5; }
15694 else
15695   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15696 /* end confdefs.h.  */
15697
15698 #define _XOPEN_SOURCE 600
15699 #include <time.h>
15700 int main(void) { struct tm tm; char *res;
15701 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);
15702 if (!res) return 2;
15703 res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
15704 if (!res) return 1; return 0; }
15705
15706 _ACEOF
15707 if ac_fn_c_try_run "$LINENO"; then :
15708   eval "ac_cv_c_strptime_works=yes"
15709 else
15710   eval "ac_cv_c_strptime_works=no"
15711 fi
15712 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15713   conftest.$ac_objext conftest.beam conftest.$ac_ext
15714 fi
15715
15716 else
15717 eval "ac_cv_c_strptime_works=maybe"
15718 fi
15719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
15720 $as_echo "$ac_cv_c_strptime_works" >&6; }
15721 if test $ac_cv_c_strptime_works = no; then
15722 case " $LIBOBJS " in
15723   *" strptime.$ac_objext "* ) ;;
15724   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15725  ;;
15726 esac
15727
15728 else
15729
15730 cat >>confdefs.h <<_ACEOF
15731 #define STRPTIME_WORKS 1
15732 _ACEOF
15733
15734 fi
15735
15736 else
15737   case " $LIBOBJS " in
15738   *" strptime.$ac_objext "* ) ;;
15739   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15740  ;;
15741 esac
15742
15743 fi
15744 done
15745
15746
15747 # set memory allocation checking if requested
15748 # Check whether --enable-alloc-checks was given.
15749 if test "${enable_alloc_checks+set}" = set; then :
15750   enableval=$enable_alloc_checks;
15751 fi
15752
15753 # Check whether --enable-alloc-lite was given.
15754 if test "${enable_alloc_lite+set}" = set; then :
15755   enableval=$enable_alloc_lite;
15756 fi
15757
15758 # Check whether --enable-alloc-nonregional was given.
15759 if test "${enable_alloc_nonregional+set}" = set; then :
15760   enableval=$enable_alloc_nonregional;
15761 fi
15762
15763 if test x_$enable_alloc_nonregional = x_yes; then
15764
15765 $as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
15766
15767 fi
15768 if test x_$enable_alloc_checks = x_yes; then
15769
15770 $as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
15771
15772 else
15773         if test x_$enable_alloc_lite = x_yes; then
15774
15775 $as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
15776
15777         else
15778
15779         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15780 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15781         if test "$cross_compiling" = yes; then :
15782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
15783 $as_echo "no (crosscompile)" >&6; }
15784         case " $LIBOBJS " in
15785   *" malloc.$ac_objext "* ) ;;
15786   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15787  ;;
15788 esac
15789
15790
15791 cat >>confdefs.h <<_ACEOF
15792 #define malloc rpl_malloc_unbound
15793 _ACEOF
15794
15795 else
15796   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15797 /* end confdefs.h.  */
15798 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
15799 #include <stdlib.h>
15800 #else
15801 char *malloc ();
15802 #endif
15803
15804 int
15805 main ()
15806 {
15807  if(malloc(0) != 0) return 1;
15808   ;
15809   return 0;
15810 }
15811
15812 _ACEOF
15813 if ac_fn_c_try_run "$LINENO"; then :
15814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15815 $as_echo "no" >&6; }
15816         case " $LIBOBJS " in
15817   *" malloc.$ac_objext "* ) ;;
15818   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15819  ;;
15820 esac
15821
15822
15823 cat >>confdefs.h <<_ACEOF
15824 #define malloc rpl_malloc_unbound
15825 _ACEOF
15826
15827 else
15828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15829 $as_echo "yes" >&6; }
15830
15831 $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
15832
15833 fi
15834 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15835   conftest.$ac_objext conftest.beam conftest.$ac_ext
15836 fi
15837
15838
15839         fi
15840 fi
15841
15842 # check windows threads (we use them, not pthreads, on windows).
15843 if test "$on_mingw" = "yes"; then
15844 # check windows threads
15845         for ac_header in windows.h
15846 do :
15847   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
15848 "
15849 if test "x$ac_cv_header_windows_h" = xyes; then :
15850   cat >>confdefs.h <<_ACEOF
15851 #define HAVE_WINDOWS_H 1
15852 _ACEOF
15853
15854 fi
15855
15856 done
15857
15858         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
15859 $as_echo_n "checking for CreateThread... " >&6; }
15860         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15861 /* end confdefs.h.  */
15862
15863 #ifdef HAVE_WINDOWS_H
15864 #include <windows.h>
15865 #endif
15866
15867 int
15868 main ()
15869 {
15870
15871         HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
15872
15873   ;
15874   return 0;
15875 }
15876 _ACEOF
15877 if ac_fn_c_try_compile "$LINENO"; then :
15878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15879 $as_echo "yes" >&6; }
15880
15881 $as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
15882
15883
15884 else
15885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15886 $as_echo "no" >&6; }
15887
15888 fi
15889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15890
15891 else
15892 # not on mingw, check thread libraries.
15893
15894 # check for thread library.
15895 # check this first, so that the pthread lib does not get linked in via
15896 # libssl or libpython, and thus distorts the tests, and we end up using
15897 # the non-threadsafe C libraries.
15898
15899 # Check whether --with-pthreads was given.
15900 if test "${with_pthreads+set}" = set; then :
15901   withval=$with_pthreads;
15902 else
15903    withval="yes"
15904 fi
15905
15906 ub_have_pthreads=no
15907 if test x_$withval != x_no; then
15908
15909
15910 ac_ext=c
15911 ac_cpp='$CPP $CPPFLAGS'
15912 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15913 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15914 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15915
15916 ax_pthread_ok=no
15917
15918 # We used to check for pthread.h first, but this fails if pthread.h
15919 # requires special compiler flags (e.g. on True64 or Sequent).
15920 # It gets checked for in the link test anyway.
15921
15922 # First of all, check if the user has set any of the PTHREAD_LIBS,
15923 # etcetera environment variables, and if threads linking works using
15924 # them:
15925 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
15926         save_CFLAGS="$CFLAGS"
15927         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
15928         save_LIBS="$LIBS"
15929         LIBS="$PTHREAD_LIBS $LIBS"
15930         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
15931 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
15932         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15933 /* end confdefs.h.  */
15934
15935 /* Override any GCC internal prototype to avoid an error.
15936    Use char because int might match the return type of a GCC
15937    builtin and then its argument prototype would still apply.  */
15938 #ifdef __cplusplus
15939 extern "C"
15940 #endif
15941 char pthread_join ();
15942 int
15943 main ()
15944 {
15945 return pthread_join ();
15946   ;
15947   return 0;
15948 }
15949 _ACEOF
15950 if ac_fn_c_try_link "$LINENO"; then :
15951   ax_pthread_ok=yes
15952 fi
15953 rm -f core conftest.err conftest.$ac_objext \
15954     conftest$ac_exeext conftest.$ac_ext
15955         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
15956 $as_echo "$ax_pthread_ok" >&6; }
15957         if test x"$ax_pthread_ok" = xno; then
15958                 PTHREAD_LIBS=""
15959                 PTHREAD_CFLAGS=""
15960         fi
15961         LIBS="$save_LIBS"
15962         CFLAGS="$save_CFLAGS"
15963 fi
15964
15965 # We must check for the threads library under a number of different
15966 # names; the ordering is very important because some systems
15967 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
15968 # libraries is broken (non-POSIX).
15969
15970 # Create a list of thread flags to try.  Items starting with a "-" are
15971 # C compiler flags, and other items are library names, except for "none"
15972 # which indicates that we try without any flags at all, and "pthread-config"
15973 # which is a program returning the flags for the Pth emulation library.
15974
15975 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
15976
15977 # The ordering *is* (sometimes) important.  Some notes on the
15978 # individual items follow:
15979
15980 # pthreads: AIX (must check this before -lpthread)
15981 # none: in case threads are in libc; should be tried before -Kthread and
15982 #       other compiler flags to prevent continual compiler warnings
15983 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
15984 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
15985 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
15986 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
15987 # -pthreads: Solaris/gcc
15988 # -mthreads: Mingw32/gcc, Lynx/gcc
15989 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
15990 #      doesn't hurt to check since this sometimes defines pthreads too;
15991 #      also defines -D_REENTRANT)
15992 #      ... -mt is also the pthreads flag for HP/aCC
15993 # pthread: Linux, etcetera
15994 # --thread-safe: KAI C++
15995 # pthread-config: use pthread-config program (for GNU Pth library)
15996
15997 case ${host_os} in
15998         solaris*)
15999
16000         # On Solaris (at least, for some versions), libc contains stubbed
16001         # (non-functional) versions of the pthreads routines, so link-based
16002         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
16003         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16004         # a function called by this macro, so we could check for that, but
16005         # who knows whether they'll stub that too in a future libc.)  So,
16006         # we'll just look for -pthreads and -lpthread first:
16007
16008         ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
16009         ;;
16010
16011         darwin*)
16012         ax_pthread_flags="-pthread $ax_pthread_flags"
16013         ;;
16014 esac
16015
16016 # Clang doesn't consider unrecognized options an error unless we specify
16017 # -Werror. We throw in some extra Clang-specific options to ensure that
16018 # this doesn't happen for GCC, which also accepts -Werror.
16019
16020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
16021 $as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
16022 save_CFLAGS="$CFLAGS"
16023 ax_pthread_extra_flags="-Werror"
16024 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
16025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16026 /* end confdefs.h.  */
16027 int foo(void);
16028 int
16029 main ()
16030 {
16031 foo()
16032   ;
16033   return 0;
16034 }
16035 _ACEOF
16036 if ac_fn_c_try_compile "$LINENO"; then :
16037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16038 $as_echo "yes" >&6; }
16039 else
16040   ax_pthread_extra_flags=
16041                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16042 $as_echo "no" >&6; }
16043 fi
16044 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16045 CFLAGS="$save_CFLAGS"
16046
16047 if test x"$ax_pthread_ok" = xno; then
16048 for flag in $ax_pthread_flags; do
16049
16050         case $flag in
16051                 none)
16052                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
16053 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
16054                 ;;
16055
16056                 -*)
16057                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
16058 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
16059                 PTHREAD_CFLAGS="$flag"
16060                 ;;
16061
16062                 pthread-config)
16063                 # Extract the first word of "pthread-config", so it can be a program name with args.
16064 set dummy pthread-config; ac_word=$2
16065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16066 $as_echo_n "checking for $ac_word... " >&6; }
16067 if ${ac_cv_prog_ax_pthread_config+:} false; then :
16068   $as_echo_n "(cached) " >&6
16069 else
16070   if test -n "$ax_pthread_config"; then
16071   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
16072 else
16073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16074 for as_dir in $PATH
16075 do
16076   IFS=$as_save_IFS
16077   test -z "$as_dir" && as_dir=.
16078     for ac_exec_ext in '' $ac_executable_extensions; do
16079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16080     ac_cv_prog_ax_pthread_config="yes"
16081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16082     break 2
16083   fi
16084 done
16085   done
16086 IFS=$as_save_IFS
16087
16088   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
16089 fi
16090 fi
16091 ax_pthread_config=$ac_cv_prog_ax_pthread_config
16092 if test -n "$ax_pthread_config"; then
16093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
16094 $as_echo "$ax_pthread_config" >&6; }
16095 else
16096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16097 $as_echo "no" >&6; }
16098 fi
16099
16100
16101                 if test x"$ax_pthread_config" = xno; then continue; fi
16102                 PTHREAD_CFLAGS="`pthread-config --cflags`"
16103                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16104                 ;;
16105
16106                 *)
16107                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
16108 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
16109                 PTHREAD_LIBS="-l$flag"
16110                 ;;
16111         esac
16112
16113         save_LIBS="$LIBS"
16114         save_CFLAGS="$CFLAGS"
16115         LIBS="$PTHREAD_LIBS $LIBS"
16116         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
16117
16118         # Check for various functions.  We must include pthread.h,
16119         # since some functions may be macros.  (On the Sequent, we
16120         # need a special flag -Kthread to make this header compile.)
16121         # We check for pthread_join because it is in -lpthread on IRIX
16122         # while pthread_create is in libc.  We check for pthread_attr_init
16123         # due to DEC craziness with -lpthreads.  We check for
16124         # pthread_cleanup_push because it is one of the few pthread
16125         # functions on Solaris that doesn't have a non-functional libc stub.
16126         # We try pthread_create on general principles.
16127         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16128 /* end confdefs.h.  */
16129 #include <pthread.h>
16130                         static void routine(void *a) { *((int*)a) = 0; }
16131                         static void *start_routine(void *a) { return a; }
16132 int
16133 main ()
16134 {
16135 pthread_t th; pthread_attr_t attr;
16136                         pthread_create(&th, 0, start_routine, 0);
16137                         pthread_join(th, 0);
16138                         pthread_attr_init(&attr);
16139                         pthread_cleanup_push(routine, 0);
16140                         pthread_cleanup_pop(0) /* ; */
16141   ;
16142   return 0;
16143 }
16144 _ACEOF
16145 if ac_fn_c_try_link "$LINENO"; then :
16146   ax_pthread_ok=yes
16147 fi
16148 rm -f core conftest.err conftest.$ac_objext \
16149     conftest$ac_exeext conftest.$ac_ext
16150
16151         LIBS="$save_LIBS"
16152         CFLAGS="$save_CFLAGS"
16153
16154         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16155 $as_echo "$ax_pthread_ok" >&6; }
16156         if test "x$ax_pthread_ok" = xyes; then
16157                 break;
16158         fi
16159
16160         PTHREAD_LIBS=""
16161         PTHREAD_CFLAGS=""
16162 done
16163 fi
16164
16165 # Various other checks:
16166 if test "x$ax_pthread_ok" = xyes; then
16167         save_LIBS="$LIBS"
16168         LIBS="$PTHREAD_LIBS $LIBS"
16169         save_CFLAGS="$CFLAGS"
16170         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16171
16172         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
16173         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
16174 $as_echo_n "checking for joinable pthread attribute... " >&6; }
16175         attr_name=unknown
16176         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
16177             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16178 /* end confdefs.h.  */
16179 #include <pthread.h>
16180 int
16181 main ()
16182 {
16183 int attr = $attr; return attr /* ; */
16184   ;
16185   return 0;
16186 }
16187 _ACEOF
16188 if ac_fn_c_try_link "$LINENO"; then :
16189   attr_name=$attr; break
16190 fi
16191 rm -f core conftest.err conftest.$ac_objext \
16192     conftest$ac_exeext conftest.$ac_ext
16193         done
16194         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
16195 $as_echo "$attr_name" >&6; }
16196         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
16197
16198 cat >>confdefs.h <<_ACEOF
16199 #define PTHREAD_CREATE_JOINABLE $attr_name
16200 _ACEOF
16201
16202         fi
16203
16204         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
16205 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
16206         flag=no
16207         case ${host_os} in
16208             aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
16209             osf* | hpux*) flag="-D_REENTRANT";;
16210             solaris*)
16211             if test "$GCC" = "yes"; then
16212                 flag="-D_REENTRANT"
16213             else
16214                 # TODO: What about Clang on Solaris?
16215                 flag="-mt -D_REENTRANT"
16216             fi
16217             ;;
16218         esac
16219         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
16220 $as_echo "$flag" >&6; }
16221         if test "x$flag" != xno; then
16222             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16223         fi
16224
16225         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
16226 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
16227 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
16228   $as_echo_n "(cached) " >&6
16229 else
16230
16231                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16232 /* end confdefs.h.  */
16233 #include <pthread.h>
16234 int
16235 main ()
16236 {
16237 int i = PTHREAD_PRIO_INHERIT;
16238   ;
16239   return 0;
16240 }
16241 _ACEOF
16242 if ac_fn_c_try_link "$LINENO"; then :
16243   ax_cv_PTHREAD_PRIO_INHERIT=yes
16244 else
16245   ax_cv_PTHREAD_PRIO_INHERIT=no
16246 fi
16247 rm -f core conftest.err conftest.$ac_objext \
16248     conftest$ac_exeext conftest.$ac_ext
16249
16250 fi
16251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
16252 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
16253         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
16254
16255 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
16256
16257 fi
16258
16259         LIBS="$save_LIBS"
16260         CFLAGS="$save_CFLAGS"
16261
16262         # More AIX lossage: compile with *_r variant
16263         if test "x$GCC" != xyes; then
16264             case $host_os in
16265                 aix*)
16266                 case "x/$CC" in #(
16267   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
16268     #handle absolute path differently from PATH based program lookup
16269                    case "x$CC" in #(
16270   x/*) :
16271     if as_fn_executable_p ${CC}_r; then :
16272   PTHREAD_CC="${CC}_r"
16273 fi ;; #(
16274   *) :
16275     for ac_prog in ${CC}_r
16276 do
16277   # Extract the first word of "$ac_prog", so it can be a program name with args.
16278 set dummy $ac_prog; ac_word=$2
16279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16280 $as_echo_n "checking for $ac_word... " >&6; }
16281 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
16282   $as_echo_n "(cached) " >&6
16283 else
16284   if test -n "$PTHREAD_CC"; then
16285   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16286 else
16287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16288 for as_dir in $PATH
16289 do
16290   IFS=$as_save_IFS
16291   test -z "$as_dir" && as_dir=.
16292     for ac_exec_ext in '' $ac_executable_extensions; do
16293   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16294     ac_cv_prog_PTHREAD_CC="$ac_prog"
16295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16296     break 2
16297   fi
16298 done
16299   done
16300 IFS=$as_save_IFS
16301
16302 fi
16303 fi
16304 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16305 if test -n "$PTHREAD_CC"; then
16306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
16307 $as_echo "$PTHREAD_CC" >&6; }
16308 else
16309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16310 $as_echo "no" >&6; }
16311 fi
16312
16313
16314   test -n "$PTHREAD_CC" && break
16315 done
16316 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16317  ;;
16318 esac ;; #(
16319   *) :
16320      ;;
16321 esac
16322                 ;;
16323             esac
16324         fi
16325 fi
16326
16327 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16328
16329
16330
16331
16332
16333 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16334 if test x"$ax_pthread_ok" = xyes; then
16335
16336
16337 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
16338
16339                 LIBS="$PTHREAD_LIBS $LIBS"
16340                 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16341                 CC="$PTHREAD_CC"
16342                 ub_have_pthreads=yes
16343                 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
16344 "
16345 if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
16346
16347 cat >>confdefs.h <<_ACEOF
16348 #define HAVE_PTHREAD_SPINLOCK_T 1
16349 _ACEOF
16350
16351
16352 fi
16353 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
16354 "
16355 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
16356
16357 cat >>confdefs.h <<_ACEOF
16358 #define HAVE_PTHREAD_RWLOCK_T 1
16359 _ACEOF
16360
16361
16362 fi
16363
16364
16365                 if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
16366                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
16367 $as_echo_n "checking if -pthread unused during linking... " >&6; }
16368                 # catch clang warning 'argument unused during compilation'
16369                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16370 /* end confdefs.h.  */
16371 $ac_includes_default
16372
16373 int main(void) {return 0;}
16374
16375 _ACEOF
16376                 pthread_unused="yes"
16377                 # first compile
16378                 echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
16379                 $CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
16380                 if test $? = 0; then
16381                         # then link
16382                         echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
16383                         $CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
16384                         if test $? -ne 0; then
16385                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16386 $as_echo "yes" >&6; }
16387                                 CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
16388                                 PTHREAD_CFLAGS_ONLY="-pthread"
16389
16390                         else
16391                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16392 $as_echo "no" >&6; }
16393                         fi
16394                 else
16395                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16396 $as_echo "no" >&6; }
16397                 fi # endif cc successful
16398                 rm -f conftest conftest.c conftest.o
16399                 fi # endif -pthread in CFLAGS
16400
16401
16402         :
16403 else
16404         ax_pthread_ok=no
16405
16406 fi
16407 ac_ext=c
16408 ac_cpp='$CPP $CPPFLAGS'
16409 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16410 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16411 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16412
16413
16414 fi
16415
16416 # check solaris thread library
16417
16418 # Check whether --with-solaris-threads was given.
16419 if test "${with_solaris_threads+set}" = set; then :
16420   withval=$with_solaris_threads;
16421 else
16422    withval="no"
16423 fi
16424
16425 ub_have_sol_threads=no
16426 if test x_$withval != x_no; then
16427         if test x_$ub_have_pthreads != x_no; then
16428             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
16429 $as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
16430         else
16431         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
16432 $as_echo_n "checking for library containing thr_create... " >&6; }
16433 if ${ac_cv_search_thr_create+:} false; then :
16434   $as_echo_n "(cached) " >&6
16435 else
16436   ac_func_search_save_LIBS=$LIBS
16437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16438 /* end confdefs.h.  */
16439
16440 /* Override any GCC internal prototype to avoid an error.
16441    Use char because int might match the return type of a GCC
16442    builtin and then its argument prototype would still apply.  */
16443 #ifdef __cplusplus
16444 extern "C"
16445 #endif
16446 char thr_create ();
16447 int
16448 main ()
16449 {
16450 return thr_create ();
16451   ;
16452   return 0;
16453 }
16454 _ACEOF
16455 for ac_lib in '' thread; do
16456   if test -z "$ac_lib"; then
16457     ac_res="none required"
16458   else
16459     ac_res=-l$ac_lib
16460     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16461   fi
16462   if ac_fn_c_try_link "$LINENO"; then :
16463   ac_cv_search_thr_create=$ac_res
16464 fi
16465 rm -f core conftest.err conftest.$ac_objext \
16466     conftest$ac_exeext
16467   if ${ac_cv_search_thr_create+:} false; then :
16468   break
16469 fi
16470 done
16471 if ${ac_cv_search_thr_create+:} false; then :
16472
16473 else
16474   ac_cv_search_thr_create=no
16475 fi
16476 rm conftest.$ac_ext
16477 LIBS=$ac_func_search_save_LIBS
16478 fi
16479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
16480 $as_echo "$ac_cv_search_thr_create" >&6; }
16481 ac_res=$ac_cv_search_thr_create
16482 if test "$ac_res" != no; then :
16483   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16484
16485
16486 $as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
16487
16488
16489
16490
16491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
16492 $as_echo_n "checking whether $CC supports -mt... " >&6; }
16493 cache=`echo mt | sed 'y%.=/+-%___p_%'`
16494 if eval \${cv_prog_cc_flag_$cache+:} false; then :
16495   $as_echo_n "(cached) " >&6
16496 else
16497
16498 echo 'void f(void){}' >conftest.c
16499 if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
16500 eval "cv_prog_cc_flag_$cache=yes"
16501 else
16502 eval "cv_prog_cc_flag_$cache=no"
16503 fi
16504 rm -f conftest conftest.o conftest.c
16505
16506 fi
16507
16508 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
16509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16510 $as_echo "yes" >&6; }
16511 :
16512 CFLAGS="$CFLAGS -mt"
16513 else
16514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16515 $as_echo "no" >&6; }
16516 :
16517 CFLAGS="$CFLAGS -D_REENTRANT"
16518 fi
16519
16520                 ub_have_sol_threads=yes
16521
16522 else
16523
16524                 as_fn_error $? "no solaris threads found." "$LINENO" 5
16525
16526 fi
16527
16528         fi
16529 fi
16530
16531 fi # end of non-mingw check of thread libraries
16532
16533 # Check for PyUnbound
16534
16535 # Check whether --with-pyunbound was given.
16536 if test "${with_pyunbound+set}" = set; then :
16537   withval=$with_pyunbound;
16538 else
16539    withval="no"
16540 fi
16541
16542
16543 ub_test_python=no
16544 ub_with_pyunbound=no
16545 if test x_$withval != x_no; then
16546    ub_with_pyunbound=yes
16547    ub_test_python=yes
16548 fi
16549
16550 # Check for Python module
16551
16552 # Check whether --with-pythonmodule was given.
16553 if test "${with_pythonmodule+set}" = set; then :
16554   withval=$with_pythonmodule;
16555 else
16556    withval="no"
16557 fi
16558
16559
16560 ub_with_pythonmod=no
16561 if test x_$withval != x_no; then
16562    ub_with_pythonmod=yes
16563    ub_test_python=yes
16564 fi
16565
16566 # Check for Python & SWIG only on PyUnbound or PyModule
16567 if test x_$ub_test_python != x_no; then
16568
16569    # Check for Python
16570    ub_have_python=no
16571    ac_save_LIBS="$LIBS"
16572         #
16573         # Allow the use of a (user set) custom python version
16574         #
16575
16576
16577         # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
16578 set dummy python$PYTHON_VERSION; ac_word=$2
16579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16580 $as_echo_n "checking for $ac_word... " >&6; }
16581 if ${ac_cv_path_PYTHON+:} false; then :
16582   $as_echo_n "(cached) " >&6
16583 else
16584   case $PYTHON in
16585   [\\/]* | ?:[\\/]*)
16586   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
16587   ;;
16588   *)
16589   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16590 for as_dir in $PATH
16591 do
16592   IFS=$as_save_IFS
16593   test -z "$as_dir" && as_dir=.
16594     for ac_exec_ext in '' $ac_executable_extensions; do
16595   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16596     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
16597     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16598     break 2
16599   fi
16600 done
16601   done
16602 IFS=$as_save_IFS
16603
16604   ;;
16605 esac
16606 fi
16607 PYTHON=$ac_cv_path_PYTHON
16608 if test -n "$PYTHON"; then
16609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
16610 $as_echo "$PYTHON" >&6; }
16611 else
16612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16613 $as_echo "no" >&6; }
16614 fi
16615
16616
16617         if test -z "$PYTHON"; then
16618            as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
16619            PYTHON_VERSION=""
16620         fi
16621
16622         if test -z "$PYTHON_VERSION"; then
16623                 PYTHON_VERSION=`$PYTHON -c "import sys; \
16624                         print(sys.version.split()[0])"`
16625         fi
16626
16627         #
16628         # Check if you have distutils, else fail
16629         #
16630         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
16631 $as_echo_n "checking for the distutils Python package... " >&6; }
16632         ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
16633         if test -z "$ac_distutils_result"; then
16634                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16635 $as_echo "yes" >&6; }
16636         else
16637                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16638 $as_echo "no" >&6; }
16639                 as_fn_error $? "cannot import Python module \"distutils\".
16640 Please check your Python installation. The error was:
16641 $ac_distutils_result" "$LINENO" 5
16642                 PYTHON_VERSION=""
16643         fi
16644
16645         #
16646         # Check for Python include path
16647         #
16648         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
16649 $as_echo_n "checking for Python include path... " >&6; }
16650         if test -z "$PYTHON_CPPFLAGS"; then
16651                 python_path=`$PYTHON -c "import distutils.sysconfig; \
16652                         print(distutils.sysconfig.get_python_inc());"`
16653                 if test -n "${python_path}"; then
16654                         python_path="-I$python_path"
16655                 fi
16656                 PYTHON_CPPFLAGS=$python_path
16657         fi
16658         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
16659 $as_echo "$PYTHON_CPPFLAGS" >&6; }
16660
16661
16662         #
16663         # Check for Python library path
16664         #
16665         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
16666 $as_echo_n "checking for Python library path... " >&6; }
16667         if test -z "$PYTHON_LDFLAGS"; then
16668                 PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
16669                         print(get_config_var('BLDLIBRARY'));"`
16670         fi
16671         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
16672 $as_echo "$PYTHON_LDFLAGS" >&6; }
16673
16674
16675         #
16676         # Check for site packages
16677         #
16678         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
16679 $as_echo_n "checking for Python site-packages path... " >&6; }
16680         if test -z "$PYTHON_SITE_PKG"; then
16681                 PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
16682                         print(distutils.sysconfig.get_python_lib(1,0));"`
16683         fi
16684         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
16685 $as_echo "$PYTHON_SITE_PKG" >&6; }
16686
16687
16688         #
16689         # final check to see if everything compiles alright
16690         #
16691         { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
16692 $as_echo_n "checking consistency of all components of python development environment... " >&6; }
16693         ac_ext=c
16694 ac_cpp='$CPP $CPPFLAGS'
16695 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16696 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16697 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16698
16699         # save current global flags
16700         ac_save_LIBS="$LIBS"
16701         ac_save_CPPFLAGS="$CPPFLAGS"
16702
16703         LIBS="$LIBS $PYTHON_LDFLAGS"
16704         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16705         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16706 /* end confdefs.h.  */
16707
16708                 #include <Python.h>
16709
16710 int
16711 main ()
16712 {
16713
16714                 Py_Initialize();
16715
16716   ;
16717   return 0;
16718 }
16719 _ACEOF
16720 if ac_fn_c_try_link "$LINENO"; then :
16721   pythonexists=yes
16722 else
16723   pythonexists=no
16724 fi
16725 rm -f core conftest.err conftest.$ac_objext \
16726     conftest$ac_exeext conftest.$ac_ext
16727
16728         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
16729 $as_echo "$pythonexists" >&6; }
16730
16731         if test ! "$pythonexists" = "yes"; then
16732            as_fn_error $? "
16733   Could not link test program to Python. Maybe the main Python library has been
16734   installed in some non-standard library path. If so, pass it to configure,
16735   via the LDFLAGS environment variable.
16736   Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
16737   ============================================================================
16738    ERROR!
16739    You probably have to install the development version of the Python package
16740    for your distribution.  The exact name of this package varies among them.
16741   ============================================================================
16742            " "$LINENO" 5
16743           PYTHON_VERSION=""
16744         fi
16745         ac_ext=c
16746 ac_cpp='$CPP $CPPFLAGS'
16747 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16748 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16749 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16750
16751         # turn back to default flags
16752         CPPFLAGS="$ac_save_CPPFLAGS"
16753         LIBS="$ac_save_LIBS"
16754
16755         #
16756         # all done!
16757         #
16758
16759    if test ! -z "$PYTHON_VERSION"; then
16760         if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
16761                 as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
16762         fi
16763
16764       PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
16765
16766       # Have Python
16767
16768 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
16769
16770       LIBS="$PYTHON_LDFLAGS $LIBS"
16771       CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16772       ub_have_python=yes
16773
16774       # Check for SWIG
16775       ub_have_swig=no
16776
16777         # Extract the first word of "swig", so it can be a program name with args.
16778 set dummy swig; ac_word=$2
16779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16780 $as_echo_n "checking for $ac_word... " >&6; }
16781 if ${ac_cv_path_SWIG+:} false; then :
16782   $as_echo_n "(cached) " >&6
16783 else
16784   case $SWIG in
16785   [\\/]* | ?:[\\/]*)
16786   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
16787   ;;
16788   *)
16789   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16790 for as_dir in $PATH
16791 do
16792   IFS=$as_save_IFS
16793   test -z "$as_dir" && as_dir=.
16794     for ac_exec_ext in '' $ac_executable_extensions; do
16795   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16796     ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
16797     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16798     break 2
16799   fi
16800 done
16801   done
16802 IFS=$as_save_IFS
16803
16804   ;;
16805 esac
16806 fi
16807 SWIG=$ac_cv_path_SWIG
16808 if test -n "$SWIG"; then
16809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
16810 $as_echo "$SWIG" >&6; }
16811 else
16812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16813 $as_echo "no" >&6; }
16814 fi
16815
16816
16817         if test -z "$SWIG" ; then
16818                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
16819 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
16820                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
16821         elif test -n "" ; then
16822                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
16823 $as_echo_n "checking for SWIG version... " >&6; }
16824                 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'`
16825                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
16826 $as_echo "$swig_version" >&6; }
16827                 if test -n "$swig_version" ; then
16828                         # Calculate the required version number components
16829                         required=
16830                         required_major=`echo $required | sed 's/[^0-9].*//'`
16831                         if test -z "$required_major" ; then
16832                                 required_major=0
16833                         fi
16834                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
16835                         required_minor=`echo $required | sed 's/[^0-9].*//'`
16836                         if test -z "$required_minor" ; then
16837                                 required_minor=0
16838                         fi
16839                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
16840                         required_patch=`echo $required | sed 's/[^0-9].*//'`
16841                         if test -z "$required_patch" ; then
16842                                 required_patch=0
16843                         fi
16844                         # Calculate the available version number components
16845                         available=$swig_version
16846                         available_major=`echo $available | sed 's/[^0-9].*//'`
16847                         if test -z "$available_major" ; then
16848                                 available_major=0
16849                         fi
16850                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
16851                         available_minor=`echo $available | sed 's/[^0-9].*//'`
16852                         if test -z "$available_minor" ; then
16853                                 available_minor=0
16854                         fi
16855                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
16856                         available_patch=`echo $available | sed 's/[^0-9].*//'`
16857                         if test -z "$available_patch" ; then
16858                                 available_patch=0
16859                         fi
16860                         if test $available_major -ne $required_major \
16861                                 -o $available_minor -ne $required_minor \
16862                                 -o $available_patch -lt $required_patch ; then
16863                                 { $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
16864 $as_echo "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
16865                                 SWIG='echo "Error: SWIG version >=  is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
16866                         else
16867                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
16868 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
16869                                 SWIG_LIB=`$SWIG -swiglib`
16870                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
16871 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
16872                         fi
16873                 else
16874                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
16875 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
16876                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
16877                 fi
16878         fi
16879
16880
16881       { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
16882 $as_echo_n "checking SWIG... " >&6; }
16883       if test ! -x "$SWIG"; then
16884          as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
16885       else
16886
16887 $as_echo "#define HAVE_SWIG 1" >>confdefs.h
16888
16889          swig="$SWIG"
16890
16891          { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
16892 $as_echo "present" >&6; }
16893
16894          # If have Python & SWIG
16895          # Declare PythonMod
16896          if test x_$ub_with_pythonmod != x_no; then
16897
16898 $as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
16899
16900             WITH_PYTHONMODULE=yes
16901
16902             PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
16903
16904             PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
16905
16906             PYTHONMOD_INSTALL=pythonmod-install
16907
16908             PYTHONMOD_UNINSTALL=pythonmod-uninstall
16909
16910          fi
16911
16912          # Declare PyUnbound
16913          if test x_$ub_with_pyunbound != x_no; then
16914
16915 $as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
16916
16917             WITH_PYUNBOUND=yes
16918
16919             PYUNBOUND_OBJ="libunbound_wrap.lo"
16920
16921             PYUNBOUND_TARGET="_unbound.la"
16922
16923             PYUNBOUND_INSTALL=pyunbound-install
16924
16925             PYUNBOUND_UNINSTALL=pyunbound-uninstall
16926
16927          fi
16928       fi
16929    else
16930       { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
16931 $as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
16932       ub_with_pyunbound=no
16933       ub_with_pythonmod=no
16934    fi
16935 fi
16936
16937 if test "`uname`" = "NetBSD"; then
16938         NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
16939
16940 fi
16941 CONFIG_DATE=`date +%Y%m%d`
16942
16943
16944 # Checks for libraries.
16945
16946 # libnss
16947 USE_NSS="no"
16948
16949 # Check whether --with-nss was given.
16950 if test "${with_nss+set}" = set; then :
16951   withval=$with_nss;
16952         USE_NSS="yes"
16953
16954 $as_echo "#define HAVE_NSS 1" >>confdefs.h
16955
16956         if test "$withval" != "" -a "$withval" != "yes"; then
16957                 CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
16958                 LDFLAGS="$LDFLAGS -L$withval/lib"
16959
16960         if test "x$enable_rpath" = xyes; then
16961                 if echo "$withval/lib" | grep "^/" >/dev/null; then
16962                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
16963                 fi
16964         fi
16965
16966                 CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
16967         else
16968                 CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
16969                 CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
16970         fi
16971         LIBS="$LIBS -lnss3 -lnspr4"
16972         SSLLIB=""
16973
16974
16975 fi
16976
16977
16978 # libnettle
16979 USE_NETTLE="no"
16980
16981 # Check whether --with-nettle was given.
16982 if test "${with_nettle+set}" = set; then :
16983   withval=$with_nettle;
16984         USE_NETTLE="yes"
16985
16986 $as_echo "#define HAVE_NETTLE 1" >>confdefs.h
16987
16988         if test "$withval" != "" -a "$withval" != "yes"; then
16989                 CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
16990                 LDFLAGS="$LDFLAGS -L$withval/lib"
16991
16992         if test "x$enable_rpath" = xyes; then
16993                 if echo "$withval/lib" | grep "^/" >/dev/null; then
16994                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
16995                 fi
16996         fi
16997
16998         else
16999                 CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
17000         fi
17001         LIBS="$LIBS -lhogweed -lnettle -lgmp"
17002         SSLLIB=""
17003
17004
17005 fi
17006
17007
17008 # openssl
17009 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17010
17011
17012 # Check whether --with-ssl was given.
17013 if test "${with_ssl+set}" = set; then :
17014   withval=$with_ssl;
17015
17016 else
17017
17018             withval="yes"
17019
17020 fi
17021
17022     if test x_$withval = x_no; then
17023         as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
17024     fi
17025
17026     withval=$withval
17027     if test x_$withval != x_no; then
17028         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
17029 $as_echo_n "checking for SSL... " >&6; }
17030         if test x_$withval = x_ -o x_$withval = x_yes; then
17031             withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
17032         fi
17033         for dir in $withval; do
17034             ssldir="$dir"
17035             if test -f "$dir/include/openssl/ssl.h"; then
17036                 found_ssl="yes"
17037
17038 cat >>confdefs.h <<_ACEOF
17039 #define HAVE_SSL /**/
17040 _ACEOF
17041
17042                                 if test "$ssldir" != "/usr"; then
17043                         CPPFLAGS="$CPPFLAGS -I$ssldir/include"
17044                         LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
17045                 fi
17046                 break;
17047             fi
17048         done
17049         if test x_$found_ssl != x_yes; then
17050             as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
17051         else
17052             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
17053 $as_echo "found in $ssldir" >&6; }
17054             HAVE_SSL=yes
17055                         if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
17056                 LDFLAGS="$LDFLAGS -L$ssldir/lib"
17057                 LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
17058
17059         if test "x$enable_rpath" = xyes; then
17060                 if echo "$ssldir/lib" | grep "^/" >/dev/null; then
17061                         RUNTIME_PATH="$RUNTIME_PATH -R$ssldir/lib"
17062                 fi
17063         fi
17064
17065             fi
17066
17067             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_CTX_init in -lcrypto" >&5
17068 $as_echo_n "checking for HMAC_CTX_init in -lcrypto... " >&6; }
17069             LIBS="$LIBS -lcrypto"
17070             LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
17071             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17072 /* end confdefs.h.  */
17073
17074 int
17075 main ()
17076 {
17077
17078                 int HMAC_CTX_init(void);
17079                 (void)HMAC_CTX_init();
17080
17081   ;
17082   return 0;
17083 }
17084 _ACEOF
17085 if ac_fn_c_try_link "$LINENO"; then :
17086
17087                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17088 $as_echo "yes" >&6; }
17089
17090 $as_echo "#define HAVE_HMAC_CTX_INIT 1" >>confdefs.h
17091
17092
17093 else
17094
17095                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17096 $as_echo "no" >&6; }
17097                 # check if -lwsock32 or -lgdi32 are needed.
17098                 BAKLIBS="$LIBS"
17099                 BAKSSLLIBS="$LIBSSL_LIBS"
17100                 LIBS="$LIBS -lgdi32"
17101                 LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32"
17102                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
17103 $as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
17104                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17105 /* end confdefs.h.  */
17106
17107 int
17108 main ()
17109 {
17110
17111                     int HMAC_CTX_init(void);
17112                     (void)HMAC_CTX_init();
17113
17114   ;
17115   return 0;
17116 }
17117 _ACEOF
17118 if ac_fn_c_try_link "$LINENO"; then :
17119
17120
17121 $as_echo "#define HAVE_HMAC_CTX_INIT 1" >>confdefs.h
17122
17123                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17124 $as_echo "yes" >&6; }
17125
17126 else
17127
17128                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17129 $as_echo "no" >&6; }
17130                     LIBS="$BAKLIBS"
17131                     LIBSSL_LIBS="$BAKSSLLIBS"
17132                     LIBS="$LIBS -ldl"
17133                     LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
17134                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
17135 $as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
17136                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17137 /* end confdefs.h.  */
17138
17139 int
17140 main ()
17141 {
17142
17143                         int HMAC_CTX_init(void);
17144                         (void)HMAC_CTX_init();
17145
17146   ;
17147   return 0;
17148 }
17149 _ACEOF
17150 if ac_fn_c_try_link "$LINENO"; then :
17151
17152
17153 $as_echo "#define HAVE_HMAC_CTX_INIT 1" >>confdefs.h
17154
17155                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17156 $as_echo "yes" >&6; }
17157
17158 else
17159
17160                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17161 $as_echo "no" >&6; }
17162                     as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
17163
17164 fi
17165 rm -f core conftest.err conftest.$ac_objext \
17166     conftest$ac_exeext conftest.$ac_ext
17167
17168 fi
17169 rm -f core conftest.err conftest.$ac_objext \
17170     conftest$ac_exeext conftest.$ac_ext
17171
17172 fi
17173 rm -f core conftest.err conftest.$ac_objext \
17174     conftest$ac_exeext conftest.$ac_ext
17175         fi
17176
17177
17178     fi
17179 for ac_header in openssl/ssl.h
17180 do :
17181   ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
17182 "
17183 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
17184   cat >>confdefs.h <<_ACEOF
17185 #define HAVE_OPENSSL_SSL_H 1
17186 _ACEOF
17187
17188 fi
17189
17190 done
17191
17192 for ac_header in openssl/err.h
17193 do :
17194   ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
17195 "
17196 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
17197   cat >>confdefs.h <<_ACEOF
17198 #define HAVE_OPENSSL_ERR_H 1
17199 _ACEOF
17200
17201 fi
17202
17203 done
17204
17205 for ac_header in openssl/rand.h
17206 do :
17207   ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
17208 "
17209 if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
17210   cat >>confdefs.h <<_ACEOF
17211 #define HAVE_OPENSSL_RAND_H 1
17212 _ACEOF
17213
17214 fi
17215
17216 done
17217
17218
17219
17220
17221 # check if libssl needs libdl
17222 BAKLIBS="$LIBS"
17223 LIBS="-lssl $LIBS"
17224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
17225 $as_echo_n "checking if libssl needs libdl... " >&6; }
17226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17227 /* end confdefs.h.  */
17228
17229 /* Override any GCC internal prototype to avoid an error.
17230    Use char because int might match the return type of a GCC
17231    builtin and then its argument prototype would still apply.  */
17232 #ifdef __cplusplus
17233 extern "C"
17234 #endif
17235 char SSL_CTX_new ();
17236 int
17237 main ()
17238 {
17239 return SSL_CTX_new ();
17240   ;
17241   return 0;
17242 }
17243 _ACEOF
17244 if ac_fn_c_try_link "$LINENO"; then :
17245
17246         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17247 $as_echo "no" >&6; }
17248         LIBS="$BAKLIBS"
17249
17250 else
17251
17252         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17253 $as_echo "yes" >&6; }
17254         LIBS="$BAKLIBS"
17255         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17256 $as_echo_n "checking for library containing dlopen... " >&6; }
17257 if ${ac_cv_search_dlopen+:} false; then :
17258   $as_echo_n "(cached) " >&6
17259 else
17260   ac_func_search_save_LIBS=$LIBS
17261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17262 /* end confdefs.h.  */
17263
17264 /* Override any GCC internal prototype to avoid an error.
17265    Use char because int might match the return type of a GCC
17266    builtin and then its argument prototype would still apply.  */
17267 #ifdef __cplusplus
17268 extern "C"
17269 #endif
17270 char dlopen ();
17271 int
17272 main ()
17273 {
17274 return dlopen ();
17275   ;
17276   return 0;
17277 }
17278 _ACEOF
17279 for ac_lib in '' dl; do
17280   if test -z "$ac_lib"; then
17281     ac_res="none required"
17282   else
17283     ac_res=-l$ac_lib
17284     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17285   fi
17286   if ac_fn_c_try_link "$LINENO"; then :
17287   ac_cv_search_dlopen=$ac_res
17288 fi
17289 rm -f core conftest.err conftest.$ac_objext \
17290     conftest$ac_exeext
17291   if ${ac_cv_search_dlopen+:} false; then :
17292   break
17293 fi
17294 done
17295 if ${ac_cv_search_dlopen+:} false; then :
17296
17297 else
17298   ac_cv_search_dlopen=no
17299 fi
17300 rm conftest.$ac_ext
17301 LIBS=$ac_func_search_save_LIBS
17302 fi
17303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17304 $as_echo "$ac_cv_search_dlopen" >&6; }
17305 ac_res=$ac_cv_search_dlopen
17306 if test "$ac_res" != no; then :
17307   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17308
17309 fi
17310
17311
17312 fi
17313 rm -f core conftest.err conftest.$ac_objext \
17314     conftest$ac_exeext conftest.$ac_ext
17315 SSLLIB="-lssl"
17316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
17317 $as_echo_n "checking for LibreSSL... " >&6; }
17318 if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
17319         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17320 $as_echo "yes" >&6; }
17321
17322 $as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
17323
17324         # libressl provides these compat functions, but they may also be
17325         # declared by the OS in libc.  See if they have been declared.
17326         ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
17327 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
17328   ac_have_decl=1
17329 else
17330   ac_have_decl=0
17331 fi
17332
17333 cat >>confdefs.h <<_ACEOF
17334 #define HAVE_DECL_STRLCPY $ac_have_decl
17335 _ACEOF
17336 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
17337 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
17338   ac_have_decl=1
17339 else
17340   ac_have_decl=0
17341 fi
17342
17343 cat >>confdefs.h <<_ACEOF
17344 #define HAVE_DECL_STRLCAT $ac_have_decl
17345 _ACEOF
17346 ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
17347 if test "x$ac_cv_have_decl_arc4random" = xyes; then :
17348   ac_have_decl=1
17349 else
17350   ac_have_decl=0
17351 fi
17352
17353 cat >>confdefs.h <<_ACEOF
17354 #define HAVE_DECL_ARC4RANDOM $ac_have_decl
17355 _ACEOF
17356 ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
17357 if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
17358   ac_have_decl=1
17359 else
17360   ac_have_decl=0
17361 fi
17362
17363 cat >>confdefs.h <<_ACEOF
17364 #define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
17365 _ACEOF
17366 ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
17367 if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
17368   ac_have_decl=1
17369 else
17370   ac_have_decl=0
17371 fi
17372
17373 cat >>confdefs.h <<_ACEOF
17374 #define HAVE_DECL_REALLOCARRAY $ac_have_decl
17375 _ACEOF
17376
17377 else
17378         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17379 $as_echo "no" >&6; }
17380 fi
17381 for ac_header in openssl/conf.h
17382 do :
17383   ac_fn_c_check_header_compile "$LINENO" "openssl/conf.h" "ac_cv_header_openssl_conf_h" "$ac_includes_default
17384 "
17385 if test "x$ac_cv_header_openssl_conf_h" = xyes; then :
17386   cat >>confdefs.h <<_ACEOF
17387 #define HAVE_OPENSSL_CONF_H 1
17388 _ACEOF
17389
17390 fi
17391
17392 done
17393
17394 for ac_header in openssl/engine.h
17395 do :
17396   ac_fn_c_check_header_compile "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default
17397 "
17398 if test "x$ac_cv_header_openssl_engine_h" = xyes; then :
17399   cat >>confdefs.h <<_ACEOF
17400 #define HAVE_OPENSSL_ENGINE_H 1
17401 _ACEOF
17402
17403 fi
17404
17405 done
17406
17407 for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode
17408 do :
17409   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17410 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17411 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17412   cat >>confdefs.h <<_ACEOF
17413 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17414 _ACEOF
17415
17416 fi
17417 done
17418
17419 ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
17420 $ac_includes_default
17421 #ifdef HAVE_OPENSSL_ERR_H
17422 #include <openssl/err.h>
17423 #endif
17424
17425 #ifdef HAVE_OPENSSL_RAND_H
17426 #include <openssl/rand.h>
17427 #endif
17428
17429 #ifdef HAVE_OPENSSL_CONF_H
17430 #include <openssl/conf.h>
17431 #endif
17432
17433 #ifdef HAVE_OPENSSL_ENGINE_H
17434 #include <openssl/engine.h>
17435 #endif
17436 #include <openssl/ssl.h>
17437 #include <openssl/evp.h>
17438
17439 "
17440 if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
17441   ac_have_decl=1
17442 else
17443   ac_have_decl=0
17444 fi
17445
17446 cat >>confdefs.h <<_ACEOF
17447 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
17448 _ACEOF
17449 ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
17450 $ac_includes_default
17451 #ifdef HAVE_OPENSSL_ERR_H
17452 #include <openssl/err.h>
17453 #endif
17454
17455 #ifdef HAVE_OPENSSL_RAND_H
17456 #include <openssl/rand.h>
17457 #endif
17458
17459 #ifdef HAVE_OPENSSL_CONF_H
17460 #include <openssl/conf.h>
17461 #endif
17462
17463 #ifdef HAVE_OPENSSL_ENGINE_H
17464 #include <openssl/engine.h>
17465 #endif
17466 #include <openssl/ssl.h>
17467 #include <openssl/evp.h>
17468
17469 "
17470 if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
17471   ac_have_decl=1
17472 else
17473   ac_have_decl=0
17474 fi
17475
17476 cat >>confdefs.h <<_ACEOF
17477 #define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
17478 _ACEOF
17479 ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
17480 $ac_includes_default
17481 #ifdef HAVE_OPENSSL_ERR_H
17482 #include <openssl/err.h>
17483 #endif
17484
17485 #ifdef HAVE_OPENSSL_RAND_H
17486 #include <openssl/rand.h>
17487 #endif
17488
17489 #ifdef HAVE_OPENSSL_CONF_H
17490 #include <openssl/conf.h>
17491 #endif
17492
17493 #ifdef HAVE_OPENSSL_ENGINE_H
17494 #include <openssl/engine.h>
17495 #endif
17496 #include <openssl/ssl.h>
17497 #include <openssl/evp.h>
17498
17499 "
17500 if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
17501   ac_have_decl=1
17502 else
17503   ac_have_decl=0
17504 fi
17505
17506 cat >>confdefs.h <<_ACEOF
17507 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
17508 _ACEOF
17509
17510 fi
17511
17512
17513
17514 # Check whether --enable-sha2 was given.
17515 if test "${enable_sha2+set}" = set; then :
17516   enableval=$enable_sha2;
17517 fi
17518
17519 case "$enable_sha2" in
17520         no)
17521         ;;
17522         yes|*)
17523
17524 $as_echo "#define USE_SHA2 1" >>confdefs.h
17525
17526         ;;
17527 esac
17528
17529 # check wether gost also works
17530
17531 # Check whether --enable-gost was given.
17532 if test "${enable_gost+set}" = set; then :
17533   enableval=$enable_gost;
17534 fi
17535
17536 use_gost="no"
17537 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17538 case "$enable_gost" in
17539         no)
17540         ;;
17541         *)
17542         ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
17543 if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
17544   :
17545 else
17546   as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
17547 fi
17548
17549         ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
17550 if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
17551
17552 else
17553   as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
17554 fi
17555
17556
17557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
17558 $as_echo_n "checking if GOST works... " >&6; }
17559 if test c${cross_compiling} = cno; then
17560 BAKCFLAGS="$CFLAGS"
17561 if test -n "$ssldir"; then
17562         CFLAGS="$CFLAGS -Wl,-rpath,$ssldir/lib"
17563 fi
17564 if test "$cross_compiling" = yes; then :
17565   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17566 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17567 as_fn_error $? "cannot run test program while cross compiling
17568 See \`config.log' for more details" "$LINENO" 5; }
17569 else
17570   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17571 /* end confdefs.h.  */
17572
17573 #include <string.h>
17574 #include <openssl/ssl.h>
17575 #include <openssl/evp.h>
17576 #include <openssl/engine.h>
17577 #include <openssl/conf.h>
17578 /* routine to load gost (from sldns) */
17579 int load_gost_id(void)
17580 {
17581         static int gost_id = 0;
17582         const EVP_PKEY_ASN1_METHOD* meth;
17583         ENGINE* e;
17584
17585         if(gost_id) return gost_id;
17586
17587         /* see if configuration loaded gost implementation from other engine*/
17588         meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
17589         if(meth) {
17590                 EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
17591                 return gost_id;
17592         }
17593
17594         /* see if engine can be loaded already */
17595         e = ENGINE_by_id("gost");
17596         if(!e) {
17597                 /* load it ourself, in case statically linked */
17598                 ENGINE_load_builtin_engines();
17599                 ENGINE_load_dynamic();
17600                 e = ENGINE_by_id("gost");
17601         }
17602         if(!e) {
17603                 /* no gost engine in openssl */
17604                 return 0;
17605         }
17606         if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
17607                 ENGINE_finish(e);
17608                 ENGINE_free(e);
17609                 return 0;
17610         }
17611
17612         meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
17613         if(!meth) {
17614                 /* algo not found */
17615                 ENGINE_finish(e);
17616                 ENGINE_free(e);
17617                 return 0;
17618         }
17619         EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
17620         return gost_id;
17621 }
17622 int main(void) {
17623         EVP_MD_CTX* ctx;
17624         const EVP_MD* md;
17625         unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
17626         const char* str = "Hello world";
17627         const unsigned char check[] = {
17628                 0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
17629                 0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
17630                 0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
17631                 0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
17632         };
17633         OPENSSL_config(NULL);
17634         (void)load_gost_id();
17635         md = EVP_get_digestbyname("md_gost94");
17636         if(!md) return 1;
17637         memset(digest, 0, sizeof(digest));
17638         ctx = EVP_MD_CTX_create();
17639         if(!ctx) return 2;
17640         if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
17641         if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
17642         if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
17643         /* uncomment to see the hash calculated.
17644                 {int i;
17645                 for(i=0; i<32; i++)
17646                         printf(" %2.2x", (int)digest[i]);
17647                 printf("\n");}
17648         */
17649         if(memcmp(digest, check, sizeof(check)) != 0)
17650                 return 6;
17651         return 0;
17652 }
17653
17654 _ACEOF
17655 if ac_fn_c_try_run "$LINENO"; then :
17656   eval "ac_cv_c_gost_works=yes"
17657 else
17658   eval "ac_cv_c_gost_works=no"
17659 fi
17660 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17661   conftest.$ac_objext conftest.beam conftest.$ac_ext
17662 fi
17663
17664 CFLAGS="$BAKCFLAGS"
17665 else
17666 eval "ac_cv_c_gost_works=maybe"
17667 fi
17668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
17669 $as_echo "$ac_cv_c_gost_works" >&6; }
17670
17671         if test "$ac_cv_c_gost_works" != no; then
17672                 use_gost="yes"
17673
17674 $as_echo "#define USE_GOST 1" >>confdefs.h
17675
17676         fi
17677         ;;
17678 esac
17679 fi
17680 # Check whether --enable-ecdsa was given.
17681 if test "${enable_ecdsa+set}" = set; then :
17682   enableval=$enable_ecdsa;
17683 fi
17684
17685 use_ecdsa="no"
17686 case "$enable_ecdsa" in
17687     no)
17688       ;;
17689     *)
17690       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17691               ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
17692 if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
17693
17694 else
17695   as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17696 fi
17697
17698               ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
17699 if test "x$ac_cv_func_SHA384_Init" = xyes; then :
17700
17701 else
17702   as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17703 fi
17704
17705               ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
17706 #include <openssl/evp.h>
17707
17708 "
17709 if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
17710   ac_have_decl=1
17711 else
17712   ac_have_decl=0
17713 fi
17714
17715 cat >>confdefs.h <<_ACEOF
17716 #define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
17717 _ACEOF
17718 if test $ac_have_decl = 1; then :
17719
17720 else
17721   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17722 fi
17723 ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
17724 #include <openssl/evp.h>
17725
17726 "
17727 if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
17728   ac_have_decl=1
17729 else
17730   ac_have_decl=0
17731 fi
17732
17733 cat >>confdefs.h <<_ACEOF
17734 #define HAVE_DECL_NID_SECP384R1 $ac_have_decl
17735 _ACEOF
17736 if test $ac_have_decl = 1; then :
17737
17738 else
17739   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17740 fi
17741
17742               # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
17743               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
17744 $as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
17745               if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
17746                 if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
17747                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17748 $as_echo "no" >&6; }
17749
17750 cat >>confdefs.h <<_ACEOF
17751 #define USE_ECDSA_EVP_WORKAROUND 1
17752 _ACEOF
17753
17754                 else
17755                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17756 $as_echo "yes" >&6; }
17757                 fi
17758               else
17759                 # not OpenSSL, thus likely LibreSSL, which supports it
17760                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17761 $as_echo "yes" >&6; }
17762               fi
17763       fi
17764       # we now know we have ECDSA and the required curves.
17765
17766 cat >>confdefs.h <<_ACEOF
17767 #define USE_ECDSA 1
17768 _ACEOF
17769
17770       use_ecdsa="yes"
17771       ;;
17772 esac
17773
17774 # Check whether --enable-event-api was given.
17775 if test "${enable_event_api+set}" = set; then :
17776   enableval=$enable_event_api;
17777 fi
17778
17779 use_unbound_event="no"
17780 case "$enable_event_api" in
17781     yes)
17782       use_unbound_event="yes"
17783       ;;
17784     *)
17785       ;;
17786 esac
17787
17788 # check for libevent
17789
17790 # Check whether --with-libevent was given.
17791 if test "${with_libevent+set}" = set; then :
17792   withval=$with_libevent;
17793 else
17794    withval="no"
17795 fi
17796
17797 if test x_$withval = x_yes -o x_$withval != x_no; then
17798         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
17799 $as_echo_n "checking for libevent... " >&6; }
17800         if test x_$withval = x_ -o x_$withval = x_yes; then
17801             withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
17802         fi
17803         for dir in $withval; do
17804             thedir="$dir"
17805             if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
17806                 found_libevent="yes"
17807                                 if test "$thedir" != "/usr"; then
17808                     CPPFLAGS="$CPPFLAGS -I$thedir/include"
17809                 fi
17810                 break;
17811             fi
17812         done
17813         if test x_$found_libevent != x_yes; then
17814                 if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
17815                         # libevent source directory
17816                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
17817 $as_echo "found in $thedir" >&6; }
17818                         CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
17819                         BAK_LDFLAGS_SET="1"
17820                         BAK_LDFLAGS="$LDFLAGS"
17821                         # remove evdns from linking
17822                         mkdir build >/dev/null 2>&1
17823                         mkdir build/libevent >/dev/null 2>&1
17824                         mkdir build/libevent/.libs >/dev/null 2>&1
17825                         ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
17826                         ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
17827                         ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
17828                         cp $ev_files_o build/libevent
17829                         cp $ev_files_lo build/libevent
17830                         cp $ev_files_libso build/libevent/.libs
17831                         LATE_LDFLAGS="build/libevent/*.lo -lm"
17832                         LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
17833                 else
17834                         as_fn_error $? "Cannot find the libevent library in $withval
17835 You can restart ./configure --with-libevent=no to use a builtin alternative.
17836 Please note that this alternative is not as capable as libevent when using
17837 large outgoing port ranges.  " "$LINENO" 5
17838                 fi
17839         else
17840             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
17841 $as_echo "found in $thedir" >&6; }
17842                     if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
17843                     LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
17844
17845         if test "x$enable_rpath" = xyes; then
17846                 if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
17847                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
17848                 fi
17849         fi
17850
17851             else
17852                                     if test "$thedir" != "/usr" -a "$thedir" != ""; then
17853                         LDFLAGS="$LDFLAGS -L$thedir/lib"
17854
17855         if test "x$enable_rpath" = xyes; then
17856                 if echo "$thedir/lib" | grep "^/" >/dev/null; then
17857                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
17858                 fi
17859         fi
17860
17861                     fi
17862             fi
17863         fi
17864         # check for library used by libevent after 1.3c
17865         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17866 $as_echo_n "checking for library containing clock_gettime... " >&6; }
17867 if ${ac_cv_search_clock_gettime+:} false; then :
17868   $as_echo_n "(cached) " >&6
17869 else
17870   ac_func_search_save_LIBS=$LIBS
17871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17872 /* end confdefs.h.  */
17873
17874 /* Override any GCC internal prototype to avoid an error.
17875    Use char because int might match the return type of a GCC
17876    builtin and then its argument prototype would still apply.  */
17877 #ifdef __cplusplus
17878 extern "C"
17879 #endif
17880 char clock_gettime ();
17881 int
17882 main ()
17883 {
17884 return clock_gettime ();
17885   ;
17886   return 0;
17887 }
17888 _ACEOF
17889 for ac_lib in '' rt; do
17890   if test -z "$ac_lib"; then
17891     ac_res="none required"
17892   else
17893     ac_res=-l$ac_lib
17894     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17895   fi
17896   if ac_fn_c_try_link "$LINENO"; then :
17897   ac_cv_search_clock_gettime=$ac_res
17898 fi
17899 rm -f core conftest.err conftest.$ac_objext \
17900     conftest$ac_exeext
17901   if ${ac_cv_search_clock_gettime+:} false; then :
17902   break
17903 fi
17904 done
17905 if ${ac_cv_search_clock_gettime+:} false; then :
17906
17907 else
17908   ac_cv_search_clock_gettime=no
17909 fi
17910 rm conftest.$ac_ext
17911 LIBS=$ac_func_search_save_LIBS
17912 fi
17913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
17914 $as_echo "$ac_cv_search_clock_gettime" >&6; }
17915 ac_res=$ac_cv_search_clock_gettime
17916 if test "$ac_res" != no; then :
17917   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17918
17919 fi
17920
17921
17922         # is the event.h header libev or libevent?
17923         for ac_header in event.h
17924 do :
17925   ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
17926 "
17927 if test "x$ac_cv_header_event_h" = xyes; then :
17928   cat >>confdefs.h <<_ACEOF
17929 #define HAVE_EVENT_H 1
17930 _ACEOF
17931
17932 fi
17933
17934 done
17935
17936         ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
17937 #include <event.h>
17938
17939 "
17940 if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
17941
17942                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
17943 $as_echo_n "checking for library containing event_set... " >&6; }
17944 if ${ac_cv_search_event_set+:} false; then :
17945   $as_echo_n "(cached) " >&6
17946 else
17947   ac_func_search_save_LIBS=$LIBS
17948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17949 /* end confdefs.h.  */
17950
17951 /* Override any GCC internal prototype to avoid an error.
17952    Use char because int might match the return type of a GCC
17953    builtin and then its argument prototype would still apply.  */
17954 #ifdef __cplusplus
17955 extern "C"
17956 #endif
17957 char event_set ();
17958 int
17959 main ()
17960 {
17961 return event_set ();
17962   ;
17963   return 0;
17964 }
17965 _ACEOF
17966 for ac_lib in '' ev; do
17967   if test -z "$ac_lib"; then
17968     ac_res="none required"
17969   else
17970     ac_res=-l$ac_lib
17971     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17972   fi
17973   if ac_fn_c_try_link "$LINENO"; then :
17974   ac_cv_search_event_set=$ac_res
17975 fi
17976 rm -f core conftest.err conftest.$ac_objext \
17977     conftest$ac_exeext
17978   if ${ac_cv_search_event_set+:} false; then :
17979   break
17980 fi
17981 done
17982 if ${ac_cv_search_event_set+:} false; then :
17983
17984 else
17985   ac_cv_search_event_set=no
17986 fi
17987 rm conftest.$ac_ext
17988 LIBS=$ac_func_search_save_LIBS
17989 fi
17990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
17991 $as_echo "$ac_cv_search_event_set" >&6; }
17992 ac_res=$ac_cv_search_event_set
17993 if test "$ac_res" != no; then :
17994   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17995
17996 fi
17997
17998
17999 else
18000
18001                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
18002 $as_echo_n "checking for library containing event_set... " >&6; }
18003 if ${ac_cv_search_event_set+:} false; then :
18004   $as_echo_n "(cached) " >&6
18005 else
18006   ac_func_search_save_LIBS=$LIBS
18007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18008 /* end confdefs.h.  */
18009
18010 /* Override any GCC internal prototype to avoid an error.
18011    Use char because int might match the return type of a GCC
18012    builtin and then its argument prototype would still apply.  */
18013 #ifdef __cplusplus
18014 extern "C"
18015 #endif
18016 char event_set ();
18017 int
18018 main ()
18019 {
18020 return event_set ();
18021   ;
18022   return 0;
18023 }
18024 _ACEOF
18025 for ac_lib in '' event; do
18026   if test -z "$ac_lib"; then
18027     ac_res="none required"
18028   else
18029     ac_res=-l$ac_lib
18030     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18031   fi
18032   if ac_fn_c_try_link "$LINENO"; then :
18033   ac_cv_search_event_set=$ac_res
18034 fi
18035 rm -f core conftest.err conftest.$ac_objext \
18036     conftest$ac_exeext
18037   if ${ac_cv_search_event_set+:} false; then :
18038   break
18039 fi
18040 done
18041 if ${ac_cv_search_event_set+:} false; then :
18042
18043 else
18044   ac_cv_search_event_set=no
18045 fi
18046 rm conftest.$ac_ext
18047 LIBS=$ac_func_search_save_LIBS
18048 fi
18049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
18050 $as_echo "$ac_cv_search_event_set" >&6; }
18051 ac_res=$ac_cv_search_event_set
18052 if test "$ac_res" != no; then :
18053   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18054
18055 fi
18056
18057
18058 fi
18059
18060         for ac_func in event_base_free
18061 do :
18062   ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
18063 if test "x$ac_cv_func_event_base_free" = xyes; then :
18064   cat >>confdefs.h <<_ACEOF
18065 #define HAVE_EVENT_BASE_FREE 1
18066 _ACEOF
18067
18068 fi
18069 done
18070  # only in libevent 1.2 and later
18071         for ac_func in event_base_once
18072 do :
18073   ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
18074 if test "x$ac_cv_func_event_base_once" = xyes; then :
18075   cat >>confdefs.h <<_ACEOF
18076 #define HAVE_EVENT_BASE_ONCE 1
18077 _ACEOF
18078
18079 fi
18080 done
18081  # only in libevent 1.4.1 and later
18082         for ac_func in event_base_new
18083 do :
18084   ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
18085 if test "x$ac_cv_func_event_base_new" = xyes; then :
18086   cat >>confdefs.h <<_ACEOF
18087 #define HAVE_EVENT_BASE_NEW 1
18088 _ACEOF
18089
18090 fi
18091 done
18092  # only in libevent 1.4.1 and later
18093         for ac_func in event_base_get_method
18094 do :
18095   ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
18096 if test "x$ac_cv_func_event_base_get_method" = xyes; then :
18097   cat >>confdefs.h <<_ACEOF
18098 #define HAVE_EVENT_BASE_GET_METHOD 1
18099 _ACEOF
18100
18101 fi
18102 done
18103  # only in libevent 1.4.3 and later
18104         for ac_func in ev_loop
18105 do :
18106   ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
18107 if test "x$ac_cv_func_ev_loop" = xyes; then :
18108   cat >>confdefs.h <<_ACEOF
18109 #define HAVE_EV_LOOP 1
18110 _ACEOF
18111
18112 fi
18113 done
18114  # only in libev. (tested on 3.51)
18115         for ac_func in ev_default_loop
18116 do :
18117   ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
18118 if test "x$ac_cv_func_ev_default_loop" = xyes; then :
18119   cat >>confdefs.h <<_ACEOF
18120 #define HAVE_EV_DEFAULT_LOOP 1
18121 _ACEOF
18122
18123 fi
18124 done
18125  # only in libev. (tested on 4.00)
18126         if test -n "$BAK_LDFLAGS_SET"; then
18127                 LDFLAGS="$BAK_LDFLAGS"
18128         fi
18129         if test "$use_unbound_event" = "yes"; then
18130                 UNBOUND_EVENT_INSTALL=unbound-event-install
18131
18132                 UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
18133
18134         fi
18135 else
18136
18137 $as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
18138
18139 fi
18140
18141 # check for libexpat
18142
18143 # Check whether --with-libexpat was given.
18144 if test "${with_libexpat+set}" = set; then :
18145   withval=$with_libexpat;
18146 else
18147    withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18148 fi
18149
18150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
18151 $as_echo_n "checking for libexpat... " >&6; }
18152 found_libexpat="no"
18153 for dir in $withval ; do
18154             if test -f "$dir/include/expat.h"; then
18155                 found_libexpat="yes"
18156                                 if test "$dir" != "/usr"; then
18157                     CPPFLAGS="$CPPFLAGS -I$dir/include"
18158                     LDFLAGS="$LDFLAGS -L$dir/lib"
18159                 fi
18160                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
18161 $as_echo "found in $dir" >&6; }
18162                 break;
18163             fi
18164 done
18165 if test x_$found_libexpat != x_yes; then
18166         as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
18167 fi
18168 for ac_header in expat.h
18169 do :
18170   ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
18171 "
18172 if test "x$ac_cv_header_expat_h" = xyes; then :
18173   cat >>confdefs.h <<_ACEOF
18174 #define HAVE_EXPAT_H 1
18175 _ACEOF
18176
18177 fi
18178
18179 done
18180
18181 ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
18182 #include <expat.h>
18183
18184 "
18185 if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then :
18186   ac_have_decl=1
18187 else
18188   ac_have_decl=0
18189 fi
18190
18191 cat >>confdefs.h <<_ACEOF
18192 #define HAVE_DECL_XML_STOPPARSER $ac_have_decl
18193 _ACEOF
18194
18195
18196 # set static linking if requested
18197
18198 staticexe=""
18199 # Check whether --enable-static-exe was given.
18200 if test "${enable_static_exe+set}" = set; then :
18201   enableval=$enable_static_exe;
18202 fi
18203
18204 if test x_$enable_static_exe = x_yes; then
18205         staticexe="-static"
18206         if test "$on_mingw" = yes; then
18207                 staticexe="-all-static"
18208                 # for static crosscompile, include gdi32 and zlib here.
18209                 if test "`uname`" = "Linux"; then
18210                         LIBS="$LIBS -lgdi32 -lz"
18211                 fi
18212         fi
18213 fi
18214
18215 # set lock checking if requested
18216 # Check whether --enable-lock_checks was given.
18217 if test "${enable_lock_checks+set}" = set; then :
18218   enableval=$enable_lock_checks;
18219 fi
18220
18221 if test x_$enable_lock_checks = x_yes; then
18222
18223 $as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
18224
18225         CHECKLOCK_OBJ="checklocks.lo"
18226
18227 fi
18228
18229
18230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
18231 $as_echo_n "checking for getaddrinfo... " >&6; }
18232 ac_cv_func_getaddrinfo=no
18233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18234 /* end confdefs.h.  */
18235
18236 #ifdef __cplusplus
18237 extern "C"
18238 {
18239 #endif
18240 char* getaddrinfo();
18241 char* (*f) () = getaddrinfo;
18242 #ifdef __cplusplus
18243 }
18244 #endif
18245 int main() {
18246         ;
18247         return 0;
18248 }
18249
18250 _ACEOF
18251 if ac_fn_c_try_link "$LINENO"; then :
18252   ac_cv_func_getaddrinfo="yes"
18253 if test "$ac_cv_header_windows_h" = "yes"; then
18254
18255 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
18256
18257         USE_WINSOCK="1"
18258         LIBS="$LIBS -lws2_32"
18259 fi
18260
18261 else
18262   ORIGLIBS="$LIBS"
18263 LIBS="$LIBS -lws2_32"
18264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18265 /* end confdefs.h.  */
18266
18267 #ifdef HAVE_WS2TCPIP_H
18268 #include <ws2tcpip.h>
18269 #endif
18270
18271 int
18272 main ()
18273 {
18274
18275         (void)getaddrinfo(NULL, NULL, NULL, NULL);
18276
18277
18278   ;
18279   return 0;
18280 }
18281 _ACEOF
18282 if ac_fn_c_try_link "$LINENO"; then :
18283
18284 ac_cv_func_getaddrinfo="yes"
18285
18286 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
18287
18288 USE_WINSOCK="1"
18289
18290 else
18291
18292 ac_cv_func_getaddrinfo="no"
18293 LIBS="$ORIGLIBS"
18294
18295 fi
18296 rm -f core conftest.err conftest.$ac_objext \
18297     conftest$ac_exeext conftest.$ac_ext
18298
18299 fi
18300 rm -f core conftest.err conftest.$ac_objext \
18301     conftest$ac_exeext conftest.$ac_ext
18302
18303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
18304 $as_echo "$ac_cv_func_getaddrinfo" >&6; }
18305 if test $ac_cv_func_getaddrinfo = yes; then
18306
18307 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
18308
18309 fi
18310
18311 if test "$USE_WINSOCK" = 1; then
18312
18313 $as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
18314
18315         for ac_header in iphlpapi.h
18316 do :
18317   ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
18318 #include <windows.h>
18319
18320 "
18321 if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
18322   cat >>confdefs.h <<_ACEOF
18323 #define HAVE_IPHLPAPI_H 1
18324 _ACEOF
18325
18326 fi
18327
18328 done
18329
18330         if test -n "$ac_tool_prefix"; then
18331   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
18332 set dummy ${ac_tool_prefix}windres; ac_word=$2
18333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18334 $as_echo_n "checking for $ac_word... " >&6; }
18335 if ${ac_cv_prog_WINDRES+:} false; then :
18336   $as_echo_n "(cached) " >&6
18337 else
18338   if test -n "$WINDRES"; then
18339   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
18340 else
18341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18342 for as_dir in $PATH
18343 do
18344   IFS=$as_save_IFS
18345   test -z "$as_dir" && as_dir=.
18346     for ac_exec_ext in '' $ac_executable_extensions; do
18347   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18348     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
18349     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18350     break 2
18351   fi
18352 done
18353   done
18354 IFS=$as_save_IFS
18355
18356 fi
18357 fi
18358 WINDRES=$ac_cv_prog_WINDRES
18359 if test -n "$WINDRES"; then
18360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
18361 $as_echo "$WINDRES" >&6; }
18362 else
18363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18364 $as_echo "no" >&6; }
18365 fi
18366
18367
18368 fi
18369 if test -z "$ac_cv_prog_WINDRES"; then
18370   ac_ct_WINDRES=$WINDRES
18371   # Extract the first word of "windres", so it can be a program name with args.
18372 set dummy windres; ac_word=$2
18373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18374 $as_echo_n "checking for $ac_word... " >&6; }
18375 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
18376   $as_echo_n "(cached) " >&6
18377 else
18378   if test -n "$ac_ct_WINDRES"; then
18379   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
18380 else
18381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18382 for as_dir in $PATH
18383 do
18384   IFS=$as_save_IFS
18385   test -z "$as_dir" && as_dir=.
18386     for ac_exec_ext in '' $ac_executable_extensions; do
18387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18388     ac_cv_prog_ac_ct_WINDRES="windres"
18389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18390     break 2
18391   fi
18392 done
18393   done
18394 IFS=$as_save_IFS
18395
18396 fi
18397 fi
18398 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
18399 if test -n "$ac_ct_WINDRES"; then
18400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
18401 $as_echo "$ac_ct_WINDRES" >&6; }
18402 else
18403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18404 $as_echo "no" >&6; }
18405 fi
18406
18407   if test "x$ac_ct_WINDRES" = x; then
18408     WINDRES=""
18409   else
18410     case $cross_compiling:$ac_tool_warned in
18411 yes:)
18412 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18413 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18414 ac_tool_warned=yes ;;
18415 esac
18416     WINDRES=$ac_ct_WINDRES
18417   fi
18418 else
18419   WINDRES="$ac_cv_prog_WINDRES"
18420 fi
18421
18422         LIBS="$LIBS -liphlpapi"
18423         WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
18424
18425         WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
18426
18427         WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
18428
18429         WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
18430
18431         WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
18432
18433         WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
18434
18435         WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
18436
18437         WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
18438
18439 fi
18440 if test $ac_cv_func_getaddrinfo = no; then
18441         case " $LIBOBJS " in
18442   *" fake-rfc2553.$ac_objext "* ) ;;
18443   *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
18444  ;;
18445 esac
18446
18447 fi
18448 # check after getaddrinfo for its libraries
18449
18450 # check ioctlsocket
18451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
18452 $as_echo_n "checking for ioctlsocket... " >&6; }
18453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18454 /* end confdefs.h.  */
18455
18456 #ifdef HAVE_WINSOCK2_H
18457 #include <winsock2.h>
18458 #endif
18459
18460 int
18461 main ()
18462 {
18463
18464         (void)ioctlsocket(0, 0, NULL);
18465
18466   ;
18467   return 0;
18468 }
18469 _ACEOF
18470 if ac_fn_c_try_link "$LINENO"; then :
18471
18472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18473 $as_echo "yes" >&6; }
18474
18475 $as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
18476
18477
18478 else
18479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18480 $as_echo "no" >&6; }
18481 fi
18482 rm -f core conftest.err conftest.$ac_objext \
18483     conftest$ac_exeext conftest.$ac_ext
18484
18485
18486 # see if daemon(3) exists, and if it is deprecated.
18487 for ac_func in daemon
18488 do :
18489   ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
18490 if test "x$ac_cv_func_daemon" = xyes; then :
18491   cat >>confdefs.h <<_ACEOF
18492 #define HAVE_DAEMON 1
18493 _ACEOF
18494
18495 fi
18496 done
18497
18498 if test $ac_cv_func_daemon = yes; then
18499
18500
18501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
18502 $as_echo_n "checking if daemon is deprecated... " >&6; }
18503 cache=`echo daemon | sed 'y%.=/+-%___p_%'`
18504 if eval \${cv_cc_deprecated_$cache+:} false; then :
18505   $as_echo_n "(cached) " >&6
18506 else
18507
18508 echo '
18509 #include <stdlib.h>
18510 ' >conftest.c
18511 echo 'void f(){ (void)daemon(0, 0); }' >>conftest.c
18512 if test -z "`$CC -c conftest.c 2>&1 | grep deprecated`"; then
18513 eval "cv_cc_deprecated_$cache=no"
18514 else
18515 eval "cv_cc_deprecated_$cache=yes"
18516 fi
18517 rm -f conftest conftest.o conftest.c
18518
18519 fi
18520
18521 if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
18522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18523 $as_echo "yes" >&6; }
18524
18525 cat >>confdefs.h <<_ACEOF
18526 #define DEPRECATED_DAEMON 1
18527 _ACEOF
18528
18529 :
18530
18531 else
18532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18533 $as_echo "no" >&6; }
18534 :
18535
18536 fi
18537
18538 fi
18539
18540 ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
18541 $ac_includes_default
18542 #ifdef HAVE_SYS_UN_H
18543 #include <sys/un.h>
18544 #endif
18545
18546 "
18547 if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
18548
18549 cat >>confdefs.h <<_ACEOF
18550 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
18551 _ACEOF
18552
18553
18554 fi
18555
18556 ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
18557 $ac_includes_default
18558 #if HAVE_SYS_PARAM_H
18559 #include <sys/param.h>
18560 #endif
18561
18562 #ifdef HAVE_SYS_SOCKET_H
18563 #include <sys/socket.h>
18564 #endif
18565
18566 #ifdef HAVE_SYS_UIO_H
18567 #include <sys/uio.h>
18568 #endif
18569
18570 #ifdef HAVE_NETINET_IN_H
18571 #include <netinet/in.h>
18572 #endif
18573
18574 #ifdef HAVE_NETINET_TCP_H
18575 #include <netinet/tcp.h>
18576 #endif
18577
18578 #ifdef HAVE_ARPA_INET_H
18579 #include <arpa/inet.h>
18580 #endif
18581
18582 #ifdef HAVE_WINSOCK2_H
18583 #include <winsock2.h>
18584 #endif
18585
18586 #ifdef HAVE_WS2TCPIP_H
18587 #include <ws2tcpip.h>
18588 #endif
18589
18590 "
18591 if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
18592
18593 cat >>confdefs.h <<_ACEOF
18594 #define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
18595 _ACEOF
18596
18597
18598 fi
18599
18600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
18601 $as_echo_n "checking for library containing setusercontext... " >&6; }
18602 if ${ac_cv_search_setusercontext+:} false; then :
18603   $as_echo_n "(cached) " >&6
18604 else
18605   ac_func_search_save_LIBS=$LIBS
18606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18607 /* end confdefs.h.  */
18608
18609 /* Override any GCC internal prototype to avoid an error.
18610    Use char because int might match the return type of a GCC
18611    builtin and then its argument prototype would still apply.  */
18612 #ifdef __cplusplus
18613 extern "C"
18614 #endif
18615 char setusercontext ();
18616 int
18617 main ()
18618 {
18619 return setusercontext ();
18620   ;
18621   return 0;
18622 }
18623 _ACEOF
18624 for ac_lib in '' util; do
18625   if test -z "$ac_lib"; then
18626     ac_res="none required"
18627   else
18628     ac_res=-l$ac_lib
18629     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18630   fi
18631   if ac_fn_c_try_link "$LINENO"; then :
18632   ac_cv_search_setusercontext=$ac_res
18633 fi
18634 rm -f core conftest.err conftest.$ac_objext \
18635     conftest$ac_exeext
18636   if ${ac_cv_search_setusercontext+:} false; then :
18637   break
18638 fi
18639 done
18640 if ${ac_cv_search_setusercontext+:} false; then :
18641
18642 else
18643   ac_cv_search_setusercontext=no
18644 fi
18645 rm conftest.$ac_ext
18646 LIBS=$ac_func_search_save_LIBS
18647 fi
18648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
18649 $as_echo "$ac_cv_search_setusercontext" >&6; }
18650 ac_res=$ac_cv_search_setusercontext
18651 if test "$ac_res" != no; then :
18652   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18653
18654 fi
18655
18656 for ac_func in tzset sigprocmask fcntl getpwnam getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync
18657 do :
18658   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18659 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18660 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18661   cat >>confdefs.h <<_ACEOF
18662 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18663 _ACEOF
18664
18665 fi
18666 done
18667
18668 for ac_func in setresuid
18669 do :
18670   ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
18671 if test "x$ac_cv_func_setresuid" = xyes; then :
18672   cat >>confdefs.h <<_ACEOF
18673 #define HAVE_SETRESUID 1
18674 _ACEOF
18675
18676 else
18677   for ac_func in setreuid
18678 do :
18679   ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
18680 if test "x$ac_cv_func_setreuid" = xyes; then :
18681   cat >>confdefs.h <<_ACEOF
18682 #define HAVE_SETREUID 1
18683 _ACEOF
18684
18685 fi
18686 done
18687
18688 fi
18689 done
18690
18691 for ac_func in setresgid
18692 do :
18693   ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
18694 if test "x$ac_cv_func_setresgid" = xyes; then :
18695   cat >>confdefs.h <<_ACEOF
18696 #define HAVE_SETRESGID 1
18697 _ACEOF
18698
18699 else
18700   for ac_func in setregid
18701 do :
18702   ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
18703 if test "x$ac_cv_func_setregid" = xyes; then :
18704   cat >>confdefs.h <<_ACEOF
18705 #define HAVE_SETREGID 1
18706 _ACEOF
18707
18708 fi
18709 done
18710
18711 fi
18712 done
18713
18714
18715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sbrk" >&5
18716 $as_echo_n "checking for sbrk... " >&6; }
18717 # catch the warning of deprecated sbrk
18718 old_cflags="$CFLAGS"
18719 CFLAGS="$CFLAGS -Werror"
18720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18721 /* end confdefs.h.  */
18722 $ac_includes_default
18723
18724 int main(void) { void* cur = sbrk(0); printf("%u\n", (unsigned)(size_t)((char*)cur - (char*)sbrk(0))); return 0; }
18725
18726 _ACEOF
18727 if ac_fn_c_try_compile "$LINENO"; then :
18728
18729         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18730 $as_echo "yes" >&6; }
18731
18732 $as_echo "#define HAVE_SBRK 1" >>confdefs.h
18733
18734
18735 else
18736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18737 $as_echo "no" >&6; }
18738 fi
18739 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18740 CFLAGS="$old_cflags"
18741
18742 # check if setreuid en setregid fail, on MacOSX10.4(darwin8).
18743 if echo $build_os | grep darwin8 > /dev/null; then
18744
18745 $as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
18746
18747 fi
18748 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
18749 if test "x$ac_cv_func_inet_aton" = xyes; then :
18750   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
18751
18752 else
18753   case " $LIBOBJS " in
18754   *" inet_aton.$ac_objext "* ) ;;
18755   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
18756  ;;
18757 esac
18758
18759 fi
18760
18761
18762 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
18763 if test "x$ac_cv_func_inet_pton" = xyes; then :
18764   $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
18765
18766 else
18767   case " $LIBOBJS " in
18768   *" inet_pton.$ac_objext "* ) ;;
18769   *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
18770  ;;
18771 esac
18772
18773 fi
18774
18775
18776 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
18777 if test "x$ac_cv_func_inet_ntop" = xyes; then :
18778   $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
18779
18780 else
18781   case " $LIBOBJS " in
18782   *" inet_ntop.$ac_objext "* ) ;;
18783   *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
18784  ;;
18785 esac
18786
18787 fi
18788
18789
18790 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
18791 if test "x$ac_cv_func_snprintf" = xyes; then :
18792   $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
18793
18794 else
18795   case " $LIBOBJS " in
18796   *" snprintf.$ac_objext "* ) ;;
18797   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
18798  ;;
18799 esac
18800
18801 fi
18802
18803
18804 # test if snprintf return the proper length
18805 if test "x$ac_cv_func_snprintf" = xyes; then
18806     if test c${cross_compiling} = cno; then
18807         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
18808 $as_echo_n "checking for correct snprintf return value... " >&6; }
18809         if test "$cross_compiling" = yes; then :
18810   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18811 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18812 as_fn_error $? "cannot run test program while cross compiling
18813 See \`config.log' for more details" "$LINENO" 5; }
18814 else
18815   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18816 /* end confdefs.h.  */
18817 $ac_includes_default
18818
18819 int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
18820
18821 _ACEOF
18822 if ac_fn_c_try_run "$LINENO"; then :
18823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18824 $as_echo "yes" >&6; }
18825 else
18826
18827                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18828 $as_echo "no" >&6; }
18829
18830 $as_echo "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
18831
18832                 case " $LIBOBJS " in
18833   *" snprintf.$ac_objext "* ) ;;
18834   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
18835  ;;
18836 esac
18837
18838
18839 fi
18840 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18841   conftest.$ac_objext conftest.beam conftest.$ac_ext
18842 fi
18843
18844     fi
18845 fi
18846 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
18847 if test "x$ac_cv_func_strlcat" = xyes; then :
18848   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
18849
18850 else
18851   case " $LIBOBJS " in
18852   *" strlcat.$ac_objext "* ) ;;
18853   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
18854  ;;
18855 esac
18856
18857 fi
18858
18859
18860 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
18861 if test "x$ac_cv_func_strlcpy" = xyes; then :
18862   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
18863
18864 else
18865   case " $LIBOBJS " in
18866   *" strlcpy.$ac_objext "* ) ;;
18867   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
18868  ;;
18869 esac
18870
18871 fi
18872
18873
18874 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
18875 if test "x$ac_cv_func_memmove" = xyes; then :
18876   $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
18877
18878 else
18879   case " $LIBOBJS " in
18880   *" memmove.$ac_objext "* ) ;;
18881   *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
18882  ;;
18883 esac
18884
18885 fi
18886
18887
18888 ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
18889 if test "x$ac_cv_func_gmtime_r" = xyes; then :
18890   $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
18891
18892 else
18893   case " $LIBOBJS " in
18894   *" gmtime_r.$ac_objext "* ) ;;
18895   *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
18896  ;;
18897 esac
18898
18899 fi
18900
18901
18902 ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
18903 if test "x$ac_cv_func_isblank" = xyes; then :
18904   $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
18905
18906 else
18907   case " $LIBOBJS " in
18908   *" isblank.$ac_objext "* ) ;;
18909   *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
18910  ;;
18911 esac
18912
18913 fi
18914
18915
18916 LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
18917
18918 ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
18919 if test "x$ac_cv_func_reallocarray" = xyes; then :
18920   $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
18921
18922 else
18923   case " $LIBOBJS " in
18924   *" reallocarray.$ac_objext "* ) ;;
18925   *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
18926  ;;
18927 esac
18928
18929 fi
18930
18931
18932 if test "$USE_NSS" = "no"; then
18933         ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
18934 if test "x$ac_cv_func_arc4random" = xyes; then :
18935   $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
18936
18937 else
18938   case " $LIBOBJS " in
18939   *" arc4random.$ac_objext "* ) ;;
18940   *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
18941  ;;
18942 esac
18943
18944 fi
18945
18946
18947         ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
18948 if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
18949   $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
18950
18951 else
18952   case " $LIBOBJS " in
18953   *" arc4random_uniform.$ac_objext "* ) ;;
18954   *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
18955  ;;
18956 esac
18957
18958 fi
18959
18960
18961         if test "$ac_cv_func_arc4random" = "no"; then
18962                 case " $LIBOBJS " in
18963   *" explicit_bzero.$ac_objext "* ) ;;
18964   *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
18965  ;;
18966 esac
18967
18968                 case " $LIBOBJS " in
18969   *" arc4_lock.$ac_objext "* ) ;;
18970   *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
18971  ;;
18972 esac
18973
18974                 for ac_func in getentropy
18975 do :
18976   ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
18977 if test "x$ac_cv_func_getentropy" = xyes; then :
18978   cat >>confdefs.h <<_ACEOF
18979 #define HAVE_GETENTROPY 1
18980 _ACEOF
18981
18982 else
18983
18984                     if test "$USE_WINSOCK" = 1; then
18985                         case " $LIBOBJS " in
18986   *" getentropy_win.$ac_objext "* ) ;;
18987   *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
18988  ;;
18989 esac
18990
18991                     else
18992                         case `uname` in
18993                         Darwin)
18994                                 case " $LIBOBJS " in
18995   *" getentropy_osx.$ac_objext "* ) ;;
18996   *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
18997  ;;
18998 esac
18999
19000                         ;;
19001                         SunOS)
19002                                 case " $LIBOBJS " in
19003   *" getentropy_solaris.$ac_objext "* ) ;;
19004   *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
19005  ;;
19006 esac
19007
19008                                 for ac_header in sys/sha2.h
19009 do :
19010   ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
19011 "
19012 if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
19013   cat >>confdefs.h <<_ACEOF
19014 #define HAVE_SYS_SHA2_H 1
19015 _ACEOF
19016
19017 else
19018
19019                                         for ac_func in SHA512_Update
19020 do :
19021   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
19022 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
19023   cat >>confdefs.h <<_ACEOF
19024 #define HAVE_SHA512_UPDATE 1
19025 _ACEOF
19026
19027 else
19028
19029                                                 case " $LIBOBJS " in
19030   *" sha512.$ac_objext "* ) ;;
19031   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
19032  ;;
19033 esac
19034
19035
19036 fi
19037 done
19038
19039
19040 fi
19041
19042 done
19043
19044                                 if test "$ac_cv_header_sys_sha2_h" = "yes"; then
19045                                         # this lib needed for sha2 on solaris
19046                                         LIBS="$LIBS -lmd"
19047                                 fi
19048                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19049 $as_echo_n "checking for library containing clock_gettime... " >&6; }
19050 if ${ac_cv_search_clock_gettime+:} false; then :
19051   $as_echo_n "(cached) " >&6
19052 else
19053   ac_func_search_save_LIBS=$LIBS
19054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19055 /* end confdefs.h.  */
19056
19057 /* Override any GCC internal prototype to avoid an error.
19058    Use char because int might match the return type of a GCC
19059    builtin and then its argument prototype would still apply.  */
19060 #ifdef __cplusplus
19061 extern "C"
19062 #endif
19063 char clock_gettime ();
19064 int
19065 main ()
19066 {
19067 return clock_gettime ();
19068   ;
19069   return 0;
19070 }
19071 _ACEOF
19072 for ac_lib in '' rt; do
19073   if test -z "$ac_lib"; then
19074     ac_res="none required"
19075   else
19076     ac_res=-l$ac_lib
19077     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19078   fi
19079   if ac_fn_c_try_link "$LINENO"; then :
19080   ac_cv_search_clock_gettime=$ac_res
19081 fi
19082 rm -f core conftest.err conftest.$ac_objext \
19083     conftest$ac_exeext
19084   if ${ac_cv_search_clock_gettime+:} false; then :
19085   break
19086 fi
19087 done
19088 if ${ac_cv_search_clock_gettime+:} false; then :
19089
19090 else
19091   ac_cv_search_clock_gettime=no
19092 fi
19093 rm conftest.$ac_ext
19094 LIBS=$ac_func_search_save_LIBS
19095 fi
19096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19097 $as_echo "$ac_cv_search_clock_gettime" >&6; }
19098 ac_res=$ac_cv_search_clock_gettime
19099 if test "$ac_res" != no; then :
19100   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19101
19102 fi
19103
19104                         ;;
19105                         Linux|*)
19106                                 case " $LIBOBJS " in
19107   *" getentropy_linux.$ac_objext "* ) ;;
19108   *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
19109  ;;
19110 esac
19111
19112                                 for ac_func in SHA512_Update
19113 do :
19114   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
19115 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
19116   cat >>confdefs.h <<_ACEOF
19117 #define HAVE_SHA512_UPDATE 1
19118 _ACEOF
19119
19120 else
19121
19122
19123 $as_echo "#define COMPAT_SHA512 1" >>confdefs.h
19124
19125                                         case " $LIBOBJS " in
19126   *" sha512.$ac_objext "* ) ;;
19127   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
19128  ;;
19129 esac
19130
19131
19132 fi
19133 done
19134
19135                                 for ac_header in sys/sysctl.h
19136 do :
19137   ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
19138 "
19139 if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
19140   cat >>confdefs.h <<_ACEOF
19141 #define HAVE_SYS_SYSCTL_H 1
19142 _ACEOF
19143
19144 fi
19145
19146 done
19147
19148                                 for ac_func in getauxval
19149 do :
19150   ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
19151 if test "x$ac_cv_func_getauxval" = xyes; then :
19152   cat >>confdefs.h <<_ACEOF
19153 #define HAVE_GETAUXVAL 1
19154 _ACEOF
19155
19156 fi
19157 done
19158
19159                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19160 $as_echo_n "checking for library containing clock_gettime... " >&6; }
19161 if ${ac_cv_search_clock_gettime+:} false; then :
19162   $as_echo_n "(cached) " >&6
19163 else
19164   ac_func_search_save_LIBS=$LIBS
19165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19166 /* end confdefs.h.  */
19167
19168 /* Override any GCC internal prototype to avoid an error.
19169    Use char because int might match the return type of a GCC
19170    builtin and then its argument prototype would still apply.  */
19171 #ifdef __cplusplus
19172 extern "C"
19173 #endif
19174 char clock_gettime ();
19175 int
19176 main ()
19177 {
19178 return clock_gettime ();
19179   ;
19180   return 0;
19181 }
19182 _ACEOF
19183 for ac_lib in '' rt; do
19184   if test -z "$ac_lib"; then
19185     ac_res="none required"
19186   else
19187     ac_res=-l$ac_lib
19188     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19189   fi
19190   if ac_fn_c_try_link "$LINENO"; then :
19191   ac_cv_search_clock_gettime=$ac_res
19192 fi
19193 rm -f core conftest.err conftest.$ac_objext \
19194     conftest$ac_exeext
19195   if ${ac_cv_search_clock_gettime+:} false; then :
19196   break
19197 fi
19198 done
19199 if ${ac_cv_search_clock_gettime+:} false; then :
19200
19201 else
19202   ac_cv_search_clock_gettime=no
19203 fi
19204 rm conftest.$ac_ext
19205 LIBS=$ac_func_search_save_LIBS
19206 fi
19207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19208 $as_echo "$ac_cv_search_clock_gettime" >&6; }
19209 ac_res=$ac_cv_search_clock_gettime
19210 if test "$ac_res" != no; then :
19211   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19212
19213 fi
19214
19215                         ;;
19216                         esac
19217                     fi
19218
19219 fi
19220 done
19221
19222         fi
19223 fi
19224 LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
19225
19226 ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
19227 if test "x$ac_cv_func_ctime_r" = xyes; then :
19228   $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
19229
19230 else
19231   case " $LIBOBJS " in
19232   *" ctime_r.$ac_objext "* ) ;;
19233   *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
19234  ;;
19235 esac
19236
19237 fi
19238
19239
19240
19241 # Check whether --enable-allsymbols was given.
19242 if test "${enable_allsymbols+set}" = set; then :
19243   enableval=$enable_allsymbols;
19244 fi
19245
19246 case "$enable_allsymbols" in
19247         yes)
19248         COMMON_OBJ_ALL_SYMBOLS=""
19249         UBSYMS=""
19250         EXTRALINK="-L. -L.libs -lunbound"
19251
19252 $as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
19253
19254         ;;
19255         no|*)
19256         COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
19257         UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
19258         EXTRALINK=""
19259         ;;
19260 esac
19261
19262
19263
19264 if test x_$enable_lock_checks = x_yes; then
19265         UBSYMS="-export-symbols clubsyms.def"
19266         cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
19267         echo lock_protect >> clubsyms.def
19268         echo lock_unprotect >> clubsyms.def
19269         echo lock_get_mem >> clubsyms.def
19270         echo checklock_start >> clubsyms.def
19271         echo checklock_stop >> clubsyms.def
19272         echo checklock_lock >> clubsyms.def
19273         echo checklock_unlock >> clubsyms.def
19274         echo checklock_init >> clubsyms.def
19275         echo checklock_thrcreate >> clubsyms.def
19276         echo checklock_thrjoin >> clubsyms.def
19277 fi
19278
19279 # check for dnstap if requested
19280
19281   # Check whether --enable-dnstap was given.
19282 if test "${enable_dnstap+set}" = set; then :
19283   enableval=$enable_dnstap; opt_dnstap=$enableval
19284 else
19285   opt_dnstap=no
19286 fi
19287
19288
19289
19290 # Check whether --with-dnstap-socket-path was given.
19291 if test "${with_dnstap_socket_path+set}" = set; then :
19292   withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
19293 else
19294   opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
19295 fi
19296
19297
19298   if test "x$opt_dnstap" != "xno"; then
19299     # Extract the first word of "protoc-c", so it can be a program name with args.
19300 set dummy protoc-c; ac_word=$2
19301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19302 $as_echo_n "checking for $ac_word... " >&6; }
19303 if ${ac_cv_path_PROTOC_C+:} false; then :
19304   $as_echo_n "(cached) " >&6
19305 else
19306   case $PROTOC_C in
19307   [\\/]* | ?:[\\/]*)
19308   ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
19309   ;;
19310   *)
19311   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19312 for as_dir in $PATH
19313 do
19314   IFS=$as_save_IFS
19315   test -z "$as_dir" && as_dir=.
19316     for ac_exec_ext in '' $ac_executable_extensions; do
19317   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19318     ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
19319     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19320     break 2
19321   fi
19322 done
19323   done
19324 IFS=$as_save_IFS
19325
19326   ;;
19327 esac
19328 fi
19329 PROTOC_C=$ac_cv_path_PROTOC_C
19330 if test -n "$PROTOC_C"; then
19331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
19332 $as_echo "$PROTOC_C" >&6; }
19333 else
19334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19335 $as_echo "no" >&6; }
19336 fi
19337
19338
19339     if test -z "$PROTOC_C"; then
19340       as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
19341     fi
19342
19343 # Check whether --with-protobuf-c was given.
19344 if test "${with_protobuf_c+set}" = set; then :
19345   withval=$with_protobuf_c;
19346           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
19347           if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
19348             CFLAGS="$CFLAGS -I$withval/include/google"
19349           else
19350             CFLAGS="$CFLAGS -I$withval/include"
19351           fi
19352           LDFLAGS="$LDFLAGS -L$withval/lib"
19353
19354 else
19355
19356           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
19357           if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
19358             CFLAGS="$CFLAGS -I/usr/include/google"
19359           else
19360             if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
19361               CFLAGS="$CFLAGS -I/usr/local/include/google"
19362               LDFLAGS="$LDFLAGS -L/usr/local/lib"
19363             fi
19364           fi
19365
19366 fi
19367
19368
19369 # Check whether --with-libfstrm was given.
19370 if test "${with_libfstrm+set}" = set; then :
19371   withval=$with_libfstrm;
19372         CFLAGS="$CFLAGS -I$withval/include"
19373         LDFLAGS="$LDFLAGS -L$withval/lib"
19374
19375 fi
19376
19377     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fstrm_iothr_init" >&5
19378 $as_echo_n "checking for library containing fstrm_iothr_init... " >&6; }
19379 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
19380   $as_echo_n "(cached) " >&6
19381 else
19382   ac_func_search_save_LIBS=$LIBS
19383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19384 /* end confdefs.h.  */
19385
19386 /* Override any GCC internal prototype to avoid an error.
19387    Use char because int might match the return type of a GCC
19388    builtin and then its argument prototype would still apply.  */
19389 #ifdef __cplusplus
19390 extern "C"
19391 #endif
19392 char fstrm_iothr_init ();
19393 int
19394 main ()
19395 {
19396 return fstrm_iothr_init ();
19397   ;
19398   return 0;
19399 }
19400 _ACEOF
19401 for ac_lib in '' fstrm; do
19402   if test -z "$ac_lib"; then
19403     ac_res="none required"
19404   else
19405     ac_res=-l$ac_lib
19406     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19407   fi
19408   if ac_fn_c_try_link "$LINENO"; then :
19409   ac_cv_search_fstrm_iothr_init=$ac_res
19410 fi
19411 rm -f core conftest.err conftest.$ac_objext \
19412     conftest$ac_exeext
19413   if ${ac_cv_search_fstrm_iothr_init+:} false; then :
19414   break
19415 fi
19416 done
19417 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
19418
19419 else
19420   ac_cv_search_fstrm_iothr_init=no
19421 fi
19422 rm conftest.$ac_ext
19423 LIBS=$ac_func_search_save_LIBS
19424 fi
19425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fstrm_iothr_init" >&5
19426 $as_echo "$ac_cv_search_fstrm_iothr_init" >&6; }
19427 ac_res=$ac_cv_search_fstrm_iothr_init
19428 if test "$ac_res" != no; then :
19429   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19430
19431 else
19432   as_fn_error $? "The fstrm library was not found. Please install fstrm!" "$LINENO" 5
19433 fi
19434
19435     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
19436 $as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
19437 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
19438   $as_echo_n "(cached) " >&6
19439 else
19440   ac_func_search_save_LIBS=$LIBS
19441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19442 /* end confdefs.h.  */
19443
19444 /* Override any GCC internal prototype to avoid an error.
19445    Use char because int might match the return type of a GCC
19446    builtin and then its argument prototype would still apply.  */
19447 #ifdef __cplusplus
19448 extern "C"
19449 #endif
19450 char protobuf_c_message_pack ();
19451 int
19452 main ()
19453 {
19454 return protobuf_c_message_pack ();
19455   ;
19456   return 0;
19457 }
19458 _ACEOF
19459 for ac_lib in '' protobuf-c; do
19460   if test -z "$ac_lib"; then
19461     ac_res="none required"
19462   else
19463     ac_res=-l$ac_lib
19464     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19465   fi
19466   if ac_fn_c_try_link "$LINENO"; then :
19467   ac_cv_search_protobuf_c_message_pack=$ac_res
19468 fi
19469 rm -f core conftest.err conftest.$ac_objext \
19470     conftest$ac_exeext
19471   if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
19472   break
19473 fi
19474 done
19475 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
19476
19477 else
19478   ac_cv_search_protobuf_c_message_pack=no
19479 fi
19480 rm conftest.$ac_ext
19481 LIBS=$ac_func_search_save_LIBS
19482 fi
19483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
19484 $as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
19485 ac_res=$ac_cv_search_protobuf_c_message_pack
19486 if test "$ac_res" != no; then :
19487   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19488
19489 else
19490   as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
19491 fi
19492
19493
19494
19495 $as_echo "#define USE_DNSTAP 1" >>confdefs.h
19496
19497         ENABLE_DNSTAP=1
19498
19499
19500
19501         hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
19502
19503
19504 cat >>confdefs.h <<_ACEOF
19505 #define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
19506 _ACEOF
19507
19508
19509         DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c"
19510
19511         DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo"
19512
19513
19514   else
19515
19516         ENABLE_DNSTAP=0
19517
19518
19519
19520   fi
19521
19522
19523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
19524 $as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
19525 # on openBSD, the implicit rule make $< work.
19526 # on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
19527 # gmake works.
19528 cat >conftest.make <<EOF
19529 all:    conftest.lo
19530
19531 conftest.lo foo.lo bla.lo:
19532         if test -f "\$<"; then touch \$@; fi
19533
19534 .SUFFIXES: .lo
19535 .c.lo:
19536         if test -f "\$<"; then touch \$@; fi
19537
19538 conftest.lo:        conftest.dir/conftest.c
19539 EOF
19540 mkdir conftest.dir
19541 touch conftest.dir/conftest.c
19542 rm -f conftest.lo conftest.c
19543 ${MAKE:-make} -f conftest.make >/dev/null
19544 rm -f conftest.make conftest.c conftest.dir/conftest.c
19545 rm -rf conftest.dir
19546 if test ! -f conftest.lo; then
19547         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19548 $as_echo "no" >&6; }
19549         SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
19550         SOURCEFILE='`cat .source`'
19551 else
19552         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19553 $as_echo "yes" >&6; }
19554         SOURCEDETERMINE=':'
19555         SOURCEFILE='$<'
19556 fi
19557 rm -f conftest.lo
19558
19559
19560
19561 # see if we want to build the library or everything
19562 ALLTARGET="alltargets"
19563 INSTALLTARGET="install-all"
19564
19565 # Check whether --with-libunbound-only was given.
19566 if test "${with_libunbound_only+set}" = set; then :
19567   withval=$with_libunbound_only;
19568         if test "$withval" = "yes"; then
19569                 ALLTARGET="lib"
19570                 INSTALLTARGET="install-lib"
19571         fi
19572
19573 fi
19574
19575
19576
19577
19578
19579   { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
19580 $as_echo "$as_me: Stripping extension flags..." >&6;}
19581
19582   if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
19583     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
19584
19585 $as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
19586
19587   fi
19588
19589
19590   if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
19591     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
19592
19593 $as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
19594
19595   fi
19596
19597
19598   if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
19599     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
19600
19601 $as_echo "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
19602
19603   fi
19604
19605
19606   if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
19607     CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
19608
19609 $as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
19610
19611   fi
19612
19613
19614   if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
19615     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
19616
19617 $as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
19618
19619   fi
19620
19621
19622   if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
19623     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
19624
19625 $as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
19626
19627   fi
19628
19629
19630   if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
19631     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
19632
19633 $as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
19634
19635   fi
19636
19637
19638   if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
19639     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
19640
19641 $as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
19642
19643   fi
19644
19645
19646   if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
19647     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
19648
19649 $as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
19650
19651   fi
19652
19653
19654 LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
19655
19656
19657 cat >>confdefs.h <<_ACEOF
19658 #define MAXSYSLOGMSGLEN 10240
19659 _ACEOF
19660
19661
19662
19663
19664 version=1.5.8
19665
19666 date=`date +'%b %e, %Y'`
19667
19668
19669 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"
19670
19671 ac_config_headers="$ac_config_headers config.h"
19672
19673 cat >confcache <<\_ACEOF
19674 # This file is a shell script that caches the results of configure
19675 # tests run on this system so they can be shared between configure
19676 # scripts and configure runs, see configure's option --config-cache.
19677 # It is not useful on other systems.  If it contains results you don't
19678 # want to keep, you may remove or edit it.
19679 #
19680 # config.status only pays attention to the cache file if you give it
19681 # the --recheck option to rerun configure.
19682 #
19683 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19684 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19685 # following values.
19686
19687 _ACEOF
19688
19689 # The following way of writing the cache mishandles newlines in values,
19690 # but we know of no workaround that is simple, portable, and efficient.
19691 # So, we kill variables containing newlines.
19692 # Ultrix sh set writes to stderr and can't be redirected directly,
19693 # and sets the high bit in the cache file unless we assign to the vars.
19694 (
19695   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19696     eval ac_val=\$$ac_var
19697     case $ac_val in #(
19698     *${as_nl}*)
19699       case $ac_var in #(
19700       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19701 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19702       esac
19703       case $ac_var in #(
19704       _ | IFS | as_nl) ;; #(
19705       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19706       *) { eval $ac_var=; unset $ac_var;} ;;
19707       esac ;;
19708     esac
19709   done
19710
19711   (set) 2>&1 |
19712     case $as_nl`(ac_space=' '; set) 2>&1` in #(
19713     *${as_nl}ac_space=\ *)
19714       # `set' does not quote correctly, so add quotes: double-quote
19715       # substitution turns \\\\ into \\, and sed turns \\ into \.
19716       sed -n \
19717         "s/'/'\\\\''/g;
19718           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19719       ;; #(
19720     *)
19721       # `set' quotes correctly as required by POSIX, so do not add quotes.
19722       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19723       ;;
19724     esac |
19725     sort
19726 ) |
19727   sed '
19728      /^ac_cv_env_/b end
19729      t clear
19730      :clear
19731      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19732      t end
19733      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19734      :end' >>confcache
19735 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19736   if test -w "$cache_file"; then
19737     if test "x$cache_file" != "x/dev/null"; then
19738       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19739 $as_echo "$as_me: updating cache $cache_file" >&6;}
19740       if test ! -f "$cache_file" || test -h "$cache_file"; then
19741         cat confcache >"$cache_file"
19742       else
19743         case $cache_file in #(
19744         */* | ?:*)
19745           mv -f confcache "$cache_file"$$ &&
19746           mv -f "$cache_file"$$ "$cache_file" ;; #(
19747         *)
19748           mv -f confcache "$cache_file" ;;
19749         esac
19750       fi
19751     fi
19752   else
19753     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19754 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19755   fi
19756 fi
19757 rm -f confcache
19758
19759 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19760 # Let make expand exec_prefix.
19761 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19762
19763 DEFS=-DHAVE_CONFIG_H
19764
19765 ac_libobjs=
19766 ac_ltlibobjs=
19767 U=
19768 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19769   # 1. Remove the extension, and $U if already installed.
19770   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19771   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19772   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19773   #    will be set to the directory where LIBOBJS objects are built.
19774   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19775   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19776 done
19777 LIBOBJS=$ac_libobjs
19778
19779 LTLIBOBJS=$ac_ltlibobjs
19780
19781
19782
19783 : "${CONFIG_STATUS=./config.status}"
19784 ac_write_fail=0
19785 ac_clean_files_save=$ac_clean_files
19786 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19787 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19788 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19789 as_write_fail=0
19790 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19791 #! $SHELL
19792 # Generated by $as_me.
19793 # Run this file to recreate the current configuration.
19794 # Compiler output produced by configure, useful for debugging
19795 # configure, is in config.log if it exists.
19796
19797 debug=false
19798 ac_cs_recheck=false
19799 ac_cs_silent=false
19800
19801 SHELL=\${CONFIG_SHELL-$SHELL}
19802 export SHELL
19803 _ASEOF
19804 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19805 ## -------------------- ##
19806 ## M4sh Initialization. ##
19807 ## -------------------- ##
19808
19809 # Be more Bourne compatible
19810 DUALCASE=1; export DUALCASE # for MKS sh
19811 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19812   emulate sh
19813   NULLCMD=:
19814   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19815   # is contrary to our usage.  Disable this feature.
19816   alias -g '${1+"$@"}'='"$@"'
19817   setopt NO_GLOB_SUBST
19818 else
19819   case `(set -o) 2>/dev/null` in #(
19820   *posix*) :
19821     set -o posix ;; #(
19822   *) :
19823      ;;
19824 esac
19825 fi
19826
19827
19828 as_nl='
19829 '
19830 export as_nl
19831 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19832 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19833 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19834 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19835 # Prefer a ksh shell builtin over an external printf program on Solaris,
19836 # but without wasting forks for bash or zsh.
19837 if test -z "$BASH_VERSION$ZSH_VERSION" \
19838     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19839   as_echo='print -r --'
19840   as_echo_n='print -rn --'
19841 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19842   as_echo='printf %s\n'
19843   as_echo_n='printf %s'
19844 else
19845   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19846     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19847     as_echo_n='/usr/ucb/echo -n'
19848   else
19849     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19850     as_echo_n_body='eval
19851       arg=$1;
19852       case $arg in #(
19853       *"$as_nl"*)
19854         expr "X$arg" : "X\\(.*\\)$as_nl";
19855         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19856       esac;
19857       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19858     '
19859     export as_echo_n_body
19860     as_echo_n='sh -c $as_echo_n_body as_echo'
19861   fi
19862   export as_echo_body
19863   as_echo='sh -c $as_echo_body as_echo'
19864 fi
19865
19866 # The user is always right.
19867 if test "${PATH_SEPARATOR+set}" != set; then
19868   PATH_SEPARATOR=:
19869   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19870     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19871       PATH_SEPARATOR=';'
19872   }
19873 fi
19874
19875
19876 # IFS
19877 # We need space, tab and new line, in precisely that order.  Quoting is
19878 # there to prevent editors from complaining about space-tab.
19879 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19880 # splitting by setting IFS to empty value.)
19881 IFS=" ""        $as_nl"
19882
19883 # Find who we are.  Look in the path if we contain no directory separator.
19884 as_myself=
19885 case $0 in #((
19886   *[\\/]* ) as_myself=$0 ;;
19887   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19888 for as_dir in $PATH
19889 do
19890   IFS=$as_save_IFS
19891   test -z "$as_dir" && as_dir=.
19892     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19893   done
19894 IFS=$as_save_IFS
19895
19896      ;;
19897 esac
19898 # We did not find ourselves, most probably we were run as `sh COMMAND'
19899 # in which case we are not to be found in the path.
19900 if test "x$as_myself" = x; then
19901   as_myself=$0
19902 fi
19903 if test ! -f "$as_myself"; then
19904   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19905   exit 1
19906 fi
19907
19908 # Unset variables that we do not need and which cause bugs (e.g. in
19909 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19910 # suppresses any "Segmentation fault" message there.  '((' could
19911 # trigger a bug in pdksh 5.2.14.
19912 for as_var in BASH_ENV ENV MAIL MAILPATH
19913 do eval test x\${$as_var+set} = xset \
19914   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19915 done
19916 PS1='$ '
19917 PS2='> '
19918 PS4='+ '
19919
19920 # NLS nuisances.
19921 LC_ALL=C
19922 export LC_ALL
19923 LANGUAGE=C
19924 export LANGUAGE
19925
19926 # CDPATH.
19927 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19928
19929
19930 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19931 # ----------------------------------------
19932 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19933 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19934 # script with STATUS, using 1 if that was 0.
19935 as_fn_error ()
19936 {
19937   as_status=$1; test $as_status -eq 0 && as_status=1
19938   if test "$4"; then
19939     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19940     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19941   fi
19942   $as_echo "$as_me: error: $2" >&2
19943   as_fn_exit $as_status
19944 } # as_fn_error
19945
19946
19947 # as_fn_set_status STATUS
19948 # -----------------------
19949 # Set $? to STATUS, without forking.
19950 as_fn_set_status ()
19951 {
19952   return $1
19953 } # as_fn_set_status
19954
19955 # as_fn_exit STATUS
19956 # -----------------
19957 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19958 as_fn_exit ()
19959 {
19960   set +e
19961   as_fn_set_status $1
19962   exit $1
19963 } # as_fn_exit
19964
19965 # as_fn_unset VAR
19966 # ---------------
19967 # Portably unset VAR.
19968 as_fn_unset ()
19969 {
19970   { eval $1=; unset $1;}
19971 }
19972 as_unset=as_fn_unset
19973 # as_fn_append VAR VALUE
19974 # ----------------------
19975 # Append the text in VALUE to the end of the definition contained in VAR. Take
19976 # advantage of any shell optimizations that allow amortized linear growth over
19977 # repeated appends, instead of the typical quadratic growth present in naive
19978 # implementations.
19979 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19980   eval 'as_fn_append ()
19981   {
19982     eval $1+=\$2
19983   }'
19984 else
19985   as_fn_append ()
19986   {
19987     eval $1=\$$1\$2
19988   }
19989 fi # as_fn_append
19990
19991 # as_fn_arith ARG...
19992 # ------------------
19993 # Perform arithmetic evaluation on the ARGs, and store the result in the
19994 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19995 # must be portable across $(()) and expr.
19996 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19997   eval 'as_fn_arith ()
19998   {
19999     as_val=$(( $* ))
20000   }'
20001 else
20002   as_fn_arith ()
20003   {
20004     as_val=`expr "$@" || test $? -eq 1`
20005   }
20006 fi # as_fn_arith
20007
20008
20009 if expr a : '\(a\)' >/dev/null 2>&1 &&
20010    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20011   as_expr=expr
20012 else
20013   as_expr=false
20014 fi
20015
20016 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20017   as_basename=basename
20018 else
20019   as_basename=false
20020 fi
20021
20022 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20023   as_dirname=dirname
20024 else
20025   as_dirname=false
20026 fi
20027
20028 as_me=`$as_basename -- "$0" ||
20029 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20030          X"$0" : 'X\(//\)$' \| \
20031          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20032 $as_echo X/"$0" |
20033     sed '/^.*\/\([^/][^/]*\)\/*$/{
20034             s//\1/
20035             q
20036           }
20037           /^X\/\(\/\/\)$/{
20038             s//\1/
20039             q
20040           }
20041           /^X\/\(\/\).*/{
20042             s//\1/
20043             q
20044           }
20045           s/.*/./; q'`
20046
20047 # Avoid depending upon Character Ranges.
20048 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20049 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20050 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20051 as_cr_digits='0123456789'
20052 as_cr_alnum=$as_cr_Letters$as_cr_digits
20053
20054 ECHO_C= ECHO_N= ECHO_T=
20055 case `echo -n x` in #(((((
20056 -n*)
20057   case `echo 'xy\c'` in
20058   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
20059   xy)  ECHO_C='\c';;
20060   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
20061        ECHO_T=' ';;
20062   esac;;
20063 *)
20064   ECHO_N='-n';;
20065 esac
20066
20067 rm -f conf$$ conf$$.exe conf$$.file
20068 if test -d conf$$.dir; then
20069   rm -f conf$$.dir/conf$$.file
20070 else
20071   rm -f conf$$.dir
20072   mkdir conf$$.dir 2>/dev/null
20073 fi
20074 if (echo >conf$$.file) 2>/dev/null; then
20075   if ln -s conf$$.file conf$$ 2>/dev/null; then
20076     as_ln_s='ln -s'
20077     # ... but there are two gotchas:
20078     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20079     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20080     # In both cases, we have to default to `cp -pR'.
20081     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20082       as_ln_s='cp -pR'
20083   elif ln conf$$.file conf$$ 2>/dev/null; then
20084     as_ln_s=ln
20085   else
20086     as_ln_s='cp -pR'
20087   fi
20088 else
20089   as_ln_s='cp -pR'
20090 fi
20091 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20092 rmdir conf$$.dir 2>/dev/null
20093
20094
20095 # as_fn_mkdir_p
20096 # -------------
20097 # Create "$as_dir" as a directory, including parents if necessary.
20098 as_fn_mkdir_p ()
20099 {
20100
20101   case $as_dir in #(
20102   -*) as_dir=./$as_dir;;
20103   esac
20104   test -d "$as_dir" || eval $as_mkdir_p || {
20105     as_dirs=
20106     while :; do
20107       case $as_dir in #(
20108       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20109       *) as_qdir=$as_dir;;
20110       esac
20111       as_dirs="'$as_qdir' $as_dirs"
20112       as_dir=`$as_dirname -- "$as_dir" ||
20113 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20114          X"$as_dir" : 'X\(//\)[^/]' \| \
20115          X"$as_dir" : 'X\(//\)$' \| \
20116          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20117 $as_echo X"$as_dir" |
20118     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20119             s//\1/
20120             q
20121           }
20122           /^X\(\/\/\)[^/].*/{
20123             s//\1/
20124             q
20125           }
20126           /^X\(\/\/\)$/{
20127             s//\1/
20128             q
20129           }
20130           /^X\(\/\).*/{
20131             s//\1/
20132             q
20133           }
20134           s/.*/./; q'`
20135       test -d "$as_dir" && break
20136     done
20137     test -z "$as_dirs" || eval "mkdir $as_dirs"
20138   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20139
20140
20141 } # as_fn_mkdir_p
20142 if mkdir -p . 2>/dev/null; then
20143   as_mkdir_p='mkdir -p "$as_dir"'
20144 else
20145   test -d ./-p && rmdir ./-p
20146   as_mkdir_p=false
20147 fi
20148
20149
20150 # as_fn_executable_p FILE
20151 # -----------------------
20152 # Test if FILE is an executable regular file.
20153 as_fn_executable_p ()
20154 {
20155   test -f "$1" && test -x "$1"
20156 } # as_fn_executable_p
20157 as_test_x='test -x'
20158 as_executable_p=as_fn_executable_p
20159
20160 # Sed expression to map a string onto a valid CPP name.
20161 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20162
20163 # Sed expression to map a string onto a valid variable name.
20164 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20165
20166
20167 exec 6>&1
20168 ## ----------------------------------- ##
20169 ## Main body of $CONFIG_STATUS script. ##
20170 ## ----------------------------------- ##
20171 _ASEOF
20172 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20173
20174 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20175 # Save the log message, to keep $0 and so on meaningful, and to
20176 # report actual input values of CONFIG_FILES etc. instead of their
20177 # values after options handling.
20178 ac_log="
20179 This file was extended by unbound $as_me 1.5.8, which was
20180 generated by GNU Autoconf 2.69.  Invocation command line was
20181
20182   CONFIG_FILES    = $CONFIG_FILES
20183   CONFIG_HEADERS  = $CONFIG_HEADERS
20184   CONFIG_LINKS    = $CONFIG_LINKS
20185   CONFIG_COMMANDS = $CONFIG_COMMANDS
20186   $ $0 $@
20187
20188 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20189 "
20190
20191 _ACEOF
20192
20193 case $ac_config_files in *"
20194 "*) set x $ac_config_files; shift; ac_config_files=$*;;
20195 esac
20196
20197 case $ac_config_headers in *"
20198 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20199 esac
20200
20201
20202 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20203 # Files that config.status was made for.
20204 config_files="$ac_config_files"
20205 config_headers="$ac_config_headers"
20206 config_commands="$ac_config_commands"
20207
20208 _ACEOF
20209
20210 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20211 ac_cs_usage="\
20212 \`$as_me' instantiates files and other configuration actions
20213 from templates according to the current configuration.  Unless the files
20214 and actions are specified as TAGs, all are instantiated by default.
20215
20216 Usage: $0 [OPTION]... [TAG]...
20217
20218   -h, --help       print this help, then exit
20219   -V, --version    print version number and configuration settings, then exit
20220       --config     print configuration, then exit
20221   -q, --quiet, --silent
20222                    do not print progress messages
20223   -d, --debug      don't remove temporary files
20224       --recheck    update $as_me by reconfiguring in the same conditions
20225       --file=FILE[:TEMPLATE]
20226                    instantiate the configuration file FILE
20227       --header=FILE[:TEMPLATE]
20228                    instantiate the configuration header FILE
20229
20230 Configuration files:
20231 $config_files
20232
20233 Configuration headers:
20234 $config_headers
20235
20236 Configuration commands:
20237 $config_commands
20238
20239 Report bugs to <unbound-bugs@nlnetlabs.nl>."
20240
20241 _ACEOF
20242 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20243 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20244 ac_cs_version="\\
20245 unbound config.status 1.5.8
20246 configured by $0, generated by GNU Autoconf 2.69,
20247   with options \\"\$ac_cs_config\\"
20248
20249 Copyright (C) 2012 Free Software Foundation, Inc.
20250 This config.status script is free software; the Free Software Foundation
20251 gives unlimited permission to copy, distribute and modify it."
20252
20253 ac_pwd='$ac_pwd'
20254 srcdir='$srcdir'
20255 AWK='$AWK'
20256 test -n "\$AWK" || AWK=awk
20257 _ACEOF
20258
20259 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20260 # The default lists apply if the user does not specify any file.
20261 ac_need_defaults=:
20262 while test $# != 0
20263 do
20264   case $1 in
20265   --*=?*)
20266     ac_option=`expr "X$1" : 'X\([^=]*\)='`
20267     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20268     ac_shift=:
20269     ;;
20270   --*=)
20271     ac_option=`expr "X$1" : 'X\([^=]*\)='`
20272     ac_optarg=
20273     ac_shift=:
20274     ;;
20275   *)
20276     ac_option=$1
20277     ac_optarg=$2
20278     ac_shift=shift
20279     ;;
20280   esac
20281
20282   case $ac_option in
20283   # Handling of the options.
20284   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20285     ac_cs_recheck=: ;;
20286   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20287     $as_echo "$ac_cs_version"; exit ;;
20288   --config | --confi | --conf | --con | --co | --c )
20289     $as_echo "$ac_cs_config"; exit ;;
20290   --debug | --debu | --deb | --de | --d | -d )
20291     debug=: ;;
20292   --file | --fil | --fi | --f )
20293     $ac_shift
20294     case $ac_optarg in
20295     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20296     '') as_fn_error $? "missing file argument" ;;
20297     esac
20298     as_fn_append CONFIG_FILES " '$ac_optarg'"
20299     ac_need_defaults=false;;
20300   --header | --heade | --head | --hea )
20301     $ac_shift
20302     case $ac_optarg in
20303     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20304     esac
20305     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20306     ac_need_defaults=false;;
20307   --he | --h)
20308     # Conflict between --help and --header
20309     as_fn_error $? "ambiguous option: \`$1'
20310 Try \`$0 --help' for more information.";;
20311   --help | --hel | -h )
20312     $as_echo "$ac_cs_usage"; exit ;;
20313   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20314   | -silent | --silent | --silen | --sile | --sil | --si | --s)
20315     ac_cs_silent=: ;;
20316
20317   # This is an error.
20318   -*) as_fn_error $? "unrecognized option: \`$1'
20319 Try \`$0 --help' for more information." ;;
20320
20321   *) as_fn_append ac_config_targets " $1"
20322      ac_need_defaults=false ;;
20323
20324   esac
20325   shift
20326 done
20327
20328 ac_configure_extra_args=
20329
20330 if $ac_cs_silent; then
20331   exec 6>/dev/null
20332   ac_configure_extra_args="$ac_configure_extra_args --silent"
20333 fi
20334
20335 _ACEOF
20336 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20337 if \$ac_cs_recheck; then
20338   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20339   shift
20340   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20341   CONFIG_SHELL='$SHELL'
20342   export CONFIG_SHELL
20343   exec "\$@"
20344 fi
20345
20346 _ACEOF
20347 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20348 exec 5>>config.log
20349 {
20350   echo
20351   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20352 ## Running $as_me. ##
20353 _ASBOX
20354   $as_echo "$ac_log"
20355 } >&5
20356
20357 _ACEOF
20358 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20359 #
20360 # INIT-COMMANDS
20361 #
20362
20363
20364 # The HP-UX ksh and POSIX shell print the target directory to stdout
20365 # if CDPATH is set.
20366 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20367
20368 sed_quote_subst='$sed_quote_subst'
20369 double_quote_subst='$double_quote_subst'
20370 delay_variable_subst='$delay_variable_subst'
20371 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
20372 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
20373 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
20374 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
20375 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
20376 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
20377 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
20378 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
20379 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
20380 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
20381 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
20382 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
20383 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
20384 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
20385 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
20386 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
20387 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
20388 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
20389 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
20390 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
20391 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
20392 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
20393 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
20394 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
20395 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
20396 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
20397 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
20398 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
20399 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
20400 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
20401 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
20402 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
20403 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
20404 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
20405 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
20406 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
20407 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
20408 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
20409 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
20410 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
20411 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
20412 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
20413 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
20414 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
20415 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
20416 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
20417 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
20418 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
20419 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
20420 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
20421 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
20422 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
20423 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
20424 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
20425 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
20426 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
20427 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
20428 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
20429 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"`'
20430 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
20431 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
20432 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
20433 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
20434 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
20435 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
20436 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
20437 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
20438 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
20439 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
20440 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
20441 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
20442 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
20443 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
20444 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
20445 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
20446 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
20447 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
20448 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
20449 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
20450 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
20451 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
20452 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
20453 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
20454 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
20455 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
20456 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
20457 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
20458 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
20459 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
20460 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
20461 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
20462 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
20463 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
20464 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
20465 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
20466 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
20467 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
20468 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
20469 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
20470 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
20471 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
20472 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
20473 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
20474 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
20475 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
20476 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
20477 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
20478 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
20479 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
20480 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
20481 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
20482 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
20483 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
20484 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
20485 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
20486 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
20487 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
20488 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
20489 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
20490 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
20491 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
20492 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
20493 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
20494 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
20495 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
20496 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
20497 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
20498 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
20499 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
20500 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
20501 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
20502 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
20503 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
20504 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
20505 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
20506
20507 LTCC='$LTCC'
20508 LTCFLAGS='$LTCFLAGS'
20509 compiler='$compiler_DEFAULT'
20510
20511 # A function that is used when there is no print builtin or printf.
20512 func_fallback_echo ()
20513 {
20514   eval 'cat <<_LTECHO_EOF
20515 \$1
20516 _LTECHO_EOF'
20517 }
20518
20519 # Quote evaled strings.
20520 for var in SHELL \
20521 ECHO \
20522 PATH_SEPARATOR \
20523 SED \
20524 GREP \
20525 EGREP \
20526 FGREP \
20527 LD \
20528 NM \
20529 LN_S \
20530 lt_SP2NL \
20531 lt_NL2SP \
20532 reload_flag \
20533 OBJDUMP \
20534 deplibs_check_method \
20535 file_magic_cmd \
20536 file_magic_glob \
20537 want_nocaseglob \
20538 DLLTOOL \
20539 sharedlib_from_linklib_cmd \
20540 AR \
20541 AR_FLAGS \
20542 archiver_list_spec \
20543 STRIP \
20544 RANLIB \
20545 CC \
20546 CFLAGS \
20547 compiler \
20548 lt_cv_sys_global_symbol_pipe \
20549 lt_cv_sys_global_symbol_to_cdecl \
20550 lt_cv_sys_global_symbol_to_import \
20551 lt_cv_sys_global_symbol_to_c_name_address \
20552 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
20553 lt_cv_nm_interface \
20554 nm_file_list_spec \
20555 lt_cv_truncate_bin \
20556 lt_prog_compiler_no_builtin_flag \
20557 lt_prog_compiler_pic \
20558 lt_prog_compiler_wl \
20559 lt_prog_compiler_static \
20560 lt_cv_prog_compiler_c_o \
20561 need_locks \
20562 MANIFEST_TOOL \
20563 DSYMUTIL \
20564 NMEDIT \
20565 LIPO \
20566 OTOOL \
20567 OTOOL64 \
20568 shrext_cmds \
20569 export_dynamic_flag_spec \
20570 whole_archive_flag_spec \
20571 compiler_needs_object \
20572 with_gnu_ld \
20573 allow_undefined_flag \
20574 no_undefined_flag \
20575 hardcode_libdir_flag_spec \
20576 hardcode_libdir_separator \
20577 exclude_expsyms \
20578 include_expsyms \
20579 file_list_spec \
20580 variables_saved_for_relink \
20581 libname_spec \
20582 library_names_spec \
20583 soname_spec \
20584 install_override_mode \
20585 finish_eval \
20586 old_striplib \
20587 striplib; do
20588     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
20589     *[\\\\\\\`\\"\\\$]*)
20590       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
20591       ;;
20592     *)
20593       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
20594       ;;
20595     esac
20596 done
20597
20598 # Double-quote double-evaled strings.
20599 for var in reload_cmds \
20600 old_postinstall_cmds \
20601 old_postuninstall_cmds \
20602 old_archive_cmds \
20603 extract_expsyms_cmds \
20604 old_archive_from_new_cmds \
20605 old_archive_from_expsyms_cmds \
20606 archive_cmds \
20607 archive_expsym_cmds \
20608 module_cmds \
20609 module_expsym_cmds \
20610 export_symbols_cmds \
20611 prelink_cmds \
20612 postlink_cmds \
20613 postinstall_cmds \
20614 postuninstall_cmds \
20615 finish_cmds \
20616 sys_lib_search_path_spec \
20617 configure_time_dlsearch_path \
20618 configure_time_lt_sys_library_path; do
20619     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
20620     *[\\\\\\\`\\"\\\$]*)
20621       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
20622       ;;
20623     *)
20624       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
20625       ;;
20626     esac
20627 done
20628
20629 ac_aux_dir='$ac_aux_dir'
20630
20631 # See if we are running on zsh, and set the options that allow our
20632 # commands through without removal of \ escapes INIT.
20633 if test -n "\${ZSH_VERSION+set}"; then
20634    setopt NO_GLOB_SUBST
20635 fi
20636
20637
20638     PACKAGE='$PACKAGE'
20639     VERSION='$VERSION'
20640     RM='$RM'
20641     ofile='$ofile'
20642
20643
20644
20645
20646 _ACEOF
20647
20648 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20649
20650 # Handling of arguments.
20651 for ac_config_target in $ac_config_targets
20652 do
20653   case $ac_config_target in
20654     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
20655     "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
20656     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20657     "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
20658     "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
20659     "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
20660     "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
20661     "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
20662     "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
20663     "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
20664     "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
20665     "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
20666     "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
20667     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
20668
20669   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20670   esac
20671 done
20672
20673
20674 # If the user did not use the arguments to specify the items to instantiate,
20675 # then the envvar interface is used.  Set only those that are not.
20676 # We use the long form for the default assignment because of an extremely
20677 # bizarre bug on SunOS 4.1.3.
20678 if $ac_need_defaults; then
20679   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20680   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20681   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20682 fi
20683
20684 # Have a temporary directory for convenience.  Make it in the build tree
20685 # simply because there is no reason against having it here, and in addition,
20686 # creating and moving files from /tmp can sometimes cause problems.
20687 # Hook for its removal unless debugging.
20688 # Note that there is a small window in which the directory will not be cleaned:
20689 # after its creation but before its name has been assigned to `$tmp'.
20690 $debug ||
20691 {
20692   tmp= ac_tmp=
20693   trap 'exit_status=$?
20694   : "${ac_tmp:=$tmp}"
20695   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20696 ' 0
20697   trap 'as_fn_exit 1' 1 2 13 15
20698 }
20699 # Create a (secure) tmp directory for tmp files.
20700
20701 {
20702   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20703   test -d "$tmp"
20704 }  ||
20705 {
20706   tmp=./conf$$-$RANDOM
20707   (umask 077 && mkdir "$tmp")
20708 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20709 ac_tmp=$tmp
20710
20711 # Set up the scripts for CONFIG_FILES section.
20712 # No need to generate them if there are no CONFIG_FILES.
20713 # This happens for instance with `./config.status config.h'.
20714 if test -n "$CONFIG_FILES"; then
20715
20716
20717 ac_cr=`echo X | tr X '\015'`
20718 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20719 # But we know of no other shell where ac_cr would be empty at this
20720 # point, so we can use a bashism as a fallback.
20721 if test "x$ac_cr" = x; then
20722   eval ac_cr=\$\'\\r\'
20723 fi
20724 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20725 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20726   ac_cs_awk_cr='\\r'
20727 else
20728   ac_cs_awk_cr=$ac_cr
20729 fi
20730
20731 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20732 _ACEOF
20733
20734
20735 {
20736   echo "cat >conf$$subs.awk <<_ACEOF" &&
20737   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20738   echo "_ACEOF"
20739 } >conf$$subs.sh ||
20740   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20741 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20742 ac_delim='%!_!# '
20743 for ac_last_try in false false false false false :; do
20744   . ./conf$$subs.sh ||
20745     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20746
20747   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20748   if test $ac_delim_n = $ac_delim_num; then
20749     break
20750   elif $ac_last_try; then
20751     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20752   else
20753     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20754   fi
20755 done
20756 rm -f conf$$subs.sh
20757
20758 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20759 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20760 _ACEOF
20761 sed -n '
20762 h
20763 s/^/S["/; s/!.*/"]=/
20764 p
20765 g
20766 s/^[^!]*!//
20767 :repl
20768 t repl
20769 s/'"$ac_delim"'$//
20770 t delim
20771 :nl
20772 h
20773 s/\(.\{148\}\)..*/\1/
20774 t more1
20775 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20776 p
20777 n
20778 b repl
20779 :more1
20780 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20781 p
20782 g
20783 s/.\{148\}//
20784 t nl
20785 :delim
20786 h
20787 s/\(.\{148\}\)..*/\1/
20788 t more2
20789 s/["\\]/\\&/g; s/^/"/; s/$/"/
20790 p
20791 b
20792 :more2
20793 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20794 p
20795 g
20796 s/.\{148\}//
20797 t delim
20798 ' <conf$$subs.awk | sed '
20799 /^[^""]/{
20800   N
20801   s/\n//
20802 }
20803 ' >>$CONFIG_STATUS || ac_write_fail=1
20804 rm -f conf$$subs.awk
20805 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20806 _ACAWK
20807 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20808   for (key in S) S_is_set[key] = 1
20809   FS = "\a"
20810
20811 }
20812 {
20813   line = $ 0
20814   nfields = split(line, field, "@")
20815   substed = 0
20816   len = length(field[1])
20817   for (i = 2; i < nfields; i++) {
20818     key = field[i]
20819     keylen = length(key)
20820     if (S_is_set[key]) {
20821       value = S[key]
20822       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20823       len += length(value) + length(field[++i])
20824       substed = 1
20825     } else
20826       len += 1 + keylen
20827   }
20828
20829   print line
20830 }
20831
20832 _ACAWK
20833 _ACEOF
20834 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20835 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20836   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20837 else
20838   cat
20839 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20840   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20841 _ACEOF
20842
20843 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20844 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20845 # trailing colons and then remove the whole line if VPATH becomes empty
20846 # (actually we leave an empty line to preserve line numbers).
20847 if test "x$srcdir" = x.; then
20848   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
20849 h
20850 s///
20851 s/^/:/
20852 s/[      ]*$/:/
20853 s/:\$(srcdir):/:/g
20854 s/:\${srcdir}:/:/g
20855 s/:@srcdir@:/:/g
20856 s/^:*//
20857 s/:*$//
20858 x
20859 s/\(=[   ]*\).*/\1/
20860 G
20861 s/\n//
20862 s/^[^=]*=[       ]*$//
20863 }'
20864 fi
20865
20866 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20867 fi # test -n "$CONFIG_FILES"
20868
20869 # Set up the scripts for CONFIG_HEADERS section.
20870 # No need to generate them if there are no CONFIG_HEADERS.
20871 # This happens for instance with `./config.status Makefile'.
20872 if test -n "$CONFIG_HEADERS"; then
20873 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20874 BEGIN {
20875 _ACEOF
20876
20877 # Transform confdefs.h into an awk script `defines.awk', embedded as
20878 # here-document in config.status, that substitutes the proper values into
20879 # config.h.in to produce config.h.
20880
20881 # Create a delimiter string that does not exist in confdefs.h, to ease
20882 # handling of long lines.
20883 ac_delim='%!_!# '
20884 for ac_last_try in false false :; do
20885   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20886   if test -z "$ac_tt"; then
20887     break
20888   elif $ac_last_try; then
20889     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20890   else
20891     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20892   fi
20893 done
20894
20895 # For the awk script, D is an array of macro values keyed by name,
20896 # likewise P contains macro parameters if any.  Preserve backslash
20897 # newline sequences.
20898
20899 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20900 sed -n '
20901 s/.\{148\}/&'"$ac_delim"'/g
20902 t rset
20903 :rset
20904 s/^[     ]*#[    ]*define[       ][      ]*/ /
20905 t def
20906 d
20907 :def
20908 s/\\$//
20909 t bsnl
20910 s/["\\]/\\&/g
20911 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20912 D["\1"]=" \3"/p
20913 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
20914 d
20915 :bsnl
20916 s/["\\]/\\&/g
20917 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20918 D["\1"]=" \3\\\\\\n"\\/p
20919 t cont
20920 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20921 t cont
20922 d
20923 :cont
20924 n
20925 s/.\{148\}/&'"$ac_delim"'/g
20926 t clear
20927 :clear
20928 s/\\$//
20929 t bsnlc
20930 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20931 d
20932 :bsnlc
20933 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20934 b cont
20935 ' <confdefs.h | sed '
20936 s/'"$ac_delim"'/"\\\
20937 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20938
20939 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20940   for (key in D) D_is_set[key] = 1
20941   FS = "\a"
20942 }
20943 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20944   line = \$ 0
20945   split(line, arg, " ")
20946   if (arg[1] == "#") {
20947     defundef = arg[2]
20948     mac1 = arg[3]
20949   } else {
20950     defundef = substr(arg[1], 2)
20951     mac1 = arg[2]
20952   }
20953   split(mac1, mac2, "(") #)
20954   macro = mac2[1]
20955   prefix = substr(line, 1, index(line, defundef) - 1)
20956   if (D_is_set[macro]) {
20957     # Preserve the white space surrounding the "#".
20958     print prefix "define", macro P[macro] D[macro]
20959     next
20960   } else {
20961     # Replace #undef with comments.  This is necessary, for example,
20962     # in the case of _POSIX_SOURCE, which is predefined and required
20963     # on some systems where configure will not decide to define it.
20964     if (defundef == "undef") {
20965       print "/*", prefix defundef, macro, "*/"
20966       next
20967     }
20968   }
20969 }
20970 { print }
20971 _ACAWK
20972 _ACEOF
20973 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20974   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20975 fi # test -n "$CONFIG_HEADERS"
20976
20977
20978 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
20979 shift
20980 for ac_tag
20981 do
20982   case $ac_tag in
20983   :[FHLC]) ac_mode=$ac_tag; continue;;
20984   esac
20985   case $ac_mode$ac_tag in
20986   :[FHL]*:*);;
20987   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20988   :[FH]-) ac_tag=-:-;;
20989   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20990   esac
20991   ac_save_IFS=$IFS
20992   IFS=:
20993   set x $ac_tag
20994   IFS=$ac_save_IFS
20995   shift
20996   ac_file=$1
20997   shift
20998
20999   case $ac_mode in
21000   :L) ac_source=$1;;
21001   :[FH])
21002     ac_file_inputs=
21003     for ac_f
21004     do
21005       case $ac_f in
21006       -) ac_f="$ac_tmp/stdin";;
21007       *) # Look for the file first in the build tree, then in the source tree
21008          # (if the path is not absolute).  The absolute path cannot be DOS-style,
21009          # because $ac_f cannot contain `:'.
21010          test -f "$ac_f" ||
21011            case $ac_f in
21012            [\\/$]*) false;;
21013            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21014            esac ||
21015            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
21016       esac
21017       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
21018       as_fn_append ac_file_inputs " '$ac_f'"
21019     done
21020
21021     # Let's still pretend it is `configure' which instantiates (i.e., don't
21022     # use $as_me), people would be surprised to read:
21023     #    /* config.h.  Generated by config.status.  */
21024     configure_input='Generated from '`
21025           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
21026         `' by configure.'
21027     if test x"$ac_file" != x-; then
21028       configure_input="$ac_file.  $configure_input"
21029       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21030 $as_echo "$as_me: creating $ac_file" >&6;}
21031     fi
21032     # Neutralize special characters interpreted by sed in replacement strings.
21033     case $configure_input in #(
21034     *\&* | *\|* | *\\* )
21035        ac_sed_conf_input=`$as_echo "$configure_input" |
21036        sed 's/[\\\\&|]/\\\\&/g'`;; #(
21037     *) ac_sed_conf_input=$configure_input;;
21038     esac
21039
21040     case $ac_tag in
21041     *:-:* | *:-) cat >"$ac_tmp/stdin" \
21042       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
21043     esac
21044     ;;
21045   esac
21046
21047   ac_dir=`$as_dirname -- "$ac_file" ||
21048 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21049          X"$ac_file" : 'X\(//\)[^/]' \| \
21050          X"$ac_file" : 'X\(//\)$' \| \
21051          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21052 $as_echo X"$ac_file" |
21053     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21054             s//\1/
21055             q
21056           }
21057           /^X\(\/\/\)[^/].*/{
21058             s//\1/
21059             q
21060           }
21061           /^X\(\/\/\)$/{
21062             s//\1/
21063             q
21064           }
21065           /^X\(\/\).*/{
21066             s//\1/
21067             q
21068           }
21069           s/.*/./; q'`
21070   as_dir="$ac_dir"; as_fn_mkdir_p
21071   ac_builddir=.
21072
21073 case "$ac_dir" in
21074 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21075 *)
21076   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21077   # A ".." for each directory in $ac_dir_suffix.
21078   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21079   case $ac_top_builddir_sub in
21080   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21081   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21082   esac ;;
21083 esac
21084 ac_abs_top_builddir=$ac_pwd
21085 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21086 # for backward compatibility:
21087 ac_top_builddir=$ac_top_build_prefix
21088
21089 case $srcdir in
21090   .)  # We are building in place.
21091     ac_srcdir=.
21092     ac_top_srcdir=$ac_top_builddir_sub
21093     ac_abs_top_srcdir=$ac_pwd ;;
21094   [\\/]* | ?:[\\/]* )  # Absolute name.
21095     ac_srcdir=$srcdir$ac_dir_suffix;
21096     ac_top_srcdir=$srcdir
21097     ac_abs_top_srcdir=$srcdir ;;
21098   *) # Relative name.
21099     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21100     ac_top_srcdir=$ac_top_build_prefix$srcdir
21101     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21102 esac
21103 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21104
21105
21106   case $ac_mode in
21107   :F)
21108   #
21109   # CONFIG_FILE
21110   #
21111
21112 _ACEOF
21113
21114 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21115 # If the template does not know about datarootdir, expand it.
21116 # FIXME: This hack should be removed a few years after 2.60.
21117 ac_datarootdir_hack=; ac_datarootdir_seen=
21118 ac_sed_dataroot='
21119 /datarootdir/ {
21120   p
21121   q
21122 }
21123 /@datadir@/p
21124 /@docdir@/p
21125 /@infodir@/p
21126 /@localedir@/p
21127 /@mandir@/p'
21128 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21129 *datarootdir*) ac_datarootdir_seen=yes;;
21130 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21131   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21132 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21133 _ACEOF
21134 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21135   ac_datarootdir_hack='
21136   s&@datadir@&$datadir&g
21137   s&@docdir@&$docdir&g
21138   s&@infodir@&$infodir&g
21139   s&@localedir@&$localedir&g
21140   s&@mandir@&$mandir&g
21141   s&\\\${datarootdir}&$datarootdir&g' ;;
21142 esac
21143 _ACEOF
21144
21145 # Neutralize VPATH when `$srcdir' = `.'.
21146 # Shell code in configure.ac might set extrasub.
21147 # FIXME: do we really want to maintain this feature?
21148 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21149 ac_sed_extra="$ac_vpsub
21150 $extrasub
21151 _ACEOF
21152 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21153 :t
21154 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21155 s|@configure_input@|$ac_sed_conf_input|;t t
21156 s&@top_builddir@&$ac_top_builddir_sub&;t t
21157 s&@top_build_prefix@&$ac_top_build_prefix&;t t
21158 s&@srcdir@&$ac_srcdir&;t t
21159 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21160 s&@top_srcdir@&$ac_top_srcdir&;t t
21161 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21162 s&@builddir@&$ac_builddir&;t t
21163 s&@abs_builddir@&$ac_abs_builddir&;t t
21164 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21165 $ac_datarootdir_hack
21166 "
21167 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
21168   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21169
21170 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21171   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21172   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
21173       "$ac_tmp/out"`; test -z "$ac_out"; } &&
21174   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21175 which seems to be undefined.  Please make sure it is defined" >&5
21176 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21177 which seems to be undefined.  Please make sure it is defined" >&2;}
21178
21179   rm -f "$ac_tmp/stdin"
21180   case $ac_file in
21181   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21182   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
21183   esac \
21184   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21185  ;;
21186   :H)
21187   #
21188   # CONFIG_HEADER
21189   #
21190   if test x"$ac_file" != x-; then
21191     {
21192       $as_echo "/* $configure_input  */" \
21193       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21194     } >"$ac_tmp/config.h" \
21195       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21196     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
21197       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21198 $as_echo "$as_me: $ac_file is unchanged" >&6;}
21199     else
21200       rm -f "$ac_file"
21201       mv "$ac_tmp/config.h" "$ac_file" \
21202         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21203     fi
21204   else
21205     $as_echo "/* $configure_input  */" \
21206       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
21207       || as_fn_error $? "could not create -" "$LINENO" 5
21208   fi
21209  ;;
21210
21211   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
21212 $as_echo "$as_me: executing $ac_file commands" >&6;}
21213  ;;
21214   esac
21215
21216
21217   case $ac_file$ac_mode in
21218     "libtool":C)
21219
21220     # See if we are running on zsh, and set the options that allow our
21221     # commands through without removal of \ escapes.
21222     if test -n "${ZSH_VERSION+set}"; then
21223       setopt NO_GLOB_SUBST
21224     fi
21225
21226     cfgfile=${ofile}T
21227     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
21228     $RM "$cfgfile"
21229
21230     cat <<_LT_EOF >> "$cfgfile"
21231 #! $SHELL
21232 # Generated automatically by $as_me ($PACKAGE) $VERSION
21233 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
21234 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
21235
21236 # Provide generalized library-building support services.
21237 # Written by Gordon Matzigkeit, 1996
21238
21239 # Copyright (C) 2014 Free Software Foundation, Inc.
21240 # This is free software; see the source for copying conditions.  There is NO
21241 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21242
21243 # GNU Libtool is free software; you can redistribute it and/or modify
21244 # it under the terms of the GNU General Public License as published by
21245 # the Free Software Foundation; either version 2 of of the License, or
21246 # (at your option) any later version.
21247 #
21248 # As a special exception to the GNU General Public License, if you
21249 # distribute this file as part of a program or library that is built
21250 # using GNU Libtool, you may include this file under the  same
21251 # distribution terms that you use for the rest of that program.
21252 #
21253 # GNU Libtool is distributed in the hope that it will be useful, but
21254 # WITHOUT ANY WARRANTY; without even the implied warranty of
21255 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21256 # GNU General Public License for more details.
21257 #
21258 # You should have received a copy of the GNU General Public License
21259 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
21260
21261
21262 # The names of the tagged configurations supported by this script.
21263 available_tags=''
21264
21265 # Configured defaults for sys_lib_dlsearch_path munging.
21266 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
21267
21268 # ### BEGIN LIBTOOL CONFIG
21269
21270 # Which release of libtool.m4 was used?
21271 macro_version=$macro_version
21272 macro_revision=$macro_revision
21273
21274 # Whether or not to build shared libraries.
21275 build_libtool_libs=$enable_shared
21276
21277 # Whether or not to build static libraries.
21278 build_old_libs=$enable_static
21279
21280 # What type of objects to build.
21281 pic_mode=$pic_mode
21282
21283 # Whether or not to optimize for fast installation.
21284 fast_install=$enable_fast_install
21285
21286 # Shared archive member basename,for filename based shared library versioning on AIX.
21287 shared_archive_member_spec=$shared_archive_member_spec
21288
21289 # Shell to use when invoking shell scripts.
21290 SHELL=$lt_SHELL
21291
21292 # An echo program that protects backslashes.
21293 ECHO=$lt_ECHO
21294
21295 # The PATH separator for the build system.
21296 PATH_SEPARATOR=$lt_PATH_SEPARATOR
21297
21298 # The host system.
21299 host_alias=$host_alias
21300 host=$host
21301 host_os=$host_os
21302
21303 # The build system.
21304 build_alias=$build_alias
21305 build=$build
21306 build_os=$build_os
21307
21308 # A sed program that does not truncate output.
21309 SED=$lt_SED
21310
21311 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
21312 Xsed="\$SED -e 1s/^X//"
21313
21314 # A grep program that handles long lines.
21315 GREP=$lt_GREP
21316
21317 # An ERE matcher.
21318 EGREP=$lt_EGREP
21319
21320 # A literal string matcher.
21321 FGREP=$lt_FGREP
21322
21323 # A BSD- or MS-compatible name lister.
21324 NM=$lt_NM
21325
21326 # Whether we need soft or hard links.
21327 LN_S=$lt_LN_S
21328
21329 # What is the maximum length of a command?
21330 max_cmd_len=$max_cmd_len
21331
21332 # Object file suffix (normally "o").
21333 objext=$ac_objext
21334
21335 # Executable file suffix (normally "").
21336 exeext=$exeext
21337
21338 # whether the shell understands "unset".
21339 lt_unset=$lt_unset
21340
21341 # turn spaces into newlines.
21342 SP2NL=$lt_lt_SP2NL
21343
21344 # turn newlines into spaces.
21345 NL2SP=$lt_lt_NL2SP
21346
21347 # convert \$build file names to \$host format.
21348 to_host_file_cmd=$lt_cv_to_host_file_cmd
21349
21350 # convert \$build files to toolchain format.
21351 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
21352
21353 # An object symbol dumper.
21354 OBJDUMP=$lt_OBJDUMP
21355
21356 # Method to check whether dependent libraries are shared objects.
21357 deplibs_check_method=$lt_deplibs_check_method
21358
21359 # Command to use when deplibs_check_method = "file_magic".
21360 file_magic_cmd=$lt_file_magic_cmd
21361
21362 # How to find potential files when deplibs_check_method = "file_magic".
21363 file_magic_glob=$lt_file_magic_glob
21364
21365 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
21366 want_nocaseglob=$lt_want_nocaseglob
21367
21368 # DLL creation program.
21369 DLLTOOL=$lt_DLLTOOL
21370
21371 # Command to associate shared and link libraries.
21372 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
21373
21374 # The archiver.
21375 AR=$lt_AR
21376
21377 # Flags to create an archive.
21378 AR_FLAGS=$lt_AR_FLAGS
21379
21380 # How to feed a file listing to the archiver.
21381 archiver_list_spec=$lt_archiver_list_spec
21382
21383 # A symbol stripping program.
21384 STRIP=$lt_STRIP
21385
21386 # Commands used to install an old-style archive.
21387 RANLIB=$lt_RANLIB
21388 old_postinstall_cmds=$lt_old_postinstall_cmds
21389 old_postuninstall_cmds=$lt_old_postuninstall_cmds
21390
21391 # Whether to use a lock for old archive extraction.
21392 lock_old_archive_extraction=$lock_old_archive_extraction
21393
21394 # A C compiler.
21395 LTCC=$lt_CC
21396
21397 # LTCC compiler flags.
21398 LTCFLAGS=$lt_CFLAGS
21399
21400 # Take the output of nm and produce a listing of raw symbols and C names.
21401 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
21402
21403 # Transform the output of nm in a proper C declaration.
21404 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
21405
21406 # Transform the output of nm into a list of symbols to manually relocate.
21407 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
21408
21409 # Transform the output of nm in a C name address pair.
21410 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
21411
21412 # Transform the output of nm in a C name address pair when lib prefix is needed.
21413 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
21414
21415 # The name lister interface.
21416 nm_interface=$lt_lt_cv_nm_interface
21417
21418 # Specify filename containing input files for \$NM.
21419 nm_file_list_spec=$lt_nm_file_list_spec
21420
21421 # The root where to search for dependent libraries,and where our libraries should be installed.
21422 lt_sysroot=$lt_sysroot
21423
21424 # Command to truncate a binary pipe.
21425 lt_truncate_bin=$lt_lt_cv_truncate_bin
21426
21427 # The name of the directory that contains temporary libtool files.
21428 objdir=$objdir
21429
21430 # Used to examine libraries when file_magic_cmd begins with "file".
21431 MAGIC_CMD=$MAGIC_CMD
21432
21433 # Must we lock files when doing compilation?
21434 need_locks=$lt_need_locks
21435
21436 # Manifest tool.
21437 MANIFEST_TOOL=$lt_MANIFEST_TOOL
21438
21439 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
21440 DSYMUTIL=$lt_DSYMUTIL
21441
21442 # Tool to change global to local symbols on Mac OS X.
21443 NMEDIT=$lt_NMEDIT
21444
21445 # Tool to manipulate fat objects and archives on Mac OS X.
21446 LIPO=$lt_LIPO
21447
21448 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
21449 OTOOL=$lt_OTOOL
21450
21451 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
21452 OTOOL64=$lt_OTOOL64
21453
21454 # Old archive suffix (normally "a").
21455 libext=$libext
21456
21457 # Shared library suffix (normally ".so").
21458 shrext_cmds=$lt_shrext_cmds
21459
21460 # The commands to extract the exported symbol list from a shared archive.
21461 extract_expsyms_cmds=$lt_extract_expsyms_cmds
21462
21463 # Variables whose values should be saved in libtool wrapper scripts and
21464 # restored at link time.
21465 variables_saved_for_relink=$lt_variables_saved_for_relink
21466
21467 # Do we need the "lib" prefix for modules?
21468 need_lib_prefix=$need_lib_prefix
21469
21470 # Do we need a version for libraries?
21471 need_version=$need_version
21472
21473 # Library versioning type.
21474 version_type=$version_type
21475
21476 # Shared library runtime path variable.
21477 runpath_var=$runpath_var
21478
21479 # Shared library path variable.
21480 shlibpath_var=$shlibpath_var
21481
21482 # Is shlibpath searched before the hard-coded library search path?
21483 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
21484
21485 # Format of library name prefix.
21486 libname_spec=$lt_libname_spec
21487
21488 # List of archive names.  First name is the real one, the rest are links.
21489 # The last name is the one that the linker finds with -lNAME
21490 library_names_spec=$lt_library_names_spec
21491
21492 # The coded name of the library, if different from the real name.
21493 soname_spec=$lt_soname_spec
21494
21495 # Permission mode override for installation of shared libraries.
21496 install_override_mode=$lt_install_override_mode
21497
21498 # Command to use after installation of a shared archive.
21499 postinstall_cmds=$lt_postinstall_cmds
21500
21501 # Command to use after uninstallation of a shared archive.
21502 postuninstall_cmds=$lt_postuninstall_cmds
21503
21504 # Commands used to finish a libtool library installation in a directory.
21505 finish_cmds=$lt_finish_cmds
21506
21507 # As "finish_cmds", except a single script fragment to be evaled but
21508 # not shown.
21509 finish_eval=$lt_finish_eval
21510
21511 # Whether we should hardcode library paths into libraries.
21512 hardcode_into_libs=$hardcode_into_libs
21513
21514 # Compile-time system search path for libraries.
21515 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
21516
21517 # Detected run-time system search path for libraries.
21518 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
21519
21520 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
21521 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
21522
21523 # Whether dlopen is supported.
21524 dlopen_support=$enable_dlopen
21525
21526 # Whether dlopen of programs is supported.
21527 dlopen_self=$enable_dlopen_self
21528
21529 # Whether dlopen of statically linked programs is supported.
21530 dlopen_self_static=$enable_dlopen_self_static
21531
21532 # Commands to strip libraries.
21533 old_striplib=$lt_old_striplib
21534 striplib=$lt_striplib
21535
21536
21537 # The linker used to build libraries.
21538 LD=$lt_LD
21539
21540 # How to create reloadable object files.
21541 reload_flag=$lt_reload_flag
21542 reload_cmds=$lt_reload_cmds
21543
21544 # Commands used to build an old-style archive.
21545 old_archive_cmds=$lt_old_archive_cmds
21546
21547 # A language specific compiler.
21548 CC=$lt_compiler
21549
21550 # Is the compiler the GNU compiler?
21551 with_gcc=$GCC
21552
21553 # Compiler flag to turn off builtin functions.
21554 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
21555
21556 # Additional compiler flags for building library objects.
21557 pic_flag=$lt_lt_prog_compiler_pic
21558
21559 # How to pass a linker flag through the compiler.
21560 wl=$lt_lt_prog_compiler_wl
21561
21562 # Compiler flag to prevent dynamic linking.
21563 link_static_flag=$lt_lt_prog_compiler_static
21564
21565 # Does compiler simultaneously support -c and -o options?
21566 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
21567
21568 # Whether or not to add -lc for building shared libraries.
21569 build_libtool_need_lc=$archive_cmds_need_lc
21570
21571 # Whether or not to disallow shared libs when runtime libs are static.
21572 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
21573
21574 # Compiler flag to allow reflexive dlopens.
21575 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
21576
21577 # Compiler flag to generate shared objects directly from archives.
21578 whole_archive_flag_spec=$lt_whole_archive_flag_spec
21579
21580 # Whether the compiler copes with passing no objects directly.
21581 compiler_needs_object=$lt_compiler_needs_object
21582
21583 # Create an old-style archive from a shared archive.
21584 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
21585
21586 # Create a temporary old-style archive to link instead of a shared archive.
21587 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
21588
21589 # Commands used to build a shared archive.
21590 archive_cmds=$lt_archive_cmds
21591 archive_expsym_cmds=$lt_archive_expsym_cmds
21592
21593 # Commands used to build a loadable module if different from building
21594 # a shared archive.
21595 module_cmds=$lt_module_cmds
21596 module_expsym_cmds=$lt_module_expsym_cmds
21597
21598 # Whether we are building with GNU ld or not.
21599 with_gnu_ld=$lt_with_gnu_ld
21600
21601 # Flag that allows shared libraries with undefined symbols to be built.
21602 allow_undefined_flag=$lt_allow_undefined_flag
21603
21604 # Flag that enforces no undefined symbols.
21605 no_undefined_flag=$lt_no_undefined_flag
21606
21607 # Flag to hardcode \$libdir into a binary during linking.
21608 # This must work even if \$libdir does not exist
21609 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
21610
21611 # Whether we need a single "-rpath" flag with a separated argument.
21612 hardcode_libdir_separator=$lt_hardcode_libdir_separator
21613
21614 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
21615 # DIR into the resulting binary.
21616 hardcode_direct=$hardcode_direct
21617
21618 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
21619 # DIR into the resulting binary and the resulting library dependency is
21620 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
21621 # library is relocated.
21622 hardcode_direct_absolute=$hardcode_direct_absolute
21623
21624 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
21625 # into the resulting binary.
21626 hardcode_minus_L=$hardcode_minus_L
21627
21628 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
21629 # into the resulting binary.
21630 hardcode_shlibpath_var=$hardcode_shlibpath_var
21631
21632 # Set to "yes" if building a shared library automatically hardcodes DIR
21633 # into the library and all subsequent libraries and executables linked
21634 # against it.
21635 hardcode_automatic=$hardcode_automatic
21636
21637 # Set to yes if linker adds runtime paths of dependent libraries
21638 # to runtime path list.
21639 inherit_rpath=$inherit_rpath
21640
21641 # Whether libtool must link a program against all its dependency libraries.
21642 link_all_deplibs=$link_all_deplibs
21643
21644 # Set to "yes" if exported symbols are required.
21645 always_export_symbols=$always_export_symbols
21646
21647 # The commands to list exported symbols.
21648 export_symbols_cmds=$lt_export_symbols_cmds
21649
21650 # Symbols that should not be listed in the preloaded symbols.
21651 exclude_expsyms=$lt_exclude_expsyms
21652
21653 # Symbols that must always be exported.
21654 include_expsyms=$lt_include_expsyms
21655
21656 # Commands necessary for linking programs (against libraries) with templates.
21657 prelink_cmds=$lt_prelink_cmds
21658
21659 # Commands necessary for finishing linking programs.
21660 postlink_cmds=$lt_postlink_cmds
21661
21662 # Specify filename containing input files.
21663 file_list_spec=$lt_file_list_spec
21664
21665 # How to hardcode a shared library path into an executable.
21666 hardcode_action=$hardcode_action
21667
21668 # ### END LIBTOOL CONFIG
21669
21670 _LT_EOF
21671
21672     cat <<'_LT_EOF' >> "$cfgfile"
21673
21674 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
21675
21676 # func_munge_path_list VARIABLE PATH
21677 # -----------------------------------
21678 # VARIABLE is name of variable containing _space_ separated list of
21679 # directories to be munged by the contents of PATH, which is string
21680 # having a format:
21681 # "DIR[:DIR]:"
21682 #       string "DIR[ DIR]" will be prepended to VARIABLE
21683 # ":DIR[:DIR]"
21684 #       string "DIR[ DIR]" will be appended to VARIABLE
21685 # "DIRP[:DIRP]::[DIRA:]DIRA"
21686 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
21687 #       "DIRA[ DIRA]" will be appended to VARIABLE
21688 # "DIR[:DIR]"
21689 #       VARIABLE will be replaced by "DIR[ DIR]"
21690 func_munge_path_list ()
21691 {
21692     case x$2 in
21693     x)
21694         ;;
21695     *:)
21696         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
21697         ;;
21698     x:*)
21699         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
21700         ;;
21701     *::*)
21702         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
21703         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
21704         ;;
21705     *)
21706         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
21707         ;;
21708     esac
21709 }
21710
21711
21712 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
21713 func_cc_basename ()
21714 {
21715     for cc_temp in $*""; do
21716       case $cc_temp in
21717         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
21718         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
21719         \-*) ;;
21720         *) break;;
21721       esac
21722     done
21723     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
21724 }
21725
21726
21727 # ### END FUNCTIONS SHARED WITH CONFIGURE
21728
21729 _LT_EOF
21730
21731   case $host_os in
21732   aix3*)
21733     cat <<\_LT_EOF >> "$cfgfile"
21734 # AIX sometimes has problems with the GCC collect2 program.  For some
21735 # reason, if we set the COLLECT_NAMES environment variable, the problems
21736 # vanish in a puff of smoke.
21737 if test set != "${COLLECT_NAMES+set}"; then
21738   COLLECT_NAMES=
21739   export COLLECT_NAMES
21740 fi
21741 _LT_EOF
21742     ;;
21743   esac
21744
21745
21746 ltmain=$ac_aux_dir/ltmain.sh
21747
21748
21749   # We use sed instead of cat because bash on DJGPP gets confused if
21750   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
21751   # text mode, it properly converts lines to CR/LF.  This bash problem
21752   # is reportedly fixed, but why not run on old versions too?
21753   sed '$q' "$ltmain" >> "$cfgfile" \
21754      || (rm -f "$cfgfile"; exit 1)
21755
21756    mv -f "$cfgfile" "$ofile" ||
21757     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
21758   chmod +x "$ofile"
21759
21760  ;;
21761     "disable-rpath":C)
21762         sed < libtool > libtool-2 \
21763         's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
21764         mv libtool-2 libtool
21765         chmod 755 libtool
21766         libtool="./libtool"
21767          ;;
21768
21769   esac
21770 done # for ac_tag
21771
21772
21773 as_fn_exit 0
21774 _ACEOF
21775 ac_clean_files=$ac_clean_files_save
21776
21777 test $ac_write_fail = 0 ||
21778   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
21779
21780
21781 # configure is writing to config.log, and then calls config.status.
21782 # config.status does its own redirection, appending to config.log.
21783 # Unfortunately, on DOS this fails, as config.log is still kept open
21784 # by configure, so config.status won't be able to write to it; its
21785 # output is simply discarded.  So we exec the FD to /dev/null,
21786 # effectively closing config.log, so it can be properly (re)opened and
21787 # appended to by config.status.  When coming back to configure, we
21788 # need to make the FD available again.
21789 if test "$no_create" != yes; then
21790   ac_cs_success=:
21791   ac_config_status_args=
21792   test "$silent" = yes &&
21793     ac_config_status_args="$ac_config_status_args --quiet"
21794   exec 5>/dev/null
21795   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21796   exec 5>>config.log
21797   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21798   # would make configure fail if this is the last instruction.
21799   $ac_cs_success || as_fn_exit 1
21800 fi
21801 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21802   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21803 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
21804 fi
21805