configure revision 1.1.1.4 1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for unbound 1.9.1.
4 #
5 # Report bugs to <unbound-bugs (at] 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 (at] gnu.org and
278 $0: unbound-bugs (at] 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.9.1'
594 PACKAGE_STRING='unbound 1.9.1'
595 PACKAGE_BUGREPORT='unbound-bugs (at] nlnetlabs.nl'
596 PACKAGE_URL=''
597
598 # Factoring default headers for most tests.
599 ac_includes_default="\
600 #include <stdio.h>
601 #ifdef HAVE_SYS_TYPES_H
602 # include <sys/types.h>
603 #endif
604 #ifdef HAVE_SYS_STAT_H
605 # include <sys/stat.h>
606 #endif
607 #ifdef STDC_HEADERS
608 # include <stdlib.h>
609 # include <stddef.h>
610 #else
611 # ifdef HAVE_STDLIB_H
612 # include <stdlib.h>
613 # endif
614 #endif
615 #ifdef HAVE_STRING_H
616 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
617 # include <memory.h>
618 # endif
619 # include <string.h>
620 #endif
621 #ifdef HAVE_STRINGS_H
622 # include <strings.h>
623 #endif
624 #ifdef HAVE_INTTYPES_H
625 # include <inttypes.h>
626 #endif
627 #ifdef HAVE_STDINT_H
628 # include <stdint.h>
629 #endif
630 #ifdef HAVE_UNISTD_H
631 # include <unistd.h>
632 #endif"
633
634 ac_subst_vars='LTLIBOBJS
635 date
636 version
637 INSTALLTARGET
638 ALLTARGET
639 SOURCEFILE
640 SOURCEDETERMINE
641 IPSECMOD_HEADER
642 IPSECMOD_OBJ
643 DNSCRYPT_OBJ
644 DNSCRYPT_SRC
645 ENABLE_DNSCRYPT
646 ENABLE_DNSCRYPT_XCHACHA20
647 DNSTAP_OBJ
648 DNSTAP_SRC
649 opt_dnstap_socket_path
650 ENABLE_DNSTAP
651 PROTOC_C
652 UBSYMS
653 EXTRALINK
654 COMMON_OBJ_ALL_SYMBOLS
655 LIBOBJ_WITHOUT_CTIME
656 LIBOBJ_WITHOUT_CTIMEARC4
657 WIN_CHECKCONF_OBJ_LINK
658 WIN_CONTROL_OBJ_LINK
659 WIN_UBANCHOR_OBJ_LINK
660 WIN_HOST_OBJ_LINK
661 WIN_DAEMON_OBJ_LINK
662 WIN_DAEMON_OBJ
663 WIN_DAEMON_SRC
664 WINAPPS
665 WINDRES
666 CHECKLOCK_OBJ
667 USE_SYSTEMD_FALSE
668 USE_SYSTEMD_TRUE
669 SYSTEMD_DAEMON_LIBS
670 SYSTEMD_DAEMON_CFLAGS
671 SYSTEMD_LIBS
672 SYSTEMD_CFLAGS
673 staticexe
674 PC_LIBEVENT_DEPENDENCY
675 UNBOUND_EVENT_UNINSTALL
676 UNBOUND_EVENT_INSTALL
677 SUBNET_HEADER
678 SUBNET_OBJ
679 SSLLIB
680 HAVE_SSL
681 CONFIG_DATE
682 NETBSD_LINTFLAGS
683 PYUNBOUND_UNINSTALL
684 PYUNBOUND_INSTALL
685 PYUNBOUND_TARGET
686 PYUNBOUND_OBJ
687 WITH_PYUNBOUND
688 PYTHONMOD_UNINSTALL
689 PYTHONMOD_INSTALL
690 PYTHONMOD_HEADER
691 PYTHONMOD_OBJ
692 WITH_PYTHONMODULE
693 swig
694 SWIG_LIB
695 SWIG
696 PC_PY_DEPENDENCY
697 PY_MAJOR_VERSION
698 PYTHON_SITE_PKG
699 PYTHON_LDFLAGS
700 PYTHON_CPPFLAGS
701 PYTHON
702 PYTHON_VERSION
703 PTHREAD_CFLAGS_ONLY
704 PTHREAD_CFLAGS
705 PTHREAD_LIBS
706 PTHREAD_CC
707 ax_pthread_config
708 RUNTIME_PATH
709 LIBOBJS
710 PKG_CONFIG_LIBDIR
711 PKG_CONFIG_PATH
712 PKG_CONFIG
713 LT_SYS_LIBRARY_PATH
714 OTOOL64
715 OTOOL
716 LIPO
717 NMEDIT
718 DSYMUTIL
719 MANIFEST_TOOL
720 AWK
721 RANLIB
722 ac_ct_AR
723 DLLTOOL
724 OBJDUMP
725 LN_S
726 NM
727 ac_ct_DUMPBIN
728 DUMPBIN
729 LD
730 FGREP
731 SED
732 LIBTOOL
733 AR
734 host_os
735 host_vendor
736 host_cpu
737 host
738 build_os
739 build_vendor
740 build_cpu
741 build
742 libtool
743 STRIP
744 doxygen
745 YFLAGS
746 YACC
747 LEXLIB
748 LEX_OUTPUT_ROOT
749 LEX
750 debug_enabled
751 DEPFLAG
752 UNBOUND_USERNAME
753 UNBOUND_ROOTCERT_FILE
754 UNBOUND_ROOTKEY_FILE
755 UNBOUND_PIDFILE
756 UNBOUND_SHARE_DIR
757 UNBOUND_CHROOT_DIR
758 UNBOUND_RUN_DIR
759 ub_conf_dir
760 ub_conf_file
761 UNBOUND_LOCALSTATE_DIR
762 UNBOUND_SYSCONF_DIR
763 UNBOUND_SBIN_DIR
764 EGREP
765 GREP
766 CPP
767 OBJEXT
768 EXEEXT
769 ac_ct_CC
770 CPPFLAGS
771 LDFLAGS
772 CFLAGS
773 CC
774 LIBUNBOUND_AGE
775 LIBUNBOUND_REVISION
776 LIBUNBOUND_CURRENT
777 UNBOUND_VERSION_MICRO
778 UNBOUND_VERSION_MINOR
779 UNBOUND_VERSION_MAJOR
780 target_alias
781 host_alias
782 build_alias
783 LIBS
784 ECHO_T
785 ECHO_N
786 ECHO_C
787 DEFS
788 mandir
789 localedir
790 libdir
791 psdir
792 pdfdir
793 dvidir
794 htmldir
795 infodir
796 docdir
797 oldincludedir
798 includedir
799 localstatedir
800 sharedstatedir
801 sysconfdir
802 datadir
803 datarootdir
804 libexecdir
805 sbindir
806 bindir
807 program_transform_name
808 prefix
809 exec_prefix
810 PACKAGE_URL
811 PACKAGE_BUGREPORT
812 PACKAGE_STRING
813 PACKAGE_VERSION
814 PACKAGE_TARNAME
815 PACKAGE_NAME
816 PATH_SEPARATOR
817 SHELL'
818 ac_subst_files=''
819 ac_user_opts='
820 enable_option_checking
821 with_conf_file
822 with_run_dir
823 with_chroot_dir
824 with_share_dir
825 with_pidfile
826 with_rootkey_file
827 with_rootcert_file
828 with_username
829 enable_checking
830 enable_debug
831 enable_flto
832 enable_pie
833 enable_relro_now
834 enable_shared
835 enable_static
836 with_pic
837 enable_fast_install
838 with_aix_soname
839 with_gnu_ld
840 with_sysroot
841 enable_libtool_lock
842 enable_rpath
843 enable_largefile
844 enable_alloc_checks
845 enable_alloc_lite
846 enable_alloc_nonregional
847 with_pthreads
848 with_solaris_threads
849 with_pyunbound
850 with_pythonmodule
851 enable_swig_version_check
852 with_nss
853 with_nettle
854 with_ssl
855 enable_sha1
856 enable_sha2
857 enable_subnet
858 enable_gost
859 enable_ecdsa
860 enable_dsa
861 enable_ed25519
862 enable_ed448
863 enable_event_api
864 enable_tfo_client
865 enable_tfo_server
866 with_libevent
867 with_libexpat
868 with_libhiredis
869 enable_static_exe
870 enable_systemd
871 enable_lock_checks
872 enable_allsymbols
873 enable_dnstap
874 with_dnstap_socket_path
875 with_protobuf_c
876 with_libfstrm
877 enable_dnscrypt
878 with_libsodium
879 enable_cachedb
880 enable_ipsecmod
881 with_libunbound_only
882 '
883 ac_precious_vars='build_alias
884 host_alias
885 target_alias
886 CC
887 CFLAGS
888 LDFLAGS
889 LIBS
890 CPPFLAGS
891 CPP
892 YACC
893 YFLAGS
894 LT_SYS_LIBRARY_PATH
895 PKG_CONFIG
896 PKG_CONFIG_PATH
897 PKG_CONFIG_LIBDIR
898 PYTHON_VERSION
899 SYSTEMD_CFLAGS
900 SYSTEMD_LIBS
901 SYSTEMD_DAEMON_CFLAGS
902 SYSTEMD_DAEMON_LIBS'
903
904
905 # Initialize some variables set by options.
906 ac_init_help=
907 ac_init_version=false
908 ac_unrecognized_opts=
909 ac_unrecognized_sep=
910 # The variables have the same names as the options, with
911 # dashes changed to underlines.
912 cache_file=/dev/null
913 exec_prefix=NONE
914 no_create=
915 no_recursion=
916 prefix=NONE
917 program_prefix=NONE
918 program_suffix=NONE
919 program_transform_name=s,x,x,
920 silent=
921 site=
922 srcdir=
923 verbose=
924 x_includes=NONE
925 x_libraries=NONE
926
927 # Installation directory options.
928 # These are left unexpanded so users can "make install exec_prefix=/foo"
929 # and all the variables that are supposed to be based on exec_prefix
930 # by default will actually change.
931 # Use braces instead of parens because sh, perl, etc. also accept them.
932 # (The list follows the same order as the GNU Coding Standards.)
933 bindir='${exec_prefix}/bin'
934 sbindir='${exec_prefix}/sbin'
935 libexecdir='${exec_prefix}/libexec'
936 datarootdir='${prefix}/share'
937 datadir='${datarootdir}'
938 sysconfdir='${prefix}/etc'
939 sharedstatedir='${prefix}/com'
940 localstatedir='${prefix}/var'
941 includedir='${prefix}/include'
942 oldincludedir='/usr/include'
943 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
944 infodir='${datarootdir}/info'
945 htmldir='${docdir}'
946 dvidir='${docdir}'
947 pdfdir='${docdir}'
948 psdir='${docdir}'
949 libdir='${exec_prefix}/lib'
950 localedir='${datarootdir}/locale'
951 mandir='${datarootdir}/man'
952
953 ac_prev=
954 ac_dashdash=
955 for ac_option
956 do
957 # If the previous option needs an argument, assign it.
958 if test -n "$ac_prev"; then
959 eval $ac_prev=\$ac_option
960 ac_prev=
961 continue
962 fi
963
964 case $ac_option in
965 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
966 *=) ac_optarg= ;;
967 *) ac_optarg=yes ;;
968 esac
969
970 # Accept the important Cygnus configure options, so we can diagnose typos.
971
972 case $ac_dashdash$ac_option in
973 --)
974 ac_dashdash=yes ;;
975
976 -bindir | --bindir | --bindi | --bind | --bin | --bi)
977 ac_prev=bindir ;;
978 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
979 bindir=$ac_optarg ;;
980
981 -build | --build | --buil | --bui | --bu)
982 ac_prev=build_alias ;;
983 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
984 build_alias=$ac_optarg ;;
985
986 -cache-file | --cache-file | --cache-fil | --cache-fi \
987 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
988 ac_prev=cache_file ;;
989 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
990 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
991 cache_file=$ac_optarg ;;
992
993 --config-cache | -C)
994 cache_file=config.cache ;;
995
996 -datadir | --datadir | --datadi | --datad)
997 ac_prev=datadir ;;
998 -datadir=* | --datadir=* | --datadi=* | --datad=*)
999 datadir=$ac_optarg ;;
1000
1001 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1002 | --dataroo | --dataro | --datar)
1003 ac_prev=datarootdir ;;
1004 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1005 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1006 datarootdir=$ac_optarg ;;
1007
1008 -disable-* | --disable-*)
1009 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1010 # Reject names that are not valid shell variable names.
1011 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1012 as_fn_error $? "invalid feature name: $ac_useropt"
1013 ac_useropt_orig=$ac_useropt
1014 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1015 case $ac_user_opts in
1016 *"
1017 "enable_$ac_useropt"
1018 "*) ;;
1019 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1020 ac_unrecognized_sep=', ';;
1021 esac
1022 eval enable_$ac_useropt=no ;;
1023
1024 -docdir | --docdir | --docdi | --doc | --do)
1025 ac_prev=docdir ;;
1026 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1027 docdir=$ac_optarg ;;
1028
1029 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1030 ac_prev=dvidir ;;
1031 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1032 dvidir=$ac_optarg ;;
1033
1034 -enable-* | --enable-*)
1035 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1036 # Reject names that are not valid shell variable names.
1037 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1038 as_fn_error $? "invalid feature name: $ac_useropt"
1039 ac_useropt_orig=$ac_useropt
1040 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1041 case $ac_user_opts in
1042 *"
1043 "enable_$ac_useropt"
1044 "*) ;;
1045 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1046 ac_unrecognized_sep=', ';;
1047 esac
1048 eval enable_$ac_useropt=\$ac_optarg ;;
1049
1050 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1051 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1052 | --exec | --exe | --ex)
1053 ac_prev=exec_prefix ;;
1054 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1055 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1056 | --exec=* | --exe=* | --ex=*)
1057 exec_prefix=$ac_optarg ;;
1058
1059 -gas | --gas | --ga | --g)
1060 # Obsolete; use --with-gas.
1061 with_gas=yes ;;
1062
1063 -help | --help | --hel | --he | -h)
1064 ac_init_help=long ;;
1065 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1066 ac_init_help=recursive ;;
1067 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1068 ac_init_help=short ;;
1069
1070 -host | --host | --hos | --ho)
1071 ac_prev=host_alias ;;
1072 -host=* | --host=* | --hos=* | --ho=*)
1073 host_alias=$ac_optarg ;;
1074
1075 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1076 ac_prev=htmldir ;;
1077 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1078 | --ht=*)
1079 htmldir=$ac_optarg ;;
1080
1081 -includedir | --includedir | --includedi | --included | --include \
1082 | --includ | --inclu | --incl | --inc)
1083 ac_prev=includedir ;;
1084 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1085 | --includ=* | --inclu=* | --incl=* | --inc=*)
1086 includedir=$ac_optarg ;;
1087
1088 -infodir | --infodir | --infodi | --infod | --info | --inf)
1089 ac_prev=infodir ;;
1090 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1091 infodir=$ac_optarg ;;
1092
1093 -libdir | --libdir | --libdi | --libd)
1094 ac_prev=libdir ;;
1095 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1096 libdir=$ac_optarg ;;
1097
1098 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1099 | --libexe | --libex | --libe)
1100 ac_prev=libexecdir ;;
1101 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1102 | --libexe=* | --libex=* | --libe=*)
1103 libexecdir=$ac_optarg ;;
1104
1105 -localedir | --localedir | --localedi | --localed | --locale)
1106 ac_prev=localedir ;;
1107 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1108 localedir=$ac_optarg ;;
1109
1110 -localstatedir | --localstatedir | --localstatedi | --localstated \
1111 | --localstate | --localstat | --localsta | --localst | --locals)
1112 ac_prev=localstatedir ;;
1113 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1114 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1115 localstatedir=$ac_optarg ;;
1116
1117 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1118 ac_prev=mandir ;;
1119 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1120 mandir=$ac_optarg ;;
1121
1122 -nfp | --nfp | --nf)
1123 # Obsolete; use --without-fp.
1124 with_fp=no ;;
1125
1126 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1127 | --no-cr | --no-c | -n)
1128 no_create=yes ;;
1129
1130 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1131 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1132 no_recursion=yes ;;
1133
1134 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1135 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1136 | --oldin | --oldi | --old | --ol | --o)
1137 ac_prev=oldincludedir ;;
1138 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1139 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1140 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1141 oldincludedir=$ac_optarg ;;
1142
1143 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1144 ac_prev=prefix ;;
1145 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1146 prefix=$ac_optarg ;;
1147
1148 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1149 | --program-pre | --program-pr | --program-p)
1150 ac_prev=program_prefix ;;
1151 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1152 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1153 program_prefix=$ac_optarg ;;
1154
1155 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1156 | --program-suf | --program-su | --program-s)
1157 ac_prev=program_suffix ;;
1158 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1159 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1160 program_suffix=$ac_optarg ;;
1161
1162 -program-transform-name | --program-transform-name \
1163 | --program-transform-nam | --program-transform-na \
1164 | --program-transform-n | --program-transform- \
1165 | --program-transform | --program-transfor \
1166 | --program-transfo | --program-transf \
1167 | --program-trans | --program-tran \
1168 | --progr-tra | --program-tr | --program-t)
1169 ac_prev=program_transform_name ;;
1170 -program-transform-name=* | --program-transform-name=* \
1171 | --program-transform-nam=* | --program-transform-na=* \
1172 | --program-transform-n=* | --program-transform-=* \
1173 | --program-transform=* | --program-transfor=* \
1174 | --program-transfo=* | --program-transf=* \
1175 | --program-trans=* | --program-tran=* \
1176 | --progr-tra=* | --program-tr=* | --program-t=*)
1177 program_transform_name=$ac_optarg ;;
1178
1179 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1180 ac_prev=pdfdir ;;
1181 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1182 pdfdir=$ac_optarg ;;
1183
1184 -psdir | --psdir | --psdi | --psd | --ps)
1185 ac_prev=psdir ;;
1186 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1187 psdir=$ac_optarg ;;
1188
1189 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1190 | -silent | --silent | --silen | --sile | --sil)
1191 silent=yes ;;
1192
1193 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1194 ac_prev=sbindir ;;
1195 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1196 | --sbi=* | --sb=*)
1197 sbindir=$ac_optarg ;;
1198
1199 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1200 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1201 | --sharedst | --shareds | --shared | --share | --shar \
1202 | --sha | --sh)
1203 ac_prev=sharedstatedir ;;
1204 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1205 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1206 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1207 | --sha=* | --sh=*)
1208 sharedstatedir=$ac_optarg ;;
1209
1210 -site | --site | --sit)
1211 ac_prev=site ;;
1212 -site=* | --site=* | --sit=*)
1213 site=$ac_optarg ;;
1214
1215 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1216 ac_prev=srcdir ;;
1217 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1218 srcdir=$ac_optarg ;;
1219
1220 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1221 | --syscon | --sysco | --sysc | --sys | --sy)
1222 ac_prev=sysconfdir ;;
1223 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1224 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1225 sysconfdir=$ac_optarg ;;
1226
1227 -target | --target | --targe | --targ | --tar | --ta | --t)
1228 ac_prev=target_alias ;;
1229 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1230 target_alias=$ac_optarg ;;
1231
1232 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1233 verbose=yes ;;
1234
1235 -version | --version | --versio | --versi | --vers | -V)
1236 ac_init_version=: ;;
1237
1238 -with-* | --with-*)
1239 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1240 # Reject names that are not valid shell variable names.
1241 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1242 as_fn_error $? "invalid package name: $ac_useropt"
1243 ac_useropt_orig=$ac_useropt
1244 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1245 case $ac_user_opts in
1246 *"
1247 "with_$ac_useropt"
1248 "*) ;;
1249 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1250 ac_unrecognized_sep=', ';;
1251 esac
1252 eval with_$ac_useropt=\$ac_optarg ;;
1253
1254 -without-* | --without-*)
1255 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1256 # Reject names that are not valid shell variable names.
1257 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1258 as_fn_error $? "invalid package name: $ac_useropt"
1259 ac_useropt_orig=$ac_useropt
1260 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1261 case $ac_user_opts in
1262 *"
1263 "with_$ac_useropt"
1264 "*) ;;
1265 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1266 ac_unrecognized_sep=', ';;
1267 esac
1268 eval with_$ac_useropt=no ;;
1269
1270 --x)
1271 # Obsolete; use --with-x.
1272 with_x=yes ;;
1273
1274 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1275 | --x-incl | --x-inc | --x-in | --x-i)
1276 ac_prev=x_includes ;;
1277 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1278 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1279 x_includes=$ac_optarg ;;
1280
1281 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1282 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1283 ac_prev=x_libraries ;;
1284 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1285 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1286 x_libraries=$ac_optarg ;;
1287
1288 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1289 Try \`$0 --help' for more information"
1290 ;;
1291
1292 *=*)
1293 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1294 # Reject names that are not valid shell variable names.
1295 case $ac_envvar in #(
1296 '' | [0-9]* | *[!_$as_cr_alnum]* )
1297 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1298 esac
1299 eval $ac_envvar=\$ac_optarg
1300 export $ac_envvar ;;
1301
1302 *)
1303 # FIXME: should be removed in autoconf 3.0.
1304 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1305 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1306 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1307 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1308 ;;
1309
1310 esac
1311 done
1312
1313 if test -n "$ac_prev"; then
1314 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1315 as_fn_error $? "missing argument to $ac_option"
1316 fi
1317
1318 if test -n "$ac_unrecognized_opts"; then
1319 case $enable_option_checking in
1320 no) ;;
1321 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1322 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1323 esac
1324 fi
1325
1326 # Check all directory arguments for consistency.
1327 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1328 datadir sysconfdir sharedstatedir localstatedir includedir \
1329 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1330 libdir localedir mandir
1331 do
1332 eval ac_val=\$$ac_var
1333 # Remove trailing slashes.
1334 case $ac_val in
1335 */ )
1336 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1337 eval $ac_var=\$ac_val;;
1338 esac
1339 # Be sure to have absolute directory names.
1340 case $ac_val in
1341 [\\/$]* | ?:[\\/]* ) continue;;
1342 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1343 esac
1344 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1345 done
1346
1347 # There might be people who depend on the old broken behavior: `$host'
1348 # used to hold the argument of --host etc.
1349 # FIXME: To remove some day.
1350 build=$build_alias
1351 host=$host_alias
1352 target=$target_alias
1353
1354 # FIXME: To remove some day.
1355 if test "x$host_alias" != x; then
1356 if test "x$build_alias" = x; then
1357 cross_compiling=maybe
1358 elif test "x$build_alias" != "x$host_alias"; then
1359 cross_compiling=yes
1360 fi
1361 fi
1362
1363 ac_tool_prefix=
1364 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1365
1366 test "$silent" = yes && exec 6>/dev/null
1367
1368
1369 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1370 ac_ls_di=`ls -di .` &&
1371 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1372 as_fn_error $? "working directory cannot be determined"
1373 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1374 as_fn_error $? "pwd does not report name of working directory"
1375
1376
1377 # Find the source files, if location was not specified.
1378 if test -z "$srcdir"; then
1379 ac_srcdir_defaulted=yes
1380 # Try the directory containing this script, then the parent directory.
1381 ac_confdir=`$as_dirname -- "$as_myself" ||
1382 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1383 X"$as_myself" : 'X\(//\)[^/]' \| \
1384 X"$as_myself" : 'X\(//\)$' \| \
1385 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1386 $as_echo X"$as_myself" |
1387 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1388 s//\1/
1389 q
1390 }
1391 /^X\(\/\/\)[^/].*/{
1392 s//\1/
1393 q
1394 }
1395 /^X\(\/\/\)$/{
1396 s//\1/
1397 q
1398 }
1399 /^X\(\/\).*/{
1400 s//\1/
1401 q
1402 }
1403 s/.*/./; q'`
1404 srcdir=$ac_confdir
1405 if test ! -r "$srcdir/$ac_unique_file"; then
1406 srcdir=..
1407 fi
1408 else
1409 ac_srcdir_defaulted=no
1410 fi
1411 if test ! -r "$srcdir/$ac_unique_file"; then
1412 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1413 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1414 fi
1415 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1416 ac_abs_confdir=`(
1417 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1418 pwd)`
1419 # When building in place, set srcdir=.
1420 if test "$ac_abs_confdir" = "$ac_pwd"; then
1421 srcdir=.
1422 fi
1423 # Remove unnecessary trailing slashes from srcdir.
1424 # Double slashes in file names in object file debugging info
1425 # mess up M-x gdb in Emacs.
1426 case $srcdir in
1427 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1428 esac
1429 for ac_var in $ac_precious_vars; do
1430 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1431 eval ac_env_${ac_var}_value=\$${ac_var}
1432 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1433 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1434 done
1435
1436 #
1437 # Report the --help message.
1438 #
1439 if test "$ac_init_help" = "long"; then
1440 # Omit some internal or obsolete options to make the list less imposing.
1441 # This message is too long to be a string in the A/UX 3.1 sh.
1442 cat <<_ACEOF
1443 \`configure' configures unbound 1.9.1 to adapt to many kinds of systems.
1444
1445 Usage: $0 [OPTION]... [VAR=VALUE]...
1446
1447 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1448 VAR=VALUE. See below for descriptions of some of the useful variables.
1449
1450 Defaults for the options are specified in brackets.
1451
1452 Configuration:
1453 -h, --help display this help and exit
1454 --help=short display options specific to this package
1455 --help=recursive display the short help of all the included packages
1456 -V, --version display version information and exit
1457 -q, --quiet, --silent do not print \`checking ...' messages
1458 --cache-file=FILE cache test results in FILE [disabled]
1459 -C, --config-cache alias for \`--cache-file=config.cache'
1460 -n, --no-create do not create output files
1461 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1462
1463 Installation directories:
1464 --prefix=PREFIX install architecture-independent files in PREFIX
1465 [$ac_default_prefix]
1466 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1467 [PREFIX]
1468
1469 By default, \`make install' will install all the files in
1470 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1471 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1472 for instance \`--prefix=\$HOME'.
1473
1474 For better control, use the options below.
1475
1476 Fine tuning of the installation directories:
1477 --bindir=DIR user executables [EPREFIX/bin]
1478 --sbindir=DIR system admin executables [EPREFIX/sbin]
1479 --libexecdir=DIR program executables [EPREFIX/libexec]
1480 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1481 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1482 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1483 --libdir=DIR object code libraries [EPREFIX/lib]
1484 --includedir=DIR C header files [PREFIX/include]
1485 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1486 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1487 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1488 --infodir=DIR info documentation [DATAROOTDIR/info]
1489 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1490 --mandir=DIR man documentation [DATAROOTDIR/man]
1491 --docdir=DIR documentation root [DATAROOTDIR/doc/unbound]
1492 --htmldir=DIR html documentation [DOCDIR]
1493 --dvidir=DIR dvi documentation [DOCDIR]
1494 --pdfdir=DIR pdf documentation [DOCDIR]
1495 --psdir=DIR ps documentation [DOCDIR]
1496 _ACEOF
1497
1498 cat <<\_ACEOF
1499
1500 System types:
1501 --build=BUILD configure for building on BUILD [guessed]
1502 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1503 _ACEOF
1504 fi
1505
1506 if test -n "$ac_init_help"; then
1507 case $ac_init_help in
1508 short | recursive ) echo "Configuration of unbound 1.9.1:";;
1509 esac
1510 cat <<\_ACEOF
1511
1512 Optional Features:
1513 --disable-option-checking ignore unrecognized --enable/--with options
1514 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1515 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1516 --enable-checking Enable warnings, asserts, makefile-dependencies
1517 --enable-debug same as enable-checking
1518 --disable-flto Disable link-time optimization (gcc specific option)
1519 --enable-pie Enable Position-Independent Executable (eg. to fully
1520 benefit from ASLR, small performance penalty)
1521 --enable-relro-now Enable full relocation binding at load-time (RELRO
1522 NOW, to protect GOT and .dtor areas)
1523 --enable-shared[=PKGS] build shared libraries [default=yes]
1524 --enable-static[=PKGS] build static libraries [default=yes]
1525 --enable-fast-install[=PKGS]
1526 optimize for fast installation [default=yes]
1527 --disable-libtool-lock avoid locking (might break parallel builds)
1528 --disable-rpath disable hardcoded rpath (default=enabled)
1529 --disable-largefile omit support for large files
1530 --enable-alloc-checks enable to memory allocation statistics, for debug
1531 purposes
1532 --enable-alloc-lite enable for lightweight alloc assertions, for debug
1533 purposes
1534 --enable-alloc-nonregional
1535 enable nonregional allocs, slow but exposes regional
1536 allocations to other memory purifiers, for debug
1537 purposes
1538 --disable-swig-version-check
1539 Disable swig version check to build python modules
1540 with older swig even though that is unreliable
1541 --disable-sha1 Disable SHA1 RRSIG support, does not disable nsec3
1542 support
1543 --disable-sha2 Disable SHA256 and SHA512 RRSIG support
1544 --enable-subnet Enable client subnet
1545 --disable-gost Disable GOST support
1546 --disable-ecdsa Disable ECDSA support
1547 --disable-dsa Disable DSA support
1548 --disable-ed25519 Disable ED25519 support
1549 --disable-ed448 Disable ED448 support
1550 --enable-event-api Enable (experimental) pluggable event base
1551 libunbound API installed to unbound-event.h
1552 --enable-tfo-client Enable TCP Fast Open for client mode
1553 --enable-tfo-server Enable TCP Fast Open for server mode
1554 --enable-static-exe enable to compile executables statically against
1555 (event) libs, for debug purposes
1556 --enable-systemd compile with systemd support
1557 --enable-lock-checks enable to check lock and unlock calls, for debug
1558 purposes
1559 --enable-allsymbols export all symbols from libunbound and link binaries
1560 to it, smaller install size but libunbound export
1561 table is polluted by internal symbols
1562 --enable-dnstap Enable dnstap support (requires fstrm, protobuf-c)
1563 --enable-dnscrypt Enable dnscrypt support (requires libsodium)
1564 --enable-cachedb enable cachedb module that can use external cache
1565 storage
1566 --enable-ipsecmod Enable ipsecmod module that facilitates
1567 opportunistic IPsec
1568
1569 Optional Packages:
1570 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1571 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1572 --with-conf-file=path Pathname to the Unbound configuration file
1573 --with-run-dir=path set default directory to chdir to (by default dir
1574 part of cfg file)
1575 --with-chroot-dir=path set default directory to chroot to (by default same
1576 as run-dir)
1577 --with-share-dir=path set default directory with shared data (by default
1578 same as share/unbound)
1579 --with-pidfile=filename set default pathname to unbound pidfile (default
1580 run-dir/unbound.pid)
1581 --with-rootkey-file=filename
1582 set default pathname to root key file (default
1583 run-dir/root.key). This file is read and written.
1584 --with-rootcert-file=filename
1585 set default pathname to root update certificate file
1586 (default run-dir/icannbundle.pem). This file need
1587 not exist if you are content with the builtin.
1588 --with-username=user set default user that unbound changes to (default
1589 user is unbound)
1590 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
1591 both]
1592 --with-aix-soname=aix|svr4|both
1593 shared library versioning (aka "SONAME") variant to
1594 provide on AIX, [default=aix].
1595 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1596 --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
1597 compiler's sysroot if not specified).
1598 --with-pthreads use pthreads library, or --without-pthreads to
1599 disable threading support.
1600 --with-solaris-threads use solaris native thread library.
1601 --with-pyunbound build PyUnbound, or --without-pyunbound to skip it.
1602 (default=no)
1603 --with-pythonmodule build Python module, or --without-pythonmodule to
1604 disable script engine. (default=no)
1605 --with-nss=path use libnss instead of openssl, installed at path.
1606 --with-nettle=path use libnettle as crypto library, installed at path.
1607 --with-ssl=pathname enable SSL (will check /usr/local/ssl /usr/lib/ssl
1608 /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1609 /usr)
1610 --with-libevent=pathname
1611 use libevent (will check /usr/local /opt/local
1612 /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1613 an explicit path). Slower, but allows use of large
1614 outgoing port ranges.
1615 --with-libexpat=path specify explicit path for libexpat.
1616 --with-libhiredis=path specify explicit path for libhiredis.
1617 --with-dnstap-socket-path=pathname
1618 set default dnstap socket path
1619 --with-protobuf-c=path Path where protobuf-c is installed, for dnstap
1620 --with-libfstrm=path Path where libfstrm is installed, for dnstap
1621 --with-libsodium=path Path where libsodium is installed, for dnscrypt
1622 --with-libunbound-only do not build daemon and tool programs
1623
1624 Some influential environment variables:
1625 CC C compiler command
1626 CFLAGS C compiler flags
1627 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1628 nonstandard directory <lib dir>
1629 LIBS libraries to pass to the linker, e.g. -l<library>
1630 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1631 you have headers in a nonstandard directory <include dir>
1632 CPP C preprocessor
1633 YACC The `Yet Another Compiler Compiler' implementation to use.
1634 Defaults to the first program found out of: `bison -y', `byacc',
1635 `yacc'.
1636 YFLAGS The list of arguments that will be passed by default to $YACC.
1637 This script will default YFLAGS to the empty string to avoid a
1638 default value of `-d' given by some make applications.
1639 LT_SYS_LIBRARY_PATH
1640 User-defined run-time library search path.
1641 PKG_CONFIG path to pkg-config utility
1642 PKG_CONFIG_PATH
1643 directories to add to pkg-config's search path
1644 PKG_CONFIG_LIBDIR
1645 path overriding pkg-config's built-in search path
1646 PYTHON_VERSION
1647 The installed Python version to use, for example '2.3'. This
1648 string will be appended to the Python interpreter canonical
1649 name.
1650 SYSTEMD_CFLAGS
1651 C compiler flags for SYSTEMD, overriding pkg-config
1652 SYSTEMD_LIBS
1653 linker flags for SYSTEMD, overriding pkg-config
1654 SYSTEMD_DAEMON_CFLAGS
1655 C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1656 SYSTEMD_DAEMON_LIBS
1657 linker flags for SYSTEMD_DAEMON, overriding pkg-config
1658
1659 Use these variables to override the choices made by `configure' or to help
1660 it to find libraries and programs with nonstandard names/locations.
1661
1662 Report bugs to <unbound-bugs@nlnetlabs.nl>.
1663 _ACEOF
1664 ac_status=$?
1665 fi
1666
1667 if test "$ac_init_help" = "recursive"; then
1668 # If there are subdirs, report their specific --help.
1669 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1670 test -d "$ac_dir" ||
1671 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1672 continue
1673 ac_builddir=.
1674
1675 case "$ac_dir" in
1676 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1677 *)
1678 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1679 # A ".." for each directory in $ac_dir_suffix.
1680 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1681 case $ac_top_builddir_sub in
1682 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1683 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1684 esac ;;
1685 esac
1686 ac_abs_top_builddir=$ac_pwd
1687 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1688 # for backward compatibility:
1689 ac_top_builddir=$ac_top_build_prefix
1690
1691 case $srcdir in
1692 .) # We are building in place.
1693 ac_srcdir=.
1694 ac_top_srcdir=$ac_top_builddir_sub
1695 ac_abs_top_srcdir=$ac_pwd ;;
1696 [\\/]* | ?:[\\/]* ) # Absolute name.
1697 ac_srcdir=$srcdir$ac_dir_suffix;
1698 ac_top_srcdir=$srcdir
1699 ac_abs_top_srcdir=$srcdir ;;
1700 *) # Relative name.
1701 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1702 ac_top_srcdir=$ac_top_build_prefix$srcdir
1703 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1704 esac
1705 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1706
1707 cd "$ac_dir" || { ac_status=$?; continue; }
1708 # Check for guested configure.
1709 if test -f "$ac_srcdir/configure.gnu"; then
1710 echo &&
1711 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1712 elif test -f "$ac_srcdir/configure"; then
1713 echo &&
1714 $SHELL "$ac_srcdir/configure" --help=recursive
1715 else
1716 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1717 fi || ac_status=$?
1718 cd "$ac_pwd" || { ac_status=$?; break; }
1719 done
1720 fi
1721
1722 test -n "$ac_init_help" && exit $ac_status
1723 if $ac_init_version; then
1724 cat <<\_ACEOF
1725 unbound configure 1.9.1
1726 generated by GNU Autoconf 2.69
1727
1728 Copyright (C) 2012 Free Software Foundation, Inc.
1729 This configure script is free software; the Free Software Foundation
1730 gives unlimited permission to copy, distribute and modify it.
1731 _ACEOF
1732 exit
1733 fi
1734
1735 ## ------------------------ ##
1736 ## Autoconf initialization. ##
1737 ## ------------------------ ##
1738
1739 # ac_fn_c_try_compile LINENO
1740 # --------------------------
1741 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1742 ac_fn_c_try_compile ()
1743 {
1744 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1745 rm -f conftest.$ac_objext
1746 if { { ac_try="$ac_compile"
1747 case "(($ac_try" in
1748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1749 *) ac_try_echo=$ac_try;;
1750 esac
1751 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1752 $as_echo "$ac_try_echo"; } >&5
1753 (eval "$ac_compile") 2>conftest.err
1754 ac_status=$?
1755 if test -s conftest.err; then
1756 grep -v '^ *+' conftest.err >conftest.er1
1757 cat conftest.er1 >&5
1758 mv -f conftest.er1 conftest.err
1759 fi
1760 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1761 test $ac_status = 0; } && {
1762 test -z "$ac_c_werror_flag" ||
1763 test ! -s conftest.err
1764 } && test -s conftest.$ac_objext; then :
1765 ac_retval=0
1766 else
1767 $as_echo "$as_me: failed program was:" >&5
1768 sed 's/^/| /' conftest.$ac_ext >&5
1769
1770 ac_retval=1
1771 fi
1772 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1773 as_fn_set_status $ac_retval
1774
1775 } # ac_fn_c_try_compile
1776
1777 # ac_fn_c_try_cpp LINENO
1778 # ----------------------
1779 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1780 ac_fn_c_try_cpp ()
1781 {
1782 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1783 if { { ac_try="$ac_cpp conftest.$ac_ext"
1784 case "(($ac_try" in
1785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1786 *) ac_try_echo=$ac_try;;
1787 esac
1788 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1789 $as_echo "$ac_try_echo"; } >&5
1790 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1791 ac_status=$?
1792 if test -s conftest.err; then
1793 grep -v '^ *+' conftest.err >conftest.er1
1794 cat conftest.er1 >&5
1795 mv -f conftest.er1 conftest.err
1796 fi
1797 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1798 test $ac_status = 0; } > conftest.i && {
1799 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1800 test ! -s conftest.err
1801 }; then :
1802 ac_retval=0
1803 else
1804 $as_echo "$as_me: failed program was:" >&5
1805 sed 's/^/| /' conftest.$ac_ext >&5
1806
1807 ac_retval=1
1808 fi
1809 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1810 as_fn_set_status $ac_retval
1811
1812 } # ac_fn_c_try_cpp
1813
1814 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1815 # -------------------------------------------------------
1816 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1817 # the include files in INCLUDES and setting the cache variable VAR
1818 # accordingly.
1819 ac_fn_c_check_header_mongrel ()
1820 {
1821 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1822 if eval \${$3+:} false; then :
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1824 $as_echo_n "checking for $2... " >&6; }
1825 if eval \${$3+:} false; then :
1826 $as_echo_n "(cached) " >&6
1827 fi
1828 eval ac_res=\$$3
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1830 $as_echo "$ac_res" >&6; }
1831 else
1832 # Is the header compilable?
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1834 $as_echo_n "checking $2 usability... " >&6; }
1835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1836 /* end confdefs.h. */
1837 $4
1838 #include <$2>
1839 _ACEOF
1840 if ac_fn_c_try_compile "$LINENO"; then :
1841 ac_header_compiler=yes
1842 else
1843 ac_header_compiler=no
1844 fi
1845 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1847 $as_echo "$ac_header_compiler" >&6; }
1848
1849 # Is the header present?
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1851 $as_echo_n "checking $2 presence... " >&6; }
1852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1853 /* end confdefs.h. */
1854 #include <$2>
1855 _ACEOF
1856 if ac_fn_c_try_cpp "$LINENO"; then :
1857 ac_header_preproc=yes
1858 else
1859 ac_header_preproc=no
1860 fi
1861 rm -f conftest.err conftest.i conftest.$ac_ext
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1863 $as_echo "$ac_header_preproc" >&6; }
1864
1865 # So? What about this header?
1866 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1867 yes:no: )
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1869 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1871 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1872 ;;
1873 no:yes:* )
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1875 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1877 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1879 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1881 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1883 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1884 ( $as_echo "## ---------------------------------------- ##
1885 ## Report this to unbound-bugs (at] nlnetlabs.nl ##
1886 ## ---------------------------------------- ##"
1887 ) | sed "s/^/$as_me: WARNING: /" >&2
1888 ;;
1889 esac
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1891 $as_echo_n "checking for $2... " >&6; }
1892 if eval \${$3+:} false; then :
1893 $as_echo_n "(cached) " >&6
1894 else
1895 eval "$3=\$ac_header_compiler"
1896 fi
1897 eval ac_res=\$$3
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1899 $as_echo "$ac_res" >&6; }
1900 fi
1901 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1902
1903 } # ac_fn_c_check_header_mongrel
1904
1905 # ac_fn_c_try_run LINENO
1906 # ----------------------
1907 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1908 # that executables *can* be run.
1909 ac_fn_c_try_run ()
1910 {
1911 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1912 if { { ac_try="$ac_link"
1913 case "(($ac_try" in
1914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1915 *) ac_try_echo=$ac_try;;
1916 esac
1917 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1918 $as_echo "$ac_try_echo"; } >&5
1919 (eval "$ac_link") 2>&5
1920 ac_status=$?
1921 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1922 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1923 { { case "(($ac_try" in
1924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1925 *) ac_try_echo=$ac_try;;
1926 esac
1927 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1928 $as_echo "$ac_try_echo"; } >&5
1929 (eval "$ac_try") 2>&5
1930 ac_status=$?
1931 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1932 test $ac_status = 0; }; }; then :
1933 ac_retval=0
1934 else
1935 $as_echo "$as_me: program exited with status $ac_status" >&5
1936 $as_echo "$as_me: failed program was:" >&5
1937 sed 's/^/| /' conftest.$ac_ext >&5
1938
1939 ac_retval=$ac_status
1940 fi
1941 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1942 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1943 as_fn_set_status $ac_retval
1944
1945 } # ac_fn_c_try_run
1946
1947 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1948 # -------------------------------------------------------
1949 # Tests whether HEADER exists and can be compiled using the include files in
1950 # INCLUDES, setting the cache variable VAR accordingly.
1951 ac_fn_c_check_header_compile ()
1952 {
1953 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1955 $as_echo_n "checking for $2... " >&6; }
1956 if eval \${$3+:} false; then :
1957 $as_echo_n "(cached) " >&6
1958 else
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960 /* end confdefs.h. */
1961 $4
1962 #include <$2>
1963 _ACEOF
1964 if ac_fn_c_try_compile "$LINENO"; then :
1965 eval "$3=yes"
1966 else
1967 eval "$3=no"
1968 fi
1969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1970 fi
1971 eval ac_res=\$$3
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1973 $as_echo "$ac_res" >&6; }
1974 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1975
1976 } # ac_fn_c_check_header_compile
1977
1978 # ac_fn_c_try_link LINENO
1979 # -----------------------
1980 # Try to link conftest.$ac_ext, and return whether this succeeded.
1981 ac_fn_c_try_link ()
1982 {
1983 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984 rm -f conftest.$ac_objext conftest$ac_exeext
1985 if { { ac_try="$ac_link"
1986 case "(($ac_try" in
1987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1988 *) ac_try_echo=$ac_try;;
1989 esac
1990 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1991 $as_echo "$ac_try_echo"; } >&5
1992 (eval "$ac_link") 2>conftest.err
1993 ac_status=$?
1994 if test -s conftest.err; then
1995 grep -v '^ *+' conftest.err >conftest.er1
1996 cat conftest.er1 >&5
1997 mv -f conftest.er1 conftest.err
1998 fi
1999 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2000 test $ac_status = 0; } && {
2001 test -z "$ac_c_werror_flag" ||
2002 test ! -s conftest.err
2003 } && test -s conftest$ac_exeext && {
2004 test "$cross_compiling" = yes ||
2005 test -x conftest$ac_exeext
2006 }; then :
2007 ac_retval=0
2008 else
2009 $as_echo "$as_me: failed program was:" >&5
2010 sed 's/^/| /' conftest.$ac_ext >&5
2011
2012 ac_retval=1
2013 fi
2014 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2015 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2016 # interfere with the next link command; also delete a directory that is
2017 # left behind by Apple's compiler. We do this before executing the actions.
2018 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2019 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2020 as_fn_set_status $ac_retval
2021
2022 } # ac_fn_c_try_link
2023
2024 # ac_fn_c_check_func LINENO FUNC VAR
2025 # ----------------------------------
2026 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2027 ac_fn_c_check_func ()
2028 {
2029 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2031 $as_echo_n "checking for $2... " >&6; }
2032 if eval \${$3+:} false; then :
2033 $as_echo_n "(cached) " >&6
2034 else
2035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2036 /* end confdefs.h. */
2037 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2038 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2039 #define $2 innocuous_$2
2040
2041 /* System header to define __stub macros and hopefully few prototypes,
2042 which can conflict with char $2 (); below.
2043 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2044 <limits.h> exists even on freestanding compilers. */
2045
2046 #ifdef __STDC__
2047 # include <limits.h>
2048 #else
2049 # include <assert.h>
2050 #endif
2051
2052 #undef $2
2053
2054 /* Override any GCC internal prototype to avoid an error.
2055 Use char because int might match the return type of a GCC
2056 builtin and then its argument prototype would still apply. */
2057 #ifdef __cplusplus
2058 extern "C"
2059 #endif
2060 char $2 ();
2061 /* The GNU C library defines this for functions which it implements
2062 to always fail with ENOSYS. Some functions are actually named
2063 something starting with __ and the normal name is an alias. */
2064 #if defined __stub_$2 || defined __stub___$2
2065 choke me
2066 #endif
2067
2068 int
2069 main ()
2070 {
2071 return $2 ();
2072 ;
2073 return 0;
2074 }
2075 _ACEOF
2076 if ac_fn_c_try_link "$LINENO"; then :
2077 eval "$3=yes"
2078 else
2079 eval "$3=no"
2080 fi
2081 rm -f core conftest.err conftest.$ac_objext \
2082 conftest$ac_exeext conftest.$ac_ext
2083 fi
2084 eval ac_res=\$$3
2085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2086 $as_echo "$ac_res" >&6; }
2087 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2088
2089 } # ac_fn_c_check_func
2090
2091 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2092 # -------------------------------------------
2093 # Tests whether TYPE exists after having included INCLUDES, setting cache
2094 # variable VAR accordingly.
2095 ac_fn_c_check_type ()
2096 {
2097 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2099 $as_echo_n "checking for $2... " >&6; }
2100 if eval \${$3+:} false; then :
2101 $as_echo_n "(cached) " >&6
2102 else
2103 eval "$3=no"
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105 /* end confdefs.h. */
2106 $4
2107 int
2108 main ()
2109 {
2110 if (sizeof ($2))
2111 return 0;
2112 ;
2113 return 0;
2114 }
2115 _ACEOF
2116 if ac_fn_c_try_compile "$LINENO"; then :
2117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2118 /* end confdefs.h. */
2119 $4
2120 int
2121 main ()
2122 {
2123 if (sizeof (($2)))
2124 return 0;
2125 ;
2126 return 0;
2127 }
2128 _ACEOF
2129 if ac_fn_c_try_compile "$LINENO"; then :
2130
2131 else
2132 eval "$3=yes"
2133 fi
2134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2135 fi
2136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2137 fi
2138 eval ac_res=\$$3
2139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2140 $as_echo "$ac_res" >&6; }
2141 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2142
2143 } # ac_fn_c_check_type
2144
2145 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2146 # --------------------------------------------
2147 # Tries to find the compile-time value of EXPR in a program that includes
2148 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2149 # computed
2150 ac_fn_c_compute_int ()
2151 {
2152 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2153 if test "$cross_compiling" = yes; then
2154 # Depending upon the size, compute the lo and hi bounds.
2155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2156 /* end confdefs.h. */
2157 $4
2158 int
2159 main ()
2160 {
2161 static int test_array [1 - 2 * !(($2) >= 0)];
2162 test_array [0] = 0;
2163 return test_array [0];
2164
2165 ;
2166 return 0;
2167 }
2168 _ACEOF
2169 if ac_fn_c_try_compile "$LINENO"; then :
2170 ac_lo=0 ac_mid=0
2171 while :; do
2172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2173 /* end confdefs.h. */
2174 $4
2175 int
2176 main ()
2177 {
2178 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2179 test_array [0] = 0;
2180 return test_array [0];
2181
2182 ;
2183 return 0;
2184 }
2185 _ACEOF
2186 if ac_fn_c_try_compile "$LINENO"; then :
2187 ac_hi=$ac_mid; break
2188 else
2189 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2190 if test $ac_lo -le $ac_mid; then
2191 ac_lo= ac_hi=
2192 break
2193 fi
2194 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2195 fi
2196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2197 done
2198 else
2199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2200 /* end confdefs.h. */
2201 $4
2202 int
2203 main ()
2204 {
2205 static int test_array [1 - 2 * !(($2) < 0)];
2206 test_array [0] = 0;
2207 return test_array [0];
2208
2209 ;
2210 return 0;
2211 }
2212 _ACEOF
2213 if ac_fn_c_try_compile "$LINENO"; then :
2214 ac_hi=-1 ac_mid=-1
2215 while :; do
2216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2217 /* end confdefs.h. */
2218 $4
2219 int
2220 main ()
2221 {
2222 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2223 test_array [0] = 0;
2224 return test_array [0];
2225
2226 ;
2227 return 0;
2228 }
2229 _ACEOF
2230 if ac_fn_c_try_compile "$LINENO"; then :
2231 ac_lo=$ac_mid; break
2232 else
2233 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2234 if test $ac_mid -le $ac_hi; then
2235 ac_lo= ac_hi=
2236 break
2237 fi
2238 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2239 fi
2240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2241 done
2242 else
2243 ac_lo= ac_hi=
2244 fi
2245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2246 fi
2247 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2248 # Binary search between lo and hi bounds.
2249 while test "x$ac_lo" != "x$ac_hi"; do
2250 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252 /* end confdefs.h. */
2253 $4
2254 int
2255 main ()
2256 {
2257 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2258 test_array [0] = 0;
2259 return test_array [0];
2260
2261 ;
2262 return 0;
2263 }
2264 _ACEOF
2265 if ac_fn_c_try_compile "$LINENO"; then :
2266 ac_hi=$ac_mid
2267 else
2268 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2269 fi
2270 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2271 done
2272 case $ac_lo in #((
2273 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2274 '') ac_retval=1 ;;
2275 esac
2276 else
2277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278 /* end confdefs.h. */
2279 $4
2280 static long int longval () { return $2; }
2281 static unsigned long int ulongval () { return $2; }
2282 #include <stdio.h>
2283 #include <stdlib.h>
2284 int
2285 main ()
2286 {
2287
2288 FILE *f = fopen ("conftest.val", "w");
2289 if (! f)
2290 return 1;
2291 if (($2) < 0)
2292 {
2293 long int i = longval ();
2294 if (i != ($2))
2295 return 1;
2296 fprintf (f, "%ld", i);
2297 }
2298 else
2299 {
2300 unsigned long int i = ulongval ();
2301 if (i != ($2))
2302 return 1;
2303 fprintf (f, "%lu", i);
2304 }
2305 /* Do not output a trailing newline, as this causes \r\n confusion
2306 on some platforms. */
2307 return ferror (f) || fclose (f) != 0;
2308
2309 ;
2310 return 0;
2311 }
2312 _ACEOF
2313 if ac_fn_c_try_run "$LINENO"; then :
2314 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2315 else
2316 ac_retval=1
2317 fi
2318 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2319 conftest.$ac_objext conftest.beam conftest.$ac_ext
2320 rm -f conftest.val
2321
2322 fi
2323 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2324 as_fn_set_status $ac_retval
2325
2326 } # ac_fn_c_compute_int
2327
2328 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2329 # ---------------------------------------------
2330 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2331 # accordingly.
2332 ac_fn_c_check_decl ()
2333 {
2334 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2335 as_decl_name=`echo $2|sed 's/ *(.*//'`
2336 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2338 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2339 if eval \${$3+:} false; then :
2340 $as_echo_n "(cached) " >&6
2341 else
2342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2343 /* end confdefs.h. */
2344 $4
2345 int
2346 main ()
2347 {
2348 #ifndef $as_decl_name
2349 #ifdef __cplusplus
2350 (void) $as_decl_use;
2351 #else
2352 (void) $as_decl_name;
2353 #endif
2354 #endif
2355
2356 ;
2357 return 0;
2358 }
2359 _ACEOF
2360 if ac_fn_c_try_compile "$LINENO"; then :
2361 eval "$3=yes"
2362 else
2363 eval "$3=no"
2364 fi
2365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2366 fi
2367 eval ac_res=\$$3
2368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2369 $as_echo "$ac_res" >&6; }
2370 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2371
2372 } # ac_fn_c_check_decl
2373
2374 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2375 # ----------------------------------------------------
2376 # Tries to find if the field MEMBER exists in type AGGR, after including
2377 # INCLUDES, setting cache variable VAR accordingly.
2378 ac_fn_c_check_member ()
2379 {
2380 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2382 $as_echo_n "checking for $2.$3... " >&6; }
2383 if eval \${$4+:} false; then :
2384 $as_echo_n "(cached) " >&6
2385 else
2386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2387 /* end confdefs.h. */
2388 $5
2389 int
2390 main ()
2391 {
2392 static $2 ac_aggr;
2393 if (ac_aggr.$3)
2394 return 0;
2395 ;
2396 return 0;
2397 }
2398 _ACEOF
2399 if ac_fn_c_try_compile "$LINENO"; then :
2400 eval "$4=yes"
2401 else
2402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2403 /* end confdefs.h. */
2404 $5
2405 int
2406 main ()
2407 {
2408 static $2 ac_aggr;
2409 if (sizeof ac_aggr.$3)
2410 return 0;
2411 ;
2412 return 0;
2413 }
2414 _ACEOF
2415 if ac_fn_c_try_compile "$LINENO"; then :
2416 eval "$4=yes"
2417 else
2418 eval "$4=no"
2419 fi
2420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2421 fi
2422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2423 fi
2424 eval ac_res=\$$4
2425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2426 $as_echo "$ac_res" >&6; }
2427 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2428
2429 } # ac_fn_c_check_member
2430 cat >config.log <<_ACEOF
2431 This file contains any messages produced by compilers while
2432 running configure, to aid debugging if configure makes a mistake.
2433
2434 It was created by unbound $as_me 1.9.1, which was
2435 generated by GNU Autoconf 2.69. Invocation command line was
2436
2437 $ $0 $@
2438
2439 _ACEOF
2440 exec 5>>config.log
2441 {
2442 cat <<_ASUNAME
2443 ## --------- ##
2444 ## Platform. ##
2445 ## --------- ##
2446
2447 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2448 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2449 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2450 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2451 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2452
2453 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2454 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2455
2456 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2457 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2458 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2459 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2460 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2461 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2462 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2463
2464 _ASUNAME
2465
2466 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2467 for as_dir in $PATH
2468 do
2469 IFS=$as_save_IFS
2470 test -z "$as_dir" && as_dir=.
2471 $as_echo "PATH: $as_dir"
2472 done
2473 IFS=$as_save_IFS
2474
2475 } >&5
2476
2477 cat >&5 <<_ACEOF
2478
2479
2480 ## ----------- ##
2481 ## Core tests. ##
2482 ## ----------- ##
2483
2484 _ACEOF
2485
2486
2487 # Keep a trace of the command line.
2488 # Strip out --no-create and --no-recursion so they do not pile up.
2489 # Strip out --silent because we don't want to record it for future runs.
2490 # Also quote any args containing shell meta-characters.
2491 # Make two passes to allow for proper duplicate-argument suppression.
2492 ac_configure_args=
2493 ac_configure_args0=
2494 ac_configure_args1=
2495 ac_must_keep_next=false
2496 for ac_pass in 1 2
2497 do
2498 for ac_arg
2499 do
2500 case $ac_arg in
2501 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2502 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2503 | -silent | --silent | --silen | --sile | --sil)
2504 continue ;;
2505 *\'*)
2506 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2507 esac
2508 case $ac_pass in
2509 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2510 2)
2511 as_fn_append ac_configure_args1 " '$ac_arg'"
2512 if test $ac_must_keep_next = true; then
2513 ac_must_keep_next=false # Got value, back to normal.
2514 else
2515 case $ac_arg in
2516 *=* | --config-cache | -C | -disable-* | --disable-* \
2517 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2518 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2519 | -with-* | --with-* | -without-* | --without-* | --x)
2520 case "$ac_configure_args0 " in
2521 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2522 esac
2523 ;;
2524 -* ) ac_must_keep_next=true ;;
2525 esac
2526 fi
2527 as_fn_append ac_configure_args " '$ac_arg'"
2528 ;;
2529 esac
2530 done
2531 done
2532 { ac_configure_args0=; unset ac_configure_args0;}
2533 { ac_configure_args1=; unset ac_configure_args1;}
2534
2535 # When interrupted or exit'd, cleanup temporary files, and complete
2536 # config.log. We remove comments because anyway the quotes in there
2537 # would cause problems or look ugly.
2538 # WARNING: Use '\'' to represent an apostrophe within the trap.
2539 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2540 trap 'exit_status=$?
2541 # Save into config.log some information that might help in debugging.
2542 {
2543 echo
2544
2545 $as_echo "## ---------------- ##
2546 ## Cache variables. ##
2547 ## ---------------- ##"
2548 echo
2549 # The following way of writing the cache mishandles newlines in values,
2550 (
2551 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2552 eval ac_val=\$$ac_var
2553 case $ac_val in #(
2554 *${as_nl}*)
2555 case $ac_var in #(
2556 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2557 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2558 esac
2559 case $ac_var in #(
2560 _ | IFS | as_nl) ;; #(
2561 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2562 *) { eval $ac_var=; unset $ac_var;} ;;
2563 esac ;;
2564 esac
2565 done
2566 (set) 2>&1 |
2567 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2568 *${as_nl}ac_space=\ *)
2569 sed -n \
2570 "s/'\''/'\''\\\\'\'''\''/g;
2571 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2572 ;; #(
2573 *)
2574 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2575 ;;
2576 esac |
2577 sort
2578 )
2579 echo
2580
2581 $as_echo "## ----------------- ##
2582 ## Output variables. ##
2583 ## ----------------- ##"
2584 echo
2585 for ac_var in $ac_subst_vars
2586 do
2587 eval ac_val=\$$ac_var
2588 case $ac_val in
2589 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2590 esac
2591 $as_echo "$ac_var='\''$ac_val'\''"
2592 done | sort
2593 echo
2594
2595 if test -n "$ac_subst_files"; then
2596 $as_echo "## ------------------- ##
2597 ## File substitutions. ##
2598 ## ------------------- ##"
2599 echo
2600 for ac_var in $ac_subst_files
2601 do
2602 eval ac_val=\$$ac_var
2603 case $ac_val in
2604 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2605 esac
2606 $as_echo "$ac_var='\''$ac_val'\''"
2607 done | sort
2608 echo
2609 fi
2610
2611 if test -s confdefs.h; then
2612 $as_echo "## ----------- ##
2613 ## confdefs.h. ##
2614 ## ----------- ##"
2615 echo
2616 cat confdefs.h
2617 echo
2618 fi
2619 test "$ac_signal" != 0 &&
2620 $as_echo "$as_me: caught signal $ac_signal"
2621 $as_echo "$as_me: exit $exit_status"
2622 } >&5
2623 rm -f core *.core core.conftest.* &&
2624 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2625 exit $exit_status
2626 ' 0
2627 for ac_signal in 1 2 13 15; do
2628 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2629 done
2630 ac_signal=0
2631
2632 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2633 rm -f -r conftest* confdefs.h
2634
2635 $as_echo "/* confdefs.h */" > confdefs.h
2636
2637 # Predefined preprocessor variables.
2638
2639 cat >>confdefs.h <<_ACEOF
2640 #define PACKAGE_NAME "$PACKAGE_NAME"
2641 _ACEOF
2642
2643 cat >>confdefs.h <<_ACEOF
2644 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2645 _ACEOF
2646
2647 cat >>confdefs.h <<_ACEOF
2648 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2649 _ACEOF
2650
2651 cat >>confdefs.h <<_ACEOF
2652 #define PACKAGE_STRING "$PACKAGE_STRING"
2653 _ACEOF
2654
2655 cat >>confdefs.h <<_ACEOF
2656 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2657 _ACEOF
2658
2659 cat >>confdefs.h <<_ACEOF
2660 #define PACKAGE_URL "$PACKAGE_URL"
2661 _ACEOF
2662
2663
2664 # Let the site file select an alternate cache file if it wants to.
2665 # Prefer an explicitly selected file to automatically selected ones.
2666 ac_site_file1=NONE
2667 ac_site_file2=NONE
2668 if test -n "$CONFIG_SITE"; then
2669 # We do not want a PATH search for config.site.
2670 case $CONFIG_SITE in #((
2671 -*) ac_site_file1=./$CONFIG_SITE;;
2672 */*) ac_site_file1=$CONFIG_SITE;;
2673 *) ac_site_file1=./$CONFIG_SITE;;
2674 esac
2675 elif test "x$prefix" != xNONE; then
2676 ac_site_file1=$prefix/share/config.site
2677 ac_site_file2=$prefix/etc/config.site
2678 else
2679 ac_site_file1=$ac_default_prefix/share/config.site
2680 ac_site_file2=$ac_default_prefix/etc/config.site
2681 fi
2682 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2683 do
2684 test "x$ac_site_file" = xNONE && continue
2685 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2687 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2688 sed 's/^/| /' "$ac_site_file" >&5
2689 . "$ac_site_file" \
2690 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2691 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2692 as_fn_error $? "failed to load site script $ac_site_file
2693 See \`config.log' for more details" "$LINENO" 5; }
2694 fi
2695 done
2696
2697 if test -r "$cache_file"; then
2698 # Some versions of bash will fail to source /dev/null (special files
2699 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2700 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2701 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2702 $as_echo "$as_me: loading cache $cache_file" >&6;}
2703 case $cache_file in
2704 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2705 *) . "./$cache_file";;
2706 esac
2707 fi
2708 else
2709 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2710 $as_echo "$as_me: creating cache $cache_file" >&6;}
2711 >$cache_file
2712 fi
2713
2714 # Check that the precious variables saved in the cache have kept the same
2715 # value.
2716 ac_cache_corrupted=false
2717 for ac_var in $ac_precious_vars; do
2718 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2719 eval ac_new_set=\$ac_env_${ac_var}_set
2720 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2721 eval ac_new_val=\$ac_env_${ac_var}_value
2722 case $ac_old_set,$ac_new_set in
2723 set,)
2724 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2725 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2726 ac_cache_corrupted=: ;;
2727 ,set)
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2729 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2730 ac_cache_corrupted=: ;;
2731 ,);;
2732 *)
2733 if test "x$ac_old_val" != "x$ac_new_val"; then
2734 # differences in whitespace do not lead to failure.
2735 ac_old_val_w=`echo x $ac_old_val`
2736 ac_new_val_w=`echo x $ac_new_val`
2737 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2739 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2740 ac_cache_corrupted=:
2741 else
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2743 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2744 eval $ac_var=\$ac_old_val
2745 fi
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2747 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2749 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2750 fi;;
2751 esac
2752 # Pass precious variables to config.status.
2753 if test "$ac_new_set" = set; then
2754 case $ac_new_val in
2755 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2756 *) ac_arg=$ac_var=$ac_new_val ;;
2757 esac
2758 case " $ac_configure_args " in
2759 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2760 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2761 esac
2762 fi
2763 done
2764 if $ac_cache_corrupted; then
2765 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2766 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2767 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2768 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2769 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2770 fi
2771 ## -------------------- ##
2772 ## Main body of script. ##
2773 ## -------------------- ##
2774
2775 ac_ext=c
2776 ac_cpp='$CPP $CPPFLAGS'
2777 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2778 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2779 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2780
2781
2782 UNBOUND_VERSION_MAJOR=1
2783
2784 UNBOUND_VERSION_MINOR=9
2785
2786 UNBOUND_VERSION_MICRO=1
2787
2788
2789 LIBUNBOUND_CURRENT=9
2790 LIBUNBOUND_REVISION=1
2791 LIBUNBOUND_AGE=1
2792 # 1.0.0 had 0:12:0
2793 # 1.0.1 had 0:13:0
2794 # 1.0.2 had 0:14:0
2795 # 1.1.0 had 0:15:0
2796 # 1.1.1 had 0:16:0
2797 # 1.2.0 had 0:17:0
2798 # 1.2.1 had 0:18:0
2799 # 1.3.0 had 1:0:0 # ub_cancel and -export-symbols.
2800 # 1.3.1 had 1:1:0
2801 # 1.3.2 had 1:2:0
2802 # 1.3.3 had 1:3:0
2803 # 1.3.4 had 1:4:0
2804 # 1.4.0-snapshots had 1:5:0
2805 # 1.4.0 had 1:5:0 (not 2:0:0) # ub_result.why_bogus
2806 # 1.4.1 had 2:1:0
2807 # 1.4.2 had 2:2:0
2808 # 1.4.3 had 2:3:0
2809 # 1.4.4 had 2:4:0
2810 # 1.4.5 had 2:5:0
2811 # 1.4.6 had 2:6:0
2812 # 1.4.7 had 2:7:0
2813 # 1.4.8 had 2:8:0
2814 # 1.4.9 had 2:9:0
2815 # 1.4.10 had 2:10:0
2816 # 1.4.11 had 2:11:0
2817 # 1.4.12 had 2:12:0
2818 # 1.4.13 had 2:13:0
2819 # and 1.4.13p1 and 1.4.13.p2
2820 # 1.4.14 had 2:14:0
2821 # 1.4.15 had 3:0:1 # adds ub_version()
2822 # 1.4.16 had 3:1:1
2823 # 1.4.17 had 3:2:1
2824 # 1.4.18 had 3:3:1
2825 # 1.4.19 had 3:4:1
2826 # 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
2827 # 1.4.21 had 4:1:2
2828 # 1.4.22 had 4:1:2
2829 # 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2830 # 1.5.1 had 5:3:3
2831 # 1.5.2 had 5:5:3
2832 # 1.5.3 had 5:6:3
2833 # 1.5.4 had 5:7:3
2834 # 1.5.5 had 5:8:3
2835 # 1.5.6 had 5:9:3
2836 # 1.5.7 had 5:10:3
2837 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
2838 # 1.5.9 had 6:1:4
2839 # 1.5.10 had 6:2:4
2840 # 1.6.0 had 6:3:4
2841 # 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
2842 # 1.6.2 had 7:1:5
2843 # 1.6.3 had 7:2:5
2844 # 1.6.4 had 7:3:5
2845 # 1.6.5 had 7:4:5
2846 # 1.6.6 had 7:5:5
2847 # 1.6.7 had 7:6:5
2848 # 1.6.8 had 7:7:5
2849 # 1.7.0 had 7:8:5
2850 # 1.7.1 had 7:9:5
2851 # 1.7.2 had 7:10:5
2852 # 1.7.3 had 7:11:5
2853 # 1.8.0 had 8:0:0 # changes the event callback function signature
2854 # 1.8.1 had 8:1:0
2855 # 1.8.2 had 8:2:0
2856 # 1.8.3 had 8:3:0
2857 # 1.9.0 had 9:0:1 # add ub_ctx_set_tls
2858 # 1.9.1 had 9:1:1
2859
2860 # Current -- the number of the binary API that we're implementing
2861 # Revision -- which iteration of the implementation of the binary
2862 # API are we supplying?
2863 # Age -- How many previous binary API versions do we also
2864 # support?
2865 #
2866 # If we release a new version that does not change the binary API,
2867 # increment Revision.
2868 #
2869 # If we release a new version that changes the binary API, but does
2870 # not break programs compiled against the old binary API, increment
2871 # Current and Age. Set Revision to 0, since this is the first
2872 # implementation of the new API.
2873 #
2874 # Otherwise, we're changing the binary API and breaking backward
2875 # compatibility with old binaries. Increment Current. Set Age to 0,
2876 # since we're backward compatible with no previous APIs. Set Revision
2877 # to 0 too.
2878
2879
2880
2881
2882 CFLAGS="$CFLAGS"
2883 ac_ext=c
2884 ac_cpp='$CPP $CPPFLAGS'
2885 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2886 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2887 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2888 if test -n "$ac_tool_prefix"; then
2889 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2890 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2892 $as_echo_n "checking for $ac_word... " >&6; }
2893 if ${ac_cv_prog_CC+:} false; then :
2894 $as_echo_n "(cached) " >&6
2895 else
2896 if test -n "$CC"; then
2897 ac_cv_prog_CC="$CC" # Let the user override the test.
2898 else
2899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2900 for as_dir in $PATH
2901 do
2902 IFS=$as_save_IFS
2903 test -z "$as_dir" && as_dir=.
2904 for ac_exec_ext in '' $ac_executable_extensions; do
2905 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2906 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2907 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2908 break 2
2909 fi
2910 done
2911 done
2912 IFS=$as_save_IFS
2913
2914 fi
2915 fi
2916 CC=$ac_cv_prog_CC
2917 if test -n "$CC"; then
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2919 $as_echo "$CC" >&6; }
2920 else
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2922 $as_echo "no" >&6; }
2923 fi
2924
2925
2926 fi
2927 if test -z "$ac_cv_prog_CC"; then
2928 ac_ct_CC=$CC
2929 # Extract the first word of "gcc", so it can be a program name with args.
2930 set dummy gcc; ac_word=$2
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2932 $as_echo_n "checking for $ac_word... " >&6; }
2933 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2934 $as_echo_n "(cached) " >&6
2935 else
2936 if test -n "$ac_ct_CC"; then
2937 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2938 else
2939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2940 for as_dir in $PATH
2941 do
2942 IFS=$as_save_IFS
2943 test -z "$as_dir" && as_dir=.
2944 for ac_exec_ext in '' $ac_executable_extensions; do
2945 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2946 ac_cv_prog_ac_ct_CC="gcc"
2947 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2948 break 2
2949 fi
2950 done
2951 done
2952 IFS=$as_save_IFS
2953
2954 fi
2955 fi
2956 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2957 if test -n "$ac_ct_CC"; then
2958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2959 $as_echo "$ac_ct_CC" >&6; }
2960 else
2961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2962 $as_echo "no" >&6; }
2963 fi
2964
2965 if test "x$ac_ct_CC" = x; then
2966 CC=""
2967 else
2968 case $cross_compiling:$ac_tool_warned in
2969 yes:)
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2971 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2972 ac_tool_warned=yes ;;
2973 esac
2974 CC=$ac_ct_CC
2975 fi
2976 else
2977 CC="$ac_cv_prog_CC"
2978 fi
2979
2980 if test -z "$CC"; then
2981 if test -n "$ac_tool_prefix"; then
2982 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2983 set dummy ${ac_tool_prefix}cc; ac_word=$2
2984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2985 $as_echo_n "checking for $ac_word... " >&6; }
2986 if ${ac_cv_prog_CC+:} false; then :
2987 $as_echo_n "(cached) " >&6
2988 else
2989 if test -n "$CC"; then
2990 ac_cv_prog_CC="$CC" # Let the user override the test.
2991 else
2992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2993 for as_dir in $PATH
2994 do
2995 IFS=$as_save_IFS
2996 test -z "$as_dir" && as_dir=.
2997 for ac_exec_ext in '' $ac_executable_extensions; do
2998 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2999 ac_cv_prog_CC="${ac_tool_prefix}cc"
3000 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3001 break 2
3002 fi
3003 done
3004 done
3005 IFS=$as_save_IFS
3006
3007 fi
3008 fi
3009 CC=$ac_cv_prog_CC
3010 if test -n "$CC"; then
3011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3012 $as_echo "$CC" >&6; }
3013 else
3014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3015 $as_echo "no" >&6; }
3016 fi
3017
3018
3019 fi
3020 fi
3021 if test -z "$CC"; then
3022 # Extract the first word of "cc", so it can be a program name with args.
3023 set dummy cc; ac_word=$2
3024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3025 $as_echo_n "checking for $ac_word... " >&6; }
3026 if ${ac_cv_prog_CC+:} false; then :
3027 $as_echo_n "(cached) " >&6
3028 else
3029 if test -n "$CC"; then
3030 ac_cv_prog_CC="$CC" # Let the user override the test.
3031 else
3032 ac_prog_rejected=no
3033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3034 for as_dir in $PATH
3035 do
3036 IFS=$as_save_IFS
3037 test -z "$as_dir" && as_dir=.
3038 for ac_exec_ext in '' $ac_executable_extensions; do
3039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3040 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3041 ac_prog_rejected=yes
3042 continue
3043 fi
3044 ac_cv_prog_CC="cc"
3045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3046 break 2
3047 fi
3048 done
3049 done
3050 IFS=$as_save_IFS
3051
3052 if test $ac_prog_rejected = yes; then
3053 # We found a bogon in the path, so make sure we never use it.
3054 set dummy $ac_cv_prog_CC
3055 shift
3056 if test $# != 0; then
3057 # We chose a different compiler from the bogus one.
3058 # However, it has the same basename, so the bogon will be chosen
3059 # first if we set CC to just the basename; use the full file name.
3060 shift
3061 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3062 fi
3063 fi
3064 fi
3065 fi
3066 CC=$ac_cv_prog_CC
3067 if test -n "$CC"; then
3068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3069 $as_echo "$CC" >&6; }
3070 else
3071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3072 $as_echo "no" >&6; }
3073 fi
3074
3075
3076 fi
3077 if test -z "$CC"; then
3078 if test -n "$ac_tool_prefix"; then
3079 for ac_prog in cl.exe
3080 do
3081 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3082 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3084 $as_echo_n "checking for $ac_word... " >&6; }
3085 if ${ac_cv_prog_CC+:} false; then :
3086 $as_echo_n "(cached) " >&6
3087 else
3088 if test -n "$CC"; then
3089 ac_cv_prog_CC="$CC" # Let the user override the test.
3090 else
3091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3092 for as_dir in $PATH
3093 do
3094 IFS=$as_save_IFS
3095 test -z "$as_dir" && as_dir=.
3096 for ac_exec_ext in '' $ac_executable_extensions; do
3097 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3098 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3100 break 2
3101 fi
3102 done
3103 done
3104 IFS=$as_save_IFS
3105
3106 fi
3107 fi
3108 CC=$ac_cv_prog_CC
3109 if test -n "$CC"; then
3110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3111 $as_echo "$CC" >&6; }
3112 else
3113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3114 $as_echo "no" >&6; }
3115 fi
3116
3117
3118 test -n "$CC" && break
3119 done
3120 fi
3121 if test -z "$CC"; then
3122 ac_ct_CC=$CC
3123 for ac_prog in cl.exe
3124 do
3125 # Extract the first word of "$ac_prog", so it can be a program name with args.
3126 set dummy $ac_prog; ac_word=$2
3127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3128 $as_echo_n "checking for $ac_word... " >&6; }
3129 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3130 $as_echo_n "(cached) " >&6
3131 else
3132 if test -n "$ac_ct_CC"; then
3133 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3134 else
3135 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3136 for as_dir in $PATH
3137 do
3138 IFS=$as_save_IFS
3139 test -z "$as_dir" && as_dir=.
3140 for ac_exec_ext in '' $ac_executable_extensions; do
3141 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3142 ac_cv_prog_ac_ct_CC="$ac_prog"
3143 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3144 break 2
3145 fi
3146 done
3147 done
3148 IFS=$as_save_IFS
3149
3150 fi
3151 fi
3152 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3153 if test -n "$ac_ct_CC"; then
3154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3155 $as_echo "$ac_ct_CC" >&6; }
3156 else
3157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3158 $as_echo "no" >&6; }
3159 fi
3160
3161
3162 test -n "$ac_ct_CC" && break
3163 done
3164
3165 if test "x$ac_ct_CC" = x; then
3166 CC=""
3167 else
3168 case $cross_compiling:$ac_tool_warned in
3169 yes:)
3170 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3171 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3172 ac_tool_warned=yes ;;
3173 esac
3174 CC=$ac_ct_CC
3175 fi
3176 fi
3177
3178 fi
3179
3180
3181 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3182 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3183 as_fn_error $? "no acceptable C compiler found in \$PATH
3184 See \`config.log' for more details" "$LINENO" 5; }
3185
3186 # Provide some information about the compiler.
3187 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3188 set X $ac_compile
3189 ac_compiler=$2
3190 for ac_option in --version -v -V -qversion; do
3191 { { ac_try="$ac_compiler $ac_option >&5"
3192 case "(($ac_try" in
3193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3194 *) ac_try_echo=$ac_try;;
3195 esac
3196 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3197 $as_echo "$ac_try_echo"; } >&5
3198 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3199 ac_status=$?
3200 if test -s conftest.err; then
3201 sed '10a\
3202 ... rest of stderr output deleted ...
3203 10q' conftest.err >conftest.er1
3204 cat conftest.er1 >&5
3205 fi
3206 rm -f conftest.er1 conftest.err
3207 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3208 test $ac_status = 0; }
3209 done
3210
3211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3212 /* end confdefs.h. */
3213
3214 int
3215 main ()
3216 {
3217
3218 ;
3219 return 0;
3220 }
3221 _ACEOF
3222 ac_clean_files_save=$ac_clean_files
3223 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3224 # Try to create an executable without -o first, disregard a.out.
3225 # It will help us diagnose broken compilers, and finding out an intuition
3226 # of exeext.
3227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3228 $as_echo_n "checking whether the C compiler works... " >&6; }
3229 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3230
3231 # The possible output files:
3232 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3233
3234 ac_rmfiles=
3235 for ac_file in $ac_files
3236 do
3237 case $ac_file in
3238 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3239 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3240 esac
3241 done
3242 rm -f $ac_rmfiles
3243
3244 if { { ac_try="$ac_link_default"
3245 case "(($ac_try" in
3246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3247 *) ac_try_echo=$ac_try;;
3248 esac
3249 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3250 $as_echo "$ac_try_echo"; } >&5
3251 (eval "$ac_link_default") 2>&5
3252 ac_status=$?
3253 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3254 test $ac_status = 0; }; then :
3255 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3256 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3257 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3258 # so that the user can short-circuit this test for compilers unknown to
3259 # Autoconf.
3260 for ac_file in $ac_files ''
3261 do
3262 test -f "$ac_file" || continue
3263 case $ac_file in
3264 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3265 ;;
3266 [ab].out )
3267 # We found the default executable, but exeext='' is most
3268 # certainly right.
3269 break;;
3270 *.* )
3271 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3272 then :; else
3273 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3274 fi
3275 # We set ac_cv_exeext here because the later test for it is not
3276 # safe: cross compilers may not add the suffix if given an `-o'
3277 # argument, so we may need to know it at that point already.
3278 # Even if this section looks crufty: it has the advantage of
3279 # actually working.
3280 break;;
3281 * )
3282 break;;
3283 esac
3284 done
3285 test "$ac_cv_exeext" = no && ac_cv_exeext=
3286
3287 else
3288 ac_file=''
3289 fi
3290 if test -z "$ac_file"; then :
3291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3292 $as_echo "no" >&6; }
3293 $as_echo "$as_me: failed program was:" >&5
3294 sed 's/^/| /' conftest.$ac_ext >&5
3295
3296 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3297 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3298 as_fn_error 77 "C compiler cannot create executables
3299 See \`config.log' for more details" "$LINENO" 5; }
3300 else
3301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3302 $as_echo "yes" >&6; }
3303 fi
3304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3305 $as_echo_n "checking for C compiler default output file name... " >&6; }
3306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3307 $as_echo "$ac_file" >&6; }
3308 ac_exeext=$ac_cv_exeext
3309
3310 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3311 ac_clean_files=$ac_clean_files_save
3312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3313 $as_echo_n "checking for suffix of executables... " >&6; }
3314 if { { ac_try="$ac_link"
3315 case "(($ac_try" in
3316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3317 *) ac_try_echo=$ac_try;;
3318 esac
3319 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3320 $as_echo "$ac_try_echo"; } >&5
3321 (eval "$ac_link") 2>&5
3322 ac_status=$?
3323 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3324 test $ac_status = 0; }; then :
3325 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3326 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3327 # work properly (i.e., refer to `conftest.exe'), while it won't with
3328 # `rm'.
3329 for ac_file in conftest.exe conftest conftest.*; do
3330 test -f "$ac_file" || continue
3331 case $ac_file in
3332 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3333 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3334 break;;
3335 * ) break;;
3336 esac
3337 done
3338 else
3339 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3340 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3341 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3342 See \`config.log' for more details" "$LINENO" 5; }
3343 fi
3344 rm -f conftest conftest$ac_cv_exeext
3345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3346 $as_echo "$ac_cv_exeext" >&6; }
3347
3348 rm -f conftest.$ac_ext
3349 EXEEXT=$ac_cv_exeext
3350 ac_exeext=$EXEEXT
3351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3352 /* end confdefs.h. */
3353 #include <stdio.h>
3354 int
3355 main ()
3356 {
3357 FILE *f = fopen ("conftest.out", "w");
3358 return ferror (f) || fclose (f) != 0;
3359
3360 ;
3361 return 0;
3362 }
3363 _ACEOF
3364 ac_clean_files="$ac_clean_files conftest.out"
3365 # Check that the compiler produces executables we can run. If not, either
3366 # the compiler is broken, or we cross compile.
3367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3368 $as_echo_n "checking whether we are cross compiling... " >&6; }
3369 if test "$cross_compiling" != yes; then
3370 { { ac_try="$ac_link"
3371 case "(($ac_try" in
3372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3373 *) ac_try_echo=$ac_try;;
3374 esac
3375 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3376 $as_echo "$ac_try_echo"; } >&5
3377 (eval "$ac_link") 2>&5
3378 ac_status=$?
3379 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3380 test $ac_status = 0; }
3381 if { ac_try='./conftest$ac_cv_exeext'
3382 { { case "(($ac_try" in
3383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3384 *) ac_try_echo=$ac_try;;
3385 esac
3386 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3387 $as_echo "$ac_try_echo"; } >&5
3388 (eval "$ac_try") 2>&5
3389 ac_status=$?
3390 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3391 test $ac_status = 0; }; }; then
3392 cross_compiling=no
3393 else
3394 if test "$cross_compiling" = maybe; then
3395 cross_compiling=yes
3396 else
3397 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3398 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3399 as_fn_error $? "cannot run C compiled programs.
3400 If you meant to cross compile, use \`--host'.
3401 See \`config.log' for more details" "$LINENO" 5; }
3402 fi
3403 fi
3404 fi
3405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3406 $as_echo "$cross_compiling" >&6; }
3407
3408 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3409 ac_clean_files=$ac_clean_files_save
3410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3411 $as_echo_n "checking for suffix of object files... " >&6; }
3412 if ${ac_cv_objext+:} false; then :
3413 $as_echo_n "(cached) " >&6
3414 else
3415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3416 /* end confdefs.h. */
3417
3418 int
3419 main ()
3420 {
3421
3422 ;
3423 return 0;
3424 }
3425 _ACEOF
3426 rm -f conftest.o conftest.obj
3427 if { { ac_try="$ac_compile"
3428 case "(($ac_try" in
3429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3430 *) ac_try_echo=$ac_try;;
3431 esac
3432 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3433 $as_echo "$ac_try_echo"; } >&5
3434 (eval "$ac_compile") 2>&5
3435 ac_status=$?
3436 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3437 test $ac_status = 0; }; then :
3438 for ac_file in conftest.o conftest.obj conftest.*; do
3439 test -f "$ac_file" || continue;
3440 case $ac_file in
3441 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3442 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3443 break;;
3444 esac
3445 done
3446 else
3447 $as_echo "$as_me: failed program was:" >&5
3448 sed 's/^/| /' conftest.$ac_ext >&5
3449
3450 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3451 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3452 as_fn_error $? "cannot compute suffix of object files: cannot compile
3453 See \`config.log' for more details" "$LINENO" 5; }
3454 fi
3455 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3456 fi
3457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3458 $as_echo "$ac_cv_objext" >&6; }
3459 OBJEXT=$ac_cv_objext
3460 ac_objext=$OBJEXT
3461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3462 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3463 if ${ac_cv_c_compiler_gnu+:} false; then :
3464 $as_echo_n "(cached) " >&6
3465 else
3466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3467 /* end confdefs.h. */
3468
3469 int
3470 main ()
3471 {
3472 #ifndef __GNUC__
3473 choke me
3474 #endif
3475
3476 ;
3477 return 0;
3478 }
3479 _ACEOF
3480 if ac_fn_c_try_compile "$LINENO"; then :
3481 ac_compiler_gnu=yes
3482 else
3483 ac_compiler_gnu=no
3484 fi
3485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3486 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3487
3488 fi
3489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3490 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3491 if test $ac_compiler_gnu = yes; then
3492 GCC=yes
3493 else
3494 GCC=
3495 fi
3496 ac_test_CFLAGS=${CFLAGS+set}
3497 ac_save_CFLAGS=$CFLAGS
3498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3499 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3500 if ${ac_cv_prog_cc_g+:} false; then :
3501 $as_echo_n "(cached) " >&6
3502 else
3503 ac_save_c_werror_flag=$ac_c_werror_flag
3504 ac_c_werror_flag=yes
3505 ac_cv_prog_cc_g=no
3506 CFLAGS="-g"
3507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3508 /* end confdefs.h. */
3509
3510 int
3511 main ()
3512 {
3513
3514 ;
3515 return 0;
3516 }
3517 _ACEOF
3518 if ac_fn_c_try_compile "$LINENO"; then :
3519 ac_cv_prog_cc_g=yes
3520 else
3521 CFLAGS=""
3522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3523 /* end confdefs.h. */
3524
3525 int
3526 main ()
3527 {
3528
3529 ;
3530 return 0;
3531 }
3532 _ACEOF
3533 if ac_fn_c_try_compile "$LINENO"; then :
3534
3535 else
3536 ac_c_werror_flag=$ac_save_c_werror_flag
3537 CFLAGS="-g"
3538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3539 /* end confdefs.h. */
3540
3541 int
3542 main ()
3543 {
3544
3545 ;
3546 return 0;
3547 }
3548 _ACEOF
3549 if ac_fn_c_try_compile "$LINENO"; then :
3550 ac_cv_prog_cc_g=yes
3551 fi
3552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3553 fi
3554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3555 fi
3556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3557 ac_c_werror_flag=$ac_save_c_werror_flag
3558 fi
3559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3560 $as_echo "$ac_cv_prog_cc_g" >&6; }
3561 if test "$ac_test_CFLAGS" = set; then
3562 CFLAGS=$ac_save_CFLAGS
3563 elif test $ac_cv_prog_cc_g = yes; then
3564 if test "$GCC" = yes; then
3565 CFLAGS="-g -O2"
3566 else
3567 CFLAGS="-g"
3568 fi
3569 else
3570 if test "$GCC" = yes; then
3571 CFLAGS="-O2"
3572 else
3573 CFLAGS=
3574 fi
3575 fi
3576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3577 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3578 if ${ac_cv_prog_cc_c89+:} false; then :
3579 $as_echo_n "(cached) " >&6
3580 else
3581 ac_cv_prog_cc_c89=no
3582 ac_save_CC=$CC
3583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3584 /* end confdefs.h. */
3585 #include <stdarg.h>
3586 #include <stdio.h>
3587 struct stat;
3588 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3589 struct buf { int x; };
3590 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3591 static char *e (p, i)
3592 char **p;
3593 int i;
3594 {
3595 return p[i];
3596 }
3597 static char *f (char * (*g) (char **, int), char **p, ...)
3598 {
3599 char *s;
3600 va_list v;
3601 va_start (v,p);
3602 s = g (p, va_arg (v,int));
3603 va_end (v);
3604 return s;
3605 }
3606
3607 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3608 function prototypes and stuff, but not '\xHH' hex character constants.
3609 These don't provoke an error unfortunately, instead are silently treated
3610 as 'x'. The following induces an error, until -std is added to get
3611 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3612 array size at least. It's necessary to write '\x00'==0 to get something
3613 that's true only with -std. */
3614 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3615
3616 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3617 inside strings and character constants. */
3618 #define FOO(x) 'x'
3619 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3620
3621 int test (int i, double x);
3622 struct s1 {int (*f) (int a);};
3623 struct s2 {int (*f) (double a);};
3624 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3625 int argc;
3626 char **argv;
3627 int
3628 main ()
3629 {
3630 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3631 ;
3632 return 0;
3633 }
3634 _ACEOF
3635 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3636 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3637 do
3638 CC="$ac_save_CC $ac_arg"
3639 if ac_fn_c_try_compile "$LINENO"; then :
3640 ac_cv_prog_cc_c89=$ac_arg
3641 fi
3642 rm -f core conftest.err conftest.$ac_objext
3643 test "x$ac_cv_prog_cc_c89" != "xno" && break
3644 done
3645 rm -f conftest.$ac_ext
3646 CC=$ac_save_CC
3647
3648 fi
3649 # AC_CACHE_VAL
3650 case "x$ac_cv_prog_cc_c89" in
3651 x)
3652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3653 $as_echo "none needed" >&6; } ;;
3654 xno)
3655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3656 $as_echo "unsupported" >&6; } ;;
3657 *)
3658 CC="$CC $ac_cv_prog_cc_c89"
3659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3660 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3661 esac
3662 if test "x$ac_cv_prog_cc_c89" != xno; then :
3663
3664 fi
3665
3666 ac_ext=c
3667 ac_cpp='$CPP $CPPFLAGS'
3668 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3669 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3670 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3671
3672
3673 ac_ext=c
3674 ac_cpp='$CPP $CPPFLAGS'
3675 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3676 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3677 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3679 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3680 # On Suns, sometimes $CPP names a directory.
3681 if test -n "$CPP" && test -d "$CPP"; then
3682 CPP=
3683 fi
3684 if test -z "$CPP"; then
3685 if ${ac_cv_prog_CPP+:} false; then :
3686 $as_echo_n "(cached) " >&6
3687 else
3688 # Double quotes because CPP needs to be expanded
3689 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3690 do
3691 ac_preproc_ok=false
3692 for ac_c_preproc_warn_flag in '' yes
3693 do
3694 # Use a header file that comes with gcc, so configuring glibc
3695 # with a fresh cross-compiler works.
3696 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3697 # <limits.h> exists even on freestanding compilers.
3698 # On the NeXT, cc -E runs the code through the compiler's parser,
3699 # not just through cpp. "Syntax error" is here to catch this case.
3700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3701 /* end confdefs.h. */
3702 #ifdef __STDC__
3703 # include <limits.h>
3704 #else
3705 # include <assert.h>
3706 #endif
3707 Syntax error
3708 _ACEOF
3709 if ac_fn_c_try_cpp "$LINENO"; then :
3710
3711 else
3712 # Broken: fails on valid input.
3713 continue
3714 fi
3715 rm -f conftest.err conftest.i conftest.$ac_ext
3716
3717 # OK, works on sane cases. Now check whether nonexistent headers
3718 # can be detected and how.
3719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3720 /* end confdefs.h. */
3721 #include <ac_nonexistent.h>
3722 _ACEOF
3723 if ac_fn_c_try_cpp "$LINENO"; then :
3724 # Broken: success on invalid input.
3725 continue
3726 else
3727 # Passes both tests.
3728 ac_preproc_ok=:
3729 break
3730 fi
3731 rm -f conftest.err conftest.i conftest.$ac_ext
3732
3733 done
3734 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3735 rm -f conftest.i conftest.err conftest.$ac_ext
3736 if $ac_preproc_ok; then :
3737 break
3738 fi
3739
3740 done
3741 ac_cv_prog_CPP=$CPP
3742
3743 fi
3744 CPP=$ac_cv_prog_CPP
3745 else
3746 ac_cv_prog_CPP=$CPP
3747 fi
3748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3749 $as_echo "$CPP" >&6; }
3750 ac_preproc_ok=false
3751 for ac_c_preproc_warn_flag in '' yes
3752 do
3753 # Use a header file that comes with gcc, so configuring glibc
3754 # with a fresh cross-compiler works.
3755 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3756 # <limits.h> exists even on freestanding compilers.
3757 # On the NeXT, cc -E runs the code through the compiler's parser,
3758 # not just through cpp. "Syntax error" is here to catch this case.
3759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3760 /* end confdefs.h. */
3761 #ifdef __STDC__
3762 # include <limits.h>
3763 #else
3764 # include <assert.h>
3765 #endif
3766 Syntax error
3767 _ACEOF
3768 if ac_fn_c_try_cpp "$LINENO"; then :
3769
3770 else
3771 # Broken: fails on valid input.
3772 continue
3773 fi
3774 rm -f conftest.err conftest.i conftest.$ac_ext
3775
3776 # OK, works on sane cases. Now check whether nonexistent headers
3777 # can be detected and how.
3778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3779 /* end confdefs.h. */
3780 #include <ac_nonexistent.h>
3781 _ACEOF
3782 if ac_fn_c_try_cpp "$LINENO"; then :
3783 # Broken: success on invalid input.
3784 continue
3785 else
3786 # Passes both tests.
3787 ac_preproc_ok=:
3788 break
3789 fi
3790 rm -f conftest.err conftest.i conftest.$ac_ext
3791
3792 done
3793 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3794 rm -f conftest.i conftest.err conftest.$ac_ext
3795 if $ac_preproc_ok; then :
3796
3797 else
3798 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3799 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3800 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3801 See \`config.log' for more details" "$LINENO" 5; }
3802 fi
3803
3804 ac_ext=c
3805 ac_cpp='$CPP $CPPFLAGS'
3806 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3807 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3808 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3809
3810
3811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3812 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3813 if ${ac_cv_path_GREP+:} false; then :
3814 $as_echo_n "(cached) " >&6
3815 else
3816 if test -z "$GREP"; then
3817 ac_path_GREP_found=false
3818 # Loop through the user's path and test for each of PROGNAME-LIST
3819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3820 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3821 do
3822 IFS=$as_save_IFS
3823 test -z "$as_dir" && as_dir=.
3824 for ac_prog in grep ggrep; do
3825 for ac_exec_ext in '' $ac_executable_extensions; do
3826 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3827 as_fn_executable_p "$ac_path_GREP" || continue
3828 # Check for GNU ac_path_GREP and select it if it is found.
3829 # Check for GNU $ac_path_GREP
3830 case `"$ac_path_GREP" --version 2>&1` in
3831 *GNU*)
3832 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3833 *)
3834 ac_count=0
3835 $as_echo_n 0123456789 >"conftest.in"
3836 while :
3837 do
3838 cat "conftest.in" "conftest.in" >"conftest.tmp"
3839 mv "conftest.tmp" "conftest.in"
3840 cp "conftest.in" "conftest.nl"
3841 $as_echo 'GREP' >> "conftest.nl"
3842 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3843 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3844 as_fn_arith $ac_count + 1 && ac_count=$as_val
3845 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3846 # Best one so far, save it but keep looking for a better one
3847 ac_cv_path_GREP="$ac_path_GREP"
3848 ac_path_GREP_max=$ac_count
3849 fi
3850 # 10*(2^10) chars as input seems more than enough
3851 test $ac_count -gt 10 && break
3852 done
3853 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3854 esac
3855
3856 $ac_path_GREP_found && break 3
3857 done
3858 done
3859 done
3860 IFS=$as_save_IFS
3861 if test -z "$ac_cv_path_GREP"; then
3862 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3863 fi
3864 else
3865 ac_cv_path_GREP=$GREP
3866 fi
3867
3868 fi
3869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3870 $as_echo "$ac_cv_path_GREP" >&6; }
3871 GREP="$ac_cv_path_GREP"
3872
3873
3874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3875 $as_echo_n "checking for egrep... " >&6; }
3876 if ${ac_cv_path_EGREP+:} false; then :
3877 $as_echo_n "(cached) " >&6
3878 else
3879 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3880 then ac_cv_path_EGREP="$GREP -E"
3881 else
3882 if test -z "$EGREP"; then
3883 ac_path_EGREP_found=false
3884 # Loop through the user's path and test for each of PROGNAME-LIST
3885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3886 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3887 do
3888 IFS=$as_save_IFS
3889 test -z "$as_dir" && as_dir=.
3890 for ac_prog in egrep; do
3891 for ac_exec_ext in '' $ac_executable_extensions; do
3892 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3893 as_fn_executable_p "$ac_path_EGREP" || continue
3894 # Check for GNU ac_path_EGREP and select it if it is found.
3895 # Check for GNU $ac_path_EGREP
3896 case `"$ac_path_EGREP" --version 2>&1` in
3897 *GNU*)
3898 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3899 *)
3900 ac_count=0
3901 $as_echo_n 0123456789 >"conftest.in"
3902 while :
3903 do
3904 cat "conftest.in" "conftest.in" >"conftest.tmp"
3905 mv "conftest.tmp" "conftest.in"
3906 cp "conftest.in" "conftest.nl"
3907 $as_echo 'EGREP' >> "conftest.nl"
3908 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3909 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3910 as_fn_arith $ac_count + 1 && ac_count=$as_val
3911 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3912 # Best one so far, save it but keep looking for a better one
3913 ac_cv_path_EGREP="$ac_path_EGREP"
3914 ac_path_EGREP_max=$ac_count
3915 fi
3916 # 10*(2^10) chars as input seems more than enough
3917 test $ac_count -gt 10 && break
3918 done
3919 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3920 esac
3921
3922 $ac_path_EGREP_found && break 3
3923 done
3924 done
3925 done
3926 IFS=$as_save_IFS
3927 if test -z "$ac_cv_path_EGREP"; then
3928 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3929 fi
3930 else
3931 ac_cv_path_EGREP=$EGREP
3932 fi
3933
3934 fi
3935 fi
3936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3937 $as_echo "$ac_cv_path_EGREP" >&6; }
3938 EGREP="$ac_cv_path_EGREP"
3939
3940
3941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3942 $as_echo_n "checking for ANSI C header files... " >&6; }
3943 if ${ac_cv_header_stdc+:} false; then :
3944 $as_echo_n "(cached) " >&6
3945 else
3946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3947 /* end confdefs.h. */
3948 #include <stdlib.h>
3949 #include <stdarg.h>
3950 #include <string.h>
3951 #include <float.h>
3952
3953 int
3954 main ()
3955 {
3956
3957 ;
3958 return 0;
3959 }
3960 _ACEOF
3961 if ac_fn_c_try_compile "$LINENO"; then :
3962 ac_cv_header_stdc=yes
3963 else
3964 ac_cv_header_stdc=no
3965 fi
3966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3967
3968 if test $ac_cv_header_stdc = yes; then
3969 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3971 /* end confdefs.h. */
3972 #include <string.h>
3973
3974 _ACEOF
3975 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3976 $EGREP "memchr" >/dev/null 2>&1; then :
3977
3978 else
3979 ac_cv_header_stdc=no
3980 fi
3981 rm -f conftest*
3982
3983 fi
3984
3985 if test $ac_cv_header_stdc = yes; then
3986 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3988 /* end confdefs.h. */
3989 #include <stdlib.h>
3990
3991 _ACEOF
3992 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3993 $EGREP "free" >/dev/null 2>&1; then :
3994
3995 else
3996 ac_cv_header_stdc=no
3997 fi
3998 rm -f conftest*
3999
4000 fi
4001
4002 if test $ac_cv_header_stdc = yes; then
4003 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4004 if test "$cross_compiling" = yes; then :
4005 :
4006 else
4007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4008 /* end confdefs.h. */
4009 #include <ctype.h>
4010 #include <stdlib.h>
4011 #if ((' ' & 0x0FF) == 0x020)
4012 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4013 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4014 #else
4015 # define ISLOWER(c) \
4016 (('a' <= (c) && (c) <= 'i') \
4017 || ('j' <= (c) && (c) <= 'r') \
4018 || ('s' <= (c) && (c) <= 'z'))
4019 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4020 #endif
4021
4022 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4023 int
4024 main ()
4025 {
4026 int i;
4027 for (i = 0; i < 256; i++)
4028 if (XOR (islower (i), ISLOWER (i))
4029 || toupper (i) != TOUPPER (i))
4030 return 2;
4031 return 0;
4032 }
4033 _ACEOF
4034 if ac_fn_c_try_run "$LINENO"; then :
4035
4036 else
4037 ac_cv_header_stdc=no
4038 fi
4039 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4040 conftest.$ac_objext conftest.beam conftest.$ac_ext
4041 fi
4042
4043 fi
4044 fi
4045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4046 $as_echo "$ac_cv_header_stdc" >&6; }
4047 if test $ac_cv_header_stdc = yes; then
4048
4049 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4050
4051 fi
4052
4053 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4054 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4055 inttypes.h stdint.h unistd.h
4056 do :
4057 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4058 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4059 "
4060 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4061 cat >>confdefs.h <<_ACEOF
4062 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4063 _ACEOF
4064
4065 fi
4066
4067 done
4068
4069
4070
4071 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4072 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4073 MINIX=yes
4074 else
4075 MINIX=
4076 fi
4077
4078
4079 if test "$MINIX" = yes; then
4080
4081 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4082
4083
4084 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4085
4086
4087 $as_echo "#define _MINIX 1" >>confdefs.h
4088
4089 fi
4090
4091
4092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4093 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4094 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4095 $as_echo_n "(cached) " >&6
4096 else
4097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4098 /* end confdefs.h. */
4099
4100 # define __EXTENSIONS__ 1
4101 $ac_includes_default
4102 int
4103 main ()
4104 {
4105
4106 ;
4107 return 0;
4108 }
4109 _ACEOF
4110 if ac_fn_c_try_compile "$LINENO"; then :
4111 ac_cv_safe_to_define___extensions__=yes
4112 else
4113 ac_cv_safe_to_define___extensions__=no
4114 fi
4115 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4116 fi
4117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4118 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4119 test $ac_cv_safe_to_define___extensions__ = yes &&
4120 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4121
4122 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4123
4124 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4125
4126 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4127
4128 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4129
4130
4131
4132 if test "$ac_cv_header_minix_config_h" = "yes"; then
4133
4134 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4135
4136 fi
4137
4138 case "$prefix" in
4139 NONE)
4140 prefix="/usr/local"
4141 ;;
4142 esac
4143 case "$exec_prefix" in
4144 NONE)
4145 exec_prefix="$prefix"
4146 ;;
4147 esac
4148
4149 # are we on MinGW?
4150 if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
4151 else
4152 if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes"
4153 else on_mingw="no"; fi
4154 fi
4155
4156 #
4157 # Determine configuration file
4158 # the eval is to evaluate shell expansion twice
4159 UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4160
4161 UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4162
4163 UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4164
4165 if test $on_mingw = "no"; then
4166 ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4167 else
4168 ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4169 fi
4170
4171 # Check whether --with-conf_file was given.
4172 if test "${with_conf_file+set}" = set; then :
4173 withval=$with_conf_file; ub_conf_file="$withval"
4174 fi
4175
4176
4177 hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4178
4179
4180 cat >>confdefs.h <<_ACEOF
4181 #define CONFIGFILE "$hdr_config"
4182 _ACEOF
4183
4184 ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4185 $as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4186 X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4187 X"$ub_conf_file" : 'X\(//\)$' \| \
4188 X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4189 $as_echo X"$ub_conf_file" |
4190 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4191 s//\1/
4192 q
4193 }
4194 /^X\(\/\/\)[^/].*/{
4195 s//\1/
4196 q
4197 }
4198 /^X\(\/\/\)$/{
4199 s//\1/
4200 q
4201 }
4202 /^X\(\/\).*/{
4203 s//\1/
4204 q
4205 }
4206 s/.*/./; q'`
4207
4208
4209 # Determine run, chroot directory and pidfile locations
4210
4211 # Check whether --with-run-dir was given.
4212 if test "${with_run_dir+set}" = set; then :
4213 withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4214 else
4215 if test $on_mingw = no; then
4216 UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4217 else
4218 UNBOUND_RUN_DIR=""
4219 fi
4220
4221 fi
4222
4223
4224 hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4225
4226
4227 cat >>confdefs.h <<_ACEOF
4228 #define RUN_DIR "$hdr_run"
4229 _ACEOF
4230
4231
4232
4233 # Check whether --with-chroot-dir was given.
4234 if test "${with_chroot_dir+set}" = set; then :
4235 withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4236 else
4237 if test $on_mingw = no; then
4238 UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4239 else
4240 UNBOUND_CHROOT_DIR=""
4241 fi
4242
4243 fi
4244
4245
4246 hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4247
4248
4249 cat >>confdefs.h <<_ACEOF
4250 #define CHROOT_DIR "$hdr_chroot"
4251 _ACEOF
4252
4253
4254
4255 # Check whether --with-share-dir was given.
4256 if test "${with_share_dir+set}" = set; then :
4257 withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4258 else
4259 UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4260 fi
4261
4262
4263
4264 cat >>confdefs.h <<_ACEOF
4265 #define SHARE_DIR "$UNBOUND_SHARE_DIR"
4266 _ACEOF
4267
4268
4269
4270 # Check whether --with-pidfile was given.
4271 if test "${with_pidfile+set}" = set; then :
4272 withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4273 else
4274 if test $on_mingw = no; then
4275 UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4276 else
4277 UNBOUND_PIDFILE=""
4278 fi
4279
4280 fi
4281
4282
4283 hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4284
4285
4286 cat >>confdefs.h <<_ACEOF
4287 #define PIDFILE "$hdr_pid"
4288 _ACEOF
4289
4290
4291
4292 # Check whether --with-rootkey-file was given.
4293 if test "${with_rootkey_file+set}" = set; then :
4294 withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4295 else
4296 if test $on_mingw = no; then
4297 UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4298 else
4299 UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4300 fi
4301
4302 fi
4303
4304
4305 hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4306
4307
4308 cat >>confdefs.h <<_ACEOF
4309 #define ROOT_ANCHOR_FILE "$hdr_rkey"
4310 _ACEOF
4311
4312
4313
4314 # Check whether --with-rootcert-file was given.
4315 if test "${with_rootcert_file+set}" = set; then :
4316 withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4317 else
4318 if test $on_mingw = no; then
4319 UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4320 else
4321 UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4322 fi
4323
4324 fi
4325
4326
4327 hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4328
4329
4330 cat >>confdefs.h <<_ACEOF
4331 #define ROOT_CERT_FILE "$hdr_rpem"
4332 _ACEOF
4333
4334
4335
4336 # Check whether --with-username was given.
4337 if test "${with_username+set}" = set; then :
4338 withval=$with_username; UNBOUND_USERNAME="$withval"
4339 else
4340 UNBOUND_USERNAME="unbound"
4341 fi
4342
4343
4344
4345 cat >>confdefs.h <<_ACEOF
4346 #define UB_USERNAME "$UNBOUND_USERNAME"
4347 _ACEOF
4348
4349
4350
4351 $as_echo "#define WINVER 0x0502" >>confdefs.h
4352
4353 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/' `
4354
4355
4356 cat >>confdefs.h <<_ACEOF
4357 #define RSRC_PACKAGE_VERSION $wnvs
4358 _ACEOF
4359
4360
4361 # Checks for typedefs, structures, and compiler characteristics.
4362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4363 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4364 if ${ac_cv_c_const+:} false; then :
4365 $as_echo_n "(cached) " >&6
4366 else
4367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4368 /* end confdefs.h. */
4369
4370 int
4371 main ()
4372 {
4373
4374 #ifndef __cplusplus
4375 /* Ultrix mips cc rejects this sort of thing. */
4376 typedef int charset[2];
4377 const charset cs = { 0, 0 };
4378 /* SunOS 4.1.1 cc rejects this. */
4379 char const *const *pcpcc;
4380 char **ppc;
4381 /* NEC SVR4.0.2 mips cc rejects this. */
4382 struct point {int x, y;};
4383 static struct point const zero = {0,0};
4384 /* AIX XL C 1.02.0.0 rejects this.
4385 It does not let you subtract one const X* pointer from another in
4386 an arm of an if-expression whose if-part is not a constant
4387 expression */
4388 const char *g = "string";
4389 pcpcc = &g + (g ? g-g : 0);
4390 /* HPUX 7.0 cc rejects these. */
4391 ++pcpcc;
4392 ppc = (char**) pcpcc;
4393 pcpcc = (char const *const *) ppc;
4394 { /* SCO 3.2v4 cc rejects this sort of thing. */
4395 char tx;
4396 char *t = &tx;
4397 char const *s = 0 ? (char *) 0 : (char const *) 0;
4398
4399 *t++ = 0;
4400 if (s) return 0;
4401 }
4402 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4403 int x[] = {25, 17};
4404 const int *foo = &x[0];
4405 ++foo;
4406 }
4407 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4408 typedef const int *iptr;
4409 iptr p = 0;
4410 ++p;
4411 }
4412 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4413 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4414 struct s { int j; const int *ap[3]; } bx;
4415 struct s *b = &bx; b->j = 5;
4416 }
4417 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4418 const int foo = 10;
4419 if (!foo) return 0;
4420 }
4421 return !cs[0] && !zero.x;
4422 #endif
4423
4424 ;
4425 return 0;
4426 }
4427 _ACEOF
4428 if ac_fn_c_try_compile "$LINENO"; then :
4429 ac_cv_c_const=yes
4430 else
4431 ac_cv_c_const=no
4432 fi
4433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4434 fi
4435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4436 $as_echo "$ac_cv_c_const" >&6; }
4437 if test $ac_cv_c_const = no; then
4438
4439 $as_echo "#define const /**/" >>confdefs.h
4440
4441 fi
4442
4443 ac_ext=c
4444 ac_cpp='$CPP $CPPFLAGS'
4445 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4446 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4447 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4448
4449 # allow user to override the -g -O2 flags.
4450 default_cflags=no
4451 if test "x$CFLAGS" = "x" ; then
4452
4453
4454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4455 $as_echo_n "checking whether $CC supports -g... " >&6; }
4456 cache=`echo g | sed 'y%.=/+-%___p_%'`
4457 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4458 $as_echo_n "(cached) " >&6
4459 else
4460
4461 echo 'void f(void){}' >conftest.c
4462 if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4463 eval "cv_prog_cc_flag_$cache=yes"
4464 else
4465 eval "cv_prog_cc_flag_$cache=no"
4466 fi
4467 rm -f conftest conftest.o conftest.c
4468
4469 fi
4470
4471 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4473 $as_echo "yes" >&6; }
4474 :
4475 CFLAGS="$CFLAGS -g"
4476 else
4477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4478 $as_echo "no" >&6; }
4479 :
4480
4481 fi
4482
4483
4484
4485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4486 $as_echo_n "checking whether $CC supports -O2... " >&6; }
4487 cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4488 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4489 $as_echo_n "(cached) " >&6
4490 else
4491
4492 echo 'void f(void){}' >conftest.c
4493 if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4494 eval "cv_prog_cc_flag_$cache=yes"
4495 else
4496 eval "cv_prog_cc_flag_$cache=no"
4497 fi
4498 rm -f conftest conftest.o conftest.c
4499
4500 fi
4501
4502 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4504 $as_echo "yes" >&6; }
4505 :
4506 CFLAGS="$CFLAGS -O2"
4507 else
4508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4509 $as_echo "no" >&6; }
4510 :
4511
4512 fi
4513
4514 default_cflags=yes
4515 fi
4516 ac_ext=c
4517 ac_cpp='$CPP $CPPFLAGS'
4518 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4519 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4520 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4521 if test -n "$ac_tool_prefix"; then
4522 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4523 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4525 $as_echo_n "checking for $ac_word... " >&6; }
4526 if ${ac_cv_prog_CC+:} false; then :
4527 $as_echo_n "(cached) " >&6
4528 else
4529 if test -n "$CC"; then
4530 ac_cv_prog_CC="$CC" # Let the user override the test.
4531 else
4532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4533 for as_dir in $PATH
4534 do
4535 IFS=$as_save_IFS
4536 test -z "$as_dir" && as_dir=.
4537 for ac_exec_ext in '' $ac_executable_extensions; do
4538 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4539 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4540 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4541 break 2
4542 fi
4543 done
4544 done
4545 IFS=$as_save_IFS
4546
4547 fi
4548 fi
4549 CC=$ac_cv_prog_CC
4550 if test -n "$CC"; then
4551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4552 $as_echo "$CC" >&6; }
4553 else
4554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4555 $as_echo "no" >&6; }
4556 fi
4557
4558
4559 fi
4560 if test -z "$ac_cv_prog_CC"; then
4561 ac_ct_CC=$CC
4562 # Extract the first word of "gcc", so it can be a program name with args.
4563 set dummy gcc; ac_word=$2
4564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4565 $as_echo_n "checking for $ac_word... " >&6; }
4566 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4567 $as_echo_n "(cached) " >&6
4568 else
4569 if test -n "$ac_ct_CC"; then
4570 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4571 else
4572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4573 for as_dir in $PATH
4574 do
4575 IFS=$as_save_IFS
4576 test -z "$as_dir" && as_dir=.
4577 for ac_exec_ext in '' $ac_executable_extensions; do
4578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4579 ac_cv_prog_ac_ct_CC="gcc"
4580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4581 break 2
4582 fi
4583 done
4584 done
4585 IFS=$as_save_IFS
4586
4587 fi
4588 fi
4589 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4590 if test -n "$ac_ct_CC"; then
4591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4592 $as_echo "$ac_ct_CC" >&6; }
4593 else
4594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4595 $as_echo "no" >&6; }
4596 fi
4597
4598 if test "x$ac_ct_CC" = x; then
4599 CC=""
4600 else
4601 case $cross_compiling:$ac_tool_warned in
4602 yes:)
4603 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4604 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4605 ac_tool_warned=yes ;;
4606 esac
4607 CC=$ac_ct_CC
4608 fi
4609 else
4610 CC="$ac_cv_prog_CC"
4611 fi
4612
4613 if test -z "$CC"; then
4614 if test -n "$ac_tool_prefix"; then
4615 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4616 set dummy ${ac_tool_prefix}cc; ac_word=$2
4617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4618 $as_echo_n "checking for $ac_word... " >&6; }
4619 if ${ac_cv_prog_CC+:} false; then :
4620 $as_echo_n "(cached) " >&6
4621 else
4622 if test -n "$CC"; then
4623 ac_cv_prog_CC="$CC" # Let the user override the test.
4624 else
4625 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4626 for as_dir in $PATH
4627 do
4628 IFS=$as_save_IFS
4629 test -z "$as_dir" && as_dir=.
4630 for ac_exec_ext in '' $ac_executable_extensions; do
4631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4632 ac_cv_prog_CC="${ac_tool_prefix}cc"
4633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4634 break 2
4635 fi
4636 done
4637 done
4638 IFS=$as_save_IFS
4639
4640 fi
4641 fi
4642 CC=$ac_cv_prog_CC
4643 if test -n "$CC"; then
4644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4645 $as_echo "$CC" >&6; }
4646 else
4647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4648 $as_echo "no" >&6; }
4649 fi
4650
4651
4652 fi
4653 fi
4654 if test -z "$CC"; then
4655 # Extract the first word of "cc", so it can be a program name with args.
4656 set dummy cc; ac_word=$2
4657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4658 $as_echo_n "checking for $ac_word... " >&6; }
4659 if ${ac_cv_prog_CC+:} false; then :
4660 $as_echo_n "(cached) " >&6
4661 else
4662 if test -n "$CC"; then
4663 ac_cv_prog_CC="$CC" # Let the user override the test.
4664 else
4665 ac_prog_rejected=no
4666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4667 for as_dir in $PATH
4668 do
4669 IFS=$as_save_IFS
4670 test -z "$as_dir" && as_dir=.
4671 for ac_exec_ext in '' $ac_executable_extensions; do
4672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4673 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4674 ac_prog_rejected=yes
4675 continue
4676 fi
4677 ac_cv_prog_CC="cc"
4678 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4679 break 2
4680 fi
4681 done
4682 done
4683 IFS=$as_save_IFS
4684
4685 if test $ac_prog_rejected = yes; then
4686 # We found a bogon in the path, so make sure we never use it.
4687 set dummy $ac_cv_prog_CC
4688 shift
4689 if test $# != 0; then
4690 # We chose a different compiler from the bogus one.
4691 # However, it has the same basename, so the bogon will be chosen
4692 # first if we set CC to just the basename; use the full file name.
4693 shift
4694 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4695 fi
4696 fi
4697 fi
4698 fi
4699 CC=$ac_cv_prog_CC
4700 if test -n "$CC"; then
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4702 $as_echo "$CC" >&6; }
4703 else
4704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4705 $as_echo "no" >&6; }
4706 fi
4707
4708
4709 fi
4710 if test -z "$CC"; then
4711 if test -n "$ac_tool_prefix"; then
4712 for ac_prog in cl.exe
4713 do
4714 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4715 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4717 $as_echo_n "checking for $ac_word... " >&6; }
4718 if ${ac_cv_prog_CC+:} false; then :
4719 $as_echo_n "(cached) " >&6
4720 else
4721 if test -n "$CC"; then
4722 ac_cv_prog_CC="$CC" # Let the user override the test.
4723 else
4724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4725 for as_dir in $PATH
4726 do
4727 IFS=$as_save_IFS
4728 test -z "$as_dir" && as_dir=.
4729 for ac_exec_ext in '' $ac_executable_extensions; do
4730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4731 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4733 break 2
4734 fi
4735 done
4736 done
4737 IFS=$as_save_IFS
4738
4739 fi
4740 fi
4741 CC=$ac_cv_prog_CC
4742 if test -n "$CC"; then
4743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4744 $as_echo "$CC" >&6; }
4745 else
4746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4747 $as_echo "no" >&6; }
4748 fi
4749
4750
4751 test -n "$CC" && break
4752 done
4753 fi
4754 if test -z "$CC"; then
4755 ac_ct_CC=$CC
4756 for ac_prog in cl.exe
4757 do
4758 # Extract the first word of "$ac_prog", so it can be a program name with args.
4759 set dummy $ac_prog; ac_word=$2
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4761 $as_echo_n "checking for $ac_word... " >&6; }
4762 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4763 $as_echo_n "(cached) " >&6
4764 else
4765 if test -n "$ac_ct_CC"; then
4766 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4767 else
4768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4769 for as_dir in $PATH
4770 do
4771 IFS=$as_save_IFS
4772 test -z "$as_dir" && as_dir=.
4773 for ac_exec_ext in '' $ac_executable_extensions; do
4774 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4775 ac_cv_prog_ac_ct_CC="$ac_prog"
4776 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4777 break 2
4778 fi
4779 done
4780 done
4781 IFS=$as_save_IFS
4782
4783 fi
4784 fi
4785 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4786 if test -n "$ac_ct_CC"; then
4787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4788 $as_echo "$ac_ct_CC" >&6; }
4789 else
4790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4791 $as_echo "no" >&6; }
4792 fi
4793
4794
4795 test -n "$ac_ct_CC" && break
4796 done
4797
4798 if test "x$ac_ct_CC" = x; then
4799 CC=""
4800 else
4801 case $cross_compiling:$ac_tool_warned in
4802 yes:)
4803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4804 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4805 ac_tool_warned=yes ;;
4806 esac
4807 CC=$ac_ct_CC
4808 fi
4809 fi
4810
4811 fi
4812
4813
4814 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4815 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4816 as_fn_error $? "no acceptable C compiler found in \$PATH
4817 See \`config.log' for more details" "$LINENO" 5; }
4818
4819 # Provide some information about the compiler.
4820 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4821 set X $ac_compile
4822 ac_compiler=$2
4823 for ac_option in --version -v -V -qversion; do
4824 { { ac_try="$ac_compiler $ac_option >&5"
4825 case "(($ac_try" in
4826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4827 *) ac_try_echo=$ac_try;;
4828 esac
4829 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4830 $as_echo "$ac_try_echo"; } >&5
4831 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4832 ac_status=$?
4833 if test -s conftest.err; then
4834 sed '10a\
4835 ... rest of stderr output deleted ...
4836 10q' conftest.err >conftest.er1
4837 cat conftest.er1 >&5
4838 fi
4839 rm -f conftest.er1 conftest.err
4840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4841 test $ac_status = 0; }
4842 done
4843
4844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4845 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4846 if ${ac_cv_c_compiler_gnu+:} false; then :
4847 $as_echo_n "(cached) " >&6
4848 else
4849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4850 /* end confdefs.h. */
4851
4852 int
4853 main ()
4854 {
4855 #ifndef __GNUC__
4856 choke me
4857 #endif
4858
4859 ;
4860 return 0;
4861 }
4862 _ACEOF
4863 if ac_fn_c_try_compile "$LINENO"; then :
4864 ac_compiler_gnu=yes
4865 else
4866 ac_compiler_gnu=no
4867 fi
4868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4869 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4870
4871 fi
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4873 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4874 if test $ac_compiler_gnu = yes; then
4875 GCC=yes
4876 else
4877 GCC=
4878 fi
4879 ac_test_CFLAGS=${CFLAGS+set}
4880 ac_save_CFLAGS=$CFLAGS
4881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4882 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4883 if ${ac_cv_prog_cc_g+:} false; then :
4884 $as_echo_n "(cached) " >&6
4885 else
4886 ac_save_c_werror_flag=$ac_c_werror_flag
4887 ac_c_werror_flag=yes
4888 ac_cv_prog_cc_g=no
4889 CFLAGS="-g"
4890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4891 /* end confdefs.h. */
4892
4893 int
4894 main ()
4895 {
4896
4897 ;
4898 return 0;
4899 }
4900 _ACEOF
4901 if ac_fn_c_try_compile "$LINENO"; then :
4902 ac_cv_prog_cc_g=yes
4903 else
4904 CFLAGS=""
4905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4906 /* end confdefs.h. */
4907
4908 int
4909 main ()
4910 {
4911
4912 ;
4913 return 0;
4914 }
4915 _ACEOF
4916 if ac_fn_c_try_compile "$LINENO"; then :
4917
4918 else
4919 ac_c_werror_flag=$ac_save_c_werror_flag
4920 CFLAGS="-g"
4921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4922 /* end confdefs.h. */
4923
4924 int
4925 main ()
4926 {
4927
4928 ;
4929 return 0;
4930 }
4931 _ACEOF
4932 if ac_fn_c_try_compile "$LINENO"; then :
4933 ac_cv_prog_cc_g=yes
4934 fi
4935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4936 fi
4937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4938 fi
4939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4940 ac_c_werror_flag=$ac_save_c_werror_flag
4941 fi
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4943 $as_echo "$ac_cv_prog_cc_g" >&6; }
4944 if test "$ac_test_CFLAGS" = set; then
4945 CFLAGS=$ac_save_CFLAGS
4946 elif test $ac_cv_prog_cc_g = yes; then
4947 if test "$GCC" = yes; then
4948 CFLAGS="-g -O2"
4949 else
4950 CFLAGS="-g"
4951 fi
4952 else
4953 if test "$GCC" = yes; then
4954 CFLAGS="-O2"
4955 else
4956 CFLAGS=
4957 fi
4958 fi
4959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4960 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4961 if ${ac_cv_prog_cc_c89+:} false; then :
4962 $as_echo_n "(cached) " >&6
4963 else
4964 ac_cv_prog_cc_c89=no
4965 ac_save_CC=$CC
4966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4967 /* end confdefs.h. */
4968 #include <stdarg.h>
4969 #include <stdio.h>
4970 struct stat;
4971 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4972 struct buf { int x; };
4973 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4974 static char *e (p, i)
4975 char **p;
4976 int i;
4977 {
4978 return p[i];
4979 }
4980 static char *f (char * (*g) (char **, int), char **p, ...)
4981 {
4982 char *s;
4983 va_list v;
4984 va_start (v,p);
4985 s = g (p, va_arg (v,int));
4986 va_end (v);
4987 return s;
4988 }
4989
4990 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4991 function prototypes and stuff, but not '\xHH' hex character constants.
4992 These don't provoke an error unfortunately, instead are silently treated
4993 as 'x'. The following induces an error, until -std is added to get
4994 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4995 array size at least. It's necessary to write '\x00'==0 to get something
4996 that's true only with -std. */
4997 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4998
4999 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5000 inside strings and character constants. */
5001 #define FOO(x) 'x'
5002 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5003
5004 int test (int i, double x);
5005 struct s1 {int (*f) (int a);};
5006 struct s2 {int (*f) (double a);};
5007 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5008 int argc;
5009 char **argv;
5010 int
5011 main ()
5012 {
5013 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5014 ;
5015 return 0;
5016 }
5017 _ACEOF
5018 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5019 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5020 do
5021 CC="$ac_save_CC $ac_arg"
5022 if ac_fn_c_try_compile "$LINENO"; then :
5023 ac_cv_prog_cc_c89=$ac_arg
5024 fi
5025 rm -f core conftest.err conftest.$ac_objext
5026 test "x$ac_cv_prog_cc_c89" != "xno" && break
5027 done
5028 rm -f conftest.$ac_ext
5029 CC=$ac_save_CC
5030
5031 fi
5032 # AC_CACHE_VAL
5033 case "x$ac_cv_prog_cc_c89" in
5034 x)
5035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5036 $as_echo "none needed" >&6; } ;;
5037 xno)
5038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5039 $as_echo "unsupported" >&6; } ;;
5040 *)
5041 CC="$CC $ac_cv_prog_cc_c89"
5042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5043 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5044 esac
5045 if test "x$ac_cv_prog_cc_c89" != xno; then :
5046
5047 fi
5048
5049 ac_ext=c
5050 ac_cpp='$CPP $CPPFLAGS'
5051 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5052 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5053 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5054
5055
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5057 $as_echo_n "checking $CC dependency flag... " >&6; }
5058 echo 'void f(){}' >conftest.c
5059 if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5060 DEPFLAG="-MM"
5061 else
5062 if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5063 DEPFLAG="-xM1"
5064 else
5065 DEPFLAG="-MM" # dunno do something
5066 fi
5067 fi
5068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5069 $as_echo "$DEPFLAG" >&6; }
5070 rm -f conftest.c
5071
5072
5073
5074
5075
5076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5077 $as_echo_n "checking whether $CC supports -Werror... " >&6; }
5078 cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5079 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5080 $as_echo_n "(cached) " >&6
5081 else
5082
5083 echo 'void f(void){}' >conftest.c
5084 if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5085 eval "cv_prog_cc_flag_$cache=yes"
5086 else
5087 eval "cv_prog_cc_flag_$cache=no"
5088 fi
5089 rm -f conftest conftest.o conftest.c
5090
5091 fi
5092
5093 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5095 $as_echo "yes" >&6; }
5096 :
5097 ERRFLAG="-Werror"
5098 else
5099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100 $as_echo "no" >&6; }
5101 :
5102 ERRFLAG="-errwarn"
5103 fi
5104
5105
5106
5107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5108 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5109 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5110 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5111 $as_echo_n "(cached) " >&6
5112 else
5113
5114 echo 'void f(void){}' >conftest.c
5115 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5116 eval "cv_prog_cc_flag_$cache=yes"
5117 else
5118 eval "cv_prog_cc_flag_$cache=no"
5119 fi
5120 rm -f conftest conftest.o conftest.c
5121
5122 fi
5123
5124 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5126 $as_echo "yes" >&6; }
5127 :
5128 ERRFLAG="$ERRFLAG -Wall"
5129 else
5130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5131 $as_echo "no" >&6; }
5132 :
5133 ERRFLAG="$ERRFLAG -errfmt"
5134 fi
5135
5136
5137
5138
5139
5140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5141 $as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5142 cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5143 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5144 $as_echo_n "(cached) " >&6
5145 else
5146
5147 echo 'void f(void){}' >conftest.c
5148 if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5149 eval "cv_prog_cc_flag_$cache=yes"
5150 else
5151 eval "cv_prog_cc_flag_$cache=no"
5152 fi
5153 rm -f conftest conftest.o conftest.c
5154
5155 fi
5156
5157 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5159 $as_echo "yes" >&6; }
5160 :
5161 C99FLAG="-std=c99"
5162 else
5163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5164 $as_echo "no" >&6; }
5165 :
5166
5167 fi
5168
5169
5170
5171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5172 $as_echo_n "checking whether $CC supports -xc99... " >&6; }
5173 cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5174 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5175 $as_echo_n "(cached) " >&6
5176 else
5177
5178 echo 'void f(void){}' >conftest.c
5179 if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5180 eval "cv_prog_cc_flag_$cache=yes"
5181 else
5182 eval "cv_prog_cc_flag_$cache=no"
5183 fi
5184 rm -f conftest conftest.o conftest.c
5185
5186 fi
5187
5188 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5190 $as_echo "yes" >&6; }
5191 :
5192 C99FLAG="-xc99"
5193 else
5194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5195 $as_echo "no" >&6; }
5196 :
5197
5198 fi
5199
5200
5201 for ac_header in getopt.h time.h
5202 do :
5203 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5204 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5205 "
5206 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5207 cat >>confdefs.h <<_ACEOF
5208 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5209 _ACEOF
5210
5211 fi
5212
5213 done
5214
5215
5216
5217
5218
5219 { $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
5220 $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; }
5221 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`
5222 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5223 $as_echo_n "(cached) " >&6
5224 else
5225
5226 echo '
5227 #include "confdefs.h"
5228 #include <stdlib.h>
5229 #include <ctype.h>
5230 #include <sys/time.h>
5231 #ifdef HAVE_TIME_H
5232 #include <time.h>
5233 #endif
5234 #include <unistd.h>
5235 #include <netdb.h>
5236 #ifdef HAVE_GETOPT_H
5237 #include <getopt.h>
5238 #endif
5239
5240 int test() {
5241 int a;
5242 char **opts = NULL;
5243 struct timeval tv;
5244 char *t;
5245 time_t time = 0;
5246 char *buf = NULL;
5247 const char* str = NULL;
5248 struct msghdr msg;
5249 msg.msg_control = 0;
5250 t = ctime_r(&time, buf);
5251 tv.tv_usec = 10;
5252 srandom(32);
5253 a = getopt(2, opts, "a");
5254 a = isascii(32);
5255 str = gai_strerror(0);
5256 if(str && t && tv.tv_usec && msg.msg_control)
5257 a = 0;
5258 return a;
5259 }
5260 ' > conftest.c
5261 echo 'void f(){}' >>conftest.c
5262 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5263 eval "cv_prog_cc_flag_needed_$cache=no"
5264 else
5265
5266 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
5267 eval "cv_prog_cc_flag_needed_$cache=yes"
5268 else
5269 eval "cv_prog_cc_flag_needed_$cache=fail"
5270 #echo 'Test with flag fails too!'
5271 #cat conftest.c
5272 #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"
5273 #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`
5274 #exit 1
5275 fi
5276
5277 fi
5278 rm -f conftest conftest.c conftest.o
5279
5280 fi
5281
5282 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5284 $as_echo "yes" >&6; }
5285 :
5286 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"
5287 else
5288 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5290 $as_echo "no" >&6; }
5291 #echo 'Test with flag is no!'
5292 #cat conftest.c
5293 #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"
5294 #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`
5295 #exit 1
5296 :
5297
5298 else
5299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5300 $as_echo "failed" >&6; }
5301 :
5302
5303 fi
5304 fi
5305
5306
5307
5308
5309
5310 { $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
5311 $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; }
5312 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`
5313 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5314 $as_echo_n "(cached) " >&6
5315 else
5316
5317 echo '
5318 #include "confdefs.h"
5319 #include <stdlib.h>
5320 #include <ctype.h>
5321 #include <sys/time.h>
5322 #ifdef HAVE_TIME_H
5323 #include <time.h>
5324 #endif
5325 #include <unistd.h>
5326 #include <netdb.h>
5327 #ifdef HAVE_GETOPT_H
5328 #include <getopt.h>
5329 #endif
5330
5331 int test() {
5332 int a;
5333 char **opts = NULL;
5334 struct timeval tv;
5335 char *t;
5336 time_t time = 0;
5337 char *buf = NULL;
5338 const char* str = NULL;
5339 struct msghdr msg;
5340 msg.msg_control = 0;
5341 t = ctime_r(&time, buf);
5342 tv.tv_usec = 10;
5343 srandom(32);
5344 a = getopt(2, opts, "a");
5345 a = isascii(32);
5346 str = gai_strerror(0);
5347 if(str && t && tv.tv_usec && msg.msg_control)
5348 a = 0;
5349 return a;
5350 }
5351 ' > conftest.c
5352 echo 'void f(){}' >>conftest.c
5353 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5354 eval "cv_prog_cc_flag_needed_$cache=no"
5355 else
5356
5357 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
5358 eval "cv_prog_cc_flag_needed_$cache=yes"
5359 else
5360 eval "cv_prog_cc_flag_needed_$cache=fail"
5361 #echo 'Test with flag fails too!'
5362 #cat conftest.c
5363 #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"
5364 #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`
5365 #exit 1
5366 fi
5367
5368 fi
5369 rm -f conftest conftest.c conftest.o
5370
5371 fi
5372
5373 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5375 $as_echo "yes" >&6; }
5376 :
5377 CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5378 else
5379 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5381 $as_echo "no" >&6; }
5382 #echo 'Test with flag is no!'
5383 #cat conftest.c
5384 #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"
5385 #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`
5386 #exit 1
5387 :
5388
5389 else
5390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5391 $as_echo "failed" >&6; }
5392 :
5393
5394 fi
5395 fi
5396
5397
5398
5399
5400
5401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5402 $as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5403 cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5404 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5405 $as_echo_n "(cached) " >&6
5406 else
5407
5408 echo '
5409 #include <stdbool.h>
5410 #include <ctype.h>
5411 int test() {
5412 int a = 0;
5413 return a;
5414 }
5415 ' > conftest.c
5416 echo 'void f(){}' >>conftest.c
5417 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5418 eval "cv_prog_cc_flag_needed_$cache=no"
5419 else
5420
5421 if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5422 eval "cv_prog_cc_flag_needed_$cache=yes"
5423 else
5424 eval "cv_prog_cc_flag_needed_$cache=fail"
5425 #echo 'Test with flag fails too!'
5426 #cat conftest.c
5427 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5428 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5429 #exit 1
5430 fi
5431
5432 fi
5433 rm -f conftest conftest.c conftest.o
5434
5435 fi
5436
5437 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5439 $as_echo "yes" >&6; }
5440 :
5441 CFLAGS="$CFLAGS $C99FLAG"
5442 else
5443 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5445 $as_echo "no" >&6; }
5446 #echo 'Test with flag is no!'
5447 #cat conftest.c
5448 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5449 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5450 #exit 1
5451 :
5452
5453 else
5454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5455 $as_echo "failed" >&6; }
5456 :
5457
5458 fi
5459 fi
5460
5461
5462
5463
5464
5465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
5466 $as_echo_n "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
5467 cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
5468 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5469 $as_echo_n "(cached) " >&6
5470 else
5471
5472 echo '
5473 #include <ctype.h>
5474
5475 int test() {
5476 int a;
5477 a = isascii(32);
5478 return a;
5479 }
5480 ' > conftest.c
5481 echo 'void f(){}' >>conftest.c
5482 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5483 eval "cv_prog_cc_flag_needed_$cache=no"
5484 else
5485
5486 if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5487 eval "cv_prog_cc_flag_needed_$cache=yes"
5488 else
5489 eval "cv_prog_cc_flag_needed_$cache=fail"
5490 #echo 'Test with flag fails too!'
5491 #cat conftest.c
5492 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5493 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5494 #exit 1
5495 fi
5496
5497 fi
5498 rm -f conftest conftest.c conftest.o
5499
5500 fi
5501
5502 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5504 $as_echo "yes" >&6; }
5505 :
5506 CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
5507 else
5508 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5510 $as_echo "no" >&6; }
5511 #echo 'Test with flag is no!'
5512 #cat conftest.c
5513 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5514 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5515 #exit 1
5516 :
5517
5518 else
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5520 $as_echo "failed" >&6; }
5521 :
5522
5523 fi
5524 fi
5525
5526
5527
5528
5529
5530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5531 $as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5532 cache=_D_GNU_SOURCE
5533 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5534 $as_echo_n "(cached) " >&6
5535 else
5536
5537 echo '
5538 #include <netinet/in.h>
5539
5540 int test() {
5541 struct in6_pktinfo inf;
5542 int a = (int)sizeof(inf);
5543 return a;
5544 }
5545 ' > conftest.c
5546 echo 'void f(){}' >>conftest.c
5547 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5548 eval "cv_prog_cc_flag_needed_$cache=no"
5549 else
5550
5551 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5552 eval "cv_prog_cc_flag_needed_$cache=yes"
5553 else
5554 eval "cv_prog_cc_flag_needed_$cache=fail"
5555 #echo 'Test with flag fails too!'
5556 #cat conftest.c
5557 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5558 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5559 #exit 1
5560 fi
5561
5562 fi
5563 rm -f conftest conftest.c conftest.o
5564
5565 fi
5566
5567 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5569 $as_echo "yes" >&6; }
5570 :
5571 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5572 else
5573 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5575 $as_echo "no" >&6; }
5576 #echo 'Test with flag is no!'
5577 #cat conftest.c
5578 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5579 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5580 #exit 1
5581 :
5582
5583 else
5584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5585 $as_echo "failed" >&6; }
5586 :
5587
5588 fi
5589 fi
5590
5591
5592 # check again for GNU_SOURCE for setresgid. May fail if setresgid
5593 # is not available at all. -D_FRSRESGID is to make this check unique.
5594 # otherwise we would get the previous cached result.
5595
5596
5597
5598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5599 $as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5600 cache=_D_GNU_SOURCE__D_FRSRESGID
5601 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5602 $as_echo_n "(cached) " >&6
5603 else
5604
5605 echo '
5606 #include <unistd.h>
5607
5608 int test() {
5609 int a = setresgid(0,0,0);
5610 a = setresuid(0,0,0);
5611 return a;
5612 }
5613 ' > conftest.c
5614 echo 'void f(){}' >>conftest.c
5615 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5616 eval "cv_prog_cc_flag_needed_$cache=no"
5617 else
5618
5619 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5620 eval "cv_prog_cc_flag_needed_$cache=yes"
5621 else
5622 eval "cv_prog_cc_flag_needed_$cache=fail"
5623 #echo 'Test with flag fails too!'
5624 #cat conftest.c
5625 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5626 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5627 #exit 1
5628 fi
5629
5630 fi
5631 rm -f conftest conftest.c conftest.o
5632
5633 fi
5634
5635 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5637 $as_echo "yes" >&6; }
5638 :
5639 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5640 else
5641 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5643 $as_echo "no" >&6; }
5644 #echo 'Test with flag is no!'
5645 #cat conftest.c
5646 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5647 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5648 #exit 1
5649 :
5650
5651 else
5652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5653 $as_echo "failed" >&6; }
5654 :
5655
5656 fi
5657 fi
5658
5659
5660
5661
5662
5663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5664 $as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5665 cache=_D_POSIX_C_SOURCE_200112
5666 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5667 $as_echo_n "(cached) " >&6
5668 else
5669
5670 echo '
5671 #include "confdefs.h"
5672 #ifdef HAVE_TIME_H
5673 #include <time.h>
5674 #endif
5675 #include <netdb.h>
5676
5677 int test() {
5678 int a = 0;
5679 char *t;
5680 time_t time = 0;
5681 char *buf = NULL;
5682 const char* str = NULL;
5683 t = ctime_r(&time, buf);
5684 str = gai_strerror(0);
5685 if(t && str)
5686 a = 0;
5687 return a;
5688 }
5689 ' > conftest.c
5690 echo 'void f(){}' >>conftest.c
5691 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5692 eval "cv_prog_cc_flag_needed_$cache=no"
5693 else
5694
5695 if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5696 eval "cv_prog_cc_flag_needed_$cache=yes"
5697 else
5698 eval "cv_prog_cc_flag_needed_$cache=fail"
5699 #echo 'Test with flag fails too!'
5700 #cat conftest.c
5701 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5702 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5703 #exit 1
5704 fi
5705
5706 fi
5707 rm -f conftest conftest.c conftest.o
5708
5709 fi
5710
5711 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5713 $as_echo "yes" >&6; }
5714 :
5715 CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5716 else
5717 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5719 $as_echo "no" >&6; }
5720 #echo 'Test with flag is no!'
5721 #cat conftest.c
5722 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5723 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5724 #exit 1
5725 :
5726
5727 else
5728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5729 $as_echo "failed" >&6; }
5730 :
5731
5732 fi
5733 fi
5734
5735
5736
5737
5738
5739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5740 $as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5741 cache=_D__EXTENSIONS__
5742 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5743 $as_echo_n "(cached) " >&6
5744 else
5745
5746 echo '
5747 #include "confdefs.h"
5748 #include <stdlib.h>
5749 #include <ctype.h>
5750 #include <sys/time.h>
5751 #ifdef HAVE_TIME_H
5752 #include <time.h>
5753 #endif
5754 #include <unistd.h>
5755 #ifdef HAVE_GETOPT_H
5756 #include <getopt.h>
5757 #endif
5758
5759 int test() {
5760 int a;
5761 char **opts = NULL;
5762 struct timeval tv;
5763 tv.tv_usec = 10;
5764 srandom(32);
5765 a = getopt(2, opts, "a");
5766 a = isascii(32);
5767 if(tv.tv_usec)
5768 a = 0;
5769 return a;
5770 }
5771 ' > conftest.c
5772 echo 'void f(){}' >>conftest.c
5773 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5774 eval "cv_prog_cc_flag_needed_$cache=no"
5775 else
5776
5777 if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5778 eval "cv_prog_cc_flag_needed_$cache=yes"
5779 else
5780 eval "cv_prog_cc_flag_needed_$cache=fail"
5781 #echo 'Test with flag fails too!'
5782 #cat conftest.c
5783 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5784 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5785 #exit 1
5786 fi
5787
5788 fi
5789 rm -f conftest conftest.c conftest.o
5790
5791 fi
5792
5793 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5795 $as_echo "yes" >&6; }
5796 :
5797 CFLAGS="$CFLAGS -D__EXTENSIONS__"
5798 else
5799 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5801 $as_echo "no" >&6; }
5802 #echo 'Test with flag is no!'
5803 #cat conftest.c
5804 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5805 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5806 #exit 1
5807 :
5808
5809 else
5810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5811 $as_echo "failed" >&6; }
5812 :
5813
5814 fi
5815 fi
5816
5817
5818
5819
5820 # debug mode flags warnings
5821 # Check whether --enable-checking was given.
5822 if test "${enable_checking+set}" = set; then :
5823 enableval=$enable_checking;
5824 fi
5825
5826 # Check whether --enable-debug was given.
5827 if test "${enable_debug+set}" = set; then :
5828 enableval=$enable_debug;
5829 fi
5830
5831 if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5832 else debug_enabled="$enable_checking"; fi
5833
5834 case "$debug_enabled" in
5835 yes)
5836
5837
5838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5839 $as_echo_n "checking whether $CC supports -W... " >&6; }
5840 cache=`echo W | sed 'y%.=/+-%___p_%'`
5841 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5842 $as_echo_n "(cached) " >&6
5843 else
5844
5845 echo 'void f(void){}' >conftest.c
5846 if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5847 eval "cv_prog_cc_flag_$cache=yes"
5848 else
5849 eval "cv_prog_cc_flag_$cache=no"
5850 fi
5851 rm -f conftest conftest.o conftest.c
5852
5853 fi
5854
5855 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5857 $as_echo "yes" >&6; }
5858 :
5859 CFLAGS="$CFLAGS -W"
5860 else
5861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5862 $as_echo "no" >&6; }
5863 :
5864
5865 fi
5866
5867
5868
5869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5870 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5871 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5872 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5873 $as_echo_n "(cached) " >&6
5874 else
5875
5876 echo 'void f(void){}' >conftest.c
5877 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5878 eval "cv_prog_cc_flag_$cache=yes"
5879 else
5880 eval "cv_prog_cc_flag_$cache=no"
5881 fi
5882 rm -f conftest conftest.o conftest.c
5883
5884 fi
5885
5886 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5888 $as_echo "yes" >&6; }
5889 :
5890 CFLAGS="$CFLAGS -Wall"
5891 else
5892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5893 $as_echo "no" >&6; }
5894 :
5895
5896 fi
5897
5898
5899
5900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5901 $as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5902 cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5903 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5904 $as_echo_n "(cached) " >&6
5905 else
5906
5907 echo 'void f(void){}' >conftest.c
5908 if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5909 eval "cv_prog_cc_flag_$cache=yes"
5910 else
5911 eval "cv_prog_cc_flag_$cache=no"
5912 fi
5913 rm -f conftest conftest.o conftest.c
5914
5915 fi
5916
5917 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5919 $as_echo "yes" >&6; }
5920 :
5921 CFLAGS="$CFLAGS -Wextra"
5922 else
5923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5924 $as_echo "no" >&6; }
5925 :
5926
5927 fi
5928
5929
5930
5931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
5932 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
5933 cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
5934 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5935 $as_echo_n "(cached) " >&6
5936 else
5937
5938 echo 'void f(void){}' >conftest.c
5939 if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
5940 eval "cv_prog_cc_flag_$cache=yes"
5941 else
5942 eval "cv_prog_cc_flag_$cache=no"
5943 fi
5944 rm -f conftest conftest.o conftest.c
5945
5946 fi
5947
5948 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5950 $as_echo "yes" >&6; }
5951 :
5952 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
5953 else
5954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5955 $as_echo "no" >&6; }
5956 :
5957
5958 fi
5959
5960
5961 $as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
5962
5963 ;;
5964 no|*)
5965 # nothing to do.
5966 ;;
5967 esac
5968 if test "$default_cflags" = "yes"; then
5969 # only when CFLAGS was "" at the start, if the users wants to
5970 # override we shouldn't add default cflags, because they wouldn't
5971 # be able to turn off these options and set the CFLAGS wanted.
5972
5973 # Check whether --enable-flto was given.
5974 if test "${enable_flto+set}" = set; then :
5975 enableval=$enable_flto;
5976 fi
5977
5978 if test "x$enable_flto" != "xno"; then :
5979
5980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
5981 $as_echo_n "checking if $CC supports -flto... " >&6; }
5982 BAKCFLAGS="$CFLAGS"
5983 CFLAGS="$CFLAGS -flto"
5984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5985 /* end confdefs.h. */
5986
5987 int
5988 main ()
5989 {
5990
5991 ;
5992 return 0;
5993 }
5994 _ACEOF
5995 if ac_fn_c_try_link "$LINENO"; then :
5996
5997 if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
5998 CFLAGS="$BAKCFLAGS"
5999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6000 $as_echo "no" >&6; }
6001 else
6002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6003 $as_echo "yes" >&6; }
6004 fi
6005 rm -f conftest conftest.c conftest.o
6006
6007 else
6008 CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6009 $as_echo "no" >&6; }
6010 fi
6011 rm -f core conftest.err conftest.$ac_objext \
6012 conftest$ac_exeext conftest.$ac_ext
6013
6014 fi
6015
6016
6017 # Check whether --enable-pie was given.
6018 if test "${enable_pie+set}" = set; then :
6019 enableval=$enable_pie;
6020 fi
6021
6022 if test "x$enable_pie" = "xyes"; then :
6023
6024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6025 $as_echo_n "checking if $CC supports PIE... " >&6; }
6026 BAKLDFLAGS="$LDFLAGS"
6027 BAKCFLAGS="$CFLAGS"
6028 LDFLAGS="$LDFLAGS -pie"
6029 CFLAGS="$CFLAGS -fPIE"
6030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6031 /* end confdefs.h. */
6032
6033 int
6034 main ()
6035 {
6036
6037 ;
6038 return 0;
6039 }
6040 _ACEOF
6041 if ac_fn_c_try_link "$LINENO"; then :
6042
6043 if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6044 LDFLAGS="$BAKLDFLAGS"
6045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6046 $as_echo "no" >&6; }
6047 else
6048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6049 $as_echo "yes" >&6; }
6050 fi
6051 rm -f conftest conftest.c conftest.o
6052
6053 else
6054 LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6055 $as_echo "no" >&6; }
6056 fi
6057 rm -f core conftest.err conftest.$ac_objext \
6058 conftest$ac_exeext conftest.$ac_ext
6059
6060 fi
6061
6062
6063 # Check whether --enable-relro_now was given.
6064 if test "${enable_relro_now+set}" = set; then :
6065 enableval=$enable_relro_now;
6066 fi
6067
6068 if test "x$enable_relro_now" = "xyes"; then :
6069
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6071 $as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6072 BAKLDFLAGS="$LDFLAGS"
6073 LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6075 /* end confdefs.h. */
6076
6077 int
6078 main ()
6079 {
6080
6081 ;
6082 return 0;
6083 }
6084 _ACEOF
6085 if ac_fn_c_try_link "$LINENO"; then :
6086
6087 if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6088 LDFLAGS="$BAKLDFLAGS"
6089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090 $as_echo "no" >&6; }
6091 else
6092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6093 $as_echo "yes" >&6; }
6094 fi
6095 rm -f conftest conftest.c conftest.o
6096
6097 else
6098 LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6099 $as_echo "no" >&6; }
6100 fi
6101 rm -f core conftest.err conftest.$ac_objext \
6102 conftest$ac_exeext conftest.$ac_ext
6103
6104 fi
6105
6106 fi
6107
6108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6109 $as_echo_n "checking for inline... " >&6; }
6110 if ${ac_cv_c_inline+:} false; then :
6111 $as_echo_n "(cached) " >&6
6112 else
6113 ac_cv_c_inline=no
6114 for ac_kw in inline __inline__ __inline; do
6115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6116 /* end confdefs.h. */
6117 #ifndef __cplusplus
6118 typedef int foo_t;
6119 static $ac_kw foo_t static_foo () {return 0; }
6120 $ac_kw foo_t foo () {return 0; }
6121 #endif
6122
6123 _ACEOF
6124 if ac_fn_c_try_compile "$LINENO"; then :
6125 ac_cv_c_inline=$ac_kw
6126 fi
6127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6128 test "$ac_cv_c_inline" != no && break
6129 done
6130
6131 fi
6132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6133 $as_echo "$ac_cv_c_inline" >&6; }
6134
6135 case $ac_cv_c_inline in
6136 inline | yes) ;;
6137 *)
6138 case $ac_cv_c_inline in
6139 no) ac_val=;;
6140 *) ac_val=$ac_cv_c_inline;;
6141 esac
6142 cat >>confdefs.h <<_ACEOF
6143 #ifndef __cplusplus
6144 #define inline $ac_val
6145 #endif
6146 _ACEOF
6147 ;;
6148 esac
6149
6150
6151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6152 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6153 if ${ac_cv_c_format_attribute+:} false; then :
6154 $as_echo_n "(cached) " >&6
6155 else
6156 ac_cv_c_format_attribute=no
6157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6158 /* end confdefs.h. */
6159 #include <stdio.h>
6160 void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6161 void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6162
6163 int
6164 main ()
6165 {
6166
6167 f ("%s", "str");
6168
6169 ;
6170 return 0;
6171 }
6172 _ACEOF
6173 if ac_fn_c_try_compile "$LINENO"; then :
6174 ac_cv_c_format_attribute="yes"
6175 else
6176 ac_cv_c_format_attribute="no"
6177 fi
6178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6179
6180 fi
6181
6182
6183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6184 $as_echo "$ac_cv_c_format_attribute" >&6; }
6185 if test $ac_cv_c_format_attribute = yes; then
6186
6187 $as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6188
6189 fi
6190
6191
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6193 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6194 if ${ac_cv_c_unused_attribute+:} false; then :
6195 $as_echo_n "(cached) " >&6
6196 else
6197 ac_cv_c_unused_attribute=no
6198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6199 /* end confdefs.h. */
6200 #include <stdio.h>
6201 void f (char *u __attribute__((unused)));
6202
6203 int
6204 main ()
6205 {
6206
6207 f ("x");
6208
6209 ;
6210 return 0;
6211 }
6212 _ACEOF
6213 if ac_fn_c_try_compile "$LINENO"; then :
6214 ac_cv_c_unused_attribute="yes"
6215 else
6216 ac_cv_c_unused_attribute="no"
6217 fi
6218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6219
6220 fi
6221
6222
6223
6224
6225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6226 $as_echo "$ac_cv_c_unused_attribute" >&6; }
6227 if test $ac_cv_c_unused_attribute = yes; then
6228
6229 $as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6230
6231 fi
6232
6233
6234
6235
6236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6237 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6238 if ${ac_cv_c_weak_attribute+:} false; then :
6239 $as_echo_n "(cached) " >&6
6240 else
6241 ac_cv_c_weak_attribute=no
6242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6243 /* end confdefs.h. */
6244 #include <stdio.h>
6245 __attribute__((weak)) void f(int x) { printf("%d", x); }
6246
6247 int
6248 main ()
6249 {
6250
6251 f(1);
6252
6253 ;
6254 return 0;
6255 }
6256 _ACEOF
6257 if ac_fn_c_try_compile "$LINENO"; then :
6258 ac_cv_c_weak_attribute="yes"
6259 else
6260 ac_cv_c_weak_attribute="no"
6261 fi
6262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6263
6264 fi
6265
6266
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6268 $as_echo "$ac_cv_c_weak_attribute" >&6; }
6269 if test $ac_cv_c_weak_attribute = yes; then
6270
6271 $as_echo "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6272
6273
6274 $as_echo "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
6275
6276 fi
6277
6278
6279
6280
6281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
6282 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
6283 if ${ac_cv_c_noreturn_attribute+:} false; then :
6284 $as_echo_n "(cached) " >&6
6285 else
6286 ac_cv_c_noreturn_attribute=no
6287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6288 /* end confdefs.h. */
6289 #include <stdio.h>
6290 __attribute__((noreturn)) void f(int x) { printf("%d", x); }
6291
6292 int
6293 main ()
6294 {
6295
6296 f(1);
6297
6298 ;
6299 return 0;
6300 }
6301 _ACEOF
6302 if ac_fn_c_try_compile "$LINENO"; then :
6303 ac_cv_c_noreturn_attribute="yes"
6304 else
6305 ac_cv_c_noreturn_attribute="no"
6306 fi
6307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6308
6309 fi
6310
6311
6312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
6313 $as_echo "$ac_cv_c_noreturn_attribute" >&6; }
6314 if test $ac_cv_c_noreturn_attribute = yes; then
6315
6316 $as_echo "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
6317
6318
6319 $as_echo "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
6320
6321 fi
6322
6323
6324 if test "$srcdir" != "."; then
6325 CPPFLAGS="$CPPFLAGS -I$srcdir"
6326 fi
6327
6328
6329
6330
6331
6332 for ac_prog in flex lex
6333 do
6334 # Extract the first word of "$ac_prog", so it can be a program name with args.
6335 set dummy $ac_prog; ac_word=$2
6336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6337 $as_echo_n "checking for $ac_word... " >&6; }
6338 if ${ac_cv_prog_LEX+:} false; then :
6339 $as_echo_n "(cached) " >&6
6340 else
6341 if test -n "$LEX"; then
6342 ac_cv_prog_LEX="$LEX" # Let the user override the test.
6343 else
6344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6345 for as_dir in $PATH
6346 do
6347 IFS=$as_save_IFS
6348 test -z "$as_dir" && as_dir=.
6349 for ac_exec_ext in '' $ac_executable_extensions; do
6350 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6351 ac_cv_prog_LEX="$ac_prog"
6352 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6353 break 2
6354 fi
6355 done
6356 done
6357 IFS=$as_save_IFS
6358
6359 fi
6360 fi
6361 LEX=$ac_cv_prog_LEX
6362 if test -n "$LEX"; then
6363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6364 $as_echo "$LEX" >&6; }
6365 else
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6367 $as_echo "no" >&6; }
6368 fi
6369
6370
6371 test -n "$LEX" && break
6372 done
6373 test -n "$LEX" || LEX=":"
6374
6375 if test "x$LEX" != "x:"; then
6376 cat >conftest.l <<_ACEOF
6377 %%
6378 a { ECHO; }
6379 b { REJECT; }
6380 c { yymore (); }
6381 d { yyless (1); }
6382 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
6383 yyless ((input () != 0)); }
6384 f { unput (yytext[0]); }
6385 . { BEGIN INITIAL; }
6386 %%
6387 #ifdef YYTEXT_POINTER
6388 extern char *yytext;
6389 #endif
6390 int
6391 main (void)
6392 {
6393 return ! yylex () + ! yywrap ();
6394 }
6395 _ACEOF
6396 { { ac_try="$LEX conftest.l"
6397 case "(($ac_try" in
6398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6399 *) ac_try_echo=$ac_try;;
6400 esac
6401 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6402 $as_echo "$ac_try_echo"; } >&5
6403 (eval "$LEX conftest.l") 2>&5
6404 ac_status=$?
6405 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6406 test $ac_status = 0; }
6407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6408 $as_echo_n "checking lex output file root... " >&6; }
6409 if ${ac_cv_prog_lex_root+:} false; then :
6410 $as_echo_n "(cached) " >&6
6411 else
6412
6413 if test -f lex.yy.c; then
6414 ac_cv_prog_lex_root=lex.yy
6415 elif test -f lexyy.c; then
6416 ac_cv_prog_lex_root=lexyy
6417 else
6418 as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6419 fi
6420 fi
6421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6422 $as_echo "$ac_cv_prog_lex_root" >&6; }
6423 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6424
6425 if test -z "${LEXLIB+set}"; then
6426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6427 $as_echo_n "checking lex library... " >&6; }
6428 if ${ac_cv_lib_lex+:} false; then :
6429 $as_echo_n "(cached) " >&6
6430 else
6431
6432 ac_save_LIBS=$LIBS
6433 ac_cv_lib_lex='none needed'
6434 for ac_lib in '' -lfl -ll; do
6435 LIBS="$ac_lib $ac_save_LIBS"
6436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6437 /* end confdefs.h. */
6438 `cat $LEX_OUTPUT_ROOT.c`
6439 _ACEOF
6440 if ac_fn_c_try_link "$LINENO"; then :
6441 ac_cv_lib_lex=$ac_lib
6442 fi
6443 rm -f core conftest.err conftest.$ac_objext \
6444 conftest$ac_exeext conftest.$ac_ext
6445 test "$ac_cv_lib_lex" != 'none needed' && break
6446 done
6447 LIBS=$ac_save_LIBS
6448
6449 fi
6450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6451 $as_echo "$ac_cv_lib_lex" >&6; }
6452 test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6453 fi
6454
6455
6456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6457 $as_echo_n "checking whether yytext is a pointer... " >&6; }
6458 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6459 $as_echo_n "(cached) " >&6
6460 else
6461 # POSIX says lex can declare yytext either as a pointer or an array; the
6462 # default is implementation-dependent. Figure out which it is, since
6463 # not all implementations provide the %pointer and %array declarations.
6464 ac_cv_prog_lex_yytext_pointer=no
6465 ac_save_LIBS=$LIBS
6466 LIBS="$LEXLIB $ac_save_LIBS"
6467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6468 /* end confdefs.h. */
6469
6470 #define YYTEXT_POINTER 1
6471 `cat $LEX_OUTPUT_ROOT.c`
6472 _ACEOF
6473 if ac_fn_c_try_link "$LINENO"; then :
6474 ac_cv_prog_lex_yytext_pointer=yes
6475 fi
6476 rm -f core conftest.err conftest.$ac_objext \
6477 conftest$ac_exeext conftest.$ac_ext
6478 LIBS=$ac_save_LIBS
6479
6480 fi
6481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6482 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6483 if test $ac_cv_prog_lex_yytext_pointer = yes; then
6484
6485 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6486
6487 fi
6488 rm -f conftest.l $LEX_OUTPUT_ROOT.c
6489
6490 fi
6491 if test "$LEX" != "" -a "$LEX" != ":"; then
6492
6493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6494 $as_echo_n "checking for yylex_destroy... " >&6; }
6495 if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6496
6497 $as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6498
6499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6500 $as_echo "yes" >&6; }
6501 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6502 $as_echo "no" >&6; };
6503 LEX=":"
6504 fi
6505
6506 fi
6507 if test "$LEX" != "" -a "$LEX" != ":"; then
6508
6509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
6510 $as_echo_n "checking for lex %option... " >&6; }
6511 if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
6512 %option nounput
6513 %%
6514 EOF
6515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6516 $as_echo "yes" >&6; }
6517 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6518 $as_echo "no" >&6; };
6519 LEX=":"
6520 fi
6521
6522 fi
6523 for ac_prog in 'bison -y' byacc
6524 do
6525 # Extract the first word of "$ac_prog", so it can be a program name with args.
6526 set dummy $ac_prog; ac_word=$2
6527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6528 $as_echo_n "checking for $ac_word... " >&6; }
6529 if ${ac_cv_prog_YACC+:} false; then :
6530 $as_echo_n "(cached) " >&6
6531 else
6532 if test -n "$YACC"; then
6533 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6534 else
6535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6536 for as_dir in $PATH
6537 do
6538 IFS=$as_save_IFS
6539 test -z "$as_dir" && as_dir=.
6540 for ac_exec_ext in '' $ac_executable_extensions; do
6541 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6542 ac_cv_prog_YACC="$ac_prog"
6543 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6544 break 2
6545 fi
6546 done
6547 done
6548 IFS=$as_save_IFS
6549
6550 fi
6551 fi
6552 YACC=$ac_cv_prog_YACC
6553 if test -n "$YACC"; then
6554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6555 $as_echo "$YACC" >&6; }
6556 else
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6558 $as_echo "no" >&6; }
6559 fi
6560
6561
6562 test -n "$YACC" && break
6563 done
6564 test -n "$YACC" || YACC="yacc"
6565
6566 # Extract the first word of "doxygen", so it can be a program name with args.
6567 set dummy doxygen; ac_word=$2
6568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6569 $as_echo_n "checking for $ac_word... " >&6; }
6570 if ${ac_cv_prog_doxygen+:} false; then :
6571 $as_echo_n "(cached) " >&6
6572 else
6573 if test -n "$doxygen"; then
6574 ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6575 else
6576 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6577 for as_dir in $PATH
6578 do
6579 IFS=$as_save_IFS
6580 test -z "$as_dir" && as_dir=.
6581 for ac_exec_ext in '' $ac_executable_extensions; do
6582 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6583 ac_cv_prog_doxygen="doxygen"
6584 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6585 break 2
6586 fi
6587 done
6588 done
6589 IFS=$as_save_IFS
6590
6591 fi
6592 fi
6593 doxygen=$ac_cv_prog_doxygen
6594 if test -n "$doxygen"; then
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6596 $as_echo "$doxygen" >&6; }
6597 else
6598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6599 $as_echo "no" >&6; }
6600 fi
6601
6602
6603 if test -n "$ac_tool_prefix"; then
6604 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6605 set dummy ${ac_tool_prefix}strip; ac_word=$2
6606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6607 $as_echo_n "checking for $ac_word... " >&6; }
6608 if ${ac_cv_prog_STRIP+:} false; then :
6609 $as_echo_n "(cached) " >&6
6610 else
6611 if test -n "$STRIP"; then
6612 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6613 else
6614 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6615 for as_dir in $PATH
6616 do
6617 IFS=$as_save_IFS
6618 test -z "$as_dir" && as_dir=.
6619 for ac_exec_ext in '' $ac_executable_extensions; do
6620 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6621 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6622 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6623 break 2
6624 fi
6625 done
6626 done
6627 IFS=$as_save_IFS
6628
6629 fi
6630 fi
6631 STRIP=$ac_cv_prog_STRIP
6632 if test -n "$STRIP"; then
6633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6634 $as_echo "$STRIP" >&6; }
6635 else
6636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6637 $as_echo "no" >&6; }
6638 fi
6639
6640
6641 fi
6642 if test -z "$ac_cv_prog_STRIP"; then
6643 ac_ct_STRIP=$STRIP
6644 # Extract the first word of "strip", so it can be a program name with args.
6645 set dummy strip; ac_word=$2
6646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6647 $as_echo_n "checking for $ac_word... " >&6; }
6648 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6649 $as_echo_n "(cached) " >&6
6650 else
6651 if test -n "$ac_ct_STRIP"; then
6652 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6653 else
6654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6655 for as_dir in $PATH
6656 do
6657 IFS=$as_save_IFS
6658 test -z "$as_dir" && as_dir=.
6659 for ac_exec_ext in '' $ac_executable_extensions; do
6660 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6661 ac_cv_prog_ac_ct_STRIP="strip"
6662 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6663 break 2
6664 fi
6665 done
6666 done
6667 IFS=$as_save_IFS
6668
6669 fi
6670 fi
6671 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6672 if test -n "$ac_ct_STRIP"; then
6673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6674 $as_echo "$ac_ct_STRIP" >&6; }
6675 else
6676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6677 $as_echo "no" >&6; }
6678 fi
6679
6680 if test "x$ac_ct_STRIP" = x; then
6681 STRIP=""
6682 else
6683 case $cross_compiling:$ac_tool_warned in
6684 yes:)
6685 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6686 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6687 ac_tool_warned=yes ;;
6688 esac
6689 STRIP=$ac_ct_STRIP
6690 fi
6691 else
6692 STRIP="$ac_cv_prog_STRIP"
6693 fi
6694
6695 ac_aux_dir=
6696 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6697 if test -f "$ac_dir/install-sh"; then
6698 ac_aux_dir=$ac_dir
6699 ac_install_sh="$ac_aux_dir/install-sh -c"
6700 break
6701 elif test -f "$ac_dir/install.sh"; then
6702 ac_aux_dir=$ac_dir
6703 ac_install_sh="$ac_aux_dir/install.sh -c"
6704 break
6705 elif test -f "$ac_dir/shtool"; then
6706 ac_aux_dir=$ac_dir
6707 ac_install_sh="$ac_aux_dir/shtool install -c"
6708 break
6709 fi
6710 done
6711 if test -z "$ac_aux_dir"; then
6712 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6713 fi
6714
6715 # These three variables are undocumented and unsupported,
6716 # and are intended to be withdrawn in a future Autoconf release.
6717 # They can cause serious problems if a builder's source tree is in a directory
6718 # whose full name contains unusual characters.
6719 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6720 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6721 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6722
6723
6724 # Make sure we can run config.sub.
6725 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6726 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6727
6728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6729 $as_echo_n "checking build system type... " >&6; }
6730 if ${ac_cv_build+:} false; then :
6731 $as_echo_n "(cached) " >&6
6732 else
6733 ac_build_alias=$build_alias
6734 test "x$ac_build_alias" = x &&
6735 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6736 test "x$ac_build_alias" = x &&
6737 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6738 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6739 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6740
6741 fi
6742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6743 $as_echo "$ac_cv_build" >&6; }
6744 case $ac_cv_build in
6745 *-*-*) ;;
6746 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6747 esac
6748 build=$ac_cv_build
6749 ac_save_IFS=$IFS; IFS='-'
6750 set x $ac_cv_build
6751 shift
6752 build_cpu=$1
6753 build_vendor=$2
6754 shift; shift
6755 # Remember, the first character of IFS is used to create $*,
6756 # except with old shells:
6757 build_os=$*
6758 IFS=$ac_save_IFS
6759 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6760
6761
6762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6763 $as_echo_n "checking host system type... " >&6; }
6764 if ${ac_cv_host+:} false; then :
6765 $as_echo_n "(cached) " >&6
6766 else
6767 if test "x$host_alias" = x; then
6768 ac_cv_host=$ac_cv_build
6769 else
6770 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6771 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6772 fi
6773
6774 fi
6775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6776 $as_echo "$ac_cv_host" >&6; }
6777 case $ac_cv_host in
6778 *-*-*) ;;
6779 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6780 esac
6781 host=$ac_cv_host
6782 ac_save_IFS=$IFS; IFS='-'
6783 set x $ac_cv_host
6784 shift
6785 host_cpu=$1
6786 host_vendor=$2
6787 shift; shift
6788 # Remember, the first character of IFS is used to create $*,
6789 # except with old shells:
6790 host_os=$*
6791 IFS=$ac_save_IFS
6792 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6793
6794
6795
6796 # skip these tests, we do not need them.
6797
6798
6799
6800
6801
6802
6803
6804
6805 # always use ./libtool unless override from commandline (libtool=mylibtool)
6806 if test -z "$libtool"; then
6807 libtool="./libtool"
6808 fi
6809
6810 # avoid libtool max commandline length test on systems that fork slowly.
6811
6812 if echo "$host_os" | grep "sunos4" >/dev/null; then
6813 lt_cv_sys_max_cmd_len=32750;
6814 fi
6815 if test -n "$ac_tool_prefix"; then
6816 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6817 set dummy ${ac_tool_prefix}ar; ac_word=$2
6818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6819 $as_echo_n "checking for $ac_word... " >&6; }
6820 if ${ac_cv_path_AR+:} false; then :
6821 $as_echo_n "(cached) " >&6
6822 else
6823 case $AR in
6824 [\\/]* | ?:[\\/]*)
6825 ac_cv_path_AR="$AR" # Let the user override the test with a path.
6826 ;;
6827 *)
6828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6829 for as_dir in $PATH
6830 do
6831 IFS=$as_save_IFS
6832 test -z "$as_dir" && as_dir=.
6833 for ac_exec_ext in '' $ac_executable_extensions; do
6834 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6835 ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6837 break 2
6838 fi
6839 done
6840 done
6841 IFS=$as_save_IFS
6842
6843 ;;
6844 esac
6845 fi
6846 AR=$ac_cv_path_AR
6847 if test -n "$AR"; then
6848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6849 $as_echo "$AR" >&6; }
6850 else
6851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6852 $as_echo "no" >&6; }
6853 fi
6854
6855
6856 fi
6857 if test -z "$ac_cv_path_AR"; then
6858 ac_pt_AR=$AR
6859 # Extract the first word of "ar", so it can be a program name with args.
6860 set dummy ar; ac_word=$2
6861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6862 $as_echo_n "checking for $ac_word... " >&6; }
6863 if ${ac_cv_path_ac_pt_AR+:} false; then :
6864 $as_echo_n "(cached) " >&6
6865 else
6866 case $ac_pt_AR in
6867 [\\/]* | ?:[\\/]*)
6868 ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6869 ;;
6870 *)
6871 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6872 for as_dir in $PATH
6873 do
6874 IFS=$as_save_IFS
6875 test -z "$as_dir" && as_dir=.
6876 for ac_exec_ext in '' $ac_executable_extensions; do
6877 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6878 ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6880 break 2
6881 fi
6882 done
6883 done
6884 IFS=$as_save_IFS
6885
6886 ;;
6887 esac
6888 fi
6889 ac_pt_AR=$ac_cv_path_ac_pt_AR
6890 if test -n "$ac_pt_AR"; then
6891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6892 $as_echo "$ac_pt_AR" >&6; }
6893 else
6894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6895 $as_echo "no" >&6; }
6896 fi
6897
6898 if test "x$ac_pt_AR" = x; then
6899 AR="false"
6900 else
6901 case $cross_compiling:$ac_tool_warned in
6902 yes:)
6903 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6904 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6905 ac_tool_warned=yes ;;
6906 esac
6907 AR=$ac_pt_AR
6908 fi
6909 else
6910 AR="$ac_cv_path_AR"
6911 fi
6912
6913 if test $AR = false; then
6914 as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
6915 fi
6916
6917 case `pwd` in
6918 *\ * | *\ *)
6919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
6920 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
6921 esac
6922
6923
6924
6925 macro_version='2.4.6'
6926 macro_revision='2.4.6'
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940 ltmain=$ac_aux_dir/ltmain.sh
6941
6942 # Backslashify metacharacters that are still active within
6943 # double-quoted strings.
6944 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6945
6946 # Same as above, but do not quote variable references.
6947 double_quote_subst='s/\(["`\\]\)/\\\1/g'
6948
6949 # Sed substitution to delay expansion of an escaped shell variable in a
6950 # double_quote_subst'ed string.
6951 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6952
6953 # Sed substitution to delay expansion of an escaped single quote.
6954 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
6955
6956 # Sed substitution to avoid accidental globbing in evaled expressions
6957 no_glob_subst='s/\*/\\\*/g'
6958
6959 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6960 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
6961 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
6962
6963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
6964 $as_echo_n "checking how to print strings... " >&6; }
6965 # Test print first, because it will be a builtin if present.
6966 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6967 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6968 ECHO='print -r --'
6969 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6970 ECHO='printf %s\n'
6971 else
6972 # Use this function as a fallback that always works.
6973 func_fallback_echo ()
6974 {
6975 eval 'cat <<_LTECHO_EOF
6976 $1
6977 _LTECHO_EOF'
6978 }
6979 ECHO='func_fallback_echo'
6980 fi
6981
6982 # func_echo_all arg...
6983 # Invoke $ECHO with all args, space-separated.
6984 func_echo_all ()
6985 {
6986 $ECHO ""
6987 }
6988
6989 case $ECHO in
6990 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
6991 $as_echo "printf" >&6; } ;;
6992 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
6993 $as_echo "print -r" >&6; } ;;
6994 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
6995 $as_echo "cat" >&6; } ;;
6996 esac
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7012 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
7013 if ${ac_cv_path_SED+:} false; then :
7014 $as_echo_n "(cached) " >&6
7015 else
7016 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7017 for ac_i in 1 2 3 4 5 6 7; do
7018 ac_script="$ac_script$as_nl$ac_script"
7019 done
7020 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7021 { ac_script=; unset ac_script;}
7022 if test -z "$SED"; then
7023 ac_path_SED_found=false
7024 # Loop through the user's path and test for each of PROGNAME-LIST
7025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7026 for as_dir in $PATH
7027 do
7028 IFS=$as_save_IFS
7029 test -z "$as_dir" && as_dir=.
7030 for ac_prog in sed gsed; do
7031 for ac_exec_ext in '' $ac_executable_extensions; do
7032 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
7033 as_fn_executable_p "$ac_path_SED" || continue
7034 # Check for GNU ac_path_SED and select it if it is found.
7035 # Check for GNU $ac_path_SED
7036 case `"$ac_path_SED" --version 2>&1` in
7037 *GNU*)
7038 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7039 *)
7040 ac_count=0
7041 $as_echo_n 0123456789 >"conftest.in"
7042 while :
7043 do
7044 cat "conftest.in" "conftest.in" >"conftest.tmp"
7045 mv "conftest.tmp" "conftest.in"
7046 cp "conftest.in" "conftest.nl"
7047 $as_echo '' >> "conftest.nl"
7048 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7049 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7050 as_fn_arith $ac_count + 1 && ac_count=$as_val
7051 if test $ac_count -gt ${ac_path_SED_max-0}; then
7052 # Best one so far, save it but keep looking for a better one
7053 ac_cv_path_SED="$ac_path_SED"
7054 ac_path_SED_max=$ac_count
7055 fi
7056 # 10*(2^10) chars as input seems more than enough
7057 test $ac_count -gt 10 && break
7058 done
7059 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7060 esac
7061
7062 $ac_path_SED_found && break 3
7063 done
7064 done
7065 done
7066 IFS=$as_save_IFS
7067 if test -z "$ac_cv_path_SED"; then
7068 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7069 fi
7070 else
7071 ac_cv_path_SED=$SED
7072 fi
7073
7074 fi
7075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7076 $as_echo "$ac_cv_path_SED" >&6; }
7077 SED="$ac_cv_path_SED"
7078 rm -f conftest.sed
7079
7080 test -z "$SED" && SED=sed
7081 Xsed="$SED -e 1s/^X//"
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7094 $as_echo_n "checking for fgrep... " >&6; }
7095 if ${ac_cv_path_FGREP+:} false; then :
7096 $as_echo_n "(cached) " >&6
7097 else
7098 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7099 then ac_cv_path_FGREP="$GREP -F"
7100 else
7101 if test -z "$FGREP"; then
7102 ac_path_FGREP_found=false
7103 # Loop through the user's path and test for each of PROGNAME-LIST
7104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7105 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7106 do
7107 IFS=$as_save_IFS
7108 test -z "$as_dir" && as_dir=.
7109 for ac_prog in fgrep; do
7110 for ac_exec_ext in '' $ac_executable_extensions; do
7111 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
7112 as_fn_executable_p "$ac_path_FGREP" || continue
7113 # Check for GNU ac_path_FGREP and select it if it is found.
7114 # Check for GNU $ac_path_FGREP
7115 case `"$ac_path_FGREP" --version 2>&1` in
7116 *GNU*)
7117 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7118 *)
7119 ac_count=0
7120 $as_echo_n 0123456789 >"conftest.in"
7121 while :
7122 do
7123 cat "conftest.in" "conftest.in" >"conftest.tmp"
7124 mv "conftest.tmp" "conftest.in"
7125 cp "conftest.in" "conftest.nl"
7126 $as_echo 'FGREP' >> "conftest.nl"
7127 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7128 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7129 as_fn_arith $ac_count + 1 && ac_count=$as_val
7130 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7131 # Best one so far, save it but keep looking for a better one
7132 ac_cv_path_FGREP="$ac_path_FGREP"
7133 ac_path_FGREP_max=$ac_count
7134 fi
7135 # 10*(2^10) chars as input seems more than enough
7136 test $ac_count -gt 10 && break
7137 done
7138 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7139 esac
7140
7141 $ac_path_FGREP_found && break 3
7142 done
7143 done
7144 done
7145 IFS=$as_save_IFS
7146 if test -z "$ac_cv_path_FGREP"; then
7147 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7148 fi
7149 else
7150 ac_cv_path_FGREP=$FGREP
7151 fi
7152
7153 fi
7154 fi
7155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7156 $as_echo "$ac_cv_path_FGREP" >&6; }
7157 FGREP="$ac_cv_path_FGREP"
7158
7159
7160 test -z "$GREP" && GREP=grep
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180 # Check whether --with-gnu-ld was given.
7181 if test "${with_gnu_ld+set}" = set; then :
7182 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7183 else
7184 with_gnu_ld=no
7185 fi
7186
7187 ac_prog=ld
7188 if test yes = "$GCC"; then
7189 # Check if gcc -print-prog-name=ld gives a path.
7190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7191 $as_echo_n "checking for ld used by $CC... " >&6; }
7192 case $host in
7193 *-*-mingw*)
7194 # gcc leaves a trailing carriage return, which upsets mingw
7195 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7196 *)
7197 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7198 esac
7199 case $ac_prog in
7200 # Accept absolute paths.
7201 [\\/]* | ?:[\\/]*)
7202 re_direlt='/[^/][^/]*/\.\./'
7203 # Canonicalize the pathname of ld
7204 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7205 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7206 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7207 done
7208 test -z "$LD" && LD=$ac_prog
7209 ;;
7210 "")
7211 # If it fails, then pretend we aren't using GCC.
7212 ac_prog=ld
7213 ;;
7214 *)
7215 # If it is relative, then search for the first ld in PATH.
7216 with_gnu_ld=unknown
7217 ;;
7218 esac
7219 elif test yes = "$with_gnu_ld"; then
7220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7221 $as_echo_n "checking for GNU ld... " >&6; }
7222 else
7223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7224 $as_echo_n "checking for non-GNU ld... " >&6; }
7225 fi
7226 if ${lt_cv_path_LD+:} false; then :
7227 $as_echo_n "(cached) " >&6
7228 else
7229 if test -z "$LD"; then
7230 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7231 for ac_dir in $PATH; do
7232 IFS=$lt_save_ifs
7233 test -z "$ac_dir" && ac_dir=.
7234 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7235 lt_cv_path_LD=$ac_dir/$ac_prog
7236 # Check to see if the program is GNU ld. I'd rather use --version,
7237 # but apparently some variants of GNU ld only accept -v.
7238 # Break only if it was the GNU/non-GNU ld that we prefer.
7239 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7240 *GNU* | *'with BFD'*)
7241 test no != "$with_gnu_ld" && break
7242 ;;
7243 *)
7244 test yes != "$with_gnu_ld" && break
7245 ;;
7246 esac
7247 fi
7248 done
7249 IFS=$lt_save_ifs
7250 else
7251 lt_cv_path_LD=$LD # Let the user override the test with a path.
7252 fi
7253 fi
7254
7255 LD=$lt_cv_path_LD
7256 if test -n "$LD"; then
7257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7258 $as_echo "$LD" >&6; }
7259 else
7260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7261 $as_echo "no" >&6; }
7262 fi
7263 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7265 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7266 if ${lt_cv_prog_gnu_ld+:} false; then :
7267 $as_echo_n "(cached) " >&6
7268 else
7269 # I'd rather use --version here, but apparently some GNU lds only accept -v.
7270 case `$LD -v 2>&1 </dev/null` in
7271 *GNU* | *'with BFD'*)
7272 lt_cv_prog_gnu_ld=yes
7273 ;;
7274 *)
7275 lt_cv_prog_gnu_ld=no
7276 ;;
7277 esac
7278 fi
7279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7280 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
7281 with_gnu_ld=$lt_cv_prog_gnu_ld
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7292 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7293 if ${lt_cv_path_NM+:} false; then :
7294 $as_echo_n "(cached) " >&6
7295 else
7296 if test -n "$NM"; then
7297 # Let the user override the test.
7298 lt_cv_path_NM=$NM
7299 else
7300 lt_nm_to_check=${ac_tool_prefix}nm
7301 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7302 lt_nm_to_check="$lt_nm_to_check nm"
7303 fi
7304 for lt_tmp_nm in $lt_nm_to_check; do
7305 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7306 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7307 IFS=$lt_save_ifs
7308 test -z "$ac_dir" && ac_dir=.
7309 tmp_nm=$ac_dir/$lt_tmp_nm
7310 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7311 # Check to see if the nm accepts a BSD-compat flag.
7312 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7313 # nm: unknown option "B" ignored
7314 # Tru64's nm complains that /dev/null is an invalid object file
7315 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7316 case $build_os in
7317 mingw*) lt_bad_file=conftest.nm/nofile ;;
7318 *) lt_bad_file=/dev/null ;;
7319 esac
7320 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7321 *$lt_bad_file* | *'Invalid file or object type'*)
7322 lt_cv_path_NM="$tmp_nm -B"
7323 break 2
7324 ;;
7325 *)
7326 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7327 */dev/null*)
7328 lt_cv_path_NM="$tmp_nm -p"
7329 break 2
7330 ;;
7331 *)
7332 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7333 continue # so that we can try to find one that supports BSD flags
7334 ;;
7335 esac
7336 ;;
7337 esac
7338 fi
7339 done
7340 IFS=$lt_save_ifs
7341 done
7342 : ${lt_cv_path_NM=no}
7343 fi
7344 fi
7345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7346 $as_echo "$lt_cv_path_NM" >&6; }
7347 if test no != "$lt_cv_path_NM"; then
7348 NM=$lt_cv_path_NM
7349 else
7350 # Didn't find any BSD compatible name lister, look for dumpbin.
7351 if test -n "$DUMPBIN"; then :
7352 # Let the user override the test.
7353 else
7354 if test -n "$ac_tool_prefix"; then
7355 for ac_prog in dumpbin "link -dump"
7356 do
7357 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7358 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7360 $as_echo_n "checking for $ac_word... " >&6; }
7361 if ${ac_cv_prog_DUMPBIN+:} false; then :
7362 $as_echo_n "(cached) " >&6
7363 else
7364 if test -n "$DUMPBIN"; then
7365 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7366 else
7367 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7368 for as_dir in $PATH
7369 do
7370 IFS=$as_save_IFS
7371 test -z "$as_dir" && as_dir=.
7372 for ac_exec_ext in '' $ac_executable_extensions; do
7373 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7374 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7375 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7376 break 2
7377 fi
7378 done
7379 done
7380 IFS=$as_save_IFS
7381
7382 fi
7383 fi
7384 DUMPBIN=$ac_cv_prog_DUMPBIN
7385 if test -n "$DUMPBIN"; then
7386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7387 $as_echo "$DUMPBIN" >&6; }
7388 else
7389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7390 $as_echo "no" >&6; }
7391 fi
7392
7393
7394 test -n "$DUMPBIN" && break
7395 done
7396 fi
7397 if test -z "$DUMPBIN"; then
7398 ac_ct_DUMPBIN=$DUMPBIN
7399 for ac_prog in dumpbin "link -dump"
7400 do
7401 # Extract the first word of "$ac_prog", so it can be a program name with args.
7402 set dummy $ac_prog; ac_word=$2
7403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7404 $as_echo_n "checking for $ac_word... " >&6; }
7405 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7406 $as_echo_n "(cached) " >&6
7407 else
7408 if test -n "$ac_ct_DUMPBIN"; then
7409 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7410 else
7411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7412 for as_dir in $PATH
7413 do
7414 IFS=$as_save_IFS
7415 test -z "$as_dir" && as_dir=.
7416 for ac_exec_ext in '' $ac_executable_extensions; do
7417 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7418 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7419 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7420 break 2
7421 fi
7422 done
7423 done
7424 IFS=$as_save_IFS
7425
7426 fi
7427 fi
7428 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7429 if test -n "$ac_ct_DUMPBIN"; then
7430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7431 $as_echo "$ac_ct_DUMPBIN" >&6; }
7432 else
7433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7434 $as_echo "no" >&6; }
7435 fi
7436
7437
7438 test -n "$ac_ct_DUMPBIN" && break
7439 done
7440
7441 if test "x$ac_ct_DUMPBIN" = x; then
7442 DUMPBIN=":"
7443 else
7444 case $cross_compiling:$ac_tool_warned in
7445 yes:)
7446 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7447 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7448 ac_tool_warned=yes ;;
7449 esac
7450 DUMPBIN=$ac_ct_DUMPBIN
7451 fi
7452 fi
7453
7454 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7455 *COFF*)
7456 DUMPBIN="$DUMPBIN -symbols -headers"
7457 ;;
7458 *)
7459 DUMPBIN=:
7460 ;;
7461 esac
7462 fi
7463
7464 if test : != "$DUMPBIN"; then
7465 NM=$DUMPBIN
7466 fi
7467 fi
7468 test -z "$NM" && NM=nm
7469
7470
7471
7472
7473
7474
7475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7476 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
7477 if ${lt_cv_nm_interface+:} false; then :
7478 $as_echo_n "(cached) " >&6
7479 else
7480 lt_cv_nm_interface="BSD nm"
7481 echo "int some_variable = 0;" > conftest.$ac_ext
7482 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7483 (eval "$ac_compile" 2>conftest.err)
7484 cat conftest.err >&5
7485 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7486 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7487 cat conftest.err >&5
7488 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7489 cat conftest.out >&5
7490 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7491 lt_cv_nm_interface="MS dumpbin"
7492 fi
7493 rm -f conftest*
7494 fi
7495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7496 $as_echo "$lt_cv_nm_interface" >&6; }
7497
7498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7499 $as_echo_n "checking whether ln -s works... " >&6; }
7500 LN_S=$as_ln_s
7501 if test "$LN_S" = "ln -s"; then
7502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7503 $as_echo "yes" >&6; }
7504 else
7505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7506 $as_echo "no, using $LN_S" >&6; }
7507 fi
7508
7509 # find the maximum length of command line arguments
7510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7511 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7512 if ${lt_cv_sys_max_cmd_len+:} false; then :
7513 $as_echo_n "(cached) " >&6
7514 else
7515 i=0
7516 teststring=ABCD
7517
7518 case $build_os in
7519 msdosdjgpp*)
7520 # On DJGPP, this test can blow up pretty badly due to problems in libc
7521 # (any single argument exceeding 2000 bytes causes a buffer overrun
7522 # during glob expansion). Even if it were fixed, the result of this
7523 # check would be larger than it should be.
7524 lt_cv_sys_max_cmd_len=12288; # 12K is about right
7525 ;;
7526
7527 gnu*)
7528 # Under GNU Hurd, this test is not required because there is
7529 # no limit to the length of command line arguments.
7530 # Libtool will interpret -1 as no limit whatsoever
7531 lt_cv_sys_max_cmd_len=-1;
7532 ;;
7533
7534 cygwin* | mingw* | cegcc*)
7535 # On Win9x/ME, this test blows up -- it succeeds, but takes
7536 # about 5 minutes as the teststring grows exponentially.
7537 # Worse, since 9x/ME are not pre-emptively multitasking,
7538 # you end up with a "frozen" computer, even though with patience
7539 # the test eventually succeeds (with a max line length of 256k).
7540 # Instead, let's just punt: use the minimum linelength reported by
7541 # all of the supported platforms: 8192 (on NT/2K/XP).
7542 lt_cv_sys_max_cmd_len=8192;
7543 ;;
7544
7545 mint*)
7546 # On MiNT this can take a long time and run out of memory.
7547 lt_cv_sys_max_cmd_len=8192;
7548 ;;
7549
7550 amigaos*)
7551 # On AmigaOS with pdksh, this test takes hours, literally.
7552 # So we just punt and use a minimum line length of 8192.
7553 lt_cv_sys_max_cmd_len=8192;
7554 ;;
7555
7556 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7557 # This has been around since 386BSD, at least. Likely further.
7558 if test -x /sbin/sysctl; then
7559 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7560 elif test -x /usr/sbin/sysctl; then
7561 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7562 else
7563 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
7564 fi
7565 # And add a safety zone
7566 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7567 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7568 ;;
7569
7570 interix*)
7571 # We know the value 262144 and hardcode it with a safety zone (like BSD)
7572 lt_cv_sys_max_cmd_len=196608
7573 ;;
7574
7575 os2*)
7576 # The test takes a long time on OS/2.
7577 lt_cv_sys_max_cmd_len=8192
7578 ;;
7579
7580 osf*)
7581 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7582 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7583 # nice to cause kernel panics so lets avoid the loop below.
7584 # First set a reasonable default.
7585 lt_cv_sys_max_cmd_len=16384
7586 #
7587 if test -x /sbin/sysconfig; then
7588 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7589 *1*) lt_cv_sys_max_cmd_len=-1 ;;
7590 esac
7591 fi
7592 ;;
7593 sco3.2v5*)
7594 lt_cv_sys_max_cmd_len=102400
7595 ;;
7596 sysv5* | sco5v6* | sysv4.2uw2*)
7597 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7598 if test -n "$kargmax"; then
7599 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
7600 else
7601 lt_cv_sys_max_cmd_len=32768
7602 fi
7603 ;;
7604 *)
7605 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7606 if test -n "$lt_cv_sys_max_cmd_len" && \
7607 test undefined != "$lt_cv_sys_max_cmd_len"; then
7608 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7609 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7610 else
7611 # Make teststring a little bigger before we do anything with it.
7612 # a 1K string should be a reasonable start.
7613 for i in 1 2 3 4 5 6 7 8; do
7614 teststring=$teststring$teststring
7615 done
7616 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7617 # If test is not a shell built-in, we'll probably end up computing a
7618 # maximum length that is only half of the actual maximum length, but
7619 # we can't tell.
7620 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7621 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7622 test 17 != "$i" # 1/2 MB should be enough
7623 do
7624 i=`expr $i + 1`
7625 teststring=$teststring$teststring
7626 done
7627 # Only check the string length outside the loop.
7628 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7629 teststring=
7630 # Add a significant safety factor because C++ compilers can tack on
7631 # massive amounts of additional arguments before passing them to the
7632 # linker. It appears as though 1/2 is a usable value.
7633 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7634 fi
7635 ;;
7636 esac
7637
7638 fi
7639
7640 if test -n "$lt_cv_sys_max_cmd_len"; then
7641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7642 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7643 else
7644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7645 $as_echo "none" >&6; }
7646 fi
7647 max_cmd_len=$lt_cv_sys_max_cmd_len
7648
7649
7650
7651
7652
7653
7654 : ${CP="cp -f"}
7655 : ${MV="mv -f"}
7656 : ${RM="rm -f"}
7657
7658 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7659 lt_unset=unset
7660 else
7661 lt_unset=false
7662 fi
7663
7664
7665
7666
7667
7668 # test EBCDIC or ASCII
7669 case `echo X|tr X '\101'` in
7670 A) # ASCII based system
7671 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7672 lt_SP2NL='tr \040 \012'
7673 lt_NL2SP='tr \015\012 \040\040'
7674 ;;
7675 *) # EBCDIC based system
7676 lt_SP2NL='tr \100 \n'
7677 lt_NL2SP='tr \r\n \100\100'
7678 ;;
7679 esac
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7690 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7691 if ${lt_cv_to_host_file_cmd+:} false; then :
7692 $as_echo_n "(cached) " >&6
7693 else
7694 case $host in
7695 *-*-mingw* )
7696 case $build in
7697 *-*-mingw* ) # actually msys
7698 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7699 ;;
7700 *-*-cygwin* )
7701 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7702 ;;
7703 * ) # otherwise, assume *nix
7704 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7705 ;;
7706 esac
7707 ;;
7708 *-*-cygwin* )
7709 case $build in
7710 *-*-mingw* ) # actually msys
7711 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7712 ;;
7713 *-*-cygwin* )
7714 lt_cv_to_host_file_cmd=func_convert_file_noop
7715 ;;
7716 * ) # otherwise, assume *nix
7717 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7718 ;;
7719 esac
7720 ;;
7721 * ) # unhandled hosts (and "normal" native builds)
7722 lt_cv_to_host_file_cmd=func_convert_file_noop
7723 ;;
7724 esac
7725
7726 fi
7727
7728 to_host_file_cmd=$lt_cv_to_host_file_cmd
7729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7730 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
7731
7732
7733
7734
7735
7736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7737 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7738 if ${lt_cv_to_tool_file_cmd+:} false; then :
7739 $as_echo_n "(cached) " >&6
7740 else
7741 #assume ordinary cross tools, or native build.
7742 lt_cv_to_tool_file_cmd=func_convert_file_noop
7743 case $host in
7744 *-*-mingw* )
7745 case $build in
7746 *-*-mingw* ) # actually msys
7747 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7748 ;;
7749 esac
7750 ;;
7751 esac
7752
7753 fi
7754
7755 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7757 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7758
7759
7760
7761
7762
7763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7764 $as_echo_n "checking for $LD option to reload object files... " >&6; }
7765 if ${lt_cv_ld_reload_flag+:} false; then :
7766 $as_echo_n "(cached) " >&6
7767 else
7768 lt_cv_ld_reload_flag='-r'
7769 fi
7770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7771 $as_echo "$lt_cv_ld_reload_flag" >&6; }
7772 reload_flag=$lt_cv_ld_reload_flag
7773 case $reload_flag in
7774 "" | " "*) ;;
7775 *) reload_flag=" $reload_flag" ;;
7776 esac
7777 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7778 case $host_os in
7779 cygwin* | mingw* | pw32* | cegcc*)
7780 if test yes != "$GCC"; then
7781 reload_cmds=false
7782 fi
7783 ;;
7784 darwin*)
7785 if test yes = "$GCC"; then
7786 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7787 else
7788 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7789 fi
7790 ;;
7791 esac
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801 if test -n "$ac_tool_prefix"; then
7802 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7803 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7805 $as_echo_n "checking for $ac_word... " >&6; }
7806 if ${ac_cv_prog_OBJDUMP+:} false; then :
7807 $as_echo_n "(cached) " >&6
7808 else
7809 if test -n "$OBJDUMP"; then
7810 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7811 else
7812 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7813 for as_dir in $PATH
7814 do
7815 IFS=$as_save_IFS
7816 test -z "$as_dir" && as_dir=.
7817 for ac_exec_ext in '' $ac_executable_extensions; do
7818 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7819 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7820 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7821 break 2
7822 fi
7823 done
7824 done
7825 IFS=$as_save_IFS
7826
7827 fi
7828 fi
7829 OBJDUMP=$ac_cv_prog_OBJDUMP
7830 if test -n "$OBJDUMP"; then
7831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7832 $as_echo "$OBJDUMP" >&6; }
7833 else
7834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7835 $as_echo "no" >&6; }
7836 fi
7837
7838
7839 fi
7840 if test -z "$ac_cv_prog_OBJDUMP"; then
7841 ac_ct_OBJDUMP=$OBJDUMP
7842 # Extract the first word of "objdump", so it can be a program name with args.
7843 set dummy objdump; ac_word=$2
7844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7845 $as_echo_n "checking for $ac_word... " >&6; }
7846 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7847 $as_echo_n "(cached) " >&6
7848 else
7849 if test -n "$ac_ct_OBJDUMP"; then
7850 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7851 else
7852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7853 for as_dir in $PATH
7854 do
7855 IFS=$as_save_IFS
7856 test -z "$as_dir" && as_dir=.
7857 for ac_exec_ext in '' $ac_executable_extensions; do
7858 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7859 ac_cv_prog_ac_ct_OBJDUMP="objdump"
7860 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7861 break 2
7862 fi
7863 done
7864 done
7865 IFS=$as_save_IFS
7866
7867 fi
7868 fi
7869 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7870 if test -n "$ac_ct_OBJDUMP"; then
7871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7872 $as_echo "$ac_ct_OBJDUMP" >&6; }
7873 else
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7875 $as_echo "no" >&6; }
7876 fi
7877
7878 if test "x$ac_ct_OBJDUMP" = x; then
7879 OBJDUMP="false"
7880 else
7881 case $cross_compiling:$ac_tool_warned in
7882 yes:)
7883 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7884 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7885 ac_tool_warned=yes ;;
7886 esac
7887 OBJDUMP=$ac_ct_OBJDUMP
7888 fi
7889 else
7890 OBJDUMP="$ac_cv_prog_OBJDUMP"
7891 fi
7892
7893 test -z "$OBJDUMP" && OBJDUMP=objdump
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7904 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
7905 if ${lt_cv_deplibs_check_method+:} false; then :
7906 $as_echo_n "(cached) " >&6
7907 else
7908 lt_cv_file_magic_cmd='$MAGIC_CMD'
7909 lt_cv_file_magic_test_file=
7910 lt_cv_deplibs_check_method='unknown'
7911 # Need to set the preceding variable on all platforms that support
7912 # interlibrary dependencies.
7913 # 'none' -- dependencies not supported.
7914 # 'unknown' -- same as none, but documents that we really don't know.
7915 # 'pass_all' -- all dependencies passed with no checks.
7916 # 'test_compile' -- check by making test program.
7917 # 'file_magic [[regex]]' -- check by looking for files in library path
7918 # that responds to the $file_magic_cmd with a given extended regex.
7919 # If you have 'file' or equivalent on your system and you're not sure
7920 # whether 'pass_all' will *always* work, you probably want this one.
7921
7922 case $host_os in
7923 aix[4-9]*)
7924 lt_cv_deplibs_check_method=pass_all
7925 ;;
7926
7927 beos*)
7928 lt_cv_deplibs_check_method=pass_all
7929 ;;
7930
7931 bsdi[45]*)
7932 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
7933 lt_cv_file_magic_cmd='/usr/bin/file -L'
7934 lt_cv_file_magic_test_file=/shlib/libc.so
7935 ;;
7936
7937 cygwin*)
7938 # func_win32_libid is a shell function defined in ltmain.sh
7939 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7940 lt_cv_file_magic_cmd='func_win32_libid'
7941 ;;
7942
7943 mingw* | pw32*)
7944 # Base MSYS/MinGW do not provide the 'file' command needed by
7945 # func_win32_libid shell function, so use a weaker test based on 'objdump',
7946 # unless we find 'file', for example because we are cross-compiling.
7947 if ( file / ) >/dev/null 2>&1; then
7948 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7949 lt_cv_file_magic_cmd='func_win32_libid'
7950 else
7951 # Keep this pattern in sync with the one in func_win32_libid.
7952 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
7953 lt_cv_file_magic_cmd='$OBJDUMP -f'
7954 fi
7955 ;;
7956
7957 cegcc*)
7958 # use the weaker test based on 'objdump'. See mingw*.
7959 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
7960 lt_cv_file_magic_cmd='$OBJDUMP -f'
7961 ;;
7962
7963 darwin* | rhapsody*)
7964 lt_cv_deplibs_check_method=pass_all
7965 ;;
7966
7967 freebsd* | dragonfly*)
7968 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7969 case $host_cpu in
7970 i*86 )
7971 # Not sure whether the presence of OpenBSD here was a mistake.
7972 # Let's accept both of them until this is cleared up.
7973 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
7974 lt_cv_file_magic_cmd=/usr/bin/file
7975 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7976 ;;
7977 esac
7978 else
7979 lt_cv_deplibs_check_method=pass_all
7980 fi
7981 ;;
7982
7983 haiku*)
7984 lt_cv_deplibs_check_method=pass_all
7985 ;;
7986
7987 hpux10.20* | hpux11*)
7988 lt_cv_file_magic_cmd=/usr/bin/file
7989 case $host_cpu in
7990 ia64*)
7991 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
7992 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7993 ;;
7994 hppa*64*)
7995 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]'
7996 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7997 ;;
7998 *)
7999 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
8000 lt_cv_file_magic_test_file=/usr/lib/libc.sl
8001 ;;
8002 esac
8003 ;;
8004
8005 interix[3-9]*)
8006 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8007 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
8008 ;;
8009
8010 irix5* | irix6* | nonstopux*)
8011 case $LD in
8012 *-32|*"-32 ") libmagic=32-bit;;
8013 *-n32|*"-n32 ") libmagic=N32;;
8014 *-64|*"-64 ") libmagic=64-bit;;
8015 *) libmagic=never-match;;
8016 esac
8017 lt_cv_deplibs_check_method=pass_all
8018 ;;
8019
8020 # This must be glibc/ELF.
8021 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8022 lt_cv_deplibs_check_method=pass_all
8023 ;;
8024
8025 netbsd*)
8026 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8027 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8028 else
8029 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
8030 fi
8031 ;;
8032
8033 newos6*)
8034 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
8035 lt_cv_file_magic_cmd=/usr/bin/file
8036 lt_cv_file_magic_test_file=/usr/lib/libnls.so
8037 ;;
8038
8039 *nto* | *qnx*)
8040 lt_cv_deplibs_check_method=pass_all
8041 ;;
8042
8043 openbsd* | bitrig*)
8044 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
8045 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
8046 else
8047 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8048 fi
8049 ;;
8050
8051 osf3* | osf4* | osf5*)
8052 lt_cv_deplibs_check_method=pass_all
8053 ;;
8054
8055 rdos*)
8056 lt_cv_deplibs_check_method=pass_all
8057 ;;
8058
8059 solaris*)
8060 lt_cv_deplibs_check_method=pass_all
8061 ;;
8062
8063 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8064 lt_cv_deplibs_check_method=pass_all
8065 ;;
8066
8067 sysv4 | sysv4.3*)
8068 case $host_vendor in
8069 motorola)
8070 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]'
8071 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8072 ;;
8073 ncr)
8074 lt_cv_deplibs_check_method=pass_all
8075 ;;
8076 sequent)
8077 lt_cv_file_magic_cmd='/bin/file'
8078 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
8079 ;;
8080 sni)
8081 lt_cv_file_magic_cmd='/bin/file'
8082 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
8083 lt_cv_file_magic_test_file=/lib/libc.so
8084 ;;
8085 siemens)
8086 lt_cv_deplibs_check_method=pass_all
8087 ;;
8088 pc)
8089 lt_cv_deplibs_check_method=pass_all
8090 ;;
8091 esac
8092 ;;
8093
8094 tpf*)
8095 lt_cv_deplibs_check_method=pass_all
8096 ;;
8097 os2*)
8098 lt_cv_deplibs_check_method=pass_all
8099 ;;
8100 esac
8101
8102 fi
8103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
8104 $as_echo "$lt_cv_deplibs_check_method" >&6; }
8105
8106 file_magic_glob=
8107 want_nocaseglob=no
8108 if test "$build" = "$host"; then
8109 case $host_os in
8110 mingw* | pw32*)
8111 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
8112 want_nocaseglob=yes
8113 else
8114 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
8115 fi
8116 ;;
8117 esac
8118 fi
8119
8120 file_magic_cmd=$lt_cv_file_magic_cmd
8121 deplibs_check_method=$lt_cv_deplibs_check_method
8122 test -z "$deplibs_check_method" && deplibs_check_method=unknown
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145 if test -n "$ac_tool_prefix"; then
8146 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8147 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8149 $as_echo_n "checking for $ac_word... " >&6; }
8150 if ${ac_cv_prog_DLLTOOL+:} false; then :
8151 $as_echo_n "(cached) " >&6
8152 else
8153 if test -n "$DLLTOOL"; then
8154 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8155 else
8156 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8157 for as_dir in $PATH
8158 do
8159 IFS=$as_save_IFS
8160 test -z "$as_dir" && as_dir=.
8161 for ac_exec_ext in '' $ac_executable_extensions; do
8162 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8163 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8164 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8165 break 2
8166 fi
8167 done
8168 done
8169 IFS=$as_save_IFS
8170
8171 fi
8172 fi
8173 DLLTOOL=$ac_cv_prog_DLLTOOL
8174 if test -n "$DLLTOOL"; then
8175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8176 $as_echo "$DLLTOOL" >&6; }
8177 else
8178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8179 $as_echo "no" >&6; }
8180 fi
8181
8182
8183 fi
8184 if test -z "$ac_cv_prog_DLLTOOL"; then
8185 ac_ct_DLLTOOL=$DLLTOOL
8186 # Extract the first word of "dlltool", so it can be a program name with args.
8187 set dummy dlltool; ac_word=$2
8188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8189 $as_echo_n "checking for $ac_word... " >&6; }
8190 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8191 $as_echo_n "(cached) " >&6
8192 else
8193 if test -n "$ac_ct_DLLTOOL"; then
8194 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8195 else
8196 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8197 for as_dir in $PATH
8198 do
8199 IFS=$as_save_IFS
8200 test -z "$as_dir" && as_dir=.
8201 for ac_exec_ext in '' $ac_executable_extensions; do
8202 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8203 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8204 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8205 break 2
8206 fi
8207 done
8208 done
8209 IFS=$as_save_IFS
8210
8211 fi
8212 fi
8213 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8214 if test -n "$ac_ct_DLLTOOL"; then
8215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8216 $as_echo "$ac_ct_DLLTOOL" >&6; }
8217 else
8218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8219 $as_echo "no" >&6; }
8220 fi
8221
8222 if test "x$ac_ct_DLLTOOL" = x; then
8223 DLLTOOL="false"
8224 else
8225 case $cross_compiling:$ac_tool_warned in
8226 yes:)
8227 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8228 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8229 ac_tool_warned=yes ;;
8230 esac
8231 DLLTOOL=$ac_ct_DLLTOOL
8232 fi
8233 else
8234 DLLTOOL="$ac_cv_prog_DLLTOOL"
8235 fi
8236
8237 test -z "$DLLTOOL" && DLLTOOL=dlltool
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8249 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8250 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8251 $as_echo_n "(cached) " >&6
8252 else
8253 lt_cv_sharedlib_from_linklib_cmd='unknown'
8254
8255 case $host_os in
8256 cygwin* | mingw* | pw32* | cegcc*)
8257 # two different shell functions defined in ltmain.sh;
8258 # decide which one to use based on capabilities of $DLLTOOL
8259 case `$DLLTOOL --help 2>&1` in
8260 *--identify-strict*)
8261 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8262 ;;
8263 *)
8264 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8265 ;;
8266 esac
8267 ;;
8268 *)
8269 # fallback: assume linklib IS sharedlib
8270 lt_cv_sharedlib_from_linklib_cmd=$ECHO
8271 ;;
8272 esac
8273
8274 fi
8275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8276 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8277 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8278 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8279
8280
8281
8282
8283
8284
8285
8286 if test -n "$ac_tool_prefix"; then
8287 for ac_prog in ar
8288 do
8289 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8290 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8292 $as_echo_n "checking for $ac_word... " >&6; }
8293 if ${ac_cv_prog_AR+:} false; then :
8294 $as_echo_n "(cached) " >&6
8295 else
8296 if test -n "$AR"; then
8297 ac_cv_prog_AR="$AR" # Let the user override the test.
8298 else
8299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8300 for as_dir in $PATH
8301 do
8302 IFS=$as_save_IFS
8303 test -z "$as_dir" && as_dir=.
8304 for ac_exec_ext in '' $ac_executable_extensions; do
8305 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8306 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8307 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8308 break 2
8309 fi
8310 done
8311 done
8312 IFS=$as_save_IFS
8313
8314 fi
8315 fi
8316 AR=$ac_cv_prog_AR
8317 if test -n "$AR"; then
8318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8319 $as_echo "$AR" >&6; }
8320 else
8321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8322 $as_echo "no" >&6; }
8323 fi
8324
8325
8326 test -n "$AR" && break
8327 done
8328 fi
8329 if test -z "$AR"; then
8330 ac_ct_AR=$AR
8331 for ac_prog in ar
8332 do
8333 # Extract the first word of "$ac_prog", so it can be a program name with args.
8334 set dummy $ac_prog; ac_word=$2
8335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8336 $as_echo_n "checking for $ac_word... " >&6; }
8337 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8338 $as_echo_n "(cached) " >&6
8339 else
8340 if test -n "$ac_ct_AR"; then
8341 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8342 else
8343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8344 for as_dir in $PATH
8345 do
8346 IFS=$as_save_IFS
8347 test -z "$as_dir" && as_dir=.
8348 for ac_exec_ext in '' $ac_executable_extensions; do
8349 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8350 ac_cv_prog_ac_ct_AR="$ac_prog"
8351 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8352 break 2
8353 fi
8354 done
8355 done
8356 IFS=$as_save_IFS
8357
8358 fi
8359 fi
8360 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8361 if test -n "$ac_ct_AR"; then
8362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8363 $as_echo "$ac_ct_AR" >&6; }
8364 else
8365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8366 $as_echo "no" >&6; }
8367 fi
8368
8369
8370 test -n "$ac_ct_AR" && break
8371 done
8372
8373 if test "x$ac_ct_AR" = x; then
8374 AR="false"
8375 else
8376 case $cross_compiling:$ac_tool_warned in
8377 yes:)
8378 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8379 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8380 ac_tool_warned=yes ;;
8381 esac
8382 AR=$ac_ct_AR
8383 fi
8384 fi
8385
8386 : ${AR=ar}
8387 : ${AR_FLAGS=cru}
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8400 $as_echo_n "checking for archiver @FILE support... " >&6; }
8401 if ${lt_cv_ar_at_file+:} false; then :
8402 $as_echo_n "(cached) " >&6
8403 else
8404 lt_cv_ar_at_file=no
8405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8406 /* end confdefs.h. */
8407
8408 int
8409 main ()
8410 {
8411
8412 ;
8413 return 0;
8414 }
8415 _ACEOF
8416 if ac_fn_c_try_compile "$LINENO"; then :
8417 echo conftest.$ac_objext > conftest.lst
8418 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8419 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8420 (eval $lt_ar_try) 2>&5
8421 ac_status=$?
8422 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8423 test $ac_status = 0; }
8424 if test 0 -eq "$ac_status"; then
8425 # Ensure the archiver fails upon bogus file names.
8426 rm -f conftest.$ac_objext libconftest.a
8427 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8428 (eval $lt_ar_try) 2>&5
8429 ac_status=$?
8430 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8431 test $ac_status = 0; }
8432 if test 0 -ne "$ac_status"; then
8433 lt_cv_ar_at_file=@
8434 fi
8435 fi
8436 rm -f conftest.* libconftest.a
8437
8438 fi
8439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8440
8441 fi
8442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8443 $as_echo "$lt_cv_ar_at_file" >&6; }
8444
8445 if test no = "$lt_cv_ar_at_file"; then
8446 archiver_list_spec=
8447 else
8448 archiver_list_spec=$lt_cv_ar_at_file
8449 fi
8450
8451
8452
8453
8454
8455
8456
8457 if test -n "$ac_tool_prefix"; then
8458 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8459 set dummy ${ac_tool_prefix}strip; ac_word=$2
8460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8461 $as_echo_n "checking for $ac_word... " >&6; }
8462 if ${ac_cv_prog_STRIP+:} false; then :
8463 $as_echo_n "(cached) " >&6
8464 else
8465 if test -n "$STRIP"; then
8466 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8467 else
8468 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8469 for as_dir in $PATH
8470 do
8471 IFS=$as_save_IFS
8472 test -z "$as_dir" && as_dir=.
8473 for ac_exec_ext in '' $ac_executable_extensions; do
8474 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8475 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8476 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8477 break 2
8478 fi
8479 done
8480 done
8481 IFS=$as_save_IFS
8482
8483 fi
8484 fi
8485 STRIP=$ac_cv_prog_STRIP
8486 if test -n "$STRIP"; then
8487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8488 $as_echo "$STRIP" >&6; }
8489 else
8490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8491 $as_echo "no" >&6; }
8492 fi
8493
8494
8495 fi
8496 if test -z "$ac_cv_prog_STRIP"; then
8497 ac_ct_STRIP=$STRIP
8498 # Extract the first word of "strip", so it can be a program name with args.
8499 set dummy strip; ac_word=$2
8500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8501 $as_echo_n "checking for $ac_word... " >&6; }
8502 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8503 $as_echo_n "(cached) " >&6
8504 else
8505 if test -n "$ac_ct_STRIP"; then
8506 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8507 else
8508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8509 for as_dir in $PATH
8510 do
8511 IFS=$as_save_IFS
8512 test -z "$as_dir" && as_dir=.
8513 for ac_exec_ext in '' $ac_executable_extensions; do
8514 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8515 ac_cv_prog_ac_ct_STRIP="strip"
8516 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8517 break 2
8518 fi
8519 done
8520 done
8521 IFS=$as_save_IFS
8522
8523 fi
8524 fi
8525 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8526 if test -n "$ac_ct_STRIP"; then
8527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8528 $as_echo "$ac_ct_STRIP" >&6; }
8529 else
8530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8531 $as_echo "no" >&6; }
8532 fi
8533
8534 if test "x$ac_ct_STRIP" = x; then
8535 STRIP=":"
8536 else
8537 case $cross_compiling:$ac_tool_warned in
8538 yes:)
8539 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8540 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8541 ac_tool_warned=yes ;;
8542 esac
8543 STRIP=$ac_ct_STRIP
8544 fi
8545 else
8546 STRIP="$ac_cv_prog_STRIP"
8547 fi
8548
8549 test -z "$STRIP" && STRIP=:
8550
8551
8552
8553
8554
8555
8556 if test -n "$ac_tool_prefix"; then
8557 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8558 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8560 $as_echo_n "checking for $ac_word... " >&6; }
8561 if ${ac_cv_prog_RANLIB+:} false; then :
8562 $as_echo_n "(cached) " >&6
8563 else
8564 if test -n "$RANLIB"; then
8565 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8566 else
8567 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8568 for as_dir in $PATH
8569 do
8570 IFS=$as_save_IFS
8571 test -z "$as_dir" && as_dir=.
8572 for ac_exec_ext in '' $ac_executable_extensions; do
8573 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8574 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8575 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8576 break 2
8577 fi
8578 done
8579 done
8580 IFS=$as_save_IFS
8581
8582 fi
8583 fi
8584 RANLIB=$ac_cv_prog_RANLIB
8585 if test -n "$RANLIB"; then
8586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8587 $as_echo "$RANLIB" >&6; }
8588 else
8589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8590 $as_echo "no" >&6; }
8591 fi
8592
8593
8594 fi
8595 if test -z "$ac_cv_prog_RANLIB"; then
8596 ac_ct_RANLIB=$RANLIB
8597 # Extract the first word of "ranlib", so it can be a program name with args.
8598 set dummy ranlib; ac_word=$2
8599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8600 $as_echo_n "checking for $ac_word... " >&6; }
8601 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8602 $as_echo_n "(cached) " >&6
8603 else
8604 if test -n "$ac_ct_RANLIB"; then
8605 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8606 else
8607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8608 for as_dir in $PATH
8609 do
8610 IFS=$as_save_IFS
8611 test -z "$as_dir" && as_dir=.
8612 for ac_exec_ext in '' $ac_executable_extensions; do
8613 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8614 ac_cv_prog_ac_ct_RANLIB="ranlib"
8615 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8616 break 2
8617 fi
8618 done
8619 done
8620 IFS=$as_save_IFS
8621
8622 fi
8623 fi
8624 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8625 if test -n "$ac_ct_RANLIB"; then
8626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8627 $as_echo "$ac_ct_RANLIB" >&6; }
8628 else
8629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8630 $as_echo "no" >&6; }
8631 fi
8632
8633 if test "x$ac_ct_RANLIB" = x; then
8634 RANLIB=":"
8635 else
8636 case $cross_compiling:$ac_tool_warned in
8637 yes:)
8638 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8639 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8640 ac_tool_warned=yes ;;
8641 esac
8642 RANLIB=$ac_ct_RANLIB
8643 fi
8644 else
8645 RANLIB="$ac_cv_prog_RANLIB"
8646 fi
8647
8648 test -z "$RANLIB" && RANLIB=:
8649
8650
8651
8652
8653
8654
8655 # Determine commands to create old-style static archives.
8656 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8657 old_postinstall_cmds='chmod 644 $oldlib'
8658 old_postuninstall_cmds=
8659
8660 if test -n "$RANLIB"; then
8661 case $host_os in
8662 bitrig* | openbsd*)
8663 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8664 ;;
8665 *)
8666 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8667 ;;
8668 esac
8669 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8670 fi
8671
8672 case $host_os in
8673 darwin*)
8674 lock_old_archive_extraction=yes ;;
8675 *)
8676 lock_old_archive_extraction=no ;;
8677 esac
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699 for ac_prog in gawk mawk nawk awk
8700 do
8701 # Extract the first word of "$ac_prog", so it can be a program name with args.
8702 set dummy $ac_prog; ac_word=$2
8703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8704 $as_echo_n "checking for $ac_word... " >&6; }
8705 if ${ac_cv_prog_AWK+:} false; then :
8706 $as_echo_n "(cached) " >&6
8707 else
8708 if test -n "$AWK"; then
8709 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8710 else
8711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8712 for as_dir in $PATH
8713 do
8714 IFS=$as_save_IFS
8715 test -z "$as_dir" && as_dir=.
8716 for ac_exec_ext in '' $ac_executable_extensions; do
8717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8718 ac_cv_prog_AWK="$ac_prog"
8719 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8720 break 2
8721 fi
8722 done
8723 done
8724 IFS=$as_save_IFS
8725
8726 fi
8727 fi
8728 AWK=$ac_cv_prog_AWK
8729 if test -n "$AWK"; then
8730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8731 $as_echo "$AWK" >&6; }
8732 else
8733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8734 $as_echo "no" >&6; }
8735 fi
8736
8737
8738 test -n "$AWK" && break
8739 done
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759 # If no C compiler was specified, use CC.
8760 LTCC=${LTCC-"$CC"}
8761
8762 # If no C compiler flags were specified, use CFLAGS.
8763 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8764
8765 # Allow CC to be a program name with arguments.
8766 compiler=$CC
8767
8768
8769 # Check for command to grab the raw symbol name followed by C symbol from nm.
8770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8771 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8772 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8773 $as_echo_n "(cached) " >&6
8774 else
8775
8776 # These are sane defaults that work on at least a few old systems.
8777 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
8778
8779 # Character class describing NM global symbol codes.
8780 symcode='[BCDEGRST]'
8781
8782 # Regexp to match symbols that can be accessed directly from C.
8783 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8784
8785 # Define system-specific variables.
8786 case $host_os in
8787 aix*)
8788 symcode='[BCDT]'
8789 ;;
8790 cygwin* | mingw* | pw32* | cegcc*)
8791 symcode='[ABCDGISTW]'
8792 ;;
8793 hpux*)
8794 if test ia64 = "$host_cpu"; then
8795 symcode='[ABCDEGRST]'
8796 fi
8797 ;;
8798 irix* | nonstopux*)
8799 symcode='[BCDEGRST]'
8800 ;;
8801 osf*)
8802 symcode='[BCDEGQRST]'
8803 ;;
8804 solaris*)
8805 symcode='[BDRT]'
8806 ;;
8807 sco3.2v5*)
8808 symcode='[DT]'
8809 ;;
8810 sysv4.2uw2*)
8811 symcode='[DT]'
8812 ;;
8813 sysv5* | sco5v6* | unixware* | OpenUNIX*)
8814 symcode='[ABDT]'
8815 ;;
8816 sysv4)
8817 symcode='[DFNSTU]'
8818 ;;
8819 esac
8820
8821 # If we're using GNU nm, then use its standard symbol codes.
8822 case `$NM -V 2>&1` in
8823 *GNU* | *'with BFD'*)
8824 symcode='[ABCDGIRSTW]' ;;
8825 esac
8826
8827 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8828 # Gets list of data symbols to import.
8829 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8830 # Adjust the below global symbol transforms to fixup imported variables.
8831 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8832 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
8833 lt_c_name_lib_hook="\
8834 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
8835 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
8836 else
8837 # Disable hooks by default.
8838 lt_cv_sys_global_symbol_to_import=
8839 lt_cdecl_hook=
8840 lt_c_name_hook=
8841 lt_c_name_lib_hook=
8842 fi
8843
8844 # Transform an extracted symbol line into a proper C declaration.
8845 # Some systems (esp. on ia64) link data and code symbols differently,
8846 # so use this general approach.
8847 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8848 $lt_cdecl_hook\
8849 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8850 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8851
8852 # Transform an extracted symbol line into symbol name and symbol address
8853 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8854 $lt_c_name_hook\
8855 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
8856 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
8857
8858 # Transform an extracted symbol line into symbol name with lib prefix and
8859 # symbol address.
8860 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8861 $lt_c_name_lib_hook\
8862 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
8863 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
8864 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
8865
8866 # Handle CRLF in mingw tool chain
8867 opt_cr=
8868 case $build_os in
8869 mingw*)
8870 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8871 ;;
8872 esac
8873
8874 # Try without a prefix underscore, then with it.
8875 for ac_symprfx in "" "_"; do
8876
8877 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8878 symxfrm="\\1 $ac_symprfx\\2 \\2"
8879
8880 # Write the raw and C identifiers.
8881 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8882 # Fake it for dumpbin and say T for any non-static function,
8883 # D for any global variable and I for any imported variable.
8884 # Also find C++ and __fastcall symbols from MSVC++,
8885 # which start with @ or ?.
8886 lt_cv_sys_global_symbol_pipe="$AWK '"\
8887 " {last_section=section; section=\$ 3};"\
8888 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8889 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8890 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8891 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8892 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8893 " \$ 0!~/External *\|/{next};"\
8894 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8895 " {if(hide[section]) next};"\
8896 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8897 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8898 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8899 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8900 " ' prfx=^$ac_symprfx"
8901 else
8902 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8903 fi
8904 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8905
8906 # Check to see that the pipe works correctly.
8907 pipe_works=no
8908
8909 rm -f conftest*
8910 cat > conftest.$ac_ext <<_LT_EOF
8911 #ifdef __cplusplus
8912 extern "C" {
8913 #endif
8914 char nm_test_var;
8915 void nm_test_func(void);
8916 void nm_test_func(void){}
8917 #ifdef __cplusplus
8918 }
8919 #endif
8920 int main(){nm_test_var='a';nm_test_func();return(0);}
8921 _LT_EOF
8922
8923 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8924 (eval $ac_compile) 2>&5
8925 ac_status=$?
8926 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8927 test $ac_status = 0; }; then
8928 # Now try to grab the symbols.
8929 nlist=conftest.nm
8930 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
8931 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
8932 ac_status=$?
8933 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8934 test $ac_status = 0; } && test -s "$nlist"; then
8935 # Try sorting and uniquifying the output.
8936 if sort "$nlist" | uniq > "$nlist"T; then
8937 mv -f "$nlist"T "$nlist"
8938 else
8939 rm -f "$nlist"T
8940 fi
8941
8942 # Make sure that we snagged all the symbols we need.
8943 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
8944 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
8945 cat <<_LT_EOF > conftest.$ac_ext
8946 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
8947 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
8948 /* DATA imports from DLLs on WIN32 can't be const, because runtime
8949 relocations are performed -- see ld's documentation on pseudo-relocs. */
8950 # define LT_DLSYM_CONST
8951 #elif defined __osf__
8952 /* This system does not cope well with relocations in const data. */
8953 # define LT_DLSYM_CONST
8954 #else
8955 # define LT_DLSYM_CONST const
8956 #endif
8957
8958 #ifdef __cplusplus
8959 extern "C" {
8960 #endif
8961
8962 _LT_EOF
8963 # Now generate the symbol file.
8964 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
8965
8966 cat <<_LT_EOF >> conftest.$ac_ext
8967
8968 /* The mapping between symbol names and symbols. */
8969 LT_DLSYM_CONST struct {
8970 const char *name;
8971 void *address;
8972 }
8973 lt__PROGRAM__LTX_preloaded_symbols[] =
8974 {
8975 { "@PROGRAM@", (void *) 0 },
8976 _LT_EOF
8977 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
8978 cat <<\_LT_EOF >> conftest.$ac_ext
8979 {0, (void *) 0}
8980 };
8981
8982 /* This works around a problem in FreeBSD linker */
8983 #ifdef FREEBSD_WORKAROUND
8984 static const void *lt_preloaded_setup() {
8985 return lt__PROGRAM__LTX_preloaded_symbols;
8986 }
8987 #endif
8988
8989 #ifdef __cplusplus
8990 }
8991 #endif
8992 _LT_EOF
8993 # Now try linking the two files.
8994 mv conftest.$ac_objext conftstm.$ac_objext
8995 lt_globsym_save_LIBS=$LIBS
8996 lt_globsym_save_CFLAGS=$CFLAGS
8997 LIBS=conftstm.$ac_objext
8998 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
8999 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9000 (eval $ac_link) 2>&5
9001 ac_status=$?
9002 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9003 test $ac_status = 0; } && test -s conftest$ac_exeext; then
9004 pipe_works=yes
9005 fi
9006 LIBS=$lt_globsym_save_LIBS
9007 CFLAGS=$lt_globsym_save_CFLAGS
9008 else
9009 echo "cannot find nm_test_func in $nlist" >&5
9010 fi
9011 else
9012 echo "cannot find nm_test_var in $nlist" >&5
9013 fi
9014 else
9015 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
9016 fi
9017 else
9018 echo "$progname: failed program was:" >&5
9019 cat conftest.$ac_ext >&5
9020 fi
9021 rm -rf conftest* conftst*
9022
9023 # Do not use the global_symbol_pipe unless it works.
9024 if test yes = "$pipe_works"; then
9025 break
9026 else
9027 lt_cv_sys_global_symbol_pipe=
9028 fi
9029 done
9030
9031 fi
9032
9033 if test -z "$lt_cv_sys_global_symbol_pipe"; then
9034 lt_cv_sys_global_symbol_to_cdecl=
9035 fi
9036 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
9038 $as_echo "failed" >&6; }
9039 else
9040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9041 $as_echo "ok" >&6; }
9042 fi
9043
9044 # Response file support.
9045 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9046 nm_file_list_spec='@'
9047 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
9048 nm_file_list_spec='@'
9049 fi
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
9088 $as_echo_n "checking for sysroot... " >&6; }
9089
9090 # Check whether --with-sysroot was given.
9091 if test "${with_sysroot+set}" = set; then :
9092 withval=$with_sysroot;
9093 else
9094 with_sysroot=no
9095 fi
9096
9097
9098 lt_sysroot=
9099 case $with_sysroot in #(
9100 yes)
9101 if test yes = "$GCC"; then
9102 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
9103 fi
9104 ;; #(
9105 /*)
9106 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
9107 ;; #(
9108 no|'')
9109 ;; #(
9110 *)
9111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
9112 $as_echo "$with_sysroot" >&6; }
9113 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
9114 ;;
9115 esac
9116
9117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
9118 $as_echo "${lt_sysroot:-no}" >&6; }
9119
9120
9121
9122
9123
9124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
9125 $as_echo_n "checking for a working dd... " >&6; }
9126 if ${ac_cv_path_lt_DD+:} false; then :
9127 $as_echo_n "(cached) " >&6
9128 else
9129 printf 0123456789abcdef0123456789abcdef >conftest.i
9130 cat conftest.i conftest.i >conftest2.i
9131 : ${lt_DD:=$DD}
9132 if test -z "$lt_DD"; then
9133 ac_path_lt_DD_found=false
9134 # Loop through the user's path and test for each of PROGNAME-LIST
9135 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9136 for as_dir in $PATH
9137 do
9138 IFS=$as_save_IFS
9139 test -z "$as_dir" && as_dir=.
9140 for ac_prog in dd; do
9141 for ac_exec_ext in '' $ac_executable_extensions; do
9142 ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
9143 as_fn_executable_p "$ac_path_lt_DD" || continue
9144 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9145 cmp -s conftest.i conftest.out \
9146 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
9147 fi
9148 $ac_path_lt_DD_found && break 3
9149 done
9150 done
9151 done
9152 IFS=$as_save_IFS
9153 if test -z "$ac_cv_path_lt_DD"; then
9154 :
9155 fi
9156 else
9157 ac_cv_path_lt_DD=$lt_DD
9158 fi
9159
9160 rm -f conftest.i conftest2.i conftest.out
9161 fi
9162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
9163 $as_echo "$ac_cv_path_lt_DD" >&6; }
9164
9165
9166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
9167 $as_echo_n "checking how to truncate binary pipes... " >&6; }
9168 if ${lt_cv_truncate_bin+:} false; then :
9169 $as_echo_n "(cached) " >&6
9170 else
9171 printf 0123456789abcdef0123456789abcdef >conftest.i
9172 cat conftest.i conftest.i >conftest2.i
9173 lt_cv_truncate_bin=
9174 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9175 cmp -s conftest.i conftest.out \
9176 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
9177 fi
9178 rm -f conftest.i conftest2.i conftest.out
9179 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
9180 fi
9181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
9182 $as_echo "$lt_cv_truncate_bin" >&6; }
9183
9184
9185
9186
9187
9188
9189
9190 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
9191 func_cc_basename ()
9192 {
9193 for cc_temp in $*""; do
9194 case $cc_temp in
9195 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9196 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9197 \-*) ;;
9198 *) break;;
9199 esac
9200 done
9201 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9202 }
9203
9204 # Check whether --enable-libtool-lock was given.
9205 if test "${enable_libtool_lock+set}" = set; then :
9206 enableval=$enable_libtool_lock;
9207 fi
9208
9209 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
9210
9211 # Some flags need to be propagated to the compiler or linker for good
9212 # libtool support.
9213 case $host in
9214 ia64-*-hpux*)
9215 # Find out what ABI is being produced by ac_compile, and set mode
9216 # options accordingly.
9217 echo 'int i;' > conftest.$ac_ext
9218 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9219 (eval $ac_compile) 2>&5
9220 ac_status=$?
9221 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9222 test $ac_status = 0; }; then
9223 case `/usr/bin/file conftest.$ac_objext` in
9224 *ELF-32*)
9225 HPUX_IA64_MODE=32
9226 ;;
9227 *ELF-64*)
9228 HPUX_IA64_MODE=64
9229 ;;
9230 esac
9231 fi
9232 rm -rf conftest*
9233 ;;
9234 *-*-irix6*)
9235 # Find out what ABI is being produced by ac_compile, and set linker
9236 # options accordingly.
9237 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9238 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9239 (eval $ac_compile) 2>&5
9240 ac_status=$?
9241 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9242 test $ac_status = 0; }; then
9243 if test yes = "$lt_cv_prog_gnu_ld"; then
9244 case `/usr/bin/file conftest.$ac_objext` in
9245 *32-bit*)
9246 LD="${LD-ld} -melf32bsmip"
9247 ;;
9248 *N32*)
9249 LD="${LD-ld} -melf32bmipn32"
9250 ;;
9251 *64-bit*)
9252 LD="${LD-ld} -melf64bmip"
9253 ;;
9254 esac
9255 else
9256 case `/usr/bin/file conftest.$ac_objext` in
9257 *32-bit*)
9258 LD="${LD-ld} -32"
9259 ;;
9260 *N32*)
9261 LD="${LD-ld} -n32"
9262 ;;
9263 *64-bit*)
9264 LD="${LD-ld} -64"
9265 ;;
9266 esac
9267 fi
9268 fi
9269 rm -rf conftest*
9270 ;;
9271
9272 mips64*-*linux*)
9273 # Find out what ABI is being produced by ac_compile, and set linker
9274 # options accordingly.
9275 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9276 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9277 (eval $ac_compile) 2>&5
9278 ac_status=$?
9279 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9280 test $ac_status = 0; }; then
9281 emul=elf
9282 case `/usr/bin/file conftest.$ac_objext` in
9283 *32-bit*)
9284 emul="${emul}32"
9285 ;;
9286 *64-bit*)
9287 emul="${emul}64"
9288 ;;
9289 esac
9290 case `/usr/bin/file conftest.$ac_objext` in
9291 *MSB*)
9292 emul="${emul}btsmip"
9293 ;;
9294 *LSB*)
9295 emul="${emul}ltsmip"
9296 ;;
9297 esac
9298 case `/usr/bin/file conftest.$ac_objext` in
9299 *N32*)
9300 emul="${emul}n32"
9301 ;;
9302 esac
9303 LD="${LD-ld} -m $emul"
9304 fi
9305 rm -rf conftest*
9306 ;;
9307
9308 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9309 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9310 # Find out what ABI is being produced by ac_compile, and set linker
9311 # options accordingly. Note that the listed cases only cover the
9312 # situations where additional linker options are needed (such as when
9313 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9314 # vice versa); the common cases where no linker options are needed do
9315 # not appear in the list.
9316 echo 'int i;' > conftest.$ac_ext
9317 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9318 (eval $ac_compile) 2>&5
9319 ac_status=$?
9320 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9321 test $ac_status = 0; }; then
9322 case `/usr/bin/file conftest.o` in
9323 *32-bit*)
9324 case $host in
9325 x86_64-*kfreebsd*-gnu)
9326 LD="${LD-ld} -m elf_i386_fbsd"
9327 ;;
9328 x86_64-*linux*)
9329 case `/usr/bin/file conftest.o` in
9330 *x86-64*)
9331 LD="${LD-ld} -m elf32_x86_64"
9332 ;;
9333 *)
9334 LD="${LD-ld} -m elf_i386"
9335 ;;
9336 esac
9337 ;;
9338 powerpc64le-*linux*)
9339 LD="${LD-ld} -m elf32lppclinux"
9340 ;;
9341 powerpc64-*linux*)
9342 LD="${LD-ld} -m elf32ppclinux"
9343 ;;
9344 s390x-*linux*)
9345 LD="${LD-ld} -m elf_s390"
9346 ;;
9347 sparc64-*linux*)
9348 LD="${LD-ld} -m elf32_sparc"
9349 ;;
9350 esac
9351 ;;
9352 *64-bit*)
9353 case $host in
9354 x86_64-*kfreebsd*-gnu)
9355 LD="${LD-ld} -m elf_x86_64_fbsd"
9356 ;;
9357 x86_64-*linux*)
9358 LD="${LD-ld} -m elf_x86_64"
9359 ;;
9360 powerpcle-*linux*)
9361 LD="${LD-ld} -m elf64lppc"
9362 ;;
9363 powerpc-*linux*)
9364 LD="${LD-ld} -m elf64ppc"
9365 ;;
9366 s390*-*linux*|s390*-*tpf*)
9367 LD="${LD-ld} -m elf64_s390"
9368 ;;
9369 sparc*-*linux*)
9370 LD="${LD-ld} -m elf64_sparc"
9371 ;;
9372 esac
9373 ;;
9374 esac
9375 fi
9376 rm -rf conftest*
9377 ;;
9378
9379 *-*-sco3.2v5*)
9380 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9381 SAVE_CFLAGS=$CFLAGS
9382 CFLAGS="$CFLAGS -belf"
9383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9384 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
9385 if ${lt_cv_cc_needs_belf+:} false; then :
9386 $as_echo_n "(cached) " >&6
9387 else
9388 ac_ext=c
9389 ac_cpp='$CPP $CPPFLAGS'
9390 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9391 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9392 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9393
9394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9395 /* end confdefs.h. */
9396
9397 int
9398 main ()
9399 {
9400
9401 ;
9402 return 0;
9403 }
9404 _ACEOF
9405 if ac_fn_c_try_link "$LINENO"; then :
9406 lt_cv_cc_needs_belf=yes
9407 else
9408 lt_cv_cc_needs_belf=no
9409 fi
9410 rm -f core conftest.err conftest.$ac_objext \
9411 conftest$ac_exeext conftest.$ac_ext
9412 ac_ext=c
9413 ac_cpp='$CPP $CPPFLAGS'
9414 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9415 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9416 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9417
9418 fi
9419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9420 $as_echo "$lt_cv_cc_needs_belf" >&6; }
9421 if test yes != "$lt_cv_cc_needs_belf"; then
9422 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9423 CFLAGS=$SAVE_CFLAGS
9424 fi
9425 ;;
9426 *-*solaris*)
9427 # Find out what ABI is being produced by ac_compile, and set linker
9428 # options accordingly.
9429 echo 'int i;' > conftest.$ac_ext
9430 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9431 (eval $ac_compile) 2>&5
9432 ac_status=$?
9433 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9434 test $ac_status = 0; }; then
9435 case `/usr/bin/file conftest.o` in
9436 *64-bit*)
9437 case $lt_cv_prog_gnu_ld in
9438 yes*)
9439 case $host in
9440 i?86-*-solaris*|x86_64-*-solaris*)
9441 LD="${LD-ld} -m elf_x86_64"
9442 ;;
9443 sparc*-*-solaris*)
9444 LD="${LD-ld} -m elf64_sparc"
9445 ;;
9446 esac
9447 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
9448 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9449 LD=${LD-ld}_sol2
9450 fi
9451 ;;
9452 *)
9453 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9454 LD="${LD-ld} -64"
9455 fi
9456 ;;
9457 esac
9458 ;;
9459 esac
9460 fi
9461 rm -rf conftest*
9462 ;;
9463 esac
9464
9465 need_locks=$enable_libtool_lock
9466
9467 if test -n "$ac_tool_prefix"; then
9468 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9469 set dummy ${ac_tool_prefix}mt; ac_word=$2
9470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9471 $as_echo_n "checking for $ac_word... " >&6; }
9472 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9473 $as_echo_n "(cached) " >&6
9474 else
9475 if test -n "$MANIFEST_TOOL"; then
9476 ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9477 else
9478 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9479 for as_dir in $PATH
9480 do
9481 IFS=$as_save_IFS
9482 test -z "$as_dir" && as_dir=.
9483 for ac_exec_ext in '' $ac_executable_extensions; do
9484 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9485 ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9486 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9487 break 2
9488 fi
9489 done
9490 done
9491 IFS=$as_save_IFS
9492
9493 fi
9494 fi
9495 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9496 if test -n "$MANIFEST_TOOL"; then
9497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9498 $as_echo "$MANIFEST_TOOL" >&6; }
9499 else
9500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9501 $as_echo "no" >&6; }
9502 fi
9503
9504
9505 fi
9506 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9507 ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9508 # Extract the first word of "mt", so it can be a program name with args.
9509 set dummy mt; ac_word=$2
9510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9511 $as_echo_n "checking for $ac_word... " >&6; }
9512 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9513 $as_echo_n "(cached) " >&6
9514 else
9515 if test -n "$ac_ct_MANIFEST_TOOL"; then
9516 ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9517 else
9518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9519 for as_dir in $PATH
9520 do
9521 IFS=$as_save_IFS
9522 test -z "$as_dir" && as_dir=.
9523 for ac_exec_ext in '' $ac_executable_extensions; do
9524 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9525 ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9526 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9527 break 2
9528 fi
9529 done
9530 done
9531 IFS=$as_save_IFS
9532
9533 fi
9534 fi
9535 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9536 if test -n "$ac_ct_MANIFEST_TOOL"; then
9537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9538 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9539 else
9540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9541 $as_echo "no" >&6; }
9542 fi
9543
9544 if test "x$ac_ct_MANIFEST_TOOL" = x; then
9545 MANIFEST_TOOL=":"
9546 else
9547 case $cross_compiling:$ac_tool_warned in
9548 yes:)
9549 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9550 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9551 ac_tool_warned=yes ;;
9552 esac
9553 MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9554 fi
9555 else
9556 MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9557 fi
9558
9559 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9561 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9562 if ${lt_cv_path_mainfest_tool+:} false; then :
9563 $as_echo_n "(cached) " >&6
9564 else
9565 lt_cv_path_mainfest_tool=no
9566 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9567 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9568 cat conftest.err >&5
9569 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9570 lt_cv_path_mainfest_tool=yes
9571 fi
9572 rm -f conftest*
9573 fi
9574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9575 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
9576 if test yes != "$lt_cv_path_mainfest_tool"; then
9577 MANIFEST_TOOL=:
9578 fi
9579
9580
9581
9582
9583
9584
9585 case $host_os in
9586 rhapsody* | darwin*)
9587 if test -n "$ac_tool_prefix"; then
9588 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9589 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9591 $as_echo_n "checking for $ac_word... " >&6; }
9592 if ${ac_cv_prog_DSYMUTIL+:} false; then :
9593 $as_echo_n "(cached) " >&6
9594 else
9595 if test -n "$DSYMUTIL"; then
9596 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9597 else
9598 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9599 for as_dir in $PATH
9600 do
9601 IFS=$as_save_IFS
9602 test -z "$as_dir" && as_dir=.
9603 for ac_exec_ext in '' $ac_executable_extensions; do
9604 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9605 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9606 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9607 break 2
9608 fi
9609 done
9610 done
9611 IFS=$as_save_IFS
9612
9613 fi
9614 fi
9615 DSYMUTIL=$ac_cv_prog_DSYMUTIL
9616 if test -n "$DSYMUTIL"; then
9617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9618 $as_echo "$DSYMUTIL" >&6; }
9619 else
9620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9621 $as_echo "no" >&6; }
9622 fi
9623
9624
9625 fi
9626 if test -z "$ac_cv_prog_DSYMUTIL"; then
9627 ac_ct_DSYMUTIL=$DSYMUTIL
9628 # Extract the first word of "dsymutil", so it can be a program name with args.
9629 set dummy dsymutil; ac_word=$2
9630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9631 $as_echo_n "checking for $ac_word... " >&6; }
9632 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9633 $as_echo_n "(cached) " >&6
9634 else
9635 if test -n "$ac_ct_DSYMUTIL"; then
9636 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9637 else
9638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9639 for as_dir in $PATH
9640 do
9641 IFS=$as_save_IFS
9642 test -z "$as_dir" && as_dir=.
9643 for ac_exec_ext in '' $ac_executable_extensions; do
9644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9645 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9646 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9647 break 2
9648 fi
9649 done
9650 done
9651 IFS=$as_save_IFS
9652
9653 fi
9654 fi
9655 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9656 if test -n "$ac_ct_DSYMUTIL"; then
9657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9658 $as_echo "$ac_ct_DSYMUTIL" >&6; }
9659 else
9660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9661 $as_echo "no" >&6; }
9662 fi
9663
9664 if test "x$ac_ct_DSYMUTIL" = x; then
9665 DSYMUTIL=":"
9666 else
9667 case $cross_compiling:$ac_tool_warned in
9668 yes:)
9669 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9670 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9671 ac_tool_warned=yes ;;
9672 esac
9673 DSYMUTIL=$ac_ct_DSYMUTIL
9674 fi
9675 else
9676 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9677 fi
9678
9679 if test -n "$ac_tool_prefix"; then
9680 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9681 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9683 $as_echo_n "checking for $ac_word... " >&6; }
9684 if ${ac_cv_prog_NMEDIT+:} false; then :
9685 $as_echo_n "(cached) " >&6
9686 else
9687 if test -n "$NMEDIT"; then
9688 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9689 else
9690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9691 for as_dir in $PATH
9692 do
9693 IFS=$as_save_IFS
9694 test -z "$as_dir" && as_dir=.
9695 for ac_exec_ext in '' $ac_executable_extensions; do
9696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9697 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9699 break 2
9700 fi
9701 done
9702 done
9703 IFS=$as_save_IFS
9704
9705 fi
9706 fi
9707 NMEDIT=$ac_cv_prog_NMEDIT
9708 if test -n "$NMEDIT"; then
9709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9710 $as_echo "$NMEDIT" >&6; }
9711 else
9712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9713 $as_echo "no" >&6; }
9714 fi
9715
9716
9717 fi
9718 if test -z "$ac_cv_prog_NMEDIT"; then
9719 ac_ct_NMEDIT=$NMEDIT
9720 # Extract the first word of "nmedit", so it can be a program name with args.
9721 set dummy nmedit; ac_word=$2
9722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9723 $as_echo_n "checking for $ac_word... " >&6; }
9724 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9725 $as_echo_n "(cached) " >&6
9726 else
9727 if test -n "$ac_ct_NMEDIT"; then
9728 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9729 else
9730 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9731 for as_dir in $PATH
9732 do
9733 IFS=$as_save_IFS
9734 test -z "$as_dir" && as_dir=.
9735 for ac_exec_ext in '' $ac_executable_extensions; do
9736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9737 ac_cv_prog_ac_ct_NMEDIT="nmedit"
9738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9739 break 2
9740 fi
9741 done
9742 done
9743 IFS=$as_save_IFS
9744
9745 fi
9746 fi
9747 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9748 if test -n "$ac_ct_NMEDIT"; then
9749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9750 $as_echo "$ac_ct_NMEDIT" >&6; }
9751 else
9752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9753 $as_echo "no" >&6; }
9754 fi
9755
9756 if test "x$ac_ct_NMEDIT" = x; then
9757 NMEDIT=":"
9758 else
9759 case $cross_compiling:$ac_tool_warned in
9760 yes:)
9761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9762 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9763 ac_tool_warned=yes ;;
9764 esac
9765 NMEDIT=$ac_ct_NMEDIT
9766 fi
9767 else
9768 NMEDIT="$ac_cv_prog_NMEDIT"
9769 fi
9770
9771 if test -n "$ac_tool_prefix"; then
9772 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9773 set dummy ${ac_tool_prefix}lipo; ac_word=$2
9774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9775 $as_echo_n "checking for $ac_word... " >&6; }
9776 if ${ac_cv_prog_LIPO+:} false; then :
9777 $as_echo_n "(cached) " >&6
9778 else
9779 if test -n "$LIPO"; then
9780 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9781 else
9782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9783 for as_dir in $PATH
9784 do
9785 IFS=$as_save_IFS
9786 test -z "$as_dir" && as_dir=.
9787 for ac_exec_ext in '' $ac_executable_extensions; do
9788 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9789 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9791 break 2
9792 fi
9793 done
9794 done
9795 IFS=$as_save_IFS
9796
9797 fi
9798 fi
9799 LIPO=$ac_cv_prog_LIPO
9800 if test -n "$LIPO"; then
9801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9802 $as_echo "$LIPO" >&6; }
9803 else
9804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9805 $as_echo "no" >&6; }
9806 fi
9807
9808
9809 fi
9810 if test -z "$ac_cv_prog_LIPO"; then
9811 ac_ct_LIPO=$LIPO
9812 # Extract the first word of "lipo", so it can be a program name with args.
9813 set dummy lipo; ac_word=$2
9814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9815 $as_echo_n "checking for $ac_word... " >&6; }
9816 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9817 $as_echo_n "(cached) " >&6
9818 else
9819 if test -n "$ac_ct_LIPO"; then
9820 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9821 else
9822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9823 for as_dir in $PATH
9824 do
9825 IFS=$as_save_IFS
9826 test -z "$as_dir" && as_dir=.
9827 for ac_exec_ext in '' $ac_executable_extensions; do
9828 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9829 ac_cv_prog_ac_ct_LIPO="lipo"
9830 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9831 break 2
9832 fi
9833 done
9834 done
9835 IFS=$as_save_IFS
9836
9837 fi
9838 fi
9839 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9840 if test -n "$ac_ct_LIPO"; then
9841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9842 $as_echo "$ac_ct_LIPO" >&6; }
9843 else
9844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9845 $as_echo "no" >&6; }
9846 fi
9847
9848 if test "x$ac_ct_LIPO" = x; then
9849 LIPO=":"
9850 else
9851 case $cross_compiling:$ac_tool_warned in
9852 yes:)
9853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9854 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9855 ac_tool_warned=yes ;;
9856 esac
9857 LIPO=$ac_ct_LIPO
9858 fi
9859 else
9860 LIPO="$ac_cv_prog_LIPO"
9861 fi
9862
9863 if test -n "$ac_tool_prefix"; then
9864 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9865 set dummy ${ac_tool_prefix}otool; ac_word=$2
9866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9867 $as_echo_n "checking for $ac_word... " >&6; }
9868 if ${ac_cv_prog_OTOOL+:} false; then :
9869 $as_echo_n "(cached) " >&6
9870 else
9871 if test -n "$OTOOL"; then
9872 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9873 else
9874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9875 for as_dir in $PATH
9876 do
9877 IFS=$as_save_IFS
9878 test -z "$as_dir" && as_dir=.
9879 for ac_exec_ext in '' $ac_executable_extensions; do
9880 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9881 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9883 break 2
9884 fi
9885 done
9886 done
9887 IFS=$as_save_IFS
9888
9889 fi
9890 fi
9891 OTOOL=$ac_cv_prog_OTOOL
9892 if test -n "$OTOOL"; then
9893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9894 $as_echo "$OTOOL" >&6; }
9895 else
9896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9897 $as_echo "no" >&6; }
9898 fi
9899
9900
9901 fi
9902 if test -z "$ac_cv_prog_OTOOL"; then
9903 ac_ct_OTOOL=$OTOOL
9904 # Extract the first word of "otool", so it can be a program name with args.
9905 set dummy otool; ac_word=$2
9906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9907 $as_echo_n "checking for $ac_word... " >&6; }
9908 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9909 $as_echo_n "(cached) " >&6
9910 else
9911 if test -n "$ac_ct_OTOOL"; then
9912 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
9913 else
9914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9915 for as_dir in $PATH
9916 do
9917 IFS=$as_save_IFS
9918 test -z "$as_dir" && as_dir=.
9919 for ac_exec_ext in '' $ac_executable_extensions; do
9920 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9921 ac_cv_prog_ac_ct_OTOOL="otool"
9922 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9923 break 2
9924 fi
9925 done
9926 done
9927 IFS=$as_save_IFS
9928
9929 fi
9930 fi
9931 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
9932 if test -n "$ac_ct_OTOOL"; then
9933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
9934 $as_echo "$ac_ct_OTOOL" >&6; }
9935 else
9936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9937 $as_echo "no" >&6; }
9938 fi
9939
9940 if test "x$ac_ct_OTOOL" = x; then
9941 OTOOL=":"
9942 else
9943 case $cross_compiling:$ac_tool_warned in
9944 yes:)
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9946 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9947 ac_tool_warned=yes ;;
9948 esac
9949 OTOOL=$ac_ct_OTOOL
9950 fi
9951 else
9952 OTOOL="$ac_cv_prog_OTOOL"
9953 fi
9954
9955 if test -n "$ac_tool_prefix"; then
9956 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
9957 set dummy ${ac_tool_prefix}otool64; ac_word=$2
9958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9959 $as_echo_n "checking for $ac_word... " >&6; }
9960 if ${ac_cv_prog_OTOOL64+:} false; then :
9961 $as_echo_n "(cached) " >&6
9962 else
9963 if test -n "$OTOOL64"; then
9964 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
9965 else
9966 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9967 for as_dir in $PATH
9968 do
9969 IFS=$as_save_IFS
9970 test -z "$as_dir" && as_dir=.
9971 for ac_exec_ext in '' $ac_executable_extensions; do
9972 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9973 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
9974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9975 break 2
9976 fi
9977 done
9978 done
9979 IFS=$as_save_IFS
9980
9981 fi
9982 fi
9983 OTOOL64=$ac_cv_prog_OTOOL64
9984 if test -n "$OTOOL64"; then
9985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
9986 $as_echo "$OTOOL64" >&6; }
9987 else
9988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9989 $as_echo "no" >&6; }
9990 fi
9991
9992
9993 fi
9994 if test -z "$ac_cv_prog_OTOOL64"; then
9995 ac_ct_OTOOL64=$OTOOL64
9996 # Extract the first word of "otool64", so it can be a program name with args.
9997 set dummy otool64; ac_word=$2
9998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9999 $as_echo_n "checking for $ac_word... " >&6; }
10000 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
10001 $as_echo_n "(cached) " >&6
10002 else
10003 if test -n "$ac_ct_OTOOL64"; then
10004 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
10005 else
10006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10007 for as_dir in $PATH
10008 do
10009 IFS=$as_save_IFS
10010 test -z "$as_dir" && as_dir=.
10011 for ac_exec_ext in '' $ac_executable_extensions; do
10012 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10013 ac_cv_prog_ac_ct_OTOOL64="otool64"
10014 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10015 break 2
10016 fi
10017 done
10018 done
10019 IFS=$as_save_IFS
10020
10021 fi
10022 fi
10023 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
10024 if test -n "$ac_ct_OTOOL64"; then
10025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
10026 $as_echo "$ac_ct_OTOOL64" >&6; }
10027 else
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10029 $as_echo "no" >&6; }
10030 fi
10031
10032 if test "x$ac_ct_OTOOL64" = x; then
10033 OTOOL64=":"
10034 else
10035 case $cross_compiling:$ac_tool_warned in
10036 yes:)
10037 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10038 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10039 ac_tool_warned=yes ;;
10040 esac
10041 OTOOL64=$ac_ct_OTOOL64
10042 fi
10043 else
10044 OTOOL64="$ac_cv_prog_OTOOL64"
10045 fi
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
10074 $as_echo_n "checking for -single_module linker flag... " >&6; }
10075 if ${lt_cv_apple_cc_single_mod+:} false; then :
10076 $as_echo_n "(cached) " >&6
10077 else
10078 lt_cv_apple_cc_single_mod=no
10079 if test -z "$LT_MULTI_MODULE"; then
10080 # By default we will add the -single_module flag. You can override
10081 # by either setting the environment variable LT_MULTI_MODULE
10082 # non-empty at configure time, or by adding -multi_module to the
10083 # link flags.
10084 rm -rf libconftest.dylib*
10085 echo "int foo(void){return 1;}" > conftest.c
10086 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10087 -dynamiclib -Wl,-single_module conftest.c" >&5
10088 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10089 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10090 _lt_result=$?
10091 # If there is a non-empty error log, and "single_module"
10092 # appears in it, assume the flag caused a linker warning
10093 if test -s conftest.err && $GREP single_module conftest.err; then
10094 cat conftest.err >&5
10095 # Otherwise, if the output was created with a 0 exit code from
10096 # the compiler, it worked.
10097 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10098 lt_cv_apple_cc_single_mod=yes
10099 else
10100 cat conftest.err >&5
10101 fi
10102 rm -rf libconftest.dylib*
10103 rm -f conftest.*
10104 fi
10105 fi
10106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
10107 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
10108
10109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
10110 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
10111 if ${lt_cv_ld_exported_symbols_list+:} false; then :
10112 $as_echo_n "(cached) " >&6
10113 else
10114 lt_cv_ld_exported_symbols_list=no
10115 save_LDFLAGS=$LDFLAGS
10116 echo "_main" > conftest.sym
10117 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10119 /* end confdefs.h. */
10120
10121 int
10122 main ()
10123 {
10124
10125 ;
10126 return 0;
10127 }
10128 _ACEOF
10129 if ac_fn_c_try_link "$LINENO"; then :
10130 lt_cv_ld_exported_symbols_list=yes
10131 else
10132 lt_cv_ld_exported_symbols_list=no
10133 fi
10134 rm -f core conftest.err conftest.$ac_objext \
10135 conftest$ac_exeext conftest.$ac_ext
10136 LDFLAGS=$save_LDFLAGS
10137
10138 fi
10139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
10140 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
10141
10142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
10143 $as_echo_n "checking for -force_load linker flag... " >&6; }
10144 if ${lt_cv_ld_force_load+:} false; then :
10145 $as_echo_n "(cached) " >&6
10146 else
10147 lt_cv_ld_force_load=no
10148 cat > conftest.c << _LT_EOF
10149 int forced_loaded() { return 2;}
10150 _LT_EOF
10151 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
10152 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
10153 echo "$AR cru libconftest.a conftest.o" >&5
10154 $AR cru libconftest.a conftest.o 2>&5
10155 echo "$RANLIB libconftest.a" >&5
10156 $RANLIB libconftest.a 2>&5
10157 cat > conftest.c << _LT_EOF
10158 int main() { return 0;}
10159 _LT_EOF
10160 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
10161 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10162 _lt_result=$?
10163 if test -s conftest.err && $GREP force_load conftest.err; then
10164 cat conftest.err >&5
10165 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10166 lt_cv_ld_force_load=yes
10167 else
10168 cat conftest.err >&5
10169 fi
10170 rm -f conftest.err libconftest.a conftest conftest.c
10171 rm -rf conftest.dSYM
10172
10173 fi
10174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
10175 $as_echo "$lt_cv_ld_force_load" >&6; }
10176 case $host_os in
10177 rhapsody* | darwin1.[012])
10178 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10179 darwin1.*)
10180 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10181 darwin*) # darwin 5.x on
10182 # if running on 10.5 or later, the deployment target defaults
10183 # to the OS version, if on x86, and 10.4, the deployment
10184 # target defaults to 10.4. Don't you love it?
10185 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10186 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
10187 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10188 10.[012][,.]*)
10189 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10190 10.*)
10191 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10192 esac
10193 ;;
10194 esac
10195 if test yes = "$lt_cv_apple_cc_single_mod"; then
10196 _lt_dar_single_mod='$single_module'
10197 fi
10198 if test yes = "$lt_cv_ld_exported_symbols_list"; then
10199 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10200 else
10201 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10202 fi
10203 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10204 _lt_dsymutil='~$DSYMUTIL $lib || :'
10205 else
10206 _lt_dsymutil=
10207 fi
10208 ;;
10209 esac
10210
10211 # func_munge_path_list VARIABLE PATH
10212 # -----------------------------------
10213 # VARIABLE is name of variable containing _space_ separated list of
10214 # directories to be munged by the contents of PATH, which is string
10215 # having a format:
10216 # "DIR[:DIR]:"
10217 # string "DIR[ DIR]" will be prepended to VARIABLE
10218 # ":DIR[:DIR]"
10219 # string "DIR[ DIR]" will be appended to VARIABLE
10220 # "DIRP[:DIRP]::[DIRA:]DIRA"
10221 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
10222 # "DIRA[ DIRA]" will be appended to VARIABLE
10223 # "DIR[:DIR]"
10224 # VARIABLE will be replaced by "DIR[ DIR]"
10225 func_munge_path_list ()
10226 {
10227 case x$2 in
10228 x)
10229 ;;
10230 *:)
10231 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10232 ;;
10233 x:*)
10234 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10235 ;;
10236 *::*)
10237 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10238 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10239 ;;
10240 *)
10241 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10242 ;;
10243 esac
10244 }
10245
10246 for ac_header in dlfcn.h
10247 do :
10248 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10249 "
10250 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
10251 cat >>confdefs.h <<_ACEOF
10252 #define HAVE_DLFCN_H 1
10253 _ACEOF
10254
10255 fi
10256
10257 done
10258
10259
10260
10261
10262
10263
10264
10265 # Set options
10266
10267
10268
10269 enable_dlopen=no
10270
10271
10272 enable_win32_dll=no
10273
10274
10275 # Check whether --enable-shared was given.
10276 if test "${enable_shared+set}" = set; then :
10277 enableval=$enable_shared; p=${PACKAGE-default}
10278 case $enableval in
10279 yes) enable_shared=yes ;;
10280 no) enable_shared=no ;;
10281 *)
10282 enable_shared=no
10283 # Look at the argument we got. We use all the common list separators.
10284 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10285 for pkg in $enableval; do
10286 IFS=$lt_save_ifs
10287 if test "X$pkg" = "X$p"; then
10288 enable_shared=yes
10289 fi
10290 done
10291 IFS=$lt_save_ifs
10292 ;;
10293 esac
10294 else
10295 enable_shared=yes
10296 fi
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306 # Check whether --enable-static was given.
10307 if test "${enable_static+set}" = set; then :
10308 enableval=$enable_static; p=${PACKAGE-default}
10309 case $enableval in
10310 yes) enable_static=yes ;;
10311 no) enable_static=no ;;
10312 *)
10313 enable_static=no
10314 # Look at the argument we got. We use all the common list separators.
10315 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10316 for pkg in $enableval; do
10317 IFS=$lt_save_ifs
10318 if test "X$pkg" = "X$p"; then
10319 enable_static=yes
10320 fi
10321 done
10322 IFS=$lt_save_ifs
10323 ;;
10324 esac
10325 else
10326 enable_static=yes
10327 fi
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338 # Check whether --with-pic was given.
10339 if test "${with_pic+set}" = set; then :
10340 withval=$with_pic; lt_p=${PACKAGE-default}
10341 case $withval in
10342 yes|no) pic_mode=$withval ;;
10343 *)
10344 pic_mode=default
10345 # Look at the argument we got. We use all the common list separators.
10346 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10347 for lt_pkg in $withval; do
10348 IFS=$lt_save_ifs
10349 if test "X$lt_pkg" = "X$lt_p"; then
10350 pic_mode=yes
10351 fi
10352 done
10353 IFS=$lt_save_ifs
10354 ;;
10355 esac
10356 else
10357 pic_mode=default
10358 fi
10359
10360
10361
10362
10363
10364
10365
10366
10367 # Check whether --enable-fast-install was given.
10368 if test "${enable_fast_install+set}" = set; then :
10369 enableval=$enable_fast_install; p=${PACKAGE-default}
10370 case $enableval in
10371 yes) enable_fast_install=yes ;;
10372 no) enable_fast_install=no ;;
10373 *)
10374 enable_fast_install=no
10375 # Look at the argument we got. We use all the common list separators.
10376 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10377 for pkg in $enableval; do
10378 IFS=$lt_save_ifs
10379 if test "X$pkg" = "X$p"; then
10380 enable_fast_install=yes
10381 fi
10382 done
10383 IFS=$lt_save_ifs
10384 ;;
10385 esac
10386 else
10387 enable_fast_install=yes
10388 fi
10389
10390
10391
10392
10393
10394
10395
10396
10397 shared_archive_member_spec=
10398 case $host,$enable_shared in
10399 power*-*-aix[5-9]*,yes)
10400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10401 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
10402
10403 # Check whether --with-aix-soname was given.
10404 if test "${with_aix_soname+set}" = set; then :
10405 withval=$with_aix_soname; case $withval in
10406 aix|svr4|both)
10407 ;;
10408 *)
10409 as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10410 ;;
10411 esac
10412 lt_cv_with_aix_soname=$with_aix_soname
10413 else
10414 if ${lt_cv_with_aix_soname+:} false; then :
10415 $as_echo_n "(cached) " >&6
10416 else
10417 lt_cv_with_aix_soname=aix
10418 fi
10419
10420 with_aix_soname=$lt_cv_with_aix_soname
10421 fi
10422
10423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10424 $as_echo "$with_aix_soname" >&6; }
10425 if test aix != "$with_aix_soname"; then
10426 # For the AIX way of multilib, we name the shared archive member
10427 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10428 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10429 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10430 # the AIX toolchain works better with OBJECT_MODE set (default 32).
10431 if test 64 = "${OBJECT_MODE-32}"; then
10432 shared_archive_member_spec=shr_64
10433 else
10434 shared_archive_member_spec=shr
10435 fi
10436 fi
10437 ;;
10438 *)
10439 with_aix_soname=aix
10440 ;;
10441 esac
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452 # This can be used to rebuild libtool when needed
10453 LIBTOOL_DEPS=$ltmain
10454
10455 # Always use our own libtool.
10456 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487 test -z "$LN_S" && LN_S="ln -s"
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502 if test -n "${ZSH_VERSION+set}"; then
10503 setopt NO_GLOB_SUBST
10504 fi
10505
10506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10507 $as_echo_n "checking for objdir... " >&6; }
10508 if ${lt_cv_objdir+:} false; then :
10509 $as_echo_n "(cached) " >&6
10510 else
10511 rm -f .libs 2>/dev/null
10512 mkdir .libs 2>/dev/null
10513 if test -d .libs; then
10514 lt_cv_objdir=.libs
10515 else
10516 # MS-DOS does not allow filenames that begin with a dot.
10517 lt_cv_objdir=_libs
10518 fi
10519 rmdir .libs 2>/dev/null
10520 fi
10521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10522 $as_echo "$lt_cv_objdir" >&6; }
10523 objdir=$lt_cv_objdir
10524
10525
10526
10527
10528
10529 cat >>confdefs.h <<_ACEOF
10530 #define LT_OBJDIR "$lt_cv_objdir/"
10531 _ACEOF
10532
10533
10534
10535
10536 case $host_os in
10537 aix3*)
10538 # AIX sometimes has problems with the GCC collect2 program. For some
10539 # reason, if we set the COLLECT_NAMES environment variable, the problems
10540 # vanish in a puff of smoke.
10541 if test set != "${COLLECT_NAMES+set}"; then
10542 COLLECT_NAMES=
10543 export COLLECT_NAMES
10544 fi
10545 ;;
10546 esac
10547
10548 # Global variables:
10549 ofile=libtool
10550 can_build_shared=yes
10551
10552 # All known linkers require a '.a' archive for static linking (except MSVC,
10553 # which needs '.lib').
10554 libext=a
10555
10556 with_gnu_ld=$lt_cv_prog_gnu_ld
10557
10558 old_CC=$CC
10559 old_CFLAGS=$CFLAGS
10560
10561 # Set sane defaults for various variables
10562 test -z "$CC" && CC=cc
10563 test -z "$LTCC" && LTCC=$CC
10564 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10565 test -z "$LD" && LD=ld
10566 test -z "$ac_objext" && ac_objext=o
10567
10568 func_cc_basename $compiler
10569 cc_basename=$func_cc_basename_result
10570
10571
10572 # Only perform the check for file, if the check method requires it
10573 test -z "$MAGIC_CMD" && MAGIC_CMD=file
10574 case $deplibs_check_method in
10575 file_magic*)
10576 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10578 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10579 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10580 $as_echo_n "(cached) " >&6
10581 else
10582 case $MAGIC_CMD in
10583 [\\/*] | ?:[\\/]*)
10584 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10585 ;;
10586 *)
10587 lt_save_MAGIC_CMD=$MAGIC_CMD
10588 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10589 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10590 for ac_dir in $ac_dummy; do
10591 IFS=$lt_save_ifs
10592 test -z "$ac_dir" && ac_dir=.
10593 if test -f "$ac_dir/${ac_tool_prefix}file"; then
10594 lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10595 if test -n "$file_magic_test_file"; then
10596 case $deplibs_check_method in
10597 "file_magic "*)
10598 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10599 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10600 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10601 $EGREP "$file_magic_regex" > /dev/null; then
10602 :
10603 else
10604 cat <<_LT_EOF 1>&2
10605
10606 *** Warning: the command libtool uses to detect shared libraries,
10607 *** $file_magic_cmd, produces output that libtool cannot recognize.
10608 *** The result is that libtool may fail to recognize shared libraries
10609 *** as such. This will affect the creation of libtool libraries that
10610 *** depend on shared libraries, but programs linked with such libtool
10611 *** libraries will work regardless of this problem. Nevertheless, you
10612 *** may want to report the problem to your system manager and/or to
10613 *** bug-libtool (at] gnu.org
10614
10615 _LT_EOF
10616 fi ;;
10617 esac
10618 fi
10619 break
10620 fi
10621 done
10622 IFS=$lt_save_ifs
10623 MAGIC_CMD=$lt_save_MAGIC_CMD
10624 ;;
10625 esac
10626 fi
10627
10628 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10629 if test -n "$MAGIC_CMD"; then
10630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10631 $as_echo "$MAGIC_CMD" >&6; }
10632 else
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10634 $as_echo "no" >&6; }
10635 fi
10636
10637
10638
10639
10640
10641 if test -z "$lt_cv_path_MAGIC_CMD"; then
10642 if test -n "$ac_tool_prefix"; then
10643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10644 $as_echo_n "checking for file... " >&6; }
10645 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10646 $as_echo_n "(cached) " >&6
10647 else
10648 case $MAGIC_CMD in
10649 [\\/*] | ?:[\\/]*)
10650 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10651 ;;
10652 *)
10653 lt_save_MAGIC_CMD=$MAGIC_CMD
10654 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10655 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10656 for ac_dir in $ac_dummy; do
10657 IFS=$lt_save_ifs
10658 test -z "$ac_dir" && ac_dir=.
10659 if test -f "$ac_dir/file"; then
10660 lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10661 if test -n "$file_magic_test_file"; then
10662 case $deplibs_check_method in
10663 "file_magic "*)
10664 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10665 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10666 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10667 $EGREP "$file_magic_regex" > /dev/null; then
10668 :
10669 else
10670 cat <<_LT_EOF 1>&2
10671
10672 *** Warning: the command libtool uses to detect shared libraries,
10673 *** $file_magic_cmd, produces output that libtool cannot recognize.
10674 *** The result is that libtool may fail to recognize shared libraries
10675 *** as such. This will affect the creation of libtool libraries that
10676 *** depend on shared libraries, but programs linked with such libtool
10677 *** libraries will work regardless of this problem. Nevertheless, you
10678 *** may want to report the problem to your system manager and/or to
10679 *** bug-libtool (at] gnu.org
10680
10681 _LT_EOF
10682 fi ;;
10683 esac
10684 fi
10685 break
10686 fi
10687 done
10688 IFS=$lt_save_ifs
10689 MAGIC_CMD=$lt_save_MAGIC_CMD
10690 ;;
10691 esac
10692 fi
10693
10694 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10695 if test -n "$MAGIC_CMD"; then
10696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10697 $as_echo "$MAGIC_CMD" >&6; }
10698 else
10699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10700 $as_echo "no" >&6; }
10701 fi
10702
10703
10704 else
10705 MAGIC_CMD=:
10706 fi
10707 fi
10708
10709 fi
10710 ;;
10711 esac
10712
10713 # Use C for the default configuration in the libtool script
10714
10715 lt_save_CC=$CC
10716 ac_ext=c
10717 ac_cpp='$CPP $CPPFLAGS'
10718 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10719 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10720 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10721
10722
10723 # Source file extension for C test sources.
10724 ac_ext=c
10725
10726 # Object file extension for compiled C test sources.
10727 objext=o
10728 objext=$objext
10729
10730 # Code to be used in simple compile tests
10731 lt_simple_compile_test_code="int some_variable = 0;"
10732
10733 # Code to be used in simple link tests
10734 lt_simple_link_test_code='int main(){return(0);}'
10735
10736
10737
10738
10739
10740
10741
10742 # If no C compiler was specified, use CC.
10743 LTCC=${LTCC-"$CC"}
10744
10745 # If no C compiler flags were specified, use CFLAGS.
10746 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10747
10748 # Allow CC to be a program name with arguments.
10749 compiler=$CC
10750
10751 # Save the default compiler, since it gets overwritten when the other
10752 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10753 compiler_DEFAULT=$CC
10754
10755 # save warnings/boilerplate of simple test code
10756 ac_outfile=conftest.$ac_objext
10757 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10758 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10759 _lt_compiler_boilerplate=`cat conftest.err`
10760 $RM conftest*
10761
10762 ac_outfile=conftest.$ac_objext
10763 echo "$lt_simple_link_test_code" >conftest.$ac_ext
10764 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10765 _lt_linker_boilerplate=`cat conftest.err`
10766 $RM -r conftest*
10767
10768
10769 if test -n "$compiler"; then
10770
10771 lt_prog_compiler_no_builtin_flag=
10772
10773 if test yes = "$GCC"; then
10774 case $cc_basename in
10775 nvcc*)
10776 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10777 *)
10778 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10779 esac
10780
10781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10782 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10783 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10784 $as_echo_n "(cached) " >&6
10785 else
10786 lt_cv_prog_compiler_rtti_exceptions=no
10787 ac_outfile=conftest.$ac_objext
10788 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10789 lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
10790 # Insert the option either (1) after the last *FLAGS variable, or
10791 # (2) before a word containing "conftest.", or (3) at the end.
10792 # Note that $ac_compile itself does not contain backslashes and begins
10793 # with a dollar sign (not a hyphen), so the echo should work correctly.
10794 # The option is referenced via a variable to avoid confusing sed.
10795 lt_compile=`echo "$ac_compile" | $SED \
10796 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10797 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10798 -e 's:$: $lt_compiler_flag:'`
10799 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10800 (eval "$lt_compile" 2>conftest.err)
10801 ac_status=$?
10802 cat conftest.err >&5
10803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10804 if (exit $ac_status) && test -s "$ac_outfile"; then
10805 # The compiler can only warn and ignore the option if not recognized
10806 # So say no if there are warnings other than the usual output.
10807 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10808 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10809 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10810 lt_cv_prog_compiler_rtti_exceptions=yes
10811 fi
10812 fi
10813 $RM conftest*
10814
10815 fi
10816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10817 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10818
10819 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10820 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10821 else
10822 :
10823 fi
10824
10825 fi
10826
10827
10828
10829
10830
10831
10832 lt_prog_compiler_wl=
10833 lt_prog_compiler_pic=
10834 lt_prog_compiler_static=
10835
10836
10837 if test yes = "$GCC"; then
10838 lt_prog_compiler_wl='-Wl,'
10839 lt_prog_compiler_static='-static'
10840
10841 case $host_os in
10842 aix*)
10843 # All AIX code is PIC.
10844 if test ia64 = "$host_cpu"; then
10845 # AIX 5 now supports IA64 processor
10846 lt_prog_compiler_static='-Bstatic'
10847 fi
10848 lt_prog_compiler_pic='-fPIC'
10849 ;;
10850
10851 amigaos*)
10852 case $host_cpu in
10853 powerpc)
10854 # see comment about AmigaOS4 .so support
10855 lt_prog_compiler_pic='-fPIC'
10856 ;;
10857 m68k)
10858 # FIXME: we need at least 68020 code to build shared libraries, but
10859 # adding the '-m68020' flag to GCC prevents building anything better,
10860 # like '-m68040'.
10861 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10862 ;;
10863 esac
10864 ;;
10865
10866 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10867 # PIC is the default for these OSes.
10868 ;;
10869
10870 mingw* | cygwin* | pw32* | os2* | cegcc*)
10871 # This hack is so that the source file can tell whether it is being
10872 # built for inclusion in a dll (and should export symbols for example).
10873 # Although the cygwin gcc ignores -fPIC, still need this for old-style
10874 # (--disable-auto-import) libraries
10875 lt_prog_compiler_pic='-DDLL_EXPORT'
10876 case $host_os in
10877 os2*)
10878 lt_prog_compiler_static='$wl-static'
10879 ;;
10880 esac
10881 ;;
10882
10883 darwin* | rhapsody*)
10884 # PIC is the default on this platform
10885 # Common symbols not allowed in MH_DYLIB files
10886 lt_prog_compiler_pic='-fno-common'
10887 ;;
10888
10889 haiku*)
10890 # PIC is the default for Haiku.
10891 # The "-static" flag exists, but is broken.
10892 lt_prog_compiler_static=
10893 ;;
10894
10895 hpux*)
10896 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10897 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
10898 # sets the default TLS model and affects inlining.
10899 case $host_cpu in
10900 hppa*64*)
10901 # +Z the default
10902 ;;
10903 *)
10904 lt_prog_compiler_pic='-fPIC'
10905 ;;
10906 esac
10907 ;;
10908
10909 interix[3-9]*)
10910 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10911 # Instead, we relocate shared libraries at runtime.
10912 ;;
10913
10914 msdosdjgpp*)
10915 # Just because we use GCC doesn't mean we suddenly get shared libraries
10916 # on systems that don't support them.
10917 lt_prog_compiler_can_build_shared=no
10918 enable_shared=no
10919 ;;
10920
10921 *nto* | *qnx*)
10922 # QNX uses GNU C++, but need to define -shared option too, otherwise
10923 # it will coredump.
10924 lt_prog_compiler_pic='-fPIC -shared'
10925 ;;
10926
10927 sysv4*MP*)
10928 if test -d /usr/nec; then
10929 lt_prog_compiler_pic=-Kconform_pic
10930 fi
10931 ;;
10932
10933 *)
10934 lt_prog_compiler_pic='-fPIC'
10935 ;;
10936 esac
10937
10938 case $cc_basename in
10939 nvcc*) # Cuda Compiler Driver 2.2
10940 lt_prog_compiler_wl='-Xlinker '
10941 if test -n "$lt_prog_compiler_pic"; then
10942 lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
10943 fi
10944 ;;
10945 esac
10946 else
10947 # PORTME Check for flag to pass linker flags through the system compiler.
10948 case $host_os in
10949 aix*)
10950 lt_prog_compiler_wl='-Wl,'
10951 if test ia64 = "$host_cpu"; then
10952 # AIX 5 now supports IA64 processor
10953 lt_prog_compiler_static='-Bstatic'
10954 else
10955 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
10956 fi
10957 ;;
10958
10959 darwin* | rhapsody*)
10960 # PIC is the default on this platform
10961 # Common symbols not allowed in MH_DYLIB files
10962 lt_prog_compiler_pic='-fno-common'
10963 case $cc_basename in
10964 nagfor*)
10965 # NAG Fortran compiler
10966 lt_prog_compiler_wl='-Wl,-Wl,,'
10967 lt_prog_compiler_pic='-PIC'
10968 lt_prog_compiler_static='-Bstatic'
10969 ;;
10970 esac
10971 ;;
10972
10973 mingw* | cygwin* | pw32* | os2* | cegcc*)
10974 # This hack is so that the source file can tell whether it is being
10975 # built for inclusion in a dll (and should export symbols for example).
10976 lt_prog_compiler_pic='-DDLL_EXPORT'
10977 case $host_os in
10978 os2*)
10979 lt_prog_compiler_static='$wl-static'
10980 ;;
10981 esac
10982 ;;
10983
10984 hpux9* | hpux10* | hpux11*)
10985 lt_prog_compiler_wl='-Wl,'
10986 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10987 # not for PA HP-UX.
10988 case $host_cpu in
10989 hppa*64*|ia64*)
10990 # +Z the default
10991 ;;
10992 *)
10993 lt_prog_compiler_pic='+Z'
10994 ;;
10995 esac
10996 # Is there a better lt_prog_compiler_static that works with the bundled CC?
10997 lt_prog_compiler_static='$wl-a ${wl}archive'
10998 ;;
10999
11000 irix5* | irix6* | nonstopux*)
11001 lt_prog_compiler_wl='-Wl,'
11002 # PIC (with -KPIC) is the default.
11003 lt_prog_compiler_static='-non_shared'
11004 ;;
11005
11006 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11007 case $cc_basename in
11008 # old Intel for x86_64, which still supported -KPIC.
11009 ecc*)
11010 lt_prog_compiler_wl='-Wl,'
11011 lt_prog_compiler_pic='-KPIC'
11012 lt_prog_compiler_static='-static'
11013 ;;
11014 # icc used to be incompatible with GCC.
11015 # ICC 10 doesn't accept -KPIC any more.
11016 icc* | ifort*)
11017 lt_prog_compiler_wl='-Wl,'
11018 lt_prog_compiler_pic='-fPIC'
11019 lt_prog_compiler_static='-static'
11020 ;;
11021 # Lahey Fortran 8.1.
11022 lf95*)
11023 lt_prog_compiler_wl='-Wl,'
11024 lt_prog_compiler_pic='--shared'
11025 lt_prog_compiler_static='--static'
11026 ;;
11027 nagfor*)
11028 # NAG Fortran compiler
11029 lt_prog_compiler_wl='-Wl,-Wl,,'
11030 lt_prog_compiler_pic='-PIC'
11031 lt_prog_compiler_static='-Bstatic'
11032 ;;
11033 tcc*)
11034 # Fabrice Bellard et al's Tiny C Compiler
11035 lt_prog_compiler_wl='-Wl,'
11036 lt_prog_compiler_pic='-fPIC'
11037 lt_prog_compiler_static='-static'
11038 ;;
11039 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
11040 # Portland Group compilers (*not* the Pentium gcc compiler,
11041 # which looks to be a dead project)
11042 lt_prog_compiler_wl='-Wl,'
11043 lt_prog_compiler_pic='-fpic'
11044 lt_prog_compiler_static='-Bstatic'
11045 ;;
11046 ccc*)
11047 lt_prog_compiler_wl='-Wl,'
11048 # All Alpha code is PIC.
11049 lt_prog_compiler_static='-non_shared'
11050 ;;
11051 xl* | bgxl* | bgf* | mpixl*)
11052 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
11053 lt_prog_compiler_wl='-Wl,'
11054 lt_prog_compiler_pic='-qpic'
11055 lt_prog_compiler_static='-qstaticlink'
11056 ;;
11057 *)
11058 case `$CC -V 2>&1 | sed 5q` in
11059 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
11060 # Sun Fortran 8.3 passes all unrecognized flags to the linker
11061 lt_prog_compiler_pic='-KPIC'
11062 lt_prog_compiler_static='-Bstatic'
11063 lt_prog_compiler_wl=''
11064 ;;
11065 *Sun\ F* | *Sun*Fortran*)
11066 lt_prog_compiler_pic='-KPIC'
11067 lt_prog_compiler_static='-Bstatic'
11068 lt_prog_compiler_wl='-Qoption ld '
11069 ;;
11070 *Sun\ C*)
11071 # Sun C 5.9
11072 lt_prog_compiler_pic='-KPIC'
11073 lt_prog_compiler_static='-Bstatic'
11074 lt_prog_compiler_wl='-Wl,'
11075 ;;
11076 *Intel*\ [CF]*Compiler*)
11077 lt_prog_compiler_wl='-Wl,'
11078 lt_prog_compiler_pic='-fPIC'
11079 lt_prog_compiler_static='-static'
11080 ;;
11081 *Portland\ Group*)
11082 lt_prog_compiler_wl='-Wl,'
11083 lt_prog_compiler_pic='-fpic'
11084 lt_prog_compiler_static='-Bstatic'
11085 ;;
11086 esac
11087 ;;
11088 esac
11089 ;;
11090
11091 newsos6)
11092 lt_prog_compiler_pic='-KPIC'
11093 lt_prog_compiler_static='-Bstatic'
11094 ;;
11095
11096 *nto* | *qnx*)
11097 # QNX uses GNU C++, but need to define -shared option too, otherwise
11098 # it will coredump.
11099 lt_prog_compiler_pic='-fPIC -shared'
11100 ;;
11101
11102 osf3* | osf4* | osf5*)
11103 lt_prog_compiler_wl='-Wl,'
11104 # All OSF/1 code is PIC.
11105 lt_prog_compiler_static='-non_shared'
11106 ;;
11107
11108 rdos*)
11109 lt_prog_compiler_static='-non_shared'
11110 ;;
11111
11112 solaris*)
11113 lt_prog_compiler_pic='-KPIC'
11114 lt_prog_compiler_static='-Bstatic'
11115 case $cc_basename in
11116 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
11117 lt_prog_compiler_wl='-Qoption ld ';;
11118 *)
11119 lt_prog_compiler_wl='-Wl,';;
11120 esac
11121 ;;
11122
11123 sunos4*)
11124 lt_prog_compiler_wl='-Qoption ld '
11125 lt_prog_compiler_pic='-PIC'
11126 lt_prog_compiler_static='-Bstatic'
11127 ;;
11128
11129 sysv4 | sysv4.2uw2* | sysv4.3*)
11130 lt_prog_compiler_wl='-Wl,'
11131 lt_prog_compiler_pic='-KPIC'
11132 lt_prog_compiler_static='-Bstatic'
11133 ;;
11134
11135 sysv4*MP*)
11136 if test -d /usr/nec; then
11137 lt_prog_compiler_pic='-Kconform_pic'
11138 lt_prog_compiler_static='-Bstatic'
11139 fi
11140 ;;
11141
11142 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11143 lt_prog_compiler_wl='-Wl,'
11144 lt_prog_compiler_pic='-KPIC'
11145 lt_prog_compiler_static='-Bstatic'
11146 ;;
11147
11148 unicos*)
11149 lt_prog_compiler_wl='-Wl,'
11150 lt_prog_compiler_can_build_shared=no
11151 ;;
11152
11153 uts4*)
11154 lt_prog_compiler_pic='-pic'
11155 lt_prog_compiler_static='-Bstatic'
11156 ;;
11157
11158 *)
11159 lt_prog_compiler_can_build_shared=no
11160 ;;
11161 esac
11162 fi
11163
11164 case $host_os in
11165 # For platforms that do not support PIC, -DPIC is meaningless:
11166 *djgpp*)
11167 lt_prog_compiler_pic=
11168 ;;
11169 *)
11170 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11171 ;;
11172 esac
11173
11174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11175 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
11176 if ${lt_cv_prog_compiler_pic+:} false; then :
11177 $as_echo_n "(cached) " >&6
11178 else
11179 lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11180 fi
11181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11182 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
11183 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11184
11185 #
11186 # Check to make sure the PIC flag actually works.
11187 #
11188 if test -n "$lt_prog_compiler_pic"; then
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
11190 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
11191 if ${lt_cv_prog_compiler_pic_works+:} false; then :
11192 $as_echo_n "(cached) " >&6
11193 else
11194 lt_cv_prog_compiler_pic_works=no
11195 ac_outfile=conftest.$ac_objext
11196 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11197 lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
11198 # Insert the option either (1) after the last *FLAGS variable, or
11199 # (2) before a word containing "conftest.", or (3) at the end.
11200 # Note that $ac_compile itself does not contain backslashes and begins
11201 # with a dollar sign (not a hyphen), so the echo should work correctly.
11202 # The option is referenced via a variable to avoid confusing sed.
11203 lt_compile=`echo "$ac_compile" | $SED \
11204 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11205 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11206 -e 's:$: $lt_compiler_flag:'`
11207 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11208 (eval "$lt_compile" 2>conftest.err)
11209 ac_status=$?
11210 cat conftest.err >&5
11211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11212 if (exit $ac_status) && test -s "$ac_outfile"; then
11213 # The compiler can only warn and ignore the option if not recognized
11214 # So say no if there are warnings other than the usual output.
11215 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11216 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11217 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11218 lt_cv_prog_compiler_pic_works=yes
11219 fi
11220 fi
11221 $RM conftest*
11222
11223 fi
11224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
11225 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
11226
11227 if test yes = "$lt_cv_prog_compiler_pic_works"; then
11228 case $lt_prog_compiler_pic in
11229 "" | " "*) ;;
11230 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11231 esac
11232 else
11233 lt_prog_compiler_pic=
11234 lt_prog_compiler_can_build_shared=no
11235 fi
11236
11237 fi
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249 #
11250 # Check to make sure the static flag actually works.
11251 #
11252 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11254 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11255 if ${lt_cv_prog_compiler_static_works+:} false; then :
11256 $as_echo_n "(cached) " >&6
11257 else
11258 lt_cv_prog_compiler_static_works=no
11259 save_LDFLAGS=$LDFLAGS
11260 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11261 echo "$lt_simple_link_test_code" > conftest.$ac_ext
11262 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11263 # The linker can only warn and ignore the option if not recognized
11264 # So say no if there are warnings
11265 if test -s conftest.err; then
11266 # Append any errors to the config.log.
11267 cat conftest.err 1>&5
11268 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11269 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11270 if diff conftest.exp conftest.er2 >/dev/null; then
11271 lt_cv_prog_compiler_static_works=yes
11272 fi
11273 else
11274 lt_cv_prog_compiler_static_works=yes
11275 fi
11276 fi
11277 $RM -r conftest*
11278 LDFLAGS=$save_LDFLAGS
11279
11280 fi
11281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11282 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
11283
11284 if test yes = "$lt_cv_prog_compiler_static_works"; then
11285 :
11286 else
11287 lt_prog_compiler_static=
11288 fi
11289
11290
11291
11292
11293
11294
11295
11296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11297 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11298 if ${lt_cv_prog_compiler_c_o+:} false; then :
11299 $as_echo_n "(cached) " >&6
11300 else
11301 lt_cv_prog_compiler_c_o=no
11302 $RM -r conftest 2>/dev/null
11303 mkdir conftest
11304 cd conftest
11305 mkdir out
11306 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11307
11308 lt_compiler_flag="-o out/conftest2.$ac_objext"
11309 # Insert the option either (1) after the last *FLAGS variable, or
11310 # (2) before a word containing "conftest.", or (3) at the end.
11311 # Note that $ac_compile itself does not contain backslashes and begins
11312 # with a dollar sign (not a hyphen), so the echo should work correctly.
11313 lt_compile=`echo "$ac_compile" | $SED \
11314 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11315 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11316 -e 's:$: $lt_compiler_flag:'`
11317 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11318 (eval "$lt_compile" 2>out/conftest.err)
11319 ac_status=$?
11320 cat out/conftest.err >&5
11321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11322 if (exit $ac_status) && test -s out/conftest2.$ac_objext
11323 then
11324 # The compiler can only warn and ignore the option if not recognized
11325 # So say no if there are warnings
11326 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11327 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11328 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11329 lt_cv_prog_compiler_c_o=yes
11330 fi
11331 fi
11332 chmod u+w . 2>&5
11333 $RM conftest*
11334 # SGI C++ compiler will create directory out/ii_files/ for
11335 # template instantiation
11336 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11337 $RM out/* && rmdir out
11338 cd ..
11339 $RM -r conftest
11340 $RM conftest*
11341
11342 fi
11343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11344 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11345
11346
11347
11348
11349
11350
11351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11352 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11353 if ${lt_cv_prog_compiler_c_o+:} false; then :
11354 $as_echo_n "(cached) " >&6
11355 else
11356 lt_cv_prog_compiler_c_o=no
11357 $RM -r conftest 2>/dev/null
11358 mkdir conftest
11359 cd conftest
11360 mkdir out
11361 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11362
11363 lt_compiler_flag="-o out/conftest2.$ac_objext"
11364 # Insert the option either (1) after the last *FLAGS variable, or
11365 # (2) before a word containing "conftest.", or (3) at the end.
11366 # Note that $ac_compile itself does not contain backslashes and begins
11367 # with a dollar sign (not a hyphen), so the echo should work correctly.
11368 lt_compile=`echo "$ac_compile" | $SED \
11369 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11370 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11371 -e 's:$: $lt_compiler_flag:'`
11372 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11373 (eval "$lt_compile" 2>out/conftest.err)
11374 ac_status=$?
11375 cat out/conftest.err >&5
11376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11377 if (exit $ac_status) && test -s out/conftest2.$ac_objext
11378 then
11379 # The compiler can only warn and ignore the option if not recognized
11380 # So say no if there are warnings
11381 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11382 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11383 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11384 lt_cv_prog_compiler_c_o=yes
11385 fi
11386 fi
11387 chmod u+w . 2>&5
11388 $RM conftest*
11389 # SGI C++ compiler will create directory out/ii_files/ for
11390 # template instantiation
11391 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11392 $RM out/* && rmdir out
11393 cd ..
11394 $RM -r conftest
11395 $RM conftest*
11396
11397 fi
11398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11399 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11400
11401
11402
11403
11404 hard_links=nottested
11405 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11406 # do not overwrite the value of need_locks provided by the user
11407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11408 $as_echo_n "checking if we can lock with hard links... " >&6; }
11409 hard_links=yes
11410 $RM conftest*
11411 ln conftest.a conftest.b 2>/dev/null && hard_links=no
11412 touch conftest.a
11413 ln conftest.a conftest.b 2>&5 || hard_links=no
11414 ln conftest.a conftest.b 2>/dev/null && hard_links=no
11415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11416 $as_echo "$hard_links" >&6; }
11417 if test no = "$hard_links"; then
11418 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11419 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11420 need_locks=warn
11421 fi
11422 else
11423 need_locks=no
11424 fi
11425
11426
11427
11428
11429
11430
11431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11432 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11433
11434 runpath_var=
11435 allow_undefined_flag=
11436 always_export_symbols=no
11437 archive_cmds=
11438 archive_expsym_cmds=
11439 compiler_needs_object=no
11440 enable_shared_with_static_runtimes=no
11441 export_dynamic_flag_spec=
11442 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11443 hardcode_automatic=no
11444 hardcode_direct=no
11445 hardcode_direct_absolute=no
11446 hardcode_libdir_flag_spec=
11447 hardcode_libdir_separator=
11448 hardcode_minus_L=no
11449 hardcode_shlibpath_var=unsupported
11450 inherit_rpath=no
11451 link_all_deplibs=unknown
11452 module_cmds=
11453 module_expsym_cmds=
11454 old_archive_from_new_cmds=
11455 old_archive_from_expsyms_cmds=
11456 thread_safe_flag_spec=
11457 whole_archive_flag_spec=
11458 # include_expsyms should be a list of space-separated symbols to be *always*
11459 # included in the symbol list
11460 include_expsyms=
11461 # exclude_expsyms can be an extended regexp of symbols to exclude
11462 # it will be wrapped by ' (' and ')$', so one must not match beginning or
11463 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11464 # as well as any symbol that contains 'd'.
11465 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11466 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11467 # platforms (ab)use it in PIC code, but their linkers get confused if
11468 # the symbol is explicitly referenced. Since portable code cannot
11469 # rely on this symbol name, it's probably fine to never include it in
11470 # preloaded symbol tables.
11471 # Exclude shared library initialization/finalization symbols.
11472 extract_expsyms_cmds=
11473
11474 case $host_os in
11475 cygwin* | mingw* | pw32* | cegcc*)
11476 # FIXME: the MSVC++ port hasn't been tested in a loooong time
11477 # When not using gcc, we currently assume that we are using
11478 # Microsoft Visual C++.
11479 if test yes != "$GCC"; then
11480 with_gnu_ld=no
11481 fi
11482 ;;
11483 interix*)
11484 # we just hope/assume this is gcc and not c89 (= MSVC++)
11485 with_gnu_ld=yes
11486 ;;
11487 openbsd* | bitrig*)
11488 with_gnu_ld=no
11489 ;;
11490 esac
11491
11492 ld_shlibs=yes
11493
11494 # On some targets, GNU ld is compatible enough with the native linker
11495 # that we're better off using the native interface for both.
11496 lt_use_gnu_ld_interface=no
11497 if test yes = "$with_gnu_ld"; then
11498 case $host_os in
11499 aix*)
11500 # The AIX port of GNU ld has always aspired to compatibility
11501 # with the native linker. However, as the warning in the GNU ld
11502 # block says, versions before 2.19.5* couldn't really create working
11503 # shared libraries, regardless of the interface used.
11504 case `$LD -v 2>&1` in
11505 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11506 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11507 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11508 *)
11509 lt_use_gnu_ld_interface=yes
11510 ;;
11511 esac
11512 ;;
11513 *)
11514 lt_use_gnu_ld_interface=yes
11515 ;;
11516 esac
11517 fi
11518
11519 if test yes = "$lt_use_gnu_ld_interface"; then
11520 # If archive_cmds runs LD, not CC, wlarc should be empty
11521 wlarc='$wl'
11522
11523 # Set some defaults for GNU ld with shared library support. These
11524 # are reset later if shared libraries are not supported. Putting them
11525 # here allows them to be overridden if necessary.
11526 runpath_var=LD_RUN_PATH
11527 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11528 export_dynamic_flag_spec='$wl--export-dynamic'
11529 # ancient GNU ld didn't support --whole-archive et. al.
11530 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11531 whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11532 else
11533 whole_archive_flag_spec=
11534 fi
11535 supports_anon_versioning=no
11536 case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11537 *GNU\ gold*) supports_anon_versioning=yes ;;
11538 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11539 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11540 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11541 *\ 2.11.*) ;; # other 2.11 versions
11542 *) supports_anon_versioning=yes ;;
11543 esac
11544
11545 # See if GNU ld supports shared libraries.
11546 case $host_os in
11547 aix[3-9]*)
11548 # On AIX/PPC, the GNU linker is very broken
11549 if test ia64 != "$host_cpu"; then
11550 ld_shlibs=no
11551 cat <<_LT_EOF 1>&2
11552
11553 *** Warning: the GNU linker, at least up to release 2.19, is reported
11554 *** to be unable to reliably create shared libraries on AIX.
11555 *** Therefore, libtool is disabling shared libraries support. If you
11556 *** really care for shared libraries, you may want to install binutils
11557 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11558 *** You will then need to restart the configuration process.
11559
11560 _LT_EOF
11561 fi
11562 ;;
11563
11564 amigaos*)
11565 case $host_cpu in
11566 powerpc)
11567 # see comment about AmigaOS4 .so support
11568 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11569 archive_expsym_cmds=''
11570 ;;
11571 m68k)
11572 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)'
11573 hardcode_libdir_flag_spec='-L$libdir'
11574 hardcode_minus_L=yes
11575 ;;
11576 esac
11577 ;;
11578
11579 beos*)
11580 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11581 allow_undefined_flag=unsupported
11582 # Joseph Beckenbach <jrb3 (at] best.com> says some releases of gcc
11583 # support --undefined. This deserves some investigation. FIXME
11584 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11585 else
11586 ld_shlibs=no
11587 fi
11588 ;;
11589
11590 cygwin* | mingw* | pw32* | cegcc*)
11591 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11592 # as there is no search path for DLLs.
11593 hardcode_libdir_flag_spec='-L$libdir'
11594 export_dynamic_flag_spec='$wl--export-all-symbols'
11595 allow_undefined_flag=unsupported
11596 always_export_symbols=no
11597 enable_shared_with_static_runtimes=yes
11598 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'
11599 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11600
11601 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11602 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11603 # If the export-symbols file already is a .def file, use it as
11604 # is; otherwise, prepend EXPORTS...
11605 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
11606 cp $export_symbols $output_objdir/$soname.def;
11607 else
11608 echo EXPORTS > $output_objdir/$soname.def;
11609 cat $export_symbols >> $output_objdir/$soname.def;
11610 fi~
11611 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11612 else
11613 ld_shlibs=no
11614 fi
11615 ;;
11616
11617 haiku*)
11618 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11619 link_all_deplibs=yes
11620 ;;
11621
11622 os2*)
11623 hardcode_libdir_flag_spec='-L$libdir'
11624 hardcode_minus_L=yes
11625 allow_undefined_flag=unsupported
11626 shrext_cmds=.dll
11627 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11628 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11629 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11630 $ECHO EXPORTS >> $output_objdir/$libname.def~
11631 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11632 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11633 emximp -o $lib $output_objdir/$libname.def'
11634 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11635 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11636 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11637 $ECHO EXPORTS >> $output_objdir/$libname.def~
11638 prefix_cmds="$SED"~
11639 if test EXPORTS = "`$SED 1q $export_symbols`"; then
11640 prefix_cmds="$prefix_cmds -e 1d";
11641 fi~
11642 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11643 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11644 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11645 emximp -o $lib $output_objdir/$libname.def'
11646 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11647 enable_shared_with_static_runtimes=yes
11648 ;;
11649
11650 interix[3-9]*)
11651 hardcode_direct=no
11652 hardcode_shlibpath_var=no
11653 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11654 export_dynamic_flag_spec='$wl-E'
11655 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11656 # Instead, shared libraries are loaded at an image base (0x10000000 by
11657 # default) and relocated if they conflict, which is a slow very memory
11658 # consuming and fragmenting process. To avoid this, we pick a random,
11659 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11660 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
11661 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11662 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'
11663 ;;
11664
11665 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11666 tmp_diet=no
11667 if test linux-dietlibc = "$host_os"; then
11668 case $cc_basename in
11669 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
11670 esac
11671 fi
11672 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11673 && test no = "$tmp_diet"
11674 then
11675 tmp_addflag=' $pic_flag'
11676 tmp_sharedflag='-shared'
11677 case $cc_basename,$host_cpu in
11678 pgcc*) # Portland Group C compiler
11679 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'
11680 tmp_addflag=' $pic_flag'
11681 ;;
11682 pgf77* | pgf90* | pgf95* | pgfortran*)
11683 # Portland Group f77 and f90 compilers
11684 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'
11685 tmp_addflag=' $pic_flag -Mnomain' ;;
11686 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
11687 tmp_addflag=' -i_dynamic' ;;
11688 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
11689 tmp_addflag=' -i_dynamic -nofor_main' ;;
11690 ifc* | ifort*) # Intel Fortran compiler
11691 tmp_addflag=' -nofor_main' ;;
11692 lf95*) # Lahey Fortran 8.1
11693 whole_archive_flag_spec=
11694 tmp_sharedflag='--shared' ;;
11695 nagfor*) # NAGFOR 5.3
11696 tmp_sharedflag='-Wl,-shared' ;;
11697 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11698 tmp_sharedflag='-qmkshrobj'
11699 tmp_addflag= ;;
11700 nvcc*) # Cuda Compiler Driver 2.2
11701 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'
11702 compiler_needs_object=yes
11703 ;;
11704 esac
11705 case `$CC -V 2>&1 | sed 5q` in
11706 *Sun\ C*) # Sun C 5.9
11707 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'
11708 compiler_needs_object=yes
11709 tmp_sharedflag='-G' ;;
11710 *Sun\ F*) # Sun Fortran 8.3
11711 tmp_sharedflag='-G' ;;
11712 esac
11713 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11714
11715 if test yes = "$supports_anon_versioning"; then
11716 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11717 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11718 echo "local: *; };" >> $output_objdir/$libname.ver~
11719 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11720 fi
11721
11722 case $cc_basename in
11723 tcc*)
11724 export_dynamic_flag_spec='-rdynamic'
11725 ;;
11726 xlf* | bgf* | bgxlf* | mpixlf*)
11727 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11728 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11729 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11730 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11731 if test yes = "$supports_anon_versioning"; then
11732 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11733 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11734 echo "local: *; };" >> $output_objdir/$libname.ver~
11735 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11736 fi
11737 ;;
11738 esac
11739 else
11740 ld_shlibs=no
11741 fi
11742 ;;
11743
11744 netbsd*)
11745 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11746 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11747 wlarc=
11748 else
11749 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11750 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11751 fi
11752 ;;
11753
11754 solaris*)
11755 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11756 ld_shlibs=no
11757 cat <<_LT_EOF 1>&2
11758
11759 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
11760 *** create shared libraries on Solaris systems. Therefore, libtool
11761 *** is disabling shared libraries support. We urge you to upgrade GNU
11762 *** binutils to release 2.9.1 or newer. Another option is to modify
11763 *** your PATH or compiler configuration so that the native linker is
11764 *** used, and then restart.
11765
11766 _LT_EOF
11767 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11768 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11769 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11770 else
11771 ld_shlibs=no
11772 fi
11773 ;;
11774
11775 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11776 case `$LD -v 2>&1` in
11777 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11778 ld_shlibs=no
11779 cat <<_LT_EOF 1>&2
11780
11781 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11782 *** reliably create shared libraries on SCO systems. Therefore, libtool
11783 *** is disabling shared libraries support. We urge you to upgrade GNU
11784 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
11785 *** your PATH or compiler configuration so that the native linker is
11786 *** used, and then restart.
11787
11788 _LT_EOF
11789 ;;
11790 *)
11791 # For security reasons, it is highly recommended that you always
11792 # use absolute paths for naming shared libraries, and exclude the
11793 # DT_RUNPATH tag from executables and libraries. But doing so
11794 # requires that you compile everything twice, which is a pain.
11795 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11796 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11797 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11798 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11799 else
11800 ld_shlibs=no
11801 fi
11802 ;;
11803 esac
11804 ;;
11805
11806 sunos4*)
11807 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11808 wlarc=
11809 hardcode_direct=yes
11810 hardcode_shlibpath_var=no
11811 ;;
11812
11813 *)
11814 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11815 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11816 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11817 else
11818 ld_shlibs=no
11819 fi
11820 ;;
11821 esac
11822
11823 if test no = "$ld_shlibs"; then
11824 runpath_var=
11825 hardcode_libdir_flag_spec=
11826 export_dynamic_flag_spec=
11827 whole_archive_flag_spec=
11828 fi
11829 else
11830 # PORTME fill in a description of your system's linker (not GNU ld)
11831 case $host_os in
11832 aix3*)
11833 allow_undefined_flag=unsupported
11834 always_export_symbols=yes
11835 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'
11836 # Note: this linker hardcodes the directories in LIBPATH if there
11837 # are no directories specified by -L.
11838 hardcode_minus_L=yes
11839 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11840 # Neither direct hardcoding nor static linking is supported with a
11841 # broken collect2.
11842 hardcode_direct=unsupported
11843 fi
11844 ;;
11845
11846 aix[4-9]*)
11847 if test ia64 = "$host_cpu"; then
11848 # On IA64, the linker does run time linking by default, so we don't
11849 # have to do anything special.
11850 aix_use_runtimelinking=no
11851 exp_sym_flag='-Bexport'
11852 no_entry_flag=
11853 else
11854 # If we're using GNU nm, then we don't want the "-C" option.
11855 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
11856 # Without the "-l" option, or with the "-B" option, AIX nm treats
11857 # weak defined symbols like other global defined symbols, whereas
11858 # GNU nm marks them as "W".
11859 # While the 'weak' keyword is ignored in the Export File, we need
11860 # it in the Import File for the 'aix-soname' feature, so we have
11861 # to replace the "-B" option with "-P" for AIX nm.
11862 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11863 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'
11864 else
11865 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'
11866 fi
11867 aix_use_runtimelinking=no
11868
11869 # Test if we are trying to use run time linking or normal
11870 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
11871 # have runtime linking enabled, and use it for executables.
11872 # For shared libraries, we enable/disable runtime linking
11873 # depending on the kind of the shared library created -
11874 # when "with_aix_soname,aix_use_runtimelinking" is:
11875 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
11876 # "aix,yes" lib.so shared, rtl:yes, for executables
11877 # lib.a static archive
11878 # "both,no" lib.so.V(shr.o) shared, rtl:yes
11879 # lib.a(lib.so.V) shared, rtl:no, for executables
11880 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11881 # lib.a(lib.so.V) shared, rtl:no
11882 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
11883 # lib.a static archive
11884 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11885 for ld_flag in $LDFLAGS; do
11886 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11887 aix_use_runtimelinking=yes
11888 break
11889 fi
11890 done
11891 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11892 # With aix-soname=svr4, we create the lib.so.V shared archives only,
11893 # so we don't have lib.a shared libs to link our executables.
11894 # We have to force runtime linking in this case.
11895 aix_use_runtimelinking=yes
11896 LDFLAGS="$LDFLAGS -Wl,-brtl"
11897 fi
11898 ;;
11899 esac
11900
11901 exp_sym_flag='-bexport'
11902 no_entry_flag='-bnoentry'
11903 fi
11904
11905 # When large executables or shared objects are built, AIX ld can
11906 # have problems creating the table of contents. If linking a library
11907 # or program results in "error TOC overflow" add -mminimal-toc to
11908 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
11909 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11910
11911 archive_cmds=''
11912 hardcode_direct=yes
11913 hardcode_direct_absolute=yes
11914 hardcode_libdir_separator=':'
11915 link_all_deplibs=yes
11916 file_list_spec='$wl-f,'
11917 case $with_aix_soname,$aix_use_runtimelinking in
11918 aix,*) ;; # traditional, no import file
11919 svr4,* | *,yes) # use import file
11920 # The Import File defines what to hardcode.
11921 hardcode_direct=no
11922 hardcode_direct_absolute=no
11923 ;;
11924 esac
11925
11926 if test yes = "$GCC"; then
11927 case $host_os in aix4.[012]|aix4.[012].*)
11928 # We only want to do this on AIX 4.2 and lower, the check
11929 # below for broken collect2 doesn't work under 4.3+
11930 collect2name=`$CC -print-prog-name=collect2`
11931 if test -f "$collect2name" &&
11932 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
11933 then
11934 # We have reworked collect2
11935 :
11936 else
11937 # We have old collect2
11938 hardcode_direct=unsupported
11939 # It fails to find uninstalled libraries when the uninstalled
11940 # path is not listed in the libpath. Setting hardcode_minus_L
11941 # to unsupported forces relinking
11942 hardcode_minus_L=yes
11943 hardcode_libdir_flag_spec='-L$libdir'
11944 hardcode_libdir_separator=
11945 fi
11946 ;;
11947 esac
11948 shared_flag='-shared'
11949 if test yes = "$aix_use_runtimelinking"; then
11950 shared_flag="$shared_flag "'$wl-G'
11951 fi
11952 # Need to ensure runtime linking is disabled for the traditional
11953 # shared library, or the linker may eventually find shared libraries
11954 # /with/ Import File - we do not want to mix them.
11955 shared_flag_aix='-shared'
11956 shared_flag_svr4='-shared $wl-G'
11957 else
11958 # not using gcc
11959 if test ia64 = "$host_cpu"; then
11960 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11961 # chokes on -Wl,-G. The following line is correct:
11962 shared_flag='-G'
11963 else
11964 if test yes = "$aix_use_runtimelinking"; then
11965 shared_flag='$wl-G'
11966 else
11967 shared_flag='$wl-bM:SRE'
11968 fi
11969 shared_flag_aix='$wl-bM:SRE'
11970 shared_flag_svr4='$wl-G'
11971 fi
11972 fi
11973
11974 export_dynamic_flag_spec='$wl-bexpall'
11975 # It seems that -bexpall does not export symbols beginning with
11976 # underscore (_), so it is better to generate a list of symbols to export.
11977 always_export_symbols=yes
11978 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
11979 # Warning - without using the other runtime loading flags (-brtl),
11980 # -berok will link without error, but may produce a broken library.
11981 allow_undefined_flag='-berok'
11982 # Determine the default libpath from the value encoded in an
11983 # empty executable.
11984 if test set = "${lt_cv_aix_libpath+set}"; then
11985 aix_libpath=$lt_cv_aix_libpath
11986 else
11987 if ${lt_cv_aix_libpath_+:} false; then :
11988 $as_echo_n "(cached) " >&6
11989 else
11990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11991 /* end confdefs.h. */
11992
11993 int
11994 main ()
11995 {
11996
11997 ;
11998 return 0;
11999 }
12000 _ACEOF
12001 if ac_fn_c_try_link "$LINENO"; then :
12002
12003 lt_aix_libpath_sed='
12004 /Import File Strings/,/^$/ {
12005 /^0/ {
12006 s/^0 *\([^ ]*\) *$/\1/
12007 p
12008 }
12009 }'
12010 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12011 # Check for a 64-bit object if we didn't find anything.
12012 if test -z "$lt_cv_aix_libpath_"; then
12013 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12014 fi
12015 fi
12016 rm -f core conftest.err conftest.$ac_objext \
12017 conftest$ac_exeext conftest.$ac_ext
12018 if test -z "$lt_cv_aix_libpath_"; then
12019 lt_cv_aix_libpath_=/usr/lib:/lib
12020 fi
12021
12022 fi
12023
12024 aix_libpath=$lt_cv_aix_libpath_
12025 fi
12026
12027 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12028 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
12029 else
12030 if test ia64 = "$host_cpu"; then
12031 hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
12032 allow_undefined_flag="-z nodefs"
12033 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"
12034 else
12035 # Determine the default libpath from the value encoded in an
12036 # empty executable.
12037 if test set = "${lt_cv_aix_libpath+set}"; then
12038 aix_libpath=$lt_cv_aix_libpath
12039 else
12040 if ${lt_cv_aix_libpath_+:} false; then :
12041 $as_echo_n "(cached) " >&6
12042 else
12043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12044 /* end confdefs.h. */
12045
12046 int
12047 main ()
12048 {
12049
12050 ;
12051 return 0;
12052 }
12053 _ACEOF
12054 if ac_fn_c_try_link "$LINENO"; then :
12055
12056 lt_aix_libpath_sed='
12057 /Import File Strings/,/^$/ {
12058 /^0/ {
12059 s/^0 *\([^ ]*\) *$/\1/
12060 p
12061 }
12062 }'
12063 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12064 # Check for a 64-bit object if we didn't find anything.
12065 if test -z "$lt_cv_aix_libpath_"; then
12066 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12067 fi
12068 fi
12069 rm -f core conftest.err conftest.$ac_objext \
12070 conftest$ac_exeext conftest.$ac_ext
12071 if test -z "$lt_cv_aix_libpath_"; then
12072 lt_cv_aix_libpath_=/usr/lib:/lib
12073 fi
12074
12075 fi
12076
12077 aix_libpath=$lt_cv_aix_libpath_
12078 fi
12079
12080 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12081 # Warning - without using the other run time loading flags,
12082 # -berok will link without error, but may produce a broken library.
12083 no_undefined_flag=' $wl-bernotok'
12084 allow_undefined_flag=' $wl-berok'
12085 if test yes = "$with_gnu_ld"; then
12086 # We only use this code for GNU lds that support --whole-archive.
12087 whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
12088 else
12089 # Exported symbols can be pulled into shared objects from archives
12090 whole_archive_flag_spec='$convenience'
12091 fi
12092 archive_cmds_need_lc=yes
12093 archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
12094 # -brtl affects multiple linker settings, -berok does not and is overridden later
12095 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
12096 if test svr4 != "$with_aix_soname"; then
12097 # This is similar to how AIX traditionally builds its shared libraries.
12098 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'
12099 fi
12100 if test aix != "$with_aix_soname"; then
12101 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'
12102 else
12103 # used by -dlpreopen to get the symbols
12104 archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
12105 fi
12106 archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
12107 fi
12108 fi
12109 ;;
12110
12111 amigaos*)
12112 case $host_cpu in
12113 powerpc)
12114 # see comment about AmigaOS4 .so support
12115 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12116 archive_expsym_cmds=''
12117 ;;
12118 m68k)
12119 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)'
12120 hardcode_libdir_flag_spec='-L$libdir'
12121 hardcode_minus_L=yes
12122 ;;
12123 esac
12124 ;;
12125
12126 bsdi[45]*)
12127 export_dynamic_flag_spec=-rdynamic
12128 ;;
12129
12130 cygwin* | mingw* | pw32* | cegcc*)
12131 # When not using gcc, we currently assume that we are using
12132 # Microsoft Visual C++.
12133 # hardcode_libdir_flag_spec is actually meaningless, as there is
12134 # no search path for DLLs.
12135 case $cc_basename in
12136 cl*)
12137 # Native MSVC
12138 hardcode_libdir_flag_spec=' '
12139 allow_undefined_flag=unsupported
12140 always_export_symbols=yes
12141 file_list_spec='@'
12142 # Tell ltmain to make .lib files, not .a files.
12143 libext=lib
12144 # Tell ltmain to make .dll files, not .so files.
12145 shrext_cmds=.dll
12146 # FIXME: Setting linknames here is a bad hack.
12147 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
12148 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
12149 cp "$export_symbols" "$output_objdir/$soname.def";
12150 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
12151 else
12152 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
12153 fi~
12154 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12155 linknames='
12156 # The linker will not automatically build a static lib if we build a DLL.
12157 # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12158 enable_shared_with_static_runtimes=yes
12159 exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
12160 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12161 # Don't use ranlib
12162 old_postinstall_cmds='chmod 644 $oldlib'
12163 postlink_cmds='lt_outputfile="@OUTPUT@"~
12164 lt_tool_outputfile="@TOOL_OUTPUT@"~
12165 case $lt_outputfile in
12166 *.exe|*.EXE) ;;
12167 *)
12168 lt_outputfile=$lt_outputfile.exe
12169 lt_tool_outputfile=$lt_tool_outputfile.exe
12170 ;;
12171 esac~
12172 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
12173 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12174 $RM "$lt_outputfile.manifest";
12175 fi'
12176 ;;
12177 *)
12178 # Assume MSVC wrapper
12179 hardcode_libdir_flag_spec=' '
12180 allow_undefined_flag=unsupported
12181 # Tell ltmain to make .lib files, not .a files.
12182 libext=lib
12183 # Tell ltmain to make .dll files, not .so files.
12184 shrext_cmds=.dll
12185 # FIXME: Setting linknames here is a bad hack.
12186 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12187 # The linker will automatically build a .lib file if we build a DLL.
12188 old_archive_from_new_cmds='true'
12189 # FIXME: Should let the user specify the lib program.
12190 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12191 enable_shared_with_static_runtimes=yes
12192 ;;
12193 esac
12194 ;;
12195
12196 darwin* | rhapsody*)
12197
12198
12199 archive_cmds_need_lc=no
12200 hardcode_direct=no
12201 hardcode_automatic=yes
12202 hardcode_shlibpath_var=unsupported
12203 if test yes = "$lt_cv_ld_force_load"; then
12204 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\"`'
12205
12206 else
12207 whole_archive_flag_spec=''
12208 fi
12209 link_all_deplibs=yes
12210 allow_undefined_flag=$_lt_dar_allow_undefined
12211 case $cc_basename in
12212 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
12213 *) _lt_dar_can_shared=$GCC ;;
12214 esac
12215 if test yes = "$_lt_dar_can_shared"; then
12216 output_verbose_link_cmd=func_echo_all
12217 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
12218 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
12219 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"
12220 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"
12221
12222 else
12223 ld_shlibs=no
12224 fi
12225
12226 ;;
12227
12228 dgux*)
12229 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12230 hardcode_libdir_flag_spec='-L$libdir'
12231 hardcode_shlibpath_var=no
12232 ;;
12233
12234 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12235 # support. Future versions do this automatically, but an explicit c++rt0.o
12236 # does not break anything, and helps significantly (at the cost of a little
12237 # extra space).
12238 freebsd2.2*)
12239 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12240 hardcode_libdir_flag_spec='-R$libdir'
12241 hardcode_direct=yes
12242 hardcode_shlibpath_var=no
12243 ;;
12244
12245 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12246 freebsd2.*)
12247 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12248 hardcode_direct=yes
12249 hardcode_minus_L=yes
12250 hardcode_shlibpath_var=no
12251 ;;
12252
12253 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12254 freebsd* | dragonfly*)
12255 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12256 hardcode_libdir_flag_spec='-R$libdir'
12257 hardcode_direct=yes
12258 hardcode_shlibpath_var=no
12259 ;;
12260
12261 hpux9*)
12262 if test yes = "$GCC"; then
12263 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'
12264 else
12265 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'
12266 fi
12267 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12268 hardcode_libdir_separator=:
12269 hardcode_direct=yes
12270
12271 # hardcode_minus_L: Not really in the search PATH,
12272 # but as the default location of the library.
12273 hardcode_minus_L=yes
12274 export_dynamic_flag_spec='$wl-E'
12275 ;;
12276
12277 hpux10*)
12278 if test yes,no = "$GCC,$with_gnu_ld"; then
12279 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12280 else
12281 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12282 fi
12283 if test no = "$with_gnu_ld"; then
12284 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12285 hardcode_libdir_separator=:
12286 hardcode_direct=yes
12287 hardcode_direct_absolute=yes
12288 export_dynamic_flag_spec='$wl-E'
12289 # hardcode_minus_L: Not really in the search PATH,
12290 # but as the default location of the library.
12291 hardcode_minus_L=yes
12292 fi
12293 ;;
12294
12295 hpux11*)
12296 if test yes,no = "$GCC,$with_gnu_ld"; then
12297 case $host_cpu in
12298 hppa*64*)
12299 archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12300 ;;
12301 ia64*)
12302 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12303 ;;
12304 *)
12305 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12306 ;;
12307 esac
12308 else
12309 case $host_cpu in
12310 hppa*64*)
12311 archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12312 ;;
12313 ia64*)
12314 archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12315 ;;
12316 *)
12317
12318 # Older versions of the 11.00 compiler do not understand -b yet
12319 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12321 $as_echo_n "checking if $CC understands -b... " >&6; }
12322 if ${lt_cv_prog_compiler__b+:} false; then :
12323 $as_echo_n "(cached) " >&6
12324 else
12325 lt_cv_prog_compiler__b=no
12326 save_LDFLAGS=$LDFLAGS
12327 LDFLAGS="$LDFLAGS -b"
12328 echo "$lt_simple_link_test_code" > conftest.$ac_ext
12329 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12330 # The linker can only warn and ignore the option if not recognized
12331 # So say no if there are warnings
12332 if test -s conftest.err; then
12333 # Append any errors to the config.log.
12334 cat conftest.err 1>&5
12335 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12336 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12337 if diff conftest.exp conftest.er2 >/dev/null; then
12338 lt_cv_prog_compiler__b=yes
12339 fi
12340 else
12341 lt_cv_prog_compiler__b=yes
12342 fi
12343 fi
12344 $RM -r conftest*
12345 LDFLAGS=$save_LDFLAGS
12346
12347 fi
12348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12349 $as_echo "$lt_cv_prog_compiler__b" >&6; }
12350
12351 if test yes = "$lt_cv_prog_compiler__b"; then
12352 archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12353 else
12354 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12355 fi
12356
12357 ;;
12358 esac
12359 fi
12360 if test no = "$with_gnu_ld"; then
12361 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12362 hardcode_libdir_separator=:
12363
12364 case $host_cpu in
12365 hppa*64*|ia64*)
12366 hardcode_direct=no
12367 hardcode_shlibpath_var=no
12368 ;;
12369 *)
12370 hardcode_direct=yes
12371 hardcode_direct_absolute=yes
12372 export_dynamic_flag_spec='$wl-E'
12373
12374 # hardcode_minus_L: Not really in the search PATH,
12375 # but as the default location of the library.
12376 hardcode_minus_L=yes
12377 ;;
12378 esac
12379 fi
12380 ;;
12381
12382 irix5* | irix6* | nonstopux*)
12383 if test yes = "$GCC"; then
12384 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'
12385 # Try to use the -exported_symbol ld option, if it does not
12386 # work, assume that -exports_file does not work either and
12387 # implicitly export all symbols.
12388 # This should be the same for all languages, so no per-tag cache variable.
12389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12390 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12391 if ${lt_cv_irix_exported_symbol+:} false; then :
12392 $as_echo_n "(cached) " >&6
12393 else
12394 save_LDFLAGS=$LDFLAGS
12395 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12397 /* end confdefs.h. */
12398 int foo (void) { return 0; }
12399 _ACEOF
12400 if ac_fn_c_try_link "$LINENO"; then :
12401 lt_cv_irix_exported_symbol=yes
12402 else
12403 lt_cv_irix_exported_symbol=no
12404 fi
12405 rm -f core conftest.err conftest.$ac_objext \
12406 conftest$ac_exeext conftest.$ac_ext
12407 LDFLAGS=$save_LDFLAGS
12408 fi
12409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12410 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
12411 if test yes = "$lt_cv_irix_exported_symbol"; then
12412 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'
12413 fi
12414 else
12415 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'
12416 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'
12417 fi
12418 archive_cmds_need_lc='no'
12419 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12420 hardcode_libdir_separator=:
12421 inherit_rpath=yes
12422 link_all_deplibs=yes
12423 ;;
12424
12425 linux*)
12426 case $cc_basename in
12427 tcc*)
12428 # Fabrice Bellard et al's Tiny C Compiler
12429 ld_shlibs=yes
12430 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12431 ;;
12432 esac
12433 ;;
12434
12435 netbsd*)
12436 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12437 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
12438 else
12439 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
12440 fi
12441 hardcode_libdir_flag_spec='-R$libdir'
12442 hardcode_direct=yes
12443 hardcode_shlibpath_var=no
12444 ;;
12445
12446 newsos6)
12447 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12448 hardcode_direct=yes
12449 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12450 hardcode_libdir_separator=:
12451 hardcode_shlibpath_var=no
12452 ;;
12453
12454 *nto* | *qnx*)
12455 ;;
12456
12457 openbsd* | bitrig*)
12458 if test -f /usr/libexec/ld.so; then
12459 hardcode_direct=yes
12460 hardcode_shlibpath_var=no
12461 hardcode_direct_absolute=yes
12462 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12463 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12464 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12465 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12466 export_dynamic_flag_spec='$wl-E'
12467 else
12468 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12469 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12470 fi
12471 else
12472 ld_shlibs=no
12473 fi
12474 ;;
12475
12476 os2*)
12477 hardcode_libdir_flag_spec='-L$libdir'
12478 hardcode_minus_L=yes
12479 allow_undefined_flag=unsupported
12480 shrext_cmds=.dll
12481 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12482 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12483 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12484 $ECHO EXPORTS >> $output_objdir/$libname.def~
12485 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12486 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12487 emximp -o $lib $output_objdir/$libname.def'
12488 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12489 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12490 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12491 $ECHO EXPORTS >> $output_objdir/$libname.def~
12492 prefix_cmds="$SED"~
12493 if test EXPORTS = "`$SED 1q $export_symbols`"; then
12494 prefix_cmds="$prefix_cmds -e 1d";
12495 fi~
12496 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12497 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12498 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12499 emximp -o $lib $output_objdir/$libname.def'
12500 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12501 enable_shared_with_static_runtimes=yes
12502 ;;
12503
12504 osf3*)
12505 if test yes = "$GCC"; then
12506 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12507 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'
12508 else
12509 allow_undefined_flag=' -expect_unresolved \*'
12510 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'
12511 fi
12512 archive_cmds_need_lc='no'
12513 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12514 hardcode_libdir_separator=:
12515 ;;
12516
12517 osf4* | osf5*) # as osf3* with the addition of -msym flag
12518 if test yes = "$GCC"; then
12519 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12520 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'
12521 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12522 else
12523 allow_undefined_flag=' -expect_unresolved \*'
12524 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'
12525 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~
12526 $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'
12527
12528 # Both c and cxx compiler support -rpath directly
12529 hardcode_libdir_flag_spec='-rpath $libdir'
12530 fi
12531 archive_cmds_need_lc='no'
12532 hardcode_libdir_separator=:
12533 ;;
12534
12535 solaris*)
12536 no_undefined_flag=' -z defs'
12537 if test yes = "$GCC"; then
12538 wlarc='$wl'
12539 archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12540 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12541 $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'
12542 else
12543 case `$CC -V 2>&1` in
12544 *"Compilers 5.0"*)
12545 wlarc=''
12546 archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12547 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12548 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12549 ;;
12550 *)
12551 wlarc='$wl'
12552 archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12553 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12554 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12555 ;;
12556 esac
12557 fi
12558 hardcode_libdir_flag_spec='-R$libdir'
12559 hardcode_shlibpath_var=no
12560 case $host_os in
12561 solaris2.[0-5] | solaris2.[0-5].*) ;;
12562 *)
12563 # The compiler driver will combine and reorder linker options,
12564 # but understands '-z linker_flag'. GCC discards it without '$wl',
12565 # but is careful enough not to reorder.
12566 # Supported since Solaris 2.6 (maybe 2.5.1?)
12567 if test yes = "$GCC"; then
12568 whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12569 else
12570 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12571 fi
12572 ;;
12573 esac
12574 link_all_deplibs=yes
12575 ;;
12576
12577 sunos4*)
12578 if test sequent = "$host_vendor"; then
12579 # Use $CC to link under sequent, because it throws in some extra .o
12580 # files that make .init and .fini sections work.
12581 archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12582 else
12583 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12584 fi
12585 hardcode_libdir_flag_spec='-L$libdir'
12586 hardcode_direct=yes
12587 hardcode_minus_L=yes
12588 hardcode_shlibpath_var=no
12589 ;;
12590
12591 sysv4)
12592 case $host_vendor in
12593 sni)
12594 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12595 hardcode_direct=yes # is this really true???
12596 ;;
12597 siemens)
12598 ## LD is ld it makes a PLAMLIB
12599 ## CC just makes a GrossModule.
12600 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12601 reload_cmds='$CC -r -o $output$reload_objs'
12602 hardcode_direct=no
12603 ;;
12604 motorola)
12605 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12606 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12607 ;;
12608 esac
12609 runpath_var='LD_RUN_PATH'
12610 hardcode_shlibpath_var=no
12611 ;;
12612
12613 sysv4.3*)
12614 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12615 hardcode_shlibpath_var=no
12616 export_dynamic_flag_spec='-Bexport'
12617 ;;
12618
12619 sysv4*MP*)
12620 if test -d /usr/nec; then
12621 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12622 hardcode_shlibpath_var=no
12623 runpath_var=LD_RUN_PATH
12624 hardcode_runpath_var=yes
12625 ld_shlibs=yes
12626 fi
12627 ;;
12628
12629 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12630 no_undefined_flag='$wl-z,text'
12631 archive_cmds_need_lc=no
12632 hardcode_shlibpath_var=no
12633 runpath_var='LD_RUN_PATH'
12634
12635 if test yes = "$GCC"; then
12636 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12637 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12638 else
12639 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12640 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12641 fi
12642 ;;
12643
12644 sysv5* | sco3.2v5* | sco5v6*)
12645 # Note: We CANNOT use -z defs as we might desire, because we do not
12646 # link with -lc, and that would cause any symbols used from libc to
12647 # always be unresolved, which means just about no library would
12648 # ever link correctly. If we're not using GNU ld we use -z text
12649 # though, which does catch some bad symbols but isn't as heavy-handed
12650 # as -z defs.
12651 no_undefined_flag='$wl-z,text'
12652 allow_undefined_flag='$wl-z,nodefs'
12653 archive_cmds_need_lc=no
12654 hardcode_shlibpath_var=no
12655 hardcode_libdir_flag_spec='$wl-R,$libdir'
12656 hardcode_libdir_separator=':'
12657 link_all_deplibs=yes
12658 export_dynamic_flag_spec='$wl-Bexport'
12659 runpath_var='LD_RUN_PATH'
12660
12661 if test yes = "$GCC"; then
12662 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12663 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12664 else
12665 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12666 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12667 fi
12668 ;;
12669
12670 uts4*)
12671 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12672 hardcode_libdir_flag_spec='-L$libdir'
12673 hardcode_shlibpath_var=no
12674 ;;
12675
12676 *)
12677 ld_shlibs=no
12678 ;;
12679 esac
12680
12681 if test sni = "$host_vendor"; then
12682 case $host in
12683 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12684 export_dynamic_flag_spec='$wl-Blargedynsym'
12685 ;;
12686 esac
12687 fi
12688 fi
12689
12690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12691 $as_echo "$ld_shlibs" >&6; }
12692 test no = "$ld_shlibs" && can_build_shared=no
12693
12694 with_gnu_ld=$with_gnu_ld
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710 #
12711 # Do we need to explicitly link libc?
12712 #
12713 case "x$archive_cmds_need_lc" in
12714 x|xyes)
12715 # Assume -lc should be added
12716 archive_cmds_need_lc=yes
12717
12718 if test yes,yes = "$GCC,$enable_shared"; then
12719 case $archive_cmds in
12720 *'~'*)
12721 # FIXME: we may have to deal with multi-command sequences.
12722 ;;
12723 '$CC '*)
12724 # Test whether the compiler implicitly links with -lc since on some
12725 # systems, -lgcc has to come before -lc. If gcc already passes -lc
12726 # to ld, don't add -lc before -lgcc.
12727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12728 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12729 if ${lt_cv_archive_cmds_need_lc+:} false; then :
12730 $as_echo_n "(cached) " >&6
12731 else
12732 $RM conftest*
12733 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12734
12735 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12736 (eval $ac_compile) 2>&5
12737 ac_status=$?
12738 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12739 test $ac_status = 0; } 2>conftest.err; then
12740 soname=conftest
12741 lib=conftest
12742 libobjs=conftest.$ac_objext
12743 deplibs=
12744 wl=$lt_prog_compiler_wl
12745 pic_flag=$lt_prog_compiler_pic
12746 compiler_flags=-v
12747 linker_flags=-v
12748 verstring=
12749 output_objdir=.
12750 libname=conftest
12751 lt_save_allow_undefined_flag=$allow_undefined_flag
12752 allow_undefined_flag=
12753 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12754 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12755 ac_status=$?
12756 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12757 test $ac_status = 0; }
12758 then
12759 lt_cv_archive_cmds_need_lc=no
12760 else
12761 lt_cv_archive_cmds_need_lc=yes
12762 fi
12763 allow_undefined_flag=$lt_save_allow_undefined_flag
12764 else
12765 cat conftest.err 1>&5
12766 fi
12767 $RM conftest*
12768
12769 fi
12770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12771 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12772 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12773 ;;
12774 esac
12775 fi
12776 ;;
12777 esac
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12931 $as_echo_n "checking dynamic linker characteristics... " >&6; }
12932
12933 if test yes = "$GCC"; then
12934 case $host_os in
12935 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
12936 *) lt_awk_arg='/^libraries:/' ;;
12937 esac
12938 case $host_os in
12939 mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
12940 *) lt_sed_strip_eq='s|=/|/|g' ;;
12941 esac
12942 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
12943 case $lt_search_path_spec in
12944 *\;*)
12945 # if the path contains ";" then we assume it to be the separator
12946 # otherwise default to the standard path separator (i.e. ":") - it is
12947 # assumed that no part of a normal pathname contains ";" but that should
12948 # okay in the real world where ";" in dirpaths is itself problematic.
12949 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
12950 ;;
12951 *)
12952 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
12953 ;;
12954 esac
12955 # Ok, now we have the path, separated by spaces, we can step through it
12956 # and add multilib dir if necessary...
12957 lt_tmp_lt_search_path_spec=
12958 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
12959 # ...but if some path component already ends with the multilib dir we assume
12960 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
12961 case "$lt_multi_os_dir; $lt_search_path_spec " in
12962 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
12963 lt_multi_os_dir=
12964 ;;
12965 esac
12966 for lt_sys_path in $lt_search_path_spec; do
12967 if test -d "$lt_sys_path$lt_multi_os_dir"; then
12968 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
12969 elif test -n "$lt_multi_os_dir"; then
12970 test -d "$lt_sys_path" && \
12971 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
12972 fi
12973 done
12974 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
12975 BEGIN {RS = " "; FS = "/|\n";} {
12976 lt_foo = "";
12977 lt_count = 0;
12978 for (lt_i = NF; lt_i > 0; lt_i--) {
12979 if ($lt_i != "" && $lt_i != ".") {
12980 if ($lt_i == "..") {
12981 lt_count++;
12982 } else {
12983 if (lt_count == 0) {
12984 lt_foo = "/" $lt_i lt_foo;
12985 } else {
12986 lt_count--;
12987 }
12988 }
12989 }
12990 }
12991 if (lt_foo != "") { lt_freq[lt_foo]++; }
12992 if (lt_freq[lt_foo] == 1) { print lt_foo; }
12993 }'`
12994 # AWK program above erroneously prepends '/' to C:/dos/paths
12995 # for these hosts.
12996 case $host_os in
12997 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
12998 $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
12999 esac
13000 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
13001 else
13002 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13003 fi
13004 library_names_spec=
13005 libname_spec='lib$name'
13006 soname_spec=
13007 shrext_cmds=.so
13008 postinstall_cmds=
13009 postuninstall_cmds=
13010 finish_cmds=
13011 finish_eval=
13012 shlibpath_var=
13013 shlibpath_overrides_runpath=unknown
13014 version_type=none
13015 dynamic_linker="$host_os ld.so"
13016 sys_lib_dlsearch_path_spec="/lib /usr/lib"
13017 need_lib_prefix=unknown
13018 hardcode_into_libs=no
13019
13020 # when you set need_version to no, make sure it does not cause -set_version
13021 # flags to be left without arguments
13022 need_version=unknown
13023
13024
13025
13026 case $host_os in
13027 aix3*)
13028 version_type=linux # correct to gnu/linux during the next big refactor
13029 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
13030 shlibpath_var=LIBPATH
13031
13032 # AIX 3 has no versioning support, so we append a major version to the name.
13033 soname_spec='$libname$release$shared_ext$major'
13034 ;;
13035
13036 aix[4-9]*)
13037 version_type=linux # correct to gnu/linux during the next big refactor
13038 need_lib_prefix=no
13039 need_version=no
13040 hardcode_into_libs=yes
13041 if test ia64 = "$host_cpu"; then
13042 # AIX 5 supports IA64
13043 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
13044 shlibpath_var=LD_LIBRARY_PATH
13045 else
13046 # With GCC up to 2.95.x, collect2 would create an import file
13047 # for dependence libraries. The import file would start with
13048 # the line '#! .'. This would cause the generated library to
13049 # depend on '.', always an invalid library. This was fixed in
13050 # development snapshots of GCC prior to 3.0.
13051 case $host_os in
13052 aix4 | aix4.[01] | aix4.[01].*)
13053 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
13054 echo ' yes '
13055 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
13056 :
13057 else
13058 can_build_shared=no
13059 fi
13060 ;;
13061 esac
13062 # Using Import Files as archive members, it is possible to support
13063 # filename-based versioning of shared library archives on AIX. While
13064 # this would work for both with and without runtime linking, it will
13065 # prevent static linking of such archives. So we do filename-based
13066 # shared library versioning with .so extension only, which is used
13067 # when both runtime linking and shared linking is enabled.
13068 # Unfortunately, runtime linking may impact performance, so we do
13069 # not want this to be the default eventually. Also, we use the
13070 # versioned .so libs for executables only if there is the -brtl
13071 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
13072 # To allow for filename-based versioning support, we need to create
13073 # libNAME.so.V as an archive file, containing:
13074 # *) an Import File, referring to the versioned filename of the
13075 # archive as well as the shared archive member, telling the
13076 # bitwidth (32 or 64) of that shared object, and providing the
13077 # list of exported symbols of that shared object, eventually
13078 # decorated with the 'weak' keyword
13079 # *) the shared object with the F_LOADONLY flag set, to really avoid
13080 # it being seen by the linker.
13081 # At run time we better use the real file rather than another symlink,
13082 # but for link time we create the symlink libNAME.so -> libNAME.so.V
13083
13084 case $with_aix_soname,$aix_use_runtimelinking in
13085 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
13086 # soname into executable. Probably we can add versioning support to
13087 # collect2, so additional links can be useful in future.
13088 aix,yes) # traditional libtool
13089 dynamic_linker='AIX unversionable lib.so'
13090 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
13091 # instead of lib<name>.a to let people know that these are not
13092 # typical AIX shared libraries.
13093 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13094 ;;
13095 aix,no) # traditional AIX only
13096 dynamic_linker='AIX lib.a(lib.so.V)'
13097 # We preserve .a as extension for shared libraries through AIX4.2
13098 # and later when we are not doing run time linking.
13099 library_names_spec='$libname$release.a $libname.a'
13100 soname_spec='$libname$release$shared_ext$major'
13101 ;;
13102 svr4,*) # full svr4 only
13103 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
13104 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13105 # We do not specify a path in Import Files, so LIBPATH fires.
13106 shlibpath_overrides_runpath=yes
13107 ;;
13108 *,yes) # both, prefer svr4
13109 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
13110 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13111 # unpreferred sharedlib libNAME.a needs extra handling
13112 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"'
13113 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"'
13114 # We do not specify a path in Import Files, so LIBPATH fires.
13115 shlibpath_overrides_runpath=yes
13116 ;;
13117 *,no) # both, prefer aix
13118 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
13119 library_names_spec='$libname$release.a $libname.a'
13120 soname_spec='$libname$release$shared_ext$major'
13121 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
13122 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)'
13123 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"'
13124 ;;
13125 esac
13126 shlibpath_var=LIBPATH
13127 fi
13128 ;;
13129
13130 amigaos*)
13131 case $host_cpu in
13132 powerpc)
13133 # Since July 2007 AmigaOS4 officially supports .so libraries.
13134 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
13135 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13136 ;;
13137 m68k)
13138 library_names_spec='$libname.ixlibrary $libname.a'
13139 # Create ${libname}_ixlibrary.a entries in /sys/libs.
13140 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'
13141 ;;
13142 esac
13143 ;;
13144
13145 beos*)
13146 library_names_spec='$libname$shared_ext'
13147 dynamic_linker="$host_os ld.so"
13148 shlibpath_var=LIBRARY_PATH
13149 ;;
13150
13151 bsdi[45]*)
13152 version_type=linux # correct to gnu/linux during the next big refactor
13153 need_version=no
13154 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13155 soname_spec='$libname$release$shared_ext$major'
13156 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13157 shlibpath_var=LD_LIBRARY_PATH
13158 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13159 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13160 # the default ld.so.conf also contains /usr/contrib/lib and
13161 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13162 # libtool to hard-code these into programs
13163 ;;
13164
13165 cygwin* | mingw* | pw32* | cegcc*)
13166 version_type=windows
13167 shrext_cmds=.dll
13168 need_version=no
13169 need_lib_prefix=no
13170
13171 case $GCC,$cc_basename in
13172 yes,*)
13173 # gcc
13174 library_names_spec='$libname.dll.a'
13175 # DLL is installed to $(libdir)/../bin by postinstall_cmds
13176 postinstall_cmds='base_file=`basename \$file`~
13177 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13178 dldir=$destdir/`dirname \$dlpath`~
13179 test -d \$dldir || mkdir -p \$dldir~
13180 $install_prog $dir/$dlname \$dldir/$dlname~
13181 chmod a+x \$dldir/$dlname~
13182 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13183 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13184 fi'
13185 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13186 dlpath=$dir/\$dldll~
13187 $RM \$dlpath'
13188 shlibpath_overrides_runpath=yes
13189
13190 case $host_os in
13191 cygwin*)
13192 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13193 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13194
13195 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
13196 ;;
13197 mingw* | cegcc*)
13198 # MinGW DLLs use traditional 'lib' prefix
13199 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13200 ;;
13201 pw32*)
13202 # pw32 DLLs use 'pw' prefix rather than 'lib'
13203 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13204 ;;
13205 esac
13206 dynamic_linker='Win32 ld.exe'
13207 ;;
13208
13209 *,cl*)
13210 # Native MSVC
13211 libname_spec='$name'
13212 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13213 library_names_spec='$libname.dll.lib'
13214
13215 case $build_os in
13216 mingw*)
13217 sys_lib_search_path_spec=
13218 lt_save_ifs=$IFS
13219 IFS=';'
13220 for lt_path in $LIB
13221 do
13222 IFS=$lt_save_ifs
13223 # Let DOS variable expansion print the short 8.3 style file name.
13224 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
13225 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13226 done
13227 IFS=$lt_save_ifs
13228 # Convert to MSYS style.
13229 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13230 ;;
13231 cygwin*)
13232 # Convert to unix form, then to dos form, then back to unix form
13233 # but this time dos style (no spaces!) so that the unix form looks
13234 # like /cygdrive/c/PROGRA~1:/cygdr...
13235 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13236 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13237 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13238 ;;
13239 *)
13240 sys_lib_search_path_spec=$LIB
13241 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13242 # It is most probably a Windows format PATH.
13243 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13244 else
13245 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13246 fi
13247 # FIXME: find the short name or the path components, as spaces are
13248 # common. (e.g. "Program Files" -> "PROGRA~1")
13249 ;;
13250 esac
13251
13252 # DLL is installed to $(libdir)/../bin by postinstall_cmds
13253 postinstall_cmds='base_file=`basename \$file`~
13254 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13255 dldir=$destdir/`dirname \$dlpath`~
13256 test -d \$dldir || mkdir -p \$dldir~
13257 $install_prog $dir/$dlname \$dldir/$dlname'
13258 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13259 dlpath=$dir/\$dldll~
13260 $RM \$dlpath'
13261 shlibpath_overrides_runpath=yes
13262 dynamic_linker='Win32 link.exe'
13263 ;;
13264
13265 *)
13266 # Assume MSVC wrapper
13267 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13268 dynamic_linker='Win32 ld.exe'
13269 ;;
13270 esac
13271 # FIXME: first we should search . and the directory the executable is in
13272 shlibpath_var=PATH
13273 ;;
13274
13275 darwin* | rhapsody*)
13276 dynamic_linker="$host_os dyld"
13277 version_type=darwin
13278 need_lib_prefix=no
13279 need_version=no
13280 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13281 soname_spec='$libname$release$major$shared_ext'
13282 shlibpath_overrides_runpath=yes
13283 shlibpath_var=DYLD_LIBRARY_PATH
13284 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13285
13286 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13287 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13288 ;;
13289
13290 dgux*)
13291 version_type=linux # correct to gnu/linux during the next big refactor
13292 need_lib_prefix=no
13293 need_version=no
13294 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13295 soname_spec='$libname$release$shared_ext$major'
13296 shlibpath_var=LD_LIBRARY_PATH
13297 ;;
13298
13299 freebsd* | dragonfly*)
13300 # DragonFly does not have aout. When/if they implement a new
13301 # versioning mechanism, adjust this.
13302 if test -x /usr/bin/objformat; then
13303 objformat=`/usr/bin/objformat`
13304 else
13305 case $host_os in
13306 freebsd[23].*) objformat=aout ;;
13307 *) objformat=elf ;;
13308 esac
13309 fi
13310 version_type=freebsd-$objformat
13311 case $version_type in
13312 freebsd-elf*)
13313 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13314 soname_spec='$libname$release$shared_ext$major'
13315 need_version=no
13316 need_lib_prefix=no
13317 ;;
13318 freebsd-*)
13319 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13320 need_version=yes
13321 ;;
13322 esac
13323 shlibpath_var=LD_LIBRARY_PATH
13324 case $host_os in
13325 freebsd2.*)
13326 shlibpath_overrides_runpath=yes
13327 ;;
13328 freebsd3.[01]* | freebsdelf3.[01]*)
13329 shlibpath_overrides_runpath=yes
13330 hardcode_into_libs=yes
13331 ;;
13332 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13333 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13334 shlibpath_overrides_runpath=no
13335 hardcode_into_libs=yes
13336 ;;
13337 *) # from 4.6 on, and DragonFly
13338 shlibpath_overrides_runpath=yes
13339 hardcode_into_libs=yes
13340 ;;
13341 esac
13342 ;;
13343
13344 haiku*)
13345 version_type=linux # correct to gnu/linux during the next big refactor
13346 need_lib_prefix=no
13347 need_version=no
13348 dynamic_linker="$host_os runtime_loader"
13349 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13350 soname_spec='$libname$release$shared_ext$major'
13351 shlibpath_var=LIBRARY_PATH
13352 shlibpath_overrides_runpath=no
13353 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13354 hardcode_into_libs=yes
13355 ;;
13356
13357 hpux9* | hpux10* | hpux11*)
13358 # Give a soname corresponding to the major version so that dld.sl refuses to
13359 # link against other versions.
13360 version_type=sunos
13361 need_lib_prefix=no
13362 need_version=no
13363 case $host_cpu in
13364 ia64*)
13365 shrext_cmds='.so'
13366 hardcode_into_libs=yes
13367 dynamic_linker="$host_os dld.so"
13368 shlibpath_var=LD_LIBRARY_PATH
13369 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13370 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13371 soname_spec='$libname$release$shared_ext$major'
13372 if test 32 = "$HPUX_IA64_MODE"; then
13373 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13374 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13375 else
13376 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13377 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13378 fi
13379 ;;
13380 hppa*64*)
13381 shrext_cmds='.sl'
13382 hardcode_into_libs=yes
13383 dynamic_linker="$host_os dld.sl"
13384 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13385 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13386 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13387 soname_spec='$libname$release$shared_ext$major'
13388 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13389 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13390 ;;
13391 *)
13392 shrext_cmds='.sl'
13393 dynamic_linker="$host_os dld.sl"
13394 shlibpath_var=SHLIB_PATH
13395 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13396 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13397 soname_spec='$libname$release$shared_ext$major'
13398 ;;
13399 esac
13400 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13401 postinstall_cmds='chmod 555 $lib'
13402 # or fails outright, so override atomically:
13403 install_override_mode=555
13404 ;;
13405
13406 interix[3-9]*)
13407 version_type=linux # correct to gnu/linux during the next big refactor
13408 need_lib_prefix=no
13409 need_version=no
13410 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13411 soname_spec='$libname$release$shared_ext$major'
13412 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13413 shlibpath_var=LD_LIBRARY_PATH
13414 shlibpath_overrides_runpath=no
13415 hardcode_into_libs=yes
13416 ;;
13417
13418 irix5* | irix6* | nonstopux*)
13419 case $host_os in
13420 nonstopux*) version_type=nonstopux ;;
13421 *)
13422 if test yes = "$lt_cv_prog_gnu_ld"; then
13423 version_type=linux # correct to gnu/linux during the next big refactor
13424 else
13425 version_type=irix
13426 fi ;;
13427 esac
13428 need_lib_prefix=no
13429 need_version=no
13430 soname_spec='$libname$release$shared_ext$major'
13431 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13432 case $host_os in
13433 irix5* | nonstopux*)
13434 libsuff= shlibsuff=
13435 ;;
13436 *)
13437 case $LD in # libtool.m4 will add one of these switches to LD
13438 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13439 libsuff= shlibsuff= libmagic=32-bit;;
13440 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13441 libsuff=32 shlibsuff=N32 libmagic=N32;;
13442 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13443 libsuff=64 shlibsuff=64 libmagic=64-bit;;
13444 *) libsuff= shlibsuff= libmagic=never-match;;
13445 esac
13446 ;;
13447 esac
13448 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13449 shlibpath_overrides_runpath=no
13450 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13451 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13452 hardcode_into_libs=yes
13453 ;;
13454
13455 # No shared lib support for Linux oldld, aout, or coff.
13456 linux*oldld* | linux*aout* | linux*coff*)
13457 dynamic_linker=no
13458 ;;
13459
13460 linux*android*)
13461 version_type=none # Android doesn't support versioned libraries.
13462 need_lib_prefix=no
13463 need_version=no
13464 library_names_spec='$libname$release$shared_ext'
13465 soname_spec='$libname$release$shared_ext'
13466 finish_cmds=
13467 shlibpath_var=LD_LIBRARY_PATH
13468 shlibpath_overrides_runpath=yes
13469
13470 # This implies no fast_install, which is unacceptable.
13471 # Some rework will be needed to allow for fast_install
13472 # before this can be enabled.
13473 hardcode_into_libs=yes
13474
13475 dynamic_linker='Android linker'
13476 # Don't embed -rpath directories since the linker doesn't support them.
13477 hardcode_libdir_flag_spec='-L$libdir'
13478 ;;
13479
13480 # This must be glibc/ELF.
13481 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13482 version_type=linux # correct to gnu/linux during the next big refactor
13483 need_lib_prefix=no
13484 need_version=no
13485 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13486 soname_spec='$libname$release$shared_ext$major'
13487 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13488 shlibpath_var=LD_LIBRARY_PATH
13489 shlibpath_overrides_runpath=no
13490
13491 # Some binutils ld are patched to set DT_RUNPATH
13492 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
13493 $as_echo_n "(cached) " >&6
13494 else
13495 lt_cv_shlibpath_overrides_runpath=no
13496 save_LDFLAGS=$LDFLAGS
13497 save_libdir=$libdir
13498 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13499 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13501 /* end confdefs.h. */
13502
13503 int
13504 main ()
13505 {
13506
13507 ;
13508 return 0;
13509 }
13510 _ACEOF
13511 if ac_fn_c_try_link "$LINENO"; then :
13512 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
13513 lt_cv_shlibpath_overrides_runpath=yes
13514 fi
13515 fi
13516 rm -f core conftest.err conftest.$ac_objext \
13517 conftest$ac_exeext conftest.$ac_ext
13518 LDFLAGS=$save_LDFLAGS
13519 libdir=$save_libdir
13520
13521 fi
13522
13523 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13524
13525 # This implies no fast_install, which is unacceptable.
13526 # Some rework will be needed to allow for fast_install
13527 # before this can be enabled.
13528 hardcode_into_libs=yes
13529
13530 # Add ABI-specific directories to the system library path.
13531 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
13532
13533 # Ideally, we could use ldconfig to report *all* directores which are
13534 # searched for libraries, however this is still not possible. Aside from not
13535 # being certain /sbin/ldconfig is available, command
13536 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13537 # even though it is searched at run-time. Try to do the best guess by
13538 # appending ld.so.conf contents (and includes) to the search path.
13539 if test -f /etc/ld.so.conf; then
13540 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' ' '`
13541 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
13542 fi
13543
13544 # We used to test for /lib/ld.so.1 and disable shared libraries on
13545 # powerpc, because MkLinux only supported shared libraries with the
13546 # GNU dynamic linker. Since this was broken with cross compilers,
13547 # most powerpc-linux boxes support dynamic linking these days and
13548 # people can always --disable-shared, the test was removed, and we
13549 # assume the GNU/Linux dynamic linker is in use.
13550 dynamic_linker='GNU/Linux ld.so'
13551 ;;
13552
13553 netbsd*)
13554 version_type=sunos
13555 need_lib_prefix=no
13556 need_version=no
13557 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13558 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13559 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13560 dynamic_linker='NetBSD (a.out) ld.so'
13561 else
13562 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13563 soname_spec='$libname$release$shared_ext$major'
13564 dynamic_linker='NetBSD ld.elf_so'
13565 fi
13566 shlibpath_var=LD_LIBRARY_PATH
13567 shlibpath_overrides_runpath=yes
13568 hardcode_into_libs=yes
13569 ;;
13570
13571 newsos6)
13572 version_type=linux # correct to gnu/linux during the next big refactor
13573 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13574 shlibpath_var=LD_LIBRARY_PATH
13575 shlibpath_overrides_runpath=yes
13576 ;;
13577
13578 *nto* | *qnx*)
13579 version_type=qnx
13580 need_lib_prefix=no
13581 need_version=no
13582 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13583 soname_spec='$libname$release$shared_ext$major'
13584 shlibpath_var=LD_LIBRARY_PATH
13585 shlibpath_overrides_runpath=no
13586 hardcode_into_libs=yes
13587 dynamic_linker='ldqnx.so'
13588 ;;
13589
13590 openbsd* | bitrig*)
13591 version_type=sunos
13592 sys_lib_dlsearch_path_spec=/usr/lib
13593 need_lib_prefix=no
13594 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13595 need_version=no
13596 else
13597 need_version=yes
13598 fi
13599 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13600 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13601 shlibpath_var=LD_LIBRARY_PATH
13602 shlibpath_overrides_runpath=yes
13603 ;;
13604
13605 os2*)
13606 libname_spec='$name'
13607 version_type=windows
13608 shrext_cmds=.dll
13609 need_version=no
13610 need_lib_prefix=no
13611 # OS/2 can only load a DLL with a base name of 8 characters or less.
13612 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13613 v=$($ECHO $release$versuffix | tr -d .-);
13614 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13615 $ECHO $n$v`$shared_ext'
13616 library_names_spec='${libname}_dll.$libext'
13617 dynamic_linker='OS/2 ld.exe'
13618 shlibpath_var=BEGINLIBPATH
13619 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13620 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13621 postinstall_cmds='base_file=`basename \$file`~
13622 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13623 dldir=$destdir/`dirname \$dlpath`~
13624 test -d \$dldir || mkdir -p \$dldir~
13625 $install_prog $dir/$dlname \$dldir/$dlname~
13626 chmod a+x \$dldir/$dlname~
13627 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13628 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13629 fi'
13630 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13631 dlpath=$dir/\$dldll~
13632 $RM \$dlpath'
13633 ;;
13634
13635 osf3* | osf4* | osf5*)
13636 version_type=osf
13637 need_lib_prefix=no
13638 need_version=no
13639 soname_spec='$libname$release$shared_ext$major'
13640 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13641 shlibpath_var=LD_LIBRARY_PATH
13642 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13643 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13644 ;;
13645
13646 rdos*)
13647 dynamic_linker=no
13648 ;;
13649
13650 solaris*)
13651 version_type=linux # correct to gnu/linux during the next big refactor
13652 need_lib_prefix=no
13653 need_version=no
13654 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13655 soname_spec='$libname$release$shared_ext$major'
13656 shlibpath_var=LD_LIBRARY_PATH
13657 shlibpath_overrides_runpath=yes
13658 hardcode_into_libs=yes
13659 # ldd complains unless libraries are executable
13660 postinstall_cmds='chmod +x $lib'
13661 ;;
13662
13663 sunos4*)
13664 version_type=sunos
13665 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13666 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13667 shlibpath_var=LD_LIBRARY_PATH
13668 shlibpath_overrides_runpath=yes
13669 if test yes = "$with_gnu_ld"; then
13670 need_lib_prefix=no
13671 fi
13672 need_version=yes
13673 ;;
13674
13675 sysv4 | sysv4.3*)
13676 version_type=linux # correct to gnu/linux during the next big refactor
13677 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13678 soname_spec='$libname$release$shared_ext$major'
13679 shlibpath_var=LD_LIBRARY_PATH
13680 case $host_vendor in
13681 sni)
13682 shlibpath_overrides_runpath=no
13683 need_lib_prefix=no
13684 runpath_var=LD_RUN_PATH
13685 ;;
13686 siemens)
13687 need_lib_prefix=no
13688 ;;
13689 motorola)
13690 need_lib_prefix=no
13691 need_version=no
13692 shlibpath_overrides_runpath=no
13693 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13694 ;;
13695 esac
13696 ;;
13697
13698 sysv4*MP*)
13699 if test -d /usr/nec; then
13700 version_type=linux # correct to gnu/linux during the next big refactor
13701 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13702 soname_spec='$libname$shared_ext.$major'
13703 shlibpath_var=LD_LIBRARY_PATH
13704 fi
13705 ;;
13706
13707 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13708 version_type=sco
13709 need_lib_prefix=no
13710 need_version=no
13711 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13712 soname_spec='$libname$release$shared_ext$major'
13713 shlibpath_var=LD_LIBRARY_PATH
13714 shlibpath_overrides_runpath=yes
13715 hardcode_into_libs=yes
13716 if test yes = "$with_gnu_ld"; then
13717 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13718 else
13719 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13720 case $host_os in
13721 sco3.2v5*)
13722 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13723 ;;
13724 esac
13725 fi
13726 sys_lib_dlsearch_path_spec='/usr/lib'
13727 ;;
13728
13729 tpf*)
13730 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
13731 version_type=linux # correct to gnu/linux during the next big refactor
13732 need_lib_prefix=no
13733 need_version=no
13734 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13735 shlibpath_var=LD_LIBRARY_PATH
13736 shlibpath_overrides_runpath=no
13737 hardcode_into_libs=yes
13738 ;;
13739
13740 uts4*)
13741 version_type=linux # correct to gnu/linux during the next big refactor
13742 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13743 soname_spec='$libname$release$shared_ext$major'
13744 shlibpath_var=LD_LIBRARY_PATH
13745 ;;
13746
13747 *)
13748 dynamic_linker=no
13749 ;;
13750 esac
13751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13752 $as_echo "$dynamic_linker" >&6; }
13753 test no = "$dynamic_linker" && can_build_shared=no
13754
13755 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13756 if test yes = "$GCC"; then
13757 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13758 fi
13759
13760 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13761 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13762 fi
13763
13764 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13765 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13766 fi
13767
13768 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13769 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13770
13771 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13772 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13773
13774 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13775 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13874 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13875 hardcode_action=
13876 if test -n "$hardcode_libdir_flag_spec" ||
13877 test -n "$runpath_var" ||
13878 test yes = "$hardcode_automatic"; then
13879
13880 # We can hardcode non-existent directories.
13881 if test no != "$hardcode_direct" &&
13882 # If the only mechanism to avoid hardcoding is shlibpath_var, we
13883 # have to relink, otherwise we might link with an installed library
13884 # when we should be linking with a yet-to-be-installed one
13885 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13886 test no != "$hardcode_minus_L"; then
13887 # Linking always hardcodes the temporary library directory.
13888 hardcode_action=relink
13889 else
13890 # We can link without hardcoding, and we can hardcode nonexisting dirs.
13891 hardcode_action=immediate
13892 fi
13893 else
13894 # We cannot hardcode anything, or else we can only hardcode existing
13895 # directories.
13896 hardcode_action=unsupported
13897 fi
13898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13899 $as_echo "$hardcode_action" >&6; }
13900
13901 if test relink = "$hardcode_action" ||
13902 test yes = "$inherit_rpath"; then
13903 # Fast installation is not supported
13904 enable_fast_install=no
13905 elif test yes = "$shlibpath_overrides_runpath" ||
13906 test no = "$enable_shared"; then
13907 # Fast installation is not necessary
13908 enable_fast_install=needless
13909 fi
13910
13911
13912
13913
13914
13915
13916 if test yes != "$enable_dlopen"; then
13917 enable_dlopen=unknown
13918 enable_dlopen_self=unknown
13919 enable_dlopen_self_static=unknown
13920 else
13921 lt_cv_dlopen=no
13922 lt_cv_dlopen_libs=
13923
13924 case $host_os in
13925 beos*)
13926 lt_cv_dlopen=load_add_on
13927 lt_cv_dlopen_libs=
13928 lt_cv_dlopen_self=yes
13929 ;;
13930
13931 mingw* | pw32* | cegcc*)
13932 lt_cv_dlopen=LoadLibrary
13933 lt_cv_dlopen_libs=
13934 ;;
13935
13936 cygwin*)
13937 lt_cv_dlopen=dlopen
13938 lt_cv_dlopen_libs=
13939 ;;
13940
13941 darwin*)
13942 # if libdl is installed we need to link against it
13943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13944 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13945 if ${ac_cv_lib_dl_dlopen+:} false; then :
13946 $as_echo_n "(cached) " >&6
13947 else
13948 ac_check_lib_save_LIBS=$LIBS
13949 LIBS="-ldl $LIBS"
13950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13951 /* end confdefs.h. */
13952
13953 /* Override any GCC internal prototype to avoid an error.
13954 Use char because int might match the return type of a GCC
13955 builtin and then its argument prototype would still apply. */
13956 #ifdef __cplusplus
13957 extern "C"
13958 #endif
13959 char dlopen ();
13960 int
13961 main ()
13962 {
13963 return dlopen ();
13964 ;
13965 return 0;
13966 }
13967 _ACEOF
13968 if ac_fn_c_try_link "$LINENO"; then :
13969 ac_cv_lib_dl_dlopen=yes
13970 else
13971 ac_cv_lib_dl_dlopen=no
13972 fi
13973 rm -f core conftest.err conftest.$ac_objext \
13974 conftest$ac_exeext conftest.$ac_ext
13975 LIBS=$ac_check_lib_save_LIBS
13976 fi
13977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13978 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13979 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13980 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13981 else
13982
13983 lt_cv_dlopen=dyld
13984 lt_cv_dlopen_libs=
13985 lt_cv_dlopen_self=yes
13986
13987 fi
13988
13989 ;;
13990
13991 tpf*)
13992 # Don't try to run any link tests for TPF. We know it's impossible
13993 # because TPF is a cross-compiler, and we know how we open DSOs.
13994 lt_cv_dlopen=dlopen
13995 lt_cv_dlopen_libs=
13996 lt_cv_dlopen_self=no
13997 ;;
13998
13999 *)
14000 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
14001 if test "x$ac_cv_func_shl_load" = xyes; then :
14002 lt_cv_dlopen=shl_load
14003 else
14004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
14005 $as_echo_n "checking for shl_load in -ldld... " >&6; }
14006 if ${ac_cv_lib_dld_shl_load+:} false; then :
14007 $as_echo_n "(cached) " >&6
14008 else
14009 ac_check_lib_save_LIBS=$LIBS
14010 LIBS="-ldld $LIBS"
14011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14012 /* end confdefs.h. */
14013
14014 /* Override any GCC internal prototype to avoid an error.
14015 Use char because int might match the return type of a GCC
14016 builtin and then its argument prototype would still apply. */
14017 #ifdef __cplusplus
14018 extern "C"
14019 #endif
14020 char shl_load ();
14021 int
14022 main ()
14023 {
14024 return shl_load ();
14025 ;
14026 return 0;
14027 }
14028 _ACEOF
14029 if ac_fn_c_try_link "$LINENO"; then :
14030 ac_cv_lib_dld_shl_load=yes
14031 else
14032 ac_cv_lib_dld_shl_load=no
14033 fi
14034 rm -f core conftest.err conftest.$ac_objext \
14035 conftest$ac_exeext conftest.$ac_ext
14036 LIBS=$ac_check_lib_save_LIBS
14037 fi
14038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
14039 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
14040 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
14041 lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
14042 else
14043 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
14044 if test "x$ac_cv_func_dlopen" = xyes; then :
14045 lt_cv_dlopen=dlopen
14046 else
14047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14048 $as_echo_n "checking for dlopen in -ldl... " >&6; }
14049 if ${ac_cv_lib_dl_dlopen+:} false; then :
14050 $as_echo_n "(cached) " >&6
14051 else
14052 ac_check_lib_save_LIBS=$LIBS
14053 LIBS="-ldl $LIBS"
14054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14055 /* end confdefs.h. */
14056
14057 /* Override any GCC internal prototype to avoid an error.
14058 Use char because int might match the return type of a GCC
14059 builtin and then its argument prototype would still apply. */
14060 #ifdef __cplusplus
14061 extern "C"
14062 #endif
14063 char dlopen ();
14064 int
14065 main ()
14066 {
14067 return dlopen ();
14068 ;
14069 return 0;
14070 }
14071 _ACEOF
14072 if ac_fn_c_try_link "$LINENO"; then :
14073 ac_cv_lib_dl_dlopen=yes
14074 else
14075 ac_cv_lib_dl_dlopen=no
14076 fi
14077 rm -f core conftest.err conftest.$ac_objext \
14078 conftest$ac_exeext conftest.$ac_ext
14079 LIBS=$ac_check_lib_save_LIBS
14080 fi
14081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14082 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14083 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14084 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14085 else
14086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
14087 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
14088 if ${ac_cv_lib_svld_dlopen+:} false; then :
14089 $as_echo_n "(cached) " >&6
14090 else
14091 ac_check_lib_save_LIBS=$LIBS
14092 LIBS="-lsvld $LIBS"
14093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14094 /* end confdefs.h. */
14095
14096 /* Override any GCC internal prototype to avoid an error.
14097 Use char because int might match the return type of a GCC
14098 builtin and then its argument prototype would still apply. */
14099 #ifdef __cplusplus
14100 extern "C"
14101 #endif
14102 char dlopen ();
14103 int
14104 main ()
14105 {
14106 return dlopen ();
14107 ;
14108 return 0;
14109 }
14110 _ACEOF
14111 if ac_fn_c_try_link "$LINENO"; then :
14112 ac_cv_lib_svld_dlopen=yes
14113 else
14114 ac_cv_lib_svld_dlopen=no
14115 fi
14116 rm -f core conftest.err conftest.$ac_objext \
14117 conftest$ac_exeext conftest.$ac_ext
14118 LIBS=$ac_check_lib_save_LIBS
14119 fi
14120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
14121 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
14122 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
14123 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
14124 else
14125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
14126 $as_echo_n "checking for dld_link in -ldld... " >&6; }
14127 if ${ac_cv_lib_dld_dld_link+:} false; then :
14128 $as_echo_n "(cached) " >&6
14129 else
14130 ac_check_lib_save_LIBS=$LIBS
14131 LIBS="-ldld $LIBS"
14132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14133 /* end confdefs.h. */
14134
14135 /* Override any GCC internal prototype to avoid an error.
14136 Use char because int might match the return type of a GCC
14137 builtin and then its argument prototype would still apply. */
14138 #ifdef __cplusplus
14139 extern "C"
14140 #endif
14141 char dld_link ();
14142 int
14143 main ()
14144 {
14145 return dld_link ();
14146 ;
14147 return 0;
14148 }
14149 _ACEOF
14150 if ac_fn_c_try_link "$LINENO"; then :
14151 ac_cv_lib_dld_dld_link=yes
14152 else
14153 ac_cv_lib_dld_dld_link=no
14154 fi
14155 rm -f core conftest.err conftest.$ac_objext \
14156 conftest$ac_exeext conftest.$ac_ext
14157 LIBS=$ac_check_lib_save_LIBS
14158 fi
14159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
14160 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
14161 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
14162 lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
14163 fi
14164
14165
14166 fi
14167
14168
14169 fi
14170
14171
14172 fi
14173
14174
14175 fi
14176
14177
14178 fi
14179
14180 ;;
14181 esac
14182
14183 if test no = "$lt_cv_dlopen"; then
14184 enable_dlopen=no
14185 else
14186 enable_dlopen=yes
14187 fi
14188
14189 case $lt_cv_dlopen in
14190 dlopen)
14191 save_CPPFLAGS=$CPPFLAGS
14192 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14193
14194 save_LDFLAGS=$LDFLAGS
14195 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14196
14197 save_LIBS=$LIBS
14198 LIBS="$lt_cv_dlopen_libs $LIBS"
14199
14200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
14201 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
14202 if ${lt_cv_dlopen_self+:} false; then :
14203 $as_echo_n "(cached) " >&6
14204 else
14205 if test yes = "$cross_compiling"; then :
14206 lt_cv_dlopen_self=cross
14207 else
14208 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14209 lt_status=$lt_dlunknown
14210 cat > conftest.$ac_ext <<_LT_EOF
14211 #line $LINENO "configure"
14212 #include "confdefs.h"
14213
14214 #if HAVE_DLFCN_H
14215 #include <dlfcn.h>
14216 #endif
14217
14218 #include <stdio.h>
14219
14220 #ifdef RTLD_GLOBAL
14221 # define LT_DLGLOBAL RTLD_GLOBAL
14222 #else
14223 # ifdef DL_GLOBAL
14224 # define LT_DLGLOBAL DL_GLOBAL
14225 # else
14226 # define LT_DLGLOBAL 0
14227 # endif
14228 #endif
14229
14230 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14231 find out it does not work in some platform. */
14232 #ifndef LT_DLLAZY_OR_NOW
14233 # ifdef RTLD_LAZY
14234 # define LT_DLLAZY_OR_NOW RTLD_LAZY
14235 # else
14236 # ifdef DL_LAZY
14237 # define LT_DLLAZY_OR_NOW DL_LAZY
14238 # else
14239 # ifdef RTLD_NOW
14240 # define LT_DLLAZY_OR_NOW RTLD_NOW
14241 # else
14242 # ifdef DL_NOW
14243 # define LT_DLLAZY_OR_NOW DL_NOW
14244 # else
14245 # define LT_DLLAZY_OR_NOW 0
14246 # endif
14247 # endif
14248 # endif
14249 # endif
14250 #endif
14251
14252 /* When -fvisibility=hidden is used, assume the code has been annotated
14253 correspondingly for the symbols needed. */
14254 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14255 int fnord () __attribute__((visibility("default")));
14256 #endif
14257
14258 int fnord () { return 42; }
14259 int main ()
14260 {
14261 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14262 int status = $lt_dlunknown;
14263
14264 if (self)
14265 {
14266 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
14267 else
14268 {
14269 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
14270 else puts (dlerror ());
14271 }
14272 /* dlclose (self); */
14273 }
14274 else
14275 puts (dlerror ());
14276
14277 return status;
14278 }
14279 _LT_EOF
14280 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14281 (eval $ac_link) 2>&5
14282 ac_status=$?
14283 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14284 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14285 (./conftest; exit; ) >&5 2>/dev/null
14286 lt_status=$?
14287 case x$lt_status in
14288 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14289 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14290 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14291 esac
14292 else :
14293 # compilation failed
14294 lt_cv_dlopen_self=no
14295 fi
14296 fi
14297 rm -fr conftest*
14298
14299
14300 fi
14301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14302 $as_echo "$lt_cv_dlopen_self" >&6; }
14303
14304 if test yes = "$lt_cv_dlopen_self"; then
14305 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14307 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
14308 if ${lt_cv_dlopen_self_static+:} false; then :
14309 $as_echo_n "(cached) " >&6
14310 else
14311 if test yes = "$cross_compiling"; then :
14312 lt_cv_dlopen_self_static=cross
14313 else
14314 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14315 lt_status=$lt_dlunknown
14316 cat > conftest.$ac_ext <<_LT_EOF
14317 #line $LINENO "configure"
14318 #include "confdefs.h"
14319
14320 #if HAVE_DLFCN_H
14321 #include <dlfcn.h>
14322 #endif
14323
14324 #include <stdio.h>
14325
14326 #ifdef RTLD_GLOBAL
14327 # define LT_DLGLOBAL RTLD_GLOBAL
14328 #else
14329 # ifdef DL_GLOBAL
14330 # define LT_DLGLOBAL DL_GLOBAL
14331 # else
14332 # define LT_DLGLOBAL 0
14333 # endif
14334 #endif
14335
14336 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14337 find out it does not work in some platform. */
14338 #ifndef LT_DLLAZY_OR_NOW
14339 # ifdef RTLD_LAZY
14340 # define LT_DLLAZY_OR_NOW RTLD_LAZY
14341 # else
14342 # ifdef DL_LAZY
14343 # define LT_DLLAZY_OR_NOW DL_LAZY
14344 # else
14345 # ifdef RTLD_NOW
14346 # define LT_DLLAZY_OR_NOW RTLD_NOW
14347 # else
14348 # ifdef DL_NOW
14349 # define LT_DLLAZY_OR_NOW DL_NOW
14350 # else
14351 # define LT_DLLAZY_OR_NOW 0
14352 # endif
14353 # endif
14354 # endif
14355 # endif
14356 #endif
14357
14358 /* When -fvisibility=hidden is used, assume the code has been annotated
14359 correspondingly for the symbols needed. */
14360 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14361 int fnord () __attribute__((visibility("default")));
14362 #endif
14363
14364 int fnord () { return 42; }
14365 int main ()
14366 {
14367 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14368 int status = $lt_dlunknown;
14369
14370 if (self)
14371 {
14372 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
14373 else
14374 {
14375 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
14376 else puts (dlerror ());
14377 }
14378 /* dlclose (self); */
14379 }
14380 else
14381 puts (dlerror ());
14382
14383 return status;
14384 }
14385 _LT_EOF
14386 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14387 (eval $ac_link) 2>&5
14388 ac_status=$?
14389 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14390 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14391 (./conftest; exit; ) >&5 2>/dev/null
14392 lt_status=$?
14393 case x$lt_status in
14394 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14395 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14396 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14397 esac
14398 else :
14399 # compilation failed
14400 lt_cv_dlopen_self_static=no
14401 fi
14402 fi
14403 rm -fr conftest*
14404
14405
14406 fi
14407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14408 $as_echo "$lt_cv_dlopen_self_static" >&6; }
14409 fi
14410
14411 CPPFLAGS=$save_CPPFLAGS
14412 LDFLAGS=$save_LDFLAGS
14413 LIBS=$save_LIBS
14414 ;;
14415 esac
14416
14417 case $lt_cv_dlopen_self in
14418 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14419 *) enable_dlopen_self=unknown ;;
14420 esac
14421
14422 case $lt_cv_dlopen_self_static in
14423 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14424 *) enable_dlopen_self_static=unknown ;;
14425 esac
14426 fi
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444 striplib=
14445 old_striplib=
14446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14447 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
14448 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14449 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14450 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14452 $as_echo "yes" >&6; }
14453 else
14454 # FIXME - insert some real tests, host_os isn't really good enough
14455 case $host_os in
14456 darwin*)
14457 if test -n "$STRIP"; then
14458 striplib="$STRIP -x"
14459 old_striplib="$STRIP -S"
14460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14461 $as_echo "yes" >&6; }
14462 else
14463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14464 $as_echo "no" >&6; }
14465 fi
14466 ;;
14467 *)
14468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14469 $as_echo "no" >&6; }
14470 ;;
14471 esac
14472 fi
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485 # Report what library types will actually be built
14486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14487 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
14488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14489 $as_echo "$can_build_shared" >&6; }
14490
14491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14492 $as_echo_n "checking whether to build shared libraries... " >&6; }
14493 test no = "$can_build_shared" && enable_shared=no
14494
14495 # On AIX, shared libraries and static libraries use the same namespace, and
14496 # are all built from PIC.
14497 case $host_os in
14498 aix3*)
14499 test yes = "$enable_shared" && enable_static=no
14500 if test -n "$RANLIB"; then
14501 archive_cmds="$archive_cmds~\$RANLIB \$lib"
14502 postinstall_cmds='$RANLIB $lib'
14503 fi
14504 ;;
14505
14506 aix[4-9]*)
14507 if test ia64 != "$host_cpu"; then
14508 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14509 yes,aix,yes) ;; # shared object as lib.so file only
14510 yes,svr4,*) ;; # shared object as lib.so archive member only
14511 yes,*) enable_static=no ;; # shared object in lib.a archive as well
14512 esac
14513 fi
14514 ;;
14515 esac
14516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14517 $as_echo "$enable_shared" >&6; }
14518
14519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14520 $as_echo_n "checking whether to build static libraries... " >&6; }
14521 # Make sure either enable_shared or enable_static is yes.
14522 test yes = "$enable_shared" || enable_static=yes
14523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14524 $as_echo "$enable_static" >&6; }
14525
14526
14527
14528
14529 fi
14530 ac_ext=c
14531 ac_cpp='$CPP $CPPFLAGS'
14532 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14533 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14534 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14535
14536 CC=$lt_save_CC
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552 ac_config_commands="$ac_config_commands libtool"
14553
14554
14555
14556
14557 # Only expand once:
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
14570 if test -n "$ac_tool_prefix"; then
14571 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
14572 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
14573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14574 $as_echo_n "checking for $ac_word... " >&6; }
14575 if ${ac_cv_path_PKG_CONFIG+:} false; then :
14576 $as_echo_n "(cached) " >&6
14577 else
14578 case $PKG_CONFIG in
14579 [\\/]* | ?:[\\/]*)
14580 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
14581 ;;
14582 *)
14583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14584 for as_dir in $PATH
14585 do
14586 IFS=$as_save_IFS
14587 test -z "$as_dir" && as_dir=.
14588 for ac_exec_ext in '' $ac_executable_extensions; do
14589 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14590 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14592 break 2
14593 fi
14594 done
14595 done
14596 IFS=$as_save_IFS
14597
14598 ;;
14599 esac
14600 fi
14601 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
14602 if test -n "$PKG_CONFIG"; then
14603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
14604 $as_echo "$PKG_CONFIG" >&6; }
14605 else
14606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14607 $as_echo "no" >&6; }
14608 fi
14609
14610
14611 fi
14612 if test -z "$ac_cv_path_PKG_CONFIG"; then
14613 ac_pt_PKG_CONFIG=$PKG_CONFIG
14614 # Extract the first word of "pkg-config", so it can be a program name with args.
14615 set dummy pkg-config; ac_word=$2
14616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14617 $as_echo_n "checking for $ac_word... " >&6; }
14618 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
14619 $as_echo_n "(cached) " >&6
14620 else
14621 case $ac_pt_PKG_CONFIG in
14622 [\\/]* | ?:[\\/]*)
14623 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
14624 ;;
14625 *)
14626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14627 for as_dir in $PATH
14628 do
14629 IFS=$as_save_IFS
14630 test -z "$as_dir" && as_dir=.
14631 for ac_exec_ext in '' $ac_executable_extensions; do
14632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14633 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14635 break 2
14636 fi
14637 done
14638 done
14639 IFS=$as_save_IFS
14640
14641 ;;
14642 esac
14643 fi
14644 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
14645 if test -n "$ac_pt_PKG_CONFIG"; then
14646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
14647 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
14648 else
14649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14650 $as_echo "no" >&6; }
14651 fi
14652
14653 if test "x$ac_pt_PKG_CONFIG" = x; then
14654 PKG_CONFIG=""
14655 else
14656 case $cross_compiling:$ac_tool_warned in
14657 yes:)
14658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14659 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14660 ac_tool_warned=yes ;;
14661 esac
14662 PKG_CONFIG=$ac_pt_PKG_CONFIG
14663 fi
14664 else
14665 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
14666 fi
14667
14668 fi
14669 if test -n "$PKG_CONFIG"; then
14670 _pkg_min_version=0.9.0
14671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
14672 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
14673 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
14674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14675 $as_echo "yes" >&6; }
14676 else
14677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14678 $as_echo "no" >&6; }
14679 PKG_CONFIG=""
14680 fi
14681 fi
14682
14683 # Checks for header files.
14684 for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h
14685 do :
14686 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14687 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
14688 "
14689 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14690 cat >>confdefs.h <<_ACEOF
14691 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14692 _ACEOF
14693
14694 fi
14695
14696 done
14697
14698
14699 # check for types.
14700 # Using own tests for int64* because autoconf builtin only give 32bit.
14701 ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
14702 if test "x$ac_cv_type_int8_t" = xyes; then :
14703
14704 else
14705
14706 cat >>confdefs.h <<_ACEOF
14707 #define int8_t signed char
14708 _ACEOF
14709
14710 fi
14711
14712 ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
14713 if test "x$ac_cv_type_int16_t" = xyes; then :
14714
14715 else
14716
14717 cat >>confdefs.h <<_ACEOF
14718 #define int16_t short
14719 _ACEOF
14720
14721 fi
14722
14723 ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
14724 if test "x$ac_cv_type_int32_t" = xyes; then :
14725
14726 else
14727
14728 cat >>confdefs.h <<_ACEOF
14729 #define int32_t int
14730 _ACEOF
14731
14732 fi
14733
14734 ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
14735 if test "x$ac_cv_type_int64_t" = xyes; then :
14736
14737 else
14738
14739 cat >>confdefs.h <<_ACEOF
14740 #define int64_t long long
14741 _ACEOF
14742
14743 fi
14744
14745 ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
14746 if test "x$ac_cv_type_uint8_t" = xyes; then :
14747
14748 else
14749
14750 cat >>confdefs.h <<_ACEOF
14751 #define uint8_t unsigned char
14752 _ACEOF
14753
14754 fi
14755
14756 ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
14757 if test "x$ac_cv_type_uint16_t" = xyes; then :
14758
14759 else
14760
14761 cat >>confdefs.h <<_ACEOF
14762 #define uint16_t unsigned short
14763 _ACEOF
14764
14765 fi
14766
14767 ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
14768 if test "x$ac_cv_type_uint32_t" = xyes; then :
14769
14770 else
14771
14772 cat >>confdefs.h <<_ACEOF
14773 #define uint32_t unsigned int
14774 _ACEOF
14775
14776 fi
14777
14778 ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
14779 if test "x$ac_cv_type_uint64_t" = xyes; then :
14780
14781 else
14782
14783 cat >>confdefs.h <<_ACEOF
14784 #define uint64_t unsigned long long
14785 _ACEOF
14786
14787 fi
14788
14789 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14790 if test "x$ac_cv_type_size_t" = xyes; then :
14791
14792 else
14793
14794 cat >>confdefs.h <<_ACEOF
14795 #define size_t unsigned int
14796 _ACEOF
14797
14798 fi
14799
14800 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
14801 if test "x$ac_cv_type_ssize_t" = xyes; then :
14802
14803 else
14804
14805 cat >>confdefs.h <<_ACEOF
14806 #define ssize_t int
14807 _ACEOF
14808
14809 fi
14810
14811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
14812 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
14813 if ${ac_cv_type_uid_t+:} false; then :
14814 $as_echo_n "(cached) " >&6
14815 else
14816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14817 /* end confdefs.h. */
14818 #include <sys/types.h>
14819
14820 _ACEOF
14821 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14822 $EGREP "uid_t" >/dev/null 2>&1; then :
14823 ac_cv_type_uid_t=yes
14824 else
14825 ac_cv_type_uid_t=no
14826 fi
14827 rm -f conftest*
14828
14829 fi
14830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
14831 $as_echo "$ac_cv_type_uid_t" >&6; }
14832 if test $ac_cv_type_uid_t = no; then
14833
14834 $as_echo "#define uid_t int" >>confdefs.h
14835
14836
14837 $as_echo "#define gid_t int" >>confdefs.h
14838
14839 fi
14840
14841 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14842 if test "x$ac_cv_type_pid_t" = xyes; then :
14843
14844 else
14845
14846 cat >>confdefs.h <<_ACEOF
14847 #define pid_t int
14848 _ACEOF
14849
14850 fi
14851
14852 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
14853 if test "x$ac_cv_type_off_t" = xyes; then :
14854
14855 else
14856
14857 cat >>confdefs.h <<_ACEOF
14858 #define off_t long int
14859 _ACEOF
14860
14861 fi
14862
14863 ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
14864 $ac_includes_default
14865 #ifdef HAVE_WINSOCK2_H
14866 # include <winsock2.h>
14867 #endif
14868
14869 "
14870 if test "x$ac_cv_type_u_char" = xyes; then :
14871
14872 else
14873
14874 $as_echo "#define u_char unsigned char" >>confdefs.h
14875
14876 fi
14877
14878 ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
14879 $ac_includes_default
14880 #ifdef HAVE_SYS_RESOURCE_H
14881 # include <sys/resource.h>
14882 #endif
14883
14884 "
14885 if test "x$ac_cv_type_rlim_t" = xyes; then :
14886
14887 else
14888
14889 $as_echo "#define rlim_t unsigned long" >>confdefs.h
14890
14891 fi
14892
14893
14894 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
14895 $ac_includes_default
14896 #ifdef HAVE_SYS_SOCKET_H
14897 # include <sys/socket.h>
14898 #endif
14899 #ifdef HAVE_WS2TCPIP_H
14900 # include <ws2tcpip.h>
14901 #endif
14902
14903 "
14904 if test "x$ac_cv_type_socklen_t" = xyes; then :
14905
14906 else
14907
14908 $as_echo "#define socklen_t int" >>confdefs.h
14909
14910 fi
14911
14912 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
14913 $ac_includes_default
14914 #ifdef HAVE_SYS_TYPES_H
14915 # include <sys/types.h>
14916 #endif
14917 #ifdef HAVE_NETINET_IN_H
14918 # include <netinet/in.h>
14919 #endif
14920
14921 "
14922 if test "x$ac_cv_type_in_addr_t" = xyes; then :
14923
14924 else
14925
14926 $as_echo "#define in_addr_t uint32_t" >>confdefs.h
14927
14928 fi
14929
14930 ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
14931 $ac_includes_default
14932 #ifdef HAVE_SYS_TYPES_H
14933 # include <sys/types.h>
14934 #endif
14935 #ifdef HAVE_NETINET_IN_H
14936 # include <netinet/in.h>
14937 #endif
14938
14939 "
14940 if test "x$ac_cv_type_in_port_t" = xyes; then :
14941
14942 else
14943
14944 $as_echo "#define in_port_t uint16_t" >>confdefs.h
14945
14946 fi
14947
14948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
14949 $as_echo_n "checking if memcmp compares unsigned... " >&6; }
14950 if test "$cross_compiling" = yes; then :
14951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
14952 $as_echo "cross-compile no" >&6; }
14953
14954 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14955
14956 case " $LIBOBJS " in
14957 *" memcmp.$ac_objext "* ) ;;
14958 *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14959 ;;
14960 esac
14961
14962
14963 else
14964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14965 /* end confdefs.h. */
14966
14967 #include <stdio.h>
14968 #include <stdlib.h>
14969 #include <string.h>
14970 int main(void)
14971 {
14972 char a = 255, b = 0;
14973 if(memcmp(&a, &b, 1) < 0)
14974 return 1;
14975 return 0;
14976 }
14977
14978 _ACEOF
14979 if ac_fn_c_try_run "$LINENO"; then :
14980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14981 $as_echo "yes" >&6; }
14982 else
14983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14984 $as_echo "no" >&6; }
14985
14986 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14987
14988 case " $LIBOBJS " in
14989 *" memcmp.$ac_objext "* ) ;;
14990 *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14991 ;;
14992 esac
14993
14994
14995 fi
14996 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14997 conftest.$ac_objext conftest.beam conftest.$ac_ext
14998 fi
14999
15000
15001 # The cast to long int works around a bug in the HP C Compiler
15002 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15003 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15004 # This bug is HP SR number 8606223364.
15005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
15006 $as_echo_n "checking size of time_t... " >&6; }
15007 if ${ac_cv_sizeof_time_t+:} false; then :
15008 $as_echo_n "(cached) " >&6
15009 else
15010 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
15011 $ac_includes_default
15012 #ifdef TIME_WITH_SYS_TIME
15013 # include <sys/time.h>
15014 # include <time.h>
15015 #else
15016 # ifdef HAVE_SYS_TIME_H
15017 # include <sys/time.h>
15018 # else
15019 # include <time.h>
15020 # endif
15021 #endif
15022
15023 "; then :
15024
15025 else
15026 if test "$ac_cv_type_time_t" = yes; then
15027 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15028 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15029 as_fn_error 77 "cannot compute sizeof (time_t)
15030 See \`config.log' for more details" "$LINENO" 5; }
15031 else
15032 ac_cv_sizeof_time_t=0
15033 fi
15034 fi
15035
15036 fi
15037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
15038 $as_echo "$ac_cv_sizeof_time_t" >&6; }
15039
15040
15041
15042 cat >>confdefs.h <<_ACEOF
15043 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
15044 _ACEOF
15045
15046
15047
15048 # add option to disable the evil rpath
15049
15050 # Check whether --enable-rpath was given.
15051 if test "${enable_rpath+set}" = set; then :
15052 enableval=$enable_rpath; enable_rpath=$enableval
15053 else
15054 enable_rpath=yes
15055 fi
15056
15057 if test "x$enable_rpath" = xno; then
15058 ac_config_commands="$ac_config_commands disable-rpath"
15059
15060 fi
15061
15062
15063
15064 # check to see if libraries are needed for these functions.
15065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
15066 $as_echo_n "checking for library containing inet_pton... " >&6; }
15067 if ${ac_cv_search_inet_pton+:} false; then :
15068 $as_echo_n "(cached) " >&6
15069 else
15070 ac_func_search_save_LIBS=$LIBS
15071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15072 /* end confdefs.h. */
15073
15074 /* Override any GCC internal prototype to avoid an error.
15075 Use char because int might match the return type of a GCC
15076 builtin and then its argument prototype would still apply. */
15077 #ifdef __cplusplus
15078 extern "C"
15079 #endif
15080 char inet_pton ();
15081 int
15082 main ()
15083 {
15084 return inet_pton ();
15085 ;
15086 return 0;
15087 }
15088 _ACEOF
15089 for ac_lib in '' nsl; do
15090 if test -z "$ac_lib"; then
15091 ac_res="none required"
15092 else
15093 ac_res=-l$ac_lib
15094 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15095 fi
15096 if ac_fn_c_try_link "$LINENO"; then :
15097 ac_cv_search_inet_pton=$ac_res
15098 fi
15099 rm -f core conftest.err conftest.$ac_objext \
15100 conftest$ac_exeext
15101 if ${ac_cv_search_inet_pton+:} false; then :
15102 break
15103 fi
15104 done
15105 if ${ac_cv_search_inet_pton+:} false; then :
15106
15107 else
15108 ac_cv_search_inet_pton=no
15109 fi
15110 rm conftest.$ac_ext
15111 LIBS=$ac_func_search_save_LIBS
15112 fi
15113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
15114 $as_echo "$ac_cv_search_inet_pton" >&6; }
15115 ac_res=$ac_cv_search_inet_pton
15116 if test "$ac_res" != no; then :
15117 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15118
15119 fi
15120
15121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
15122 $as_echo_n "checking for library containing socket... " >&6; }
15123 if ${ac_cv_search_socket+:} false; then :
15124 $as_echo_n "(cached) " >&6
15125 else
15126 ac_func_search_save_LIBS=$LIBS
15127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15128 /* end confdefs.h. */
15129
15130 /* Override any GCC internal prototype to avoid an error.
15131 Use char because int might match the return type of a GCC
15132 builtin and then its argument prototype would still apply. */
15133 #ifdef __cplusplus
15134 extern "C"
15135 #endif
15136 char socket ();
15137 int
15138 main ()
15139 {
15140 return socket ();
15141 ;
15142 return 0;
15143 }
15144 _ACEOF
15145 for ac_lib in '' socket; do
15146 if test -z "$ac_lib"; then
15147 ac_res="none required"
15148 else
15149 ac_res=-l$ac_lib
15150 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15151 fi
15152 if ac_fn_c_try_link "$LINENO"; then :
15153 ac_cv_search_socket=$ac_res
15154 fi
15155 rm -f core conftest.err conftest.$ac_objext \
15156 conftest$ac_exeext
15157 if ${ac_cv_search_socket+:} false; then :
15158 break
15159 fi
15160 done
15161 if ${ac_cv_search_socket+:} false; then :
15162
15163 else
15164 ac_cv_search_socket=no
15165 fi
15166 rm conftest.$ac_ext
15167 LIBS=$ac_func_search_save_LIBS
15168 fi
15169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
15170 $as_echo "$ac_cv_search_socket" >&6; }
15171 ac_res=$ac_cv_search_socket
15172 if test "$ac_res" != no; then :
15173 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15174
15175 fi
15176
15177
15178 # check wether strptime also works
15179
15180 # check some functions of the OS before linking libs (while still runnable).
15181 for ac_header in unistd.h
15182 do :
15183 ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
15184 if test "x$ac_cv_header_unistd_h" = xyes; then :
15185 cat >>confdefs.h <<_ACEOF
15186 #define HAVE_UNISTD_H 1
15187 _ACEOF
15188
15189 fi
15190
15191 done
15192
15193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
15194 $as_echo_n "checking for working chown... " >&6; }
15195 if ${ac_cv_func_chown_works+:} false; then :
15196 $as_echo_n "(cached) " >&6
15197 else
15198 if test "$cross_compiling" = yes; then :
15199 ac_cv_func_chown_works=no
15200 else
15201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15202 /* end confdefs.h. */
15203 $ac_includes_default
15204 #include <fcntl.h>
15205
15206 int
15207 main ()
15208 {
15209 char *f = "conftest.chown";
15210 struct stat before, after;
15211
15212 if (creat (f, 0600) < 0)
15213 return 1;
15214 if (stat (f, &before) < 0)
15215 return 1;
15216 if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
15217 return 1;
15218 if (stat (f, &after) < 0)
15219 return 1;
15220 return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
15221
15222 ;
15223 return 0;
15224 }
15225 _ACEOF
15226 if ac_fn_c_try_run "$LINENO"; then :
15227 ac_cv_func_chown_works=yes
15228 else
15229 ac_cv_func_chown_works=no
15230 fi
15231 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15232 conftest.$ac_objext conftest.beam conftest.$ac_ext
15233 fi
15234
15235 rm -f conftest.chown
15236
15237 fi
15238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
15239 $as_echo "$ac_cv_func_chown_works" >&6; }
15240 if test $ac_cv_func_chown_works = yes; then
15241
15242 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
15243
15244 fi
15245
15246 for ac_header in vfork.h
15247 do :
15248 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15249 if test "x$ac_cv_header_vfork_h" = xyes; then :
15250 cat >>confdefs.h <<_ACEOF
15251 #define HAVE_VFORK_H 1
15252 _ACEOF
15253
15254 fi
15255
15256 done
15257
15258 for ac_func in fork vfork
15259 do :
15260 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15261 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15262 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15263 cat >>confdefs.h <<_ACEOF
15264 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15265 _ACEOF
15266
15267 fi
15268 done
15269
15270 if test "x$ac_cv_func_fork" = xyes; then
15271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15272 $as_echo_n "checking for working fork... " >&6; }
15273 if ${ac_cv_func_fork_works+:} false; then :
15274 $as_echo_n "(cached) " >&6
15275 else
15276 if test "$cross_compiling" = yes; then :
15277 ac_cv_func_fork_works=cross
15278 else
15279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15280 /* end confdefs.h. */
15281 $ac_includes_default
15282 int
15283 main ()
15284 {
15285
15286 /* By Ruediger Kuhlmann. */
15287 return fork () < 0;
15288
15289 ;
15290 return 0;
15291 }
15292 _ACEOF
15293 if ac_fn_c_try_run "$LINENO"; then :
15294 ac_cv_func_fork_works=yes
15295 else
15296 ac_cv_func_fork_works=no
15297 fi
15298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15299 conftest.$ac_objext conftest.beam conftest.$ac_ext
15300 fi
15301
15302 fi
15303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15304 $as_echo "$ac_cv_func_fork_works" >&6; }
15305
15306 else
15307 ac_cv_func_fork_works=$ac_cv_func_fork
15308 fi
15309 if test "x$ac_cv_func_fork_works" = xcross; then
15310 case $host in
15311 *-*-amigaos* | *-*-msdosdjgpp*)
15312 # Override, as these systems have only a dummy fork() stub
15313 ac_cv_func_fork_works=no
15314 ;;
15315 *)
15316 ac_cv_func_fork_works=yes
15317 ;;
15318 esac
15319 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15320 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15321 fi
15322 ac_cv_func_vfork_works=$ac_cv_func_vfork
15323 if test "x$ac_cv_func_vfork" = xyes; then
15324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15325 $as_echo_n "checking for working vfork... " >&6; }
15326 if ${ac_cv_func_vfork_works+:} false; then :
15327 $as_echo_n "(cached) " >&6
15328 else
15329 if test "$cross_compiling" = yes; then :
15330 ac_cv_func_vfork_works=cross
15331 else
15332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15333 /* end confdefs.h. */
15334 /* Thanks to Paul Eggert for this test. */
15335 $ac_includes_default
15336 #include <sys/wait.h>
15337 #ifdef HAVE_VFORK_H
15338 # include <vfork.h>
15339 #endif
15340 /* On some sparc systems, changes by the child to local and incoming
15341 argument registers are propagated back to the parent. The compiler
15342 is told about this with #include <vfork.h>, but some compilers
15343 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15344 static variable whose address is put into a register that is
15345 clobbered by the vfork. */
15346 static void
15347 #ifdef __cplusplus
15348 sparc_address_test (int arg)
15349 # else
15350 sparc_address_test (arg) int arg;
15351 #endif
15352 {
15353 static pid_t child;
15354 if (!child) {
15355 child = vfork ();
15356 if (child < 0) {
15357 perror ("vfork");
15358 _exit(2);
15359 }
15360 if (!child) {
15361 arg = getpid();
15362 write(-1, "", 0);
15363 _exit (arg);
15364 }
15365 }
15366 }
15367
15368 int
15369 main ()
15370 {
15371 pid_t parent = getpid ();
15372 pid_t child;
15373
15374 sparc_address_test (0);
15375
15376 child = vfork ();
15377
15378 if (child == 0) {
15379 /* Here is another test for sparc vfork register problems. This
15380 test uses lots of local variables, at least as many local
15381 variables as main has allocated so far including compiler
15382 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15383 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15384 reuse the register of parent for one of the local variables,
15385 since it will think that parent can't possibly be used any more
15386 in this routine. Assigning to the local variable will thus
15387 munge parent in the parent process. */
15388 pid_t
15389 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15390 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15391 /* Convince the compiler that p..p7 are live; otherwise, it might
15392 use the same hardware register for all 8 local variables. */
15393 if (p != p1 || p != p2 || p != p3 || p != p4
15394 || p != p5 || p != p6 || p != p7)
15395 _exit(1);
15396
15397 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15398 from child file descriptors. If the child closes a descriptor
15399 before it execs or exits, this munges the parent's descriptor
15400 as well. Test for this by closing stdout in the child. */
15401 _exit(close(fileno(stdout)) != 0);
15402 } else {
15403 int status;
15404 struct stat st;
15405
15406 while (wait(&status) != child)
15407 ;
15408 return (
15409 /* Was there some problem with vforking? */
15410 child < 0
15411
15412 /* Did the child fail? (This shouldn't happen.) */
15413 || status
15414
15415 /* Did the vfork/compiler bug occur? */
15416 || parent != getpid()
15417
15418 /* Did the file descriptor bug occur? */
15419 || fstat(fileno(stdout), &st) != 0
15420 );
15421 }
15422 }
15423 _ACEOF
15424 if ac_fn_c_try_run "$LINENO"; then :
15425 ac_cv_func_vfork_works=yes
15426 else
15427 ac_cv_func_vfork_works=no
15428 fi
15429 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15430 conftest.$ac_objext conftest.beam conftest.$ac_ext
15431 fi
15432
15433 fi
15434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15435 $as_echo "$ac_cv_func_vfork_works" >&6; }
15436
15437 fi;
15438 if test "x$ac_cv_func_fork_works" = xcross; then
15439 ac_cv_func_vfork_works=$ac_cv_func_vfork
15440 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15441 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15442 fi
15443
15444 if test "x$ac_cv_func_vfork_works" = xyes; then
15445
15446 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15447
15448 else
15449
15450 $as_echo "#define vfork fork" >>confdefs.h
15451
15452 fi
15453 if test "x$ac_cv_func_fork_works" = xyes; then
15454
15455 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15456
15457 fi
15458
15459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
15460 $as_echo_n "checking return type of signal handlers... " >&6; }
15461 if ${ac_cv_type_signal+:} false; then :
15462 $as_echo_n "(cached) " >&6
15463 else
15464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15465 /* end confdefs.h. */
15466 #include <sys/types.h>
15467 #include <signal.h>
15468
15469 int
15470 main ()
15471 {
15472 return *(signal (0, 0)) (0) == 1;
15473 ;
15474 return 0;
15475 }
15476 _ACEOF
15477 if ac_fn_c_try_compile "$LINENO"; then :
15478 ac_cv_type_signal=int
15479 else
15480 ac_cv_type_signal=void
15481 fi
15482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15483 fi
15484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
15485 $as_echo "$ac_cv_type_signal" >&6; }
15486
15487 cat >>confdefs.h <<_ACEOF
15488 #define RETSIGTYPE $ac_cv_type_signal
15489 _ACEOF
15490
15491
15492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15493 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15494 if ${ac_cv_sys_largefile_source+:} false; then :
15495 $as_echo_n "(cached) " >&6
15496 else
15497 while :; do
15498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15499 /* end confdefs.h. */
15500 #include <sys/types.h> /* for off_t */
15501 #include <stdio.h>
15502 int
15503 main ()
15504 {
15505 int (*fp) (FILE *, off_t, int) = fseeko;
15506 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15507 ;
15508 return 0;
15509 }
15510 _ACEOF
15511 if ac_fn_c_try_link "$LINENO"; then :
15512 ac_cv_sys_largefile_source=no; break
15513 fi
15514 rm -f core conftest.err conftest.$ac_objext \
15515 conftest$ac_exeext conftest.$ac_ext
15516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15517 /* end confdefs.h. */
15518 #define _LARGEFILE_SOURCE 1
15519 #include <sys/types.h> /* for off_t */
15520 #include <stdio.h>
15521 int
15522 main ()
15523 {
15524 int (*fp) (FILE *, off_t, int) = fseeko;
15525 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15526 ;
15527 return 0;
15528 }
15529 _ACEOF
15530 if ac_fn_c_try_link "$LINENO"; then :
15531 ac_cv_sys_largefile_source=1; break
15532 fi
15533 rm -f core conftest.err conftest.$ac_objext \
15534 conftest$ac_exeext conftest.$ac_ext
15535 ac_cv_sys_largefile_source=unknown
15536 break
15537 done
15538 fi
15539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15540 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15541 case $ac_cv_sys_largefile_source in #(
15542 no | unknown) ;;
15543 *)
15544 cat >>confdefs.h <<_ACEOF
15545 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15546 _ACEOF
15547 ;;
15548 esac
15549 rm -rf conftest*
15550
15551 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15552 # in glibc 2.1.3, but that breaks too many other things.
15553 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15554 if test $ac_cv_sys_largefile_source != unknown; then
15555
15556 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15557
15558 fi
15559
15560
15561 # Check whether --enable-largefile was given.
15562 if test "${enable_largefile+set}" = set; then :
15563 enableval=$enable_largefile;
15564 fi
15565
15566 if test "$enable_largefile" != no; then
15567
15568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15569 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15570 if ${ac_cv_sys_largefile_CC+:} false; then :
15571 $as_echo_n "(cached) " >&6
15572 else
15573 ac_cv_sys_largefile_CC=no
15574 if test "$GCC" != yes; then
15575 ac_save_CC=$CC
15576 while :; do
15577 # IRIX 6.2 and later do not support large files by default,
15578 # so use the C compiler's -n32 option if that helps.
15579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15580 /* end confdefs.h. */
15581 #include <sys/types.h>
15582 /* Check that off_t can represent 2**63 - 1 correctly.
15583 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15584 since some C++ compilers masquerading as C compilers
15585 incorrectly reject 9223372036854775807. */
15586 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15587 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15588 && LARGE_OFF_T % 2147483647 == 1)
15589 ? 1 : -1];
15590 int
15591 main ()
15592 {
15593
15594 ;
15595 return 0;
15596 }
15597 _ACEOF
15598 if ac_fn_c_try_compile "$LINENO"; then :
15599 break
15600 fi
15601 rm -f core conftest.err conftest.$ac_objext
15602 CC="$CC -n32"
15603 if ac_fn_c_try_compile "$LINENO"; then :
15604 ac_cv_sys_largefile_CC=' -n32'; break
15605 fi
15606 rm -f core conftest.err conftest.$ac_objext
15607 break
15608 done
15609 CC=$ac_save_CC
15610 rm -f conftest.$ac_ext
15611 fi
15612 fi
15613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15614 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15615 if test "$ac_cv_sys_largefile_CC" != no; then
15616 CC=$CC$ac_cv_sys_largefile_CC
15617 fi
15618
15619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15620 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15621 if ${ac_cv_sys_file_offset_bits+:} false; then :
15622 $as_echo_n "(cached) " >&6
15623 else
15624 while :; do
15625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15626 /* end confdefs.h. */
15627 #include <sys/types.h>
15628 /* Check that off_t can represent 2**63 - 1 correctly.
15629 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15630 since some C++ compilers masquerading as C compilers
15631 incorrectly reject 9223372036854775807. */
15632 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15633 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15634 && LARGE_OFF_T % 2147483647 == 1)
15635 ? 1 : -1];
15636 int
15637 main ()
15638 {
15639
15640 ;
15641 return 0;
15642 }
15643 _ACEOF
15644 if ac_fn_c_try_compile "$LINENO"; then :
15645 ac_cv_sys_file_offset_bits=no; break
15646 fi
15647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15649 /* end confdefs.h. */
15650 #define _FILE_OFFSET_BITS 64
15651 #include <sys/types.h>
15652 /* Check that off_t can represent 2**63 - 1 correctly.
15653 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15654 since some C++ compilers masquerading as C compilers
15655 incorrectly reject 9223372036854775807. */
15656 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15657 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15658 && LARGE_OFF_T % 2147483647 == 1)
15659 ? 1 : -1];
15660 int
15661 main ()
15662 {
15663
15664 ;
15665 return 0;
15666 }
15667 _ACEOF
15668 if ac_fn_c_try_compile "$LINENO"; then :
15669 ac_cv_sys_file_offset_bits=64; break
15670 fi
15671 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15672 ac_cv_sys_file_offset_bits=unknown
15673 break
15674 done
15675 fi
15676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15677 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15678 case $ac_cv_sys_file_offset_bits in #(
15679 no | unknown) ;;
15680 *)
15681 cat >>confdefs.h <<_ACEOF
15682 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15683 _ACEOF
15684 ;;
15685 esac
15686 rm -rf conftest*
15687 if test $ac_cv_sys_file_offset_bits = unknown; then
15688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15689 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15690 if ${ac_cv_sys_large_files+:} false; then :
15691 $as_echo_n "(cached) " >&6
15692 else
15693 while :; do
15694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15695 /* end confdefs.h. */
15696 #include <sys/types.h>
15697 /* Check that off_t can represent 2**63 - 1 correctly.
15698 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15699 since some C++ compilers masquerading as C compilers
15700 incorrectly reject 9223372036854775807. */
15701 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15702 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15703 && LARGE_OFF_T % 2147483647 == 1)
15704 ? 1 : -1];
15705 int
15706 main ()
15707 {
15708
15709 ;
15710 return 0;
15711 }
15712 _ACEOF
15713 if ac_fn_c_try_compile "$LINENO"; then :
15714 ac_cv_sys_large_files=no; break
15715 fi
15716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15718 /* end confdefs.h. */
15719 #define _LARGE_FILES 1
15720 #include <sys/types.h>
15721 /* Check that off_t can represent 2**63 - 1 correctly.
15722 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15723 since some C++ compilers masquerading as C compilers
15724 incorrectly reject 9223372036854775807. */
15725 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15726 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15727 && LARGE_OFF_T % 2147483647 == 1)
15728 ? 1 : -1];
15729 int
15730 main ()
15731 {
15732
15733 ;
15734 return 0;
15735 }
15736 _ACEOF
15737 if ac_fn_c_try_compile "$LINENO"; then :
15738 ac_cv_sys_large_files=1; break
15739 fi
15740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15741 ac_cv_sys_large_files=unknown
15742 break
15743 done
15744 fi
15745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15746 $as_echo "$ac_cv_sys_large_files" >&6; }
15747 case $ac_cv_sys_large_files in #(
15748 no | unknown) ;;
15749 *)
15750 cat >>confdefs.h <<_ACEOF
15751 #define _LARGE_FILES $ac_cv_sys_large_files
15752 _ACEOF
15753 ;;
15754 esac
15755 rm -rf conftest*
15756 fi
15757
15758
15759 fi
15760
15761
15762
15763
15764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
15765 $as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
15766 cache=_D_LARGEFILE_SOURCE_1
15767 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
15768 $as_echo_n "(cached) " >&6
15769 else
15770
15771 echo '
15772 #include <stdio.h>
15773 int test() {
15774 int a = fseeko(stdin, 0, 0);
15775 return a;
15776 }
15777 ' > conftest.c
15778 echo 'void f(){}' >>conftest.c
15779 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
15780 eval "cv_prog_cc_flag_needed_$cache=no"
15781 else
15782
15783 if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
15784 eval "cv_prog_cc_flag_needed_$cache=yes"
15785 else
15786 eval "cv_prog_cc_flag_needed_$cache=fail"
15787 #echo 'Test with flag fails too!'
15788 #cat conftest.c
15789 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15790 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15791 #exit 1
15792 fi
15793
15794 fi
15795 rm -f conftest conftest.c conftest.o
15796
15797 fi
15798
15799 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
15800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15801 $as_echo "yes" >&6; }
15802 :
15803 CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
15804 else
15805 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
15806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15807 $as_echo "no" >&6; }
15808 #echo 'Test with flag is no!'
15809 #cat conftest.c
15810 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15811 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15812 #exit 1
15813 :
15814
15815 else
15816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15817 $as_echo "failed" >&6; }
15818 :
15819
15820 fi
15821 fi
15822
15823
15824
15825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
15826 $as_echo_n "checking if nonblocking sockets work... " >&6; }
15827 if echo $target | grep mingw32 >/dev/null; then
15828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
15829 $as_echo "no (windows)" >&6; }
15830
15831 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15832
15833 else
15834 if test "$cross_compiling" = yes; then :
15835
15836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
15837 $as_echo "crosscompile(yes)" >&6; }
15838
15839 else
15840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15841 /* end confdefs.h. */
15842
15843
15844 #include <stdio.h>
15845 #include <string.h>
15846 #include <stdlib.h>
15847 #include <fcntl.h>
15848 #include <errno.h>
15849 #ifdef HAVE_SYS_TYPES_H
15850 #include <sys/types.h>
15851 #endif
15852 #ifdef HAVE_SYS_SOCKET_H
15853 #include <sys/socket.h>
15854 #endif
15855 #ifdef HAVE_NETINET_IN_H
15856 #include <netinet/in.h>
15857 #endif
15858 #ifdef HAVE_ARPA_INET_H
15859 #include <arpa/inet.h>
15860 #endif
15861 #ifdef HAVE_UNISTD_H
15862 #include <unistd.h>
15863 #endif
15864 #ifdef HAVE_TIME_H
15865 #include <time.h>
15866 #endif
15867
15868 int main(void)
15869 {
15870 int port;
15871 int sfd, cfd;
15872 int num = 10;
15873 int i, p;
15874 struct sockaddr_in a;
15875 /* test if select and nonblocking reads work well together */
15876 /* open port.
15877 fork child to send 10 messages.
15878 select to read.
15879 then try to nonblocking read the 10 messages
15880 then, nonblocking read must give EAGAIN
15881 */
15882
15883 port = 12345 + (time(0)%32);
15884 sfd = socket(PF_INET, SOCK_DGRAM, 0);
15885 if(sfd == -1) {
15886 perror("socket");
15887 return 1;
15888 }
15889 memset(&a, 0, sizeof(a));
15890 a.sin_family = AF_INET;
15891 a.sin_port = htons(port);
15892 a.sin_addr.s_addr = inet_addr("127.0.0.1");
15893 if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15894 perror("bind");
15895 return 1;
15896 }
15897 if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
15898 perror("fcntl");
15899 return 1;
15900 }
15901
15902 cfd = socket(PF_INET, SOCK_DGRAM, 0);
15903 if(cfd == -1) {
15904 perror("client socket");
15905 return 1;
15906 }
15907 a.sin_port = 0;
15908 if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15909 perror("client bind");
15910 return 1;
15911 }
15912 a.sin_port = htons(port);
15913
15914 /* no handler, causes exit in 10 seconds */
15915 alarm(10);
15916
15917 /* send and receive on the socket */
15918 if((p=fork()) == 0) {
15919 for(i=0; i<num; i++) {
15920 if(sendto(cfd, &i, sizeof(i), 0,
15921 (struct sockaddr*)&a, sizeof(a)) < 0) {
15922 perror("sendto");
15923 return 1;
15924 }
15925 }
15926 } else {
15927 /* parent */
15928 fd_set rset;
15929 int x;
15930 if(p == -1) {
15931 perror("fork");
15932 return 1;
15933 }
15934 FD_ZERO(&rset);
15935 FD_SET(sfd, &rset);
15936 if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
15937 perror("select");
15938 return 1;
15939 }
15940 i = 0;
15941 while(i < num) {
15942 if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
15943 if(errno == EAGAIN)
15944 continue;
15945 perror("recv");
15946 return 1;
15947 }
15948 i++;
15949 }
15950 /* now we want to get EAGAIN: nonblocking goodness */
15951 errno = 0;
15952 recv(sfd, &x, sizeof(x), 0);
15953 if(errno != EAGAIN) {
15954 perror("trying to recv again");
15955 return 1;
15956 }
15957 /* EAGAIN encountered */
15958 }
15959
15960 close(sfd);
15961 close(cfd);
15962 return 0;
15963 }
15964
15965 _ACEOF
15966 if ac_fn_c_try_run "$LINENO"; then :
15967
15968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15969 $as_echo "yes" >&6; }
15970
15971 else
15972
15973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15974 $as_echo "no" >&6; }
15975
15976 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15977
15978
15979 fi
15980 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15981 conftest.$ac_objext conftest.beam conftest.$ac_ext
15982 fi
15983
15984 fi
15985
15986
15987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
15988 $as_echo_n "checking whether mkdir has one arg... " >&6; }
15989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15990 /* end confdefs.h. */
15991
15992 #include <stdio.h>
15993 #include <unistd.h>
15994 #ifdef HAVE_WINSOCK2_H
15995 #include <winsock2.h>
15996 #endif
15997 #ifdef HAVE_SYS_STAT_H
15998 #include <sys/stat.h>
15999 #endif
16000
16001 int
16002 main ()
16003 {
16004
16005 (void)mkdir("directory");
16006
16007 ;
16008 return 0;
16009 }
16010 _ACEOF
16011 if ac_fn_c_try_compile "$LINENO"; then :
16012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16013 $as_echo "yes" >&6; }
16014
16015 $as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
16016
16017
16018 else
16019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16020 $as_echo "no" >&6; }
16021
16022 fi
16023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16024
16025 for ac_func in strptime
16026 do :
16027 ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
16028 if test "x$ac_cv_func_strptime" = xyes; then :
16029 cat >>confdefs.h <<_ACEOF
16030 #define HAVE_STRPTIME 1
16031 _ACEOF
16032
16033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
16034 $as_echo_n "checking whether strptime works... " >&6; }
16035 if test c${cross_compiling} = cno; then
16036 if test "$cross_compiling" = yes; then :
16037 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16038 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16039 as_fn_error $? "cannot run test program while cross compiling
16040 See \`config.log' for more details" "$LINENO" 5; }
16041 else
16042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16043 /* end confdefs.h. */
16044
16045 #define _XOPEN_SOURCE 600
16046 #include <time.h>
16047 int main(void) { struct tm tm; char *res;
16048 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);
16049 if (!res) return 2;
16050 res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
16051 if (!res) return 1; return 0; }
16052
16053 _ACEOF
16054 if ac_fn_c_try_run "$LINENO"; then :
16055 eval "ac_cv_c_strptime_works=yes"
16056 else
16057 eval "ac_cv_c_strptime_works=no"
16058 fi
16059 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16060 conftest.$ac_objext conftest.beam conftest.$ac_ext
16061 fi
16062
16063 else
16064 eval "ac_cv_c_strptime_works=maybe"
16065 fi
16066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
16067 $as_echo "$ac_cv_c_strptime_works" >&6; }
16068 if test $ac_cv_c_strptime_works = no; then
16069 case " $LIBOBJS " in
16070 *" strptime.$ac_objext "* ) ;;
16071 *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
16072 ;;
16073 esac
16074
16075 else
16076
16077 cat >>confdefs.h <<_ACEOF
16078 #define STRPTIME_WORKS 1
16079 _ACEOF
16080
16081 fi
16082
16083 else
16084 case " $LIBOBJS " in
16085 *" strptime.$ac_objext "* ) ;;
16086 *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
16087 ;;
16088 esac
16089
16090 fi
16091 done
16092
16093
16094 # check if we can use SO_REUSEPORT
16095 if echo "$host" | grep -i -e linux -e dragonfly >/dev/null; then
16096
16097 $as_echo "#define REUSEPORT_DEFAULT 1" >>confdefs.h
16098
16099 else
16100
16101 $as_echo "#define REUSEPORT_DEFAULT 0" >>confdefs.h
16102
16103 fi
16104
16105 # set memory allocation checking if requested
16106 # Check whether --enable-alloc-checks was given.
16107 if test "${enable_alloc_checks+set}" = set; then :
16108 enableval=$enable_alloc_checks;
16109 fi
16110
16111 # Check whether --enable-alloc-lite was given.
16112 if test "${enable_alloc_lite+set}" = set; then :
16113 enableval=$enable_alloc_lite;
16114 fi
16115
16116 # Check whether --enable-alloc-nonregional was given.
16117 if test "${enable_alloc_nonregional+set}" = set; then :
16118 enableval=$enable_alloc_nonregional;
16119 fi
16120
16121 if test x_$enable_alloc_nonregional = x_yes; then
16122
16123 $as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
16124
16125 fi
16126 if test x_$enable_alloc_checks = x_yes; then
16127
16128 $as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
16129
16130 else
16131 if test x_$enable_alloc_lite = x_yes; then
16132
16133 $as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
16134
16135 else
16136
16137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
16138 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
16139 if test "$cross_compiling" = yes; then :
16140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
16141 $as_echo "no (crosscompile)" >&6; }
16142 case " $LIBOBJS " in
16143 *" malloc.$ac_objext "* ) ;;
16144 *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
16145 ;;
16146 esac
16147
16148
16149 cat >>confdefs.h <<_ACEOF
16150 #define malloc rpl_malloc_unbound
16151 _ACEOF
16152
16153 else
16154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16155 /* end confdefs.h. */
16156 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
16157 #include <stdlib.h>
16158 #else
16159 char *malloc ();
16160 #endif
16161
16162 int
16163 main ()
16164 {
16165 if(malloc(0) != 0) return 1;
16166 ;
16167 return 0;
16168 }
16169
16170 _ACEOF
16171 if ac_fn_c_try_run "$LINENO"; then :
16172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16173 $as_echo "no" >&6; }
16174 case " $LIBOBJS " in
16175 *" malloc.$ac_objext "* ) ;;
16176 *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
16177 ;;
16178 esac
16179
16180
16181 cat >>confdefs.h <<_ACEOF
16182 #define malloc rpl_malloc_unbound
16183 _ACEOF
16184
16185 else
16186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16187 $as_echo "yes" >&6; }
16188
16189 $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
16190
16191 fi
16192 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16193 conftest.$ac_objext conftest.beam conftest.$ac_ext
16194 fi
16195
16196
16197 fi
16198 fi
16199
16200 # check windows threads (we use them, not pthreads, on windows).
16201 if test "$on_mingw" = "yes"; then
16202 # check windows threads
16203 for ac_header in windows.h
16204 do :
16205 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
16206 "
16207 if test "x$ac_cv_header_windows_h" = xyes; then :
16208 cat >>confdefs.h <<_ACEOF
16209 #define HAVE_WINDOWS_H 1
16210 _ACEOF
16211
16212 fi
16213
16214 done
16215
16216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
16217 $as_echo_n "checking for CreateThread... " >&6; }
16218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16219 /* end confdefs.h. */
16220
16221 #ifdef HAVE_WINDOWS_H
16222 #include <windows.h>
16223 #endif
16224
16225 int
16226 main ()
16227 {
16228
16229 HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
16230
16231 ;
16232 return 0;
16233 }
16234 _ACEOF
16235 if ac_fn_c_try_compile "$LINENO"; then :
16236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16237 $as_echo "yes" >&6; }
16238
16239 $as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
16240
16241
16242 else
16243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16244 $as_echo "no" >&6; }
16245
16246 fi
16247 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16248
16249 else
16250 # not on mingw, check thread libraries.
16251
16252 # check for thread library.
16253 # check this first, so that the pthread lib does not get linked in via
16254 # libssl or libpython, and thus distorts the tests, and we end up using
16255 # the non-threadsafe C libraries.
16256
16257 # Check whether --with-pthreads was given.
16258 if test "${with_pthreads+set}" = set; then :
16259 withval=$with_pthreads;
16260 else
16261 withval="yes"
16262 fi
16263
16264 ub_have_pthreads=no
16265 if test x_$withval != x_no; then
16266
16267
16268 ac_ext=c
16269 ac_cpp='$CPP $CPPFLAGS'
16270 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16271 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16272 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16273
16274 ax_pthread_ok=no
16275
16276 # We used to check for pthread.h first, but this fails if pthread.h
16277 # requires special compiler flags (e.g. on True64 or Sequent).
16278 # It gets checked for in the link test anyway.
16279
16280 # First of all, check if the user has set any of the PTHREAD_LIBS,
16281 # etcetera environment variables, and if threads linking works using
16282 # them:
16283 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16284 save_CFLAGS="$CFLAGS"
16285 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16286 save_LIBS="$LIBS"
16287 LIBS="$PTHREAD_LIBS $LIBS"
16288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16289 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
16290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16291 /* end confdefs.h. */
16292
16293 /* Override any GCC internal prototype to avoid an error.
16294 Use char because int might match the return type of a GCC
16295 builtin and then its argument prototype would still apply. */
16296 #ifdef __cplusplus
16297 extern "C"
16298 #endif
16299 char pthread_join ();
16300 int
16301 main ()
16302 {
16303 return pthread_join ();
16304 ;
16305 return 0;
16306 }
16307 _ACEOF
16308 if ac_fn_c_try_link "$LINENO"; then :
16309 ax_pthread_ok=yes
16310 fi
16311 rm -f core conftest.err conftest.$ac_objext \
16312 conftest$ac_exeext conftest.$ac_ext
16313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16314 $as_echo "$ax_pthread_ok" >&6; }
16315 if test x"$ax_pthread_ok" = xno; then
16316 PTHREAD_LIBS=""
16317 PTHREAD_CFLAGS=""
16318 fi
16319 LIBS="$save_LIBS"
16320 CFLAGS="$save_CFLAGS"
16321 fi
16322
16323 # We must check for the threads library under a number of different
16324 # names; the ordering is very important because some systems
16325 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16326 # libraries is broken (non-POSIX).
16327
16328 # Create a list of thread flags to try. Items starting with a "-" are
16329 # C compiler flags, and other items are library names, except for "none"
16330 # which indicates that we try without any flags at all, and "pthread-config"
16331 # which is a program returning the flags for the Pth emulation library.
16332
16333 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
16334
16335 # The ordering *is* (sometimes) important. Some notes on the
16336 # individual items follow:
16337
16338 # pthreads: AIX (must check this before -lpthread)
16339 # none: in case threads are in libc; should be tried before -Kthread and
16340 # other compiler flags to prevent continual compiler warnings
16341 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16342 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16343 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16344 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16345 # -pthreads: Solaris/gcc
16346 # -mthreads: Mingw32/gcc, Lynx/gcc
16347 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16348 # doesn't hurt to check since this sometimes defines pthreads too;
16349 # also defines -D_REENTRANT)
16350 # ... -mt is also the pthreads flag for HP/aCC
16351 # pthread: Linux, etcetera
16352 # --thread-safe: KAI C++
16353 # pthread-config: use pthread-config program (for GNU Pth library)
16354
16355 case ${host_os} in
16356 solaris*)
16357
16358 # On Solaris (at least, for some versions), libc contains stubbed
16359 # (non-functional) versions of the pthreads routines, so link-based
16360 # tests will erroneously succeed. (We need to link with -pthreads/-mt/
16361 # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
16362 # a function called by this macro, so we could check for that, but
16363 # who knows whether they'll stub that too in a future libc.) So,
16364 # we'll just look for -pthreads and -lpthread first:
16365
16366 ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
16367 ;;
16368
16369 darwin*)
16370 ax_pthread_flags="-pthread $ax_pthread_flags"
16371 ;;
16372 esac
16373
16374 # Clang doesn't consider unrecognized options an error unless we specify
16375 # -Werror. We throw in some extra Clang-specific options to ensure that
16376 # this doesn't happen for GCC, which also accepts -Werror.
16377
16378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
16379 $as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
16380 save_CFLAGS="$CFLAGS"
16381 ax_pthread_extra_flags="-Werror"
16382 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
16383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16384 /* end confdefs.h. */
16385 int foo(void);
16386 int
16387 main ()
16388 {
16389 foo()
16390 ;
16391 return 0;
16392 }
16393 _ACEOF
16394 if ac_fn_c_try_compile "$LINENO"; then :
16395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16396 $as_echo "yes" >&6; }
16397 else
16398 ax_pthread_extra_flags=
16399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16400 $as_echo "no" >&6; }
16401 fi
16402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16403 CFLAGS="$save_CFLAGS"
16404
16405 if test x"$ax_pthread_ok" = xno; then
16406 for flag in $ax_pthread_flags; do
16407
16408 case $flag in
16409 none)
16410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
16411 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
16412 ;;
16413
16414 -*)
16415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
16416 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
16417 PTHREAD_CFLAGS="$flag"
16418 ;;
16419
16420 pthread-config)
16421 # Extract the first word of "pthread-config", so it can be a program name with args.
16422 set dummy pthread-config; ac_word=$2
16423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16424 $as_echo_n "checking for $ac_word... " >&6; }
16425 if ${ac_cv_prog_ax_pthread_config+:} false; then :
16426 $as_echo_n "(cached) " >&6
16427 else
16428 if test -n "$ax_pthread_config"; then
16429 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
16430 else
16431 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16432 for as_dir in $PATH
16433 do
16434 IFS=$as_save_IFS
16435 test -z "$as_dir" && as_dir=.
16436 for ac_exec_ext in '' $ac_executable_extensions; do
16437 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16438 ac_cv_prog_ax_pthread_config="yes"
16439 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16440 break 2
16441 fi
16442 done
16443 done
16444 IFS=$as_save_IFS
16445
16446 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
16447 fi
16448 fi
16449 ax_pthread_config=$ac_cv_prog_ax_pthread_config
16450 if test -n "$ax_pthread_config"; then
16451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
16452 $as_echo "$ax_pthread_config" >&6; }
16453 else
16454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16455 $as_echo "no" >&6; }
16456 fi
16457
16458
16459 if test x"$ax_pthread_config" = xno; then continue; fi
16460 PTHREAD_CFLAGS="`pthread-config --cflags`"
16461 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16462 ;;
16463
16464 *)
16465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
16466 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
16467 PTHREAD_LIBS="-l$flag"
16468 ;;
16469 esac
16470
16471 save_LIBS="$LIBS"
16472 save_CFLAGS="$CFLAGS"
16473 LIBS="$PTHREAD_LIBS $LIBS"
16474 CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
16475
16476 # Check for various functions. We must include pthread.h,
16477 # since some functions may be macros. (On the Sequent, we
16478 # need a special flag -Kthread to make this header compile.)
16479 # We check for pthread_join because it is in -lpthread on IRIX
16480 # while pthread_create is in libc. We check for pthread_attr_init
16481 # due to DEC craziness with -lpthreads. We check for
16482 # pthread_cleanup_push because it is one of the few pthread
16483 # functions on Solaris that doesn't have a non-functional libc stub.
16484 # We try pthread_create on general principles.
16485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16486 /* end confdefs.h. */
16487 #include <pthread.h>
16488 static void routine(void *a) { *((int*)a) = 0; }
16489 static void *start_routine(void *a) { return a; }
16490 int
16491 main ()
16492 {
16493 pthread_t th; pthread_attr_t attr;
16494 pthread_create(&th, 0, start_routine, 0);
16495 pthread_join(th, 0);
16496 pthread_attr_init(&attr);
16497 pthread_cleanup_push(routine, 0);
16498 pthread_cleanup_pop(0) /* ; */
16499 ;
16500 return 0;
16501 }
16502 _ACEOF
16503 if ac_fn_c_try_link "$LINENO"; then :
16504 ax_pthread_ok=yes
16505 fi
16506 rm -f core conftest.err conftest.$ac_objext \
16507 conftest$ac_exeext conftest.$ac_ext
16508
16509 LIBS="$save_LIBS"
16510 CFLAGS="$save_CFLAGS"
16511
16512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16513 $as_echo "$ax_pthread_ok" >&6; }
16514 if test "x$ax_pthread_ok" = xyes; then
16515 break;
16516 fi
16517
16518 PTHREAD_LIBS=""
16519 PTHREAD_CFLAGS=""
16520 done
16521 fi
16522
16523 # Various other checks:
16524 if test "x$ax_pthread_ok" = xyes; then
16525 save_LIBS="$LIBS"
16526 LIBS="$PTHREAD_LIBS $LIBS"
16527 save_CFLAGS="$CFLAGS"
16528 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16529
16530 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
16531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
16532 $as_echo_n "checking for joinable pthread attribute... " >&6; }
16533 attr_name=unknown
16534 for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
16535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16536 /* end confdefs.h. */
16537 #include <pthread.h>
16538 int
16539 main ()
16540 {
16541 int attr = $attr; return attr /* ; */
16542 ;
16543 return 0;
16544 }
16545 _ACEOF
16546 if ac_fn_c_try_link "$LINENO"; then :
16547 attr_name=$attr; break
16548 fi
16549 rm -f core conftest.err conftest.$ac_objext \
16550 conftest$ac_exeext conftest.$ac_ext
16551 done
16552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
16553 $as_echo "$attr_name" >&6; }
16554 if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
16555
16556 cat >>confdefs.h <<_ACEOF
16557 #define PTHREAD_CREATE_JOINABLE $attr_name
16558 _ACEOF
16559
16560 fi
16561
16562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
16563 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
16564 flag=no
16565 case ${host_os} in
16566 aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
16567 osf* | hpux*) flag="-D_REENTRANT";;
16568 solaris*)
16569 if test "$GCC" = "yes"; then
16570 flag="-D_REENTRANT"
16571 else
16572 # TODO: What about Clang on Solaris?
16573 flag="-mt -D_REENTRANT"
16574 fi
16575 ;;
16576 esac
16577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
16578 $as_echo "$flag" >&6; }
16579 if test "x$flag" != xno; then
16580 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16581 fi
16582
16583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
16584 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
16585 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
16586 $as_echo_n "(cached) " >&6
16587 else
16588
16589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16590 /* end confdefs.h. */
16591 #include <pthread.h>
16592 int
16593 main ()
16594 {
16595 int i = PTHREAD_PRIO_INHERIT;
16596 ;
16597 return 0;
16598 }
16599 _ACEOF
16600 if ac_fn_c_try_link "$LINENO"; then :
16601 ax_cv_PTHREAD_PRIO_INHERIT=yes
16602 else
16603 ax_cv_PTHREAD_PRIO_INHERIT=no
16604 fi
16605 rm -f core conftest.err conftest.$ac_objext \
16606 conftest$ac_exeext conftest.$ac_ext
16607
16608 fi
16609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
16610 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
16611 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
16612
16613 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
16614
16615 fi
16616
16617 LIBS="$save_LIBS"
16618 CFLAGS="$save_CFLAGS"
16619
16620 # More AIX lossage: compile with *_r variant
16621 if test "x$GCC" != xyes; then
16622 case $host_os in
16623 aix*)
16624 case "x/$CC" in #(
16625 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
16626 #handle absolute path differently from PATH based program lookup
16627 case "x$CC" in #(
16628 x/*) :
16629 if as_fn_executable_p ${CC}_r; then :
16630 PTHREAD_CC="${CC}_r"
16631 fi ;; #(
16632 *) :
16633 for ac_prog in ${CC}_r
16634 do
16635 # Extract the first word of "$ac_prog", so it can be a program name with args.
16636 set dummy $ac_prog; ac_word=$2
16637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16638 $as_echo_n "checking for $ac_word... " >&6; }
16639 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
16640 $as_echo_n "(cached) " >&6
16641 else
16642 if test -n "$PTHREAD_CC"; then
16643 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16644 else
16645 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16646 for as_dir in $PATH
16647 do
16648 IFS=$as_save_IFS
16649 test -z "$as_dir" && as_dir=.
16650 for ac_exec_ext in '' $ac_executable_extensions; do
16651 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16652 ac_cv_prog_PTHREAD_CC="$ac_prog"
16653 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16654 break 2
16655 fi
16656 done
16657 done
16658 IFS=$as_save_IFS
16659
16660 fi
16661 fi
16662 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16663 if test -n "$PTHREAD_CC"; then
16664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
16665 $as_echo "$PTHREAD_CC" >&6; }
16666 else
16667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16668 $as_echo "no" >&6; }
16669 fi
16670
16671
16672 test -n "$PTHREAD_CC" && break
16673 done
16674 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16675 ;;
16676 esac ;; #(
16677 *) :
16678 ;;
16679 esac
16680 ;;
16681 esac
16682 fi
16683 fi
16684
16685 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16686
16687
16688
16689
16690
16691 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16692 if test x"$ax_pthread_ok" = xyes; then
16693
16694
16695 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
16696
16697 if test -n "$PTHREAD_LIBS"; then
16698 LIBS="$PTHREAD_LIBS $LIBS"
16699 fi
16700 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16701 CC="$PTHREAD_CC"
16702 ub_have_pthreads=yes
16703 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
16704 "
16705 if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
16706
16707 cat >>confdefs.h <<_ACEOF
16708 #define HAVE_PTHREAD_SPINLOCK_T 1
16709 _ACEOF
16710
16711
16712 fi
16713 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
16714 "
16715 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
16716
16717 cat >>confdefs.h <<_ACEOF
16718 #define HAVE_PTHREAD_RWLOCK_T 1
16719 _ACEOF
16720
16721
16722 fi
16723
16724
16725 if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
16726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
16727 $as_echo_n "checking if -pthread unused during linking... " >&6; }
16728 # catch clang warning 'argument unused during compilation'
16729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16730 /* end confdefs.h. */
16731 $ac_includes_default
16732
16733 int main(void) {return 0;}
16734
16735 _ACEOF
16736 pthread_unused="yes"
16737 # first compile
16738 echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
16739 $CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
16740 if test $? = 0; then
16741 # then link
16742 echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
16743 $CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
16744 if test $? -ne 0; then
16745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16746 $as_echo "yes" >&6; }
16747 CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
16748 PTHREAD_CFLAGS_ONLY="-pthread"
16749
16750 else
16751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16752 $as_echo "no" >&6; }
16753 fi
16754 else
16755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16756 $as_echo "no" >&6; }
16757 fi # endif cc successful
16758 rm -f conftest conftest.c conftest.o
16759 fi # endif -pthread in CFLAGS
16760
16761
16762 :
16763 else
16764 ax_pthread_ok=no
16765
16766 fi
16767 ac_ext=c
16768 ac_cpp='$CPP $CPPFLAGS'
16769 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16770 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16771 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16772
16773
16774 fi
16775
16776 # check solaris thread library
16777
16778 # Check whether --with-solaris-threads was given.
16779 if test "${with_solaris_threads+set}" = set; then :
16780 withval=$with_solaris_threads;
16781 else
16782 withval="no"
16783 fi
16784
16785 ub_have_sol_threads=no
16786 if test x_$withval != x_no; then
16787 if test x_$ub_have_pthreads != x_no; then
16788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
16789 $as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
16790 else
16791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
16792 $as_echo_n "checking for library containing thr_create... " >&6; }
16793 if ${ac_cv_search_thr_create+:} false; then :
16794 $as_echo_n "(cached) " >&6
16795 else
16796 ac_func_search_save_LIBS=$LIBS
16797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16798 /* end confdefs.h. */
16799
16800 /* Override any GCC internal prototype to avoid an error.
16801 Use char because int might match the return type of a GCC
16802 builtin and then its argument prototype would still apply. */
16803 #ifdef __cplusplus
16804 extern "C"
16805 #endif
16806 char thr_create ();
16807 int
16808 main ()
16809 {
16810 return thr_create ();
16811 ;
16812 return 0;
16813 }
16814 _ACEOF
16815 for ac_lib in '' thread; do
16816 if test -z "$ac_lib"; then
16817 ac_res="none required"
16818 else
16819 ac_res=-l$ac_lib
16820 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16821 fi
16822 if ac_fn_c_try_link "$LINENO"; then :
16823 ac_cv_search_thr_create=$ac_res
16824 fi
16825 rm -f core conftest.err conftest.$ac_objext \
16826 conftest$ac_exeext
16827 if ${ac_cv_search_thr_create+:} false; then :
16828 break
16829 fi
16830 done
16831 if ${ac_cv_search_thr_create+:} false; then :
16832
16833 else
16834 ac_cv_search_thr_create=no
16835 fi
16836 rm conftest.$ac_ext
16837 LIBS=$ac_func_search_save_LIBS
16838 fi
16839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
16840 $as_echo "$ac_cv_search_thr_create" >&6; }
16841 ac_res=$ac_cv_search_thr_create
16842 if test "$ac_res" != no; then :
16843 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16844
16845
16846 $as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
16847
16848
16849
16850
16851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
16852 $as_echo_n "checking whether $CC supports -mt... " >&6; }
16853 cache=`echo mt | sed 'y%.=/+-%___p_%'`
16854 if eval \${cv_prog_cc_flag_$cache+:} false; then :
16855 $as_echo_n "(cached) " >&6
16856 else
16857
16858 echo 'void f(void){}' >conftest.c
16859 if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
16860 eval "cv_prog_cc_flag_$cache=yes"
16861 else
16862 eval "cv_prog_cc_flag_$cache=no"
16863 fi
16864 rm -f conftest conftest.o conftest.c
16865
16866 fi
16867
16868 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
16869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16870 $as_echo "yes" >&6; }
16871 :
16872 CFLAGS="$CFLAGS -mt"
16873 else
16874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16875 $as_echo "no" >&6; }
16876 :
16877 CFLAGS="$CFLAGS -D_REENTRANT"
16878 fi
16879
16880 ub_have_sol_threads=yes
16881
16882 else
16883
16884 as_fn_error $? "no solaris threads found." "$LINENO" 5
16885
16886 fi
16887
16888 fi
16889 fi
16890
16891 fi # end of non-mingw check of thread libraries
16892
16893 # Check for PyUnbound
16894
16895 # Check whether --with-pyunbound was given.
16896 if test "${with_pyunbound+set}" = set; then :
16897 withval=$with_pyunbound;
16898 else
16899 withval="no"
16900 fi
16901
16902
16903 ub_test_python=no
16904 ub_with_pyunbound=no
16905 if test x_$withval != x_no; then
16906 ub_with_pyunbound=yes
16907 ub_test_python=yes
16908 fi
16909
16910 # Check for Python module
16911
16912 # Check whether --with-pythonmodule was given.
16913 if test "${with_pythonmodule+set}" = set; then :
16914 withval=$with_pythonmodule;
16915 else
16916 withval="no"
16917 fi
16918
16919
16920 ub_with_pythonmod=no
16921 if test x_$withval != x_no; then
16922 ub_with_pythonmod=yes
16923 ub_test_python=yes
16924 fi
16925
16926 # Check for Python & SWIG only on PyUnbound or PyModule
16927 if test x_$ub_test_python != x_no; then
16928
16929 # Check for Python
16930 ub_have_python=no
16931 ac_save_LIBS="$LIBS"
16932 #
16933 # Allow the use of a (user set) custom python version
16934 #
16935
16936
16937 # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
16938 set dummy python$PYTHON_VERSION; ac_word=$2
16939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16940 $as_echo_n "checking for $ac_word... " >&6; }
16941 if ${ac_cv_path_PYTHON+:} false; then :
16942 $as_echo_n "(cached) " >&6
16943 else
16944 case $PYTHON in
16945 [\\/]* | ?:[\\/]*)
16946 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
16947 ;;
16948 *)
16949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16950 for as_dir in $PATH
16951 do
16952 IFS=$as_save_IFS
16953 test -z "$as_dir" && as_dir=.
16954 for ac_exec_ext in '' $ac_executable_extensions; do
16955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16956 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
16957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16958 break 2
16959 fi
16960 done
16961 done
16962 IFS=$as_save_IFS
16963
16964 ;;
16965 esac
16966 fi
16967 PYTHON=$ac_cv_path_PYTHON
16968 if test -n "$PYTHON"; then
16969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
16970 $as_echo "$PYTHON" >&6; }
16971 else
16972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16973 $as_echo "no" >&6; }
16974 fi
16975
16976
16977 if test -z "$PYTHON"; then
16978 as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
16979 PYTHON_VERSION=""
16980 fi
16981
16982 if test -z "$PYTHON_VERSION"; then
16983 PYTHON_VERSION=`$PYTHON -c "import sys; \
16984 print(sys.version.split()[0])"`
16985 fi
16986
16987 #
16988 # Check if you have distutils, else fail
16989 #
16990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
16991 $as_echo_n "checking for the distutils Python package... " >&6; }
16992 if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then
16993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16994 $as_echo "yes" >&6; }
16995 else
16996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16997 $as_echo "no" >&6; }
16998 as_fn_error $? "cannot import Python module \"distutils\".
16999 Please check your Python installation. The error was:
17000 $ac_distutils_result" "$LINENO" 5
17001 PYTHON_VERSION=""
17002 fi
17003
17004 #
17005 # Check for Python include path
17006 #
17007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
17008 $as_echo_n "checking for Python include path... " >&6; }
17009 if test -z "$PYTHON_CPPFLAGS"; then
17010 python_path=`$PYTHON -c "import distutils.sysconfig; \
17011 print(distutils.sysconfig.get_python_inc());"`
17012 if test -n "${python_path}"; then
17013 python_path="-I$python_path"
17014 fi
17015 PYTHON_CPPFLAGS=$python_path
17016 fi
17017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
17018 $as_echo "$PYTHON_CPPFLAGS" >&6; }
17019
17020
17021 #
17022 # Check for Python library path
17023 #
17024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
17025 $as_echo_n "checking for Python library path... " >&6; }
17026 if test -z "$PYTHON_LDFLAGS"; then
17027 PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
17028 print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
17029 fi
17030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
17031 $as_echo "$PYTHON_LDFLAGS" >&6; }
17032
17033
17034 #
17035 # Check for site packages
17036 #
17037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
17038 $as_echo_n "checking for Python site-packages path... " >&6; }
17039 if test -z "$PYTHON_SITE_PKG"; then
17040 PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
17041 print(distutils.sysconfig.get_python_lib(1,0));"`
17042 fi
17043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
17044 $as_echo "$PYTHON_SITE_PKG" >&6; }
17045
17046
17047 #
17048 # final check to see if everything compiles alright
17049 #
17050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
17051 $as_echo_n "checking consistency of all components of python development environment... " >&6; }
17052 ac_ext=c
17053 ac_cpp='$CPP $CPPFLAGS'
17054 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17055 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17056 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17057
17058 # save current global flags
17059 ac_save_LIBS="$LIBS"
17060 ac_save_CPPFLAGS="$CPPFLAGS"
17061
17062 LIBS="$LIBS $PYTHON_LDFLAGS"
17063 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
17064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17065 /* end confdefs.h. */
17066
17067 #include <Python.h>
17068
17069 int
17070 main ()
17071 {
17072
17073 Py_Initialize();
17074
17075 ;
17076 return 0;
17077 }
17078 _ACEOF
17079 if ac_fn_c_try_link "$LINENO"; then :
17080 pythonexists=yes
17081 else
17082 pythonexists=no
17083 fi
17084 rm -f core conftest.err conftest.$ac_objext \
17085 conftest$ac_exeext conftest.$ac_ext
17086
17087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
17088 $as_echo "$pythonexists" >&6; }
17089
17090 if test ! "$pythonexists" = "yes"; then
17091 as_fn_error $? "
17092 Could not link test program to Python. Maybe the main Python library has been
17093 installed in some non-standard library path. If so, pass it to configure,
17094 via the LDFLAGS environment variable.
17095 Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
17096 ============================================================================
17097 ERROR!
17098 You probably have to install the development version of the Python package
17099 for your distribution. The exact name of this package varies among them.
17100 ============================================================================
17101 " "$LINENO" 5
17102 PYTHON_VERSION=""
17103 fi
17104 ac_ext=c
17105 ac_cpp='$CPP $CPPFLAGS'
17106 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17107 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17108 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17109
17110 # turn back to default flags
17111 CPPFLAGS="$ac_save_CPPFLAGS"
17112 LIBS="$ac_save_LIBS"
17113
17114 #
17115 # all done!
17116 #
17117
17118 if test ! -z "$PYTHON_VERSION"; then
17119 if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
17120 as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
17121 fi
17122
17123 PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
17124
17125 # Have Python
17126
17127 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
17128
17129 if test -n "$LIBS"; then
17130 LIBS="$PYTHON_LDFLAGS $LIBS"
17131 else
17132 LIBS="$PYTHON_LDFLAGS"
17133 fi
17134 if test -n "$CPPFLAGS"; then
17135 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
17136 else
17137 CPPFLAGS="$PYTHON_CPPFLAGS"
17138 fi
17139 ub_have_python=yes
17140 if test -n "$PKG_CONFIG" && \
17141 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
17142 ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
17143 ac_status=$?
17144 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17145 test $ac_status = 0; }; then
17146 PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
17147 else
17148 PC_PY_DEPENDENCY="python"
17149 fi
17150
17151
17152 # Check for SWIG
17153 ub_have_swig=no
17154 # Check whether --enable-swig-version-check was given.
17155 if test "${enable_swig_version_check+set}" = set; then :
17156 enableval=$enable_swig_version_check;
17157 fi
17158
17159 if test "$enable_swig_version_check" = "yes"; then
17160
17161 # Extract the first word of "swig", so it can be a program name with args.
17162 set dummy swig; ac_word=$2
17163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17164 $as_echo_n "checking for $ac_word... " >&6; }
17165 if ${ac_cv_path_SWIG+:} false; then :
17166 $as_echo_n "(cached) " >&6
17167 else
17168 case $SWIG in
17169 [\\/]* | ?:[\\/]*)
17170 ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17171 ;;
17172 *)
17173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17174 for as_dir in $PATH
17175 do
17176 IFS=$as_save_IFS
17177 test -z "$as_dir" && as_dir=.
17178 for ac_exec_ext in '' $ac_executable_extensions; do
17179 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17180 ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17181 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17182 break 2
17183 fi
17184 done
17185 done
17186 IFS=$as_save_IFS
17187
17188 ;;
17189 esac
17190 fi
17191 SWIG=$ac_cv_path_SWIG
17192 if test -n "$SWIG"; then
17193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17194 $as_echo "$SWIG" >&6; }
17195 else
17196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17197 $as_echo "no" >&6; }
17198 fi
17199
17200
17201 if test -z "$SWIG" ; then
17202 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17203 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17204 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17205 elif test -n "2.0.1" ; then
17206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17207 $as_echo_n "checking for SWIG version... " >&6; }
17208 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'`
17209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17210 $as_echo "$swig_version" >&6; }
17211 if test -n "$swig_version" ; then
17212 # Calculate the required version number components
17213 required=2.0.1
17214 required_major=`echo $required | sed 's/[^0-9].*//'`
17215 if test -z "$required_major" ; then
17216 required_major=0
17217 fi
17218 required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17219 required_minor=`echo $required | sed 's/[^0-9].*//'`
17220 if test -z "$required_minor" ; then
17221 required_minor=0
17222 fi
17223 required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17224 required_patch=`echo $required | sed 's/[^0-9].*//'`
17225 if test -z "$required_patch" ; then
17226 required_patch=0
17227 fi
17228 # Calculate the available version number components
17229 available=$swig_version
17230 available_major=`echo $available | sed 's/[^0-9].*//'`
17231 if test -z "$available_major" ; then
17232 available_major=0
17233 fi
17234 available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17235 available_minor=`echo $available | sed 's/[^0-9].*//'`
17236 if test -z "$available_minor" ; then
17237 available_minor=0
17238 fi
17239 available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17240 available_patch=`echo $available | sed 's/[^0-9].*//'`
17241 if test -z "$available_patch" ; then
17242 available_patch=0
17243 fi
17244 badversion=0
17245 if test $available_major -lt $required_major ; then
17246 badversion=1
17247 fi
17248 if test $available_major -eq $required_major \
17249 -a $available_minor -lt $required_minor ; then
17250 badversion=1
17251 fi
17252 if test $available_major -eq $required_major \
17253 -a $available_minor -eq $required_minor \
17254 -a $available_patch -lt $required_patch ; then
17255 badversion=1
17256 fi
17257 if test $badversion -eq 1 ; then
17258 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0.1 is required. You have $swig_version. You should look at http://www.swig.org" >&5
17259 $as_echo "$as_me: WARNING: SWIG version >= 2.0.1 is required. You have $swig_version. You should look at http://www.swig.org" >&2;}
17260 SWIG='echo "Error: SWIG version >= 2.0.1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false'
17261 else
17262 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17263 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17264 SWIG_LIB=`$SWIG -swiglib`
17265 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17266 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17267 fi
17268 else
17269 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17270 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17271 SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false'
17272 fi
17273 fi
17274
17275
17276 else
17277
17278 # Extract the first word of "swig", so it can be a program name with args.
17279 set dummy swig; ac_word=$2
17280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17281 $as_echo_n "checking for $ac_word... " >&6; }
17282 if ${ac_cv_path_SWIG+:} false; then :
17283 $as_echo_n "(cached) " >&6
17284 else
17285 case $SWIG in
17286 [\\/]* | ?:[\\/]*)
17287 ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17288 ;;
17289 *)
17290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17291 for as_dir in $PATH
17292 do
17293 IFS=$as_save_IFS
17294 test -z "$as_dir" && as_dir=.
17295 for ac_exec_ext in '' $ac_executable_extensions; do
17296 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17297 ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17298 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17299 break 2
17300 fi
17301 done
17302 done
17303 IFS=$as_save_IFS
17304
17305 ;;
17306 esac
17307 fi
17308 SWIG=$ac_cv_path_SWIG
17309 if test -n "$SWIG"; then
17310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17311 $as_echo "$SWIG" >&6; }
17312 else
17313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17314 $as_echo "no" >&6; }
17315 fi
17316
17317
17318 if test -z "$SWIG" ; then
17319 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17320 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17321 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17322 elif test -n "" ; then
17323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17324 $as_echo_n "checking for SWIG version... " >&6; }
17325 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'`
17326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17327 $as_echo "$swig_version" >&6; }
17328 if test -n "$swig_version" ; then
17329 # Calculate the required version number components
17330 required=
17331 required_major=`echo $required | sed 's/[^0-9].*//'`
17332 if test -z "$required_major" ; then
17333 required_major=0
17334 fi
17335 required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17336 required_minor=`echo $required | sed 's/[^0-9].*//'`
17337 if test -z "$required_minor" ; then
17338 required_minor=0
17339 fi
17340 required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17341 required_patch=`echo $required | sed 's/[^0-9].*//'`
17342 if test -z "$required_patch" ; then
17343 required_patch=0
17344 fi
17345 # Calculate the available version number components
17346 available=$swig_version
17347 available_major=`echo $available | sed 's/[^0-9].*//'`
17348 if test -z "$available_major" ; then
17349 available_major=0
17350 fi
17351 available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17352 available_minor=`echo $available | sed 's/[^0-9].*//'`
17353 if test -z "$available_minor" ; then
17354 available_minor=0
17355 fi
17356 available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17357 available_patch=`echo $available | sed 's/[^0-9].*//'`
17358 if test -z "$available_patch" ; then
17359 available_patch=0
17360 fi
17361 badversion=0
17362 if test $available_major -lt $required_major ; then
17363 badversion=1
17364 fi
17365 if test $available_major -eq $required_major \
17366 -a $available_minor -lt $required_minor ; then
17367 badversion=1
17368 fi
17369 if test $available_major -eq $required_major \
17370 -a $available_minor -eq $required_minor \
17371 -a $available_patch -lt $required_patch ; then
17372 badversion=1
17373 fi
17374 if test $badversion -eq 1 ; then
17375 { $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
17376 $as_echo "$as_me: WARNING: SWIG version >= is required. You have $swig_version. You should look at http://www.swig.org" >&2;}
17377 SWIG='echo "Error: SWIG version >= is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false'
17378 else
17379 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17380 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17381 SWIG_LIB=`$SWIG -swiglib`
17382 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17383 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17384 fi
17385 else
17386 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17387 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17388 SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false'
17389 fi
17390 fi
17391
17392
17393 fi
17394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
17395 $as_echo_n "checking SWIG... " >&6; }
17396 if test ! -x "$SWIG"; then
17397 as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
17398 else
17399
17400 $as_echo "#define HAVE_SWIG 1" >>confdefs.h
17401
17402 swig="$SWIG"
17403
17404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
17405 $as_echo "present" >&6; }
17406
17407 # If have Python & SWIG
17408 # Declare PythonMod
17409 if test x_$ub_with_pythonmod != x_no; then
17410
17411 $as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
17412
17413 WITH_PYTHONMODULE=yes
17414
17415 PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
17416
17417 PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
17418
17419 PYTHONMOD_INSTALL=pythonmod-install
17420
17421 PYTHONMOD_UNINSTALL=pythonmod-uninstall
17422
17423 fi
17424
17425 # Declare PyUnbound
17426 if test x_$ub_with_pyunbound != x_no; then
17427
17428 $as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
17429
17430 WITH_PYUNBOUND=yes
17431
17432 PYUNBOUND_OBJ="libunbound_wrap.lo"
17433
17434 PYUNBOUND_TARGET="_unbound.la"
17435
17436 PYUNBOUND_INSTALL=pyunbound-install
17437
17438 PYUNBOUND_UNINSTALL=pyunbound-uninstall
17439
17440 fi
17441 fi
17442 else
17443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
17444 $as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
17445 ub_with_pyunbound=no
17446 ub_with_pythonmod=no
17447 fi
17448 fi
17449
17450 if test "`uname`" = "NetBSD"; then
17451 NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
17452
17453 fi
17454 CONFIG_DATE=`date +%Y%m%d`
17455
17456
17457 # Checks for libraries.
17458
17459 # libnss
17460 USE_NSS="no"
17461
17462 # Check whether --with-nss was given.
17463 if test "${with_nss+set}" = set; then :
17464 withval=$with_nss;
17465 USE_NSS="yes"
17466
17467 $as_echo "#define HAVE_NSS 1" >>confdefs.h
17468
17469 if test "$withval" != "" -a "$withval" != "yes"; then
17470 CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
17471 LDFLAGS="$LDFLAGS -L$withval/lib"
17472
17473 if test "x$enable_rpath" = xyes; then
17474 if echo "$withval/lib" | grep "^/" >/dev/null; then
17475 RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17476 fi
17477 fi
17478
17479 CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
17480 else
17481 CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
17482 CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
17483 fi
17484 LIBS="$LIBS -lnss3 -lnspr4"
17485 SSLLIB=""
17486
17487
17488 fi
17489
17490
17491 # libnettle
17492 USE_NETTLE="no"
17493
17494 # Check whether --with-nettle was given.
17495 if test "${with_nettle+set}" = set; then :
17496 withval=$with_nettle;
17497 USE_NETTLE="yes"
17498
17499 $as_echo "#define HAVE_NETTLE 1" >>confdefs.h
17500
17501 for ac_header in nettle/dsa-compat.h
17502 do :
17503 ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
17504 "
17505 if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then :
17506 cat >>confdefs.h <<_ACEOF
17507 #define HAVE_NETTLE_DSA_COMPAT_H 1
17508 _ACEOF
17509
17510 fi
17511
17512 done
17513
17514 if test "$withval" != "" -a "$withval" != "yes"; then
17515 CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
17516 LDFLAGS="$LDFLAGS -L$withval/lib"
17517
17518 if test "x$enable_rpath" = xyes; then
17519 if echo "$withval/lib" | grep "^/" >/dev/null; then
17520 RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17521 fi
17522 fi
17523
17524 else
17525 CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
17526 fi
17527 LIBS="$LIBS -lhogweed -lnettle -lgmp"
17528 SSLLIB=""
17529
17530
17531 fi
17532
17533
17534 # openssl
17535 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17536
17537
17538 # Check whether --with-ssl was given.
17539 if test "${with_ssl+set}" = set; then :
17540 withval=$with_ssl;
17541
17542 else
17543
17544 withval="yes"
17545
17546 fi
17547
17548 if test x_$withval = x_no; then
17549 as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
17550 fi
17551
17552 withval=$withval
17553 if test x_$withval != x_no; then
17554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
17555 $as_echo_n "checking for SSL... " >&6; }
17556 if test x_$withval = x_ -o x_$withval = x_yes; then
17557 withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
17558 fi
17559 for dir in $withval; do
17560 ssldir="$dir"
17561 if test -f "$dir/include/openssl/ssl.h"; then
17562 found_ssl="yes"
17563
17564 cat >>confdefs.h <<_ACEOF
17565 #define HAVE_SSL /**/
17566 _ACEOF
17567
17568 if test "$ssldir" != "/usr"; then
17569 CPPFLAGS="$CPPFLAGS -I$ssldir/include"
17570 LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
17571 fi
17572 break;
17573 fi
17574 done
17575 if test x_$found_ssl != x_yes; then
17576 as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
17577 else
17578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
17579 $as_echo "found in $ssldir" >&6; }
17580 HAVE_SSL=yes
17581 if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
17582 LDFLAGS="$LDFLAGS -L$ssldir/lib"
17583 LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
17584
17585 if test "x$enable_rpath" = xyes; then
17586 if echo "$ssldir/lib" | grep "^/" >/dev/null; then
17587 RUNTIME_PATH="$RUNTIME_PATH -R$ssldir/lib"
17588 fi
17589 fi
17590
17591 fi
17592
17593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_Update in -lcrypto" >&5
17594 $as_echo_n "checking for HMAC_Update in -lcrypto... " >&6; }
17595 LIBS="$LIBS -lcrypto"
17596 LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
17597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17598 /* end confdefs.h. */
17599
17600 int
17601 main ()
17602 {
17603
17604 int HMAC_Update(void);
17605 (void)HMAC_Update();
17606
17607 ;
17608 return 0;
17609 }
17610 _ACEOF
17611 if ac_fn_c_try_link "$LINENO"; then :
17612
17613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17614 $as_echo "yes" >&6; }
17615
17616 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17617
17618
17619 else
17620
17621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17622 $as_echo "no" >&6; }
17623 # check if -lwsock32 or -lgdi32 are needed.
17624 BAKLIBS="$LIBS"
17625 BAKSSLLIBS="$LIBSSL_LIBS"
17626 LIBS="$LIBS -lgdi32 -lws2_32"
17627 LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
17628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
17629 $as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
17630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17631 /* end confdefs.h. */
17632
17633 int
17634 main ()
17635 {
17636
17637 int HMAC_Update(void);
17638 (void)HMAC_Update();
17639
17640 ;
17641 return 0;
17642 }
17643 _ACEOF
17644 if ac_fn_c_try_link "$LINENO"; then :
17645
17646
17647 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17648
17649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17650 $as_echo "yes" >&6; }
17651
17652 else
17653
17654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17655 $as_echo "no" >&6; }
17656 LIBS="$BAKLIBS"
17657 LIBSSL_LIBS="$BAKSSLLIBS"
17658 LIBS="$LIBS -ldl"
17659 LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
17660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
17661 $as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
17662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17663 /* end confdefs.h. */
17664
17665 int
17666 main ()
17667 {
17668
17669 int HMAC_Update(void);
17670 (void)HMAC_Update();
17671
17672 ;
17673 return 0;
17674 }
17675 _ACEOF
17676 if ac_fn_c_try_link "$LINENO"; then :
17677
17678
17679 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17680
17681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17682 $as_echo "yes" >&6; }
17683
17684 else
17685
17686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17687 $as_echo "no" >&6; }
17688 LIBS="$BAKLIBS"
17689 LIBSSL_LIBS="$BAKSSLLIBS"
17690 LIBS="$LIBS -ldl -pthread"
17691 LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
17692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
17693 $as_echo_n "checking if -lcrypto needs -ldl -pthread... " >&6; }
17694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17695 /* end confdefs.h. */
17696
17697 int
17698 main ()
17699 {
17700
17701 int HMAC_Update(void);
17702 (void)HMAC_Update();
17703
17704 ;
17705 return 0;
17706 }
17707 _ACEOF
17708 if ac_fn_c_try_link "$LINENO"; then :
17709
17710
17711 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17712
17713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17714 $as_echo "yes" >&6; }
17715
17716 else
17717
17718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17719 $as_echo "no" >&6; }
17720 as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
17721
17722 fi
17723 rm -f core conftest.err conftest.$ac_objext \
17724 conftest$ac_exeext conftest.$ac_ext
17725
17726 fi
17727 rm -f core conftest.err conftest.$ac_objext \
17728 conftest$ac_exeext conftest.$ac_ext
17729
17730 fi
17731 rm -f core conftest.err conftest.$ac_objext \
17732 conftest$ac_exeext conftest.$ac_ext
17733
17734 fi
17735 rm -f core conftest.err conftest.$ac_objext \
17736 conftest$ac_exeext conftest.$ac_ext
17737 fi
17738
17739
17740 fi
17741 for ac_header in openssl/ssl.h
17742 do :
17743 ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
17744 "
17745 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
17746 cat >>confdefs.h <<_ACEOF
17747 #define HAVE_OPENSSL_SSL_H 1
17748 _ACEOF
17749
17750 fi
17751
17752 done
17753
17754 for ac_header in openssl/err.h
17755 do :
17756 ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
17757 "
17758 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
17759 cat >>confdefs.h <<_ACEOF
17760 #define HAVE_OPENSSL_ERR_H 1
17761 _ACEOF
17762
17763 fi
17764
17765 done
17766
17767 for ac_header in openssl/rand.h
17768 do :
17769 ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
17770 "
17771 if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
17772 cat >>confdefs.h <<_ACEOF
17773 #define HAVE_OPENSSL_RAND_H 1
17774 _ACEOF
17775
17776 fi
17777
17778 done
17779
17780
17781
17782
17783 # check if libssl needs libdl
17784 BAKLIBS="$LIBS"
17785 LIBS="-lssl $LIBS"
17786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
17787 $as_echo_n "checking if libssl needs libdl... " >&6; }
17788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17789 /* end confdefs.h. */
17790
17791 /* Override any GCC internal prototype to avoid an error.
17792 Use char because int might match the return type of a GCC
17793 builtin and then its argument prototype would still apply. */
17794 #ifdef __cplusplus
17795 extern "C"
17796 #endif
17797 char SSL_CTX_new ();
17798 int
17799 main ()
17800 {
17801 return SSL_CTX_new ();
17802 ;
17803 return 0;
17804 }
17805 _ACEOF
17806 if ac_fn_c_try_link "$LINENO"; then :
17807
17808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17809 $as_echo "no" >&6; }
17810 LIBS="$BAKLIBS"
17811
17812 else
17813
17814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17815 $as_echo "yes" >&6; }
17816 LIBS="$BAKLIBS"
17817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17818 $as_echo_n "checking for library containing dlopen... " >&6; }
17819 if ${ac_cv_search_dlopen+:} false; then :
17820 $as_echo_n "(cached) " >&6
17821 else
17822 ac_func_search_save_LIBS=$LIBS
17823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17824 /* end confdefs.h. */
17825
17826 /* Override any GCC internal prototype to avoid an error.
17827 Use char because int might match the return type of a GCC
17828 builtin and then its argument prototype would still apply. */
17829 #ifdef __cplusplus
17830 extern "C"
17831 #endif
17832 char dlopen ();
17833 int
17834 main ()
17835 {
17836 return dlopen ();
17837 ;
17838 return 0;
17839 }
17840 _ACEOF
17841 for ac_lib in '' dl; do
17842 if test -z "$ac_lib"; then
17843 ac_res="none required"
17844 else
17845 ac_res=-l$ac_lib
17846 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17847 fi
17848 if ac_fn_c_try_link "$LINENO"; then :
17849 ac_cv_search_dlopen=$ac_res
17850 fi
17851 rm -f core conftest.err conftest.$ac_objext \
17852 conftest$ac_exeext
17853 if ${ac_cv_search_dlopen+:} false; then :
17854 break
17855 fi
17856 done
17857 if ${ac_cv_search_dlopen+:} false; then :
17858
17859 else
17860 ac_cv_search_dlopen=no
17861 fi
17862 rm conftest.$ac_ext
17863 LIBS=$ac_func_search_save_LIBS
17864 fi
17865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17866 $as_echo "$ac_cv_search_dlopen" >&6; }
17867 ac_res=$ac_cv_search_dlopen
17868 if test "$ac_res" != no; then :
17869 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17870
17871 fi
17872
17873
17874 fi
17875 rm -f core conftest.err conftest.$ac_objext \
17876 conftest$ac_exeext conftest.$ac_ext
17877 SSLLIB="-lssl"
17878
17879 # check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
17880 BAKLIBS="$LIBS"
17881 LIBS="-lssl $LIBS"
17882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
17883 $as_echo_n "checking if libssl needs -lcrypt32... " >&6; }
17884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17885 /* end confdefs.h. */
17886
17887 /* Override any GCC internal prototype to avoid an error.
17888 Use char because int might match the return type of a GCC
17889 builtin and then its argument prototype would still apply. */
17890 #ifdef __cplusplus
17891 extern "C"
17892 #endif
17893 char HMAC_Update ();
17894 int
17895 main ()
17896 {
17897 return HMAC_Update ();
17898 ;
17899 return 0;
17900 }
17901 _ACEOF
17902 if ac_fn_c_try_link "$LINENO"; then :
17903
17904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17905 $as_echo "no" >&6; }
17906 LIBS="$BAKLIBS"
17907
17908 else
17909
17910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17911 $as_echo "yes" >&6; }
17912 LIBS="$BAKLIBS"
17913 LIBS="$LIBS -lcrypt32"
17914
17915 fi
17916 rm -f core conftest.err conftest.$ac_objext \
17917 conftest$ac_exeext conftest.$ac_ext
17918
17919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
17920 $as_echo_n "checking for LibreSSL... " >&6; }
17921 if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
17922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17923 $as_echo "yes" >&6; }
17924
17925 $as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
17926
17927 # libressl provides these compat functions, but they may also be
17928 # declared by the OS in libc. See if they have been declared.
17929 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
17930 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
17931 ac_have_decl=1
17932 else
17933 ac_have_decl=0
17934 fi
17935
17936 cat >>confdefs.h <<_ACEOF
17937 #define HAVE_DECL_STRLCPY $ac_have_decl
17938 _ACEOF
17939 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
17940 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
17941 ac_have_decl=1
17942 else
17943 ac_have_decl=0
17944 fi
17945
17946 cat >>confdefs.h <<_ACEOF
17947 #define HAVE_DECL_STRLCAT $ac_have_decl
17948 _ACEOF
17949 ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
17950 if test "x$ac_cv_have_decl_arc4random" = xyes; then :
17951 ac_have_decl=1
17952 else
17953 ac_have_decl=0
17954 fi
17955
17956 cat >>confdefs.h <<_ACEOF
17957 #define HAVE_DECL_ARC4RANDOM $ac_have_decl
17958 _ACEOF
17959 ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
17960 if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
17961 ac_have_decl=1
17962 else
17963 ac_have_decl=0
17964 fi
17965
17966 cat >>confdefs.h <<_ACEOF
17967 #define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
17968 _ACEOF
17969 ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
17970 if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
17971 ac_have_decl=1
17972 else
17973 ac_have_decl=0
17974 fi
17975
17976 cat >>confdefs.h <<_ACEOF
17977 #define HAVE_DECL_REALLOCARRAY $ac_have_decl
17978 _ACEOF
17979
17980 else
17981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17982 $as_echo "no" >&6; }
17983 fi
17984 for ac_header in openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h
17985 do :
17986 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17987 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
17988 "
17989 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17990 cat >>confdefs.h <<_ACEOF
17991 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17992 _ACEOF
17993
17994 fi
17995
17996 done
17997
17998 for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1 EVP_DigestVerify SSL_CTX_set_tlsext_ticket_key_cb EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex CRYPTO_THREADID_set_callback
17999 do :
18000 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18001 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18002 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18003 cat >>confdefs.h <<_ACEOF
18004 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18005 _ACEOF
18006
18007 fi
18008 done
18009
18010
18011 # these check_funcs need -lssl
18012 BAKLIBS="$LIBS"
18013 LIBS="-lssl $LIBS"
18014 for ac_func in OPENSSL_init_ssl SSL_CTX_set_security_level SSL_set1_host SSL_get0_peername X509_VERIFY_PARAM_set1_host SSL_CTX_set_ciphersuites
18015 do :
18016 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18017 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18018 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18019 cat >>confdefs.h <<_ACEOF
18020 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18021 _ACEOF
18022
18023 fi
18024 done
18025
18026 LIBS="$BAKLIBS"
18027
18028 ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
18029 $ac_includes_default
18030 #ifdef HAVE_OPENSSL_ERR_H
18031 #include <openssl/err.h>
18032 #endif
18033
18034 #ifdef HAVE_OPENSSL_RAND_H
18035 #include <openssl/rand.h>
18036 #endif
18037
18038 #ifdef HAVE_OPENSSL_CONF_H
18039 #include <openssl/conf.h>
18040 #endif
18041
18042 #ifdef HAVE_OPENSSL_ENGINE_H
18043 #include <openssl/engine.h>
18044 #endif
18045 #include <openssl/ssl.h>
18046 #include <openssl/evp.h>
18047
18048 "
18049 if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
18050 ac_have_decl=1
18051 else
18052 ac_have_decl=0
18053 fi
18054
18055 cat >>confdefs.h <<_ACEOF
18056 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
18057 _ACEOF
18058 ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
18059 $ac_includes_default
18060 #ifdef HAVE_OPENSSL_ERR_H
18061 #include <openssl/err.h>
18062 #endif
18063
18064 #ifdef HAVE_OPENSSL_RAND_H
18065 #include <openssl/rand.h>
18066 #endif
18067
18068 #ifdef HAVE_OPENSSL_CONF_H
18069 #include <openssl/conf.h>
18070 #endif
18071
18072 #ifdef HAVE_OPENSSL_ENGINE_H
18073 #include <openssl/engine.h>
18074 #endif
18075 #include <openssl/ssl.h>
18076 #include <openssl/evp.h>
18077
18078 "
18079 if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
18080 ac_have_decl=1
18081 else
18082 ac_have_decl=0
18083 fi
18084
18085 cat >>confdefs.h <<_ACEOF
18086 #define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
18087 _ACEOF
18088 ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
18089 $ac_includes_default
18090 #ifdef HAVE_OPENSSL_ERR_H
18091 #include <openssl/err.h>
18092 #endif
18093
18094 #ifdef HAVE_OPENSSL_RAND_H
18095 #include <openssl/rand.h>
18096 #endif
18097
18098 #ifdef HAVE_OPENSSL_CONF_H
18099 #include <openssl/conf.h>
18100 #endif
18101
18102 #ifdef HAVE_OPENSSL_ENGINE_H
18103 #include <openssl/engine.h>
18104 #endif
18105 #include <openssl/ssl.h>
18106 #include <openssl/evp.h>
18107
18108 "
18109 if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
18110 ac_have_decl=1
18111 else
18112 ac_have_decl=0
18113 fi
18114
18115 cat >>confdefs.h <<_ACEOF
18116 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
18117 _ACEOF
18118
18119 fi
18120
18121
18122
18123 # Check whether --enable-sha1 was given.
18124 if test "${enable_sha1+set}" = set; then :
18125 enableval=$enable_sha1;
18126 fi
18127
18128 case "$enable_sha1" in
18129 no)
18130 ;;
18131 yes|*)
18132
18133 $as_echo "#define USE_SHA1 1" >>confdefs.h
18134
18135 ;;
18136 esac
18137
18138
18139 # Check whether --enable-sha2 was given.
18140 if test "${enable_sha2+set}" = set; then :
18141 enableval=$enable_sha2;
18142 fi
18143
18144 case "$enable_sha2" in
18145 no)
18146 ;;
18147 yes|*)
18148
18149 $as_echo "#define USE_SHA2 1" >>confdefs.h
18150
18151 ;;
18152 esac
18153
18154 # Check whether --enable-subnet was given.
18155 if test "${enable_subnet+set}" = set; then :
18156 enableval=$enable_subnet;
18157 fi
18158
18159 case "$enable_subnet" in
18160 yes)
18161
18162 $as_echo "#define CLIENT_SUBNET 1" >>confdefs.h
18163
18164 SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
18165
18166 SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
18167
18168 ;;
18169 no|*)
18170 ;;
18171 esac
18172
18173 # check wether gost also works
18174
18175 # Check whether --enable-gost was given.
18176 if test "${enable_gost+set}" = set; then :
18177 enableval=$enable_gost;
18178 fi
18179
18180 use_gost="no"
18181 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18182 case "$enable_gost" in
18183 no)
18184 ;;
18185 *)
18186 ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
18187 if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
18188 :
18189 else
18190 as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
18191 fi
18192
18193 ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
18194 if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
18195
18196 else
18197 as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
18198 fi
18199
18200
18201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
18202 $as_echo_n "checking if GOST works... " >&6; }
18203 if test c${cross_compiling} = cno; then
18204 BAKCFLAGS="$CFLAGS"
18205 if test -n "$ssldir"; then
18206 CFLAGS="$CFLAGS -Wl,-rpath,$ssldir/lib"
18207 fi
18208 if test "$cross_compiling" = yes; then :
18209 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18210 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18211 as_fn_error $? "cannot run test program while cross compiling
18212 See \`config.log' for more details" "$LINENO" 5; }
18213 else
18214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18215 /* end confdefs.h. */
18216
18217 #include <string.h>
18218 #include <openssl/ssl.h>
18219 #include <openssl/evp.h>
18220 #include <openssl/engine.h>
18221 #include <openssl/conf.h>
18222 /* routine to load gost (from sldns) */
18223 int load_gost_id(void)
18224 {
18225 static int gost_id = 0;
18226 const EVP_PKEY_ASN1_METHOD* meth;
18227 ENGINE* e;
18228
18229 if(gost_id) return gost_id;
18230
18231 /* see if configuration loaded gost implementation from other engine*/
18232 meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
18233 if(meth) {
18234 EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18235 return gost_id;
18236 }
18237
18238 /* see if engine can be loaded already */
18239 e = ENGINE_by_id("gost");
18240 if(!e) {
18241 /* load it ourself, in case statically linked */
18242 ENGINE_load_builtin_engines();
18243 ENGINE_load_dynamic();
18244 e = ENGINE_by_id("gost");
18245 }
18246 if(!e) {
18247 /* no gost engine in openssl */
18248 return 0;
18249 }
18250 if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
18251 ENGINE_finish(e);
18252 ENGINE_free(e);
18253 return 0;
18254 }
18255
18256 meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
18257 if(!meth) {
18258 /* algo not found */
18259 ENGINE_finish(e);
18260 ENGINE_free(e);
18261 return 0;
18262 }
18263 EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18264 return gost_id;
18265 }
18266 int main(void) {
18267 EVP_MD_CTX* ctx;
18268 const EVP_MD* md;
18269 unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
18270 const char* str = "Hello world";
18271 const unsigned char check[] = {
18272 0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
18273 0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
18274 0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
18275 0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
18276 };
18277 OPENSSL_config(NULL);
18278 (void)load_gost_id();
18279 md = EVP_get_digestbyname("md_gost94");
18280 if(!md) return 1;
18281 memset(digest, 0, sizeof(digest));
18282 ctx = EVP_MD_CTX_create();
18283 if(!ctx) return 2;
18284 if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
18285 if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
18286 if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
18287 /* uncomment to see the hash calculated.
18288 {int i;
18289 for(i=0; i<32; i++)
18290 printf(" %2.2x", (int)digest[i]);
18291 printf("\n");}
18292 */
18293 if(memcmp(digest, check, sizeof(check)) != 0)
18294 return 6;
18295 return 0;
18296 }
18297
18298 _ACEOF
18299 if ac_fn_c_try_run "$LINENO"; then :
18300 eval "ac_cv_c_gost_works=yes"
18301 else
18302 eval "ac_cv_c_gost_works=no"
18303 fi
18304 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18305 conftest.$ac_objext conftest.beam conftest.$ac_ext
18306 fi
18307
18308 CFLAGS="$BAKCFLAGS"
18309 else
18310 eval "ac_cv_c_gost_works=maybe"
18311 fi
18312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
18313 $as_echo "$ac_cv_c_gost_works" >&6; }
18314
18315 if test "$ac_cv_c_gost_works" != no; then
18316 use_gost="yes"
18317
18318 $as_echo "#define USE_GOST 1" >>confdefs.h
18319
18320 fi
18321 ;;
18322 esac
18323 fi
18324 # Check whether --enable-ecdsa was given.
18325 if test "${enable_ecdsa+set}" = set; then :
18326 enableval=$enable_ecdsa;
18327 fi
18328
18329 use_ecdsa="no"
18330 case "$enable_ecdsa" in
18331 no)
18332 ;;
18333 *)
18334 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18335 ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
18336 if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
18337
18338 else
18339 as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18340 fi
18341
18342 ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
18343 if test "x$ac_cv_func_SHA384_Init" = xyes; then :
18344
18345 else
18346 as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18347 fi
18348
18349 ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
18350 #include <openssl/evp.h>
18351
18352 "
18353 if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
18354 ac_have_decl=1
18355 else
18356 ac_have_decl=0
18357 fi
18358
18359 cat >>confdefs.h <<_ACEOF
18360 #define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
18361 _ACEOF
18362 if test $ac_have_decl = 1; then :
18363
18364 else
18365 as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18366 fi
18367 ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
18368 #include <openssl/evp.h>
18369
18370 "
18371 if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
18372 ac_have_decl=1
18373 else
18374 ac_have_decl=0
18375 fi
18376
18377 cat >>confdefs.h <<_ACEOF
18378 #define HAVE_DECL_NID_SECP384R1 $ac_have_decl
18379 _ACEOF
18380 if test $ac_have_decl = 1; then :
18381
18382 else
18383 as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18384 fi
18385
18386 # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
18387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
18388 $as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
18389 if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
18390 if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
18391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18392 $as_echo "no" >&6; }
18393
18394 cat >>confdefs.h <<_ACEOF
18395 #define USE_ECDSA_EVP_WORKAROUND 1
18396 _ACEOF
18397
18398 else
18399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18400 $as_echo "yes" >&6; }
18401 fi
18402 else
18403 # not OpenSSL, thus likely LibreSSL, which supports it
18404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18405 $as_echo "yes" >&6; }
18406 fi
18407 fi
18408 # we now know we have ECDSA and the required curves.
18409
18410 cat >>confdefs.h <<_ACEOF
18411 #define USE_ECDSA 1
18412 _ACEOF
18413
18414 use_ecdsa="yes"
18415 ;;
18416 esac
18417
18418 # Check whether --enable-dsa was given.
18419 if test "${enable_dsa+set}" = set; then :
18420 enableval=$enable_dsa;
18421 fi
18422
18423 use_dsa="no"
18424 case "$enable_dsa" in
18425 no)
18426 ;;
18427 *)
18428 # detect if DSA is supported, and turn it off if not.
18429 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18430 ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
18431 if test "x$ac_cv_func_DSA_SIG_new" = xyes; then :
18432
18433 as_ac_Type=`$as_echo "ac_cv_type_DSA_SIG*" | $as_tr_sh`
18434 ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
18435 $ac_includes_default
18436 #ifdef HAVE_OPENSSL_ERR_H
18437 #include <openssl/err.h>
18438 #endif
18439
18440 #ifdef HAVE_OPENSSL_RAND_H
18441 #include <openssl/rand.h>
18442 #endif
18443
18444 #ifdef HAVE_OPENSSL_CONF_H
18445 #include <openssl/conf.h>
18446 #endif
18447
18448 #ifdef HAVE_OPENSSL_ENGINE_H
18449 #include <openssl/engine.h>
18450 #endif
18451
18452 "
18453 if eval test \"x\$"$as_ac_Type"\" = x"yes"; then :
18454
18455
18456 cat >>confdefs.h <<_ACEOF
18457 #define USE_DSA 1
18458 _ACEOF
18459
18460
18461 else
18462 if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
18463 fi
18464 fi
18465
18466
18467 else
18468 if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
18469 fi
18470 fi
18471
18472 else
18473
18474 cat >>confdefs.h <<_ACEOF
18475 #define USE_DSA 1
18476 _ACEOF
18477
18478 fi
18479 ;;
18480 esac
18481
18482 # Check whether --enable-ed25519 was given.
18483 if test "${enable_ed25519+set}" = set; then :
18484 enableval=$enable_ed25519;
18485 fi
18486
18487 use_ed25519="no"
18488 case "$enable_ed25519" in
18489 no)
18490 ;;
18491 *)
18492 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18493 ac_fn_c_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
18494 #include <openssl/evp.h>
18495
18496 "
18497 if test "x$ac_cv_have_decl_NID_ED25519" = xyes; then :
18498 ac_have_decl=1
18499 else
18500 ac_have_decl=0
18501 fi
18502
18503 cat >>confdefs.h <<_ACEOF
18504 #define HAVE_DECL_NID_ED25519 $ac_have_decl
18505 _ACEOF
18506 if test $ac_have_decl = 1; then :
18507
18508 use_ed25519="yes"
18509
18510 else
18511 if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
18512 fi
18513 fi
18514
18515 fi
18516 if test $USE_NETTLE = "yes"; then
18517 for ac_header in nettle/eddsa.h
18518 do :
18519 ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
18520 "
18521 if test "x$ac_cv_header_nettle_eddsa_h" = xyes; then :
18522 cat >>confdefs.h <<_ACEOF
18523 #define HAVE_NETTLE_EDDSA_H 1
18524 _ACEOF
18525 use_ed25519="yes"
18526 fi
18527
18528 done
18529
18530 fi
18531 if test $use_ed25519 = "yes"; then
18532
18533 cat >>confdefs.h <<_ACEOF
18534 #define USE_ED25519 1
18535 _ACEOF
18536
18537 fi
18538 ;;
18539 esac
18540
18541 # Check whether --enable-ed448 was given.
18542 if test "${enable_ed448+set}" = set; then :
18543 enableval=$enable_ed448;
18544 fi
18545
18546 use_ed448="no"
18547 case "$enable_ed448" in
18548 no)
18549 ;;
18550 *)
18551 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18552 ac_fn_c_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
18553 #include <openssl/evp.h>
18554
18555 "
18556 if test "x$ac_cv_have_decl_NID_ED448" = xyes; then :
18557 ac_have_decl=1
18558 else
18559 ac_have_decl=0
18560 fi
18561
18562 cat >>confdefs.h <<_ACEOF
18563 #define HAVE_DECL_NID_ED448 $ac_have_decl
18564 _ACEOF
18565 if test $ac_have_decl = 1; then :
18566
18567 use_ed448="yes"
18568
18569 else
18570 if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
18571 fi
18572 fi
18573
18574 fi
18575 if test $use_ed448 = "yes"; then
18576
18577 cat >>confdefs.h <<_ACEOF
18578 #define USE_ED448 1
18579 _ACEOF
18580
18581 fi
18582 ;;
18583 esac
18584
18585 # Check whether --enable-event-api was given.
18586 if test "${enable_event_api+set}" = set; then :
18587 enableval=$enable_event_api;
18588 fi
18589
18590 case "$enable_event_api" in
18591 yes)
18592 UNBOUND_EVENT_INSTALL=unbound-event-install
18593
18594 UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
18595
18596 ;;
18597 *)
18598 ;;
18599 esac
18600
18601 # Check whether --enable-tfo-client was given.
18602 if test "${enable_tfo_client+set}" = set; then :
18603 enableval=$enable_tfo_client;
18604 fi
18605
18606 case "$enable_tfo_client" in
18607 yes)
18608 case `uname` in
18609 Linux) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
18610 #include <netinet/tcp.h>
18611
18612 "
18613 if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then :
18614 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
18615 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
18616 else
18617 as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
18618 fi
18619
18620
18621 cat >>confdefs.h <<_ACEOF
18622 #define USE_MSG_FASTOPEN 1
18623 _ACEOF
18624
18625 ;;
18626 Darwin) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
18627 #include <sys/socket.h>
18628
18629 "
18630 if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then :
18631 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
18632 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
18633 else
18634 as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
18635 fi
18636
18637
18638 cat >>confdefs.h <<_ACEOF
18639 #define USE_OSX_MSG_FASTOPEN 1
18640 _ACEOF
18641
18642 ;;
18643 esac
18644 ;;
18645 no|*)
18646 ;;
18647 esac
18648
18649 # Check whether --enable-tfo-server was given.
18650 if test "${enable_tfo_server+set}" = set; then :
18651 enableval=$enable_tfo_server;
18652 fi
18653
18654 case "$enable_tfo_server" in
18655 yes)
18656 ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
18657 #include <netinet/tcp.h>
18658
18659 "
18660 if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then :
18661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
18662 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
18663 else
18664 as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
18665 fi
18666
18667
18668 cat >>confdefs.h <<_ACEOF
18669 #define USE_TCP_FASTOPEN 1
18670 _ACEOF
18671
18672 ;;
18673 no|*)
18674 ;;
18675 esac
18676
18677 # check for libevent
18678
18679 # Check whether --with-libevent was given.
18680 if test "${with_libevent+set}" = set; then :
18681 withval=$with_libevent;
18682 else
18683 withval="no"
18684 fi
18685
18686 if test x_$withval = x_yes -o x_$withval != x_no; then
18687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
18688 $as_echo_n "checking for libevent... " >&6; }
18689 if test x_$withval = x_ -o x_$withval = x_yes; then
18690 withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18691 fi
18692 for dir in $withval; do
18693 thedir="$dir"
18694 if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
18695 found_libevent="yes"
18696 if test "$thedir" != "/usr"; then
18697 CPPFLAGS="$CPPFLAGS -I$thedir/include"
18698 fi
18699 break;
18700 fi
18701 done
18702 if test x_$found_libevent != x_yes; then
18703 if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
18704 # libevent source directory
18705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
18706 $as_echo "found in $thedir" >&6; }
18707 CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
18708 BAK_LDFLAGS_SET="1"
18709 BAK_LDFLAGS="$LDFLAGS"
18710 # remove evdns from linking
18711 mkdir build >/dev/null 2>&1
18712 mkdir build/libevent >/dev/null 2>&1
18713 mkdir build/libevent/.libs >/dev/null 2>&1
18714 ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
18715 ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
18716 ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
18717 cp $ev_files_o build/libevent
18718 cp $ev_files_lo build/libevent
18719 cp $ev_files_libso build/libevent/.libs
18720 LATE_LDFLAGS="build/libevent/*.lo -lm"
18721 LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
18722 else
18723 as_fn_error $? "Cannot find the libevent library in $withval
18724 You can restart ./configure --with-libevent=no to use a builtin alternative.
18725 Please note that this alternative is not as capable as libevent when using
18726 large outgoing port ranges. " "$LINENO" 5
18727 fi
18728 else
18729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
18730 $as_echo "found in $thedir" >&6; }
18731 if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
18732 LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
18733
18734 if test "x$enable_rpath" = xyes; then
18735 if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
18736 RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
18737 fi
18738 fi
18739
18740 else
18741 if test "$thedir" != "/usr" -a "$thedir" != ""; then
18742 LDFLAGS="$LDFLAGS -L$thedir/lib"
18743
18744 if test "x$enable_rpath" = xyes; then
18745 if echo "$thedir/lib" | grep "^/" >/dev/null; then
18746 RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
18747 fi
18748 fi
18749
18750 fi
18751 fi
18752 fi
18753 # check for library used by libevent after 1.3c
18754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18755 $as_echo_n "checking for library containing clock_gettime... " >&6; }
18756 if ${ac_cv_search_clock_gettime+:} false; then :
18757 $as_echo_n "(cached) " >&6
18758 else
18759 ac_func_search_save_LIBS=$LIBS
18760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18761 /* end confdefs.h. */
18762
18763 /* Override any GCC internal prototype to avoid an error.
18764 Use char because int might match the return type of a GCC
18765 builtin and then its argument prototype would still apply. */
18766 #ifdef __cplusplus
18767 extern "C"
18768 #endif
18769 char clock_gettime ();
18770 int
18771 main ()
18772 {
18773 return clock_gettime ();
18774 ;
18775 return 0;
18776 }
18777 _ACEOF
18778 for ac_lib in '' rt; do
18779 if test -z "$ac_lib"; then
18780 ac_res="none required"
18781 else
18782 ac_res=-l$ac_lib
18783 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18784 fi
18785 if ac_fn_c_try_link "$LINENO"; then :
18786 ac_cv_search_clock_gettime=$ac_res
18787 fi
18788 rm -f core conftest.err conftest.$ac_objext \
18789 conftest$ac_exeext
18790 if ${ac_cv_search_clock_gettime+:} false; then :
18791 break
18792 fi
18793 done
18794 if ${ac_cv_search_clock_gettime+:} false; then :
18795
18796 else
18797 ac_cv_search_clock_gettime=no
18798 fi
18799 rm conftest.$ac_ext
18800 LIBS=$ac_func_search_save_LIBS
18801 fi
18802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18803 $as_echo "$ac_cv_search_clock_gettime" >&6; }
18804 ac_res=$ac_cv_search_clock_gettime
18805 if test "$ac_res" != no; then :
18806 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18807
18808 fi
18809
18810
18811 # is the event.h header libev or libevent?
18812 for ac_header in event.h
18813 do :
18814 ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
18815 "
18816 if test "x$ac_cv_header_event_h" = xyes; then :
18817 cat >>confdefs.h <<_ACEOF
18818 #define HAVE_EVENT_H 1
18819 _ACEOF
18820
18821 fi
18822
18823 done
18824
18825 ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
18826 #include <event.h>
18827
18828 "
18829 if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
18830
18831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
18832 $as_echo_n "checking for library containing event_set... " >&6; }
18833 if ${ac_cv_search_event_set+:} false; then :
18834 $as_echo_n "(cached) " >&6
18835 else
18836 ac_func_search_save_LIBS=$LIBS
18837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18838 /* end confdefs.h. */
18839
18840 /* Override any GCC internal prototype to avoid an error.
18841 Use char because int might match the return type of a GCC
18842 builtin and then its argument prototype would still apply. */
18843 #ifdef __cplusplus
18844 extern "C"
18845 #endif
18846 char event_set ();
18847 int
18848 main ()
18849 {
18850 return event_set ();
18851 ;
18852 return 0;
18853 }
18854 _ACEOF
18855 for ac_lib in '' ev; do
18856 if test -z "$ac_lib"; then
18857 ac_res="none required"
18858 else
18859 ac_res=-l$ac_lib
18860 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18861 fi
18862 if ac_fn_c_try_link "$LINENO"; then :
18863 ac_cv_search_event_set=$ac_res
18864 fi
18865 rm -f core conftest.err conftest.$ac_objext \
18866 conftest$ac_exeext
18867 if ${ac_cv_search_event_set+:} false; then :
18868 break
18869 fi
18870 done
18871 if ${ac_cv_search_event_set+:} false; then :
18872
18873 else
18874 ac_cv_search_event_set=no
18875 fi
18876 rm conftest.$ac_ext
18877 LIBS=$ac_func_search_save_LIBS
18878 fi
18879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
18880 $as_echo "$ac_cv_search_event_set" >&6; }
18881 ac_res=$ac_cv_search_event_set
18882 if test "$ac_res" != no; then :
18883 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18884
18885 fi
18886
18887
18888 else
18889
18890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
18891 $as_echo_n "checking for library containing event_set... " >&6; }
18892 if ${ac_cv_search_event_set+:} false; then :
18893 $as_echo_n "(cached) " >&6
18894 else
18895 ac_func_search_save_LIBS=$LIBS
18896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18897 /* end confdefs.h. */
18898
18899 /* Override any GCC internal prototype to avoid an error.
18900 Use char because int might match the return type of a GCC
18901 builtin and then its argument prototype would still apply. */
18902 #ifdef __cplusplus
18903 extern "C"
18904 #endif
18905 char event_set ();
18906 int
18907 main ()
18908 {
18909 return event_set ();
18910 ;
18911 return 0;
18912 }
18913 _ACEOF
18914 for ac_lib in '' event; do
18915 if test -z "$ac_lib"; then
18916 ac_res="none required"
18917 else
18918 ac_res=-l$ac_lib
18919 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18920 fi
18921 if ac_fn_c_try_link "$LINENO"; then :
18922 ac_cv_search_event_set=$ac_res
18923 fi
18924 rm -f core conftest.err conftest.$ac_objext \
18925 conftest$ac_exeext
18926 if ${ac_cv_search_event_set+:} false; then :
18927 break
18928 fi
18929 done
18930 if ${ac_cv_search_event_set+:} false; then :
18931
18932 else
18933 ac_cv_search_event_set=no
18934 fi
18935 rm conftest.$ac_ext
18936 LIBS=$ac_func_search_save_LIBS
18937 fi
18938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
18939 $as_echo "$ac_cv_search_event_set" >&6; }
18940 ac_res=$ac_cv_search_event_set
18941 if test "$ac_res" != no; then :
18942 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18943
18944 fi
18945
18946
18947 fi
18948
18949 for ac_func in event_base_free
18950 do :
18951 ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
18952 if test "x$ac_cv_func_event_base_free" = xyes; then :
18953 cat >>confdefs.h <<_ACEOF
18954 #define HAVE_EVENT_BASE_FREE 1
18955 _ACEOF
18956
18957 fi
18958 done
18959 # only in libevent 1.2 and later
18960 for ac_func in event_base_once
18961 do :
18962 ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
18963 if test "x$ac_cv_func_event_base_once" = xyes; then :
18964 cat >>confdefs.h <<_ACEOF
18965 #define HAVE_EVENT_BASE_ONCE 1
18966 _ACEOF
18967
18968 fi
18969 done
18970 # only in libevent 1.4.1 and later
18971 for ac_func in event_base_new
18972 do :
18973 ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
18974 if test "x$ac_cv_func_event_base_new" = xyes; then :
18975 cat >>confdefs.h <<_ACEOF
18976 #define HAVE_EVENT_BASE_NEW 1
18977 _ACEOF
18978
18979 fi
18980 done
18981 # only in libevent 1.4.1 and later
18982 for ac_func in event_base_get_method
18983 do :
18984 ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
18985 if test "x$ac_cv_func_event_base_get_method" = xyes; then :
18986 cat >>confdefs.h <<_ACEOF
18987 #define HAVE_EVENT_BASE_GET_METHOD 1
18988 _ACEOF
18989
18990 fi
18991 done
18992 # only in libevent 1.4.3 and later
18993 for ac_func in ev_loop
18994 do :
18995 ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
18996 if test "x$ac_cv_func_ev_loop" = xyes; then :
18997 cat >>confdefs.h <<_ACEOF
18998 #define HAVE_EV_LOOP 1
18999 _ACEOF
19000
19001 fi
19002 done
19003 # only in libev. (tested on 3.51)
19004 for ac_func in ev_default_loop
19005 do :
19006 ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
19007 if test "x$ac_cv_func_ev_default_loop" = xyes; then :
19008 cat >>confdefs.h <<_ACEOF
19009 #define HAVE_EV_DEFAULT_LOOP 1
19010 _ACEOF
19011
19012 fi
19013 done
19014 # only in libev. (tested on 4.00)
19015 PC_LIBEVENT_DEPENDENCY="libevent"
19016
19017 if test -n "$BAK_LDFLAGS_SET"; then
19018 LDFLAGS="$BAK_LDFLAGS"
19019 fi
19020 else
19021
19022 $as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
19023
19024 fi
19025
19026 # check for libexpat
19027
19028 # Check whether --with-libexpat was given.
19029 if test "${with_libexpat+set}" = set; then :
19030 withval=$with_libexpat;
19031 else
19032 withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19033 fi
19034
19035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
19036 $as_echo_n "checking for libexpat... " >&6; }
19037 found_libexpat="no"
19038 for dir in $withval ; do
19039 if test -f "$dir/include/expat.h"; then
19040 found_libexpat="yes"
19041 if test "$dir" != "/usr"; then
19042 CPPFLAGS="$CPPFLAGS -I$dir/include"
19043 LDFLAGS="$LDFLAGS -L$dir/lib"
19044 fi
19045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19046 $as_echo "found in $dir" >&6; }
19047 break;
19048 fi
19049 done
19050 if test x_$found_libexpat != x_yes; then
19051 as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
19052 fi
19053 for ac_header in expat.h
19054 do :
19055 ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
19056 "
19057 if test "x$ac_cv_header_expat_h" = xyes; then :
19058 cat >>confdefs.h <<_ACEOF
19059 #define HAVE_EXPAT_H 1
19060 _ACEOF
19061
19062 fi
19063
19064 done
19065
19066 ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
19067 #include <expat.h>
19068
19069 "
19070 if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then :
19071 ac_have_decl=1
19072 else
19073 ac_have_decl=0
19074 fi
19075
19076 cat >>confdefs.h <<_ACEOF
19077 #define HAVE_DECL_XML_STOPPARSER $ac_have_decl
19078 _ACEOF
19079
19080
19081 # hiredis (redis C client for cachedb)
19082
19083 # Check whether --with-libhiredis was given.
19084 if test "${with_libhiredis+set}" = set; then :
19085 withval=$with_libhiredis;
19086 else
19087 withval="no"
19088 fi
19089
19090 found_libhiredis="no"
19091 if test x_$withval = x_yes -o x_$withval != x_no; then
19092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
19093 $as_echo_n "checking for libhiredis... " >&6; }
19094 if test x_$withval = x_ -o x_$withval = x_yes; then
19095 withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
19096 fi
19097 for dir in $withval ; do
19098 if test -f "$dir/include/hiredis/hiredis.h"; then
19099 found_libhiredis="yes"
19100 if test "$dir" != "/usr"; then
19101 CPPFLAGS="$CPPFLAGS -I$dir/include"
19102 LDFLAGS="$LDFLAGS -L$dir/lib"
19103 fi
19104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
19105 $as_echo "found in $dir" >&6; }
19106
19107 $as_echo "#define USE_REDIS 1" >>confdefs.h
19108
19109 LIBS="$LIBS -lhiredis"
19110 break;
19111 fi
19112 done
19113 if test x_$found_libhiredis != x_yes; then
19114 as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
19115 fi
19116 for ac_header in hiredis/hiredis.h
19117 do :
19118 ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
19119 "
19120 if test "x$ac_cv_header_hiredis_hiredis_h" = xyes; then :
19121 cat >>confdefs.h <<_ACEOF
19122 #define HAVE_HIREDIS_HIREDIS_H 1
19123 _ACEOF
19124
19125 fi
19126
19127 done
19128
19129 ac_fn_c_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
19130 #include <hiredis/hiredis.h>
19131
19132 "
19133 if test "x$ac_cv_have_decl_redisConnect" = xyes; then :
19134 ac_have_decl=1
19135 else
19136 ac_have_decl=0
19137 fi
19138
19139 cat >>confdefs.h <<_ACEOF
19140 #define HAVE_DECL_REDISCONNECT $ac_have_decl
19141 _ACEOF
19142
19143 fi
19144
19145 # set static linking if requested
19146
19147 staticexe=""
19148 # Check whether --enable-static-exe was given.
19149 if test "${enable_static_exe+set}" = set; then :
19150 enableval=$enable_static_exe;
19151 fi
19152
19153 if test x_$enable_static_exe = x_yes; then
19154 staticexe="-static"
19155 if test "$on_mingw" = yes; then
19156 staticexe="-all-static"
19157 # for static compile, include gdi32 and zlib here.
19158 if echo $LIBS | grep 'lgdi32' >/dev/null; then
19159 :
19160 else
19161 LIBS="$LIBS -lgdi32"
19162 fi
19163 LIBS="$LIBS -lz"
19164 fi
19165 fi
19166
19167 # Include systemd.m4 - begin
19168 # macros for configuring systemd
19169 # Copyright 2015, Sami Kerola, CloudFlare.
19170 # BSD licensed.
19171 # Check whether --enable-systemd was given.
19172 if test "${enable_systemd+set}" = set; then :
19173 enableval=$enable_systemd;
19174 else
19175 enable_systemd=no
19176 fi
19177
19178 have_systemd=no
19179 if test "x$enable_systemd" != xno; then :
19180
19181
19182
19183 pkg_failed=no
19184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
19185 $as_echo_n "checking for SYSTEMD... " >&6; }
19186
19187 if test -n "$SYSTEMD_CFLAGS"; then
19188 pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
19189 elif test -n "$PKG_CONFIG"; then
19190 if test -n "$PKG_CONFIG" && \
19191 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
19192 ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
19193 ac_status=$?
19194 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19195 test $ac_status = 0; }; then
19196 pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
19197 test "x$?" != "x0" && pkg_failed=yes
19198 else
19199 pkg_failed=yes
19200 fi
19201 else
19202 pkg_failed=untried
19203 fi
19204 if test -n "$SYSTEMD_LIBS"; then
19205 pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
19206 elif test -n "$PKG_CONFIG"; then
19207 if test -n "$PKG_CONFIG" && \
19208 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
19209 ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
19210 ac_status=$?
19211 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19212 test $ac_status = 0; }; then
19213 pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
19214 test "x$?" != "x0" && pkg_failed=yes
19215 else
19216 pkg_failed=yes
19217 fi
19218 else
19219 pkg_failed=untried
19220 fi
19221
19222
19223
19224 if test $pkg_failed = yes; then
19225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19226 $as_echo "no" >&6; }
19227
19228 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
19229 _pkg_short_errors_supported=yes
19230 else
19231 _pkg_short_errors_supported=no
19232 fi
19233 if test $_pkg_short_errors_supported = yes; then
19234 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
19235 else
19236 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
19237 fi
19238 # Put the nasty error message in config.log where it belongs
19239 echo "$SYSTEMD_PKG_ERRORS" >&5
19240
19241 have_systemd=no
19242 elif test $pkg_failed = untried; then
19243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19244 $as_echo "no" >&6; }
19245 have_systemd=no
19246 else
19247 SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
19248 SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
19249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19250 $as_echo "yes" >&6; }
19251 have_systemd=yes
19252 fi
19253 if test "x$have_systemd" != "xyes"; then :
19254
19255
19256 pkg_failed=no
19257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
19258 $as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
19259
19260 if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
19261 pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
19262 elif test -n "$PKG_CONFIG"; then
19263 if test -n "$PKG_CONFIG" && \
19264 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
19265 ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
19266 ac_status=$?
19267 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19268 test $ac_status = 0; }; then
19269 pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
19270 test "x$?" != "x0" && pkg_failed=yes
19271 else
19272 pkg_failed=yes
19273 fi
19274 else
19275 pkg_failed=untried
19276 fi
19277 if test -n "$SYSTEMD_DAEMON_LIBS"; then
19278 pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
19279 elif test -n "$PKG_CONFIG"; then
19280 if test -n "$PKG_CONFIG" && \
19281 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
19282 ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
19283 ac_status=$?
19284 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19285 test $ac_status = 0; }; then
19286 pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
19287 test "x$?" != "x0" && pkg_failed=yes
19288 else
19289 pkg_failed=yes
19290 fi
19291 else
19292 pkg_failed=untried
19293 fi
19294
19295
19296
19297 if test $pkg_failed = yes; then
19298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19299 $as_echo "no" >&6; }
19300
19301 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
19302 _pkg_short_errors_supported=yes
19303 else
19304 _pkg_short_errors_supported=no
19305 fi
19306 if test $_pkg_short_errors_supported = yes; then
19307 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
19308 else
19309 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
19310 fi
19311 # Put the nasty error message in config.log where it belongs
19312 echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
19313
19314 have_systemd_daemon=no
19315 elif test $pkg_failed = untried; then
19316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19317 $as_echo "no" >&6; }
19318 have_systemd_daemon=no
19319 else
19320 SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
19321 SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
19322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19323 $as_echo "yes" >&6; }
19324 have_systemd_daemon=yes
19325 fi
19326 if test "x$have_systemd_daemon" = "xyes"; then :
19327 have_systemd=yes
19328 fi
19329
19330 fi
19331 case $enable_systemd:$have_systemd in #(
19332 yes:no) :
19333 as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
19334 *:yes) :
19335
19336 $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
19337
19338 LIBS="$LIBS $SYSTEMD_LIBS"
19339
19340 ;; #(
19341 *) :
19342 ;;
19343 esac
19344
19345
19346 fi
19347 if test "x$have_systemd" = xyes; then
19348 USE_SYSTEMD_TRUE=
19349 USE_SYSTEMD_FALSE='#'
19350 else
19351 USE_SYSTEMD_TRUE='#'
19352 USE_SYSTEMD_FALSE=
19353 fi
19354
19355
19356 # Include systemd.m4 - end
19357
19358 # set lock checking if requested
19359 # Check whether --enable-lock_checks was given.
19360 if test "${enable_lock_checks+set}" = set; then :
19361 enableval=$enable_lock_checks;
19362 fi
19363
19364 if test x_$enable_lock_checks = x_yes; then
19365
19366 $as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
19367
19368 CHECKLOCK_OBJ="checklocks.lo"
19369
19370 fi
19371
19372
19373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
19374 $as_echo_n "checking for getaddrinfo... " >&6; }
19375 ac_cv_func_getaddrinfo=no
19376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19377 /* end confdefs.h. */
19378
19379 #ifdef __cplusplus
19380 extern "C"
19381 {
19382 #endif
19383 char* getaddrinfo();
19384 char* (*f) () = getaddrinfo;
19385 #ifdef __cplusplus
19386 }
19387 #endif
19388 int main() {
19389 ;
19390 return 0;
19391 }
19392
19393 _ACEOF
19394 if ac_fn_c_try_link "$LINENO"; then :
19395 ac_cv_func_getaddrinfo="yes"
19396 if test "$ac_cv_header_windows_h" = "yes"; then
19397
19398 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
19399
19400 USE_WINSOCK="1"
19401 if echo $LIBS | grep 'lws2_32' >/dev/null; then
19402 :
19403 else
19404 LIBS="$LIBS -lws2_32"
19405 fi
19406 fi
19407
19408 else
19409 ORIGLIBS="$LIBS"
19410 LIBS="$LIBS -lws2_32"
19411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19412 /* end confdefs.h. */
19413
19414 #ifdef HAVE_WS2TCPIP_H
19415 #include <ws2tcpip.h>
19416 #endif
19417
19418 int
19419 main ()
19420 {
19421
19422 (void)getaddrinfo(NULL, NULL, NULL, NULL);
19423
19424
19425 ;
19426 return 0;
19427 }
19428 _ACEOF
19429 if ac_fn_c_try_link "$LINENO"; then :
19430
19431 ac_cv_func_getaddrinfo="yes"
19432
19433 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
19434
19435 USE_WINSOCK="1"
19436
19437 else
19438
19439 ac_cv_func_getaddrinfo="no"
19440 LIBS="$ORIGLIBS"
19441
19442 fi
19443 rm -f core conftest.err conftest.$ac_objext \
19444 conftest$ac_exeext conftest.$ac_ext
19445
19446 fi
19447 rm -f core conftest.err conftest.$ac_objext \
19448 conftest$ac_exeext conftest.$ac_ext
19449
19450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
19451 $as_echo "$ac_cv_func_getaddrinfo" >&6; }
19452 if test $ac_cv_func_getaddrinfo = yes; then
19453
19454 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
19455
19456 fi
19457
19458 if test "$USE_WINSOCK" = 1; then
19459
19460 $as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
19461
19462 for ac_header in iphlpapi.h
19463 do :
19464 ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
19465 #include <windows.h>
19466
19467 "
19468 if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
19469 cat >>confdefs.h <<_ACEOF
19470 #define HAVE_IPHLPAPI_H 1
19471 _ACEOF
19472
19473 fi
19474
19475 done
19476
19477 if test -n "$ac_tool_prefix"; then
19478 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
19479 set dummy ${ac_tool_prefix}windres; ac_word=$2
19480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19481 $as_echo_n "checking for $ac_word... " >&6; }
19482 if ${ac_cv_prog_WINDRES+:} false; then :
19483 $as_echo_n "(cached) " >&6
19484 else
19485 if test -n "$WINDRES"; then
19486 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
19487 else
19488 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19489 for as_dir in $PATH
19490 do
19491 IFS=$as_save_IFS
19492 test -z "$as_dir" && as_dir=.
19493 for ac_exec_ext in '' $ac_executable_extensions; do
19494 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19495 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
19496 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19497 break 2
19498 fi
19499 done
19500 done
19501 IFS=$as_save_IFS
19502
19503 fi
19504 fi
19505 WINDRES=$ac_cv_prog_WINDRES
19506 if test -n "$WINDRES"; then
19507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
19508 $as_echo "$WINDRES" >&6; }
19509 else
19510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19511 $as_echo "no" >&6; }
19512 fi
19513
19514
19515 fi
19516 if test -z "$ac_cv_prog_WINDRES"; then
19517 ac_ct_WINDRES=$WINDRES
19518 # Extract the first word of "windres", so it can be a program name with args.
19519 set dummy windres; ac_word=$2
19520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19521 $as_echo_n "checking for $ac_word... " >&6; }
19522 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
19523 $as_echo_n "(cached) " >&6
19524 else
19525 if test -n "$ac_ct_WINDRES"; then
19526 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
19527 else
19528 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19529 for as_dir in $PATH
19530 do
19531 IFS=$as_save_IFS
19532 test -z "$as_dir" && as_dir=.
19533 for ac_exec_ext in '' $ac_executable_extensions; do
19534 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19535 ac_cv_prog_ac_ct_WINDRES="windres"
19536 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19537 break 2
19538 fi
19539 done
19540 done
19541 IFS=$as_save_IFS
19542
19543 fi
19544 fi
19545 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
19546 if test -n "$ac_ct_WINDRES"; then
19547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
19548 $as_echo "$ac_ct_WINDRES" >&6; }
19549 else
19550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19551 $as_echo "no" >&6; }
19552 fi
19553
19554 if test "x$ac_ct_WINDRES" = x; then
19555 WINDRES=""
19556 else
19557 case $cross_compiling:$ac_tool_warned in
19558 yes:)
19559 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19560 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19561 ac_tool_warned=yes ;;
19562 esac
19563 WINDRES=$ac_ct_WINDRES
19564 fi
19565 else
19566 WINDRES="$ac_cv_prog_WINDRES"
19567 fi
19568
19569 LIBS="$LIBS -liphlpapi -lcrypt32"
19570 WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
19571
19572 WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
19573
19574 WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
19575
19576 WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
19577
19578 WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
19579
19580 WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
19581
19582 WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
19583
19584 WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
19585
19586 fi
19587 if test $ac_cv_func_getaddrinfo = no; then
19588 case " $LIBOBJS " in
19589 *" fake-rfc2553.$ac_objext "* ) ;;
19590 *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
19591 ;;
19592 esac
19593
19594 fi
19595 # check after getaddrinfo for its libraries
19596
19597 # check ioctlsocket
19598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
19599 $as_echo_n "checking for ioctlsocket... " >&6; }
19600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19601 /* end confdefs.h. */
19602
19603 #ifdef HAVE_WINSOCK2_H
19604 #include <winsock2.h>
19605 #endif
19606
19607 int
19608 main ()
19609 {
19610
19611 (void)ioctlsocket(0, 0, NULL);
19612
19613 ;
19614 return 0;
19615 }
19616 _ACEOF
19617 if ac_fn_c_try_link "$LINENO"; then :
19618
19619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19620 $as_echo "yes" >&6; }
19621
19622 $as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
19623
19624
19625 else
19626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19627 $as_echo "no" >&6; }
19628 fi
19629 rm -f core conftest.err conftest.$ac_objext \
19630 conftest$ac_exeext conftest.$ac_ext
19631
19632
19633 # see if daemon(3) exists, and if it is deprecated.
19634 for ac_func in daemon
19635 do :
19636 ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
19637 if test "x$ac_cv_func_daemon" = xyes; then :
19638 cat >>confdefs.h <<_ACEOF
19639 #define HAVE_DAEMON 1
19640 _ACEOF
19641
19642 fi
19643 done
19644
19645 if test $ac_cv_func_daemon = yes; then
19646
19647
19648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
19649 $as_echo_n "checking if daemon is deprecated... " >&6; }
19650 cache=`echo daemon | sed 'y%.=/+-%___p_%'`
19651 if eval \${cv_cc_deprecated_$cache+:} false; then :
19652 $as_echo_n "(cached) " >&6
19653 else
19654
19655 echo '
19656 #include <stdlib.h>
19657 ' >conftest.c
19658 echo 'void f(){ (void)daemon(0, 0); }' >>conftest.c
19659 if test -z "`$CC -c conftest.c 2>&1 | grep deprecated`"; then
19660 eval "cv_cc_deprecated_$cache=no"
19661 else
19662 eval "cv_cc_deprecated_$cache=yes"
19663 fi
19664 rm -f conftest conftest.o conftest.c
19665
19666 fi
19667
19668 if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
19669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19670 $as_echo "yes" >&6; }
19671
19672 cat >>confdefs.h <<_ACEOF
19673 #define DEPRECATED_DAEMON 1
19674 _ACEOF
19675
19676 :
19677
19678 else
19679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19680 $as_echo "no" >&6; }
19681 :
19682
19683 fi
19684
19685 fi
19686
19687 ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
19688 $ac_includes_default
19689 #ifdef HAVE_SYS_UN_H
19690 #include <sys/un.h>
19691 #endif
19692
19693 "
19694 if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
19695
19696 cat >>confdefs.h <<_ACEOF
19697 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
19698 _ACEOF
19699
19700
19701 fi
19702
19703 ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
19704 $ac_includes_default
19705 #if HAVE_SYS_PARAM_H
19706 #include <sys/param.h>
19707 #endif
19708
19709 #ifdef HAVE_SYS_SOCKET_H
19710 #include <sys/socket.h>
19711 #endif
19712
19713 #ifdef HAVE_SYS_UIO_H
19714 #include <sys/uio.h>
19715 #endif
19716
19717 #ifdef HAVE_NETINET_IN_H
19718 #include <netinet/in.h>
19719 #endif
19720
19721 #ifdef HAVE_NETINET_TCP_H
19722 #include <netinet/tcp.h>
19723 #endif
19724
19725 #ifdef HAVE_ARPA_INET_H
19726 #include <arpa/inet.h>
19727 #endif
19728
19729 #ifdef HAVE_WINSOCK2_H
19730 #include <winsock2.h>
19731 #endif
19732
19733 #ifdef HAVE_WS2TCPIP_H
19734 #include <ws2tcpip.h>
19735 #endif
19736
19737 "
19738 if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
19739
19740 cat >>confdefs.h <<_ACEOF
19741 #define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
19742 _ACEOF
19743
19744
19745 fi
19746
19747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
19748 $as_echo_n "checking for library containing setusercontext... " >&6; }
19749 if ${ac_cv_search_setusercontext+:} false; then :
19750 $as_echo_n "(cached) " >&6
19751 else
19752 ac_func_search_save_LIBS=$LIBS
19753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19754 /* end confdefs.h. */
19755
19756 /* Override any GCC internal prototype to avoid an error.
19757 Use char because int might match the return type of a GCC
19758 builtin and then its argument prototype would still apply. */
19759 #ifdef __cplusplus
19760 extern "C"
19761 #endif
19762 char setusercontext ();
19763 int
19764 main ()
19765 {
19766 return setusercontext ();
19767 ;
19768 return 0;
19769 }
19770 _ACEOF
19771 for ac_lib in '' util; do
19772 if test -z "$ac_lib"; then
19773 ac_res="none required"
19774 else
19775 ac_res=-l$ac_lib
19776 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19777 fi
19778 if ac_fn_c_try_link "$LINENO"; then :
19779 ac_cv_search_setusercontext=$ac_res
19780 fi
19781 rm -f core conftest.err conftest.$ac_objext \
19782 conftest$ac_exeext
19783 if ${ac_cv_search_setusercontext+:} false; then :
19784 break
19785 fi
19786 done
19787 if ${ac_cv_search_setusercontext+:} false; then :
19788
19789 else
19790 ac_cv_search_setusercontext=no
19791 fi
19792 rm conftest.$ac_ext
19793 LIBS=$ac_func_search_save_LIBS
19794 fi
19795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
19796 $as_echo "$ac_cv_search_setusercontext" >&6; }
19797 ac_res=$ac_cv_search_setusercontext
19798 if test "$ac_res" != no; then :
19799 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19800
19801 fi
19802
19803 for ac_func in tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync shmget accept4
19804 do :
19805 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19806 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19807 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19808 cat >>confdefs.h <<_ACEOF
19809 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19810 _ACEOF
19811
19812 fi
19813 done
19814
19815 for ac_func in setresuid
19816 do :
19817 ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
19818 if test "x$ac_cv_func_setresuid" = xyes; then :
19819 cat >>confdefs.h <<_ACEOF
19820 #define HAVE_SETRESUID 1
19821 _ACEOF
19822
19823 else
19824 for ac_func in setreuid
19825 do :
19826 ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
19827 if test "x$ac_cv_func_setreuid" = xyes; then :
19828 cat >>confdefs.h <<_ACEOF
19829 #define HAVE_SETREUID 1
19830 _ACEOF
19831
19832 fi
19833 done
19834
19835 fi
19836 done
19837
19838 for ac_func in setresgid
19839 do :
19840 ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
19841 if test "x$ac_cv_func_setresgid" = xyes; then :
19842 cat >>confdefs.h <<_ACEOF
19843 #define HAVE_SETRESGID 1
19844 _ACEOF
19845
19846 else
19847 for ac_func in setregid
19848 do :
19849 ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
19850 if test "x$ac_cv_func_setregid" = xyes; then :
19851 cat >>confdefs.h <<_ACEOF
19852 #define HAVE_SETREGID 1
19853 _ACEOF
19854
19855 fi
19856 done
19857
19858 fi
19859 done
19860
19861
19862 # check if setreuid en setregid fail, on MacOSX10.4(darwin8).
19863 if echo $target_os | grep darwin8 > /dev/null; then
19864
19865 $as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
19866
19867 fi
19868 ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
19869 $ac_includes_default
19870 #ifdef HAVE_NETINET_IN_H
19871 #include <netinet/in.h>
19872 #endif
19873
19874 #ifdef HAVE_NETINET_TCP_H
19875 #include <netinet/tcp.h>
19876 #endif
19877
19878 #ifdef HAVE_ARPA_INET_H
19879 #include <arpa/inet.h>
19880 #endif
19881
19882 #ifdef HAVE_WINSOCK2_H
19883 #include <winsock2.h>
19884 #endif
19885
19886 #ifdef HAVE_WS2TCPIP_H
19887 #include <ws2tcpip.h>
19888 #endif
19889
19890 "
19891 if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
19892 ac_have_decl=1
19893 else
19894 ac_have_decl=0
19895 fi
19896
19897 cat >>confdefs.h <<_ACEOF
19898 #define HAVE_DECL_INET_PTON $ac_have_decl
19899 _ACEOF
19900 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
19901 $ac_includes_default
19902 #ifdef HAVE_NETINET_IN_H
19903 #include <netinet/in.h>
19904 #endif
19905
19906 #ifdef HAVE_NETINET_TCP_H
19907 #include <netinet/tcp.h>
19908 #endif
19909
19910 #ifdef HAVE_ARPA_INET_H
19911 #include <arpa/inet.h>
19912 #endif
19913
19914 #ifdef HAVE_WINSOCK2_H
19915 #include <winsock2.h>
19916 #endif
19917
19918 #ifdef HAVE_WS2TCPIP_H
19919 #include <ws2tcpip.h>
19920 #endif
19921
19922 "
19923 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
19924 ac_have_decl=1
19925 else
19926 ac_have_decl=0
19927 fi
19928
19929 cat >>confdefs.h <<_ACEOF
19930 #define HAVE_DECL_INET_NTOP $ac_have_decl
19931 _ACEOF
19932
19933 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
19934 if test "x$ac_cv_func_inet_aton" = xyes; then :
19935 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
19936
19937 else
19938 case " $LIBOBJS " in
19939 *" inet_aton.$ac_objext "* ) ;;
19940 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
19941 ;;
19942 esac
19943
19944 fi
19945
19946
19947 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
19948 if test "x$ac_cv_func_inet_pton" = xyes; then :
19949 $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
19950
19951 else
19952 case " $LIBOBJS " in
19953 *" inet_pton.$ac_objext "* ) ;;
19954 *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
19955 ;;
19956 esac
19957
19958 fi
19959
19960
19961 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
19962 if test "x$ac_cv_func_inet_ntop" = xyes; then :
19963 $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
19964
19965 else
19966 case " $LIBOBJS " in
19967 *" inet_ntop.$ac_objext "* ) ;;
19968 *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
19969 ;;
19970 esac
19971
19972 fi
19973
19974
19975 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
19976 if test "x$ac_cv_func_snprintf" = xyes; then :
19977 $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
19978
19979 else
19980 case " $LIBOBJS " in
19981 *" snprintf.$ac_objext "* ) ;;
19982 *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
19983 ;;
19984 esac
19985
19986 fi
19987
19988
19989 # test if snprintf return the proper length
19990 if test "x$ac_cv_func_snprintf" = xyes; then
19991 if test c${cross_compiling} = cno; then
19992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
19993 $as_echo_n "checking for correct snprintf return value... " >&6; }
19994 if test "$cross_compiling" = yes; then :
19995 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19996 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19997 as_fn_error $? "cannot run test program while cross compiling
19998 See \`config.log' for more details" "$LINENO" 5; }
19999 else
20000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20001 /* end confdefs.h. */
20002 $ac_includes_default
20003
20004 int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
20005
20006 _ACEOF
20007 if ac_fn_c_try_run "$LINENO"; then :
20008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20009 $as_echo "yes" >&6; }
20010 else
20011
20012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20013 $as_echo "no" >&6; }
20014
20015 $as_echo "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
20016
20017 case " $LIBOBJS " in
20018 *" snprintf.$ac_objext "* ) ;;
20019 *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
20020 ;;
20021 esac
20022
20023
20024 fi
20025 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20026 conftest.$ac_objext conftest.beam conftest.$ac_ext
20027 fi
20028
20029 fi
20030 fi
20031 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
20032 if test "x$ac_cv_func_strlcat" = xyes; then :
20033 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
20034
20035 else
20036 case " $LIBOBJS " in
20037 *" strlcat.$ac_objext "* ) ;;
20038 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
20039 ;;
20040 esac
20041
20042 fi
20043
20044
20045 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
20046 if test "x$ac_cv_func_strlcpy" = xyes; then :
20047 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
20048
20049 else
20050 case " $LIBOBJS " in
20051 *" strlcpy.$ac_objext "* ) ;;
20052 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
20053 ;;
20054 esac
20055
20056 fi
20057
20058
20059 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
20060 if test "x$ac_cv_func_memmove" = xyes; then :
20061 $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
20062
20063 else
20064 case " $LIBOBJS " in
20065 *" memmove.$ac_objext "* ) ;;
20066 *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
20067 ;;
20068 esac
20069
20070 fi
20071
20072
20073 ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
20074 if test "x$ac_cv_func_gmtime_r" = xyes; then :
20075 $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
20076
20077 else
20078 case " $LIBOBJS " in
20079 *" gmtime_r.$ac_objext "* ) ;;
20080 *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
20081 ;;
20082 esac
20083
20084 fi
20085
20086
20087 ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
20088 if test "x$ac_cv_func_isblank" = xyes; then :
20089 $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
20090
20091 else
20092 case " $LIBOBJS " in
20093 *" isblank.$ac_objext "* ) ;;
20094 *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
20095 ;;
20096 esac
20097
20098 fi
20099
20100
20101 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
20102 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
20103 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
20104
20105 else
20106 case " $LIBOBJS " in
20107 *" explicit_bzero.$ac_objext "* ) ;;
20108 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
20109 ;;
20110 esac
20111
20112 fi
20113
20114
20115 LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
20116
20117 ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
20118 if test "x$ac_cv_func_reallocarray" = xyes; then :
20119 $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
20120
20121 else
20122 case " $LIBOBJS " in
20123 *" reallocarray.$ac_objext "* ) ;;
20124 *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
20125 ;;
20126 esac
20127
20128 fi
20129
20130
20131 if test "$USE_NSS" = "no"; then
20132 ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
20133 if test "x$ac_cv_func_arc4random" = xyes; then :
20134 $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
20135
20136 else
20137 case " $LIBOBJS " in
20138 *" arc4random.$ac_objext "* ) ;;
20139 *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
20140 ;;
20141 esac
20142
20143 fi
20144
20145
20146 ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
20147 if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
20148 $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
20149
20150 else
20151 case " $LIBOBJS " in
20152 *" arc4random_uniform.$ac_objext "* ) ;;
20153 *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
20154 ;;
20155 esac
20156
20157 fi
20158
20159
20160 if test "$ac_cv_func_arc4random" = "no"; then
20161 case " $LIBOBJS " in
20162 *" arc4_lock.$ac_objext "* ) ;;
20163 *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
20164 ;;
20165 esac
20166
20167 for ac_func in getentropy
20168 do :
20169 ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
20170 if test "x$ac_cv_func_getentropy" = xyes; then :
20171 cat >>confdefs.h <<_ACEOF
20172 #define HAVE_GETENTROPY 1
20173 _ACEOF
20174
20175 else
20176
20177 if test "$USE_WINSOCK" = 1; then
20178 case " $LIBOBJS " in
20179 *" getentropy_win.$ac_objext "* ) ;;
20180 *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
20181 ;;
20182 esac
20183
20184 else
20185 case "$host" in
20186 Darwin|*darwin*)
20187 case " $LIBOBJS " in
20188 *" getentropy_osx.$ac_objext "* ) ;;
20189 *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
20190 ;;
20191 esac
20192
20193 ;;
20194 *solaris*|*sunos*|SunOS)
20195 case " $LIBOBJS " in
20196 *" getentropy_solaris.$ac_objext "* ) ;;
20197 *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
20198 ;;
20199 esac
20200
20201 for ac_header in sys/sha2.h
20202 do :
20203 ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
20204 "
20205 if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
20206 cat >>confdefs.h <<_ACEOF
20207 #define HAVE_SYS_SHA2_H 1
20208 _ACEOF
20209
20210 else
20211
20212 for ac_func in SHA512_Update
20213 do :
20214 ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20215 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20216 cat >>confdefs.h <<_ACEOF
20217 #define HAVE_SHA512_UPDATE 1
20218 _ACEOF
20219
20220 else
20221
20222 case " $LIBOBJS " in
20223 *" sha512.$ac_objext "* ) ;;
20224 *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20225 ;;
20226 esac
20227
20228
20229 fi
20230 done
20231
20232
20233 fi
20234
20235 done
20236
20237 if test "$ac_cv_header_sys_sha2_h" = "yes"; then
20238 # this lib needed for sha2 on solaris
20239 LIBS="$LIBS -lmd"
20240 fi
20241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20242 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20243 if ${ac_cv_search_clock_gettime+:} false; then :
20244 $as_echo_n "(cached) " >&6
20245 else
20246 ac_func_search_save_LIBS=$LIBS
20247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20248 /* end confdefs.h. */
20249
20250 /* Override any GCC internal prototype to avoid an error.
20251 Use char because int might match the return type of a GCC
20252 builtin and then its argument prototype would still apply. */
20253 #ifdef __cplusplus
20254 extern "C"
20255 #endif
20256 char clock_gettime ();
20257 int
20258 main ()
20259 {
20260 return clock_gettime ();
20261 ;
20262 return 0;
20263 }
20264 _ACEOF
20265 for ac_lib in '' rt; do
20266 if test -z "$ac_lib"; then
20267 ac_res="none required"
20268 else
20269 ac_res=-l$ac_lib
20270 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20271 fi
20272 if ac_fn_c_try_link "$LINENO"; then :
20273 ac_cv_search_clock_gettime=$ac_res
20274 fi
20275 rm -f core conftest.err conftest.$ac_objext \
20276 conftest$ac_exeext
20277 if ${ac_cv_search_clock_gettime+:} false; then :
20278 break
20279 fi
20280 done
20281 if ${ac_cv_search_clock_gettime+:} false; then :
20282
20283 else
20284 ac_cv_search_clock_gettime=no
20285 fi
20286 rm conftest.$ac_ext
20287 LIBS=$ac_func_search_save_LIBS
20288 fi
20289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20290 $as_echo "$ac_cv_search_clock_gettime" >&6; }
20291 ac_res=$ac_cv_search_clock_gettime
20292 if test "$ac_res" != no; then :
20293 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20294
20295 fi
20296
20297 ;;
20298 *linux*|Linux|*)
20299 case " $LIBOBJS " in
20300 *" getentropy_linux.$ac_objext "* ) ;;
20301 *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
20302 ;;
20303 esac
20304
20305 for ac_func in SHA512_Update
20306 do :
20307 ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20308 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20309 cat >>confdefs.h <<_ACEOF
20310 #define HAVE_SHA512_UPDATE 1
20311 _ACEOF
20312
20313 else
20314
20315
20316 $as_echo "#define COMPAT_SHA512 1" >>confdefs.h
20317
20318 case " $LIBOBJS " in
20319 *" sha512.$ac_objext "* ) ;;
20320 *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20321 ;;
20322 esac
20323
20324
20325 fi
20326 done
20327
20328 for ac_header in sys/sysctl.h
20329 do :
20330 ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
20331 "
20332 if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
20333 cat >>confdefs.h <<_ACEOF
20334 #define HAVE_SYS_SYSCTL_H 1
20335 _ACEOF
20336
20337 fi
20338
20339 done
20340
20341 for ac_func in getauxval
20342 do :
20343 ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
20344 if test "x$ac_cv_func_getauxval" = xyes; then :
20345 cat >>confdefs.h <<_ACEOF
20346 #define HAVE_GETAUXVAL 1
20347 _ACEOF
20348
20349 fi
20350 done
20351
20352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20353 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20354 if ${ac_cv_search_clock_gettime+:} false; then :
20355 $as_echo_n "(cached) " >&6
20356 else
20357 ac_func_search_save_LIBS=$LIBS
20358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20359 /* end confdefs.h. */
20360
20361 /* Override any GCC internal prototype to avoid an error.
20362 Use char because int might match the return type of a GCC
20363 builtin and then its argument prototype would still apply. */
20364 #ifdef __cplusplus
20365 extern "C"
20366 #endif
20367 char clock_gettime ();
20368 int
20369 main ()
20370 {
20371 return clock_gettime ();
20372 ;
20373 return 0;
20374 }
20375 _ACEOF
20376 for ac_lib in '' rt; do
20377 if test -z "$ac_lib"; then
20378 ac_res="none required"
20379 else
20380 ac_res=-l$ac_lib
20381 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20382 fi
20383 if ac_fn_c_try_link "$LINENO"; then :
20384 ac_cv_search_clock_gettime=$ac_res
20385 fi
20386 rm -f core conftest.err conftest.$ac_objext \
20387 conftest$ac_exeext
20388 if ${ac_cv_search_clock_gettime+:} false; then :
20389 break
20390 fi
20391 done
20392 if ${ac_cv_search_clock_gettime+:} false; then :
20393
20394 else
20395 ac_cv_search_clock_gettime=no
20396 fi
20397 rm conftest.$ac_ext
20398 LIBS=$ac_func_search_save_LIBS
20399 fi
20400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20401 $as_echo "$ac_cv_search_clock_gettime" >&6; }
20402 ac_res=$ac_cv_search_clock_gettime
20403 if test "$ac_res" != no; then :
20404 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20405
20406 fi
20407
20408 ;;
20409 esac
20410 fi
20411
20412 fi
20413 done
20414
20415 fi
20416 fi
20417 LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
20418
20419 ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
20420 if test "x$ac_cv_func_ctime_r" = xyes; then :
20421 $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
20422
20423 else
20424 case " $LIBOBJS " in
20425 *" ctime_r.$ac_objext "* ) ;;
20426 *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
20427 ;;
20428 esac
20429
20430 fi
20431
20432
20433 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
20434 if test "x$ac_cv_func_strsep" = xyes; then :
20435 $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
20436
20437 else
20438 case " $LIBOBJS " in
20439 *" strsep.$ac_objext "* ) ;;
20440 *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
20441 ;;
20442 esac
20443
20444 fi
20445
20446
20447
20448 # Check whether --enable-allsymbols was given.
20449 if test "${enable_allsymbols+set}" = set; then :
20450 enableval=$enable_allsymbols;
20451 fi
20452
20453 case "$enable_allsymbols" in
20454 yes)
20455 COMMON_OBJ_ALL_SYMBOLS=""
20456 UBSYMS=""
20457 EXTRALINK="-L. -L.libs -lunbound"
20458
20459 $as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
20460
20461 ;;
20462 no|*)
20463 COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
20464 UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
20465 EXTRALINK=""
20466 ;;
20467 esac
20468
20469
20470
20471 if test x_$enable_lock_checks = x_yes; then
20472 UBSYMS="-export-symbols clubsyms.def"
20473 cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
20474 echo lock_protect >> clubsyms.def
20475 echo lock_unprotect >> clubsyms.def
20476 echo lock_get_mem >> clubsyms.def
20477 echo checklock_start >> clubsyms.def
20478 echo checklock_stop >> clubsyms.def
20479 echo checklock_lock >> clubsyms.def
20480 echo checklock_unlock >> clubsyms.def
20481 echo checklock_init >> clubsyms.def
20482 echo checklock_thrcreate >> clubsyms.def
20483 echo checklock_thrjoin >> clubsyms.def
20484 fi
20485
20486 # check for dnstap if requested
20487
20488 # Check whether --enable-dnstap was given.
20489 if test "${enable_dnstap+set}" = set; then :
20490 enableval=$enable_dnstap; opt_dnstap=$enableval
20491 else
20492 opt_dnstap=no
20493 fi
20494
20495
20496
20497 # Check whether --with-dnstap-socket-path was given.
20498 if test "${with_dnstap_socket_path+set}" = set; then :
20499 withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
20500 else
20501 opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
20502 fi
20503
20504
20505 if test "x$opt_dnstap" != "xno"; then
20506 # Extract the first word of "protoc-c", so it can be a program name with args.
20507 set dummy protoc-c; ac_word=$2
20508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20509 $as_echo_n "checking for $ac_word... " >&6; }
20510 if ${ac_cv_path_PROTOC_C+:} false; then :
20511 $as_echo_n "(cached) " >&6
20512 else
20513 case $PROTOC_C in
20514 [\\/]* | ?:[\\/]*)
20515 ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
20516 ;;
20517 *)
20518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20519 for as_dir in $PATH
20520 do
20521 IFS=$as_save_IFS
20522 test -z "$as_dir" && as_dir=.
20523 for ac_exec_ext in '' $ac_executable_extensions; do
20524 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20525 ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
20526 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20527 break 2
20528 fi
20529 done
20530 done
20531 IFS=$as_save_IFS
20532
20533 ;;
20534 esac
20535 fi
20536 PROTOC_C=$ac_cv_path_PROTOC_C
20537 if test -n "$PROTOC_C"; then
20538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
20539 $as_echo "$PROTOC_C" >&6; }
20540 else
20541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20542 $as_echo "no" >&6; }
20543 fi
20544
20545
20546 if test -z "$PROTOC_C"; then
20547 as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
20548 fi
20549
20550 # Check whether --with-protobuf-c was given.
20551 if test "${with_protobuf_c+set}" = set; then :
20552 withval=$with_protobuf_c;
20553 # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
20554 if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
20555 CFLAGS="$CFLAGS -I$withval/include/google"
20556 else
20557 CFLAGS="$CFLAGS -I$withval/include"
20558 fi
20559 LDFLAGS="$LDFLAGS -L$withval/lib"
20560
20561 else
20562
20563 # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
20564 if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
20565 CFLAGS="$CFLAGS -I/usr/include/google"
20566 else
20567 if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
20568 CFLAGS="$CFLAGS -I/usr/local/include/google"
20569 LDFLAGS="$LDFLAGS -L/usr/local/lib"
20570 fi
20571 fi
20572
20573 fi
20574
20575
20576 # Check whether --with-libfstrm was given.
20577 if test "${with_libfstrm+set}" = set; then :
20578 withval=$with_libfstrm;
20579 CFLAGS="$CFLAGS -I$withval/include"
20580 LDFLAGS="$LDFLAGS -L$withval/lib"
20581
20582 fi
20583
20584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fstrm_iothr_init" >&5
20585 $as_echo_n "checking for library containing fstrm_iothr_init... " >&6; }
20586 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20587 $as_echo_n "(cached) " >&6
20588 else
20589 ac_func_search_save_LIBS=$LIBS
20590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20591 /* end confdefs.h. */
20592
20593 /* Override any GCC internal prototype to avoid an error.
20594 Use char because int might match the return type of a GCC
20595 builtin and then its argument prototype would still apply. */
20596 #ifdef __cplusplus
20597 extern "C"
20598 #endif
20599 char fstrm_iothr_init ();
20600 int
20601 main ()
20602 {
20603 return fstrm_iothr_init ();
20604 ;
20605 return 0;
20606 }
20607 _ACEOF
20608 for ac_lib in '' fstrm; do
20609 if test -z "$ac_lib"; then
20610 ac_res="none required"
20611 else
20612 ac_res=-l$ac_lib
20613 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20614 fi
20615 if ac_fn_c_try_link "$LINENO"; then :
20616 ac_cv_search_fstrm_iothr_init=$ac_res
20617 fi
20618 rm -f core conftest.err conftest.$ac_objext \
20619 conftest$ac_exeext
20620 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20621 break
20622 fi
20623 done
20624 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20625
20626 else
20627 ac_cv_search_fstrm_iothr_init=no
20628 fi
20629 rm conftest.$ac_ext
20630 LIBS=$ac_func_search_save_LIBS
20631 fi
20632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fstrm_iothr_init" >&5
20633 $as_echo "$ac_cv_search_fstrm_iothr_init" >&6; }
20634 ac_res=$ac_cv_search_fstrm_iothr_init
20635 if test "$ac_res" != no; then :
20636 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20637
20638 else
20639 as_fn_error $? "The fstrm library was not found. Please install fstrm!" "$LINENO" 5
20640 fi
20641
20642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
20643 $as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
20644 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20645 $as_echo_n "(cached) " >&6
20646 else
20647 ac_func_search_save_LIBS=$LIBS
20648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20649 /* end confdefs.h. */
20650
20651 /* Override any GCC internal prototype to avoid an error.
20652 Use char because int might match the return type of a GCC
20653 builtin and then its argument prototype would still apply. */
20654 #ifdef __cplusplus
20655 extern "C"
20656 #endif
20657 char protobuf_c_message_pack ();
20658 int
20659 main ()
20660 {
20661 return protobuf_c_message_pack ();
20662 ;
20663 return 0;
20664 }
20665 _ACEOF
20666 for ac_lib in '' protobuf-c; do
20667 if test -z "$ac_lib"; then
20668 ac_res="none required"
20669 else
20670 ac_res=-l$ac_lib
20671 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20672 fi
20673 if ac_fn_c_try_link "$LINENO"; then :
20674 ac_cv_search_protobuf_c_message_pack=$ac_res
20675 fi
20676 rm -f core conftest.err conftest.$ac_objext \
20677 conftest$ac_exeext
20678 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20679 break
20680 fi
20681 done
20682 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20683
20684 else
20685 ac_cv_search_protobuf_c_message_pack=no
20686 fi
20687 rm conftest.$ac_ext
20688 LIBS=$ac_func_search_save_LIBS
20689 fi
20690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
20691 $as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
20692 ac_res=$ac_cv_search_protobuf_c_message_pack
20693 if test "$ac_res" != no; then :
20694 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20695
20696 else
20697 as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
20698 fi
20699
20700
20701
20702 $as_echo "#define USE_DNSTAP 1" >>confdefs.h
20703
20704 ENABLE_DNSTAP=1
20705
20706
20707
20708 hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
20709
20710
20711 cat >>confdefs.h <<_ACEOF
20712 #define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
20713 _ACEOF
20714
20715
20716 DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c"
20717
20718 DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo"
20719
20720
20721 else
20722
20723 ENABLE_DNSTAP=0
20724
20725
20726
20727 fi
20728
20729
20730 # check for dnscrypt if requested
20731
20732 # Check whether --enable-dnscrypt was given.
20733 if test "${enable_dnscrypt+set}" = set; then :
20734 enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
20735 else
20736 opt_dnscrypt=no
20737 fi
20738
20739
20740 if test "x$opt_dnscrypt" != "xno"; then
20741
20742 # Check whether --with-libsodium was given.
20743 if test "${with_libsodium+set}" = set; then :
20744 withval=$with_libsodium;
20745 CFLAGS="$CFLAGS -I$withval/include"
20746 LDFLAGS="$LDFLAGS -L$withval/lib"
20747
20748 fi
20749
20750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
20751 $as_echo_n "checking for library containing sodium_init... " >&6; }
20752 if ${ac_cv_search_sodium_init+:} false; then :
20753 $as_echo_n "(cached) " >&6
20754 else
20755 ac_func_search_save_LIBS=$LIBS
20756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20757 /* end confdefs.h. */
20758
20759 /* Override any GCC internal prototype to avoid an error.
20760 Use char because int might match the return type of a GCC
20761 builtin and then its argument prototype would still apply. */
20762 #ifdef __cplusplus
20763 extern "C"
20764 #endif
20765 char sodium_init ();
20766 int
20767 main ()
20768 {
20769 return sodium_init ();
20770 ;
20771 return 0;
20772 }
20773 _ACEOF
20774 for ac_lib in '' sodium; do
20775 if test -z "$ac_lib"; then
20776 ac_res="none required"
20777 else
20778 ac_res=-l$ac_lib
20779 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20780 fi
20781 if ac_fn_c_try_link "$LINENO"; then :
20782 ac_cv_search_sodium_init=$ac_res
20783 fi
20784 rm -f core conftest.err conftest.$ac_objext \
20785 conftest$ac_exeext
20786 if ${ac_cv_search_sodium_init+:} false; then :
20787 break
20788 fi
20789 done
20790 if ${ac_cv_search_sodium_init+:} false; then :
20791
20792 else
20793 ac_cv_search_sodium_init=no
20794 fi
20795 rm conftest.$ac_ext
20796 LIBS=$ac_func_search_save_LIBS
20797 fi
20798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
20799 $as_echo "$ac_cv_search_sodium_init" >&6; }
20800 ac_res=$ac_cv_search_sodium_init
20801 if test "$ac_res" != no; then :
20802 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20803
20804 else
20805 as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
20806 fi
20807
20808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
20809 $as_echo_n "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
20810 if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20811 $as_echo_n "(cached) " >&6
20812 else
20813 ac_func_search_save_LIBS=$LIBS
20814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20815 /* end confdefs.h. */
20816
20817 /* Override any GCC internal prototype to avoid an error.
20818 Use char because int might match the return type of a GCC
20819 builtin and then its argument prototype would still apply. */
20820 #ifdef __cplusplus
20821 extern "C"
20822 #endif
20823 char crypto_box_curve25519xchacha20poly1305_beforenm ();
20824 int
20825 main ()
20826 {
20827 return crypto_box_curve25519xchacha20poly1305_beforenm ();
20828 ;
20829 return 0;
20830 }
20831 _ACEOF
20832 for ac_lib in '' sodium; do
20833 if test -z "$ac_lib"; then
20834 ac_res="none required"
20835 else
20836 ac_res=-l$ac_lib
20837 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20838 fi
20839 if ac_fn_c_try_link "$LINENO"; then :
20840 ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
20841 fi
20842 rm -f core conftest.err conftest.$ac_objext \
20843 conftest$ac_exeext
20844 if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20845 break
20846 fi
20847 done
20848 if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20849
20850 else
20851 ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
20852 fi
20853 rm conftest.$ac_ext
20854 LIBS=$ac_func_search_save_LIBS
20855 fi
20856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
20857 $as_echo "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
20858 ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
20859 if test "$ac_res" != no; then :
20860 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20861
20862 ENABLE_DNSCRYPT_XCHACHA20=1
20863
20864
20865 $as_echo "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
20866
20867
20868 else
20869
20870 ENABLE_DNSCRYPT_XCHACHA20=0
20871
20872
20873 fi
20874
20875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
20876 $as_echo_n "checking for library containing sodium_set_misuse_handler... " >&6; }
20877 if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20878 $as_echo_n "(cached) " >&6
20879 else
20880 ac_func_search_save_LIBS=$LIBS
20881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20882 /* end confdefs.h. */
20883
20884 /* Override any GCC internal prototype to avoid an error.
20885 Use char because int might match the return type of a GCC
20886 builtin and then its argument prototype would still apply. */
20887 #ifdef __cplusplus
20888 extern "C"
20889 #endif
20890 char sodium_set_misuse_handler ();
20891 int
20892 main ()
20893 {
20894 return sodium_set_misuse_handler ();
20895 ;
20896 return 0;
20897 }
20898 _ACEOF
20899 for ac_lib in '' sodium; do
20900 if test -z "$ac_lib"; then
20901 ac_res="none required"
20902 else
20903 ac_res=-l$ac_lib
20904 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20905 fi
20906 if ac_fn_c_try_link "$LINENO"; then :
20907 ac_cv_search_sodium_set_misuse_handler=$ac_res
20908 fi
20909 rm -f core conftest.err conftest.$ac_objext \
20910 conftest$ac_exeext
20911 if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20912 break
20913 fi
20914 done
20915 if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20916
20917 else
20918 ac_cv_search_sodium_set_misuse_handler=no
20919 fi
20920 rm conftest.$ac_ext
20921 LIBS=$ac_func_search_save_LIBS
20922 fi
20923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
20924 $as_echo "$ac_cv_search_sodium_set_misuse_handler" >&6; }
20925 ac_res=$ac_cv_search_sodium_set_misuse_handler
20926 if test "$ac_res" != no; then :
20927 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20928
20929
20930 $as_echo "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
20931
20932
20933 fi
20934
20935
20936
20937 $as_echo "#define USE_DNSCRYPT 1" >>confdefs.h
20938
20939 ENABLE_DNSCRYPT=1
20940
20941
20942 DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
20943
20944 DNSCRYPT_OBJ="dnscrypt.lo"
20945
20946
20947 else
20948 ENABLE_DNSCRYPT_XCHACHA20=0
20949
20950
20951 ENABLE_DNSCRYPT=0
20952
20953
20954
20955 fi
20956
20957
20958 # check for cachedb if requested
20959 # Check whether --enable-cachedb was given.
20960 if test "${enable_cachedb+set}" = set; then :
20961 enableval=$enable_cachedb;
20962 fi
20963
20964 # turn on cachedb when hiredis support is enabled.
20965 if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
20966 case "$enable_cachedb" in
20967 yes)
20968
20969 $as_echo "#define USE_CACHEDB 1" >>confdefs.h
20970
20971 ;;
20972 no|*)
20973 # nothing
20974 ;;
20975 esac
20976
20977 # check for ipsecmod if requested
20978 # Check whether --enable-ipsecmod was given.
20979 if test "${enable_ipsecmod+set}" = set; then :
20980 enableval=$enable_ipsecmod;
20981 fi
20982
20983 case "$enable_ipsecmod" in
20984 yes)
20985
20986 $as_echo "#define USE_IPSECMOD 1" >>confdefs.h
20987
20988 IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
20989
20990 IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
20991
20992 ;;
20993 no|*)
20994 # nothing
20995 ;;
20996 esac
20997
20998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
20999 $as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
21000 # on openBSD, the implicit rule make $< work.
21001 # on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
21002 # gmake works.
21003 cat >conftest.make <<EOF
21004 all: conftest.lo
21005
21006 conftest.lo foo.lo bla.lo:
21007 if test -f "\$<"; then touch \$@; fi
21008
21009 .SUFFIXES: .lo
21010 .c.lo:
21011 if test -f "\$<"; then touch \$@; fi
21012
21013 conftest.lo: conftest.dir/conftest.c
21014 EOF
21015 mkdir conftest.dir
21016 touch conftest.dir/conftest.c
21017 rm -f conftest.lo conftest.c
21018 ${MAKE:-make} -f conftest.make >/dev/null
21019 rm -f conftest.make conftest.c conftest.dir/conftest.c
21020 rm -rf conftest.dir
21021 if test ! -f conftest.lo; then
21022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21023 $as_echo "no" >&6; }
21024 SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
21025 SOURCEFILE='`cat .source`'
21026 else
21027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21028 $as_echo "yes" >&6; }
21029 SOURCEDETERMINE=':'
21030 SOURCEFILE='$<'
21031 fi
21032 rm -f conftest.lo
21033
21034
21035
21036 # see if we want to build the library or everything
21037 ALLTARGET="alltargets"
21038 INSTALLTARGET="install-all"
21039
21040 # Check whether --with-libunbound-only was given.
21041 if test "${with_libunbound_only+set}" = set; then :
21042 withval=$with_libunbound_only;
21043 if test "$withval" = "yes"; then
21044 ALLTARGET="lib"
21045 INSTALLTARGET="install-lib"
21046 fi
21047
21048 fi
21049
21050 if test $ALLTARGET = "alltargets"; then
21051 if test $USE_NSS = "yes"; then
21052 as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
21053 fi
21054 if test $USE_NETTLE = "yes"; then
21055 as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
21056 fi
21057 fi
21058
21059
21060
21061
21062
21063 { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
21064 $as_echo "$as_me: Stripping extension flags..." >&6;}
21065
21066 if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
21067 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
21068
21069 $as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
21070
21071 fi
21072
21073
21074 if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
21075 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
21076
21077 $as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
21078
21079 fi
21080
21081
21082 if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
21083 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
21084
21085 $as_echo "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
21086
21087 fi
21088
21089
21090 if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
21091 CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
21092
21093 $as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
21094
21095 fi
21096
21097
21098 if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
21099 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
21100
21101 $as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
21102
21103 fi
21104
21105
21106 if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
21107 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
21108
21109 $as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
21110
21111 fi
21112
21113
21114 if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
21115 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
21116
21117 $as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
21118
21119 fi
21120
21121
21122 if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
21123 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
21124
21125 $as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
21126
21127 fi
21128
21129
21130 if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
21131 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
21132
21133 $as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
21134
21135 fi
21136
21137
21138 if test -n "$LATE_LDFLAGS"; then
21139 LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
21140 fi
21141 # remove start spaces
21142 LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
21143 LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
21144
21145
21146 cat >>confdefs.h <<_ACEOF
21147 #define MAXSYSLOGMSGLEN 10240
21148 _ACEOF
21149
21150
21151
21152
21153 version=1.9.1
21154
21155 date=`date +'%b %e, %Y'`
21156
21157
21158 ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h dnscrypt/dnscrypt_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service"
21159
21160 ac_config_headers="$ac_config_headers config.h"
21161
21162 cat >confcache <<\_ACEOF
21163 # This file is a shell script that caches the results of configure
21164 # tests run on this system so they can be shared between configure
21165 # scripts and configure runs, see configure's option --config-cache.
21166 # It is not useful on other systems. If it contains results you don't
21167 # want to keep, you may remove or edit it.
21168 #
21169 # config.status only pays attention to the cache file if you give it
21170 # the --recheck option to rerun configure.
21171 #
21172 # `ac_cv_env_foo' variables (set or unset) will be overridden when
21173 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21174 # following values.
21175
21176 _ACEOF
21177
21178 # The following way of writing the cache mishandles newlines in values,
21179 # but we know of no workaround that is simple, portable, and efficient.
21180 # So, we kill variables containing newlines.
21181 # Ultrix sh set writes to stderr and can't be redirected directly,
21182 # and sets the high bit in the cache file unless we assign to the vars.
21183 (
21184 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21185 eval ac_val=\$$ac_var
21186 case $ac_val in #(
21187 *${as_nl}*)
21188 case $ac_var in #(
21189 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
21190 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
21191 esac
21192 case $ac_var in #(
21193 _ | IFS | as_nl) ;; #(
21194 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
21195 *) { eval $ac_var=; unset $ac_var;} ;;
21196 esac ;;
21197 esac
21198 done
21199
21200 (set) 2>&1 |
21201 case $as_nl`(ac_space=' '; set) 2>&1` in #(
21202 *${as_nl}ac_space=\ *)
21203 # `set' does not quote correctly, so add quotes: double-quote
21204 # substitution turns \\\\ into \\, and sed turns \\ into \.
21205 sed -n \
21206 "s/'/'\\\\''/g;
21207 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21208 ;; #(
21209 *)
21210 # `set' quotes correctly as required by POSIX, so do not add quotes.
21211 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
21212 ;;
21213 esac |
21214 sort
21215 ) |
21216 sed '
21217 /^ac_cv_env_/b end
21218 t clear
21219 :clear
21220 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21221 t end
21222 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21223 :end' >>confcache
21224 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21225 if test -w "$cache_file"; then
21226 if test "x$cache_file" != "x/dev/null"; then
21227 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
21228 $as_echo "$as_me: updating cache $cache_file" >&6;}
21229 if test ! -f "$cache_file" || test -h "$cache_file"; then
21230 cat confcache >"$cache_file"
21231 else
21232 case $cache_file in #(
21233 */* | ?:*)
21234 mv -f confcache "$cache_file"$$ &&
21235 mv -f "$cache_file"$$ "$cache_file" ;; #(
21236 *)
21237 mv -f confcache "$cache_file" ;;
21238 esac
21239 fi
21240 fi
21241 else
21242 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
21243 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21244 fi
21245 fi
21246 rm -f confcache
21247
21248 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21249 # Let make expand exec_prefix.
21250 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21251
21252 DEFS=-DHAVE_CONFIG_H
21253
21254 ac_libobjs=
21255 ac_ltlibobjs=
21256 U=
21257 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21258 # 1. Remove the extension, and $U if already installed.
21259 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21260 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21261 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
21262 # will be set to the directory where LIBOBJS objects are built.
21263 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21264 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
21265 done
21266 LIBOBJS=$ac_libobjs
21267
21268 LTLIBOBJS=$ac_ltlibobjs
21269
21270
21271 if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
21272 as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
21273 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21274 fi
21275
21276 : "${CONFIG_STATUS=./config.status}"
21277 ac_write_fail=0
21278 ac_clean_files_save=$ac_clean_files
21279 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21280 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
21281 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
21282 as_write_fail=0
21283 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
21284 #! $SHELL
21285 # Generated by $as_me.
21286 # Run this file to recreate the current configuration.
21287 # Compiler output produced by configure, useful for debugging
21288 # configure, is in config.log if it exists.
21289
21290 debug=false
21291 ac_cs_recheck=false
21292 ac_cs_silent=false
21293
21294 SHELL=\${CONFIG_SHELL-$SHELL}
21295 export SHELL
21296 _ASEOF
21297 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
21298 ## -------------------- ##
21299 ## M4sh Initialization. ##
21300 ## -------------------- ##
21301
21302 # Be more Bourne compatible
21303 DUALCASE=1; export DUALCASE # for MKS sh
21304 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
21305 emulate sh
21306 NULLCMD=:
21307 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21308 # is contrary to our usage. Disable this feature.
21309 alias -g '${1+"$@"}'='"$@"'
21310 setopt NO_GLOB_SUBST
21311 else
21312 case `(set -o) 2>/dev/null` in #(
21313 *posix*) :
21314 set -o posix ;; #(
21315 *) :
21316 ;;
21317 esac
21318 fi
21319
21320
21321 as_nl='
21322 '
21323 export as_nl
21324 # Printing a long string crashes Solaris 7 /usr/bin/printf.
21325 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
21326 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
21327 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
21328 # Prefer a ksh shell builtin over an external printf program on Solaris,
21329 # but without wasting forks for bash or zsh.
21330 if test -z "$BASH_VERSION$ZSH_VERSION" \
21331 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
21332 as_echo='print -r --'
21333 as_echo_n='print -rn --'
21334 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
21335 as_echo='printf %s\n'
21336 as_echo_n='printf %s'
21337 else
21338 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
21339 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
21340 as_echo_n='/usr/ucb/echo -n'
21341 else
21342 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
21343 as_echo_n_body='eval
21344 arg=$1;
21345 case $arg in #(
21346 *"$as_nl"*)
21347 expr "X$arg" : "X\\(.*\\)$as_nl";
21348 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
21349 esac;
21350 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
21351 '
21352 export as_echo_n_body
21353 as_echo_n='sh -c $as_echo_n_body as_echo'
21354 fi
21355 export as_echo_body
21356 as_echo='sh -c $as_echo_body as_echo'
21357 fi
21358
21359 # The user is always right.
21360 if test "${PATH_SEPARATOR+set}" != set; then
21361 PATH_SEPARATOR=:
21362 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
21363 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
21364 PATH_SEPARATOR=';'
21365 }
21366 fi
21367
21368
21369 # IFS
21370 # We need space, tab and new line, in precisely that order. Quoting is
21371 # there to prevent editors from complaining about space-tab.
21372 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
21373 # splitting by setting IFS to empty value.)
21374 IFS=" "" $as_nl"
21375
21376 # Find who we are. Look in the path if we contain no directory separator.
21377 as_myself=
21378 case $0 in #((
21379 *[\\/]* ) as_myself=$0 ;;
21380 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21381 for as_dir in $PATH
21382 do
21383 IFS=$as_save_IFS
21384 test -z "$as_dir" && as_dir=.
21385 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21386 done
21387 IFS=$as_save_IFS
21388
21389 ;;
21390 esac
21391 # We did not find ourselves, most probably we were run as `sh COMMAND'
21392 # in which case we are not to be found in the path.
21393 if test "x$as_myself" = x; then
21394 as_myself=$0
21395 fi
21396 if test ! -f "$as_myself"; then
21397 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
21398 exit 1
21399 fi
21400
21401 # Unset variables that we do not need and which cause bugs (e.g. in
21402 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
21403 # suppresses any "Segmentation fault" message there. '((' could
21404 # trigger a bug in pdksh 5.2.14.
21405 for as_var in BASH_ENV ENV MAIL MAILPATH
21406 do eval test x\${$as_var+set} = xset \
21407 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
21408 done
21409 PS1='$ '
21410 PS2='> '
21411 PS4='+ '
21412
21413 # NLS nuisances.
21414 LC_ALL=C
21415 export LC_ALL
21416 LANGUAGE=C
21417 export LANGUAGE
21418
21419 # CDPATH.
21420 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21421
21422
21423 # as_fn_error STATUS ERROR [LINENO LOG_FD]
21424 # ----------------------------------------
21425 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
21426 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
21427 # script with STATUS, using 1 if that was 0.
21428 as_fn_error ()
21429 {
21430 as_status=$1; test $as_status -eq 0 && as_status=1
21431 if test "$4"; then
21432 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
21433 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
21434 fi
21435 $as_echo "$as_me: error: $2" >&2
21436 as_fn_exit $as_status
21437 } # as_fn_error
21438
21439
21440 # as_fn_set_status STATUS
21441 # -----------------------
21442 # Set $? to STATUS, without forking.
21443 as_fn_set_status ()
21444 {
21445 return $1
21446 } # as_fn_set_status
21447
21448 # as_fn_exit STATUS
21449 # -----------------
21450 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
21451 as_fn_exit ()
21452 {
21453 set +e
21454 as_fn_set_status $1
21455 exit $1
21456 } # as_fn_exit
21457
21458 # as_fn_unset VAR
21459 # ---------------
21460 # Portably unset VAR.
21461 as_fn_unset ()
21462 {
21463 { eval $1=; unset $1;}
21464 }
21465 as_unset=as_fn_unset
21466 # as_fn_append VAR VALUE
21467 # ----------------------
21468 # Append the text in VALUE to the end of the definition contained in VAR. Take
21469 # advantage of any shell optimizations that allow amortized linear growth over
21470 # repeated appends, instead of the typical quadratic growth present in naive
21471 # implementations.
21472 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
21473 eval 'as_fn_append ()
21474 {
21475 eval $1+=\$2
21476 }'
21477 else
21478 as_fn_append ()
21479 {
21480 eval $1=\$$1\$2
21481 }
21482 fi # as_fn_append
21483
21484 # as_fn_arith ARG...
21485 # ------------------
21486 # Perform arithmetic evaluation on the ARGs, and store the result in the
21487 # global $as_val. Take advantage of shells that can avoid forks. The arguments
21488 # must be portable across $(()) and expr.
21489 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
21490 eval 'as_fn_arith ()
21491 {
21492 as_val=$(( $* ))
21493 }'
21494 else
21495 as_fn_arith ()
21496 {
21497 as_val=`expr "$@" || test $? -eq 1`
21498 }
21499 fi # as_fn_arith
21500
21501
21502 if expr a : '\(a\)' >/dev/null 2>&1 &&
21503 test "X`expr 00001 : '.*\(...\)'`" = X001; then
21504 as_expr=expr
21505 else
21506 as_expr=false
21507 fi
21508
21509 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
21510 as_basename=basename
21511 else
21512 as_basename=false
21513 fi
21514
21515 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
21516 as_dirname=dirname
21517 else
21518 as_dirname=false
21519 fi
21520
21521 as_me=`$as_basename -- "$0" ||
21522 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21523 X"$0" : 'X\(//\)$' \| \
21524 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
21525 $as_echo X/"$0" |
21526 sed '/^.*\/\([^/][^/]*\)\/*$/{
21527 s//\1/
21528 q
21529 }
21530 /^X\/\(\/\/\)$/{
21531 s//\1/
21532 q
21533 }
21534 /^X\/\(\/\).*/{
21535 s//\1/
21536 q
21537 }
21538 s/.*/./; q'`
21539
21540 # Avoid depending upon Character Ranges.
21541 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21542 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21543 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21544 as_cr_digits='0123456789'
21545 as_cr_alnum=$as_cr_Letters$as_cr_digits
21546
21547 ECHO_C= ECHO_N= ECHO_T=
21548 case `echo -n x` in #(((((
21549 -n*)
21550 case `echo 'xy\c'` in
21551 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
21552 xy) ECHO_C='\c';;
21553 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
21554 ECHO_T=' ';;
21555 esac;;
21556 *)
21557 ECHO_N='-n';;
21558 esac
21559
21560 rm -f conf$$ conf$$.exe conf$$.file
21561 if test -d conf$$.dir; then
21562 rm -f conf$$.dir/conf$$.file
21563 else
21564 rm -f conf$$.dir
21565 mkdir conf$$.dir 2>/dev/null
21566 fi
21567 if (echo >conf$$.file) 2>/dev/null; then
21568 if ln -s conf$$.file conf$$ 2>/dev/null; then
21569 as_ln_s='ln -s'
21570 # ... but there are two gotchas:
21571 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
21572 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
21573 # In both cases, we have to default to `cp -pR'.
21574 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
21575 as_ln_s='cp -pR'
21576 elif ln conf$$.file conf$$ 2>/dev/null; then
21577 as_ln_s=ln
21578 else
21579 as_ln_s='cp -pR'
21580 fi
21581 else
21582 as_ln_s='cp -pR'
21583 fi
21584 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
21585 rmdir conf$$.dir 2>/dev/null
21586
21587
21588 # as_fn_mkdir_p
21589 # -------------
21590 # Create "$as_dir" as a directory, including parents if necessary.
21591 as_fn_mkdir_p ()
21592 {
21593
21594 case $as_dir in #(
21595 -*) as_dir=./$as_dir;;
21596 esac
21597 test -d "$as_dir" || eval $as_mkdir_p || {
21598 as_dirs=
21599 while :; do
21600 case $as_dir in #(
21601 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
21602 *) as_qdir=$as_dir;;
21603 esac
21604 as_dirs="'$as_qdir' $as_dirs"
21605 as_dir=`$as_dirname -- "$as_dir" ||
21606 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21607 X"$as_dir" : 'X\(//\)[^/]' \| \
21608 X"$as_dir" : 'X\(//\)$' \| \
21609 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21610 $as_echo X"$as_dir" |
21611 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21612 s//\1/
21613 q
21614 }
21615 /^X\(\/\/\)[^/].*/{
21616 s//\1/
21617 q
21618 }
21619 /^X\(\/\/\)$/{
21620 s//\1/
21621 q
21622 }
21623 /^X\(\/\).*/{
21624 s//\1/
21625 q
21626 }
21627 s/.*/./; q'`
21628 test -d "$as_dir" && break
21629 done
21630 test -z "$as_dirs" || eval "mkdir $as_dirs"
21631 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
21632
21633
21634 } # as_fn_mkdir_p
21635 if mkdir -p . 2>/dev/null; then
21636 as_mkdir_p='mkdir -p "$as_dir"'
21637 else
21638 test -d ./-p && rmdir ./-p
21639 as_mkdir_p=false
21640 fi
21641
21642
21643 # as_fn_executable_p FILE
21644 # -----------------------
21645 # Test if FILE is an executable regular file.
21646 as_fn_executable_p ()
21647 {
21648 test -f "$1" && test -x "$1"
21649 } # as_fn_executable_p
21650 as_test_x='test -x'
21651 as_executable_p=as_fn_executable_p
21652
21653 # Sed expression to map a string onto a valid CPP name.
21654 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21655
21656 # Sed expression to map a string onto a valid variable name.
21657 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21658
21659
21660 exec 6>&1
21661 ## ----------------------------------- ##
21662 ## Main body of $CONFIG_STATUS script. ##
21663 ## ----------------------------------- ##
21664 _ASEOF
21665 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
21666
21667 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21668 # Save the log message, to keep $0 and so on meaningful, and to
21669 # report actual input values of CONFIG_FILES etc. instead of their
21670 # values after options handling.
21671 ac_log="
21672 This file was extended by unbound $as_me 1.9.1, which was
21673 generated by GNU Autoconf 2.69. Invocation command line was
21674
21675 CONFIG_FILES = $CONFIG_FILES
21676 CONFIG_HEADERS = $CONFIG_HEADERS
21677 CONFIG_LINKS = $CONFIG_LINKS
21678 CONFIG_COMMANDS = $CONFIG_COMMANDS
21679 $ $0 $@
21680
21681 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21682 "
21683
21684 _ACEOF
21685
21686 case $ac_config_files in *"
21687 "*) set x $ac_config_files; shift; ac_config_files=$*;;
21688 esac
21689
21690 case $ac_config_headers in *"
21691 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
21692 esac
21693
21694
21695 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21696 # Files that config.status was made for.
21697 config_files="$ac_config_files"
21698 config_headers="$ac_config_headers"
21699 config_commands="$ac_config_commands"
21700
21701 _ACEOF
21702
21703 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21704 ac_cs_usage="\
21705 \`$as_me' instantiates files and other configuration actions
21706 from templates according to the current configuration. Unless the files
21707 and actions are specified as TAGs, all are instantiated by default.
21708
21709 Usage: $0 [OPTION]... [TAG]...
21710
21711 -h, --help print this help, then exit
21712 -V, --version print version number and configuration settings, then exit
21713 --config print configuration, then exit
21714 -q, --quiet, --silent
21715 do not print progress messages
21716 -d, --debug don't remove temporary files
21717 --recheck update $as_me by reconfiguring in the same conditions
21718 --file=FILE[:TEMPLATE]
21719 instantiate the configuration file FILE
21720 --header=FILE[:TEMPLATE]
21721 instantiate the configuration header FILE
21722
21723 Configuration files:
21724 $config_files
21725
21726 Configuration headers:
21727 $config_headers
21728
21729 Configuration commands:
21730 $config_commands
21731
21732 Report bugs to <unbound-bugs@nlnetlabs.nl>."
21733
21734 _ACEOF
21735 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21736 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
21737 ac_cs_version="\\
21738 unbound config.status 1.9.1
21739 configured by $0, generated by GNU Autoconf 2.69,
21740 with options \\"\$ac_cs_config\\"
21741
21742 Copyright (C) 2012 Free Software Foundation, Inc.
21743 This config.status script is free software; the Free Software Foundation
21744 gives unlimited permission to copy, distribute and modify it."
21745
21746 ac_pwd='$ac_pwd'
21747 srcdir='$srcdir'
21748 AWK='$AWK'
21749 test -n "\$AWK" || AWK=awk
21750 _ACEOF
21751
21752 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21753 # The default lists apply if the user does not specify any file.
21754 ac_need_defaults=:
21755 while test $# != 0
21756 do
21757 case $1 in
21758 --*=?*)
21759 ac_option=`expr "X$1" : 'X\([^=]*\)='`
21760 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
21761 ac_shift=:
21762 ;;
21763 --*=)
21764 ac_option=`expr "X$1" : 'X\([^=]*\)='`
21765 ac_optarg=
21766 ac_shift=:
21767 ;;
21768 *)
21769 ac_option=$1
21770 ac_optarg=$2
21771 ac_shift=shift
21772 ;;
21773 esac
21774
21775 case $ac_option in
21776 # Handling of the options.
21777 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21778 ac_cs_recheck=: ;;
21779 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
21780 $as_echo "$ac_cs_version"; exit ;;
21781 --config | --confi | --conf | --con | --co | --c )
21782 $as_echo "$ac_cs_config"; exit ;;
21783 --debug | --debu | --deb | --de | --d | -d )
21784 debug=: ;;
21785 --file | --fil | --fi | --f )
21786 $ac_shift
21787 case $ac_optarg in
21788 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21789 '') as_fn_error $? "missing file argument" ;;
21790 esac
21791 as_fn_append CONFIG_FILES " '$ac_optarg'"
21792 ac_need_defaults=false;;
21793 --header | --heade | --head | --hea )
21794 $ac_shift
21795 case $ac_optarg in
21796 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21797 esac
21798 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
21799 ac_need_defaults=false;;
21800 --he | --h)
21801 # Conflict between --help and --header
21802 as_fn_error $? "ambiguous option: \`$1'
21803 Try \`$0 --help' for more information.";;
21804 --help | --hel | -h )
21805 $as_echo "$ac_cs_usage"; exit ;;
21806 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21807 | -silent | --silent | --silen | --sile | --sil | --si | --s)
21808 ac_cs_silent=: ;;
21809
21810 # This is an error.
21811 -*) as_fn_error $? "unrecognized option: \`$1'
21812 Try \`$0 --help' for more information." ;;
21813
21814 *) as_fn_append ac_config_targets " $1"
21815 ac_need_defaults=false ;;
21816
21817 esac
21818 shift
21819 done
21820
21821 ac_configure_extra_args=
21822
21823 if $ac_cs_silent; then
21824 exec 6>/dev/null
21825 ac_configure_extra_args="$ac_configure_extra_args --silent"
21826 fi
21827
21828 _ACEOF
21829 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21830 if \$ac_cs_recheck; then
21831 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21832 shift
21833 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
21834 CONFIG_SHELL='$SHELL'
21835 export CONFIG_SHELL
21836 exec "\$@"
21837 fi
21838
21839 _ACEOF
21840 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21841 exec 5>>config.log
21842 {
21843 echo
21844 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21845 ## Running $as_me. ##
21846 _ASBOX
21847 $as_echo "$ac_log"
21848 } >&5
21849
21850 _ACEOF
21851 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21852 #
21853 # INIT-COMMANDS
21854 #
21855
21856
21857 # The HP-UX ksh and POSIX shell print the target directory to stdout
21858 # if CDPATH is set.
21859 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21860
21861 sed_quote_subst='$sed_quote_subst'
21862 double_quote_subst='$double_quote_subst'
21863 delay_variable_subst='$delay_variable_subst'
21864 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
21865 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
21866 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
21867 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
21868 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
21869 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
21870 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
21871 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
21872 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
21873 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
21874 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
21875 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
21876 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
21877 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
21878 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
21879 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
21880 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
21881 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
21882 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
21883 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
21884 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
21885 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
21886 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
21887 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
21888 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
21889 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
21890 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
21891 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
21892 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
21893 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
21894 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
21895 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
21896 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
21897 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
21898 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
21899 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
21900 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
21901 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
21902 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
21903 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
21904 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
21905 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
21906 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
21907 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
21908 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
21909 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
21910 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
21911 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
21912 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
21913 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
21914 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
21915 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
21916 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
21917 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
21918 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
21919 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
21920 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
21921 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
21922 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"`'
21923 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
21924 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
21925 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
21926 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
21927 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
21928 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
21929 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
21930 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
21931 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
21932 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
21933 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
21934 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
21935 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
21936 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
21937 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
21938 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
21939 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
21940 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
21941 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
21942 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
21943 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
21944 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
21945 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
21946 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
21947 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
21948 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
21949 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
21950 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
21951 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
21952 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
21953 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
21954 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
21955 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
21956 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
21957 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
21958 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
21959 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
21960 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
21961 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
21962 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
21963 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
21964 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
21965 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
21966 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
21967 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
21968 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
21969 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
21970 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
21971 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
21972 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
21973 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
21974 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
21975 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
21976 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
21977 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
21978 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
21979 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
21980 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
21981 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
21982 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
21983 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
21984 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
21985 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
21986 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
21987 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
21988 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
21989 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
21990 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
21991 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
21992 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
21993 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
21994 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
21995 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
21996 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
21997 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
21998 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
21999
22000 LTCC='$LTCC'
22001 LTCFLAGS='$LTCFLAGS'
22002 compiler='$compiler_DEFAULT'
22003
22004 # A function that is used when there is no print builtin or printf.
22005 func_fallback_echo ()
22006 {
22007 eval 'cat <<_LTECHO_EOF
22008 \$1
22009 _LTECHO_EOF'
22010 }
22011
22012 # Quote evaled strings.
22013 for var in SHELL \
22014 ECHO \
22015 PATH_SEPARATOR \
22016 SED \
22017 GREP \
22018 EGREP \
22019 FGREP \
22020 LD \
22021 NM \
22022 LN_S \
22023 lt_SP2NL \
22024 lt_NL2SP \
22025 reload_flag \
22026 OBJDUMP \
22027 deplibs_check_method \
22028 file_magic_cmd \
22029 file_magic_glob \
22030 want_nocaseglob \
22031 DLLTOOL \
22032 sharedlib_from_linklib_cmd \
22033 AR \
22034 AR_FLAGS \
22035 archiver_list_spec \
22036 STRIP \
22037 RANLIB \
22038 CC \
22039 CFLAGS \
22040 compiler \
22041 lt_cv_sys_global_symbol_pipe \
22042 lt_cv_sys_global_symbol_to_cdecl \
22043 lt_cv_sys_global_symbol_to_import \
22044 lt_cv_sys_global_symbol_to_c_name_address \
22045 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
22046 lt_cv_nm_interface \
22047 nm_file_list_spec \
22048 lt_cv_truncate_bin \
22049 lt_prog_compiler_no_builtin_flag \
22050 lt_prog_compiler_pic \
22051 lt_prog_compiler_wl \
22052 lt_prog_compiler_static \
22053 lt_cv_prog_compiler_c_o \
22054 need_locks \
22055 MANIFEST_TOOL \
22056 DSYMUTIL \
22057 NMEDIT \
22058 LIPO \
22059 OTOOL \
22060 OTOOL64 \
22061 shrext_cmds \
22062 export_dynamic_flag_spec \
22063 whole_archive_flag_spec \
22064 compiler_needs_object \
22065 with_gnu_ld \
22066 allow_undefined_flag \
22067 no_undefined_flag \
22068 hardcode_libdir_flag_spec \
22069 hardcode_libdir_separator \
22070 exclude_expsyms \
22071 include_expsyms \
22072 file_list_spec \
22073 variables_saved_for_relink \
22074 libname_spec \
22075 library_names_spec \
22076 soname_spec \
22077 install_override_mode \
22078 finish_eval \
22079 old_striplib \
22080 striplib; do
22081 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22082 *[\\\\\\\`\\"\\\$]*)
22083 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22084 ;;
22085 *)
22086 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22087 ;;
22088 esac
22089 done
22090
22091 # Double-quote double-evaled strings.
22092 for var in reload_cmds \
22093 old_postinstall_cmds \
22094 old_postuninstall_cmds \
22095 old_archive_cmds \
22096 extract_expsyms_cmds \
22097 old_archive_from_new_cmds \
22098 old_archive_from_expsyms_cmds \
22099 archive_cmds \
22100 archive_expsym_cmds \
22101 module_cmds \
22102 module_expsym_cmds \
22103 export_symbols_cmds \
22104 prelink_cmds \
22105 postlink_cmds \
22106 postinstall_cmds \
22107 postuninstall_cmds \
22108 finish_cmds \
22109 sys_lib_search_path_spec \
22110 configure_time_dlsearch_path \
22111 configure_time_lt_sys_library_path; do
22112 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22113 *[\\\\\\\`\\"\\\$]*)
22114 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22115 ;;
22116 *)
22117 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22118 ;;
22119 esac
22120 done
22121
22122 ac_aux_dir='$ac_aux_dir'
22123
22124 # See if we are running on zsh, and set the options that allow our
22125 # commands through without removal of \ escapes INIT.
22126 if test -n "\${ZSH_VERSION+set}"; then
22127 setopt NO_GLOB_SUBST
22128 fi
22129
22130
22131 PACKAGE='$PACKAGE'
22132 VERSION='$VERSION'
22133 RM='$RM'
22134 ofile='$ofile'
22135
22136
22137
22138
22139 _ACEOF
22140
22141 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22142
22143 # Handling of arguments.
22144 for ac_config_target in $ac_config_targets
22145 do
22146 case $ac_config_target in
22147 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
22148 "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
22149 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22150 "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
22151 "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
22152 "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
22153 "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
22154 "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
22155 "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
22156 "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
22157 "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
22158 "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
22159 "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
22160 "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
22161 "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
22162 "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
22163 "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
22164 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
22165
22166 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
22167 esac
22168 done
22169
22170
22171 # If the user did not use the arguments to specify the items to instantiate,
22172 # then the envvar interface is used. Set only those that are not.
22173 # We use the long form for the default assignment because of an extremely
22174 # bizarre bug on SunOS 4.1.3.
22175 if $ac_need_defaults; then
22176 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22177 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22178 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22179 fi
22180
22181 # Have a temporary directory for convenience. Make it in the build tree
22182 # simply because there is no reason against having it here, and in addition,
22183 # creating and moving files from /tmp can sometimes cause problems.
22184 # Hook for its removal unless debugging.
22185 # Note that there is a small window in which the directory will not be cleaned:
22186 # after its creation but before its name has been assigned to `$tmp'.
22187 $debug ||
22188 {
22189 tmp= ac_tmp=
22190 trap 'exit_status=$?
22191 : "${ac_tmp:=$tmp}"
22192 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
22193 ' 0
22194 trap 'as_fn_exit 1' 1 2 13 15
22195 }
22196 # Create a (secure) tmp directory for tmp files.
22197
22198 {
22199 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
22200 test -d "$tmp"
22201 } ||
22202 {
22203 tmp=./conf$$-$RANDOM
22204 (umask 077 && mkdir "$tmp")
22205 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
22206 ac_tmp=$tmp
22207
22208 # Set up the scripts for CONFIG_FILES section.
22209 # No need to generate them if there are no CONFIG_FILES.
22210 # This happens for instance with `./config.status config.h'.
22211 if test -n "$CONFIG_FILES"; then
22212
22213
22214 ac_cr=`echo X | tr X '\015'`
22215 # On cygwin, bash can eat \r inside `` if the user requested igncr.
22216 # But we know of no other shell where ac_cr would be empty at this
22217 # point, so we can use a bashism as a fallback.
22218 if test "x$ac_cr" = x; then
22219 eval ac_cr=\$\'\\r\'
22220 fi
22221 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
22222 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
22223 ac_cs_awk_cr='\\r'
22224 else
22225 ac_cs_awk_cr=$ac_cr
22226 fi
22227
22228 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
22229 _ACEOF
22230
22231
22232 {
22233 echo "cat >conf$$subs.awk <<_ACEOF" &&
22234 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
22235 echo "_ACEOF"
22236 } >conf$$subs.sh ||
22237 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22238 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
22239 ac_delim='%!_!# '
22240 for ac_last_try in false false false false false :; do
22241 . ./conf$$subs.sh ||
22242 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22243
22244 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
22245 if test $ac_delim_n = $ac_delim_num; then
22246 break
22247 elif $ac_last_try; then
22248 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22249 else
22250 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22251 fi
22252 done
22253 rm -f conf$$subs.sh
22254
22255 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22256 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
22257 _ACEOF
22258 sed -n '
22259 h
22260 s/^/S["/; s/!.*/"]=/
22261 p
22262 g
22263 s/^[^!]*!//
22264 :repl
22265 t repl
22266 s/'"$ac_delim"'$//
22267 t delim
22268 :nl
22269 h
22270 s/\(.\{148\}\)..*/\1/
22271 t more1
22272 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
22273 p
22274 n
22275 b repl
22276 :more1
22277 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22278 p
22279 g
22280 s/.\{148\}//
22281 t nl
22282 :delim
22283 h
22284 s/\(.\{148\}\)..*/\1/
22285 t more2
22286 s/["\\]/\\&/g; s/^/"/; s/$/"/
22287 p
22288 b
22289 :more2
22290 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22291 p
22292 g
22293 s/.\{148\}//
22294 t delim
22295 ' <conf$$subs.awk | sed '
22296 /^[^""]/{
22297 N
22298 s/\n//
22299 }
22300 ' >>$CONFIG_STATUS || ac_write_fail=1
22301 rm -f conf$$subs.awk
22302 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22303 _ACAWK
22304 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
22305 for (key in S) S_is_set[key] = 1
22306 FS = ""
22307
22308 }
22309 {
22310 line = $ 0
22311 nfields = split(line, field, "@")
22312 substed = 0
22313 len = length(field[1])
22314 for (i = 2; i < nfields; i++) {
22315 key = field[i]
22316 keylen = length(key)
22317 if (S_is_set[key]) {
22318 value = S[key]
22319 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
22320 len += length(value) + length(field[++i])
22321 substed = 1
22322 } else
22323 len += 1 + keylen
22324 }
22325
22326 print line
22327 }
22328
22329 _ACAWK
22330 _ACEOF
22331 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22332 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22333 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
22334 else
22335 cat
22336 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
22337 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
22338 _ACEOF
22339
22340 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
22341 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
22342 # trailing colons and then remove the whole line if VPATH becomes empty
22343 # (actually we leave an empty line to preserve line numbers).
22344 if test "x$srcdir" = x.; then
22345 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
22346 h
22347 s///
22348 s/^/:/
22349 s/[ ]*$/:/
22350 s/:\$(srcdir):/:/g
22351 s/:\${srcdir}:/:/g
22352 s/:@srcdir@:/:/g
22353 s/^:*//
22354 s/:*$//
22355 x
22356 s/\(=[ ]*\).*/\1/
22357 G
22358 s/\n//
22359 s/^[^=]*=[ ]*$//
22360 }'
22361 fi
22362
22363 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22364 fi # test -n "$CONFIG_FILES"
22365
22366 # Set up the scripts for CONFIG_HEADERS section.
22367 # No need to generate them if there are no CONFIG_HEADERS.
22368 # This happens for instance with `./config.status Makefile'.
22369 if test -n "$CONFIG_HEADERS"; then
22370 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
22371 BEGIN {
22372 _ACEOF
22373
22374 # Transform confdefs.h into an awk script `defines.awk', embedded as
22375 # here-document in config.status, that substitutes the proper values into
22376 # config.h.in to produce config.h.
22377
22378 # Create a delimiter string that does not exist in confdefs.h, to ease
22379 # handling of long lines.
22380 ac_delim='%!_!# '
22381 for ac_last_try in false false :; do
22382 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
22383 if test -z "$ac_tt"; then
22384 break
22385 elif $ac_last_try; then
22386 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
22387 else
22388 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22389 fi
22390 done
22391
22392 # For the awk script, D is an array of macro values keyed by name,
22393 # likewise P contains macro parameters if any. Preserve backslash
22394 # newline sequences.
22395
22396 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
22397 sed -n '
22398 s/.\{148\}/&'"$ac_delim"'/g
22399 t rset
22400 :rset
22401 s/^[ ]*#[ ]*define[ ][ ]*/ /
22402 t def
22403 d
22404 :def
22405 s/\\$//
22406 t bsnl
22407 s/["\\]/\\&/g
22408 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
22409 D["\1"]=" \3"/p
22410 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
22411 d
22412 :bsnl
22413 s/["\\]/\\&/g
22414 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
22415 D["\1"]=" \3\\\\\\n"\\/p
22416 t cont
22417 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
22418 t cont
22419 d
22420 :cont
22421 n
22422 s/.\{148\}/&'"$ac_delim"'/g
22423 t clear
22424 :clear
22425 s/\\$//
22426 t bsnlc
22427 s/["\\]/\\&/g; s/^/"/; s/$/"/p
22428 d
22429 :bsnlc
22430 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
22431 b cont
22432 ' <confdefs.h | sed '
22433 s/'"$ac_delim"'/"\\\
22434 "/g' >>$CONFIG_STATUS || ac_write_fail=1
22435
22436 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22437 for (key in D) D_is_set[key] = 1
22438 FS = ""
22439 }
22440 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
22441 line = \$ 0
22442 split(line, arg, " ")
22443 if (arg[1] == "#") {
22444 defundef = arg[2]
22445 mac1 = arg[3]
22446 } else {
22447 defundef = substr(arg[1], 2)
22448 mac1 = arg[2]
22449 }
22450 split(mac1, mac2, "(") #)
22451 macro = mac2[1]
22452 prefix = substr(line, 1, index(line, defundef) - 1)
22453 if (D_is_set[macro]) {
22454 # Preserve the white space surrounding the "#".
22455 print prefix "define", macro P[macro] D[macro]
22456 next
22457 } else {
22458 # Replace #undef with comments. This is necessary, for example,
22459 # in the case of _POSIX_SOURCE, which is predefined and required
22460 # on some systems where configure will not decide to define it.
22461 if (defundef == "undef") {
22462 print "/*", prefix defundef, macro, "*/"
22463 next
22464 }
22465 }
22466 }
22467 { print }
22468 _ACAWK
22469 _ACEOF
22470 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22471 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
22472 fi # test -n "$CONFIG_HEADERS"
22473
22474
22475 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
22476 shift
22477 for ac_tag
22478 do
22479 case $ac_tag in
22480 :[FHLC]) ac_mode=$ac_tag; continue;;
22481 esac
22482 case $ac_mode$ac_tag in
22483 :[FHL]*:*);;
22484 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
22485 :[FH]-) ac_tag=-:-;;
22486 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22487 esac
22488 ac_save_IFS=$IFS
22489 IFS=:
22490 set x $ac_tag
22491 IFS=$ac_save_IFS
22492 shift
22493 ac_file=$1
22494 shift
22495
22496 case $ac_mode in
22497 :L) ac_source=$1;;
22498 :[FH])
22499 ac_file_inputs=
22500 for ac_f
22501 do
22502 case $ac_f in
22503 -) ac_f="$ac_tmp/stdin";;
22504 *) # Look for the file first in the build tree, then in the source tree
22505 # (if the path is not absolute). The absolute path cannot be DOS-style,
22506 # because $ac_f cannot contain `:'.
22507 test -f "$ac_f" ||
22508 case $ac_f in
22509 [\\/$]*) false;;
22510 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22511 esac ||
22512 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
22513 esac
22514 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
22515 as_fn_append ac_file_inputs " '$ac_f'"
22516 done
22517
22518 # Let's still pretend it is `configure' which instantiates (i.e., don't
22519 # use $as_me), people would be surprised to read:
22520 # /* config.h. Generated by config.status. */
22521 configure_input='Generated from '`
22522 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
22523 `' by configure.'
22524 if test x"$ac_file" != x-; then
22525 configure_input="$ac_file. $configure_input"
22526 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
22527 $as_echo "$as_me: creating $ac_file" >&6;}
22528 fi
22529 # Neutralize special characters interpreted by sed in replacement strings.
22530 case $configure_input in #(
22531 *\&* | *\|* | *\\* )
22532 ac_sed_conf_input=`$as_echo "$configure_input" |
22533 sed 's/[\\\\&|]/\\\\&/g'`;; #(
22534 *) ac_sed_conf_input=$configure_input;;
22535 esac
22536
22537 case $ac_tag in
22538 *:-:* | *:-) cat >"$ac_tmp/stdin" \
22539 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
22540 esac
22541 ;;
22542 esac
22543
22544 ac_dir=`$as_dirname -- "$ac_file" ||
22545 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22546 X"$ac_file" : 'X\(//\)[^/]' \| \
22547 X"$ac_file" : 'X\(//\)$' \| \
22548 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
22549 $as_echo X"$ac_file" |
22550 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22551 s//\1/
22552 q
22553 }
22554 /^X\(\/\/\)[^/].*/{
22555 s//\1/
22556 q
22557 }
22558 /^X\(\/\/\)$/{
22559 s//\1/
22560 q
22561 }
22562 /^X\(\/\).*/{
22563 s//\1/
22564 q
22565 }
22566 s/.*/./; q'`
22567 as_dir="$ac_dir"; as_fn_mkdir_p
22568 ac_builddir=.
22569
22570 case "$ac_dir" in
22571 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
22572 *)
22573 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
22574 # A ".." for each directory in $ac_dir_suffix.
22575 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
22576 case $ac_top_builddir_sub in
22577 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
22578 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
22579 esac ;;
22580 esac
22581 ac_abs_top_builddir=$ac_pwd
22582 ac_abs_builddir=$ac_pwd$ac_dir_suffix
22583 # for backward compatibility:
22584 ac_top_builddir=$ac_top_build_prefix
22585
22586 case $srcdir in
22587 .) # We are building in place.
22588 ac_srcdir=.
22589 ac_top_srcdir=$ac_top_builddir_sub
22590 ac_abs_top_srcdir=$ac_pwd ;;
22591 [\\/]* | ?:[\\/]* ) # Absolute name.
22592 ac_srcdir=$srcdir$ac_dir_suffix;
22593 ac_top_srcdir=$srcdir
22594 ac_abs_top_srcdir=$srcdir ;;
22595 *) # Relative name.
22596 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
22597 ac_top_srcdir=$ac_top_build_prefix$srcdir
22598 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
22599 esac
22600 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
22601
22602
22603 case $ac_mode in
22604 :F)
22605 #
22606 # CONFIG_FILE
22607 #
22608
22609 _ACEOF
22610
22611 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22612 # If the template does not know about datarootdir, expand it.
22613 # FIXME: This hack should be removed a few years after 2.60.
22614 ac_datarootdir_hack=; ac_datarootdir_seen=
22615 ac_sed_dataroot='
22616 /datarootdir/ {
22617 p
22618 q
22619 }
22620 /@datadir@/p
22621 /@docdir@/p
22622 /@infodir@/p
22623 /@localedir@/p
22624 /@mandir@/p'
22625 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
22626 *datarootdir*) ac_datarootdir_seen=yes;;
22627 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
22628 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
22629 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
22630 _ACEOF
22631 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22632 ac_datarootdir_hack='
22633 s&@datadir@&$datadir&g
22634 s&@docdir@&$docdir&g
22635 s&@infodir@&$infodir&g
22636 s&@localedir@&$localedir&g
22637 s&@mandir@&$mandir&g
22638 s&\\\${datarootdir}&$datarootdir&g' ;;
22639 esac
22640 _ACEOF
22641
22642 # Neutralize VPATH when `$srcdir' = `.'.
22643 # Shell code in configure.ac might set extrasub.
22644 # FIXME: do we really want to maintain this feature?
22645 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22646 ac_sed_extra="$ac_vpsub
22647 $extrasub
22648 _ACEOF
22649 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22650 :t
22651 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22652 s|@configure_input@|$ac_sed_conf_input|;t t
22653 s&@top_builddir@&$ac_top_builddir_sub&;t t
22654 s&@top_build_prefix@&$ac_top_build_prefix&;t t
22655 s&@srcdir@&$ac_srcdir&;t t
22656 s&@abs_srcdir@&$ac_abs_srcdir&;t t
22657 s&@top_srcdir@&$ac_top_srcdir&;t t
22658 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
22659 s&@builddir@&$ac_builddir&;t t
22660 s&@abs_builddir@&$ac_abs_builddir&;t t
22661 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
22662 $ac_datarootdir_hack
22663 "
22664 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
22665 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22666
22667 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
22668 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
22669 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
22670 "$ac_tmp/out"`; test -z "$ac_out"; } &&
22671 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22672 which seems to be undefined. Please make sure it is defined" >&5
22673 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22674 which seems to be undefined. Please make sure it is defined" >&2;}
22675
22676 rm -f "$ac_tmp/stdin"
22677 case $ac_file in
22678 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
22679 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
22680 esac \
22681 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22682 ;;
22683 :H)
22684 #
22685 # CONFIG_HEADER
22686 #
22687 if test x"$ac_file" != x-; then
22688 {
22689 $as_echo "/* $configure_input */" \
22690 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
22691 } >"$ac_tmp/config.h" \
22692 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22693 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
22694 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
22695 $as_echo "$as_me: $ac_file is unchanged" >&6;}
22696 else
22697 rm -f "$ac_file"
22698 mv "$ac_tmp/config.h" "$ac_file" \
22699 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22700 fi
22701 else
22702 $as_echo "/* $configure_input */" \
22703 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
22704 || as_fn_error $? "could not create -" "$LINENO" 5
22705 fi
22706 ;;
22707
22708 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
22709 $as_echo "$as_me: executing $ac_file commands" >&6;}
22710 ;;
22711 esac
22712
22713
22714 case $ac_file$ac_mode in
22715 "libtool":C)
22716
22717 # See if we are running on zsh, and set the options that allow our
22718 # commands through without removal of \ escapes.
22719 if test -n "${ZSH_VERSION+set}"; then
22720 setopt NO_GLOB_SUBST
22721 fi
22722
22723 cfgfile=${ofile}T
22724 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
22725 $RM "$cfgfile"
22726
22727 cat <<_LT_EOF >> "$cfgfile"
22728 #! $SHELL
22729 # Generated automatically by $as_me ($PACKAGE) $VERSION
22730 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22731 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
22732
22733 # Provide generalized library-building support services.
22734 # Written by Gordon Matzigkeit, 1996
22735
22736 # Copyright (C) 2014 Free Software Foundation, Inc.
22737 # This is free software; see the source for copying conditions. There is NO
22738 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22739
22740 # GNU Libtool is free software; you can redistribute it and/or modify
22741 # it under the terms of the GNU General Public License as published by
22742 # the Free Software Foundation; either version 2 of of the License, or
22743 # (at your option) any later version.
22744 #
22745 # As a special exception to the GNU General Public License, if you
22746 # distribute this file as part of a program or library that is built
22747 # using GNU Libtool, you may include this file under the same
22748 # distribution terms that you use for the rest of that program.
22749 #
22750 # GNU Libtool is distributed in the hope that it will be useful, but
22751 # WITHOUT ANY WARRANTY; without even the implied warranty of
22752 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22753 # GNU General Public License for more details.
22754 #
22755 # You should have received a copy of the GNU General Public License
22756 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22757
22758
22759 # The names of the tagged configurations supported by this script.
22760 available_tags=''
22761
22762 # Configured defaults for sys_lib_dlsearch_path munging.
22763 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
22764
22765 # ### BEGIN LIBTOOL CONFIG
22766
22767 # Which release of libtool.m4 was used?
22768 macro_version=$macro_version
22769 macro_revision=$macro_revision
22770
22771 # Whether or not to build shared libraries.
22772 build_libtool_libs=$enable_shared
22773
22774 # Whether or not to build static libraries.
22775 build_old_libs=$enable_static
22776
22777 # What type of objects to build.
22778 pic_mode=$pic_mode
22779
22780 # Whether or not to optimize for fast installation.
22781 fast_install=$enable_fast_install
22782
22783 # Shared archive member basename,for filename based shared library versioning on AIX.
22784 shared_archive_member_spec=$shared_archive_member_spec
22785
22786 # Shell to use when invoking shell scripts.
22787 SHELL=$lt_SHELL
22788
22789 # An echo program that protects backslashes.
22790 ECHO=$lt_ECHO
22791
22792 # The PATH separator for the build system.
22793 PATH_SEPARATOR=$lt_PATH_SEPARATOR
22794
22795 # The host system.
22796 host_alias=$host_alias
22797 host=$host
22798 host_os=$host_os
22799
22800 # The build system.
22801 build_alias=$build_alias
22802 build=$build
22803 build_os=$build_os
22804
22805 # A sed program that does not truncate output.
22806 SED=$lt_SED
22807
22808 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
22809 Xsed="\$SED -e 1s/^X//"
22810
22811 # A grep program that handles long lines.
22812 GREP=$lt_GREP
22813
22814 # An ERE matcher.
22815 EGREP=$lt_EGREP
22816
22817 # A literal string matcher.
22818 FGREP=$lt_FGREP
22819
22820 # A BSD- or MS-compatible name lister.
22821 NM=$lt_NM
22822
22823 # Whether we need soft or hard links.
22824 LN_S=$lt_LN_S
22825
22826 # What is the maximum length of a command?
22827 max_cmd_len=$max_cmd_len
22828
22829 # Object file suffix (normally "o").
22830 objext=$ac_objext
22831
22832 # Executable file suffix (normally "").
22833 exeext=$exeext
22834
22835 # whether the shell understands "unset".
22836 lt_unset=$lt_unset
22837
22838 # turn spaces into newlines.
22839 SP2NL=$lt_lt_SP2NL
22840
22841 # turn newlines into spaces.
22842 NL2SP=$lt_lt_NL2SP
22843
22844 # convert \$build file names to \$host format.
22845 to_host_file_cmd=$lt_cv_to_host_file_cmd
22846
22847 # convert \$build files to toolchain format.
22848 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
22849
22850 # An object symbol dumper.
22851 OBJDUMP=$lt_OBJDUMP
22852
22853 # Method to check whether dependent libraries are shared objects.
22854 deplibs_check_method=$lt_deplibs_check_method
22855
22856 # Command to use when deplibs_check_method = "file_magic".
22857 file_magic_cmd=$lt_file_magic_cmd
22858
22859 # How to find potential files when deplibs_check_method = "file_magic".
22860 file_magic_glob=$lt_file_magic_glob
22861
22862 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
22863 want_nocaseglob=$lt_want_nocaseglob
22864
22865 # DLL creation program.
22866 DLLTOOL=$lt_DLLTOOL
22867
22868 # Command to associate shared and link libraries.
22869 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
22870
22871 # The archiver.
22872 AR=$lt_AR
22873
22874 # Flags to create an archive.
22875 AR_FLAGS=$lt_AR_FLAGS
22876
22877 # How to feed a file listing to the archiver.
22878 archiver_list_spec=$lt_archiver_list_spec
22879
22880 # A symbol stripping program.
22881 STRIP=$lt_STRIP
22882
22883 # Commands used to install an old-style archive.
22884 RANLIB=$lt_RANLIB
22885 old_postinstall_cmds=$lt_old_postinstall_cmds
22886 old_postuninstall_cmds=$lt_old_postuninstall_cmds
22887
22888 # Whether to use a lock for old archive extraction.
22889 lock_old_archive_extraction=$lock_old_archive_extraction
22890
22891 # A C compiler.
22892 LTCC=$lt_CC
22893
22894 # LTCC compiler flags.
22895 LTCFLAGS=$lt_CFLAGS
22896
22897 # Take the output of nm and produce a listing of raw symbols and C names.
22898 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
22899
22900 # Transform the output of nm in a proper C declaration.
22901 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
22902
22903 # Transform the output of nm into a list of symbols to manually relocate.
22904 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
22905
22906 # Transform the output of nm in a C name address pair.
22907 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
22908
22909 # Transform the output of nm in a C name address pair when lib prefix is needed.
22910 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
22911
22912 # The name lister interface.
22913 nm_interface=$lt_lt_cv_nm_interface
22914
22915 # Specify filename containing input files for \$NM.
22916 nm_file_list_spec=$lt_nm_file_list_spec
22917
22918 # The root where to search for dependent libraries,and where our libraries should be installed.
22919 lt_sysroot=$lt_sysroot
22920
22921 # Command to truncate a binary pipe.
22922 lt_truncate_bin=$lt_lt_cv_truncate_bin
22923
22924 # The name of the directory that contains temporary libtool files.
22925 objdir=$objdir
22926
22927 # Used to examine libraries when file_magic_cmd begins with "file".
22928 MAGIC_CMD=$MAGIC_CMD
22929
22930 # Must we lock files when doing compilation?
22931 need_locks=$lt_need_locks
22932
22933 # Manifest tool.
22934 MANIFEST_TOOL=$lt_MANIFEST_TOOL
22935
22936 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
22937 DSYMUTIL=$lt_DSYMUTIL
22938
22939 # Tool to change global to local symbols on Mac OS X.
22940 NMEDIT=$lt_NMEDIT
22941
22942 # Tool to manipulate fat objects and archives on Mac OS X.
22943 LIPO=$lt_LIPO
22944
22945 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
22946 OTOOL=$lt_OTOOL
22947
22948 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
22949 OTOOL64=$lt_OTOOL64
22950
22951 # Old archive suffix (normally "a").
22952 libext=$libext
22953
22954 # Shared library suffix (normally ".so").
22955 shrext_cmds=$lt_shrext_cmds
22956
22957 # The commands to extract the exported symbol list from a shared archive.
22958 extract_expsyms_cmds=$lt_extract_expsyms_cmds
22959
22960 # Variables whose values should be saved in libtool wrapper scripts and
22961 # restored at link time.
22962 variables_saved_for_relink=$lt_variables_saved_for_relink
22963
22964 # Do we need the "lib" prefix for modules?
22965 need_lib_prefix=$need_lib_prefix
22966
22967 # Do we need a version for libraries?
22968 need_version=$need_version
22969
22970 # Library versioning type.
22971 version_type=$version_type
22972
22973 # Shared library runtime path variable.
22974 runpath_var=$runpath_var
22975
22976 # Shared library path variable.
22977 shlibpath_var=$shlibpath_var
22978
22979 # Is shlibpath searched before the hard-coded library search path?
22980 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
22981
22982 # Format of library name prefix.
22983 libname_spec=$lt_libname_spec
22984
22985 # List of archive names. First name is the real one, the rest are links.
22986 # The last name is the one that the linker finds with -lNAME
22987 library_names_spec=$lt_library_names_spec
22988
22989 # The coded name of the library, if different from the real name.
22990 soname_spec=$lt_soname_spec
22991
22992 # Permission mode override for installation of shared libraries.
22993 install_override_mode=$lt_install_override_mode
22994
22995 # Command to use after installation of a shared archive.
22996 postinstall_cmds=$lt_postinstall_cmds
22997
22998 # Command to use after uninstallation of a shared archive.
22999 postuninstall_cmds=$lt_postuninstall_cmds
23000
23001 # Commands used to finish a libtool library installation in a directory.
23002 finish_cmds=$lt_finish_cmds
23003
23004 # As "finish_cmds", except a single script fragment to be evaled but
23005 # not shown.
23006 finish_eval=$lt_finish_eval
23007
23008 # Whether we should hardcode library paths into libraries.
23009 hardcode_into_libs=$hardcode_into_libs
23010
23011 # Compile-time system search path for libraries.
23012 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
23013
23014 # Detected run-time system search path for libraries.
23015 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
23016
23017 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
23018 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
23019
23020 # Whether dlopen is supported.
23021 dlopen_support=$enable_dlopen
23022
23023 # Whether dlopen of programs is supported.
23024 dlopen_self=$enable_dlopen_self
23025
23026 # Whether dlopen of statically linked programs is supported.
23027 dlopen_self_static=$enable_dlopen_self_static
23028
23029 # Commands to strip libraries.
23030 old_striplib=$lt_old_striplib
23031 striplib=$lt_striplib
23032
23033
23034 # The linker used to build libraries.
23035 LD=$lt_LD
23036
23037 # How to create reloadable object files.
23038 reload_flag=$lt_reload_flag
23039 reload_cmds=$lt_reload_cmds
23040
23041 # Commands used to build an old-style archive.
23042 old_archive_cmds=$lt_old_archive_cmds
23043
23044 # A language specific compiler.
23045 CC=$lt_compiler
23046
23047 # Is the compiler the GNU compiler?
23048 with_gcc=$GCC
23049
23050 # Compiler flag to turn off builtin functions.
23051 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
23052
23053 # Additional compiler flags for building library objects.
23054 pic_flag=$lt_lt_prog_compiler_pic
23055
23056 # How to pass a linker flag through the compiler.
23057 wl=$lt_lt_prog_compiler_wl
23058
23059 # Compiler flag to prevent dynamic linking.
23060 link_static_flag=$lt_lt_prog_compiler_static
23061
23062 # Does compiler simultaneously support -c and -o options?
23063 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
23064
23065 # Whether or not to add -lc for building shared libraries.
23066 build_libtool_need_lc=$archive_cmds_need_lc
23067
23068 # Whether or not to disallow shared libs when runtime libs are static.
23069 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
23070
23071 # Compiler flag to allow reflexive dlopens.
23072 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
23073
23074 # Compiler flag to generate shared objects directly from archives.
23075 whole_archive_flag_spec=$lt_whole_archive_flag_spec
23076
23077 # Whether the compiler copes with passing no objects directly.
23078 compiler_needs_object=$lt_compiler_needs_object
23079
23080 # Create an old-style archive from a shared archive.
23081 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
23082
23083 # Create a temporary old-style archive to link instead of a shared archive.
23084 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
23085
23086 # Commands used to build a shared archive.
23087 archive_cmds=$lt_archive_cmds
23088 archive_expsym_cmds=$lt_archive_expsym_cmds
23089
23090 # Commands used to build a loadable module if different from building
23091 # a shared archive.
23092 module_cmds=$lt_module_cmds
23093 module_expsym_cmds=$lt_module_expsym_cmds
23094
23095 # Whether we are building with GNU ld or not.
23096 with_gnu_ld=$lt_with_gnu_ld
23097
23098 # Flag that allows shared libraries with undefined symbols to be built.
23099 allow_undefined_flag=$lt_allow_undefined_flag
23100
23101 # Flag that enforces no undefined symbols.
23102 no_undefined_flag=$lt_no_undefined_flag
23103
23104 # Flag to hardcode \$libdir into a binary during linking.
23105 # This must work even if \$libdir does not exist
23106 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
23107
23108 # Whether we need a single "-rpath" flag with a separated argument.
23109 hardcode_libdir_separator=$lt_hardcode_libdir_separator
23110
23111 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23112 # DIR into the resulting binary.
23113 hardcode_direct=$hardcode_direct
23114
23115 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23116 # DIR into the resulting binary and the resulting library dependency is
23117 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
23118 # library is relocated.
23119 hardcode_direct_absolute=$hardcode_direct_absolute
23120
23121 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
23122 # into the resulting binary.
23123 hardcode_minus_L=$hardcode_minus_L
23124
23125 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
23126 # into the resulting binary.
23127 hardcode_shlibpath_var=$hardcode_shlibpath_var
23128
23129 # Set to "yes" if building a shared library automatically hardcodes DIR
23130 # into the library and all subsequent libraries and executables linked
23131 # against it.
23132 hardcode_automatic=$hardcode_automatic
23133
23134 # Set to yes if linker adds runtime paths of dependent libraries
23135 # to runtime path list.
23136 inherit_rpath=$inherit_rpath
23137
23138 # Whether libtool must link a program against all its dependency libraries.
23139 link_all_deplibs=$link_all_deplibs
23140
23141 # Set to "yes" if exported symbols are required.
23142 always_export_symbols=$always_export_symbols
23143
23144 # The commands to list exported symbols.
23145 export_symbols_cmds=$lt_export_symbols_cmds
23146
23147 # Symbols that should not be listed in the preloaded symbols.
23148 exclude_expsyms=$lt_exclude_expsyms
23149
23150 # Symbols that must always be exported.
23151 include_expsyms=$lt_include_expsyms
23152
23153 # Commands necessary for linking programs (against libraries) with templates.
23154 prelink_cmds=$lt_prelink_cmds
23155
23156 # Commands necessary for finishing linking programs.
23157 postlink_cmds=$lt_postlink_cmds
23158
23159 # Specify filename containing input files.
23160 file_list_spec=$lt_file_list_spec
23161
23162 # How to hardcode a shared library path into an executable.
23163 hardcode_action=$hardcode_action
23164
23165 # ### END LIBTOOL CONFIG
23166
23167 _LT_EOF
23168
23169 cat <<'_LT_EOF' >> "$cfgfile"
23170
23171 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
23172
23173 # func_munge_path_list VARIABLE PATH
23174 # -----------------------------------
23175 # VARIABLE is name of variable containing _space_ separated list of
23176 # directories to be munged by the contents of PATH, which is string
23177 # having a format:
23178 # "DIR[:DIR]:"
23179 # string "DIR[ DIR]" will be prepended to VARIABLE
23180 # ":DIR[:DIR]"
23181 # string "DIR[ DIR]" will be appended to VARIABLE
23182 # "DIRP[:DIRP]::[DIRA:]DIRA"
23183 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
23184 # "DIRA[ DIRA]" will be appended to VARIABLE
23185 # "DIR[:DIR]"
23186 # VARIABLE will be replaced by "DIR[ DIR]"
23187 func_munge_path_list ()
23188 {
23189 case x$2 in
23190 x)
23191 ;;
23192 *:)
23193 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
23194 ;;
23195 x:*)
23196 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
23197 ;;
23198 *::*)
23199 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
23200 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
23201 ;;
23202 *)
23203 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
23204 ;;
23205 esac
23206 }
23207
23208
23209 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
23210 func_cc_basename ()
23211 {
23212 for cc_temp in $*""; do
23213 case $cc_temp in
23214 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
23215 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
23216 \-*) ;;
23217 *) break;;
23218 esac
23219 done
23220 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
23221 }
23222
23223
23224 # ### END FUNCTIONS SHARED WITH CONFIGURE
23225
23226 _LT_EOF
23227
23228 case $host_os in
23229 aix3*)
23230 cat <<\_LT_EOF >> "$cfgfile"
23231 # AIX sometimes has problems with the GCC collect2 program. For some
23232 # reason, if we set the COLLECT_NAMES environment variable, the problems
23233 # vanish in a puff of smoke.
23234 if test set != "${COLLECT_NAMES+set}"; then
23235 COLLECT_NAMES=
23236 export COLLECT_NAMES
23237 fi
23238 _LT_EOF
23239 ;;
23240 esac
23241
23242
23243 ltmain=$ac_aux_dir/ltmain.sh
23244
23245
23246 # We use sed instead of cat because bash on DJGPP gets confused if
23247 # if finds mixed CR/LF and LF-only lines. Since sed operates in
23248 # text mode, it properly converts lines to CR/LF. This bash problem
23249 # is reportedly fixed, but why not run on old versions too?
23250 sed '$q' "$ltmain" >> "$cfgfile" \
23251 || (rm -f "$cfgfile"; exit 1)
23252
23253 mv -f "$cfgfile" "$ofile" ||
23254 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
23255 chmod +x "$ofile"
23256
23257 ;;
23258 "disable-rpath":C)
23259 sed < libtool > libtool-2 \
23260 's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
23261 mv libtool-2 libtool
23262 chmod 755 libtool
23263 libtool="./libtool"
23264 ;;
23265
23266 esac
23267 done # for ac_tag
23268
23269
23270 as_fn_exit 0
23271 _ACEOF
23272 ac_clean_files=$ac_clean_files_save
23273
23274 test $ac_write_fail = 0 ||
23275 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
23276
23277
23278 # configure is writing to config.log, and then calls config.status.
23279 # config.status does its own redirection, appending to config.log.
23280 # Unfortunately, on DOS this fails, as config.log is still kept open
23281 # by configure, so config.status won't be able to write to it; its
23282 # output is simply discarded. So we exec the FD to /dev/null,
23283 # effectively closing config.log, so it can be properly (re)opened and
23284 # appended to by config.status. When coming back to configure, we
23285 # need to make the FD available again.
23286 if test "$no_create" != yes; then
23287 ac_cs_success=:
23288 ac_config_status_args=
23289 test "$silent" = yes &&
23290 ac_config_status_args="$ac_config_status_args --quiet"
23291 exec 5>/dev/null
23292 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23293 exec 5>>config.log
23294 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23295 # would make configure fail if this is the last instruction.
23296 $ac_cs_success || as_fn_exit 1
23297 fi
23298 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
23299 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
23300 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
23301 fi
23302
23303