xref: /freebsd/contrib/unbound/configure (revision b64c5a0ace59af62eff52bfe110a521dc73c937b)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.71 for unbound 1.22.0.
4#
5# Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
9# Inc.
10#
11#
12# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
14## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
17
18# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
20as_nop=:
21if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
22then :
23  emulate sh
24  NULLCMD=:
25  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26  # is contrary to our usage.  Disable this feature.
27  alias -g '${1+"$@"}'='"$@"'
28  setopt NO_GLOB_SUBST
29else $as_nop
30  case `(set -o) 2>/dev/null` in #(
31  *posix*) :
32    set -o posix ;; #(
33  *) :
34     ;;
35esac
36fi
37
38
39
40# Reset variables that may have inherited troublesome values from
41# the environment.
42
43# IFS needs to be set, to space, tab, and newline, in precisely that order.
44# (If _AS_PATH_WALK were called with IFS unset, it would have the
45# side effect of setting IFS to empty, thus disabling word splitting.)
46# Quoting is to prevent editors from complaining about space-tab.
47as_nl='
48'
49export as_nl
50IFS=" ""	$as_nl"
51
52PS1='$ '
53PS2='> '
54PS4='+ '
55
56# Ensure predictable behavior from utilities with locale-dependent output.
57LC_ALL=C
58export LC_ALL
59LANGUAGE=C
60export LANGUAGE
61
62# We cannot yet rely on "unset" to work, but we need these variables
63# to be unset--not just set to an empty or harmless value--now, to
64# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
65# also avoids known problems related to "unset" and subshell syntax
66# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
67for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
68do eval test \${$as_var+y} \
69  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
70done
71
72# Ensure that fds 0, 1, and 2 are open.
73if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
74if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
75if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
76
77# The user is always right.
78if ${PATH_SEPARATOR+false} :; then
79  PATH_SEPARATOR=:
80  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82      PATH_SEPARATOR=';'
83  }
84fi
85
86
87# Find who we are.  Look in the path if we contain no directory separator.
88as_myself=
89case $0 in #((
90  *[\\/]* ) as_myself=$0 ;;
91  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
92for as_dir in $PATH
93do
94  IFS=$as_save_IFS
95  case $as_dir in #(((
96    '') as_dir=./ ;;
97    */) ;;
98    *) as_dir=$as_dir/ ;;
99  esac
100    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
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.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116
117# Use a proper internal environment variable to ensure we don't fall
118  # into an infinite loop, continuously re-executing ourselves.
119  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
120    _as_can_reexec=no; export _as_can_reexec;
121    # We cannot yet assume a decent shell, so we have to provide a
122# neutralization value for shells without unset; and this also
123# works around shells that cannot unset nonexistent variables.
124# Preserve -v and -x to the replacement shell.
125BASH_ENV=/dev/null
126ENV=/dev/null
127(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
128case $- in # ((((
129  *v*x* | *x*v* ) as_opts=-vx ;;
130  *v* ) as_opts=-v ;;
131  *x* ) as_opts=-x ;;
132  * ) as_opts= ;;
133esac
134exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
135# Admittedly, this is quite paranoid, since all the known shells bail
136# out after a failed `exec'.
137printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
138exit 255
139  fi
140  # We don't want this to propagate to other subprocesses.
141          { _as_can_reexec=; unset _as_can_reexec;}
142if test "x$CONFIG_SHELL" = x; then
143  as_bourne_compatible="as_nop=:
144if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
145then :
146  emulate sh
147  NULLCMD=:
148  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
149  # is contrary to our usage.  Disable this feature.
150  alias -g '\${1+\"\$@\"}'='\"\$@\"'
151  setopt NO_GLOB_SUBST
152else \$as_nop
153  case \`(set -o) 2>/dev/null\` in #(
154  *posix*) :
155    set -o posix ;; #(
156  *) :
157     ;;
158esac
159fi
160"
161  as_required="as_fn_return () { (exit \$1); }
162as_fn_success () { as_fn_return 0; }
163as_fn_failure () { as_fn_return 1; }
164as_fn_ret_success () { return 0; }
165as_fn_ret_failure () { return 1; }
166
167exitcode=0
168as_fn_success || { exitcode=1; echo as_fn_success failed.; }
169as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
170as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
171as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
172if ( set x; as_fn_ret_success y && test x = \"\$1\" )
173then :
174
175else \$as_nop
176  exitcode=1; echo positional parameters were not saved.
177fi
178test x\$exitcode = x0 || exit 1
179blah=\$(echo \$(echo blah))
180test x\"\$blah\" = xblah || exit 1
181test -x / || exit 1"
182  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
183  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
184  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
185  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
186test \$(( 1 + 1 )) = 2 || exit 1
187
188  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
189    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
190    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
191    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
192    PATH=/empty FPATH=/empty; export PATH FPATH
193    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
194      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
195  if (eval "$as_required") 2>/dev/null
196then :
197  as_have_required=yes
198else $as_nop
199  as_have_required=no
200fi
201  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
202then :
203
204else $as_nop
205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
206as_found=false
207for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
208do
209  IFS=$as_save_IFS
210  case $as_dir in #(((
211    '') as_dir=./ ;;
212    */) ;;
213    *) as_dir=$as_dir/ ;;
214  esac
215  as_found=:
216  case $as_dir in #(
217	 /*)
218	   for as_base in sh bash ksh sh5; do
219	     # Try only shells that exist, to save several forks.
220	     as_shell=$as_dir$as_base
221	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
222		    as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
223then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
226then :
227  break 2
228fi
229fi
230	   done;;
231       esac
232  as_found=false
233done
234IFS=$as_save_IFS
235if $as_found
236then :
237
238else $as_nop
239  if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
241then :
242  CONFIG_SHELL=$SHELL as_have_required=yes
243fi
244fi
245
246
247      if test "x$CONFIG_SHELL" != x
248then :
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.
254BASH_ENV=/dev/null
255ENV=/dev/null
256(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
257case $- in # ((((
258  *v*x* | *x*v* ) as_opts=-vx ;;
259  *v* ) as_opts=-v ;;
260  *x* ) as_opts=-x ;;
261  * ) as_opts= ;;
262esac
263exec $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'.
266printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
267exit 255
268fi
269
270    if test x$as_have_required = xno
271then :
272  printf "%s\n" "$0: This script requires a shell more modern than all"
273  printf "%s\n" "$0: the shells that I found on your system."
274  if test ${ZSH_VERSION+y} ; then
275    printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
276    printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
277  else
278    printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
279$0: unbound-bugs@nlnetlabs.nl or
280$0: https://github.com/NLnetLabs/unbound/issues about your
281$0: system, including any error possibly output before this
282$0: message. Then install a modern shell, or manually run
283$0: the script under such a shell if you do have one."
284  fi
285  exit 1
286fi
287fi
288fi
289SHELL=${CONFIG_SHELL-/bin/sh}
290export SHELL
291# Unset more variables known to interfere with behavior of common tools.
292CLICOLOR_FORCE= GREP_OPTIONS=
293unset CLICOLOR_FORCE GREP_OPTIONS
294
295## --------------------- ##
296## M4sh Shell Functions. ##
297## --------------------- ##
298# as_fn_unset VAR
299# ---------------
300# Portably unset VAR.
301as_fn_unset ()
302{
303  { eval $1=; unset $1;}
304}
305as_unset=as_fn_unset
306
307
308# as_fn_set_status STATUS
309# -----------------------
310# Set $? to STATUS, without forking.
311as_fn_set_status ()
312{
313  return $1
314} # as_fn_set_status
315
316# as_fn_exit STATUS
317# -----------------
318# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
319as_fn_exit ()
320{
321  set +e
322  as_fn_set_status $1
323  exit $1
324} # as_fn_exit
325# as_fn_nop
326# ---------
327# Do nothing but, unlike ":", preserve the value of $?.
328as_fn_nop ()
329{
330  return $?
331}
332as_nop=as_fn_nop
333
334# as_fn_mkdir_p
335# -------------
336# Create "$as_dir" as a directory, including parents if necessary.
337as_fn_mkdir_p ()
338{
339
340  case $as_dir in #(
341  -*) as_dir=./$as_dir;;
342  esac
343  test -d "$as_dir" || eval $as_mkdir_p || {
344    as_dirs=
345    while :; do
346      case $as_dir in #(
347      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
348      *) as_qdir=$as_dir;;
349      esac
350      as_dirs="'$as_qdir' $as_dirs"
351      as_dir=`$as_dirname -- "$as_dir" ||
352$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
353	 X"$as_dir" : 'X\(//\)[^/]' \| \
354	 X"$as_dir" : 'X\(//\)$' \| \
355	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
356printf "%s\n" X"$as_dir" |
357    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
358	    s//\1/
359	    q
360	  }
361	  /^X\(\/\/\)[^/].*/{
362	    s//\1/
363	    q
364	  }
365	  /^X\(\/\/\)$/{
366	    s//\1/
367	    q
368	  }
369	  /^X\(\/\).*/{
370	    s//\1/
371	    q
372	  }
373	  s/.*/./; q'`
374      test -d "$as_dir" && break
375    done
376    test -z "$as_dirs" || eval "mkdir $as_dirs"
377  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
378
379
380} # as_fn_mkdir_p
381
382# as_fn_executable_p FILE
383# -----------------------
384# Test if FILE is an executable regular file.
385as_fn_executable_p ()
386{
387  test -f "$1" && test -x "$1"
388} # as_fn_executable_p
389# as_fn_append VAR VALUE
390# ----------------------
391# Append the text in VALUE to the end of the definition contained in VAR. Take
392# advantage of any shell optimizations that allow amortized linear growth over
393# repeated appends, instead of the typical quadratic growth present in naive
394# implementations.
395if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
396then :
397  eval 'as_fn_append ()
398  {
399    eval $1+=\$2
400  }'
401else $as_nop
402  as_fn_append ()
403  {
404    eval $1=\$$1\$2
405  }
406fi # as_fn_append
407
408# as_fn_arith ARG...
409# ------------------
410# Perform arithmetic evaluation on the ARGs, and store the result in the
411# global $as_val. Take advantage of shells that can avoid forks. The arguments
412# must be portable across $(()) and expr.
413if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
414then :
415  eval 'as_fn_arith ()
416  {
417    as_val=$(( $* ))
418  }'
419else $as_nop
420  as_fn_arith ()
421  {
422    as_val=`expr "$@" || test $? -eq 1`
423  }
424fi # as_fn_arith
425
426# as_fn_nop
427# ---------
428# Do nothing but, unlike ":", preserve the value of $?.
429as_fn_nop ()
430{
431  return $?
432}
433as_nop=as_fn_nop
434
435# as_fn_error STATUS ERROR [LINENO LOG_FD]
436# ----------------------------------------
437# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
438# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
439# script with STATUS, using 1 if that was 0.
440as_fn_error ()
441{
442  as_status=$1; test $as_status -eq 0 && as_status=1
443  if test "$4"; then
444    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
445    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
446  fi
447  printf "%s\n" "$as_me: error: $2" >&2
448  as_fn_exit $as_status
449} # as_fn_error
450
451if expr a : '\(a\)' >/dev/null 2>&1 &&
452   test "X`expr 00001 : '.*\(...\)'`" = X001; then
453  as_expr=expr
454else
455  as_expr=false
456fi
457
458if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
459  as_basename=basename
460else
461  as_basename=false
462fi
463
464if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
465  as_dirname=dirname
466else
467  as_dirname=false
468fi
469
470as_me=`$as_basename -- "$0" ||
471$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
472	 X"$0" : 'X\(//\)$' \| \
473	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
474printf "%s\n" X/"$0" |
475    sed '/^.*\/\([^/][^/]*\)\/*$/{
476	    s//\1/
477	    q
478	  }
479	  /^X\/\(\/\/\)$/{
480	    s//\1/
481	    q
482	  }
483	  /^X\/\(\/\).*/{
484	    s//\1/
485	    q
486	  }
487	  s/.*/./; q'`
488
489# Avoid depending upon Character Ranges.
490as_cr_letters='abcdefghijklmnopqrstuvwxyz'
491as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
492as_cr_Letters=$as_cr_letters$as_cr_LETTERS
493as_cr_digits='0123456789'
494as_cr_alnum=$as_cr_Letters$as_cr_digits
495
496
497  as_lineno_1=$LINENO as_lineno_1a=$LINENO
498  as_lineno_2=$LINENO as_lineno_2a=$LINENO
499  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
500  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
501  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
502  sed -n '
503    p
504    /[$]LINENO/=
505  ' <$as_myself |
506    sed '
507      s/[$]LINENO.*/&-/
508      t lineno
509      b
510      :lineno
511      N
512      :loop
513      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
514      t loop
515      s/-\n.*//
516    ' >$as_me.lineno &&
517  chmod +x "$as_me.lineno" ||
518    { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
519
520  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
521  # already done that, so ensure we don't try to do so again and fall
522  # in an infinite loop.  This has already happened in practice.
523  _as_can_reexec=no; export _as_can_reexec
524  # Don't try to exec as it changes $[0], causing all sort of problems
525  # (the dirname of $[0] is not the place where we might find the
526  # original and so on.  Autoconf is especially sensitive to this).
527  . "./$as_me.lineno"
528  # Exit status is that of the last command.
529  exit
530}
531
532
533# Determine whether it's possible to make 'echo' print without a newline.
534# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
535# for compatibility with existing Makefiles.
536ECHO_C= ECHO_N= ECHO_T=
537case `echo -n x` in #(((((
538-n*)
539  case `echo 'xy\c'` in
540  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
541  xy)  ECHO_C='\c';;
542  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
543       ECHO_T='	';;
544  esac;;
545*)
546  ECHO_N='-n';;
547esac
548
549# For backward compatibility with old third-party macros, we provide
550# the shell variables $as_echo and $as_echo_n.  New code should use
551# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
552as_echo='printf %s\n'
553as_echo_n='printf %s'
554
555
556rm -f conf$$ conf$$.exe conf$$.file
557if test -d conf$$.dir; then
558  rm -f conf$$.dir/conf$$.file
559else
560  rm -f conf$$.dir
561  mkdir conf$$.dir 2>/dev/null
562fi
563if (echo >conf$$.file) 2>/dev/null; then
564  if ln -s conf$$.file conf$$ 2>/dev/null; then
565    as_ln_s='ln -s'
566    # ... but there are two gotchas:
567    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
568    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
569    # In both cases, we have to default to `cp -pR'.
570    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
571      as_ln_s='cp -pR'
572  elif ln conf$$.file conf$$ 2>/dev/null; then
573    as_ln_s=ln
574  else
575    as_ln_s='cp -pR'
576  fi
577else
578  as_ln_s='cp -pR'
579fi
580rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
581rmdir conf$$.dir 2>/dev/null
582
583if mkdir -p . 2>/dev/null; then
584  as_mkdir_p='mkdir -p "$as_dir"'
585else
586  test -d ./-p && rmdir ./-p
587  as_mkdir_p=false
588fi
589
590as_test_x='test -x'
591as_executable_p=as_fn_executable_p
592
593# Sed expression to map a string onto a valid CPP name.
594as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
595
596# Sed expression to map a string onto a valid variable name.
597as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
598
599SHELL=${CONFIG_SHELL-/bin/sh}
600
601
602test -n "$DJDIR" || exec 7<&0 </dev/null
603exec 6>&1
604
605# Name of the host.
606# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
607# so uname gets run too.
608ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
609
610#
611# Initializations.
612#
613ac_default_prefix=/usr/local
614ac_clean_files=
615ac_config_libobj_dir=.
616LIBOBJS=
617cross_compiling=no
618subdirs=
619MFLAGS=
620MAKEFLAGS=
621
622# Identity of this package.
623PACKAGE_NAME='unbound'
624PACKAGE_TARNAME='unbound'
625PACKAGE_VERSION='1.22.0'
626PACKAGE_STRING='unbound 1.22.0'
627PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues'
628PACKAGE_URL=''
629
630# Factoring default headers for most tests.
631ac_includes_default="\
632#include <stddef.h>
633#ifdef HAVE_STDIO_H
634# include <stdio.h>
635#endif
636#ifdef HAVE_STDLIB_H
637# include <stdlib.h>
638#endif
639#ifdef HAVE_STRING_H
640# include <string.h>
641#endif
642#ifdef HAVE_INTTYPES_H
643# include <inttypes.h>
644#endif
645#ifdef HAVE_STDINT_H
646# include <stdint.h>
647#endif
648#ifdef HAVE_STRINGS_H
649# include <strings.h>
650#endif
651#ifdef HAVE_SYS_TYPES_H
652# include <sys/types.h>
653#endif
654#ifdef HAVE_SYS_STAT_H
655# include <sys/stat.h>
656#endif
657#ifdef HAVE_UNISTD_H
658# include <unistd.h>
659#endif"
660
661ac_header_c_list=
662ac_func_c_list=
663ac_subst_vars='LTLIBOBJS
664date
665version
666INSTALLTARGET
667ALLTARGET
668SOURCEFILE
669SOURCEDETERMINE
670IPSET_OBJ
671IPSET_SRC
672IPSECMOD_HEADER
673IPSECMOD_OBJ
674CACHEDB_OBJ
675CACHEDB_SRC
676DNSCRYPT_OBJ
677DNSCRYPT_SRC
678ENABLE_DNSCRYPT
679ENABLE_DNSCRYPT_XCHACHA20
680DNSTAP_OBJ
681DNSTAP_SRC
682DNSTAP_SOCKET_TESTBIN
683DNSTAP_SOCKET_PATH
684opt_dnstap_socket_path
685ENABLE_DNSTAP
686PROTOBUFC_LIBS
687PROTOBUFC_CFLAGS
688PROTOC_C
689UBSYMS
690EXTRALINK
691COMMON_OBJ_ALL_SYMBOLS
692LIBOBJ_WITHOUT_CTIME
693LIBOBJ_WITHOUT_CTIMEARC4
694WIN_CHECKCONF_OBJ_LINK
695WIN_CONTROL_OBJ_LINK
696WIN_UBANCHOR_OBJ_LINK
697WIN_HOST_OBJ_LINK
698WIN_DAEMON_OBJ_LINK
699WIN_DAEMON_OBJ
700WIN_DAEMON_SRC
701WINAPPS
702WINDRES
703CHECKLOCK_OBJ
704staticexe
705PC_LIBEVENT_DEPENDENCY
706UNBOUND_EVENT_UNINSTALL
707UNBOUND_EVENT_INSTALL
708SUBNET_HEADER
709SUBNET_OBJ
710PC_LIBBSD_DEPENDENCY
711SSLLIB
712HAVE_SSL
713PC_CRYPTO_DEPENDENCY
714CONFIG_DATE
715GCC_DOCKER_LINTFLAGS
716NETBSD_LINTFLAGS
717PYUNBOUND_UNINSTALL
718PYUNBOUND_INSTALL
719PYUNBOUND_TARGET
720PYUNBOUND_OBJ
721WITH_PYUNBOUND
722PYTHONMOD_UNINSTALL
723PYTHONMOD_INSTALL
724PYTHONMOD_HEADER
725PYTHONMOD_OBJ
726WITH_PYTHONMODULE
727swig
728SWIG_LIB
729SWIG
730PC_PY_DEPENDENCY
731PYTHON_LIBS
732PY_MAJOR_VERSION
733PYTHON_SITE_PKG
734PYTHON_LDFLAGS
735PYTHON_CPPFLAGS
736PYTHON
737PYTHON_VERSION
738DYNLIBMOD_EXTRALIBS
739DYNLIBMOD_HEADER
740DYNLIBMOD_OBJ
741WITH_DYNLIBMODULE
742PTHREAD_CFLAGS_ONLY
743PTHREAD_CFLAGS
744PTHREAD_LIBS
745PTHREAD_CXX
746PTHREAD_CC
747ax_pthread_config
748ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ
749SLDNS_ALLOCCHECK_EXTRA_OBJ
750USE_SYSTEMD_FALSE
751USE_SYSTEMD_TRUE
752SYSTEMD_DAEMON_LIBS
753SYSTEMD_DAEMON_CFLAGS
754SYSTEMD_LIBS
755SYSTEMD_CFLAGS
756RUNTIME_PATH
757LIBOBJS
758CPP
759PKG_CONFIG_LIBDIR
760PKG_CONFIG_PATH
761PKG_CONFIG
762LT_SYS_LIBRARY_PATH
763OTOOL64
764OTOOL
765LIPO
766NMEDIT
767DSYMUTIL
768MANIFEST_TOOL
769AWK
770RANLIB
771ac_ct_AR
772DLLTOOL
773OBJDUMP
774LN_S
775NM
776ac_ct_DUMPBIN
777DUMPBIN
778LD
779FGREP
780EGREP
781SED
782LIBTOOL
783AR
784host_os
785host_vendor
786host_cpu
787host
788build_os
789build_vendor
790build_cpu
791build
792libtool
793STRIP
794doxygen
795YFLAGS
796YACC
797LEXLIB
798LEX_OUTPUT_ROOT
799LEX
800debug_enabled
801DEPFLAG
802GREP
803UNBOUND_USERNAME
804UNBOUND_ROOTCERT_FILE
805UNBOUND_ROOTKEY_FILE
806UNBOUND_PIDFILE
807UNBOUND_SHARE_DIR
808UNBOUND_CHROOT_DIR
809UNBOUND_RUN_DIR
810ub_conf_dir
811ub_conf_file
812UNBOUND_LOCALSTATE_DIR
813UNBOUND_SYSCONF_DIR
814UNBOUND_SBIN_DIR
815OBJEXT
816EXEEXT
817ac_ct_CC
818CPPFLAGS
819LDFLAGS
820CFLAGS
821CC
822LIBUNBOUND_AGE
823LIBUNBOUND_REVISION
824LIBUNBOUND_CURRENT
825UNBOUND_VERSION_MICRO
826UNBOUND_VERSION_MINOR
827UNBOUND_VERSION_MAJOR
828target_alias
829host_alias
830build_alias
831LIBS
832ECHO_T
833ECHO_N
834ECHO_C
835DEFS
836mandir
837localedir
838libdir
839psdir
840pdfdir
841dvidir
842htmldir
843infodir
844docdir
845oldincludedir
846includedir
847runstatedir
848localstatedir
849sharedstatedir
850sysconfdir
851datadir
852datarootdir
853libexecdir
854sbindir
855bindir
856program_transform_name
857prefix
858exec_prefix
859PACKAGE_URL
860PACKAGE_BUGREPORT
861PACKAGE_STRING
862PACKAGE_VERSION
863PACKAGE_TARNAME
864PACKAGE_NAME
865PATH_SEPARATOR
866SHELL'
867ac_subst_files=''
868ac_user_opts='
869enable_option_checking
870with_conf_file
871with_run_dir
872with_chroot_dir
873with_share_dir
874with_pidfile
875with_rootkey_file
876with_rootcert_file
877with_username
878enable_checking
879enable_debug
880enable_flto
881enable_pie
882enable_relro_now
883enable_shared
884enable_static
885with_pic
886enable_fast_install
887with_aix_soname
888with_gnu_ld
889with_sysroot
890enable_libtool_lock
891enable_rpath
892enable_largefile
893enable_systemd
894enable_alloc_checks
895enable_alloc_lite
896enable_alloc_nonregional
897with_pthreads
898with_solaris_threads
899with_syslog_facility
900with_dynlibmodule
901with_pyunbound
902with_pythonmodule
903enable_swig_version_check
904with_nss
905with_nettle
906with_ssl
907with_libbsd
908enable_sha1
909enable_sha2
910enable_subnet
911enable_gost
912enable_ecdsa
913enable_dsa
914with_deprecate_rsa_1024
915enable_ed25519
916enable_ed448
917enable_event_api
918enable_tfo_client
919enable_tfo_server
920with_libevent
921with_libexpat
922with_libhiredis
923with_libnghttp2
924with_libngtcp2
925enable_static_exe
926enable_fully_static
927enable_lock_checks
928enable_allsymbols
929enable_dnstap
930with_dnstap_socket_path
931with_protobuf_c
932enable_dnscrypt
933with_libsodium
934enable_cachedb
935enable_ipsecmod
936enable_ipset
937with_libmnl
938enable_explicit_port_randomisation
939enable_linux_ip_local_port_range
940with_libunbound_only
941'
942      ac_precious_vars='build_alias
943host_alias
944target_alias
945CC
946CFLAGS
947LDFLAGS
948LIBS
949CPPFLAGS
950YACC
951YFLAGS
952LT_SYS_LIBRARY_PATH
953PKG_CONFIG
954PKG_CONFIG_PATH
955PKG_CONFIG_LIBDIR
956CPP
957SYSTEMD_CFLAGS
958SYSTEMD_LIBS
959SYSTEMD_DAEMON_CFLAGS
960SYSTEMD_DAEMON_LIBS
961PYTHON_VERSION
962PROTOBUFC_CFLAGS
963PROTOBUFC_LIBS'
964
965
966# Initialize some variables set by options.
967ac_init_help=
968ac_init_version=false
969ac_unrecognized_opts=
970ac_unrecognized_sep=
971# The variables have the same names as the options, with
972# dashes changed to underlines.
973cache_file=/dev/null
974exec_prefix=NONE
975no_create=
976no_recursion=
977prefix=NONE
978program_prefix=NONE
979program_suffix=NONE
980program_transform_name=s,x,x,
981silent=
982site=
983srcdir=
984verbose=
985x_includes=NONE
986x_libraries=NONE
987
988# Installation directory options.
989# These are left unexpanded so users can "make install exec_prefix=/foo"
990# and all the variables that are supposed to be based on exec_prefix
991# by default will actually change.
992# Use braces instead of parens because sh, perl, etc. also accept them.
993# (The list follows the same order as the GNU Coding Standards.)
994bindir='${exec_prefix}/bin'
995sbindir='${exec_prefix}/sbin'
996libexecdir='${exec_prefix}/libexec'
997datarootdir='${prefix}/share'
998datadir='${datarootdir}'
999sysconfdir='${prefix}/etc'
1000sharedstatedir='${prefix}/com'
1001localstatedir='${prefix}/var'
1002runstatedir='${localstatedir}/run'
1003includedir='${prefix}/include'
1004oldincludedir='/usr/include'
1005docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1006infodir='${datarootdir}/info'
1007htmldir='${docdir}'
1008dvidir='${docdir}'
1009pdfdir='${docdir}'
1010psdir='${docdir}'
1011libdir='${exec_prefix}/lib'
1012localedir='${datarootdir}/locale'
1013mandir='${datarootdir}/man'
1014
1015ac_prev=
1016ac_dashdash=
1017for ac_option
1018do
1019  # If the previous option needs an argument, assign it.
1020  if test -n "$ac_prev"; then
1021    eval $ac_prev=\$ac_option
1022    ac_prev=
1023    continue
1024  fi
1025
1026  case $ac_option in
1027  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1028  *=)   ac_optarg= ;;
1029  *)    ac_optarg=yes ;;
1030  esac
1031
1032  case $ac_dashdash$ac_option in
1033  --)
1034    ac_dashdash=yes ;;
1035
1036  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1037    ac_prev=bindir ;;
1038  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1039    bindir=$ac_optarg ;;
1040
1041  -build | --build | --buil | --bui | --bu)
1042    ac_prev=build_alias ;;
1043  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1044    build_alias=$ac_optarg ;;
1045
1046  -cache-file | --cache-file | --cache-fil | --cache-fi \
1047  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1048    ac_prev=cache_file ;;
1049  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1050  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1051    cache_file=$ac_optarg ;;
1052
1053  --config-cache | -C)
1054    cache_file=config.cache ;;
1055
1056  -datadir | --datadir | --datadi | --datad)
1057    ac_prev=datadir ;;
1058  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1059    datadir=$ac_optarg ;;
1060
1061  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1062  | --dataroo | --dataro | --datar)
1063    ac_prev=datarootdir ;;
1064  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1065  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1066    datarootdir=$ac_optarg ;;
1067
1068  -disable-* | --disable-*)
1069    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1070    # Reject names that are not valid shell variable names.
1071    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1072      as_fn_error $? "invalid feature name: \`$ac_useropt'"
1073    ac_useropt_orig=$ac_useropt
1074    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1075    case $ac_user_opts in
1076      *"
1077"enable_$ac_useropt"
1078"*) ;;
1079      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1080	 ac_unrecognized_sep=', ';;
1081    esac
1082    eval enable_$ac_useropt=no ;;
1083
1084  -docdir | --docdir | --docdi | --doc | --do)
1085    ac_prev=docdir ;;
1086  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1087    docdir=$ac_optarg ;;
1088
1089  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1090    ac_prev=dvidir ;;
1091  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1092    dvidir=$ac_optarg ;;
1093
1094  -enable-* | --enable-*)
1095    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1096    # Reject names that are not valid shell variable names.
1097    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1098      as_fn_error $? "invalid feature name: \`$ac_useropt'"
1099    ac_useropt_orig=$ac_useropt
1100    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1101    case $ac_user_opts in
1102      *"
1103"enable_$ac_useropt"
1104"*) ;;
1105      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1106	 ac_unrecognized_sep=', ';;
1107    esac
1108    eval enable_$ac_useropt=\$ac_optarg ;;
1109
1110  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1111  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1112  | --exec | --exe | --ex)
1113    ac_prev=exec_prefix ;;
1114  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1115  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1116  | --exec=* | --exe=* | --ex=*)
1117    exec_prefix=$ac_optarg ;;
1118
1119  -gas | --gas | --ga | --g)
1120    # Obsolete; use --with-gas.
1121    with_gas=yes ;;
1122
1123  -help | --help | --hel | --he | -h)
1124    ac_init_help=long ;;
1125  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1126    ac_init_help=recursive ;;
1127  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1128    ac_init_help=short ;;
1129
1130  -host | --host | --hos | --ho)
1131    ac_prev=host_alias ;;
1132  -host=* | --host=* | --hos=* | --ho=*)
1133    host_alias=$ac_optarg ;;
1134
1135  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1136    ac_prev=htmldir ;;
1137  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1138  | --ht=*)
1139    htmldir=$ac_optarg ;;
1140
1141  -includedir | --includedir | --includedi | --included | --include \
1142  | --includ | --inclu | --incl | --inc)
1143    ac_prev=includedir ;;
1144  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1145  | --includ=* | --inclu=* | --incl=* | --inc=*)
1146    includedir=$ac_optarg ;;
1147
1148  -infodir | --infodir | --infodi | --infod | --info | --inf)
1149    ac_prev=infodir ;;
1150  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1151    infodir=$ac_optarg ;;
1152
1153  -libdir | --libdir | --libdi | --libd)
1154    ac_prev=libdir ;;
1155  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1156    libdir=$ac_optarg ;;
1157
1158  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1159  | --libexe | --libex | --libe)
1160    ac_prev=libexecdir ;;
1161  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1162  | --libexe=* | --libex=* | --libe=*)
1163    libexecdir=$ac_optarg ;;
1164
1165  -localedir | --localedir | --localedi | --localed | --locale)
1166    ac_prev=localedir ;;
1167  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1168    localedir=$ac_optarg ;;
1169
1170  -localstatedir | --localstatedir | --localstatedi | --localstated \
1171  | --localstate | --localstat | --localsta | --localst | --locals)
1172    ac_prev=localstatedir ;;
1173  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1174  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1175    localstatedir=$ac_optarg ;;
1176
1177  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1178    ac_prev=mandir ;;
1179  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1180    mandir=$ac_optarg ;;
1181
1182  -nfp | --nfp | --nf)
1183    # Obsolete; use --without-fp.
1184    with_fp=no ;;
1185
1186  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1187  | --no-cr | --no-c | -n)
1188    no_create=yes ;;
1189
1190  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1191  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1192    no_recursion=yes ;;
1193
1194  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1195  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1196  | --oldin | --oldi | --old | --ol | --o)
1197    ac_prev=oldincludedir ;;
1198  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1199  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1200  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1201    oldincludedir=$ac_optarg ;;
1202
1203  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1204    ac_prev=prefix ;;
1205  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1206    prefix=$ac_optarg ;;
1207
1208  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1209  | --program-pre | --program-pr | --program-p)
1210    ac_prev=program_prefix ;;
1211  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1212  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1213    program_prefix=$ac_optarg ;;
1214
1215  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1216  | --program-suf | --program-su | --program-s)
1217    ac_prev=program_suffix ;;
1218  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1219  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1220    program_suffix=$ac_optarg ;;
1221
1222  -program-transform-name | --program-transform-name \
1223  | --program-transform-nam | --program-transform-na \
1224  | --program-transform-n | --program-transform- \
1225  | --program-transform | --program-transfor \
1226  | --program-transfo | --program-transf \
1227  | --program-trans | --program-tran \
1228  | --progr-tra | --program-tr | --program-t)
1229    ac_prev=program_transform_name ;;
1230  -program-transform-name=* | --program-transform-name=* \
1231  | --program-transform-nam=* | --program-transform-na=* \
1232  | --program-transform-n=* | --program-transform-=* \
1233  | --program-transform=* | --program-transfor=* \
1234  | --program-transfo=* | --program-transf=* \
1235  | --program-trans=* | --program-tran=* \
1236  | --progr-tra=* | --program-tr=* | --program-t=*)
1237    program_transform_name=$ac_optarg ;;
1238
1239  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1240    ac_prev=pdfdir ;;
1241  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1242    pdfdir=$ac_optarg ;;
1243
1244  -psdir | --psdir | --psdi | --psd | --ps)
1245    ac_prev=psdir ;;
1246  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1247    psdir=$ac_optarg ;;
1248
1249  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1250  | -silent | --silent | --silen | --sile | --sil)
1251    silent=yes ;;
1252
1253  -runstatedir | --runstatedir | --runstatedi | --runstated \
1254  | --runstate | --runstat | --runsta | --runst | --runs \
1255  | --run | --ru | --r)
1256    ac_prev=runstatedir ;;
1257  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1258  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1259  | --run=* | --ru=* | --r=*)
1260    runstatedir=$ac_optarg ;;
1261
1262  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1263    ac_prev=sbindir ;;
1264  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1265  | --sbi=* | --sb=*)
1266    sbindir=$ac_optarg ;;
1267
1268  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1269  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1270  | --sharedst | --shareds | --shared | --share | --shar \
1271  | --sha | --sh)
1272    ac_prev=sharedstatedir ;;
1273  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1274  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1275  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1276  | --sha=* | --sh=*)
1277    sharedstatedir=$ac_optarg ;;
1278
1279  -site | --site | --sit)
1280    ac_prev=site ;;
1281  -site=* | --site=* | --sit=*)
1282    site=$ac_optarg ;;
1283
1284  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1285    ac_prev=srcdir ;;
1286  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1287    srcdir=$ac_optarg ;;
1288
1289  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1290  | --syscon | --sysco | --sysc | --sys | --sy)
1291    ac_prev=sysconfdir ;;
1292  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1293  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1294    sysconfdir=$ac_optarg ;;
1295
1296  -target | --target | --targe | --targ | --tar | --ta | --t)
1297    ac_prev=target_alias ;;
1298  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1299    target_alias=$ac_optarg ;;
1300
1301  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1302    verbose=yes ;;
1303
1304  -version | --version | --versio | --versi | --vers | -V)
1305    ac_init_version=: ;;
1306
1307  -with-* | --with-*)
1308    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1309    # Reject names that are not valid shell variable names.
1310    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1311      as_fn_error $? "invalid package name: \`$ac_useropt'"
1312    ac_useropt_orig=$ac_useropt
1313    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1314    case $ac_user_opts in
1315      *"
1316"with_$ac_useropt"
1317"*) ;;
1318      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1319	 ac_unrecognized_sep=', ';;
1320    esac
1321    eval with_$ac_useropt=\$ac_optarg ;;
1322
1323  -without-* | --without-*)
1324    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1325    # Reject names that are not valid shell variable names.
1326    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1327      as_fn_error $? "invalid package name: \`$ac_useropt'"
1328    ac_useropt_orig=$ac_useropt
1329    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1330    case $ac_user_opts in
1331      *"
1332"with_$ac_useropt"
1333"*) ;;
1334      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1335	 ac_unrecognized_sep=', ';;
1336    esac
1337    eval with_$ac_useropt=no ;;
1338
1339  --x)
1340    # Obsolete; use --with-x.
1341    with_x=yes ;;
1342
1343  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1344  | --x-incl | --x-inc | --x-in | --x-i)
1345    ac_prev=x_includes ;;
1346  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1347  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1348    x_includes=$ac_optarg ;;
1349
1350  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1351  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1352    ac_prev=x_libraries ;;
1353  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1354  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1355    x_libraries=$ac_optarg ;;
1356
1357  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1358Try \`$0 --help' for more information"
1359    ;;
1360
1361  *=*)
1362    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1363    # Reject names that are not valid shell variable names.
1364    case $ac_envvar in #(
1365      '' | [0-9]* | *[!_$as_cr_alnum]* )
1366      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1367    esac
1368    eval $ac_envvar=\$ac_optarg
1369    export $ac_envvar ;;
1370
1371  *)
1372    # FIXME: should be removed in autoconf 3.0.
1373    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1374    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1375      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1376    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1377    ;;
1378
1379  esac
1380done
1381
1382if test -n "$ac_prev"; then
1383  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1384  as_fn_error $? "missing argument to $ac_option"
1385fi
1386
1387if test -n "$ac_unrecognized_opts"; then
1388  case $enable_option_checking in
1389    no) ;;
1390    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1391    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1392  esac
1393fi
1394
1395# Check all directory arguments for consistency.
1396for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1397		datadir sysconfdir sharedstatedir localstatedir includedir \
1398		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1399		libdir localedir mandir runstatedir
1400do
1401  eval ac_val=\$$ac_var
1402  # Remove trailing slashes.
1403  case $ac_val in
1404    */ )
1405      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1406      eval $ac_var=\$ac_val;;
1407  esac
1408  # Be sure to have absolute directory names.
1409  case $ac_val in
1410    [\\/$]* | ?:[\\/]* )  continue;;
1411    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1412  esac
1413  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1414done
1415
1416# There might be people who depend on the old broken behavior: `$host'
1417# used to hold the argument of --host etc.
1418# FIXME: To remove some day.
1419build=$build_alias
1420host=$host_alias
1421target=$target_alias
1422
1423# FIXME: To remove some day.
1424if test "x$host_alias" != x; then
1425  if test "x$build_alias" = x; then
1426    cross_compiling=maybe
1427  elif test "x$build_alias" != "x$host_alias"; then
1428    cross_compiling=yes
1429  fi
1430fi
1431
1432ac_tool_prefix=
1433test -n "$host_alias" && ac_tool_prefix=$host_alias-
1434
1435test "$silent" = yes && exec 6>/dev/null
1436
1437
1438ac_pwd=`pwd` && test -n "$ac_pwd" &&
1439ac_ls_di=`ls -di .` &&
1440ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1441  as_fn_error $? "working directory cannot be determined"
1442test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1443  as_fn_error $? "pwd does not report name of working directory"
1444
1445
1446# Find the source files, if location was not specified.
1447if test -z "$srcdir"; then
1448  ac_srcdir_defaulted=yes
1449  # Try the directory containing this script, then the parent directory.
1450  ac_confdir=`$as_dirname -- "$as_myself" ||
1451$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1452	 X"$as_myself" : 'X\(//\)[^/]' \| \
1453	 X"$as_myself" : 'X\(//\)$' \| \
1454	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1455printf "%s\n" X"$as_myself" |
1456    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1457	    s//\1/
1458	    q
1459	  }
1460	  /^X\(\/\/\)[^/].*/{
1461	    s//\1/
1462	    q
1463	  }
1464	  /^X\(\/\/\)$/{
1465	    s//\1/
1466	    q
1467	  }
1468	  /^X\(\/\).*/{
1469	    s//\1/
1470	    q
1471	  }
1472	  s/.*/./; q'`
1473  srcdir=$ac_confdir
1474  if test ! -r "$srcdir/$ac_unique_file"; then
1475    srcdir=..
1476  fi
1477else
1478  ac_srcdir_defaulted=no
1479fi
1480if test ! -r "$srcdir/$ac_unique_file"; then
1481  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1482  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1483fi
1484ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1485ac_abs_confdir=`(
1486	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1487	pwd)`
1488# When building in place, set srcdir=.
1489if test "$ac_abs_confdir" = "$ac_pwd"; then
1490  srcdir=.
1491fi
1492# Remove unnecessary trailing slashes from srcdir.
1493# Double slashes in file names in object file debugging info
1494# mess up M-x gdb in Emacs.
1495case $srcdir in
1496*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1497esac
1498for ac_var in $ac_precious_vars; do
1499  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1500  eval ac_env_${ac_var}_value=\$${ac_var}
1501  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1502  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1503done
1504
1505#
1506# Report the --help message.
1507#
1508if test "$ac_init_help" = "long"; then
1509  # Omit some internal or obsolete options to make the list less imposing.
1510  # This message is too long to be a string in the A/UX 3.1 sh.
1511  cat <<_ACEOF
1512\`configure' configures unbound 1.22.0 to adapt to many kinds of systems.
1513
1514Usage: $0 [OPTION]... [VAR=VALUE]...
1515
1516To assign environment variables (e.g., CC, CFLAGS...), specify them as
1517VAR=VALUE.  See below for descriptions of some of the useful variables.
1518
1519Defaults for the options are specified in brackets.
1520
1521Configuration:
1522  -h, --help              display this help and exit
1523      --help=short        display options specific to this package
1524      --help=recursive    display the short help of all the included packages
1525  -V, --version           display version information and exit
1526  -q, --quiet, --silent   do not print \`checking ...' messages
1527      --cache-file=FILE   cache test results in FILE [disabled]
1528  -C, --config-cache      alias for \`--cache-file=config.cache'
1529  -n, --no-create         do not create output files
1530      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1531
1532Installation directories:
1533  --prefix=PREFIX         install architecture-independent files in PREFIX
1534                          [$ac_default_prefix]
1535  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1536                          [PREFIX]
1537
1538By default, \`make install' will install all the files in
1539\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1540an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1541for instance \`--prefix=\$HOME'.
1542
1543For better control, use the options below.
1544
1545Fine tuning of the installation directories:
1546  --bindir=DIR            user executables [EPREFIX/bin]
1547  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1548  --libexecdir=DIR        program executables [EPREFIX/libexec]
1549  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1550  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1551  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1552  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1553  --libdir=DIR            object code libraries [EPREFIX/lib]
1554  --includedir=DIR        C header files [PREFIX/include]
1555  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1556  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1557  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1558  --infodir=DIR           info documentation [DATAROOTDIR/info]
1559  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1560  --mandir=DIR            man documentation [DATAROOTDIR/man]
1561  --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1562  --htmldir=DIR           html documentation [DOCDIR]
1563  --dvidir=DIR            dvi documentation [DOCDIR]
1564  --pdfdir=DIR            pdf documentation [DOCDIR]
1565  --psdir=DIR             ps documentation [DOCDIR]
1566_ACEOF
1567
1568  cat <<\_ACEOF
1569
1570System types:
1571  --build=BUILD     configure for building on BUILD [guessed]
1572  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1573_ACEOF
1574fi
1575
1576if test -n "$ac_init_help"; then
1577  case $ac_init_help in
1578     short | recursive ) echo "Configuration of unbound 1.22.0:";;
1579   esac
1580  cat <<\_ACEOF
1581
1582Optional Features:
1583  --disable-option-checking  ignore unrecognized --enable/--with options
1584  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1585  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1586  --enable-checking       Enable warnings, asserts, makefile-dependencies
1587  --enable-debug          same as enable-checking
1588  --disable-flto          Disable link-time optimization (gcc specific option)
1589  --enable-pie            Enable Position-Independent Executable (eg. to fully
1590                          benefit from ASLR, small performance penalty)
1591  --enable-relro-now      Enable full relocation binding at load-time (RELRO
1592                          NOW, to protect GOT and .dtor areas)
1593  --enable-shared[=PKGS]  build shared libraries [default=yes]
1594  --enable-static[=PKGS]  build static libraries [default=yes]
1595  --enable-fast-install[=PKGS]
1596                          optimize for fast installation [default=yes]
1597  --disable-libtool-lock  avoid locking (might break parallel builds)
1598  --disable-rpath         disable hardcoded rpath (default=enabled)
1599  --disable-largefile     omit support for large files
1600  --enable-systemd        compile with systemd support (requires libsystemd,
1601                          pkg-config)
1602  --enable-alloc-checks   enable to memory allocation statistics, for debug
1603                          purposes
1604  --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1605                          purposes
1606  --enable-alloc-nonregional
1607                          enable nonregional allocs, slow but exposes regional
1608                          allocations to other memory purifiers, for debug
1609                          purposes
1610  --disable-swig-version-check
1611                          Disable swig version check to build python modules
1612                          with older swig even though that is unreliable
1613  --disable-sha1          Disable SHA1 RRSIG support, does not disable nsec3
1614                          support
1615  --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1616  --enable-subnet         Enable client subnet
1617  --disable-gost          Disable GOST support
1618  --disable-ecdsa         Disable ECDSA support
1619  --disable-dsa           Disable DSA support
1620  --disable-ed25519       Disable ED25519 support
1621  --disable-ed448         Disable ED448 support
1622  --enable-event-api      Enable (experimental) pluggable event base
1623                          libunbound API installed to unbound-event.h
1624  --enable-tfo-client     Enable TCP Fast Open for client mode
1625  --enable-tfo-server     Enable TCP Fast Open for server mode
1626  --enable-static-exe     enable to compile executables statically against
1627                          (event) uninstalled libs, for debug purposes
1628  --enable-fully-static   enable to compile fully static
1629  --enable-lock-checks    enable to check lock and unlock calls, for debug
1630                          purposes
1631  --enable-allsymbols     export all symbols from libunbound and link binaries
1632                          to it, smaller install size but libunbound export
1633                          table is polluted by internal symbols
1634  --enable-dnstap         Enable dnstap support (requires protobuf-c)
1635  --enable-dnscrypt       Enable dnscrypt support (requires libsodium)
1636  --enable-cachedb        enable cachedb module that can use external cache
1637                          storage
1638  --enable-ipsecmod       Enable ipsecmod module that facilitates
1639                          opportunistic IPsec
1640  --enable-ipset          enable ipset module
1641  --disable-explicit-port-randomisation
1642                          disable explicit source port randomisation and rely
1643                          on the kernel to provide random source ports
1644  --enable-linux-ip-local-port-range
1645                          Define this to enable use of
1646                          /proc/sys/net/ipv4/ip_local_port_range as a default
1647                          outgoing port range. This is only for the libunbound
1648                          on Linux and does not affect unbound resolving
1649                          daemon itself. This may severely limit the number of
1650                          available outgoing ports and thus decrease
1651                          randomness. Define this only when the target system
1652                          restricts (e.g. some of SELinux enabled
1653                          distributions) the use of non-ephemeral ports.
1654
1655Optional Packages:
1656  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1657  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1658  --with-conf-file=path   Pathname to the Unbound configuration file
1659  --with-run-dir=path     set default directory to chdir to (by default dir
1660                          part of cfg file)
1661  --with-chroot-dir=path  set default directory to chroot to (by default same
1662                          as run-dir)
1663  --with-share-dir=path   set default directory with shared data (by default
1664                          same as share/unbound)
1665  --with-pidfile=filename set default pathname to unbound pidfile (default
1666                          run-dir/unbound.pid)
1667  --with-rootkey-file=filename
1668                          set default pathname to root key file (default
1669                          run-dir/root.key). This file is read and written.
1670  --with-rootcert-file=filename
1671                          set default pathname to root update certificate file
1672                          (default run-dir/icannbundle.pem). This file need
1673                          not exist if you are content with the builtin.
1674  --with-username=user    set default user that unbound changes to (default
1675                          user is unbound)
1676  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1677                          both]
1678  --with-aix-soname=aix|svr4|both
1679                          shared library versioning (aka "SONAME") variant to
1680                          provide on AIX, [default=aix].
1681  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1682  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1683                          compiler's sysroot if not specified).
1684  --with-pthreads         use pthreads library, or --without-pthreads to
1685                          disable threading support.
1686  --with-solaris-threads  use solaris native thread library.
1687  --with-syslog-facility=LOCAL0 - LOCAL7
1688                          set SYSLOG_FACILITY, default DAEMON
1689  --with-dynlibmodule     build dynamic library module, or
1690                          --without-dynlibmodule to disable it. (default=no)
1691  --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1692                          (default=no)
1693  --with-pythonmodule     build Python module, or --without-pythonmodule to
1694                          disable script engine. (default=no)
1695  --with-nss=path         use libnss instead of openssl, installed at path.
1696  --with-nettle=path      use libnettle as crypto library, installed at path.
1697  --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1698                          /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1699                          /usr or specify like /usr/include/openssl11)
1700  --with-libbsd           Use portable libbsd functions
1701  --with-deprecate-rsa-1024
1702                          Deprecate RSA 1024 bit length, makes that an
1703                          unsupported key, for use when OpenSSL FIPS refuses
1704                          1024 bit verification
1705  --with-libevent=pathname
1706                          use libevent (will check /usr/local /opt/local
1707                          /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1708                          an explicit path). Slower, but allows use of large
1709                          outgoing port ranges.
1710  --with-libexpat=path    specify explicit path for libexpat.
1711  --with-libhiredis=path  specify explicit path for libhiredis.
1712  --with-libnghttp2=path  specify explicit path for libnghttp2.
1713  --with-libngtcp2=path   specify explicit path for libngtcp2, for QUIC.
1714  --with-dnstap-socket-path=pathname
1715                          set default dnstap socket path
1716  --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1717  --with-libsodium=path   Path where libsodium is installed, for dnscrypt
1718  --with-libmnl=path      specify explicit path for libmnl.
1719  --with-libunbound-only  do not build daemon and tool programs
1720
1721Some influential environment variables:
1722  CC          C compiler command
1723  CFLAGS      C compiler flags
1724  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1725              nonstandard directory <lib dir>
1726  LIBS        libraries to pass to the linker, e.g. -l<library>
1727  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1728              you have headers in a nonstandard directory <include dir>
1729  YACC        The `Yet Another Compiler Compiler' implementation to use.
1730              Defaults to the first program found out of: `bison -y', `byacc',
1731              `yacc'.
1732  YFLAGS      The list of arguments that will be passed by default to $YACC.
1733              This script will default YFLAGS to the empty string to avoid a
1734              default value of `-d' given by some make applications.
1735  LT_SYS_LIBRARY_PATH
1736              User-defined run-time library search path.
1737  PKG_CONFIG  path to pkg-config utility
1738  PKG_CONFIG_PATH
1739              directories to add to pkg-config's search path
1740  PKG_CONFIG_LIBDIR
1741              path overriding pkg-config's built-in search path
1742  CPP         C preprocessor
1743  SYSTEMD_CFLAGS
1744              C compiler flags for SYSTEMD, overriding pkg-config
1745  SYSTEMD_LIBS
1746              linker flags for SYSTEMD, overriding pkg-config
1747  SYSTEMD_DAEMON_CFLAGS
1748              C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1749  SYSTEMD_DAEMON_LIBS
1750              linker flags for SYSTEMD_DAEMON, overriding pkg-config
1751  PYTHON_VERSION
1752              The installed Python version to use, for example '2.3'. This
1753              string will be appended to the Python interpreter canonical
1754              name.
1755  PROTOBUFC_CFLAGS
1756              C compiler flags for PROTOBUFC, overriding pkg-config
1757  PROTOBUFC_LIBS
1758              linker flags for PROTOBUFC, overriding pkg-config
1759
1760Use these variables to override the choices made by `configure' or to help
1761it to find libraries and programs with nonstandard names/locations.
1762
1763Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
1764_ACEOF
1765ac_status=$?
1766fi
1767
1768if test "$ac_init_help" = "recursive"; then
1769  # If there are subdirs, report their specific --help.
1770  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1771    test -d "$ac_dir" ||
1772      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1773      continue
1774    ac_builddir=.
1775
1776case "$ac_dir" in
1777.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1778*)
1779  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1780  # A ".." for each directory in $ac_dir_suffix.
1781  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1782  case $ac_top_builddir_sub in
1783  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1784  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1785  esac ;;
1786esac
1787ac_abs_top_builddir=$ac_pwd
1788ac_abs_builddir=$ac_pwd$ac_dir_suffix
1789# for backward compatibility:
1790ac_top_builddir=$ac_top_build_prefix
1791
1792case $srcdir in
1793  .)  # We are building in place.
1794    ac_srcdir=.
1795    ac_top_srcdir=$ac_top_builddir_sub
1796    ac_abs_top_srcdir=$ac_pwd ;;
1797  [\\/]* | ?:[\\/]* )  # Absolute name.
1798    ac_srcdir=$srcdir$ac_dir_suffix;
1799    ac_top_srcdir=$srcdir
1800    ac_abs_top_srcdir=$srcdir ;;
1801  *) # Relative name.
1802    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1803    ac_top_srcdir=$ac_top_build_prefix$srcdir
1804    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1805esac
1806ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1807
1808    cd "$ac_dir" || { ac_status=$?; continue; }
1809    # Check for configure.gnu first; this name is used for a wrapper for
1810    # Metaconfig's "Configure" on case-insensitive file systems.
1811    if test -f "$ac_srcdir/configure.gnu"; then
1812      echo &&
1813      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1814    elif test -f "$ac_srcdir/configure"; then
1815      echo &&
1816      $SHELL "$ac_srcdir/configure" --help=recursive
1817    else
1818      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1819    fi || ac_status=$?
1820    cd "$ac_pwd" || { ac_status=$?; break; }
1821  done
1822fi
1823
1824test -n "$ac_init_help" && exit $ac_status
1825if $ac_init_version; then
1826  cat <<\_ACEOF
1827unbound configure 1.22.0
1828generated by GNU Autoconf 2.71
1829
1830Copyright (C) 2021 Free Software Foundation, Inc.
1831This configure script is free software; the Free Software Foundation
1832gives unlimited permission to copy, distribute and modify it.
1833_ACEOF
1834  exit
1835fi
1836
1837## ------------------------ ##
1838## Autoconf initialization. ##
1839## ------------------------ ##
1840
1841# ac_fn_c_try_compile LINENO
1842# --------------------------
1843# Try to compile conftest.$ac_ext, and return whether this succeeded.
1844ac_fn_c_try_compile ()
1845{
1846  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1847  rm -f conftest.$ac_objext conftest.beam
1848  if { { ac_try="$ac_compile"
1849case "(($ac_try" in
1850  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1851  *) ac_try_echo=$ac_try;;
1852esac
1853eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1854printf "%s\n" "$ac_try_echo"; } >&5
1855  (eval "$ac_compile") 2>conftest.err
1856  ac_status=$?
1857  if test -s conftest.err; then
1858    grep -v '^ *+' conftest.err >conftest.er1
1859    cat conftest.er1 >&5
1860    mv -f conftest.er1 conftest.err
1861  fi
1862  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1863  test $ac_status = 0; } && {
1864	 test -z "$ac_c_werror_flag" ||
1865	 test ! -s conftest.err
1866       } && test -s conftest.$ac_objext
1867then :
1868  ac_retval=0
1869else $as_nop
1870  printf "%s\n" "$as_me: failed program was:" >&5
1871sed 's/^/| /' conftest.$ac_ext >&5
1872
1873	ac_retval=1
1874fi
1875  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1876  as_fn_set_status $ac_retval
1877
1878} # ac_fn_c_try_compile
1879
1880# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1881# -------------------------------------------------------
1882# Tests whether HEADER exists and can be compiled using the include files in
1883# INCLUDES, setting the cache variable VAR accordingly.
1884ac_fn_c_check_header_compile ()
1885{
1886  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1887  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1888printf %s "checking for $2... " >&6; }
1889if eval test \${$3+y}
1890then :
1891  printf %s "(cached) " >&6
1892else $as_nop
1893  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1894/* end confdefs.h.  */
1895$4
1896#include <$2>
1897_ACEOF
1898if ac_fn_c_try_compile "$LINENO"
1899then :
1900  eval "$3=yes"
1901else $as_nop
1902  eval "$3=no"
1903fi
1904rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1905fi
1906eval ac_res=\$$3
1907	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1908printf "%s\n" "$ac_res" >&6; }
1909  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1910
1911} # ac_fn_c_check_header_compile
1912
1913# ac_fn_c_try_link LINENO
1914# -----------------------
1915# Try to link conftest.$ac_ext, and return whether this succeeded.
1916ac_fn_c_try_link ()
1917{
1918  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1920  if { { ac_try="$ac_link"
1921case "(($ac_try" in
1922  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1923  *) ac_try_echo=$ac_try;;
1924esac
1925eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1926printf "%s\n" "$ac_try_echo"; } >&5
1927  (eval "$ac_link") 2>conftest.err
1928  ac_status=$?
1929  if test -s conftest.err; then
1930    grep -v '^ *+' conftest.err >conftest.er1
1931    cat conftest.er1 >&5
1932    mv -f conftest.er1 conftest.err
1933  fi
1934  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1935  test $ac_status = 0; } && {
1936	 test -z "$ac_c_werror_flag" ||
1937	 test ! -s conftest.err
1938       } && test -s conftest$ac_exeext && {
1939	 test "$cross_compiling" = yes ||
1940	 test -x conftest$ac_exeext
1941       }
1942then :
1943  ac_retval=0
1944else $as_nop
1945  printf "%s\n" "$as_me: failed program was:" >&5
1946sed 's/^/| /' conftest.$ac_ext >&5
1947
1948	ac_retval=1
1949fi
1950  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1951  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1952  # interfere with the next link command; also delete a directory that is
1953  # left behind by Apple's compiler.  We do this before executing the actions.
1954  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1955  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1956  as_fn_set_status $ac_retval
1957
1958} # ac_fn_c_try_link
1959
1960# ac_fn_c_check_func LINENO FUNC VAR
1961# ----------------------------------
1962# Tests whether FUNC exists, setting the cache variable VAR accordingly
1963ac_fn_c_check_func ()
1964{
1965  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1966  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1967printf %s "checking for $2... " >&6; }
1968if eval test \${$3+y}
1969then :
1970  printf %s "(cached) " >&6
1971else $as_nop
1972  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1973/* end confdefs.h.  */
1974/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1975   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1976#define $2 innocuous_$2
1977
1978/* System header to define __stub macros and hopefully few prototypes,
1979   which can conflict with char $2 (); below.  */
1980
1981#include <limits.h>
1982#undef $2
1983
1984/* Override any GCC internal prototype to avoid an error.
1985   Use char because int might match the return type of a GCC
1986   builtin and then its argument prototype would still apply.  */
1987#ifdef __cplusplus
1988extern "C"
1989#endif
1990char $2 ();
1991/* The GNU C library defines this for functions which it implements
1992    to always fail with ENOSYS.  Some functions are actually named
1993    something starting with __ and the normal name is an alias.  */
1994#if defined __stub_$2 || defined __stub___$2
1995choke me
1996#endif
1997
1998int
1999main (void)
2000{
2001return $2 ();
2002  ;
2003  return 0;
2004}
2005_ACEOF
2006if ac_fn_c_try_link "$LINENO"
2007then :
2008  eval "$3=yes"
2009else $as_nop
2010  eval "$3=no"
2011fi
2012rm -f core conftest.err conftest.$ac_objext conftest.beam \
2013    conftest$ac_exeext conftest.$ac_ext
2014fi
2015eval ac_res=\$$3
2016	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2017printf "%s\n" "$ac_res" >&6; }
2018  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2019
2020} # ac_fn_c_check_func
2021
2022# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2023# -------------------------------------------
2024# Tests whether TYPE exists after having included INCLUDES, setting cache
2025# variable VAR accordingly.
2026ac_fn_c_check_type ()
2027{
2028  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2029  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2030printf %s "checking for $2... " >&6; }
2031if eval test \${$3+y}
2032then :
2033  printf %s "(cached) " >&6
2034else $as_nop
2035  eval "$3=no"
2036  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2037/* end confdefs.h.  */
2038$4
2039int
2040main (void)
2041{
2042if (sizeof ($2))
2043	 return 0;
2044  ;
2045  return 0;
2046}
2047_ACEOF
2048if ac_fn_c_try_compile "$LINENO"
2049then :
2050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h.  */
2052$4
2053int
2054main (void)
2055{
2056if (sizeof (($2)))
2057	    return 0;
2058  ;
2059  return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"
2063then :
2064
2065else $as_nop
2066  eval "$3=yes"
2067fi
2068rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2069fi
2070rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2071fi
2072eval ac_res=\$$3
2073	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2074printf "%s\n" "$ac_res" >&6; }
2075  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2076
2077} # ac_fn_c_check_type
2078
2079# ac_fn_c_try_cpp LINENO
2080# ----------------------
2081# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2082ac_fn_c_try_cpp ()
2083{
2084  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2085  if { { ac_try="$ac_cpp conftest.$ac_ext"
2086case "(($ac_try" in
2087  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2088  *) ac_try_echo=$ac_try;;
2089esac
2090eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2091printf "%s\n" "$ac_try_echo"; } >&5
2092  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2093  ac_status=$?
2094  if test -s conftest.err; then
2095    grep -v '^ *+' conftest.err >conftest.er1
2096    cat conftest.er1 >&5
2097    mv -f conftest.er1 conftest.err
2098  fi
2099  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2100  test $ac_status = 0; } > conftest.i && {
2101	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2102	 test ! -s conftest.err
2103       }
2104then :
2105  ac_retval=0
2106else $as_nop
2107  printf "%s\n" "$as_me: failed program was:" >&5
2108sed 's/^/| /' conftest.$ac_ext >&5
2109
2110    ac_retval=1
2111fi
2112  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2113  as_fn_set_status $ac_retval
2114
2115} # ac_fn_c_try_cpp
2116
2117# ac_fn_c_try_run LINENO
2118# ----------------------
2119# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2120# executables *can* be run.
2121ac_fn_c_try_run ()
2122{
2123  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2124  if { { ac_try="$ac_link"
2125case "(($ac_try" in
2126  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2127  *) ac_try_echo=$ac_try;;
2128esac
2129eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2130printf "%s\n" "$ac_try_echo"; } >&5
2131  (eval "$ac_link") 2>&5
2132  ac_status=$?
2133  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2134  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2135  { { case "(($ac_try" in
2136  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2137  *) ac_try_echo=$ac_try;;
2138esac
2139eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2140printf "%s\n" "$ac_try_echo"; } >&5
2141  (eval "$ac_try") 2>&5
2142  ac_status=$?
2143  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2144  test $ac_status = 0; }; }
2145then :
2146  ac_retval=0
2147else $as_nop
2148  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2149       printf "%s\n" "$as_me: failed program was:" >&5
2150sed 's/^/| /' conftest.$ac_ext >&5
2151
2152       ac_retval=$ac_status
2153fi
2154  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2155  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2156  as_fn_set_status $ac_retval
2157
2158} # ac_fn_c_try_run
2159
2160# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2161# --------------------------------------------
2162# Tries to find the compile-time value of EXPR in a program that includes
2163# INCLUDES, setting VAR accordingly. Returns whether the value could be
2164# computed
2165ac_fn_c_compute_int ()
2166{
2167  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2168  if test "$cross_compiling" = yes; then
2169    # Depending upon the size, compute the lo and hi bounds.
2170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171/* end confdefs.h.  */
2172$4
2173int
2174main (void)
2175{
2176static int test_array [1 - 2 * !(($2) >= 0)];
2177test_array [0] = 0;
2178return test_array [0];
2179
2180  ;
2181  return 0;
2182}
2183_ACEOF
2184if ac_fn_c_try_compile "$LINENO"
2185then :
2186  ac_lo=0 ac_mid=0
2187  while :; do
2188    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189/* end confdefs.h.  */
2190$4
2191int
2192main (void)
2193{
2194static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2195test_array [0] = 0;
2196return test_array [0];
2197
2198  ;
2199  return 0;
2200}
2201_ACEOF
2202if ac_fn_c_try_compile "$LINENO"
2203then :
2204  ac_hi=$ac_mid; break
2205else $as_nop
2206  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2207			if test $ac_lo -le $ac_mid; then
2208			  ac_lo= ac_hi=
2209			  break
2210			fi
2211			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2212fi
2213rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2214  done
2215else $as_nop
2216  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2217/* end confdefs.h.  */
2218$4
2219int
2220main (void)
2221{
2222static int test_array [1 - 2 * !(($2) < 0)];
2223test_array [0] = 0;
2224return test_array [0];
2225
2226  ;
2227  return 0;
2228}
2229_ACEOF
2230if ac_fn_c_try_compile "$LINENO"
2231then :
2232  ac_hi=-1 ac_mid=-1
2233  while :; do
2234    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2235/* end confdefs.h.  */
2236$4
2237int
2238main (void)
2239{
2240static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2241test_array [0] = 0;
2242return test_array [0];
2243
2244  ;
2245  return 0;
2246}
2247_ACEOF
2248if ac_fn_c_try_compile "$LINENO"
2249then :
2250  ac_lo=$ac_mid; break
2251else $as_nop
2252  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2253			if test $ac_mid -le $ac_hi; then
2254			  ac_lo= ac_hi=
2255			  break
2256			fi
2257			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2258fi
2259rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2260  done
2261else $as_nop
2262  ac_lo= ac_hi=
2263fi
2264rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2265fi
2266rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2267# Binary search between lo and hi bounds.
2268while test "x$ac_lo" != "x$ac_hi"; do
2269  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2270  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2271/* end confdefs.h.  */
2272$4
2273int
2274main (void)
2275{
2276static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2277test_array [0] = 0;
2278return test_array [0];
2279
2280  ;
2281  return 0;
2282}
2283_ACEOF
2284if ac_fn_c_try_compile "$LINENO"
2285then :
2286  ac_hi=$ac_mid
2287else $as_nop
2288  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2289fi
2290rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2291done
2292case $ac_lo in #((
2293?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2294'') ac_retval=1 ;;
2295esac
2296  else
2297    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2298/* end confdefs.h.  */
2299$4
2300static long int longval (void) { return $2; }
2301static unsigned long int ulongval (void) { return $2; }
2302#include <stdio.h>
2303#include <stdlib.h>
2304int
2305main (void)
2306{
2307
2308  FILE *f = fopen ("conftest.val", "w");
2309  if (! f)
2310    return 1;
2311  if (($2) < 0)
2312    {
2313      long int i = longval ();
2314      if (i != ($2))
2315	return 1;
2316      fprintf (f, "%ld", i);
2317    }
2318  else
2319    {
2320      unsigned long int i = ulongval ();
2321      if (i != ($2))
2322	return 1;
2323      fprintf (f, "%lu", i);
2324    }
2325  /* Do not output a trailing newline, as this causes \r\n confusion
2326     on some platforms.  */
2327  return ferror (f) || fclose (f) != 0;
2328
2329  ;
2330  return 0;
2331}
2332_ACEOF
2333if ac_fn_c_try_run "$LINENO"
2334then :
2335  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2336else $as_nop
2337  ac_retval=1
2338fi
2339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2340  conftest.$ac_objext conftest.beam conftest.$ac_ext
2341rm -f conftest.val
2342
2343  fi
2344  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2345  as_fn_set_status $ac_retval
2346
2347} # ac_fn_c_compute_int
2348
2349# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2350# ------------------------------------------------------------------
2351# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2352# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2353ac_fn_check_decl ()
2354{
2355  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2356  as_decl_name=`echo $2|sed 's/ *(.*//'`
2357  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2358printf %s "checking whether $as_decl_name is declared... " >&6; }
2359if eval test \${$3+y}
2360then :
2361  printf %s "(cached) " >&6
2362else $as_nop
2363  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2364  eval ac_save_FLAGS=\$$6
2365  as_fn_append $6 " $5"
2366  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2367/* end confdefs.h.  */
2368$4
2369int
2370main (void)
2371{
2372#ifndef $as_decl_name
2373#ifdef __cplusplus
2374  (void) $as_decl_use;
2375#else
2376  (void) $as_decl_name;
2377#endif
2378#endif
2379
2380  ;
2381  return 0;
2382}
2383_ACEOF
2384if ac_fn_c_try_compile "$LINENO"
2385then :
2386  eval "$3=yes"
2387else $as_nop
2388  eval "$3=no"
2389fi
2390rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2391  eval $6=\$ac_save_FLAGS
2392
2393fi
2394eval ac_res=\$$3
2395	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2396printf "%s\n" "$ac_res" >&6; }
2397  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2398
2399} # ac_fn_check_decl
2400
2401# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2402# ----------------------------------------------------
2403# Tries to find if the field MEMBER exists in type AGGR, after including
2404# INCLUDES, setting cache variable VAR accordingly.
2405ac_fn_c_check_member ()
2406{
2407  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2408  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2409printf %s "checking for $2.$3... " >&6; }
2410if eval test \${$4+y}
2411then :
2412  printf %s "(cached) " >&6
2413else $as_nop
2414  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2415/* end confdefs.h.  */
2416$5
2417int
2418main (void)
2419{
2420static $2 ac_aggr;
2421if (ac_aggr.$3)
2422return 0;
2423  ;
2424  return 0;
2425}
2426_ACEOF
2427if ac_fn_c_try_compile "$LINENO"
2428then :
2429  eval "$4=yes"
2430else $as_nop
2431  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2432/* end confdefs.h.  */
2433$5
2434int
2435main (void)
2436{
2437static $2 ac_aggr;
2438if (sizeof ac_aggr.$3)
2439return 0;
2440  ;
2441  return 0;
2442}
2443_ACEOF
2444if ac_fn_c_try_compile "$LINENO"
2445then :
2446  eval "$4=yes"
2447else $as_nop
2448  eval "$4=no"
2449fi
2450rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2451fi
2452rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2453fi
2454eval ac_res=\$$4
2455	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2456printf "%s\n" "$ac_res" >&6; }
2457  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2458
2459} # ac_fn_c_check_member
2460ac_configure_args_raw=
2461for ac_arg
2462do
2463  case $ac_arg in
2464  *\'*)
2465    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2466  esac
2467  as_fn_append ac_configure_args_raw " '$ac_arg'"
2468done
2469
2470case $ac_configure_args_raw in
2471  *$as_nl*)
2472    ac_safe_unquote= ;;
2473  *)
2474    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
2475    ac_unsafe_a="$ac_unsafe_z#~"
2476    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2477    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2478esac
2479
2480cat >config.log <<_ACEOF
2481This file contains any messages produced by compilers while
2482running configure, to aid debugging if configure makes a mistake.
2483
2484It was created by unbound $as_me 1.22.0, which was
2485generated by GNU Autoconf 2.71.  Invocation command line was
2486
2487  $ $0$ac_configure_args_raw
2488
2489_ACEOF
2490exec 5>>config.log
2491{
2492cat <<_ASUNAME
2493## --------- ##
2494## Platform. ##
2495## --------- ##
2496
2497hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2498uname -m = `(uname -m) 2>/dev/null || echo unknown`
2499uname -r = `(uname -r) 2>/dev/null || echo unknown`
2500uname -s = `(uname -s) 2>/dev/null || echo unknown`
2501uname -v = `(uname -v) 2>/dev/null || echo unknown`
2502
2503/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2504/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2505
2506/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2507/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2508/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2509/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2510/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2511/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2512/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2513
2514_ASUNAME
2515
2516as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2517for as_dir in $PATH
2518do
2519  IFS=$as_save_IFS
2520  case $as_dir in #(((
2521    '') as_dir=./ ;;
2522    */) ;;
2523    *) as_dir=$as_dir/ ;;
2524  esac
2525    printf "%s\n" "PATH: $as_dir"
2526  done
2527IFS=$as_save_IFS
2528
2529} >&5
2530
2531cat >&5 <<_ACEOF
2532
2533
2534## ----------- ##
2535## Core tests. ##
2536## ----------- ##
2537
2538_ACEOF
2539
2540
2541# Keep a trace of the command line.
2542# Strip out --no-create and --no-recursion so they do not pile up.
2543# Strip out --silent because we don't want to record it for future runs.
2544# Also quote any args containing shell meta-characters.
2545# Make two passes to allow for proper duplicate-argument suppression.
2546ac_configure_args=
2547ac_configure_args0=
2548ac_configure_args1=
2549ac_must_keep_next=false
2550for ac_pass in 1 2
2551do
2552  for ac_arg
2553  do
2554    case $ac_arg in
2555    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2556    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2557    | -silent | --silent | --silen | --sile | --sil)
2558      continue ;;
2559    *\'*)
2560      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2561    esac
2562    case $ac_pass in
2563    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2564    2)
2565      as_fn_append ac_configure_args1 " '$ac_arg'"
2566      if test $ac_must_keep_next = true; then
2567	ac_must_keep_next=false # Got value, back to normal.
2568      else
2569	case $ac_arg in
2570	  *=* | --config-cache | -C | -disable-* | --disable-* \
2571	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2572	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2573	  | -with-* | --with-* | -without-* | --without-* | --x)
2574	    case "$ac_configure_args0 " in
2575	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2576	    esac
2577	    ;;
2578	  -* ) ac_must_keep_next=true ;;
2579	esac
2580      fi
2581      as_fn_append ac_configure_args " '$ac_arg'"
2582      ;;
2583    esac
2584  done
2585done
2586{ ac_configure_args0=; unset ac_configure_args0;}
2587{ ac_configure_args1=; unset ac_configure_args1;}
2588
2589# When interrupted or exit'd, cleanup temporary files, and complete
2590# config.log.  We remove comments because anyway the quotes in there
2591# would cause problems or look ugly.
2592# WARNING: Use '\'' to represent an apostrophe within the trap.
2593# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2594trap 'exit_status=$?
2595  # Sanitize IFS.
2596  IFS=" ""	$as_nl"
2597  # Save into config.log some information that might help in debugging.
2598  {
2599    echo
2600
2601    printf "%s\n" "## ---------------- ##
2602## Cache variables. ##
2603## ---------------- ##"
2604    echo
2605    # The following way of writing the cache mishandles newlines in values,
2606(
2607  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2608    eval ac_val=\$$ac_var
2609    case $ac_val in #(
2610    *${as_nl}*)
2611      case $ac_var in #(
2612      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2613printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2614      esac
2615      case $ac_var in #(
2616      _ | IFS | as_nl) ;; #(
2617      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2618      *) { eval $ac_var=; unset $ac_var;} ;;
2619      esac ;;
2620    esac
2621  done
2622  (set) 2>&1 |
2623    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2624    *${as_nl}ac_space=\ *)
2625      sed -n \
2626	"s/'\''/'\''\\\\'\'''\''/g;
2627	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2628      ;; #(
2629    *)
2630      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2631      ;;
2632    esac |
2633    sort
2634)
2635    echo
2636
2637    printf "%s\n" "## ----------------- ##
2638## Output variables. ##
2639## ----------------- ##"
2640    echo
2641    for ac_var in $ac_subst_vars
2642    do
2643      eval ac_val=\$$ac_var
2644      case $ac_val in
2645      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2646      esac
2647      printf "%s\n" "$ac_var='\''$ac_val'\''"
2648    done | sort
2649    echo
2650
2651    if test -n "$ac_subst_files"; then
2652      printf "%s\n" "## ------------------- ##
2653## File substitutions. ##
2654## ------------------- ##"
2655      echo
2656      for ac_var in $ac_subst_files
2657      do
2658	eval ac_val=\$$ac_var
2659	case $ac_val in
2660	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2661	esac
2662	printf "%s\n" "$ac_var='\''$ac_val'\''"
2663      done | sort
2664      echo
2665    fi
2666
2667    if test -s confdefs.h; then
2668      printf "%s\n" "## ----------- ##
2669## confdefs.h. ##
2670## ----------- ##"
2671      echo
2672      cat confdefs.h
2673      echo
2674    fi
2675    test "$ac_signal" != 0 &&
2676      printf "%s\n" "$as_me: caught signal $ac_signal"
2677    printf "%s\n" "$as_me: exit $exit_status"
2678  } >&5
2679  rm -f core *.core core.conftest.* &&
2680    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2681    exit $exit_status
2682' 0
2683for ac_signal in 1 2 13 15; do
2684  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2685done
2686ac_signal=0
2687
2688# confdefs.h avoids OS command line length limits that DEFS can exceed.
2689rm -f -r conftest* confdefs.h
2690
2691printf "%s\n" "/* confdefs.h */" > confdefs.h
2692
2693# Predefined preprocessor variables.
2694
2695printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2696
2697printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2698
2699printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2700
2701printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2702
2703printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2704
2705printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2706
2707
2708# Let the site file select an alternate cache file if it wants to.
2709# Prefer an explicitly selected file to automatically selected ones.
2710if test -n "$CONFIG_SITE"; then
2711  ac_site_files="$CONFIG_SITE"
2712elif test "x$prefix" != xNONE; then
2713  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2714else
2715  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2716fi
2717
2718for ac_site_file in $ac_site_files
2719do
2720  case $ac_site_file in #(
2721  */*) :
2722     ;; #(
2723  *) :
2724    ac_site_file=./$ac_site_file ;;
2725esac
2726  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2727    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2728printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2729    sed 's/^/| /' "$ac_site_file" >&5
2730    . "$ac_site_file" \
2731      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2732printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2733as_fn_error $? "failed to load site script $ac_site_file
2734See \`config.log' for more details" "$LINENO" 5; }
2735  fi
2736done
2737
2738if test -r "$cache_file"; then
2739  # Some versions of bash will fail to source /dev/null (special files
2740  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2741  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2742    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2743printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2744    case $cache_file in
2745      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2746      *)                      . "./$cache_file";;
2747    esac
2748  fi
2749else
2750  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2751printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2752  >$cache_file
2753fi
2754
2755as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2756# Test code for whether the C compiler supports C89 (global declarations)
2757ac_c_conftest_c89_globals='
2758/* Does the compiler advertise C89 conformance?
2759   Do not test the value of __STDC__, because some compilers set it to 0
2760   while being otherwise adequately conformant. */
2761#if !defined __STDC__
2762# error "Compiler does not advertise C89 conformance"
2763#endif
2764
2765#include <stddef.h>
2766#include <stdarg.h>
2767struct stat;
2768/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
2769struct buf { int x; };
2770struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2771static char *e (p, i)
2772     char **p;
2773     int i;
2774{
2775  return p[i];
2776}
2777static char *f (char * (*g) (char **, int), char **p, ...)
2778{
2779  char *s;
2780  va_list v;
2781  va_start (v,p);
2782  s = g (p, va_arg (v,int));
2783  va_end (v);
2784  return s;
2785}
2786
2787/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2788   function prototypes and stuff, but not \xHH hex character constants.
2789   These do not provoke an error unfortunately, instead are silently treated
2790   as an "x".  The following induces an error, until -std is added to get
2791   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
2792   array size at least.  It is necessary to write \x00 == 0 to get something
2793   that is true only with -std.  */
2794int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2795
2796/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2797   inside strings and character constants.  */
2798#define FOO(x) '\''x'\''
2799int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2800
2801int test (int i, double x);
2802struct s1 {int (*f) (int a);};
2803struct s2 {int (*f) (double a);};
2804int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2805               int, int);'
2806
2807# Test code for whether the C compiler supports C89 (body of main).
2808ac_c_conftest_c89_main='
2809ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2810'
2811
2812# Test code for whether the C compiler supports C99 (global declarations)
2813ac_c_conftest_c99_globals='
2814// Does the compiler advertise C99 conformance?
2815#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2816# error "Compiler does not advertise C99 conformance"
2817#endif
2818
2819#include <stdbool.h>
2820extern int puts (const char *);
2821extern int printf (const char *, ...);
2822extern int dprintf (int, const char *, ...);
2823extern void *malloc (size_t);
2824
2825// Check varargs macros.  These examples are taken from C99 6.10.3.5.
2826// dprintf is used instead of fprintf to avoid needing to declare
2827// FILE and stderr.
2828#define debug(...) dprintf (2, __VA_ARGS__)
2829#define showlist(...) puts (#__VA_ARGS__)
2830#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2831static void
2832test_varargs_macros (void)
2833{
2834  int x = 1234;
2835  int y = 5678;
2836  debug ("Flag");
2837  debug ("X = %d\n", x);
2838  showlist (The first, second, and third items.);
2839  report (x>y, "x is %d but y is %d", x, y);
2840}
2841
2842// Check long long types.
2843#define BIG64 18446744073709551615ull
2844#define BIG32 4294967295ul
2845#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2846#if !BIG_OK
2847  #error "your preprocessor is broken"
2848#endif
2849#if BIG_OK
2850#else
2851  #error "your preprocessor is broken"
2852#endif
2853static long long int bignum = -9223372036854775807LL;
2854static unsigned long long int ubignum = BIG64;
2855
2856struct incomplete_array
2857{
2858  int datasize;
2859  double data[];
2860};
2861
2862struct named_init {
2863  int number;
2864  const wchar_t *name;
2865  double average;
2866};
2867
2868typedef const char *ccp;
2869
2870static inline int
2871test_restrict (ccp restrict text)
2872{
2873  // See if C++-style comments work.
2874  // Iterate through items via the restricted pointer.
2875  // Also check for declarations in for loops.
2876  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2877    continue;
2878  return 0;
2879}
2880
2881// Check varargs and va_copy.
2882static bool
2883test_varargs (const char *format, ...)
2884{
2885  va_list args;
2886  va_start (args, format);
2887  va_list args_copy;
2888  va_copy (args_copy, args);
2889
2890  const char *str = "";
2891  int number = 0;
2892  float fnumber = 0;
2893
2894  while (*format)
2895    {
2896      switch (*format++)
2897	{
2898	case '\''s'\'': // string
2899	  str = va_arg (args_copy, const char *);
2900	  break;
2901	case '\''d'\'': // int
2902	  number = va_arg (args_copy, int);
2903	  break;
2904	case '\''f'\'': // float
2905	  fnumber = va_arg (args_copy, double);
2906	  break;
2907	default:
2908	  break;
2909	}
2910    }
2911  va_end (args_copy);
2912  va_end (args);
2913
2914  return *str && number && fnumber;
2915}
2916'
2917
2918# Test code for whether the C compiler supports C99 (body of main).
2919ac_c_conftest_c99_main='
2920  // Check bool.
2921  _Bool success = false;
2922  success |= (argc != 0);
2923
2924  // Check restrict.
2925  if (test_restrict ("String literal") == 0)
2926    success = true;
2927  char *restrict newvar = "Another string";
2928
2929  // Check varargs.
2930  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2931  test_varargs_macros ();
2932
2933  // Check flexible array members.
2934  struct incomplete_array *ia =
2935    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2936  ia->datasize = 10;
2937  for (int i = 0; i < ia->datasize; ++i)
2938    ia->data[i] = i * 1.234;
2939
2940  // Check named initializers.
2941  struct named_init ni = {
2942    .number = 34,
2943    .name = L"Test wide string",
2944    .average = 543.34343,
2945  };
2946
2947  ni.number = 58;
2948
2949  int dynamic_array[ni.number];
2950  dynamic_array[0] = argv[0][0];
2951  dynamic_array[ni.number - 1] = 543;
2952
2953  // work around unused variable warnings
2954  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2955	 || dynamic_array[ni.number - 1] != 543);
2956'
2957
2958# Test code for whether the C compiler supports C11 (global declarations)
2959ac_c_conftest_c11_globals='
2960// Does the compiler advertise C11 conformance?
2961#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2962# error "Compiler does not advertise C11 conformance"
2963#endif
2964
2965// Check _Alignas.
2966char _Alignas (double) aligned_as_double;
2967char _Alignas (0) no_special_alignment;
2968extern char aligned_as_int;
2969char _Alignas (0) _Alignas (int) aligned_as_int;
2970
2971// Check _Alignof.
2972enum
2973{
2974  int_alignment = _Alignof (int),
2975  int_array_alignment = _Alignof (int[100]),
2976  char_alignment = _Alignof (char)
2977};
2978_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2979
2980// Check _Noreturn.
2981int _Noreturn does_not_return (void) { for (;;) continue; }
2982
2983// Check _Static_assert.
2984struct test_static_assert
2985{
2986  int x;
2987  _Static_assert (sizeof (int) <= sizeof (long int),
2988                  "_Static_assert does not work in struct");
2989  long int y;
2990};
2991
2992// Check UTF-8 literals.
2993#define u8 syntax error!
2994char const utf8_literal[] = u8"happens to be ASCII" "another string";
2995
2996// Check duplicate typedefs.
2997typedef long *long_ptr;
2998typedef long int *long_ptr;
2999typedef long_ptr long_ptr;
3000
3001// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
3002struct anonymous
3003{
3004  union {
3005    struct { int i; int j; };
3006    struct { int k; long int l; } w;
3007  };
3008  int m;
3009} v1;
3010'
3011
3012# Test code for whether the C compiler supports C11 (body of main).
3013ac_c_conftest_c11_main='
3014  _Static_assert ((offsetof (struct anonymous, i)
3015		   == offsetof (struct anonymous, w.k)),
3016		  "Anonymous union alignment botch");
3017  v1.i = 2;
3018  v1.w.k = 5;
3019  ok |= v1.i != 5;
3020'
3021
3022# Test code for whether the C compiler supports C11 (complete).
3023ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
3024${ac_c_conftest_c99_globals}
3025${ac_c_conftest_c11_globals}
3026
3027int
3028main (int argc, char **argv)
3029{
3030  int ok = 0;
3031  ${ac_c_conftest_c89_main}
3032  ${ac_c_conftest_c99_main}
3033  ${ac_c_conftest_c11_main}
3034  return ok;
3035}
3036"
3037
3038# Test code for whether the C compiler supports C99 (complete).
3039ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
3040${ac_c_conftest_c99_globals}
3041
3042int
3043main (int argc, char **argv)
3044{
3045  int ok = 0;
3046  ${ac_c_conftest_c89_main}
3047  ${ac_c_conftest_c99_main}
3048  return ok;
3049}
3050"
3051
3052# Test code for whether the C compiler supports C89 (complete).
3053ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
3054
3055int
3056main (int argc, char **argv)
3057{
3058  int ok = 0;
3059  ${ac_c_conftest_c89_main}
3060  return ok;
3061}
3062"
3063
3064as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
3065as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
3066as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3067as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3068as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3069as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3070as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3071as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3072as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
3073as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
3074as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
3075as_fn_append ac_func_c_list " fork HAVE_FORK"
3076as_fn_append ac_func_c_list " vfork HAVE_VFORK"
3077
3078# Auxiliary files required by this configure script.
3079ac_aux_files="ltmain.sh config.guess config.sub"
3080
3081# Locations in which to look for auxiliary files.
3082ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
3083
3084# Search for a directory containing all of the required auxiliary files,
3085# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
3086# If we don't find one directory that contains all the files we need,
3087# we report the set of missing files from the *first* directory in
3088# $ac_aux_dir_candidates and give up.
3089ac_missing_aux_files=""
3090ac_first_candidate=:
3091printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
3092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3093as_found=false
3094for as_dir in $ac_aux_dir_candidates
3095do
3096  IFS=$as_save_IFS
3097  case $as_dir in #(((
3098    '') as_dir=./ ;;
3099    */) ;;
3100    *) as_dir=$as_dir/ ;;
3101  esac
3102  as_found=:
3103
3104  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
3105  ac_aux_dir_found=yes
3106  ac_install_sh=
3107  for ac_aux in $ac_aux_files
3108  do
3109    # As a special case, if "install-sh" is required, that requirement
3110    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
3111    # and $ac_install_sh is set appropriately for whichever one is found.
3112    if test x"$ac_aux" = x"install-sh"
3113    then
3114      if test -f "${as_dir}install-sh"; then
3115        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
3116        ac_install_sh="${as_dir}install-sh -c"
3117      elif test -f "${as_dir}install.sh"; then
3118        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
3119        ac_install_sh="${as_dir}install.sh -c"
3120      elif test -f "${as_dir}shtool"; then
3121        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
3122        ac_install_sh="${as_dir}shtool install -c"
3123      else
3124        ac_aux_dir_found=no
3125        if $ac_first_candidate; then
3126          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
3127        else
3128          break
3129        fi
3130      fi
3131    else
3132      if test -f "${as_dir}${ac_aux}"; then
3133        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
3134      else
3135        ac_aux_dir_found=no
3136        if $ac_first_candidate; then
3137          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
3138        else
3139          break
3140        fi
3141      fi
3142    fi
3143  done
3144  if test "$ac_aux_dir_found" = yes; then
3145    ac_aux_dir="$as_dir"
3146    break
3147  fi
3148  ac_first_candidate=false
3149
3150  as_found=false
3151done
3152IFS=$as_save_IFS
3153if $as_found
3154then :
3155
3156else $as_nop
3157  as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
3158fi
3159
3160
3161# These three variables are undocumented and unsupported,
3162# and are intended to be withdrawn in a future Autoconf release.
3163# They can cause serious problems if a builder's source tree is in a directory
3164# whose full name contains unusual characters.
3165if test -f "${ac_aux_dir}config.guess"; then
3166  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
3167fi
3168if test -f "${ac_aux_dir}config.sub"; then
3169  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
3170fi
3171if test -f "$ac_aux_dir/configure"; then
3172  ac_configure="$SHELL ${ac_aux_dir}configure"
3173fi
3174
3175# Check that the precious variables saved in the cache have kept the same
3176# value.
3177ac_cache_corrupted=false
3178for ac_var in $ac_precious_vars; do
3179  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3180  eval ac_new_set=\$ac_env_${ac_var}_set
3181  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3182  eval ac_new_val=\$ac_env_${ac_var}_value
3183  case $ac_old_set,$ac_new_set in
3184    set,)
3185      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3186printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3187      ac_cache_corrupted=: ;;
3188    ,set)
3189      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3190printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3191      ac_cache_corrupted=: ;;
3192    ,);;
3193    *)
3194      if test "x$ac_old_val" != "x$ac_new_val"; then
3195	# differences in whitespace do not lead to failure.
3196	ac_old_val_w=`echo x $ac_old_val`
3197	ac_new_val_w=`echo x $ac_new_val`
3198	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3199	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3200printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3201	  ac_cache_corrupted=:
3202	else
3203	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3204printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3205	  eval $ac_var=\$ac_old_val
3206	fi
3207	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3208printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
3209	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3210printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
3211      fi;;
3212  esac
3213  # Pass precious variables to config.status.
3214  if test "$ac_new_set" = set; then
3215    case $ac_new_val in
3216    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3217    *) ac_arg=$ac_var=$ac_new_val ;;
3218    esac
3219    case " $ac_configure_args " in
3220      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3221      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3222    esac
3223  fi
3224done
3225if $ac_cache_corrupted; then
3226  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3227printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3228  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3229printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3230  as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
3231	    and start over" "$LINENO" 5
3232fi
3233## -------------------- ##
3234## Main body of script. ##
3235## -------------------- ##
3236
3237ac_ext=c
3238ac_cpp='$CPP $CPPFLAGS'
3239ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3240ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3241ac_compiler_gnu=$ac_cv_c_compiler_gnu
3242
3243
3244UNBOUND_VERSION_MAJOR=1
3245
3246UNBOUND_VERSION_MINOR=22
3247
3248UNBOUND_VERSION_MICRO=0
3249
3250
3251LIBUNBOUND_CURRENT=9
3252LIBUNBOUND_REVISION=30
3253LIBUNBOUND_AGE=1
3254# 1.0.0 had 0:12:0
3255# 1.0.1 had 0:13:0
3256# 1.0.2 had 0:14:0
3257# 1.1.0 had 0:15:0
3258# 1.1.1 had 0:16:0
3259# 1.2.0 had 0:17:0
3260# 1.2.1 had 0:18:0
3261# 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
3262# 1.3.1 had 1:1:0
3263# 1.3.2 had 1:2:0
3264# 1.3.3 had 1:3:0
3265# 1.3.4 had 1:4:0
3266# 1.4.0-snapshots had 1:5:0
3267# 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
3268# 1.4.1 had 2:1:0
3269# 1.4.2 had 2:2:0
3270# 1.4.3 had 2:3:0
3271# 1.4.4 had 2:4:0
3272# 1.4.5 had 2:5:0
3273# 1.4.6 had 2:6:0
3274# 1.4.7 had 2:7:0
3275# 1.4.8 had 2:8:0
3276# 1.4.9 had 2:9:0
3277# 1.4.10 had 2:10:0
3278# 1.4.11 had 2:11:0
3279# 1.4.12 had 2:12:0
3280# 1.4.13 had 2:13:0
3281# and 1.4.13p1 and 1.4.13.p2
3282# 1.4.14 had 2:14:0
3283# 1.4.15 had 3:0:1 # adds ub_version()
3284# 1.4.16 had 3:1:1
3285# 1.4.17 had 3:2:1
3286# 1.4.18 had 3:3:1
3287# 1.4.19 had 3:4:1
3288# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
3289# 1.4.21 had 4:1:2
3290# 1.4.22 had 4:1:2
3291# 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
3292# 1.5.1 had 5:3:3
3293# 1.5.2 had 5:5:3
3294# 1.5.3 had 5:6:3
3295# 1.5.4 had 5:7:3
3296# 1.5.5 had 5:8:3
3297# 1.5.6 had 5:9:3
3298# 1.5.7 had 5:10:3
3299# 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
3300# 1.5.9 had 6:1:4
3301# 1.5.10 had 6:2:4
3302# 1.6.0 had 6:3:4
3303# 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
3304# 1.6.2 had 7:1:5
3305# 1.6.3 had 7:2:5
3306# 1.6.4 had 7:3:5
3307# 1.6.5 had 7:4:5
3308# 1.6.6 had 7:5:5
3309# 1.6.7 had 7:6:5
3310# 1.6.8 had 7:7:5
3311# 1.7.0 had 7:8:5
3312# 1.7.1 had 7:9:5
3313# 1.7.2 had 7:10:5
3314# 1.7.3 had 7:11:5
3315# 1.8.0 had 8:0:0 # changes the event callback function signature
3316# 1.8.1 had 8:1:0
3317# 1.8.2 had 8:2:0
3318# 1.8.3 had 8:3:0
3319# 1.9.0 had 9:0:1 # add ub_ctx_set_tls
3320# 1.9.1 had 9:1:1
3321# 1.9.2 had 9:2:1
3322# 1.9.3 had 9:3:1
3323# 1.9.4 had 9:4:1
3324# 1.9.5 had 9:5:1
3325# 1.9.6 had 9:6:1
3326# 1.10.0 had 9:7:1
3327# 1.10.1 had 9:8:1
3328# 1.11.0 had 9:9:1
3329# 1.12.0 had 9:10:1
3330# 1.13.0 had 9:11:1
3331# 1.13.1 had 9:12:1
3332# 1.13.2 had 9:13:1
3333# 1.14.0 had 9:14:1
3334# 1.15.0 had 9:15:1
3335# 1.16.0 had 9:16:1
3336# 1.16.1 had 9:17:1
3337# 1.16.2 had 9:18:1
3338# 1.16.3 had 9:19:1
3339# 1.17.0 had 9:20:1
3340# 1.17.1 had 9:21:1
3341# 1.18.0 had 9:22:1
3342# 1.19.0 had 9:23:1
3343# 1.19.1 had 9:24:1
3344# 1.19.2 had 9:25:1
3345# 1.19.3 had 9:26:1
3346# 1.20.0 had 9:27:1
3347# 1.21.0 had 9:28:1
3348# 1.21.1 had 9:29:1
3349# 1.22.0 had 9:30:1
3350
3351#   Current  -- the number of the binary API that we're implementing
3352#   Revision -- which iteration of the implementation of the binary
3353#               API are we supplying?
3354#   Age      -- How many previous binary API versions do we also
3355#               support?
3356#
3357# If we release a new version that does not change the binary API,
3358# increment Revision.
3359#
3360# If we release a new version that changes the binary API, but does
3361# not break programs compiled against the old binary API, increment
3362# Current and Age.  Set Revision to 0, since this is the first
3363# implementation of the new API.
3364#
3365# Otherwise, we're changing the binary API and breaking backward
3366# compatibility with old binaries.  Increment Current.  Set Age to 0,
3367# since we're backward compatible with no previous APIs.  Set Revision
3368# to 0 too.
3369
3370
3371
3372
3373
3374cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`"
3375
3376printf "%s\n" "#define CONFCMDLINE \"$cmdln\"" >>confdefs.h
3377
3378
3379CFLAGS="$CFLAGS"
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389ac_ext=c
3390ac_cpp='$CPP $CPPFLAGS'
3391ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3392ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3393ac_compiler_gnu=$ac_cv_c_compiler_gnu
3394if test -n "$ac_tool_prefix"; then
3395  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3396set dummy ${ac_tool_prefix}gcc; ac_word=$2
3397{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3398printf %s "checking for $ac_word... " >&6; }
3399if test ${ac_cv_prog_CC+y}
3400then :
3401  printf %s "(cached) " >&6
3402else $as_nop
3403  if test -n "$CC"; then
3404  ac_cv_prog_CC="$CC" # Let the user override the test.
3405else
3406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3407for as_dir in $PATH
3408do
3409  IFS=$as_save_IFS
3410  case $as_dir in #(((
3411    '') as_dir=./ ;;
3412    */) ;;
3413    *) as_dir=$as_dir/ ;;
3414  esac
3415    for ac_exec_ext in '' $ac_executable_extensions; do
3416  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3417    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3418    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3419    break 2
3420  fi
3421done
3422  done
3423IFS=$as_save_IFS
3424
3425fi
3426fi
3427CC=$ac_cv_prog_CC
3428if test -n "$CC"; then
3429  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3430printf "%s\n" "$CC" >&6; }
3431else
3432  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3433printf "%s\n" "no" >&6; }
3434fi
3435
3436
3437fi
3438if test -z "$ac_cv_prog_CC"; then
3439  ac_ct_CC=$CC
3440  # Extract the first word of "gcc", so it can be a program name with args.
3441set dummy gcc; ac_word=$2
3442{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3443printf %s "checking for $ac_word... " >&6; }
3444if test ${ac_cv_prog_ac_ct_CC+y}
3445then :
3446  printf %s "(cached) " >&6
3447else $as_nop
3448  if test -n "$ac_ct_CC"; then
3449  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3450else
3451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3452for as_dir in $PATH
3453do
3454  IFS=$as_save_IFS
3455  case $as_dir in #(((
3456    '') as_dir=./ ;;
3457    */) ;;
3458    *) as_dir=$as_dir/ ;;
3459  esac
3460    for ac_exec_ext in '' $ac_executable_extensions; do
3461  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3462    ac_cv_prog_ac_ct_CC="gcc"
3463    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3464    break 2
3465  fi
3466done
3467  done
3468IFS=$as_save_IFS
3469
3470fi
3471fi
3472ac_ct_CC=$ac_cv_prog_ac_ct_CC
3473if test -n "$ac_ct_CC"; then
3474  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3475printf "%s\n" "$ac_ct_CC" >&6; }
3476else
3477  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3478printf "%s\n" "no" >&6; }
3479fi
3480
3481  if test "x$ac_ct_CC" = x; then
3482    CC=""
3483  else
3484    case $cross_compiling:$ac_tool_warned in
3485yes:)
3486{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3487printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3488ac_tool_warned=yes ;;
3489esac
3490    CC=$ac_ct_CC
3491  fi
3492else
3493  CC="$ac_cv_prog_CC"
3494fi
3495
3496if test -z "$CC"; then
3497          if test -n "$ac_tool_prefix"; then
3498    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3499set dummy ${ac_tool_prefix}cc; ac_word=$2
3500{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3501printf %s "checking for $ac_word... " >&6; }
3502if test ${ac_cv_prog_CC+y}
3503then :
3504  printf %s "(cached) " >&6
3505else $as_nop
3506  if test -n "$CC"; then
3507  ac_cv_prog_CC="$CC" # Let the user override the test.
3508else
3509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3510for as_dir in $PATH
3511do
3512  IFS=$as_save_IFS
3513  case $as_dir in #(((
3514    '') as_dir=./ ;;
3515    */) ;;
3516    *) as_dir=$as_dir/ ;;
3517  esac
3518    for ac_exec_ext in '' $ac_executable_extensions; do
3519  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3520    ac_cv_prog_CC="${ac_tool_prefix}cc"
3521    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3522    break 2
3523  fi
3524done
3525  done
3526IFS=$as_save_IFS
3527
3528fi
3529fi
3530CC=$ac_cv_prog_CC
3531if test -n "$CC"; then
3532  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3533printf "%s\n" "$CC" >&6; }
3534else
3535  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3536printf "%s\n" "no" >&6; }
3537fi
3538
3539
3540  fi
3541fi
3542if test -z "$CC"; then
3543  # Extract the first word of "cc", so it can be a program name with args.
3544set dummy cc; ac_word=$2
3545{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3546printf %s "checking for $ac_word... " >&6; }
3547if test ${ac_cv_prog_CC+y}
3548then :
3549  printf %s "(cached) " >&6
3550else $as_nop
3551  if test -n "$CC"; then
3552  ac_cv_prog_CC="$CC" # Let the user override the test.
3553else
3554  ac_prog_rejected=no
3555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3556for as_dir in $PATH
3557do
3558  IFS=$as_save_IFS
3559  case $as_dir in #(((
3560    '') as_dir=./ ;;
3561    */) ;;
3562    *) as_dir=$as_dir/ ;;
3563  esac
3564    for ac_exec_ext in '' $ac_executable_extensions; do
3565  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3566    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3567       ac_prog_rejected=yes
3568       continue
3569     fi
3570    ac_cv_prog_CC="cc"
3571    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3572    break 2
3573  fi
3574done
3575  done
3576IFS=$as_save_IFS
3577
3578if test $ac_prog_rejected = yes; then
3579  # We found a bogon in the path, so make sure we never use it.
3580  set dummy $ac_cv_prog_CC
3581  shift
3582  if test $# != 0; then
3583    # We chose a different compiler from the bogus one.
3584    # However, it has the same basename, so the bogon will be chosen
3585    # first if we set CC to just the basename; use the full file name.
3586    shift
3587    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3588  fi
3589fi
3590fi
3591fi
3592CC=$ac_cv_prog_CC
3593if test -n "$CC"; then
3594  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3595printf "%s\n" "$CC" >&6; }
3596else
3597  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3598printf "%s\n" "no" >&6; }
3599fi
3600
3601
3602fi
3603if test -z "$CC"; then
3604  if test -n "$ac_tool_prefix"; then
3605  for ac_prog in cl.exe
3606  do
3607    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3608set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3610printf %s "checking for $ac_word... " >&6; }
3611if test ${ac_cv_prog_CC+y}
3612then :
3613  printf %s "(cached) " >&6
3614else $as_nop
3615  if test -n "$CC"; then
3616  ac_cv_prog_CC="$CC" # Let the user override the test.
3617else
3618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3619for as_dir in $PATH
3620do
3621  IFS=$as_save_IFS
3622  case $as_dir in #(((
3623    '') as_dir=./ ;;
3624    */) ;;
3625    *) as_dir=$as_dir/ ;;
3626  esac
3627    for ac_exec_ext in '' $ac_executable_extensions; do
3628  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3629    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3630    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3631    break 2
3632  fi
3633done
3634  done
3635IFS=$as_save_IFS
3636
3637fi
3638fi
3639CC=$ac_cv_prog_CC
3640if test -n "$CC"; then
3641  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3642printf "%s\n" "$CC" >&6; }
3643else
3644  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3645printf "%s\n" "no" >&6; }
3646fi
3647
3648
3649    test -n "$CC" && break
3650  done
3651fi
3652if test -z "$CC"; then
3653  ac_ct_CC=$CC
3654  for ac_prog in cl.exe
3655do
3656  # Extract the first word of "$ac_prog", so it can be a program name with args.
3657set dummy $ac_prog; ac_word=$2
3658{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3659printf %s "checking for $ac_word... " >&6; }
3660if test ${ac_cv_prog_ac_ct_CC+y}
3661then :
3662  printf %s "(cached) " >&6
3663else $as_nop
3664  if test -n "$ac_ct_CC"; then
3665  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3666else
3667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3668for as_dir in $PATH
3669do
3670  IFS=$as_save_IFS
3671  case $as_dir in #(((
3672    '') as_dir=./ ;;
3673    */) ;;
3674    *) as_dir=$as_dir/ ;;
3675  esac
3676    for ac_exec_ext in '' $ac_executable_extensions; do
3677  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3678    ac_cv_prog_ac_ct_CC="$ac_prog"
3679    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3680    break 2
3681  fi
3682done
3683  done
3684IFS=$as_save_IFS
3685
3686fi
3687fi
3688ac_ct_CC=$ac_cv_prog_ac_ct_CC
3689if test -n "$ac_ct_CC"; then
3690  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3691printf "%s\n" "$ac_ct_CC" >&6; }
3692else
3693  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3694printf "%s\n" "no" >&6; }
3695fi
3696
3697
3698  test -n "$ac_ct_CC" && break
3699done
3700
3701  if test "x$ac_ct_CC" = x; then
3702    CC=""
3703  else
3704    case $cross_compiling:$ac_tool_warned in
3705yes:)
3706{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3707printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3708ac_tool_warned=yes ;;
3709esac
3710    CC=$ac_ct_CC
3711  fi
3712fi
3713
3714fi
3715if test -z "$CC"; then
3716  if test -n "$ac_tool_prefix"; then
3717  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3718set dummy ${ac_tool_prefix}clang; ac_word=$2
3719{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3720printf %s "checking for $ac_word... " >&6; }
3721if test ${ac_cv_prog_CC+y}
3722then :
3723  printf %s "(cached) " >&6
3724else $as_nop
3725  if test -n "$CC"; then
3726  ac_cv_prog_CC="$CC" # Let the user override the test.
3727else
3728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3729for as_dir in $PATH
3730do
3731  IFS=$as_save_IFS
3732  case $as_dir in #(((
3733    '') as_dir=./ ;;
3734    */) ;;
3735    *) as_dir=$as_dir/ ;;
3736  esac
3737    for ac_exec_ext in '' $ac_executable_extensions; do
3738  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3739    ac_cv_prog_CC="${ac_tool_prefix}clang"
3740    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3741    break 2
3742  fi
3743done
3744  done
3745IFS=$as_save_IFS
3746
3747fi
3748fi
3749CC=$ac_cv_prog_CC
3750if test -n "$CC"; then
3751  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3752printf "%s\n" "$CC" >&6; }
3753else
3754  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3755printf "%s\n" "no" >&6; }
3756fi
3757
3758
3759fi
3760if test -z "$ac_cv_prog_CC"; then
3761  ac_ct_CC=$CC
3762  # Extract the first word of "clang", so it can be a program name with args.
3763set dummy clang; ac_word=$2
3764{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3765printf %s "checking for $ac_word... " >&6; }
3766if test ${ac_cv_prog_ac_ct_CC+y}
3767then :
3768  printf %s "(cached) " >&6
3769else $as_nop
3770  if test -n "$ac_ct_CC"; then
3771  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3772else
3773as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3774for as_dir in $PATH
3775do
3776  IFS=$as_save_IFS
3777  case $as_dir in #(((
3778    '') as_dir=./ ;;
3779    */) ;;
3780    *) as_dir=$as_dir/ ;;
3781  esac
3782    for ac_exec_ext in '' $ac_executable_extensions; do
3783  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3784    ac_cv_prog_ac_ct_CC="clang"
3785    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3786    break 2
3787  fi
3788done
3789  done
3790IFS=$as_save_IFS
3791
3792fi
3793fi
3794ac_ct_CC=$ac_cv_prog_ac_ct_CC
3795if test -n "$ac_ct_CC"; then
3796  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3797printf "%s\n" "$ac_ct_CC" >&6; }
3798else
3799  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3800printf "%s\n" "no" >&6; }
3801fi
3802
3803  if test "x$ac_ct_CC" = x; then
3804    CC=""
3805  else
3806    case $cross_compiling:$ac_tool_warned in
3807yes:)
3808{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3809printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3810ac_tool_warned=yes ;;
3811esac
3812    CC=$ac_ct_CC
3813  fi
3814else
3815  CC="$ac_cv_prog_CC"
3816fi
3817
3818fi
3819
3820
3821test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3822printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3823as_fn_error $? "no acceptable C compiler found in \$PATH
3824See \`config.log' for more details" "$LINENO" 5; }
3825
3826# Provide some information about the compiler.
3827printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3828set X $ac_compile
3829ac_compiler=$2
3830for ac_option in --version -v -V -qversion -version; do
3831  { { ac_try="$ac_compiler $ac_option >&5"
3832case "(($ac_try" in
3833  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3834  *) ac_try_echo=$ac_try;;
3835esac
3836eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3837printf "%s\n" "$ac_try_echo"; } >&5
3838  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3839  ac_status=$?
3840  if test -s conftest.err; then
3841    sed '10a\
3842... rest of stderr output deleted ...
3843         10q' conftest.err >conftest.er1
3844    cat conftest.er1 >&5
3845  fi
3846  rm -f conftest.er1 conftest.err
3847  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3848  test $ac_status = 0; }
3849done
3850
3851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3852/* end confdefs.h.  */
3853
3854int
3855main (void)
3856{
3857
3858  ;
3859  return 0;
3860}
3861_ACEOF
3862ac_clean_files_save=$ac_clean_files
3863ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3864# Try to create an executable without -o first, disregard a.out.
3865# It will help us diagnose broken compilers, and finding out an intuition
3866# of exeext.
3867{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3868printf %s "checking whether the C compiler works... " >&6; }
3869ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3870
3871# The possible output files:
3872ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3873
3874ac_rmfiles=
3875for ac_file in $ac_files
3876do
3877  case $ac_file in
3878    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3879    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3880  esac
3881done
3882rm -f $ac_rmfiles
3883
3884if { { ac_try="$ac_link_default"
3885case "(($ac_try" in
3886  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3887  *) ac_try_echo=$ac_try;;
3888esac
3889eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3890printf "%s\n" "$ac_try_echo"; } >&5
3891  (eval "$ac_link_default") 2>&5
3892  ac_status=$?
3893  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3894  test $ac_status = 0; }
3895then :
3896  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3897# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3898# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3899# so that the user can short-circuit this test for compilers unknown to
3900# Autoconf.
3901for ac_file in $ac_files ''
3902do
3903  test -f "$ac_file" || continue
3904  case $ac_file in
3905    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3906	;;
3907    [ab].out )
3908	# We found the default executable, but exeext='' is most
3909	# certainly right.
3910	break;;
3911    *.* )
3912	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3913	then :; else
3914	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3915	fi
3916	# We set ac_cv_exeext here because the later test for it is not
3917	# safe: cross compilers may not add the suffix if given an `-o'
3918	# argument, so we may need to know it at that point already.
3919	# Even if this section looks crufty: it has the advantage of
3920	# actually working.
3921	break;;
3922    * )
3923	break;;
3924  esac
3925done
3926test "$ac_cv_exeext" = no && ac_cv_exeext=
3927
3928else $as_nop
3929  ac_file=''
3930fi
3931if test -z "$ac_file"
3932then :
3933  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3934printf "%s\n" "no" >&6; }
3935printf "%s\n" "$as_me: failed program was:" >&5
3936sed 's/^/| /' conftest.$ac_ext >&5
3937
3938{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3939printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3940as_fn_error 77 "C compiler cannot create executables
3941See \`config.log' for more details" "$LINENO" 5; }
3942else $as_nop
3943  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3944printf "%s\n" "yes" >&6; }
3945fi
3946{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3947printf %s "checking for C compiler default output file name... " >&6; }
3948{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3949printf "%s\n" "$ac_file" >&6; }
3950ac_exeext=$ac_cv_exeext
3951
3952rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3953ac_clean_files=$ac_clean_files_save
3954{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3955printf %s "checking for suffix of executables... " >&6; }
3956if { { ac_try="$ac_link"
3957case "(($ac_try" in
3958  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3959  *) ac_try_echo=$ac_try;;
3960esac
3961eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3962printf "%s\n" "$ac_try_echo"; } >&5
3963  (eval "$ac_link") 2>&5
3964  ac_status=$?
3965  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3966  test $ac_status = 0; }
3967then :
3968  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3969# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3970# work properly (i.e., refer to `conftest.exe'), while it won't with
3971# `rm'.
3972for ac_file in conftest.exe conftest conftest.*; do
3973  test -f "$ac_file" || continue
3974  case $ac_file in
3975    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3976    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3977	  break;;
3978    * ) break;;
3979  esac
3980done
3981else $as_nop
3982  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3983printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3984as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3985See \`config.log' for more details" "$LINENO" 5; }
3986fi
3987rm -f conftest conftest$ac_cv_exeext
3988{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3989printf "%s\n" "$ac_cv_exeext" >&6; }
3990
3991rm -f conftest.$ac_ext
3992EXEEXT=$ac_cv_exeext
3993ac_exeext=$EXEEXT
3994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3995/* end confdefs.h.  */
3996#include <stdio.h>
3997int
3998main (void)
3999{
4000FILE *f = fopen ("conftest.out", "w");
4001 return ferror (f) || fclose (f) != 0;
4002
4003  ;
4004  return 0;
4005}
4006_ACEOF
4007ac_clean_files="$ac_clean_files conftest.out"
4008# Check that the compiler produces executables we can run.  If not, either
4009# the compiler is broken, or we cross compile.
4010{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4011printf %s "checking whether we are cross compiling... " >&6; }
4012if test "$cross_compiling" != yes; then
4013  { { ac_try="$ac_link"
4014case "(($ac_try" in
4015  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4016  *) ac_try_echo=$ac_try;;
4017esac
4018eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4019printf "%s\n" "$ac_try_echo"; } >&5
4020  (eval "$ac_link") 2>&5
4021  ac_status=$?
4022  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4023  test $ac_status = 0; }
4024  if { ac_try='./conftest$ac_cv_exeext'
4025  { { case "(($ac_try" in
4026  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4027  *) ac_try_echo=$ac_try;;
4028esac
4029eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4030printf "%s\n" "$ac_try_echo"; } >&5
4031  (eval "$ac_try") 2>&5
4032  ac_status=$?
4033  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4034  test $ac_status = 0; }; }; then
4035    cross_compiling=no
4036  else
4037    if test "$cross_compiling" = maybe; then
4038	cross_compiling=yes
4039    else
4040	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4041printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4042as_fn_error 77 "cannot run C compiled programs.
4043If you meant to cross compile, use \`--host'.
4044See \`config.log' for more details" "$LINENO" 5; }
4045    fi
4046  fi
4047fi
4048{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4049printf "%s\n" "$cross_compiling" >&6; }
4050
4051rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4052ac_clean_files=$ac_clean_files_save
4053{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4054printf %s "checking for suffix of object files... " >&6; }
4055if test ${ac_cv_objext+y}
4056then :
4057  printf %s "(cached) " >&6
4058else $as_nop
4059  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4060/* end confdefs.h.  */
4061
4062int
4063main (void)
4064{
4065
4066  ;
4067  return 0;
4068}
4069_ACEOF
4070rm -f conftest.o conftest.obj
4071if { { ac_try="$ac_compile"
4072case "(($ac_try" in
4073  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4074  *) ac_try_echo=$ac_try;;
4075esac
4076eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4077printf "%s\n" "$ac_try_echo"; } >&5
4078  (eval "$ac_compile") 2>&5
4079  ac_status=$?
4080  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4081  test $ac_status = 0; }
4082then :
4083  for ac_file in conftest.o conftest.obj conftest.*; do
4084  test -f "$ac_file" || continue;
4085  case $ac_file in
4086    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4087    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4088       break;;
4089  esac
4090done
4091else $as_nop
4092  printf "%s\n" "$as_me: failed program was:" >&5
4093sed 's/^/| /' conftest.$ac_ext >&5
4094
4095{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4096printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4097as_fn_error $? "cannot compute suffix of object files: cannot compile
4098See \`config.log' for more details" "$LINENO" 5; }
4099fi
4100rm -f conftest.$ac_cv_objext conftest.$ac_ext
4101fi
4102{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4103printf "%s\n" "$ac_cv_objext" >&6; }
4104OBJEXT=$ac_cv_objext
4105ac_objext=$OBJEXT
4106{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4107printf %s "checking whether the compiler supports GNU C... " >&6; }
4108if test ${ac_cv_c_compiler_gnu+y}
4109then :
4110  printf %s "(cached) " >&6
4111else $as_nop
4112  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4113/* end confdefs.h.  */
4114
4115int
4116main (void)
4117{
4118#ifndef __GNUC__
4119       choke me
4120#endif
4121
4122  ;
4123  return 0;
4124}
4125_ACEOF
4126if ac_fn_c_try_compile "$LINENO"
4127then :
4128  ac_compiler_gnu=yes
4129else $as_nop
4130  ac_compiler_gnu=no
4131fi
4132rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4133ac_cv_c_compiler_gnu=$ac_compiler_gnu
4134
4135fi
4136{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4137printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4138ac_compiler_gnu=$ac_cv_c_compiler_gnu
4139
4140if test $ac_compiler_gnu = yes; then
4141  GCC=yes
4142else
4143  GCC=
4144fi
4145ac_test_CFLAGS=${CFLAGS+y}
4146ac_save_CFLAGS=$CFLAGS
4147{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4148printf %s "checking whether $CC accepts -g... " >&6; }
4149if test ${ac_cv_prog_cc_g+y}
4150then :
4151  printf %s "(cached) " >&6
4152else $as_nop
4153  ac_save_c_werror_flag=$ac_c_werror_flag
4154   ac_c_werror_flag=yes
4155   ac_cv_prog_cc_g=no
4156   CFLAGS="-g"
4157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4158/* end confdefs.h.  */
4159
4160int
4161main (void)
4162{
4163
4164  ;
4165  return 0;
4166}
4167_ACEOF
4168if ac_fn_c_try_compile "$LINENO"
4169then :
4170  ac_cv_prog_cc_g=yes
4171else $as_nop
4172  CFLAGS=""
4173      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4174/* end confdefs.h.  */
4175
4176int
4177main (void)
4178{
4179
4180  ;
4181  return 0;
4182}
4183_ACEOF
4184if ac_fn_c_try_compile "$LINENO"
4185then :
4186
4187else $as_nop
4188  ac_c_werror_flag=$ac_save_c_werror_flag
4189	 CFLAGS="-g"
4190	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4191/* end confdefs.h.  */
4192
4193int
4194main (void)
4195{
4196
4197  ;
4198  return 0;
4199}
4200_ACEOF
4201if ac_fn_c_try_compile "$LINENO"
4202then :
4203  ac_cv_prog_cc_g=yes
4204fi
4205rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4206fi
4207rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4208fi
4209rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4210   ac_c_werror_flag=$ac_save_c_werror_flag
4211fi
4212{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4213printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4214if test $ac_test_CFLAGS; then
4215  CFLAGS=$ac_save_CFLAGS
4216elif test $ac_cv_prog_cc_g = yes; then
4217  if test "$GCC" = yes; then
4218    CFLAGS="-g -O2"
4219  else
4220    CFLAGS="-g"
4221  fi
4222else
4223  if test "$GCC" = yes; then
4224    CFLAGS="-O2"
4225  else
4226    CFLAGS=
4227  fi
4228fi
4229ac_prog_cc_stdc=no
4230if test x$ac_prog_cc_stdc = xno
4231then :
4232  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4233printf %s "checking for $CC option to enable C11 features... " >&6; }
4234if test ${ac_cv_prog_cc_c11+y}
4235then :
4236  printf %s "(cached) " >&6
4237else $as_nop
4238  ac_cv_prog_cc_c11=no
4239ac_save_CC=$CC
4240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4241/* end confdefs.h.  */
4242$ac_c_conftest_c11_program
4243_ACEOF
4244for ac_arg in '' -std=gnu11
4245do
4246  CC="$ac_save_CC $ac_arg"
4247  if ac_fn_c_try_compile "$LINENO"
4248then :
4249  ac_cv_prog_cc_c11=$ac_arg
4250fi
4251rm -f core conftest.err conftest.$ac_objext conftest.beam
4252  test "x$ac_cv_prog_cc_c11" != "xno" && break
4253done
4254rm -f conftest.$ac_ext
4255CC=$ac_save_CC
4256fi
4257
4258if test "x$ac_cv_prog_cc_c11" = xno
4259then :
4260  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4261printf "%s\n" "unsupported" >&6; }
4262else $as_nop
4263  if test "x$ac_cv_prog_cc_c11" = x
4264then :
4265  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4266printf "%s\n" "none needed" >&6; }
4267else $as_nop
4268  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4269printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4270     CC="$CC $ac_cv_prog_cc_c11"
4271fi
4272  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4273  ac_prog_cc_stdc=c11
4274fi
4275fi
4276if test x$ac_prog_cc_stdc = xno
4277then :
4278  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4279printf %s "checking for $CC option to enable C99 features... " >&6; }
4280if test ${ac_cv_prog_cc_c99+y}
4281then :
4282  printf %s "(cached) " >&6
4283else $as_nop
4284  ac_cv_prog_cc_c99=no
4285ac_save_CC=$CC
4286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4287/* end confdefs.h.  */
4288$ac_c_conftest_c99_program
4289_ACEOF
4290for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4291do
4292  CC="$ac_save_CC $ac_arg"
4293  if ac_fn_c_try_compile "$LINENO"
4294then :
4295  ac_cv_prog_cc_c99=$ac_arg
4296fi
4297rm -f core conftest.err conftest.$ac_objext conftest.beam
4298  test "x$ac_cv_prog_cc_c99" != "xno" && break
4299done
4300rm -f conftest.$ac_ext
4301CC=$ac_save_CC
4302fi
4303
4304if test "x$ac_cv_prog_cc_c99" = xno
4305then :
4306  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4307printf "%s\n" "unsupported" >&6; }
4308else $as_nop
4309  if test "x$ac_cv_prog_cc_c99" = x
4310then :
4311  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4312printf "%s\n" "none needed" >&6; }
4313else $as_nop
4314  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4315printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4316     CC="$CC $ac_cv_prog_cc_c99"
4317fi
4318  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4319  ac_prog_cc_stdc=c99
4320fi
4321fi
4322if test x$ac_prog_cc_stdc = xno
4323then :
4324  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4325printf %s "checking for $CC option to enable C89 features... " >&6; }
4326if test ${ac_cv_prog_cc_c89+y}
4327then :
4328  printf %s "(cached) " >&6
4329else $as_nop
4330  ac_cv_prog_cc_c89=no
4331ac_save_CC=$CC
4332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4333/* end confdefs.h.  */
4334$ac_c_conftest_c89_program
4335_ACEOF
4336for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4337do
4338  CC="$ac_save_CC $ac_arg"
4339  if ac_fn_c_try_compile "$LINENO"
4340then :
4341  ac_cv_prog_cc_c89=$ac_arg
4342fi
4343rm -f core conftest.err conftest.$ac_objext conftest.beam
4344  test "x$ac_cv_prog_cc_c89" != "xno" && break
4345done
4346rm -f conftest.$ac_ext
4347CC=$ac_save_CC
4348fi
4349
4350if test "x$ac_cv_prog_cc_c89" = xno
4351then :
4352  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4353printf "%s\n" "unsupported" >&6; }
4354else $as_nop
4355  if test "x$ac_cv_prog_cc_c89" = x
4356then :
4357  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4358printf "%s\n" "none needed" >&6; }
4359else $as_nop
4360  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4361printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4362     CC="$CC $ac_cv_prog_cc_c89"
4363fi
4364  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4365  ac_prog_cc_stdc=c89
4366fi
4367fi
4368
4369ac_ext=c
4370ac_cpp='$CPP $CPPFLAGS'
4371ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4372ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4373ac_compiler_gnu=$ac_cv_c_compiler_gnu
4374
4375
4376ac_header= ac_cache=
4377for ac_item in $ac_header_c_list
4378do
4379  if test $ac_cache; then
4380    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4381    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4382      printf "%s\n" "#define $ac_item 1" >> confdefs.h
4383    fi
4384    ac_header= ac_cache=
4385  elif test $ac_header; then
4386    ac_cache=$ac_item
4387  else
4388    ac_header=$ac_item
4389  fi
4390done
4391
4392
4393
4394
4395
4396
4397
4398
4399if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
4400then :
4401
4402printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
4403
4404fi
4405
4406
4407
4408
4409
4410
4411  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4412printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4413if test ${ac_cv_safe_to_define___extensions__+y}
4414then :
4415  printf %s "(cached) " >&6
4416else $as_nop
4417  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4418/* end confdefs.h.  */
4419
4420#         define __EXTENSIONS__ 1
4421          $ac_includes_default
4422int
4423main (void)
4424{
4425
4426  ;
4427  return 0;
4428}
4429_ACEOF
4430if ac_fn_c_try_compile "$LINENO"
4431then :
4432  ac_cv_safe_to_define___extensions__=yes
4433else $as_nop
4434  ac_cv_safe_to_define___extensions__=no
4435fi
4436rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4437fi
4438{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4439printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
4440
4441  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4442printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
4443if test ${ac_cv_should_define__xopen_source+y}
4444then :
4445  printf %s "(cached) " >&6
4446else $as_nop
4447  ac_cv_should_define__xopen_source=no
4448    if test $ac_cv_header_wchar_h = yes
4449then :
4450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4451/* end confdefs.h.  */
4452
4453          #include <wchar.h>
4454          mbstate_t x;
4455int
4456main (void)
4457{
4458
4459  ;
4460  return 0;
4461}
4462_ACEOF
4463if ac_fn_c_try_compile "$LINENO"
4464then :
4465
4466else $as_nop
4467  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4468/* end confdefs.h.  */
4469
4470            #define _XOPEN_SOURCE 500
4471            #include <wchar.h>
4472            mbstate_t x;
4473int
4474main (void)
4475{
4476
4477  ;
4478  return 0;
4479}
4480_ACEOF
4481if ac_fn_c_try_compile "$LINENO"
4482then :
4483  ac_cv_should_define__xopen_source=yes
4484fi
4485rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4486fi
4487rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4488fi
4489fi
4490{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
4491printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
4492
4493  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
4494
4495  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4496
4497  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
4498
4499  printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
4500
4501  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
4502
4503  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
4504
4505  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4506
4507  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
4508
4509  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
4510
4511  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
4512
4513  printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
4514
4515  printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
4516
4517  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
4518
4519  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
4520
4521  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
4522
4523  if test $ac_cv_header_minix_config_h = yes
4524then :
4525  MINIX=yes
4526    printf "%s\n" "#define _MINIX 1" >>confdefs.h
4527
4528    printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
4529
4530    printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
4531
4532else $as_nop
4533  MINIX=
4534fi
4535  if test $ac_cv_safe_to_define___extensions__ = yes
4536then :
4537  printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
4538
4539fi
4540  if test $ac_cv_should_define__xopen_source = yes
4541then :
4542  printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
4543
4544fi
4545
4546if test "$ac_cv_header_minix_config_h" = "yes"; then
4547
4548printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
4549
4550fi
4551
4552case "$prefix" in
4553        NONE)
4554		prefix="/usr/local"
4555        ;;
4556esac
4557case "$exec_prefix" in
4558        NONE)
4559		exec_prefix="$prefix"
4560        ;;
4561esac
4562
4563# are we on MinGW?
4564if uname -s 2>&1 | grep MINGW >/dev/null; then on_mingw="yes"
4565else
4566	if echo $host | grep mingw >/dev/null; then on_mingw="yes"
4567	else on_mingw="no"; fi
4568fi
4569
4570#
4571# Determine configuration file
4572# the eval is to evaluate shell expansion twice
4573UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4574
4575UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4576
4577UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4578
4579if test $on_mingw = "no"; then
4580  ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4581else
4582  ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4583fi
4584
4585# Check whether --with-conf_file was given.
4586if test ${with_conf_file+y}
4587then :
4588  withval=$with_conf_file; ub_conf_file="$withval"
4589fi
4590
4591
4592hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4593
4594
4595printf "%s\n" "#define CONFIGFILE \"$hdr_config\"" >>confdefs.h
4596
4597ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4598$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4599	 X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4600	 X"$ub_conf_file" : 'X\(//\)$' \| \
4601	 X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4602printf "%s\n" X"$ub_conf_file" |
4603    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4604	    s//\1/
4605	    q
4606	  }
4607	  /^X\(\/\/\)[^/].*/{
4608	    s//\1/
4609	    q
4610	  }
4611	  /^X\(\/\/\)$/{
4612	    s//\1/
4613	    q
4614	  }
4615	  /^X\(\/\).*/{
4616	    s//\1/
4617	    q
4618	  }
4619	  s/.*/./; q'`
4620
4621
4622# Determine run, chroot directory and pidfile locations
4623
4624# Check whether --with-run-dir was given.
4625if test ${with_run_dir+y}
4626then :
4627  withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4628else $as_nop
4629  if test $on_mingw = no; then
4630    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4631else
4632    UNBOUND_RUN_DIR=""
4633fi
4634
4635fi
4636
4637
4638hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4639
4640
4641printf "%s\n" "#define RUN_DIR \"$hdr_run\"" >>confdefs.h
4642
4643
4644
4645# Check whether --with-chroot-dir was given.
4646if test ${with_chroot_dir+y}
4647then :
4648  withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4649else $as_nop
4650  if test $on_mingw = no; then
4651    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4652else
4653    UNBOUND_CHROOT_DIR=""
4654fi
4655
4656fi
4657
4658
4659hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4660
4661
4662printf "%s\n" "#define CHROOT_DIR \"$hdr_chroot\"" >>confdefs.h
4663
4664
4665
4666# Check whether --with-share-dir was given.
4667if test ${with_share_dir+y}
4668then :
4669  withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4670else $as_nop
4671  UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4672fi
4673
4674
4675
4676printf "%s\n" "#define SHARE_DIR \"$UNBOUND_SHARE_DIR\"" >>confdefs.h
4677
4678
4679
4680# Check whether --with-pidfile was given.
4681if test ${with_pidfile+y}
4682then :
4683  withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4684else $as_nop
4685  if test $on_mingw = no; then
4686    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4687else
4688    UNBOUND_PIDFILE=""
4689fi
4690
4691fi
4692
4693
4694hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4695
4696
4697printf "%s\n" "#define PIDFILE \"$hdr_pid\"" >>confdefs.h
4698
4699
4700
4701# Check whether --with-rootkey-file was given.
4702if test ${with_rootkey_file+y}
4703then :
4704  withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4705else $as_nop
4706  if test $on_mingw = no; then
4707    UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4708else
4709    UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4710fi
4711
4712fi
4713
4714
4715hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4716
4717
4718printf "%s\n" "#define ROOT_ANCHOR_FILE \"$hdr_rkey\"" >>confdefs.h
4719
4720
4721
4722# Check whether --with-rootcert-file was given.
4723if test ${with_rootcert_file+y}
4724then :
4725  withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4726else $as_nop
4727  if test $on_mingw = no; then
4728    UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4729else
4730    UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4731fi
4732
4733fi
4734
4735
4736hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4737
4738
4739printf "%s\n" "#define ROOT_CERT_FILE \"$hdr_rpem\"" >>confdefs.h
4740
4741
4742
4743# Check whether --with-username was given.
4744if test ${with_username+y}
4745then :
4746  withval=$with_username; UNBOUND_USERNAME="$withval"
4747else $as_nop
4748  UNBOUND_USERNAME="unbound"
4749fi
4750
4751
4752
4753printf "%s\n" "#define UB_USERNAME \"$UNBOUND_USERNAME\"" >>confdefs.h
4754
4755
4756
4757printf "%s\n" "#define WINVER 0x0502" >>confdefs.h
4758
4759wnvs=`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/' `
4760
4761
4762printf "%s\n" "#define RSRC_PACKAGE_VERSION $wnvs" >>confdefs.h
4763
4764
4765# Check for 'grep -e' program, here, since ACX_CHECK_FLTO needs that.
4766{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4767printf %s "checking for grep that handles long lines and -e... " >&6; }
4768if test ${ac_cv_path_GREP+y}
4769then :
4770  printf %s "(cached) " >&6
4771else $as_nop
4772  if test -z "$GREP"; then
4773  ac_path_GREP_found=false
4774  # Loop through the user's path and test for each of PROGNAME-LIST
4775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4776for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4777do
4778  IFS=$as_save_IFS
4779  case $as_dir in #(((
4780    '') as_dir=./ ;;
4781    */) ;;
4782    *) as_dir=$as_dir/ ;;
4783  esac
4784    for ac_prog in grep ggrep
4785   do
4786    for ac_exec_ext in '' $ac_executable_extensions; do
4787      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
4788      as_fn_executable_p "$ac_path_GREP" || continue
4789# Check for GNU ac_path_GREP and select it if it is found.
4790  # Check for GNU $ac_path_GREP
4791case `"$ac_path_GREP" --version 2>&1` in
4792*GNU*)
4793  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4794*)
4795  ac_count=0
4796  printf %s 0123456789 >"conftest.in"
4797  while :
4798  do
4799    cat "conftest.in" "conftest.in" >"conftest.tmp"
4800    mv "conftest.tmp" "conftest.in"
4801    cp "conftest.in" "conftest.nl"
4802    printf "%s\n" 'GREP' >> "conftest.nl"
4803    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4804    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4805    as_fn_arith $ac_count + 1 && ac_count=$as_val
4806    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4807      # Best one so far, save it but keep looking for a better one
4808      ac_cv_path_GREP="$ac_path_GREP"
4809      ac_path_GREP_max=$ac_count
4810    fi
4811    # 10*(2^10) chars as input seems more than enough
4812    test $ac_count -gt 10 && break
4813  done
4814  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4815esac
4816
4817      $ac_path_GREP_found && break 3
4818    done
4819  done
4820  done
4821IFS=$as_save_IFS
4822  if test -z "$ac_cv_path_GREP"; then
4823    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4824  fi
4825else
4826  ac_cv_path_GREP=$GREP
4827fi
4828
4829fi
4830{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4831printf "%s\n" "$ac_cv_path_GREP" >&6; }
4832 GREP="$ac_cv_path_GREP"
4833
4834
4835
4836# Checks for typedefs, structures, and compiler characteristics.
4837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4838printf %s "checking for an ANSI C-conforming const... " >&6; }
4839if test ${ac_cv_c_const+y}
4840then :
4841  printf %s "(cached) " >&6
4842else $as_nop
4843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4844/* end confdefs.h.  */
4845
4846int
4847main (void)
4848{
4849
4850#ifndef __cplusplus
4851  /* Ultrix mips cc rejects this sort of thing.  */
4852  typedef int charset[2];
4853  const charset cs = { 0, 0 };
4854  /* SunOS 4.1.1 cc rejects this.  */
4855  char const *const *pcpcc;
4856  char **ppc;
4857  /* NEC SVR4.0.2 mips cc rejects this.  */
4858  struct point {int x, y;};
4859  static struct point const zero = {0,0};
4860  /* IBM XL C 1.02.0.0 rejects this.
4861     It does not let you subtract one const X* pointer from another in
4862     an arm of an if-expression whose if-part is not a constant
4863     expression */
4864  const char *g = "string";
4865  pcpcc = &g + (g ? g-g : 0);
4866  /* HPUX 7.0 cc rejects these. */
4867  ++pcpcc;
4868  ppc = (char**) pcpcc;
4869  pcpcc = (char const *const *) ppc;
4870  { /* SCO 3.2v4 cc rejects this sort of thing.  */
4871    char tx;
4872    char *t = &tx;
4873    char const *s = 0 ? (char *) 0 : (char const *) 0;
4874
4875    *t++ = 0;
4876    if (s) return 0;
4877  }
4878  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4879    int x[] = {25, 17};
4880    const int *foo = &x[0];
4881    ++foo;
4882  }
4883  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4884    typedef const int *iptr;
4885    iptr p = 0;
4886    ++p;
4887  }
4888  { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
4889       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4890    struct s { int j; const int *ap[3]; } bx;
4891    struct s *b = &bx; b->j = 5;
4892  }
4893  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4894    const int foo = 10;
4895    if (!foo) return 0;
4896  }
4897  return !cs[0] && !zero.x;
4898#endif
4899
4900  ;
4901  return 0;
4902}
4903_ACEOF
4904if ac_fn_c_try_compile "$LINENO"
4905then :
4906  ac_cv_c_const=yes
4907else $as_nop
4908  ac_cv_c_const=no
4909fi
4910rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4911fi
4912{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4913printf "%s\n" "$ac_cv_c_const" >&6; }
4914if test $ac_cv_c_const = no; then
4915
4916printf "%s\n" "#define const /**/" >>confdefs.h
4917
4918fi
4919
4920ac_ext=c
4921ac_cpp='$CPP $CPPFLAGS'
4922ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4923ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4924ac_compiler_gnu=$ac_cv_c_compiler_gnu
4925
4926# allow user to override the -g -O2 flags.
4927default_cflags=no
4928if test "x$CFLAGS" = "x" ; then
4929
4930
4931{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4932printf %s "checking whether $CC supports -g... " >&6; }
4933cache=`echo g | sed 'y%.=/+-%___p_%'`
4934if eval test \${cv_prog_cc_flag_$cache+y}
4935then :
4936  printf %s "(cached) " >&6
4937else $as_nop
4938
4939echo 'void f(void){}' >conftest.c
4940if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4941eval "cv_prog_cc_flag_$cache=yes"
4942else
4943eval "cv_prog_cc_flag_$cache=no"
4944fi
4945rm -f conftest conftest.o conftest.c
4946
4947fi
4948
4949if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4950{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4951printf "%s\n" "yes" >&6; }
4952:
4953CFLAGS="$CFLAGS -g"
4954else
4955{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4956printf "%s\n" "no" >&6; }
4957:
4958
4959fi
4960
4961
4962
4963{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4964printf %s "checking whether $CC supports -O2... " >&6; }
4965cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4966if eval test \${cv_prog_cc_flag_$cache+y}
4967then :
4968  printf %s "(cached) " >&6
4969else $as_nop
4970
4971echo 'void f(void){}' >conftest.c
4972if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4973eval "cv_prog_cc_flag_$cache=yes"
4974else
4975eval "cv_prog_cc_flag_$cache=no"
4976fi
4977rm -f conftest conftest.o conftest.c
4978
4979fi
4980
4981if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4982{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4983printf "%s\n" "yes" >&6; }
4984:
4985CFLAGS="$CFLAGS -O2"
4986else
4987{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4988printf "%s\n" "no" >&6; }
4989:
4990
4991fi
4992
4993default_cflags=yes
4994fi
4995ac_ext=c
4996ac_cpp='$CPP $CPPFLAGS'
4997ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4998ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4999ac_compiler_gnu=$ac_cv_c_compiler_gnu
5000if test -n "$ac_tool_prefix"; then
5001  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5002set dummy ${ac_tool_prefix}gcc; ac_word=$2
5003{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5004printf %s "checking for $ac_word... " >&6; }
5005if test ${ac_cv_prog_CC+y}
5006then :
5007  printf %s "(cached) " >&6
5008else $as_nop
5009  if test -n "$CC"; then
5010  ac_cv_prog_CC="$CC" # Let the user override the test.
5011else
5012as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013for as_dir in $PATH
5014do
5015  IFS=$as_save_IFS
5016  case $as_dir in #(((
5017    '') as_dir=./ ;;
5018    */) ;;
5019    *) as_dir=$as_dir/ ;;
5020  esac
5021    for ac_exec_ext in '' $ac_executable_extensions; do
5022  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5023    ac_cv_prog_CC="${ac_tool_prefix}gcc"
5024    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5025    break 2
5026  fi
5027done
5028  done
5029IFS=$as_save_IFS
5030
5031fi
5032fi
5033CC=$ac_cv_prog_CC
5034if test -n "$CC"; then
5035  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5036printf "%s\n" "$CC" >&6; }
5037else
5038  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5039printf "%s\n" "no" >&6; }
5040fi
5041
5042
5043fi
5044if test -z "$ac_cv_prog_CC"; then
5045  ac_ct_CC=$CC
5046  # Extract the first word of "gcc", so it can be a program name with args.
5047set dummy gcc; ac_word=$2
5048{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5049printf %s "checking for $ac_word... " >&6; }
5050if test ${ac_cv_prog_ac_ct_CC+y}
5051then :
5052  printf %s "(cached) " >&6
5053else $as_nop
5054  if test -n "$ac_ct_CC"; then
5055  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5056else
5057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5058for as_dir in $PATH
5059do
5060  IFS=$as_save_IFS
5061  case $as_dir in #(((
5062    '') as_dir=./ ;;
5063    */) ;;
5064    *) as_dir=$as_dir/ ;;
5065  esac
5066    for ac_exec_ext in '' $ac_executable_extensions; do
5067  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5068    ac_cv_prog_ac_ct_CC="gcc"
5069    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5070    break 2
5071  fi
5072done
5073  done
5074IFS=$as_save_IFS
5075
5076fi
5077fi
5078ac_ct_CC=$ac_cv_prog_ac_ct_CC
5079if test -n "$ac_ct_CC"; then
5080  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5081printf "%s\n" "$ac_ct_CC" >&6; }
5082else
5083  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5084printf "%s\n" "no" >&6; }
5085fi
5086
5087  if test "x$ac_ct_CC" = x; then
5088    CC=""
5089  else
5090    case $cross_compiling:$ac_tool_warned in
5091yes:)
5092{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5093printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5094ac_tool_warned=yes ;;
5095esac
5096    CC=$ac_ct_CC
5097  fi
5098else
5099  CC="$ac_cv_prog_CC"
5100fi
5101
5102if test -z "$CC"; then
5103          if test -n "$ac_tool_prefix"; then
5104    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5105set dummy ${ac_tool_prefix}cc; ac_word=$2
5106{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5107printf %s "checking for $ac_word... " >&6; }
5108if test ${ac_cv_prog_CC+y}
5109then :
5110  printf %s "(cached) " >&6
5111else $as_nop
5112  if test -n "$CC"; then
5113  ac_cv_prog_CC="$CC" # Let the user override the test.
5114else
5115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5116for as_dir in $PATH
5117do
5118  IFS=$as_save_IFS
5119  case $as_dir in #(((
5120    '') as_dir=./ ;;
5121    */) ;;
5122    *) as_dir=$as_dir/ ;;
5123  esac
5124    for ac_exec_ext in '' $ac_executable_extensions; do
5125  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5126    ac_cv_prog_CC="${ac_tool_prefix}cc"
5127    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5128    break 2
5129  fi
5130done
5131  done
5132IFS=$as_save_IFS
5133
5134fi
5135fi
5136CC=$ac_cv_prog_CC
5137if test -n "$CC"; then
5138  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5139printf "%s\n" "$CC" >&6; }
5140else
5141  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5142printf "%s\n" "no" >&6; }
5143fi
5144
5145
5146  fi
5147fi
5148if test -z "$CC"; then
5149  # Extract the first word of "cc", so it can be a program name with args.
5150set dummy cc; ac_word=$2
5151{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5152printf %s "checking for $ac_word... " >&6; }
5153if test ${ac_cv_prog_CC+y}
5154then :
5155  printf %s "(cached) " >&6
5156else $as_nop
5157  if test -n "$CC"; then
5158  ac_cv_prog_CC="$CC" # Let the user override the test.
5159else
5160  ac_prog_rejected=no
5161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5162for as_dir in $PATH
5163do
5164  IFS=$as_save_IFS
5165  case $as_dir in #(((
5166    '') as_dir=./ ;;
5167    */) ;;
5168    *) as_dir=$as_dir/ ;;
5169  esac
5170    for ac_exec_ext in '' $ac_executable_extensions; do
5171  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5172    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5173       ac_prog_rejected=yes
5174       continue
5175     fi
5176    ac_cv_prog_CC="cc"
5177    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5178    break 2
5179  fi
5180done
5181  done
5182IFS=$as_save_IFS
5183
5184if test $ac_prog_rejected = yes; then
5185  # We found a bogon in the path, so make sure we never use it.
5186  set dummy $ac_cv_prog_CC
5187  shift
5188  if test $# != 0; then
5189    # We chose a different compiler from the bogus one.
5190    # However, it has the same basename, so the bogon will be chosen
5191    # first if we set CC to just the basename; use the full file name.
5192    shift
5193    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
5194  fi
5195fi
5196fi
5197fi
5198CC=$ac_cv_prog_CC
5199if test -n "$CC"; then
5200  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5201printf "%s\n" "$CC" >&6; }
5202else
5203  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5204printf "%s\n" "no" >&6; }
5205fi
5206
5207
5208fi
5209if test -z "$CC"; then
5210  if test -n "$ac_tool_prefix"; then
5211  for ac_prog in cl.exe
5212  do
5213    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5214set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5215{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5216printf %s "checking for $ac_word... " >&6; }
5217if test ${ac_cv_prog_CC+y}
5218then :
5219  printf %s "(cached) " >&6
5220else $as_nop
5221  if test -n "$CC"; then
5222  ac_cv_prog_CC="$CC" # Let the user override the test.
5223else
5224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5225for as_dir in $PATH
5226do
5227  IFS=$as_save_IFS
5228  case $as_dir in #(((
5229    '') as_dir=./ ;;
5230    */) ;;
5231    *) as_dir=$as_dir/ ;;
5232  esac
5233    for ac_exec_ext in '' $ac_executable_extensions; do
5234  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5235    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5236    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5237    break 2
5238  fi
5239done
5240  done
5241IFS=$as_save_IFS
5242
5243fi
5244fi
5245CC=$ac_cv_prog_CC
5246if test -n "$CC"; then
5247  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5248printf "%s\n" "$CC" >&6; }
5249else
5250  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5251printf "%s\n" "no" >&6; }
5252fi
5253
5254
5255    test -n "$CC" && break
5256  done
5257fi
5258if test -z "$CC"; then
5259  ac_ct_CC=$CC
5260  for ac_prog in cl.exe
5261do
5262  # Extract the first word of "$ac_prog", so it can be a program name with args.
5263set dummy $ac_prog; ac_word=$2
5264{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5265printf %s "checking for $ac_word... " >&6; }
5266if test ${ac_cv_prog_ac_ct_CC+y}
5267then :
5268  printf %s "(cached) " >&6
5269else $as_nop
5270  if test -n "$ac_ct_CC"; then
5271  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5272else
5273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5274for as_dir in $PATH
5275do
5276  IFS=$as_save_IFS
5277  case $as_dir in #(((
5278    '') as_dir=./ ;;
5279    */) ;;
5280    *) as_dir=$as_dir/ ;;
5281  esac
5282    for ac_exec_ext in '' $ac_executable_extensions; do
5283  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5284    ac_cv_prog_ac_ct_CC="$ac_prog"
5285    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5286    break 2
5287  fi
5288done
5289  done
5290IFS=$as_save_IFS
5291
5292fi
5293fi
5294ac_ct_CC=$ac_cv_prog_ac_ct_CC
5295if test -n "$ac_ct_CC"; then
5296  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5297printf "%s\n" "$ac_ct_CC" >&6; }
5298else
5299  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5300printf "%s\n" "no" >&6; }
5301fi
5302
5303
5304  test -n "$ac_ct_CC" && break
5305done
5306
5307  if test "x$ac_ct_CC" = x; then
5308    CC=""
5309  else
5310    case $cross_compiling:$ac_tool_warned in
5311yes:)
5312{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5313printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5314ac_tool_warned=yes ;;
5315esac
5316    CC=$ac_ct_CC
5317  fi
5318fi
5319
5320fi
5321if test -z "$CC"; then
5322  if test -n "$ac_tool_prefix"; then
5323  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5324set dummy ${ac_tool_prefix}clang; ac_word=$2
5325{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5326printf %s "checking for $ac_word... " >&6; }
5327if test ${ac_cv_prog_CC+y}
5328then :
5329  printf %s "(cached) " >&6
5330else $as_nop
5331  if test -n "$CC"; then
5332  ac_cv_prog_CC="$CC" # Let the user override the test.
5333else
5334as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5335for as_dir in $PATH
5336do
5337  IFS=$as_save_IFS
5338  case $as_dir in #(((
5339    '') as_dir=./ ;;
5340    */) ;;
5341    *) as_dir=$as_dir/ ;;
5342  esac
5343    for ac_exec_ext in '' $ac_executable_extensions; do
5344  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5345    ac_cv_prog_CC="${ac_tool_prefix}clang"
5346    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5347    break 2
5348  fi
5349done
5350  done
5351IFS=$as_save_IFS
5352
5353fi
5354fi
5355CC=$ac_cv_prog_CC
5356if test -n "$CC"; then
5357  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5358printf "%s\n" "$CC" >&6; }
5359else
5360  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5361printf "%s\n" "no" >&6; }
5362fi
5363
5364
5365fi
5366if test -z "$ac_cv_prog_CC"; then
5367  ac_ct_CC=$CC
5368  # Extract the first word of "clang", so it can be a program name with args.
5369set dummy clang; ac_word=$2
5370{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5371printf %s "checking for $ac_word... " >&6; }
5372if test ${ac_cv_prog_ac_ct_CC+y}
5373then :
5374  printf %s "(cached) " >&6
5375else $as_nop
5376  if test -n "$ac_ct_CC"; then
5377  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5378else
5379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5380for as_dir in $PATH
5381do
5382  IFS=$as_save_IFS
5383  case $as_dir in #(((
5384    '') as_dir=./ ;;
5385    */) ;;
5386    *) as_dir=$as_dir/ ;;
5387  esac
5388    for ac_exec_ext in '' $ac_executable_extensions; do
5389  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5390    ac_cv_prog_ac_ct_CC="clang"
5391    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5392    break 2
5393  fi
5394done
5395  done
5396IFS=$as_save_IFS
5397
5398fi
5399fi
5400ac_ct_CC=$ac_cv_prog_ac_ct_CC
5401if test -n "$ac_ct_CC"; then
5402  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5403printf "%s\n" "$ac_ct_CC" >&6; }
5404else
5405  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5406printf "%s\n" "no" >&6; }
5407fi
5408
5409  if test "x$ac_ct_CC" = x; then
5410    CC=""
5411  else
5412    case $cross_compiling:$ac_tool_warned in
5413yes:)
5414{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5415printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5416ac_tool_warned=yes ;;
5417esac
5418    CC=$ac_ct_CC
5419  fi
5420else
5421  CC="$ac_cv_prog_CC"
5422fi
5423
5424fi
5425
5426
5427test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5428printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5429as_fn_error $? "no acceptable C compiler found in \$PATH
5430See \`config.log' for more details" "$LINENO" 5; }
5431
5432# Provide some information about the compiler.
5433printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5434set X $ac_compile
5435ac_compiler=$2
5436for ac_option in --version -v -V -qversion -version; do
5437  { { ac_try="$ac_compiler $ac_option >&5"
5438case "(($ac_try" in
5439  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5440  *) ac_try_echo=$ac_try;;
5441esac
5442eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5443printf "%s\n" "$ac_try_echo"; } >&5
5444  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5445  ac_status=$?
5446  if test -s conftest.err; then
5447    sed '10a\
5448... rest of stderr output deleted ...
5449         10q' conftest.err >conftest.er1
5450    cat conftest.er1 >&5
5451  fi
5452  rm -f conftest.er1 conftest.err
5453  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5454  test $ac_status = 0; }
5455done
5456
5457{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
5458printf %s "checking whether the compiler supports GNU C... " >&6; }
5459if test ${ac_cv_c_compiler_gnu+y}
5460then :
5461  printf %s "(cached) " >&6
5462else $as_nop
5463  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5464/* end confdefs.h.  */
5465
5466int
5467main (void)
5468{
5469#ifndef __GNUC__
5470       choke me
5471#endif
5472
5473  ;
5474  return 0;
5475}
5476_ACEOF
5477if ac_fn_c_try_compile "$LINENO"
5478then :
5479  ac_compiler_gnu=yes
5480else $as_nop
5481  ac_compiler_gnu=no
5482fi
5483rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5484ac_cv_c_compiler_gnu=$ac_compiler_gnu
5485
5486fi
5487{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5488printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
5489ac_compiler_gnu=$ac_cv_c_compiler_gnu
5490
5491if test $ac_compiler_gnu = yes; then
5492  GCC=yes
5493else
5494  GCC=
5495fi
5496ac_test_CFLAGS=${CFLAGS+y}
5497ac_save_CFLAGS=$CFLAGS
5498{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5499printf %s "checking whether $CC accepts -g... " >&6; }
5500if test ${ac_cv_prog_cc_g+y}
5501then :
5502  printf %s "(cached) " >&6
5503else $as_nop
5504  ac_save_c_werror_flag=$ac_c_werror_flag
5505   ac_c_werror_flag=yes
5506   ac_cv_prog_cc_g=no
5507   CFLAGS="-g"
5508   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5509/* end confdefs.h.  */
5510
5511int
5512main (void)
5513{
5514
5515  ;
5516  return 0;
5517}
5518_ACEOF
5519if ac_fn_c_try_compile "$LINENO"
5520then :
5521  ac_cv_prog_cc_g=yes
5522else $as_nop
5523  CFLAGS=""
5524      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5525/* end confdefs.h.  */
5526
5527int
5528main (void)
5529{
5530
5531  ;
5532  return 0;
5533}
5534_ACEOF
5535if ac_fn_c_try_compile "$LINENO"
5536then :
5537
5538else $as_nop
5539  ac_c_werror_flag=$ac_save_c_werror_flag
5540	 CFLAGS="-g"
5541	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5542/* end confdefs.h.  */
5543
5544int
5545main (void)
5546{
5547
5548  ;
5549  return 0;
5550}
5551_ACEOF
5552if ac_fn_c_try_compile "$LINENO"
5553then :
5554  ac_cv_prog_cc_g=yes
5555fi
5556rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5557fi
5558rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5559fi
5560rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5561   ac_c_werror_flag=$ac_save_c_werror_flag
5562fi
5563{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5564printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5565if test $ac_test_CFLAGS; then
5566  CFLAGS=$ac_save_CFLAGS
5567elif test $ac_cv_prog_cc_g = yes; then
5568  if test "$GCC" = yes; then
5569    CFLAGS="-g -O2"
5570  else
5571    CFLAGS="-g"
5572  fi
5573else
5574  if test "$GCC" = yes; then
5575    CFLAGS="-O2"
5576  else
5577    CFLAGS=
5578  fi
5579fi
5580ac_prog_cc_stdc=no
5581if test x$ac_prog_cc_stdc = xno
5582then :
5583  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5584printf %s "checking for $CC option to enable C11 features... " >&6; }
5585if test ${ac_cv_prog_cc_c11+y}
5586then :
5587  printf %s "(cached) " >&6
5588else $as_nop
5589  ac_cv_prog_cc_c11=no
5590ac_save_CC=$CC
5591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5592/* end confdefs.h.  */
5593$ac_c_conftest_c11_program
5594_ACEOF
5595for ac_arg in '' -std=gnu11
5596do
5597  CC="$ac_save_CC $ac_arg"
5598  if ac_fn_c_try_compile "$LINENO"
5599then :
5600  ac_cv_prog_cc_c11=$ac_arg
5601fi
5602rm -f core conftest.err conftest.$ac_objext conftest.beam
5603  test "x$ac_cv_prog_cc_c11" != "xno" && break
5604done
5605rm -f conftest.$ac_ext
5606CC=$ac_save_CC
5607fi
5608
5609if test "x$ac_cv_prog_cc_c11" = xno
5610then :
5611  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5612printf "%s\n" "unsupported" >&6; }
5613else $as_nop
5614  if test "x$ac_cv_prog_cc_c11" = x
5615then :
5616  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5617printf "%s\n" "none needed" >&6; }
5618else $as_nop
5619  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5620printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
5621     CC="$CC $ac_cv_prog_cc_c11"
5622fi
5623  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5624  ac_prog_cc_stdc=c11
5625fi
5626fi
5627if test x$ac_prog_cc_stdc = xno
5628then :
5629  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5630printf %s "checking for $CC option to enable C99 features... " >&6; }
5631if test ${ac_cv_prog_cc_c99+y}
5632then :
5633  printf %s "(cached) " >&6
5634else $as_nop
5635  ac_cv_prog_cc_c99=no
5636ac_save_CC=$CC
5637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5638/* end confdefs.h.  */
5639$ac_c_conftest_c99_program
5640_ACEOF
5641for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
5642do
5643  CC="$ac_save_CC $ac_arg"
5644  if ac_fn_c_try_compile "$LINENO"
5645then :
5646  ac_cv_prog_cc_c99=$ac_arg
5647fi
5648rm -f core conftest.err conftest.$ac_objext conftest.beam
5649  test "x$ac_cv_prog_cc_c99" != "xno" && break
5650done
5651rm -f conftest.$ac_ext
5652CC=$ac_save_CC
5653fi
5654
5655if test "x$ac_cv_prog_cc_c99" = xno
5656then :
5657  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5658printf "%s\n" "unsupported" >&6; }
5659else $as_nop
5660  if test "x$ac_cv_prog_cc_c99" = x
5661then :
5662  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5663printf "%s\n" "none needed" >&6; }
5664else $as_nop
5665  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5666printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
5667     CC="$CC $ac_cv_prog_cc_c99"
5668fi
5669  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5670  ac_prog_cc_stdc=c99
5671fi
5672fi
5673if test x$ac_prog_cc_stdc = xno
5674then :
5675  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5676printf %s "checking for $CC option to enable C89 features... " >&6; }
5677if test ${ac_cv_prog_cc_c89+y}
5678then :
5679  printf %s "(cached) " >&6
5680else $as_nop
5681  ac_cv_prog_cc_c89=no
5682ac_save_CC=$CC
5683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5684/* end confdefs.h.  */
5685$ac_c_conftest_c89_program
5686_ACEOF
5687for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5688do
5689  CC="$ac_save_CC $ac_arg"
5690  if ac_fn_c_try_compile "$LINENO"
5691then :
5692  ac_cv_prog_cc_c89=$ac_arg
5693fi
5694rm -f core conftest.err conftest.$ac_objext conftest.beam
5695  test "x$ac_cv_prog_cc_c89" != "xno" && break
5696done
5697rm -f conftest.$ac_ext
5698CC=$ac_save_CC
5699fi
5700
5701if test "x$ac_cv_prog_cc_c89" = xno
5702then :
5703  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5704printf "%s\n" "unsupported" >&6; }
5705else $as_nop
5706  if test "x$ac_cv_prog_cc_c89" = x
5707then :
5708  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5709printf "%s\n" "none needed" >&6; }
5710else $as_nop
5711  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5712printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
5713     CC="$CC $ac_cv_prog_cc_c89"
5714fi
5715  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5716  ac_prog_cc_stdc=c89
5717fi
5718fi
5719
5720ac_ext=c
5721ac_cpp='$CPP $CPPFLAGS'
5722ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5723ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5724ac_compiler_gnu=$ac_cv_c_compiler_gnu
5725
5726
5727{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5728printf %s "checking $CC dependency flag... " >&6; }
5729echo 'void f(void){}' >conftest.c
5730if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5731	DEPFLAG="-MM"
5732else
5733  if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5734	DEPFLAG="-xM1"
5735  else
5736	DEPFLAG="-MM"  # dunno do something
5737  fi
5738fi
5739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5740printf "%s\n" "$DEPFLAG" >&6; }
5741rm -f conftest.c
5742
5743
5744
5745
5746
5747{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5748printf %s "checking whether $CC supports -Werror... " >&6; }
5749cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5750if eval test \${cv_prog_cc_flag_$cache+y}
5751then :
5752  printf %s "(cached) " >&6
5753else $as_nop
5754
5755echo 'void f(void){}' >conftest.c
5756if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5757eval "cv_prog_cc_flag_$cache=yes"
5758else
5759eval "cv_prog_cc_flag_$cache=no"
5760fi
5761rm -f conftest conftest.o conftest.c
5762
5763fi
5764
5765if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5766{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5767printf "%s\n" "yes" >&6; }
5768:
5769ERRFLAG="-Werror"
5770else
5771{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5772printf "%s\n" "no" >&6; }
5773:
5774ERRFLAG="-errwarn"
5775fi
5776
5777
5778
5779{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5780printf %s "checking whether $CC supports -Wall... " >&6; }
5781cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5782if eval test \${cv_prog_cc_flag_$cache+y}
5783then :
5784  printf %s "(cached) " >&6
5785else $as_nop
5786
5787echo 'void f(void){}' >conftest.c
5788if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5789eval "cv_prog_cc_flag_$cache=yes"
5790else
5791eval "cv_prog_cc_flag_$cache=no"
5792fi
5793rm -f conftest conftest.o conftest.c
5794
5795fi
5796
5797if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5798{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5799printf "%s\n" "yes" >&6; }
5800:
5801ERRFLAG="$ERRFLAG -Wall"
5802else
5803{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5804printf "%s\n" "no" >&6; }
5805:
5806ERRFLAG="$ERRFLAG -errfmt"
5807fi
5808
5809
5810
5811
5812
5813{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5814printf %s "checking whether $CC supports -std=c99... " >&6; }
5815cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5816if eval test \${cv_prog_cc_flag_$cache+y}
5817then :
5818  printf %s "(cached) " >&6
5819else $as_nop
5820
5821echo 'void f(void){}' >conftest.c
5822if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5823eval "cv_prog_cc_flag_$cache=yes"
5824else
5825eval "cv_prog_cc_flag_$cache=no"
5826fi
5827rm -f conftest conftest.o conftest.c
5828
5829fi
5830
5831if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5832{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5833printf "%s\n" "yes" >&6; }
5834:
5835C99FLAG="-std=c99"
5836else
5837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5838printf "%s\n" "no" >&6; }
5839:
5840
5841fi
5842
5843
5844
5845{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5846printf %s "checking whether $CC supports -xc99... " >&6; }
5847cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5848if eval test \${cv_prog_cc_flag_$cache+y}
5849then :
5850  printf %s "(cached) " >&6
5851else $as_nop
5852
5853echo 'void f(void){}' >conftest.c
5854if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5855eval "cv_prog_cc_flag_$cache=yes"
5856else
5857eval "cv_prog_cc_flag_$cache=no"
5858fi
5859rm -f conftest conftest.o conftest.c
5860
5861fi
5862
5863if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5864{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5865printf "%s\n" "yes" >&6; }
5866:
5867C99FLAG="-xc99"
5868else
5869{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5870printf "%s\n" "no" >&6; }
5871:
5872
5873fi
5874
5875
5876ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default
5877"
5878if test "x$ac_cv_header_getopt_h" = xyes
5879then :
5880  printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
5881
5882fi
5883ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default
5884"
5885if test "x$ac_cv_header_time_h" = xyes
5886then :
5887  printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h
5888
5889fi
5890
5891
5892
5893
5894
5895{ printf "%s\n" "$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
5896printf %s "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; }
5897cache=`printf "%s\n" "$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`
5898if eval test \${cv_prog_cc_flag_needed_$cache+y}
5899then :
5900  printf %s "(cached) " >&6
5901else $as_nop
5902
5903echo '
5904#include "confdefs.h"
5905#include <stdlib.h>
5906#include <ctype.h>
5907#include <sys/time.h>
5908#ifdef HAVE_TIME_H
5909#include <time.h>
5910#endif
5911#include <unistd.h>
5912#include <netdb.h>
5913#ifdef HAVE_GETOPT_H
5914#include <getopt.h>
5915#endif
5916
5917int test(void) {
5918	int a;
5919	char **opts = NULL;
5920	struct timeval tv;
5921	char *t;
5922	time_t time = 0;
5923	char *buf = NULL;
5924	const char* str = NULL;
5925	struct msghdr msg;
5926	msg.msg_control = 0;
5927	t = ctime_r(&time, buf);
5928	tv.tv_usec = 10;
5929	srandom(32);
5930	a = getopt(2, opts, "a");
5931	a = isascii(32);
5932	str = gai_strerror(0);
5933	if(str && t && tv.tv_usec && msg.msg_control)
5934		a = 0;
5935	return a;
5936}
5937' > conftest.c
5938echo 'void f(void){}' >>conftest.c
5939if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5940eval "cv_prog_cc_flag_needed_$cache=no"
5941else
5942
5943if 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
5944eval "cv_prog_cc_flag_needed_$cache=yes"
5945else
5946eval "cv_prog_cc_flag_needed_$cache=fail"
5947#echo 'Test with flag fails too!'
5948#cat conftest.c
5949#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"
5950#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`
5951#exit 1
5952fi
5953
5954fi
5955rm -f conftest conftest.c conftest.o
5956
5957fi
5958
5959if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5960{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5961printf "%s\n" "yes" >&6; }
5962:
5963CFLAGS="$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"
5964else
5965if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5967printf "%s\n" "no" >&6; }
5968#echo 'Test with flag is no!'
5969#cat conftest.c
5970#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"
5971#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`
5972#exit 1
5973:
5974
5975else
5976{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5977printf "%s\n" "failed" >&6; }
5978:
5979
5980fi
5981fi
5982
5983
5984
5985
5986
5987{ printf "%s\n" "$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
5988printf %s "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; }
5989cache=`printf "%s\n" "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE" | $as_tr_sh`
5990if eval test \${cv_prog_cc_flag_needed_$cache+y}
5991then :
5992  printf %s "(cached) " >&6
5993else $as_nop
5994
5995echo '
5996#include "confdefs.h"
5997#include <stdlib.h>
5998#include <ctype.h>
5999#include <sys/time.h>
6000#ifdef HAVE_TIME_H
6001#include <time.h>
6002#endif
6003#include <unistd.h>
6004#include <netdb.h>
6005#ifdef HAVE_GETOPT_H
6006#include <getopt.h>
6007#endif
6008
6009int test(void) {
6010	int a;
6011	char **opts = NULL;
6012	struct timeval tv;
6013	char *t;
6014	time_t time = 0;
6015	char *buf = NULL;
6016	const char* str = NULL;
6017	struct msghdr msg;
6018	msg.msg_control = 0;
6019	t = ctime_r(&time, buf);
6020	tv.tv_usec = 10;
6021	srandom(32);
6022	a = getopt(2, opts, "a");
6023	a = isascii(32);
6024	str = gai_strerror(0);
6025	if(str && t && tv.tv_usec && msg.msg_control)
6026		a = 0;
6027	return a;
6028}
6029' > conftest.c
6030echo 'void f(void){}' >>conftest.c
6031if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6032eval "cv_prog_cc_flag_needed_$cache=no"
6033else
6034
6035if 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
6036eval "cv_prog_cc_flag_needed_$cache=yes"
6037else
6038eval "cv_prog_cc_flag_needed_$cache=fail"
6039#echo 'Test with flag fails too!'
6040#cat conftest.c
6041#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"
6042#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`
6043#exit 1
6044fi
6045
6046fi
6047rm -f conftest conftest.c conftest.o
6048
6049fi
6050
6051if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6052{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6053printf "%s\n" "yes" >&6; }
6054:
6055CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
6056else
6057if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6058{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6059printf "%s\n" "no" >&6; }
6060#echo 'Test with flag is no!'
6061#cat conftest.c
6062#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"
6063#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`
6064#exit 1
6065:
6066
6067else
6068{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6069printf "%s\n" "failed" >&6; }
6070:
6071
6072fi
6073fi
6074
6075
6076
6077
6078
6079{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
6080printf %s "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
6081cache=`printf "%s\n" "$C99FLAG" | $as_tr_sh`
6082if eval test \${cv_prog_cc_flag_needed_$cache+y}
6083then :
6084  printf %s "(cached) " >&6
6085else $as_nop
6086
6087echo '
6088#include <stdbool.h>
6089#include <ctype.h>
6090int test(void) {
6091        int a = 0;
6092        return a;
6093}
6094' > conftest.c
6095echo 'void f(void){}' >>conftest.c
6096if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6097eval "cv_prog_cc_flag_needed_$cache=no"
6098else
6099
6100if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
6101eval "cv_prog_cc_flag_needed_$cache=yes"
6102else
6103eval "cv_prog_cc_flag_needed_$cache=fail"
6104#echo 'Test with flag fails too!'
6105#cat conftest.c
6106#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
6107#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
6108#exit 1
6109fi
6110
6111fi
6112rm -f conftest conftest.c conftest.o
6113
6114fi
6115
6116if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6117{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6118printf "%s\n" "yes" >&6; }
6119:
6120CFLAGS="$CFLAGS $C99FLAG"
6121else
6122if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6123{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6124printf "%s\n" "no" >&6; }
6125#echo 'Test with flag is no!'
6126#cat conftest.c
6127#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
6128#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
6129#exit 1
6130:
6131
6132else
6133{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6134printf "%s\n" "failed" >&6; }
6135:
6136
6137fi
6138fi
6139
6140
6141
6142
6143
6144{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
6145printf %s "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
6146cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
6147if eval test \${cv_prog_cc_flag_needed_$cache+y}
6148then :
6149  printf %s "(cached) " >&6
6150else $as_nop
6151
6152echo '
6153#include <ctype.h>
6154
6155int test(void) {
6156        int a;
6157        a = isascii(32);
6158        return a;
6159}
6160' > conftest.c
6161echo 'void f(void){}' >>conftest.c
6162if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6163eval "cv_prog_cc_flag_needed_$cache=no"
6164else
6165
6166if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
6167eval "cv_prog_cc_flag_needed_$cache=yes"
6168else
6169eval "cv_prog_cc_flag_needed_$cache=fail"
6170#echo 'Test with flag fails too!'
6171#cat conftest.c
6172#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
6173#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
6174#exit 1
6175fi
6176
6177fi
6178rm -f conftest conftest.c conftest.o
6179
6180fi
6181
6182if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6183{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6184printf "%s\n" "yes" >&6; }
6185:
6186CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
6187else
6188if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6189{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6190printf "%s\n" "no" >&6; }
6191#echo 'Test with flag is no!'
6192#cat conftest.c
6193#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
6194#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
6195#exit 1
6196:
6197
6198else
6199{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6200printf "%s\n" "failed" >&6; }
6201:
6202
6203fi
6204fi
6205
6206
6207
6208
6209
6210{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
6211printf %s "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
6212cache=_D_GNU_SOURCE
6213if eval test \${cv_prog_cc_flag_needed_$cache+y}
6214then :
6215  printf %s "(cached) " >&6
6216else $as_nop
6217
6218echo '
6219#include <netinet/in.h>
6220
6221int test(void) {
6222        struct in6_pktinfo inf;
6223	int a = (int)sizeof(inf);
6224        return a;
6225}
6226' > conftest.c
6227echo 'void f(void){}' >>conftest.c
6228if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6229eval "cv_prog_cc_flag_needed_$cache=no"
6230else
6231
6232if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
6233eval "cv_prog_cc_flag_needed_$cache=yes"
6234else
6235eval "cv_prog_cc_flag_needed_$cache=fail"
6236#echo 'Test with flag fails too!'
6237#cat conftest.c
6238#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
6239#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
6240#exit 1
6241fi
6242
6243fi
6244rm -f conftest conftest.c conftest.o
6245
6246fi
6247
6248if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6249{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6250printf "%s\n" "yes" >&6; }
6251:
6252CFLAGS="$CFLAGS -D_GNU_SOURCE"
6253else
6254if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6255{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6256printf "%s\n" "no" >&6; }
6257#echo 'Test with flag is no!'
6258#cat conftest.c
6259#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
6260#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
6261#exit 1
6262:
6263
6264else
6265{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6266printf "%s\n" "failed" >&6; }
6267:
6268
6269fi
6270fi
6271
6272
6273# check again for GNU_SOURCE for setresgid. May fail if setresgid
6274# is not available at all. -D_FRSRESGID is to make this check unique.
6275# otherwise we would get the previous cached result.
6276
6277
6278
6279{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
6280printf %s "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
6281cache=_D_GNU_SOURCE__D_FRSRESGID
6282if eval test \${cv_prog_cc_flag_needed_$cache+y}
6283then :
6284  printf %s "(cached) " >&6
6285else $as_nop
6286
6287echo '
6288#include <unistd.h>
6289
6290int test(void) {
6291	int a = setresgid(0,0,0);
6292	a = setresuid(0,0,0);
6293        return a;
6294}
6295' > conftest.c
6296echo 'void f(void){}' >>conftest.c
6297if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6298eval "cv_prog_cc_flag_needed_$cache=no"
6299else
6300
6301if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
6302eval "cv_prog_cc_flag_needed_$cache=yes"
6303else
6304eval "cv_prog_cc_flag_needed_$cache=fail"
6305#echo 'Test with flag fails too!'
6306#cat conftest.c
6307#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
6308#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
6309#exit 1
6310fi
6311
6312fi
6313rm -f conftest conftest.c conftest.o
6314
6315fi
6316
6317if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6318{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6319printf "%s\n" "yes" >&6; }
6320:
6321CFLAGS="$CFLAGS -D_GNU_SOURCE"
6322else
6323if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6324{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6325printf "%s\n" "no" >&6; }
6326#echo 'Test with flag is no!'
6327#cat conftest.c
6328#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
6329#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
6330#exit 1
6331:
6332
6333else
6334{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6335printf "%s\n" "failed" >&6; }
6336:
6337
6338fi
6339fi
6340
6341
6342
6343
6344
6345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
6346printf %s "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
6347cache=_D_POSIX_C_SOURCE_200112
6348if eval test \${cv_prog_cc_flag_needed_$cache+y}
6349then :
6350  printf %s "(cached) " >&6
6351else $as_nop
6352
6353echo '
6354#include "confdefs.h"
6355#ifdef HAVE_TIME_H
6356#include <time.h>
6357#endif
6358#include <netdb.h>
6359
6360int test(void) {
6361        int a = 0;
6362        char *t;
6363        time_t time = 0;
6364        char *buf = NULL;
6365	const char* str = NULL;
6366        t = ctime_r(&time, buf);
6367	str = gai_strerror(0);
6368	if(t && str)
6369		a = 0;
6370        return a;
6371}
6372' > conftest.c
6373echo 'void f(void){}' >>conftest.c
6374if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6375eval "cv_prog_cc_flag_needed_$cache=no"
6376else
6377
6378if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
6379eval "cv_prog_cc_flag_needed_$cache=yes"
6380else
6381eval "cv_prog_cc_flag_needed_$cache=fail"
6382#echo 'Test with flag fails too!'
6383#cat conftest.c
6384#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
6385#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
6386#exit 1
6387fi
6388
6389fi
6390rm -f conftest conftest.c conftest.o
6391
6392fi
6393
6394if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6395{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6396printf "%s\n" "yes" >&6; }
6397:
6398CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
6399else
6400if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6401{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6402printf "%s\n" "no" >&6; }
6403#echo 'Test with flag is no!'
6404#cat conftest.c
6405#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
6406#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
6407#exit 1
6408:
6409
6410else
6411{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6412printf "%s\n" "failed" >&6; }
6413:
6414
6415fi
6416fi
6417
6418
6419
6420
6421
6422{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
6423printf %s "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
6424cache=_D__EXTENSIONS__
6425if eval test \${cv_prog_cc_flag_needed_$cache+y}
6426then :
6427  printf %s "(cached) " >&6
6428else $as_nop
6429
6430echo '
6431#include "confdefs.h"
6432#include <stdlib.h>
6433#include <ctype.h>
6434#include <sys/time.h>
6435#ifdef HAVE_TIME_H
6436#include <time.h>
6437#endif
6438#include <unistd.h>
6439#ifdef HAVE_GETOPT_H
6440#include <getopt.h>
6441#endif
6442
6443int test(void) {
6444        int a;
6445        char **opts = NULL;
6446        struct timeval tv;
6447        tv.tv_usec = 10;
6448        srandom(32);
6449        a = getopt(2, opts, "a");
6450        a = isascii(32);
6451	if(tv.tv_usec)
6452		a = 0;
6453        return a;
6454}
6455' > conftest.c
6456echo 'void f(void){}' >>conftest.c
6457if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
6458eval "cv_prog_cc_flag_needed_$cache=no"
6459else
6460
6461if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
6462eval "cv_prog_cc_flag_needed_$cache=yes"
6463else
6464eval "cv_prog_cc_flag_needed_$cache=fail"
6465#echo 'Test with flag fails too!'
6466#cat conftest.c
6467#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
6468#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
6469#exit 1
6470fi
6471
6472fi
6473rm -f conftest conftest.c conftest.o
6474
6475fi
6476
6477if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
6478{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6479printf "%s\n" "yes" >&6; }
6480:
6481CFLAGS="$CFLAGS -D__EXTENSIONS__"
6482else
6483if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
6484{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6485printf "%s\n" "no" >&6; }
6486#echo 'Test with flag is no!'
6487#cat conftest.c
6488#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
6489#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
6490#exit 1
6491:
6492
6493else
6494{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6495printf "%s\n" "failed" >&6; }
6496:
6497
6498fi
6499fi
6500
6501
6502
6503
6504# debug mode flags warnings
6505# Check whether --enable-checking was given.
6506if test ${enable_checking+y}
6507then :
6508  enableval=$enable_checking;
6509fi
6510
6511# Check whether --enable-debug was given.
6512if test ${enable_debug+y}
6513then :
6514  enableval=$enable_debug;
6515fi
6516
6517if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
6518else debug_enabled="$enable_checking"; fi
6519
6520case "$debug_enabled" in
6521        yes)
6522
6523
6524{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
6525printf %s "checking whether $CC supports -W... " >&6; }
6526cache=`echo W | sed 'y%.=/+-%___p_%'`
6527if eval test \${cv_prog_cc_flag_$cache+y}
6528then :
6529  printf %s "(cached) " >&6
6530else $as_nop
6531
6532echo 'void f(void){}' >conftest.c
6533if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
6534eval "cv_prog_cc_flag_$cache=yes"
6535else
6536eval "cv_prog_cc_flag_$cache=no"
6537fi
6538rm -f conftest conftest.o conftest.c
6539
6540fi
6541
6542if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6544printf "%s\n" "yes" >&6; }
6545:
6546CFLAGS="$CFLAGS -W"
6547else
6548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6549printf "%s\n" "no" >&6; }
6550:
6551
6552fi
6553
6554
6555
6556{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
6557printf %s "checking whether $CC supports -Wall... " >&6; }
6558cache=`echo Wall | sed 'y%.=/+-%___p_%'`
6559if eval test \${cv_prog_cc_flag_$cache+y}
6560then :
6561  printf %s "(cached) " >&6
6562else $as_nop
6563
6564echo 'void f(void){}' >conftest.c
6565if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
6566eval "cv_prog_cc_flag_$cache=yes"
6567else
6568eval "cv_prog_cc_flag_$cache=no"
6569fi
6570rm -f conftest conftest.o conftest.c
6571
6572fi
6573
6574if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6576printf "%s\n" "yes" >&6; }
6577:
6578CFLAGS="$CFLAGS -Wall"
6579else
6580{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6581printf "%s\n" "no" >&6; }
6582:
6583
6584fi
6585
6586
6587
6588{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
6589printf %s "checking whether $CC supports -Wextra... " >&6; }
6590cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
6591if eval test \${cv_prog_cc_flag_$cache+y}
6592then :
6593  printf %s "(cached) " >&6
6594else $as_nop
6595
6596echo 'void f(void){}' >conftest.c
6597if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
6598eval "cv_prog_cc_flag_$cache=yes"
6599else
6600eval "cv_prog_cc_flag_$cache=no"
6601fi
6602rm -f conftest conftest.o conftest.c
6603
6604fi
6605
6606if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6607{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6608printf "%s\n" "yes" >&6; }
6609:
6610CFLAGS="$CFLAGS -Wextra"
6611else
6612{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6613printf "%s\n" "no" >&6; }
6614:
6615
6616fi
6617
6618
6619
6620{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
6621printf %s "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
6622cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
6623if eval test \${cv_prog_cc_flag_$cache+y}
6624then :
6625  printf %s "(cached) " >&6
6626else $as_nop
6627
6628echo 'void f(void){}' >conftest.c
6629if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
6630eval "cv_prog_cc_flag_$cache=yes"
6631else
6632eval "cv_prog_cc_flag_$cache=no"
6633fi
6634rm -f conftest conftest.o conftest.c
6635
6636fi
6637
6638if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
6639{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6640printf "%s\n" "yes" >&6; }
6641:
6642CFLAGS="$CFLAGS -Wdeclaration-after-statement"
6643else
6644{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6645printf "%s\n" "no" >&6; }
6646:
6647
6648fi
6649
6650
6651printf "%s\n" "#define UNBOUND_DEBUG /**/" >>confdefs.h
6652
6653		;;
6654	no|*)
6655		# nothing to do.
6656		;;
6657esac
6658if test "$default_cflags" = "yes"; then
6659	# only when CFLAGS was "" at the start, if the users wants to
6660	# override we shouldn't add default cflags, because they wouldn't
6661	# be able to turn off these options and set the CFLAGS wanted.
6662
6663    # Check whether --enable-flto was given.
6664if test ${enable_flto+y}
6665then :
6666  enableval=$enable_flto;
6667fi
6668
6669    if test "x$enable_flto" != "xno"
6670then :
6671
6672        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
6673printf %s "checking if $CC supports -flto... " >&6; }
6674        BAKCFLAGS="$CFLAGS"
6675        CFLAGS="$CFLAGS -flto"
6676        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6677/* end confdefs.h.  */
6678
6679int
6680main (void)
6681{
6682
6683  ;
6684  return 0;
6685}
6686_ACEOF
6687if ac_fn_c_try_link "$LINENO"
6688then :
6689
6690            if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
6691                CFLAGS="$BAKCFLAGS"
6692                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6693printf "%s\n" "no" >&6; }
6694            else
6695                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6696printf "%s\n" "yes" >&6; }
6697            fi
6698            rm -f conftest conftest.c conftest.o
6699
6700else $as_nop
6701  CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6702printf "%s\n" "no" >&6; }
6703fi
6704rm -f core conftest.err conftest.$ac_objext conftest.beam \
6705    conftest$ac_exeext conftest.$ac_ext
6706
6707fi
6708
6709
6710    # Check whether --enable-pie was given.
6711if test ${enable_pie+y}
6712then :
6713  enableval=$enable_pie;
6714fi
6715
6716    if test "x$enable_pie" = "xyes"
6717then :
6718
6719	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6720printf %s "checking if $CC supports PIE... " >&6; }
6721	BAKLDFLAGS="$LDFLAGS"
6722	BAKCFLAGS="$CFLAGS"
6723	LDFLAGS="$LDFLAGS -pie"
6724	CFLAGS="$CFLAGS -fPIE"
6725	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6726/* end confdefs.h.  */
6727
6728int
6729main (void)
6730{
6731
6732  ;
6733  return 0;
6734}
6735_ACEOF
6736if ac_fn_c_try_link "$LINENO"
6737then :
6738
6739	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6740		LDFLAGS="$BAKLDFLAGS"
6741		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6742printf "%s\n" "no" >&6; }
6743	    else
6744		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6745printf "%s\n" "yes" >&6; }
6746	    fi
6747	    rm -f conftest conftest.c conftest.o
6748
6749else $as_nop
6750  LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6751printf "%s\n" "no" >&6; }
6752fi
6753rm -f core conftest.err conftest.$ac_objext conftest.beam \
6754    conftest$ac_exeext conftest.$ac_ext
6755
6756fi
6757
6758
6759    # Check whether --enable-relro_now was given.
6760if test ${enable_relro_now+y}
6761then :
6762  enableval=$enable_relro_now;
6763fi
6764
6765    if test "x$enable_relro_now" = "xyes"
6766then :
6767
6768	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6769printf %s "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6770	BAKLDFLAGS="$LDFLAGS"
6771	LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6772	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6773/* end confdefs.h.  */
6774
6775int
6776main (void)
6777{
6778
6779  ;
6780  return 0;
6781}
6782_ACEOF
6783if ac_fn_c_try_link "$LINENO"
6784then :
6785
6786	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6787		LDFLAGS="$BAKLDFLAGS"
6788		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6789printf "%s\n" "no" >&6; }
6790	    else
6791		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6792printf "%s\n" "yes" >&6; }
6793	    fi
6794	    rm -f conftest conftest.c conftest.o
6795
6796else $as_nop
6797  LDFLAGS="$BAKLDFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6798printf "%s\n" "no" >&6; }
6799fi
6800rm -f core conftest.err conftest.$ac_objext conftest.beam \
6801    conftest$ac_exeext conftest.$ac_ext
6802
6803fi
6804
6805fi
6806
6807{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6808printf %s "checking for inline... " >&6; }
6809if test ${ac_cv_c_inline+y}
6810then :
6811  printf %s "(cached) " >&6
6812else $as_nop
6813  ac_cv_c_inline=no
6814for ac_kw in inline __inline__ __inline; do
6815  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6816/* end confdefs.h.  */
6817#ifndef __cplusplus
6818typedef int foo_t;
6819static $ac_kw foo_t static_foo (void) {return 0; }
6820$ac_kw foo_t foo (void) {return 0; }
6821#endif
6822
6823_ACEOF
6824if ac_fn_c_try_compile "$LINENO"
6825then :
6826  ac_cv_c_inline=$ac_kw
6827fi
6828rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6829  test "$ac_cv_c_inline" != no && break
6830done
6831
6832fi
6833{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6834printf "%s\n" "$ac_cv_c_inline" >&6; }
6835
6836case $ac_cv_c_inline in
6837  inline | yes) ;;
6838  *)
6839    case $ac_cv_c_inline in
6840      no) ac_val=;;
6841      *) ac_val=$ac_cv_c_inline;;
6842    esac
6843    cat >>confdefs.h <<_ACEOF
6844#ifndef __cplusplus
6845#define inline $ac_val
6846#endif
6847_ACEOF
6848    ;;
6849esac
6850
6851
6852{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6853printf %s "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6854if test ${ac_cv_c_format_attribute+y}
6855then :
6856  printf %s "(cached) " >&6
6857else $as_nop
6858  ac_cv_c_format_attribute=no
6859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6860/* end confdefs.h.  */
6861#include <stdio.h>
6862void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6863void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6864
6865int
6866main (void)
6867{
6868
6869   f ("%s", "str");
6870
6871  ;
6872  return 0;
6873}
6874_ACEOF
6875if ac_fn_c_try_compile "$LINENO"
6876then :
6877  ac_cv_c_format_attribute="yes"
6878else $as_nop
6879  ac_cv_c_format_attribute="no"
6880fi
6881rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6882
6883fi
6884
6885
6886{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6887printf "%s\n" "$ac_cv_c_format_attribute" >&6; }
6888if test $ac_cv_c_format_attribute = yes; then
6889
6890printf "%s\n" "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6891
6892fi
6893
6894
6895{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6896printf %s "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6897if test ${ac_cv_c_unused_attribute+y}
6898then :
6899  printf %s "(cached) " >&6
6900else $as_nop
6901  ac_cv_c_unused_attribute=no
6902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6903/* end confdefs.h.  */
6904#include <stdio.h>
6905void f (char *u __attribute__((unused)));
6906
6907int
6908main (void)
6909{
6910
6911   f ("x");
6912
6913  ;
6914  return 0;
6915}
6916_ACEOF
6917if ac_fn_c_try_compile "$LINENO"
6918then :
6919  ac_cv_c_unused_attribute="yes"
6920else $as_nop
6921  ac_cv_c_unused_attribute="no"
6922fi
6923rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6924
6925fi
6926
6927
6928
6929
6930{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6931printf "%s\n" "$ac_cv_c_unused_attribute" >&6; }
6932if test $ac_cv_c_unused_attribute = yes; then
6933
6934printf "%s\n" "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6935
6936fi
6937
6938
6939
6940
6941{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6942printf %s "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6943if test ${ac_cv_c_weak_attribute+y}
6944then :
6945  printf %s "(cached) " >&6
6946else $as_nop
6947  ac_cv_c_weak_attribute=no
6948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6949/* end confdefs.h.  */
6950 #include <stdio.h>
6951__attribute__((weak)) void f(int x) { printf("%d", x); }
6952
6953int
6954main (void)
6955{
6956
6957   f(1);
6958
6959  ;
6960  return 0;
6961}
6962_ACEOF
6963if ac_fn_c_try_compile "$LINENO"
6964then :
6965  ac_cv_c_weak_attribute="yes"
6966else $as_nop
6967  ac_cv_c_weak_attribute="no"
6968fi
6969rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6970
6971fi
6972
6973
6974{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6975printf "%s\n" "$ac_cv_c_weak_attribute" >&6; }
6976if test $ac_cv_c_weak_attribute = yes; then
6977
6978printf "%s\n" "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6979
6980
6981printf "%s\n" "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
6982
6983else
6984
6985printf "%s\n" "#define ATTR_WEAK /**/" >>confdefs.h
6986
6987fi
6988
6989
6990
6991
6992{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
6993printf %s "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
6994if test ${ac_cv_c_noreturn_attribute+y}
6995then :
6996  printf %s "(cached) " >&6
6997else $as_nop
6998  ac_cv_c_noreturn_attribute=no
6999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7000/* end confdefs.h.  */
7001 #include <stdio.h>
7002__attribute__((noreturn)) void f(int x) { printf("%d", x); }
7003
7004int
7005main (void)
7006{
7007
7008   f(1);
7009
7010  ;
7011  return 0;
7012}
7013_ACEOF
7014if ac_fn_c_try_compile "$LINENO"
7015then :
7016  ac_cv_c_noreturn_attribute="yes"
7017else $as_nop
7018  ac_cv_c_noreturn_attribute="no"
7019fi
7020rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7021
7022fi
7023
7024
7025{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
7026printf "%s\n" "$ac_cv_c_noreturn_attribute" >&6; }
7027if test $ac_cv_c_noreturn_attribute = yes; then
7028
7029printf "%s\n" "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
7030
7031
7032printf "%s\n" "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
7033
7034else
7035
7036printf "%s\n" "#define ATTR_NORETURN /**/" >>confdefs.h
7037
7038fi
7039
7040
7041
7042
7043{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"fallthrough\" attribute" >&5
7044printf %s "checking whether the C compiler (${CC-cc}) accepts the \"fallthrough\" attribute... " >&6; }
7045BAKCFLAGS="$CFLAGS"
7046CFLAGS="$CFLAGS -Werror"
7047if test ${ac_cv_c_fallthrough_attribute+y}
7048then :
7049  printf %s "(cached) " >&6
7050else $as_nop
7051  ac_cv_c_fallthrough_attribute=no
7052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7053/* end confdefs.h.  */
7054 #include <stdio.h>
7055void f(int x) {
7056	int y = 0;
7057	switch(x) {
7058	case 1:
7059		y = 1;
7060		__attribute__((fallthrough));
7061		/* fallthrough */
7062	case 2:
7063		y++;
7064		break;
7065	case 3:
7066		y = 3;
7067		break;
7068	}
7069	printf("%d", y);
7070}
7071
7072int
7073main (void)
7074{
7075
7076   f(1);
7077
7078  ;
7079  return 0;
7080}
7081_ACEOF
7082if ac_fn_c_try_compile "$LINENO"
7083then :
7084  ac_cv_c_fallthrough_attribute="yes"
7085else $as_nop
7086  ac_cv_c_fallthrough_attribute="no"
7087fi
7088rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7089
7090fi
7091
7092CFLAGS="$BAKCFLAGS"
7093
7094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_fallthrough_attribute" >&5
7095printf "%s\n" "$ac_cv_c_fallthrough_attribute" >&6; }
7096if test $ac_cv_c_fallthrough_attribute = yes; then
7097
7098printf "%s\n" "#define HAVE_ATTR_FALLTHROUGH 1" >>confdefs.h
7099
7100
7101printf "%s\n" "#define ATTR_FALLTHROUGH __attribute__((fallthrough));" >>confdefs.h
7102
7103else
7104
7105printf "%s\n" "#define ATTR_FALLTHROUGH /**/" >>confdefs.h
7106
7107fi
7108
7109
7110if test "$srcdir" != "."; then
7111	CPPFLAGS="$CPPFLAGS -I$srcdir"
7112fi
7113
7114
7115
7116
7117
7118for ac_prog in flex lex
7119do
7120  # Extract the first word of "$ac_prog", so it can be a program name with args.
7121set dummy $ac_prog; ac_word=$2
7122{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7123printf %s "checking for $ac_word... " >&6; }
7124if test ${ac_cv_prog_LEX+y}
7125then :
7126  printf %s "(cached) " >&6
7127else $as_nop
7128  if test -n "$LEX"; then
7129  ac_cv_prog_LEX="$LEX" # Let the user override the test.
7130else
7131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7132for as_dir in $PATH
7133do
7134  IFS=$as_save_IFS
7135  case $as_dir in #(((
7136    '') as_dir=./ ;;
7137    */) ;;
7138    *) as_dir=$as_dir/ ;;
7139  esac
7140    for ac_exec_ext in '' $ac_executable_extensions; do
7141  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7142    ac_cv_prog_LEX="$ac_prog"
7143    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7144    break 2
7145  fi
7146done
7147  done
7148IFS=$as_save_IFS
7149
7150fi
7151fi
7152LEX=$ac_cv_prog_LEX
7153if test -n "$LEX"; then
7154  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
7155printf "%s\n" "$LEX" >&6; }
7156else
7157  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7158printf "%s\n" "no" >&6; }
7159fi
7160
7161
7162  test -n "$LEX" && break
7163done
7164test -n "$LEX" || LEX=":"
7165
7166  if test "x$LEX" != "x:"; then
7167    cat >conftest.l <<_ACEOF
7168%{
7169#ifdef __cplusplus
7170extern "C"
7171#endif
7172int yywrap(void);
7173%}
7174%%
7175a { ECHO; }
7176b { REJECT; }
7177c { yymore (); }
7178d { yyless (1); }
7179e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
7180#ifdef __cplusplus
7181    yyless ((yyinput () != 0));
7182#else
7183    yyless ((input () != 0));
7184#endif
7185  }
7186f { unput (yytext[0]); }
7187. { BEGIN INITIAL; }
7188%%
7189#ifdef YYTEXT_POINTER
7190extern char *yytext;
7191#endif
7192int
7193yywrap (void)
7194{
7195  return 1;
7196}
7197int
7198main (void)
7199{
7200  return ! yylex ();
7201}
7202_ACEOF
7203{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5
7204printf %s "checking for lex output file root... " >&6; }
7205if test ${ac_cv_prog_lex_root+y}
7206then :
7207  printf %s "(cached) " >&6
7208else $as_nop
7209
7210ac_cv_prog_lex_root=unknown
7211{ { ac_try="$LEX conftest.l"
7212case "(($ac_try" in
7213  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7214  *) ac_try_echo=$ac_try;;
7215esac
7216eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7217printf "%s\n" "$ac_try_echo"; } >&5
7218  (eval "$LEX conftest.l") 2>&5
7219  ac_status=$?
7220  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7221  test $ac_status = 0; } &&
7222if test -f lex.yy.c; then
7223  ac_cv_prog_lex_root=lex.yy
7224elif test -f lexyy.c; then
7225  ac_cv_prog_lex_root=lexyy
7226fi
7227fi
7228{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
7229printf "%s\n" "$ac_cv_prog_lex_root" >&6; }
7230if test "$ac_cv_prog_lex_root" = unknown
7231then :
7232  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5
7233printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;}
7234   LEX=: LEXLIB=
7235fi
7236LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
7237
7238if test ${LEXLIB+y}
7239then :
7240
7241else $as_nop
7242
7243  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5
7244printf %s "checking for lex library... " >&6; }
7245if test ${ac_cv_lib_lex+y}
7246then :
7247  printf %s "(cached) " >&6
7248else $as_nop
7249
7250    ac_save_LIBS="$LIBS"
7251    ac_found=false
7252    for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do
7253      case $ac_cv_lib_lex in #(
7254  'none needed') :
7255     ;; #(
7256  'not found') :
7257    break ;; #(
7258  *) :
7259    LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #(
7260  *) :
7261     ;;
7262esac
7263
7264      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7265/* end confdefs.h.  */
7266`cat $LEX_OUTPUT_ROOT.c`
7267_ACEOF
7268if ac_fn_c_try_link "$LINENO"
7269then :
7270  ac_found=:
7271fi
7272rm -f core conftest.err conftest.$ac_objext conftest.beam \
7273    conftest$ac_exeext conftest.$ac_ext
7274      if $ac_found; then
7275        break
7276      fi
7277    done
7278    LIBS="$ac_save_LIBS"
7279
7280fi
7281{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
7282printf "%s\n" "$ac_cv_lib_lex" >&6; }
7283  if test "$ac_cv_lib_lex" = 'not found'
7284then :
7285  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5
7286printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;}
7287	 LEX=: LEXLIB=
7288elif test "$ac_cv_lib_lex" = 'none needed'
7289then :
7290  LEXLIB=''
7291else $as_nop
7292  LEXLIB=$ac_cv_lib_lex
7293fi
7294
7295fi
7296
7297
7298if test "$LEX" != :
7299then :
7300
7301{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
7302printf %s "checking whether yytext is a pointer... " >&6; }
7303if test ${ac_cv_prog_lex_yytext_pointer+y}
7304then :
7305  printf %s "(cached) " >&6
7306else $as_nop
7307  # POSIX says lex can declare yytext either as a pointer or an array; the
7308# default is implementation-dependent.  Figure out which it is, since
7309# not all implementations provide the %pointer and %array declarations.
7310ac_cv_prog_lex_yytext_pointer=no
7311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7312/* end confdefs.h.  */
7313
7314  #define YYTEXT_POINTER 1
7315`cat $LEX_OUTPUT_ROOT.c`
7316_ACEOF
7317if ac_fn_c_try_compile "$LINENO"
7318then :
7319  ac_cv_prog_lex_yytext_pointer=yes
7320fi
7321rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7322
7323fi
7324{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
7325printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; }
7326if test $ac_cv_prog_lex_yytext_pointer = yes; then
7327
7328printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h
7329
7330fi
7331
7332fi
7333rm -f conftest.l $LEX_OUTPUT_ROOT.c
7334
7335fi
7336if test "$LEX" != "" -a "$LEX" != ":"; then
7337
7338	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
7339printf %s "checking for yylex_destroy... " >&6; }
7340	if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
7341
7342printf "%s\n" "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
7343
7344		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7345printf "%s\n" "yes" >&6; }
7346	else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7347printf "%s\n" "no" >&6; };
7348		LEX=":"
7349	fi
7350
7351fi
7352if test "$LEX" != "" -a "$LEX" != ":"; then
7353
7354	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
7355printf %s "checking for lex %option... " >&6; }
7356	if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
7357%option nounput
7358%%
7359EOF
7360		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7361printf "%s\n" "yes" >&6; }
7362	else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7363printf "%s\n" "no" >&6; };
7364		LEX=":"
7365	fi
7366
7367fi
7368if test "$LEX" = "" -o "$LEX" = ":"; then
7369	if test ! -f util/configlexer.c; then
7370		as_fn_error $? "no lex and no util/configlexer.c: need flex and bison to compile from source repository." "$LINENO" 5
7371	fi
7372fi
7373for ac_prog in 'bison -y' byacc
7374do
7375  # Extract the first word of "$ac_prog", so it can be a program name with args.
7376set dummy $ac_prog; ac_word=$2
7377{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7378printf %s "checking for $ac_word... " >&6; }
7379if test ${ac_cv_prog_YACC+y}
7380then :
7381  printf %s "(cached) " >&6
7382else $as_nop
7383  if test -n "$YACC"; then
7384  ac_cv_prog_YACC="$YACC" # Let the user override the test.
7385else
7386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7387for as_dir in $PATH
7388do
7389  IFS=$as_save_IFS
7390  case $as_dir in #(((
7391    '') as_dir=./ ;;
7392    */) ;;
7393    *) as_dir=$as_dir/ ;;
7394  esac
7395    for ac_exec_ext in '' $ac_executable_extensions; do
7396  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7397    ac_cv_prog_YACC="$ac_prog"
7398    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7399    break 2
7400  fi
7401done
7402  done
7403IFS=$as_save_IFS
7404
7405fi
7406fi
7407YACC=$ac_cv_prog_YACC
7408if test -n "$YACC"; then
7409  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7410printf "%s\n" "$YACC" >&6; }
7411else
7412  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7413printf "%s\n" "no" >&6; }
7414fi
7415
7416
7417  test -n "$YACC" && break
7418done
7419test -n "$YACC" || YACC="yacc"
7420
7421if test "$YACC" = "" -o "$YACC" = ":"; then
7422	if test ! -f util/configparser.c; then
7423		as_fn_error $? "no yacc and no util/configparser.c: need flex and bison to compile from source repository." "$LINENO" 5
7424	fi
7425fi
7426# Extract the first word of "doxygen", so it can be a program name with args.
7427set dummy doxygen; ac_word=$2
7428{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7429printf %s "checking for $ac_word... " >&6; }
7430if test ${ac_cv_prog_doxygen+y}
7431then :
7432  printf %s "(cached) " >&6
7433else $as_nop
7434  if test -n "$doxygen"; then
7435  ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
7436else
7437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7438for as_dir in $PATH
7439do
7440  IFS=$as_save_IFS
7441  case $as_dir in #(((
7442    '') as_dir=./ ;;
7443    */) ;;
7444    *) as_dir=$as_dir/ ;;
7445  esac
7446    for ac_exec_ext in '' $ac_executable_extensions; do
7447  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7448    ac_cv_prog_doxygen="doxygen"
7449    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7450    break 2
7451  fi
7452done
7453  done
7454IFS=$as_save_IFS
7455
7456fi
7457fi
7458doxygen=$ac_cv_prog_doxygen
7459if test -n "$doxygen"; then
7460  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
7461printf "%s\n" "$doxygen" >&6; }
7462else
7463  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7464printf "%s\n" "no" >&6; }
7465fi
7466
7467
7468if test -n "$ac_tool_prefix"; then
7469  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7470set dummy ${ac_tool_prefix}strip; ac_word=$2
7471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7472printf %s "checking for $ac_word... " >&6; }
7473if test ${ac_cv_prog_STRIP+y}
7474then :
7475  printf %s "(cached) " >&6
7476else $as_nop
7477  if test -n "$STRIP"; then
7478  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7479else
7480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7481for as_dir in $PATH
7482do
7483  IFS=$as_save_IFS
7484  case $as_dir in #(((
7485    '') as_dir=./ ;;
7486    */) ;;
7487    *) as_dir=$as_dir/ ;;
7488  esac
7489    for ac_exec_ext in '' $ac_executable_extensions; do
7490  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7491    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7492    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7493    break 2
7494  fi
7495done
7496  done
7497IFS=$as_save_IFS
7498
7499fi
7500fi
7501STRIP=$ac_cv_prog_STRIP
7502if test -n "$STRIP"; then
7503  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7504printf "%s\n" "$STRIP" >&6; }
7505else
7506  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7507printf "%s\n" "no" >&6; }
7508fi
7509
7510
7511fi
7512if test -z "$ac_cv_prog_STRIP"; then
7513  ac_ct_STRIP=$STRIP
7514  # Extract the first word of "strip", so it can be a program name with args.
7515set dummy strip; ac_word=$2
7516{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7517printf %s "checking for $ac_word... " >&6; }
7518if test ${ac_cv_prog_ac_ct_STRIP+y}
7519then :
7520  printf %s "(cached) " >&6
7521else $as_nop
7522  if test -n "$ac_ct_STRIP"; then
7523  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7524else
7525as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7526for as_dir in $PATH
7527do
7528  IFS=$as_save_IFS
7529  case $as_dir in #(((
7530    '') as_dir=./ ;;
7531    */) ;;
7532    *) as_dir=$as_dir/ ;;
7533  esac
7534    for ac_exec_ext in '' $ac_executable_extensions; do
7535  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7536    ac_cv_prog_ac_ct_STRIP="strip"
7537    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7538    break 2
7539  fi
7540done
7541  done
7542IFS=$as_save_IFS
7543
7544fi
7545fi
7546ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7547if test -n "$ac_ct_STRIP"; then
7548  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7549printf "%s\n" "$ac_ct_STRIP" >&6; }
7550else
7551  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7552printf "%s\n" "no" >&6; }
7553fi
7554
7555  if test "x$ac_ct_STRIP" = x; then
7556    STRIP=""
7557  else
7558    case $cross_compiling:$ac_tool_warned in
7559yes:)
7560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7561printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7562ac_tool_warned=yes ;;
7563esac
7564    STRIP=$ac_ct_STRIP
7565  fi
7566else
7567  STRIP="$ac_cv_prog_STRIP"
7568fi
7569
7570
7571
7572
7573  # Make sure we can run config.sub.
7574$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
7575  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
7576
7577{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
7578printf %s "checking build system type... " >&6; }
7579if test ${ac_cv_build+y}
7580then :
7581  printf %s "(cached) " >&6
7582else $as_nop
7583  ac_build_alias=$build_alias
7584test "x$ac_build_alias" = x &&
7585  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
7586test "x$ac_build_alias" = x &&
7587  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
7588ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
7589  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
7590
7591fi
7592{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
7593printf "%s\n" "$ac_cv_build" >&6; }
7594case $ac_cv_build in
7595*-*-*) ;;
7596*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
7597esac
7598build=$ac_cv_build
7599ac_save_IFS=$IFS; IFS='-'
7600set x $ac_cv_build
7601shift
7602build_cpu=$1
7603build_vendor=$2
7604shift; shift
7605# Remember, the first character of IFS is used to create $*,
7606# except with old shells:
7607build_os=$*
7608IFS=$ac_save_IFS
7609case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
7610
7611
7612{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
7613printf %s "checking host system type... " >&6; }
7614if test ${ac_cv_host+y}
7615then :
7616  printf %s "(cached) " >&6
7617else $as_nop
7618  if test "x$host_alias" = x; then
7619  ac_cv_host=$ac_cv_build
7620else
7621  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
7622    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
7623fi
7624
7625fi
7626{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
7627printf "%s\n" "$ac_cv_host" >&6; }
7628case $ac_cv_host in
7629*-*-*) ;;
7630*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
7631esac
7632host=$ac_cv_host
7633ac_save_IFS=$IFS; IFS='-'
7634set x $ac_cv_host
7635shift
7636host_cpu=$1
7637host_vendor=$2
7638shift; shift
7639# Remember, the first character of IFS is used to create $*,
7640# except with old shells:
7641host_os=$*
7642IFS=$ac_save_IFS
7643case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
7644
7645
7646
7647# skip these tests, we do not need them.
7648
7649
7650
7651
7652
7653
7654
7655
7656# always use ./libtool unless override from commandline (libtool=mylibtool)
7657if test -z "$libtool"; then
7658	libtool="./libtool"
7659fi
7660
7661# avoid libtool max commandline length test on systems that fork slowly.
7662
7663if echo "$host_os" | grep "sunos4" >/dev/null; then
7664	lt_cv_sys_max_cmd_len=32750;
7665fi
7666if test -n "$ac_tool_prefix"; then
7667  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7668set dummy ${ac_tool_prefix}ar; ac_word=$2
7669{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7670printf %s "checking for $ac_word... " >&6; }
7671if test ${ac_cv_path_AR+y}
7672then :
7673  printf %s "(cached) " >&6
7674else $as_nop
7675  case $AR in
7676  [\\/]* | ?:[\\/]*)
7677  ac_cv_path_AR="$AR" # Let the user override the test with a path.
7678  ;;
7679  *)
7680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7681for as_dir in $PATH
7682do
7683  IFS=$as_save_IFS
7684  case $as_dir in #(((
7685    '') as_dir=./ ;;
7686    */) ;;
7687    *) as_dir=$as_dir/ ;;
7688  esac
7689    for ac_exec_ext in '' $ac_executable_extensions; do
7690  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7691    ac_cv_path_AR="$as_dir$ac_word$ac_exec_ext"
7692    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7693    break 2
7694  fi
7695done
7696  done
7697IFS=$as_save_IFS
7698
7699  ;;
7700esac
7701fi
7702AR=$ac_cv_path_AR
7703if test -n "$AR"; then
7704  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7705printf "%s\n" "$AR" >&6; }
7706else
7707  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7708printf "%s\n" "no" >&6; }
7709fi
7710
7711
7712fi
7713if test -z "$ac_cv_path_AR"; then
7714  ac_pt_AR=$AR
7715  # Extract the first word of "ar", so it can be a program name with args.
7716set dummy ar; ac_word=$2
7717{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7718printf %s "checking for $ac_word... " >&6; }
7719if test ${ac_cv_path_ac_pt_AR+y}
7720then :
7721  printf %s "(cached) " >&6
7722else $as_nop
7723  case $ac_pt_AR in
7724  [\\/]* | ?:[\\/]*)
7725  ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
7726  ;;
7727  *)
7728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7729for as_dir in $PATH
7730do
7731  IFS=$as_save_IFS
7732  case $as_dir in #(((
7733    '') as_dir=./ ;;
7734    */) ;;
7735    *) as_dir=$as_dir/ ;;
7736  esac
7737    for ac_exec_ext in '' $ac_executable_extensions; do
7738  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7739    ac_cv_path_ac_pt_AR="$as_dir$ac_word$ac_exec_ext"
7740    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7741    break 2
7742  fi
7743done
7744  done
7745IFS=$as_save_IFS
7746
7747  ;;
7748esac
7749fi
7750ac_pt_AR=$ac_cv_path_ac_pt_AR
7751if test -n "$ac_pt_AR"; then
7752  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
7753printf "%s\n" "$ac_pt_AR" >&6; }
7754else
7755  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7756printf "%s\n" "no" >&6; }
7757fi
7758
7759  if test "x$ac_pt_AR" = x; then
7760    AR="false"
7761  else
7762    case $cross_compiling:$ac_tool_warned in
7763yes:)
7764{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7765printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7766ac_tool_warned=yes ;;
7767esac
7768    AR=$ac_pt_AR
7769  fi
7770else
7771  AR="$ac_cv_path_AR"
7772fi
7773
7774if test $AR = false; then
7775	as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
7776fi
7777
7778
7779case `pwd` in
7780  *\ * | *\	*)
7781    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
7782printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
7783esac
7784
7785
7786
7787macro_version='2.4.6'
7788macro_revision='2.4.6'
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803ltmain=$ac_aux_dir/ltmain.sh
7804
7805# Backslashify metacharacters that are still active within
7806# double-quoted strings.
7807sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
7808
7809# Same as above, but do not quote variable references.
7810double_quote_subst='s/\(["`\\]\)/\\\1/g'
7811
7812# Sed substitution to delay expansion of an escaped shell variable in a
7813# double_quote_subst'ed string.
7814delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7815
7816# Sed substitution to delay expansion of an escaped single quote.
7817delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7818
7819# Sed substitution to avoid accidental globbing in evaled expressions
7820no_glob_subst='s/\*/\\\*/g'
7821
7822ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7823ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7824ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7825
7826{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7827printf %s "checking how to print strings... " >&6; }
7828# Test print first, because it will be a builtin if present.
7829if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7830   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7831  ECHO='print -r --'
7832elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7833  ECHO='printf %s\n'
7834else
7835  # Use this function as a fallback that always works.
7836  func_fallback_echo ()
7837  {
7838    eval 'cat <<_LTECHO_EOF
7839$1
7840_LTECHO_EOF'
7841  }
7842  ECHO='func_fallback_echo'
7843fi
7844
7845# func_echo_all arg...
7846# Invoke $ECHO with all args, space-separated.
7847func_echo_all ()
7848{
7849    $ECHO ""
7850}
7851
7852case $ECHO in
7853  printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
7854printf "%s\n" "printf" >&6; } ;;
7855  print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
7856printf "%s\n" "print -r" >&6; } ;;
7857  *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
7858printf "%s\n" "cat" >&6; } ;;
7859esac
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7875printf %s "checking for a sed that does not truncate output... " >&6; }
7876if test ${ac_cv_path_SED+y}
7877then :
7878  printf %s "(cached) " >&6
7879else $as_nop
7880            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7881     for ac_i in 1 2 3 4 5 6 7; do
7882       ac_script="$ac_script$as_nl$ac_script"
7883     done
7884     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7885     { ac_script=; unset ac_script;}
7886     if test -z "$SED"; then
7887  ac_path_SED_found=false
7888  # Loop through the user's path and test for each of PROGNAME-LIST
7889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7890for as_dir in $PATH
7891do
7892  IFS=$as_save_IFS
7893  case $as_dir in #(((
7894    '') as_dir=./ ;;
7895    */) ;;
7896    *) as_dir=$as_dir/ ;;
7897  esac
7898    for ac_prog in sed gsed
7899   do
7900    for ac_exec_ext in '' $ac_executable_extensions; do
7901      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
7902      as_fn_executable_p "$ac_path_SED" || continue
7903# Check for GNU ac_path_SED and select it if it is found.
7904  # Check for GNU $ac_path_SED
7905case `"$ac_path_SED" --version 2>&1` in
7906*GNU*)
7907  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7908*)
7909  ac_count=0
7910  printf %s 0123456789 >"conftest.in"
7911  while :
7912  do
7913    cat "conftest.in" "conftest.in" >"conftest.tmp"
7914    mv "conftest.tmp" "conftest.in"
7915    cp "conftest.in" "conftest.nl"
7916    printf "%s\n" '' >> "conftest.nl"
7917    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7918    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7919    as_fn_arith $ac_count + 1 && ac_count=$as_val
7920    if test $ac_count -gt ${ac_path_SED_max-0}; then
7921      # Best one so far, save it but keep looking for a better one
7922      ac_cv_path_SED="$ac_path_SED"
7923      ac_path_SED_max=$ac_count
7924    fi
7925    # 10*(2^10) chars as input seems more than enough
7926    test $ac_count -gt 10 && break
7927  done
7928  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7929esac
7930
7931      $ac_path_SED_found && break 3
7932    done
7933  done
7934  done
7935IFS=$as_save_IFS
7936  if test -z "$ac_cv_path_SED"; then
7937    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7938  fi
7939else
7940  ac_cv_path_SED=$SED
7941fi
7942
7943fi
7944{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7945printf "%s\n" "$ac_cv_path_SED" >&6; }
7946 SED="$ac_cv_path_SED"
7947  rm -f conftest.sed
7948
7949test -z "$SED" && SED=sed
7950Xsed="$SED -e 1s/^X//"
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
7963printf %s "checking for egrep... " >&6; }
7964if test ${ac_cv_path_EGREP+y}
7965then :
7966  printf %s "(cached) " >&6
7967else $as_nop
7968  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
7969   then ac_cv_path_EGREP="$GREP -E"
7970   else
7971     if test -z "$EGREP"; then
7972  ac_path_EGREP_found=false
7973  # Loop through the user's path and test for each of PROGNAME-LIST
7974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7975for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7976do
7977  IFS=$as_save_IFS
7978  case $as_dir in #(((
7979    '') as_dir=./ ;;
7980    */) ;;
7981    *) as_dir=$as_dir/ ;;
7982  esac
7983    for ac_prog in egrep
7984   do
7985    for ac_exec_ext in '' $ac_executable_extensions; do
7986      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
7987      as_fn_executable_p "$ac_path_EGREP" || continue
7988# Check for GNU ac_path_EGREP and select it if it is found.
7989  # Check for GNU $ac_path_EGREP
7990case `"$ac_path_EGREP" --version 2>&1` in
7991*GNU*)
7992  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
7993*)
7994  ac_count=0
7995  printf %s 0123456789 >"conftest.in"
7996  while :
7997  do
7998    cat "conftest.in" "conftest.in" >"conftest.tmp"
7999    mv "conftest.tmp" "conftest.in"
8000    cp "conftest.in" "conftest.nl"
8001    printf "%s\n" 'EGREP' >> "conftest.nl"
8002    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8003    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8004    as_fn_arith $ac_count + 1 && ac_count=$as_val
8005    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8006      # Best one so far, save it but keep looking for a better one
8007      ac_cv_path_EGREP="$ac_path_EGREP"
8008      ac_path_EGREP_max=$ac_count
8009    fi
8010    # 10*(2^10) chars as input seems more than enough
8011    test $ac_count -gt 10 && break
8012  done
8013  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8014esac
8015
8016      $ac_path_EGREP_found && break 3
8017    done
8018  done
8019  done
8020IFS=$as_save_IFS
8021  if test -z "$ac_cv_path_EGREP"; then
8022    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8023  fi
8024else
8025  ac_cv_path_EGREP=$EGREP
8026fi
8027
8028   fi
8029fi
8030{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8031printf "%s\n" "$ac_cv_path_EGREP" >&6; }
8032 EGREP="$ac_cv_path_EGREP"
8033
8034
8035{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
8036printf %s "checking for fgrep... " >&6; }
8037if test ${ac_cv_path_FGREP+y}
8038then :
8039  printf %s "(cached) " >&6
8040else $as_nop
8041  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
8042   then ac_cv_path_FGREP="$GREP -F"
8043   else
8044     if test -z "$FGREP"; then
8045  ac_path_FGREP_found=false
8046  # Loop through the user's path and test for each of PROGNAME-LIST
8047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8048for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8049do
8050  IFS=$as_save_IFS
8051  case $as_dir in #(((
8052    '') as_dir=./ ;;
8053    */) ;;
8054    *) as_dir=$as_dir/ ;;
8055  esac
8056    for ac_prog in fgrep
8057   do
8058    for ac_exec_ext in '' $ac_executable_extensions; do
8059      ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
8060      as_fn_executable_p "$ac_path_FGREP" || continue
8061# Check for GNU ac_path_FGREP and select it if it is found.
8062  # Check for GNU $ac_path_FGREP
8063case `"$ac_path_FGREP" --version 2>&1` in
8064*GNU*)
8065  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
8066*)
8067  ac_count=0
8068  printf %s 0123456789 >"conftest.in"
8069  while :
8070  do
8071    cat "conftest.in" "conftest.in" >"conftest.tmp"
8072    mv "conftest.tmp" "conftest.in"
8073    cp "conftest.in" "conftest.nl"
8074    printf "%s\n" 'FGREP' >> "conftest.nl"
8075    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
8076    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8077    as_fn_arith $ac_count + 1 && ac_count=$as_val
8078    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
8079      # Best one so far, save it but keep looking for a better one
8080      ac_cv_path_FGREP="$ac_path_FGREP"
8081      ac_path_FGREP_max=$ac_count
8082    fi
8083    # 10*(2^10) chars as input seems more than enough
8084    test $ac_count -gt 10 && break
8085  done
8086  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8087esac
8088
8089      $ac_path_FGREP_found && break 3
8090    done
8091  done
8092  done
8093IFS=$as_save_IFS
8094  if test -z "$ac_cv_path_FGREP"; then
8095    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8096  fi
8097else
8098  ac_cv_path_FGREP=$FGREP
8099fi
8100
8101   fi
8102fi
8103{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
8104printf "%s\n" "$ac_cv_path_FGREP" >&6; }
8105 FGREP="$ac_cv_path_FGREP"
8106
8107
8108test -z "$GREP" && GREP=grep
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128# Check whether --with-gnu-ld was given.
8129if test ${with_gnu_ld+y}
8130then :
8131  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
8132else $as_nop
8133  with_gnu_ld=no
8134fi
8135
8136ac_prog=ld
8137if test yes = "$GCC"; then
8138  # Check if gcc -print-prog-name=ld gives a path.
8139  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8140printf %s "checking for ld used by $CC... " >&6; }
8141  case $host in
8142  *-*-mingw*)
8143    # gcc leaves a trailing carriage return, which upsets mingw
8144    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8145  *)
8146    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8147  esac
8148  case $ac_prog in
8149    # Accept absolute paths.
8150    [\\/]* | ?:[\\/]*)
8151      re_direlt='/[^/][^/]*/\.\./'
8152      # Canonicalize the pathname of ld
8153      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
8154      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
8155	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
8156      done
8157      test -z "$LD" && LD=$ac_prog
8158      ;;
8159  "")
8160    # If it fails, then pretend we aren't using GCC.
8161    ac_prog=ld
8162    ;;
8163  *)
8164    # If it is relative, then search for the first ld in PATH.
8165    with_gnu_ld=unknown
8166    ;;
8167  esac
8168elif test yes = "$with_gnu_ld"; then
8169  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8170printf %s "checking for GNU ld... " >&6; }
8171else
8172  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8173printf %s "checking for non-GNU ld... " >&6; }
8174fi
8175if test ${lt_cv_path_LD+y}
8176then :
8177  printf %s "(cached) " >&6
8178else $as_nop
8179  if test -z "$LD"; then
8180  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8181  for ac_dir in $PATH; do
8182    IFS=$lt_save_ifs
8183    test -z "$ac_dir" && ac_dir=.
8184    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8185      lt_cv_path_LD=$ac_dir/$ac_prog
8186      # Check to see if the program is GNU ld.  I'd rather use --version,
8187      # but apparently some variants of GNU ld only accept -v.
8188      # Break only if it was the GNU/non-GNU ld that we prefer.
8189      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
8190      *GNU* | *'with BFD'*)
8191	test no != "$with_gnu_ld" && break
8192	;;
8193      *)
8194	test yes != "$with_gnu_ld" && break
8195	;;
8196      esac
8197    fi
8198  done
8199  IFS=$lt_save_ifs
8200else
8201  lt_cv_path_LD=$LD # Let the user override the test with a path.
8202fi
8203fi
8204
8205LD=$lt_cv_path_LD
8206if test -n "$LD"; then
8207  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8208printf "%s\n" "$LD" >&6; }
8209else
8210  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8211printf "%s\n" "no" >&6; }
8212fi
8213test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8214{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8215printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
8216if test ${lt_cv_prog_gnu_ld+y}
8217then :
8218  printf %s "(cached) " >&6
8219else $as_nop
8220  # I'd rather use --version here, but apparently some GNU lds only accept -v.
8221case `$LD -v 2>&1 </dev/null` in
8222*GNU* | *'with BFD'*)
8223  lt_cv_prog_gnu_ld=yes
8224  ;;
8225*)
8226  lt_cv_prog_gnu_ld=no
8227  ;;
8228esac
8229fi
8230{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
8231printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
8232with_gnu_ld=$lt_cv_prog_gnu_ld
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
8243printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
8244if test ${lt_cv_path_NM+y}
8245then :
8246  printf %s "(cached) " >&6
8247else $as_nop
8248  if test -n "$NM"; then
8249  # Let the user override the test.
8250  lt_cv_path_NM=$NM
8251else
8252  lt_nm_to_check=${ac_tool_prefix}nm
8253  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
8254    lt_nm_to_check="$lt_nm_to_check nm"
8255  fi
8256  for lt_tmp_nm in $lt_nm_to_check; do
8257    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8258    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
8259      IFS=$lt_save_ifs
8260      test -z "$ac_dir" && ac_dir=.
8261      tmp_nm=$ac_dir/$lt_tmp_nm
8262      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
8263	# Check to see if the nm accepts a BSD-compat flag.
8264	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
8265	#   nm: unknown option "B" ignored
8266	# Tru64's nm complains that /dev/null is an invalid object file
8267	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
8268	case $build_os in
8269	mingw*) lt_bad_file=conftest.nm/nofile ;;
8270	*) lt_bad_file=/dev/null ;;
8271	esac
8272	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
8273	*$lt_bad_file* | *'Invalid file or object type'*)
8274	  lt_cv_path_NM="$tmp_nm -B"
8275	  break 2
8276	  ;;
8277	*)
8278	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
8279	  */dev/null*)
8280	    lt_cv_path_NM="$tmp_nm -p"
8281	    break 2
8282	    ;;
8283	  *)
8284	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
8285	    continue # so that we can try to find one that supports BSD flags
8286	    ;;
8287	  esac
8288	  ;;
8289	esac
8290      fi
8291    done
8292    IFS=$lt_save_ifs
8293  done
8294  : ${lt_cv_path_NM=no}
8295fi
8296fi
8297{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
8298printf "%s\n" "$lt_cv_path_NM" >&6; }
8299if test no != "$lt_cv_path_NM"; then
8300  NM=$lt_cv_path_NM
8301else
8302  # Didn't find any BSD compatible name lister, look for dumpbin.
8303  if test -n "$DUMPBIN"; then :
8304    # Let the user override the test.
8305  else
8306    if test -n "$ac_tool_prefix"; then
8307  for ac_prog in dumpbin "link -dump"
8308  do
8309    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8310set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8311{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8312printf %s "checking for $ac_word... " >&6; }
8313if test ${ac_cv_prog_DUMPBIN+y}
8314then :
8315  printf %s "(cached) " >&6
8316else $as_nop
8317  if test -n "$DUMPBIN"; then
8318  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
8319else
8320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8321for as_dir in $PATH
8322do
8323  IFS=$as_save_IFS
8324  case $as_dir in #(((
8325    '') as_dir=./ ;;
8326    */) ;;
8327    *) as_dir=$as_dir/ ;;
8328  esac
8329    for ac_exec_ext in '' $ac_executable_extensions; do
8330  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8331    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
8332    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8333    break 2
8334  fi
8335done
8336  done
8337IFS=$as_save_IFS
8338
8339fi
8340fi
8341DUMPBIN=$ac_cv_prog_DUMPBIN
8342if test -n "$DUMPBIN"; then
8343  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
8344printf "%s\n" "$DUMPBIN" >&6; }
8345else
8346  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8347printf "%s\n" "no" >&6; }
8348fi
8349
8350
8351    test -n "$DUMPBIN" && break
8352  done
8353fi
8354if test -z "$DUMPBIN"; then
8355  ac_ct_DUMPBIN=$DUMPBIN
8356  for ac_prog in dumpbin "link -dump"
8357do
8358  # Extract the first word of "$ac_prog", so it can be a program name with args.
8359set dummy $ac_prog; ac_word=$2
8360{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8361printf %s "checking for $ac_word... " >&6; }
8362if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
8363then :
8364  printf %s "(cached) " >&6
8365else $as_nop
8366  if test -n "$ac_ct_DUMPBIN"; then
8367  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
8368else
8369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8370for as_dir in $PATH
8371do
8372  IFS=$as_save_IFS
8373  case $as_dir in #(((
8374    '') as_dir=./ ;;
8375    */) ;;
8376    *) as_dir=$as_dir/ ;;
8377  esac
8378    for ac_exec_ext in '' $ac_executable_extensions; do
8379  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8380    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
8381    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8382    break 2
8383  fi
8384done
8385  done
8386IFS=$as_save_IFS
8387
8388fi
8389fi
8390ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
8391if test -n "$ac_ct_DUMPBIN"; then
8392  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
8393printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
8394else
8395  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8396printf "%s\n" "no" >&6; }
8397fi
8398
8399
8400  test -n "$ac_ct_DUMPBIN" && break
8401done
8402
8403  if test "x$ac_ct_DUMPBIN" = x; then
8404    DUMPBIN=":"
8405  else
8406    case $cross_compiling:$ac_tool_warned in
8407yes:)
8408{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8409printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8410ac_tool_warned=yes ;;
8411esac
8412    DUMPBIN=$ac_ct_DUMPBIN
8413  fi
8414fi
8415
8416    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
8417    *COFF*)
8418      DUMPBIN="$DUMPBIN -symbols -headers"
8419      ;;
8420    *)
8421      DUMPBIN=:
8422      ;;
8423    esac
8424  fi
8425
8426  if test : != "$DUMPBIN"; then
8427    NM=$DUMPBIN
8428  fi
8429fi
8430test -z "$NM" && NM=nm
8431
8432
8433
8434
8435
8436
8437{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
8438printf %s "checking the name lister ($NM) interface... " >&6; }
8439if test ${lt_cv_nm_interface+y}
8440then :
8441  printf %s "(cached) " >&6
8442else $as_nop
8443  lt_cv_nm_interface="BSD nm"
8444  echo "int some_variable = 0;" > conftest.$ac_ext
8445  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
8446  (eval "$ac_compile" 2>conftest.err)
8447  cat conftest.err >&5
8448  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
8449  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
8450  cat conftest.err >&5
8451  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
8452  cat conftest.out >&5
8453  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
8454    lt_cv_nm_interface="MS dumpbin"
8455  fi
8456  rm -f conftest*
8457fi
8458{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
8459printf "%s\n" "$lt_cv_nm_interface" >&6; }
8460
8461{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8462printf %s "checking whether ln -s works... " >&6; }
8463LN_S=$as_ln_s
8464if test "$LN_S" = "ln -s"; then
8465  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8466printf "%s\n" "yes" >&6; }
8467else
8468  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8469printf "%s\n" "no, using $LN_S" >&6; }
8470fi
8471
8472# find the maximum length of command line arguments
8473{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
8474printf %s "checking the maximum length of command line arguments... " >&6; }
8475if test ${lt_cv_sys_max_cmd_len+y}
8476then :
8477  printf %s "(cached) " >&6
8478else $as_nop
8479    i=0
8480  teststring=ABCD
8481
8482  case $build_os in
8483  msdosdjgpp*)
8484    # On DJGPP, this test can blow up pretty badly due to problems in libc
8485    # (any single argument exceeding 2000 bytes causes a buffer overrun
8486    # during glob expansion).  Even if it were fixed, the result of this
8487    # check would be larger than it should be.
8488    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
8489    ;;
8490
8491  gnu*)
8492    # Under GNU Hurd, this test is not required because there is
8493    # no limit to the length of command line arguments.
8494    # Libtool will interpret -1 as no limit whatsoever
8495    lt_cv_sys_max_cmd_len=-1;
8496    ;;
8497
8498  cygwin* | mingw* | cegcc*)
8499    # On Win9x/ME, this test blows up -- it succeeds, but takes
8500    # about 5 minutes as the teststring grows exponentially.
8501    # Worse, since 9x/ME are not pre-emptively multitasking,
8502    # you end up with a "frozen" computer, even though with patience
8503    # the test eventually succeeds (with a max line length of 256k).
8504    # Instead, let's just punt: use the minimum linelength reported by
8505    # all of the supported platforms: 8192 (on NT/2K/XP).
8506    lt_cv_sys_max_cmd_len=8192;
8507    ;;
8508
8509  mint*)
8510    # On MiNT this can take a long time and run out of memory.
8511    lt_cv_sys_max_cmd_len=8192;
8512    ;;
8513
8514  amigaos*)
8515    # On AmigaOS with pdksh, this test takes hours, literally.
8516    # So we just punt and use a minimum line length of 8192.
8517    lt_cv_sys_max_cmd_len=8192;
8518    ;;
8519
8520  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
8521    # This has been around since 386BSD, at least.  Likely further.
8522    if test -x /sbin/sysctl; then
8523      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
8524    elif test -x /usr/sbin/sysctl; then
8525      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
8526    else
8527      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
8528    fi
8529    # And add a safety zone
8530    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8531    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8532    ;;
8533
8534  interix*)
8535    # We know the value 262144 and hardcode it with a safety zone (like BSD)
8536    lt_cv_sys_max_cmd_len=196608
8537    ;;
8538
8539  os2*)
8540    # The test takes a long time on OS/2.
8541    lt_cv_sys_max_cmd_len=8192
8542    ;;
8543
8544  osf*)
8545    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
8546    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
8547    # nice to cause kernel panics so lets avoid the loop below.
8548    # First set a reasonable default.
8549    lt_cv_sys_max_cmd_len=16384
8550    #
8551    if test -x /sbin/sysconfig; then
8552      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
8553        *1*) lt_cv_sys_max_cmd_len=-1 ;;
8554      esac
8555    fi
8556    ;;
8557  sco3.2v5*)
8558    lt_cv_sys_max_cmd_len=102400
8559    ;;
8560  sysv5* | sco5v6* | sysv4.2uw2*)
8561    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
8562    if test -n "$kargmax"; then
8563      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
8564    else
8565      lt_cv_sys_max_cmd_len=32768
8566    fi
8567    ;;
8568  *)
8569    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
8570    if test -n "$lt_cv_sys_max_cmd_len" && \
8571       test undefined != "$lt_cv_sys_max_cmd_len"; then
8572      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8573      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8574    else
8575      # Make teststring a little bigger before we do anything with it.
8576      # a 1K string should be a reasonable start.
8577      for i in 1 2 3 4 5 6 7 8; do
8578        teststring=$teststring$teststring
8579      done
8580      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
8581      # If test is not a shell built-in, we'll probably end up computing a
8582      # maximum length that is only half of the actual maximum length, but
8583      # we can't tell.
8584      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
8585	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
8586	      test 17 != "$i" # 1/2 MB should be enough
8587      do
8588        i=`expr $i + 1`
8589        teststring=$teststring$teststring
8590      done
8591      # Only check the string length outside the loop.
8592      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
8593      teststring=
8594      # Add a significant safety factor because C++ compilers can tack on
8595      # massive amounts of additional arguments before passing them to the
8596      # linker.  It appears as though 1/2 is a usable value.
8597      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
8598    fi
8599    ;;
8600  esac
8601
8602fi
8603
8604if test -n "$lt_cv_sys_max_cmd_len"; then
8605  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
8606printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
8607else
8608  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
8609printf "%s\n" "none" >&6; }
8610fi
8611max_cmd_len=$lt_cv_sys_max_cmd_len
8612
8613
8614
8615
8616
8617
8618: ${CP="cp -f"}
8619: ${MV="mv -f"}
8620: ${RM="rm -f"}
8621
8622if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8623  lt_unset=unset
8624else
8625  lt_unset=false
8626fi
8627
8628
8629
8630
8631
8632# test EBCDIC or ASCII
8633case `echo X|tr X '\101'` in
8634 A) # ASCII based system
8635    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8636  lt_SP2NL='tr \040 \012'
8637  lt_NL2SP='tr \015\012 \040\040'
8638  ;;
8639 *) # EBCDIC based system
8640  lt_SP2NL='tr \100 \n'
8641  lt_NL2SP='tr \r\n \100\100'
8642  ;;
8643esac
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
8654printf %s "checking how to convert $build file names to $host format... " >&6; }
8655if test ${lt_cv_to_host_file_cmd+y}
8656then :
8657  printf %s "(cached) " >&6
8658else $as_nop
8659  case $host in
8660  *-*-mingw* )
8661    case $build in
8662      *-*-mingw* ) # actually msys
8663        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8664        ;;
8665      *-*-cygwin* )
8666        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8667        ;;
8668      * ) # otherwise, assume *nix
8669        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8670        ;;
8671    esac
8672    ;;
8673  *-*-cygwin* )
8674    case $build in
8675      *-*-mingw* ) # actually msys
8676        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8677        ;;
8678      *-*-cygwin* )
8679        lt_cv_to_host_file_cmd=func_convert_file_noop
8680        ;;
8681      * ) # otherwise, assume *nix
8682        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8683        ;;
8684    esac
8685    ;;
8686  * ) # unhandled hosts (and "normal" native builds)
8687    lt_cv_to_host_file_cmd=func_convert_file_noop
8688    ;;
8689esac
8690
8691fi
8692
8693to_host_file_cmd=$lt_cv_to_host_file_cmd
8694{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
8695printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
8696
8697
8698
8699
8700
8701{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
8702printf %s "checking how to convert $build file names to toolchain format... " >&6; }
8703if test ${lt_cv_to_tool_file_cmd+y}
8704then :
8705  printf %s "(cached) " >&6
8706else $as_nop
8707  #assume ordinary cross tools, or native build.
8708lt_cv_to_tool_file_cmd=func_convert_file_noop
8709case $host in
8710  *-*-mingw* )
8711    case $build in
8712      *-*-mingw* ) # actually msys
8713        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8714        ;;
8715    esac
8716    ;;
8717esac
8718
8719fi
8720
8721to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8722{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
8723printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
8724
8725
8726
8727
8728
8729{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
8730printf %s "checking for $LD option to reload object files... " >&6; }
8731if test ${lt_cv_ld_reload_flag+y}
8732then :
8733  printf %s "(cached) " >&6
8734else $as_nop
8735  lt_cv_ld_reload_flag='-r'
8736fi
8737{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
8738printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
8739reload_flag=$lt_cv_ld_reload_flag
8740case $reload_flag in
8741"" | " "*) ;;
8742*) reload_flag=" $reload_flag" ;;
8743esac
8744reload_cmds='$LD$reload_flag -o $output$reload_objs'
8745case $host_os in
8746  cygwin* | mingw* | pw32* | cegcc*)
8747    if test yes != "$GCC"; then
8748      reload_cmds=false
8749    fi
8750    ;;
8751  darwin*)
8752    if test yes = "$GCC"; then
8753      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
8754    else
8755      reload_cmds='$LD$reload_flag -o $output$reload_objs'
8756    fi
8757    ;;
8758esac
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768if test -n "$ac_tool_prefix"; then
8769  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
8770set dummy ${ac_tool_prefix}objdump; ac_word=$2
8771{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8772printf %s "checking for $ac_word... " >&6; }
8773if test ${ac_cv_prog_OBJDUMP+y}
8774then :
8775  printf %s "(cached) " >&6
8776else $as_nop
8777  if test -n "$OBJDUMP"; then
8778  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
8779else
8780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8781for as_dir in $PATH
8782do
8783  IFS=$as_save_IFS
8784  case $as_dir in #(((
8785    '') as_dir=./ ;;
8786    */) ;;
8787    *) as_dir=$as_dir/ ;;
8788  esac
8789    for ac_exec_ext in '' $ac_executable_extensions; do
8790  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8791    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
8792    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8793    break 2
8794  fi
8795done
8796  done
8797IFS=$as_save_IFS
8798
8799fi
8800fi
8801OBJDUMP=$ac_cv_prog_OBJDUMP
8802if test -n "$OBJDUMP"; then
8803  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
8804printf "%s\n" "$OBJDUMP" >&6; }
8805else
8806  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8807printf "%s\n" "no" >&6; }
8808fi
8809
8810
8811fi
8812if test -z "$ac_cv_prog_OBJDUMP"; then
8813  ac_ct_OBJDUMP=$OBJDUMP
8814  # Extract the first word of "objdump", so it can be a program name with args.
8815set dummy objdump; ac_word=$2
8816{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8817printf %s "checking for $ac_word... " >&6; }
8818if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
8819then :
8820  printf %s "(cached) " >&6
8821else $as_nop
8822  if test -n "$ac_ct_OBJDUMP"; then
8823  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
8824else
8825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8826for as_dir in $PATH
8827do
8828  IFS=$as_save_IFS
8829  case $as_dir in #(((
8830    '') as_dir=./ ;;
8831    */) ;;
8832    *) as_dir=$as_dir/ ;;
8833  esac
8834    for ac_exec_ext in '' $ac_executable_extensions; do
8835  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8836    ac_cv_prog_ac_ct_OBJDUMP="objdump"
8837    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8838    break 2
8839  fi
8840done
8841  done
8842IFS=$as_save_IFS
8843
8844fi
8845fi
8846ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
8847if test -n "$ac_ct_OBJDUMP"; then
8848  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
8849printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
8850else
8851  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8852printf "%s\n" "no" >&6; }
8853fi
8854
8855  if test "x$ac_ct_OBJDUMP" = x; then
8856    OBJDUMP="false"
8857  else
8858    case $cross_compiling:$ac_tool_warned in
8859yes:)
8860{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8861printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8862ac_tool_warned=yes ;;
8863esac
8864    OBJDUMP=$ac_ct_OBJDUMP
8865  fi
8866else
8867  OBJDUMP="$ac_cv_prog_OBJDUMP"
8868fi
8869
8870test -z "$OBJDUMP" && OBJDUMP=objdump
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
8881printf %s "checking how to recognize dependent libraries... " >&6; }
8882if test ${lt_cv_deplibs_check_method+y}
8883then :
8884  printf %s "(cached) " >&6
8885else $as_nop
8886  lt_cv_file_magic_cmd='$MAGIC_CMD'
8887lt_cv_file_magic_test_file=
8888lt_cv_deplibs_check_method='unknown'
8889# Need to set the preceding variable on all platforms that support
8890# interlibrary dependencies.
8891# 'none' -- dependencies not supported.
8892# 'unknown' -- same as none, but documents that we really don't know.
8893# 'pass_all' -- all dependencies passed with no checks.
8894# 'test_compile' -- check by making test program.
8895# 'file_magic [[regex]]' -- check by looking for files in library path
8896# that responds to the $file_magic_cmd with a given extended regex.
8897# If you have 'file' or equivalent on your system and you're not sure
8898# whether 'pass_all' will *always* work, you probably want this one.
8899
8900case $host_os in
8901aix[4-9]*)
8902  lt_cv_deplibs_check_method=pass_all
8903  ;;
8904
8905beos*)
8906  lt_cv_deplibs_check_method=pass_all
8907  ;;
8908
8909bsdi[45]*)
8910  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
8911  lt_cv_file_magic_cmd='/usr/bin/file -L'
8912  lt_cv_file_magic_test_file=/shlib/libc.so
8913  ;;
8914
8915cygwin*)
8916  # func_win32_libid is a shell function defined in ltmain.sh
8917  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8918  lt_cv_file_magic_cmd='func_win32_libid'
8919  ;;
8920
8921mingw* | pw32*)
8922  # Base MSYS/MinGW do not provide the 'file' command needed by
8923  # func_win32_libid shell function, so use a weaker test based on 'objdump',
8924  # unless we find 'file', for example because we are cross-compiling.
8925  if ( file / ) >/dev/null 2>&1; then
8926    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8927    lt_cv_file_magic_cmd='func_win32_libid'
8928  else
8929    # Keep this pattern in sync with the one in func_win32_libid.
8930    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
8931    lt_cv_file_magic_cmd='$OBJDUMP -f'
8932  fi
8933  ;;
8934
8935cegcc*)
8936  # use the weaker test based on 'objdump'. See mingw*.
8937  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
8938  lt_cv_file_magic_cmd='$OBJDUMP -f'
8939  ;;
8940
8941darwin* | rhapsody*)
8942  lt_cv_deplibs_check_method=pass_all
8943  ;;
8944
8945freebsd* | dragonfly*)
8946  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8947    case $host_cpu in
8948    i*86 )
8949      # Not sure whether the presence of OpenBSD here was a mistake.
8950      # Let's accept both of them until this is cleared up.
8951      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
8952      lt_cv_file_magic_cmd=/usr/bin/file
8953      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8954      ;;
8955    esac
8956  else
8957    lt_cv_deplibs_check_method=pass_all
8958  fi
8959  ;;
8960
8961haiku*)
8962  lt_cv_deplibs_check_method=pass_all
8963  ;;
8964
8965hpux10.20* | hpux11*)
8966  lt_cv_file_magic_cmd=/usr/bin/file
8967  case $host_cpu in
8968  ia64*)
8969    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
8970    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
8971    ;;
8972  hppa*64*)
8973    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]'
8974    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
8975    ;;
8976  *)
8977    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
8978    lt_cv_file_magic_test_file=/usr/lib/libc.sl
8979    ;;
8980  esac
8981  ;;
8982
8983interix[3-9]*)
8984  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8985  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
8986  ;;
8987
8988irix5* | irix6* | nonstopux*)
8989  case $LD in
8990  *-32|*"-32 ") libmagic=32-bit;;
8991  *-n32|*"-n32 ") libmagic=N32;;
8992  *-64|*"-64 ") libmagic=64-bit;;
8993  *) libmagic=never-match;;
8994  esac
8995  lt_cv_deplibs_check_method=pass_all
8996  ;;
8997
8998# This must be glibc/ELF.
8999linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
9000  lt_cv_deplibs_check_method=pass_all
9001  ;;
9002
9003netbsd*)
9004  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
9005    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
9006  else
9007    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
9008  fi
9009  ;;
9010
9011newos6*)
9012  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
9013  lt_cv_file_magic_cmd=/usr/bin/file
9014  lt_cv_file_magic_test_file=/usr/lib/libnls.so
9015  ;;
9016
9017*nto* | *qnx*)
9018  lt_cv_deplibs_check_method=pass_all
9019  ;;
9020
9021openbsd* | bitrig*)
9022  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
9023    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
9024  else
9025    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
9026  fi
9027  ;;
9028
9029osf3* | osf4* | osf5*)
9030  lt_cv_deplibs_check_method=pass_all
9031  ;;
9032
9033rdos*)
9034  lt_cv_deplibs_check_method=pass_all
9035  ;;
9036
9037solaris*)
9038  lt_cv_deplibs_check_method=pass_all
9039  ;;
9040
9041sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
9042  lt_cv_deplibs_check_method=pass_all
9043  ;;
9044
9045sysv4 | sysv4.3*)
9046  case $host_vendor in
9047  motorola)
9048    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]'
9049    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
9050    ;;
9051  ncr)
9052    lt_cv_deplibs_check_method=pass_all
9053    ;;
9054  sequent)
9055    lt_cv_file_magic_cmd='/bin/file'
9056    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
9057    ;;
9058  sni)
9059    lt_cv_file_magic_cmd='/bin/file'
9060    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
9061    lt_cv_file_magic_test_file=/lib/libc.so
9062    ;;
9063  siemens)
9064    lt_cv_deplibs_check_method=pass_all
9065    ;;
9066  pc)
9067    lt_cv_deplibs_check_method=pass_all
9068    ;;
9069  esac
9070  ;;
9071
9072tpf*)
9073  lt_cv_deplibs_check_method=pass_all
9074  ;;
9075os2*)
9076  lt_cv_deplibs_check_method=pass_all
9077  ;;
9078esac
9079
9080fi
9081{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
9082printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
9083
9084file_magic_glob=
9085want_nocaseglob=no
9086if test "$build" = "$host"; then
9087  case $host_os in
9088  mingw* | pw32*)
9089    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
9090      want_nocaseglob=yes
9091    else
9092      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
9093    fi
9094    ;;
9095  esac
9096fi
9097
9098file_magic_cmd=$lt_cv_file_magic_cmd
9099deplibs_check_method=$lt_cv_deplibs_check_method
9100test -z "$deplibs_check_method" && deplibs_check_method=unknown
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123if test -n "$ac_tool_prefix"; then
9124  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9125set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9126{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9127printf %s "checking for $ac_word... " >&6; }
9128if test ${ac_cv_prog_DLLTOOL+y}
9129then :
9130  printf %s "(cached) " >&6
9131else $as_nop
9132  if test -n "$DLLTOOL"; then
9133  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9134else
9135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9136for as_dir in $PATH
9137do
9138  IFS=$as_save_IFS
9139  case $as_dir in #(((
9140    '') as_dir=./ ;;
9141    */) ;;
9142    *) as_dir=$as_dir/ ;;
9143  esac
9144    for ac_exec_ext in '' $ac_executable_extensions; do
9145  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9146    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9147    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9148    break 2
9149  fi
9150done
9151  done
9152IFS=$as_save_IFS
9153
9154fi
9155fi
9156DLLTOOL=$ac_cv_prog_DLLTOOL
9157if test -n "$DLLTOOL"; then
9158  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9159printf "%s\n" "$DLLTOOL" >&6; }
9160else
9161  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9162printf "%s\n" "no" >&6; }
9163fi
9164
9165
9166fi
9167if test -z "$ac_cv_prog_DLLTOOL"; then
9168  ac_ct_DLLTOOL=$DLLTOOL
9169  # Extract the first word of "dlltool", so it can be a program name with args.
9170set dummy dlltool; ac_word=$2
9171{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9172printf %s "checking for $ac_word... " >&6; }
9173if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
9174then :
9175  printf %s "(cached) " >&6
9176else $as_nop
9177  if test -n "$ac_ct_DLLTOOL"; then
9178  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9179else
9180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9181for as_dir in $PATH
9182do
9183  IFS=$as_save_IFS
9184  case $as_dir in #(((
9185    '') as_dir=./ ;;
9186    */) ;;
9187    *) as_dir=$as_dir/ ;;
9188  esac
9189    for ac_exec_ext in '' $ac_executable_extensions; do
9190  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9191    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9192    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9193    break 2
9194  fi
9195done
9196  done
9197IFS=$as_save_IFS
9198
9199fi
9200fi
9201ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9202if test -n "$ac_ct_DLLTOOL"; then
9203  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9204printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
9205else
9206  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9207printf "%s\n" "no" >&6; }
9208fi
9209
9210  if test "x$ac_ct_DLLTOOL" = x; then
9211    DLLTOOL="false"
9212  else
9213    case $cross_compiling:$ac_tool_warned in
9214yes:)
9215{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9216printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9217ac_tool_warned=yes ;;
9218esac
9219    DLLTOOL=$ac_ct_DLLTOOL
9220  fi
9221else
9222  DLLTOOL="$ac_cv_prog_DLLTOOL"
9223fi
9224
9225test -z "$DLLTOOL" && DLLTOOL=dlltool
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
9237printf %s "checking how to associate runtime and link libraries... " >&6; }
9238if test ${lt_cv_sharedlib_from_linklib_cmd+y}
9239then :
9240  printf %s "(cached) " >&6
9241else $as_nop
9242  lt_cv_sharedlib_from_linklib_cmd='unknown'
9243
9244case $host_os in
9245cygwin* | mingw* | pw32* | cegcc*)
9246  # two different shell functions defined in ltmain.sh;
9247  # decide which one to use based on capabilities of $DLLTOOL
9248  case `$DLLTOOL --help 2>&1` in
9249  *--identify-strict*)
9250    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
9251    ;;
9252  *)
9253    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
9254    ;;
9255  esac
9256  ;;
9257*)
9258  # fallback: assume linklib IS sharedlib
9259  lt_cv_sharedlib_from_linklib_cmd=$ECHO
9260  ;;
9261esac
9262
9263fi
9264{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
9265printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
9266sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
9267test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
9268
9269
9270
9271
9272
9273
9274
9275if test -n "$ac_tool_prefix"; then
9276  for ac_prog in ar
9277  do
9278    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9279set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9280{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9281printf %s "checking for $ac_word... " >&6; }
9282if test ${ac_cv_prog_AR+y}
9283then :
9284  printf %s "(cached) " >&6
9285else $as_nop
9286  if test -n "$AR"; then
9287  ac_cv_prog_AR="$AR" # Let the user override the test.
9288else
9289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9290for as_dir in $PATH
9291do
9292  IFS=$as_save_IFS
9293  case $as_dir in #(((
9294    '') as_dir=./ ;;
9295    */) ;;
9296    *) as_dir=$as_dir/ ;;
9297  esac
9298    for ac_exec_ext in '' $ac_executable_extensions; do
9299  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9300    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
9301    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9302    break 2
9303  fi
9304done
9305  done
9306IFS=$as_save_IFS
9307
9308fi
9309fi
9310AR=$ac_cv_prog_AR
9311if test -n "$AR"; then
9312  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9313printf "%s\n" "$AR" >&6; }
9314else
9315  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9316printf "%s\n" "no" >&6; }
9317fi
9318
9319
9320    test -n "$AR" && break
9321  done
9322fi
9323if test -z "$AR"; then
9324  ac_ct_AR=$AR
9325  for ac_prog in ar
9326do
9327  # Extract the first word of "$ac_prog", so it can be a program name with args.
9328set dummy $ac_prog; ac_word=$2
9329{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9330printf %s "checking for $ac_word... " >&6; }
9331if test ${ac_cv_prog_ac_ct_AR+y}
9332then :
9333  printf %s "(cached) " >&6
9334else $as_nop
9335  if test -n "$ac_ct_AR"; then
9336  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9337else
9338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9339for as_dir in $PATH
9340do
9341  IFS=$as_save_IFS
9342  case $as_dir in #(((
9343    '') as_dir=./ ;;
9344    */) ;;
9345    *) as_dir=$as_dir/ ;;
9346  esac
9347    for ac_exec_ext in '' $ac_executable_extensions; do
9348  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9349    ac_cv_prog_ac_ct_AR="$ac_prog"
9350    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9351    break 2
9352  fi
9353done
9354  done
9355IFS=$as_save_IFS
9356
9357fi
9358fi
9359ac_ct_AR=$ac_cv_prog_ac_ct_AR
9360if test -n "$ac_ct_AR"; then
9361  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9362printf "%s\n" "$ac_ct_AR" >&6; }
9363else
9364  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9365printf "%s\n" "no" >&6; }
9366fi
9367
9368
9369  test -n "$ac_ct_AR" && break
9370done
9371
9372  if test "x$ac_ct_AR" = x; then
9373    AR="false"
9374  else
9375    case $cross_compiling:$ac_tool_warned in
9376yes:)
9377{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9378printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9379ac_tool_warned=yes ;;
9380esac
9381    AR=$ac_ct_AR
9382  fi
9383fi
9384
9385: ${AR=ar}
9386: ${AR_FLAGS=cru}
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
9399printf %s "checking for archiver @FILE support... " >&6; }
9400if test ${lt_cv_ar_at_file+y}
9401then :
9402  printf %s "(cached) " >&6
9403else $as_nop
9404  lt_cv_ar_at_file=no
9405   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9406/* end confdefs.h.  */
9407
9408int
9409main (void)
9410{
9411
9412  ;
9413  return 0;
9414}
9415_ACEOF
9416if ac_fn_c_try_compile "$LINENO"
9417then :
9418  echo conftest.$ac_objext > conftest.lst
9419      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
9420      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
9421  (eval $lt_ar_try) 2>&5
9422  ac_status=$?
9423  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9424  test $ac_status = 0; }
9425      if test 0 -eq "$ac_status"; then
9426	# Ensure the archiver fails upon bogus file names.
9427	rm -f conftest.$ac_objext libconftest.a
9428	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
9429  (eval $lt_ar_try) 2>&5
9430  ac_status=$?
9431  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9432  test $ac_status = 0; }
9433	if test 0 -ne "$ac_status"; then
9434          lt_cv_ar_at_file=@
9435        fi
9436      fi
9437      rm -f conftest.* libconftest.a
9438
9439fi
9440rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9441
9442fi
9443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
9444printf "%s\n" "$lt_cv_ar_at_file" >&6; }
9445
9446if test no = "$lt_cv_ar_at_file"; then
9447  archiver_list_spec=
9448else
9449  archiver_list_spec=$lt_cv_ar_at_file
9450fi
9451
9452
9453
9454
9455
9456
9457
9458if test -n "$ac_tool_prefix"; then
9459  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9460set dummy ${ac_tool_prefix}strip; ac_word=$2
9461{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9462printf %s "checking for $ac_word... " >&6; }
9463if test ${ac_cv_prog_STRIP+y}
9464then :
9465  printf %s "(cached) " >&6
9466else $as_nop
9467  if test -n "$STRIP"; then
9468  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9469else
9470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9471for as_dir in $PATH
9472do
9473  IFS=$as_save_IFS
9474  case $as_dir in #(((
9475    '') as_dir=./ ;;
9476    */) ;;
9477    *) as_dir=$as_dir/ ;;
9478  esac
9479    for ac_exec_ext in '' $ac_executable_extensions; do
9480  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9481    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9482    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9483    break 2
9484  fi
9485done
9486  done
9487IFS=$as_save_IFS
9488
9489fi
9490fi
9491STRIP=$ac_cv_prog_STRIP
9492if test -n "$STRIP"; then
9493  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9494printf "%s\n" "$STRIP" >&6; }
9495else
9496  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9497printf "%s\n" "no" >&6; }
9498fi
9499
9500
9501fi
9502if test -z "$ac_cv_prog_STRIP"; then
9503  ac_ct_STRIP=$STRIP
9504  # Extract the first word of "strip", so it can be a program name with args.
9505set dummy strip; ac_word=$2
9506{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9507printf %s "checking for $ac_word... " >&6; }
9508if test ${ac_cv_prog_ac_ct_STRIP+y}
9509then :
9510  printf %s "(cached) " >&6
9511else $as_nop
9512  if test -n "$ac_ct_STRIP"; then
9513  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9514else
9515as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9516for as_dir in $PATH
9517do
9518  IFS=$as_save_IFS
9519  case $as_dir in #(((
9520    '') as_dir=./ ;;
9521    */) ;;
9522    *) as_dir=$as_dir/ ;;
9523  esac
9524    for ac_exec_ext in '' $ac_executable_extensions; do
9525  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9526    ac_cv_prog_ac_ct_STRIP="strip"
9527    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9528    break 2
9529  fi
9530done
9531  done
9532IFS=$as_save_IFS
9533
9534fi
9535fi
9536ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9537if test -n "$ac_ct_STRIP"; then
9538  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9539printf "%s\n" "$ac_ct_STRIP" >&6; }
9540else
9541  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9542printf "%s\n" "no" >&6; }
9543fi
9544
9545  if test "x$ac_ct_STRIP" = x; then
9546    STRIP=":"
9547  else
9548    case $cross_compiling:$ac_tool_warned in
9549yes:)
9550{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9551printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9552ac_tool_warned=yes ;;
9553esac
9554    STRIP=$ac_ct_STRIP
9555  fi
9556else
9557  STRIP="$ac_cv_prog_STRIP"
9558fi
9559
9560test -z "$STRIP" && STRIP=:
9561
9562
9563
9564
9565
9566
9567if test -n "$ac_tool_prefix"; then
9568  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9569set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9571printf %s "checking for $ac_word... " >&6; }
9572if test ${ac_cv_prog_RANLIB+y}
9573then :
9574  printf %s "(cached) " >&6
9575else $as_nop
9576  if test -n "$RANLIB"; then
9577  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9578else
9579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9580for as_dir in $PATH
9581do
9582  IFS=$as_save_IFS
9583  case $as_dir in #(((
9584    '') as_dir=./ ;;
9585    */) ;;
9586    *) as_dir=$as_dir/ ;;
9587  esac
9588    for ac_exec_ext in '' $ac_executable_extensions; do
9589  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9590    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9591    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9592    break 2
9593  fi
9594done
9595  done
9596IFS=$as_save_IFS
9597
9598fi
9599fi
9600RANLIB=$ac_cv_prog_RANLIB
9601if test -n "$RANLIB"; then
9602  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9603printf "%s\n" "$RANLIB" >&6; }
9604else
9605  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9606printf "%s\n" "no" >&6; }
9607fi
9608
9609
9610fi
9611if test -z "$ac_cv_prog_RANLIB"; then
9612  ac_ct_RANLIB=$RANLIB
9613  # Extract the first word of "ranlib", so it can be a program name with args.
9614set dummy ranlib; ac_word=$2
9615{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9616printf %s "checking for $ac_word... " >&6; }
9617if test ${ac_cv_prog_ac_ct_RANLIB+y}
9618then :
9619  printf %s "(cached) " >&6
9620else $as_nop
9621  if test -n "$ac_ct_RANLIB"; then
9622  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9623else
9624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9625for as_dir in $PATH
9626do
9627  IFS=$as_save_IFS
9628  case $as_dir in #(((
9629    '') as_dir=./ ;;
9630    */) ;;
9631    *) as_dir=$as_dir/ ;;
9632  esac
9633    for ac_exec_ext in '' $ac_executable_extensions; do
9634  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9635    ac_cv_prog_ac_ct_RANLIB="ranlib"
9636    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9637    break 2
9638  fi
9639done
9640  done
9641IFS=$as_save_IFS
9642
9643fi
9644fi
9645ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9646if test -n "$ac_ct_RANLIB"; then
9647  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9648printf "%s\n" "$ac_ct_RANLIB" >&6; }
9649else
9650  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9651printf "%s\n" "no" >&6; }
9652fi
9653
9654  if test "x$ac_ct_RANLIB" = x; then
9655    RANLIB=":"
9656  else
9657    case $cross_compiling:$ac_tool_warned in
9658yes:)
9659{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9660printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9661ac_tool_warned=yes ;;
9662esac
9663    RANLIB=$ac_ct_RANLIB
9664  fi
9665else
9666  RANLIB="$ac_cv_prog_RANLIB"
9667fi
9668
9669test -z "$RANLIB" && RANLIB=:
9670
9671
9672
9673
9674
9675
9676# Determine commands to create old-style static archives.
9677old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
9678old_postinstall_cmds='chmod 644 $oldlib'
9679old_postuninstall_cmds=
9680
9681if test -n "$RANLIB"; then
9682  case $host_os in
9683  bitrig* | openbsd*)
9684    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
9685    ;;
9686  *)
9687    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
9688    ;;
9689  esac
9690  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
9691fi
9692
9693case $host_os in
9694  darwin*)
9695    lock_old_archive_extraction=yes ;;
9696  *)
9697    lock_old_archive_extraction=no ;;
9698esac
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720for ac_prog in gawk mawk nawk awk
9721do
9722  # Extract the first word of "$ac_prog", so it can be a program name with args.
9723set dummy $ac_prog; ac_word=$2
9724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9725printf %s "checking for $ac_word... " >&6; }
9726if test ${ac_cv_prog_AWK+y}
9727then :
9728  printf %s "(cached) " >&6
9729else $as_nop
9730  if test -n "$AWK"; then
9731  ac_cv_prog_AWK="$AWK" # Let the user override the test.
9732else
9733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9734for as_dir in $PATH
9735do
9736  IFS=$as_save_IFS
9737  case $as_dir in #(((
9738    '') as_dir=./ ;;
9739    */) ;;
9740    *) as_dir=$as_dir/ ;;
9741  esac
9742    for ac_exec_ext in '' $ac_executable_extensions; do
9743  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9744    ac_cv_prog_AWK="$ac_prog"
9745    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9746    break 2
9747  fi
9748done
9749  done
9750IFS=$as_save_IFS
9751
9752fi
9753fi
9754AWK=$ac_cv_prog_AWK
9755if test -n "$AWK"; then
9756  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
9757printf "%s\n" "$AWK" >&6; }
9758else
9759  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9760printf "%s\n" "no" >&6; }
9761fi
9762
9763
9764  test -n "$AWK" && break
9765done
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785# If no C compiler was specified, use CC.
9786LTCC=${LTCC-"$CC"}
9787
9788# If no C compiler flags were specified, use CFLAGS.
9789LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9790
9791# Allow CC to be a program name with arguments.
9792compiler=$CC
9793
9794
9795# Check for command to grab the raw symbol name followed by C symbol from nm.
9796{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
9797printf %s "checking command to parse $NM output from $compiler object... " >&6; }
9798if test ${lt_cv_sys_global_symbol_pipe+y}
9799then :
9800  printf %s "(cached) " >&6
9801else $as_nop
9802
9803# These are sane defaults that work on at least a few old systems.
9804# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
9805
9806# Character class describing NM global symbol codes.
9807symcode='[BCDEGRST]'
9808
9809# Regexp to match symbols that can be accessed directly from C.
9810sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
9811
9812# Define system-specific variables.
9813case $host_os in
9814aix*)
9815  symcode='[BCDT]'
9816  ;;
9817cygwin* | mingw* | pw32* | cegcc*)
9818  symcode='[ABCDGISTW]'
9819  ;;
9820hpux*)
9821  if test ia64 = "$host_cpu"; then
9822    symcode='[ABCDEGRST]'
9823  fi
9824  ;;
9825irix* | nonstopux*)
9826  symcode='[BCDEGRST]'
9827  ;;
9828osf*)
9829  symcode='[BCDEGQRST]'
9830  ;;
9831solaris*)
9832  symcode='[BDRT]'
9833  ;;
9834sco3.2v5*)
9835  symcode='[DT]'
9836  ;;
9837sysv4.2uw2*)
9838  symcode='[DT]'
9839  ;;
9840sysv5* | sco5v6* | unixware* | OpenUNIX*)
9841  symcode='[ABDT]'
9842  ;;
9843sysv4)
9844  symcode='[DFNSTU]'
9845  ;;
9846esac
9847
9848# If we're using GNU nm, then use its standard symbol codes.
9849case `$NM -V 2>&1` in
9850*GNU* | *'with BFD'*)
9851  symcode='[ABCDGIRSTW]' ;;
9852esac
9853
9854if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9855  # Gets list of data symbols to import.
9856  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
9857  # Adjust the below global symbol transforms to fixup imported variables.
9858  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
9859  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
9860  lt_c_name_lib_hook="\
9861  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
9862  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
9863else
9864  # Disable hooks by default.
9865  lt_cv_sys_global_symbol_to_import=
9866  lt_cdecl_hook=
9867  lt_c_name_hook=
9868  lt_c_name_lib_hook=
9869fi
9870
9871# Transform an extracted symbol line into a proper C declaration.
9872# Some systems (esp. on ia64) link data and code symbols differently,
9873# so use this general approach.
9874lt_cv_sys_global_symbol_to_cdecl="sed -n"\
9875$lt_cdecl_hook\
9876" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
9877" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
9878
9879# Transform an extracted symbol line into symbol name and symbol address
9880lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
9881$lt_c_name_hook\
9882" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
9883" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
9884
9885# Transform an extracted symbol line into symbol name with lib prefix and
9886# symbol address.
9887lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
9888$lt_c_name_lib_hook\
9889" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
9890" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
9891" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
9892
9893# Handle CRLF in mingw tool chain
9894opt_cr=
9895case $build_os in
9896mingw*)
9897  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
9898  ;;
9899esac
9900
9901# Try without a prefix underscore, then with it.
9902for ac_symprfx in "" "_"; do
9903
9904  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
9905  symxfrm="\\1 $ac_symprfx\\2 \\2"
9906
9907  # Write the raw and C identifiers.
9908  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9909    # Fake it for dumpbin and say T for any non-static function,
9910    # D for any global variable and I for any imported variable.
9911    # Also find C++ and __fastcall symbols from MSVC++,
9912    # which start with @ or ?.
9913    lt_cv_sys_global_symbol_pipe="$AWK '"\
9914"     {last_section=section; section=\$ 3};"\
9915"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
9916"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
9917"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
9918"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
9919"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
9920"     \$ 0!~/External *\|/{next};"\
9921"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
9922"     {if(hide[section]) next};"\
9923"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
9924"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
9925"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
9926"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
9927"     ' prfx=^$ac_symprfx"
9928  else
9929    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
9930  fi
9931  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
9932
9933  # Check to see that the pipe works correctly.
9934  pipe_works=no
9935
9936  rm -f conftest*
9937  cat > conftest.$ac_ext <<_LT_EOF
9938#ifdef __cplusplus
9939extern "C" {
9940#endif
9941char nm_test_var;
9942void nm_test_func(void);
9943void nm_test_func(void){}
9944#ifdef __cplusplus
9945}
9946#endif
9947int main(){nm_test_var='a';nm_test_func();return(0);}
9948_LT_EOF
9949
9950  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9951  (eval $ac_compile) 2>&5
9952  ac_status=$?
9953  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9954  test $ac_status = 0; }; then
9955    # Now try to grab the symbols.
9956    nlist=conftest.nm
9957    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
9958  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
9959  ac_status=$?
9960  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9961  test $ac_status = 0; } && test -s "$nlist"; then
9962      # Try sorting and uniquifying the output.
9963      if sort "$nlist" | uniq > "$nlist"T; then
9964	mv -f "$nlist"T "$nlist"
9965      else
9966	rm -f "$nlist"T
9967      fi
9968
9969      # Make sure that we snagged all the symbols we need.
9970      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
9971	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
9972	  cat <<_LT_EOF > conftest.$ac_ext
9973/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
9974#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
9975/* DATA imports from DLLs on WIN32 can't be const, because runtime
9976   relocations are performed -- see ld's documentation on pseudo-relocs.  */
9977# define LT_DLSYM_CONST
9978#elif defined __osf__
9979/* This system does not cope well with relocations in const data.  */
9980# define LT_DLSYM_CONST
9981#else
9982# define LT_DLSYM_CONST const
9983#endif
9984
9985#ifdef __cplusplus
9986extern "C" {
9987#endif
9988
9989_LT_EOF
9990	  # Now generate the symbol file.
9991	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
9992
9993	  cat <<_LT_EOF >> conftest.$ac_ext
9994
9995/* The mapping between symbol names and symbols.  */
9996LT_DLSYM_CONST struct {
9997  const char *name;
9998  void       *address;
9999}
10000lt__PROGRAM__LTX_preloaded_symbols[] =
10001{
10002  { "@PROGRAM@", (void *) 0 },
10003_LT_EOF
10004	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
10005	  cat <<\_LT_EOF >> conftest.$ac_ext
10006  {0, (void *) 0}
10007};
10008
10009/* This works around a problem in FreeBSD linker */
10010#ifdef FREEBSD_WORKAROUND
10011static const void *lt_preloaded_setup() {
10012  return lt__PROGRAM__LTX_preloaded_symbols;
10013}
10014#endif
10015
10016#ifdef __cplusplus
10017}
10018#endif
10019_LT_EOF
10020	  # Now try linking the two files.
10021	  mv conftest.$ac_objext conftstm.$ac_objext
10022	  lt_globsym_save_LIBS=$LIBS
10023	  lt_globsym_save_CFLAGS=$CFLAGS
10024	  LIBS=conftstm.$ac_objext
10025	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
10026	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10027  (eval $ac_link) 2>&5
10028  ac_status=$?
10029  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10030  test $ac_status = 0; } && test -s conftest$ac_exeext; then
10031	    pipe_works=yes
10032	  fi
10033	  LIBS=$lt_globsym_save_LIBS
10034	  CFLAGS=$lt_globsym_save_CFLAGS
10035	else
10036	  echo "cannot find nm_test_func in $nlist" >&5
10037	fi
10038      else
10039	echo "cannot find nm_test_var in $nlist" >&5
10040      fi
10041    else
10042      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
10043    fi
10044  else
10045    echo "$progname: failed program was:" >&5
10046    cat conftest.$ac_ext >&5
10047  fi
10048  rm -rf conftest* conftst*
10049
10050  # Do not use the global_symbol_pipe unless it works.
10051  if test yes = "$pipe_works"; then
10052    break
10053  else
10054    lt_cv_sys_global_symbol_pipe=
10055  fi
10056done
10057
10058fi
10059
10060if test -z "$lt_cv_sys_global_symbol_pipe"; then
10061  lt_cv_sys_global_symbol_to_cdecl=
10062fi
10063if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
10064  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
10065printf "%s\n" "failed" >&6; }
10066else
10067  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
10068printf "%s\n" "ok" >&6; }
10069fi
10070
10071# Response file support.
10072if test "$lt_cv_nm_interface" = "MS dumpbin"; then
10073  nm_file_list_spec='@'
10074elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
10075  nm_file_list_spec='@'
10076fi
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
10115printf %s "checking for sysroot... " >&6; }
10116
10117# Check whether --with-sysroot was given.
10118if test ${with_sysroot+y}
10119then :
10120  withval=$with_sysroot;
10121else $as_nop
10122  with_sysroot=no
10123fi
10124
10125
10126lt_sysroot=
10127case $with_sysroot in #(
10128 yes)
10129   if test yes = "$GCC"; then
10130     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
10131   fi
10132   ;; #(
10133 /*)
10134   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
10135   ;; #(
10136 no|'')
10137   ;; #(
10138 *)
10139   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
10140printf "%s\n" "$with_sysroot" >&6; }
10141   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
10142   ;;
10143esac
10144
10145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
10146printf "%s\n" "${lt_sysroot:-no}" >&6; }
10147
10148
10149
10150
10151
10152{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
10153printf %s "checking for a working dd... " >&6; }
10154if test ${ac_cv_path_lt_DD+y}
10155then :
10156  printf %s "(cached) " >&6
10157else $as_nop
10158  printf 0123456789abcdef0123456789abcdef >conftest.i
10159cat conftest.i conftest.i >conftest2.i
10160: ${lt_DD:=$DD}
10161if test -z "$lt_DD"; then
10162  ac_path_lt_DD_found=false
10163  # Loop through the user's path and test for each of PROGNAME-LIST
10164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10165for as_dir in $PATH
10166do
10167  IFS=$as_save_IFS
10168  case $as_dir in #(((
10169    '') as_dir=./ ;;
10170    */) ;;
10171    *) as_dir=$as_dir/ ;;
10172  esac
10173    for ac_prog in dd
10174   do
10175    for ac_exec_ext in '' $ac_executable_extensions; do
10176      ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
10177      as_fn_executable_p "$ac_path_lt_DD" || continue
10178if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10179  cmp -s conftest.i conftest.out \
10180  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
10181fi
10182      $ac_path_lt_DD_found && break 3
10183    done
10184  done
10185  done
10186IFS=$as_save_IFS
10187  if test -z "$ac_cv_path_lt_DD"; then
10188    :
10189  fi
10190else
10191  ac_cv_path_lt_DD=$lt_DD
10192fi
10193
10194rm -f conftest.i conftest2.i conftest.out
10195fi
10196{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
10197printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
10198
10199
10200{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
10201printf %s "checking how to truncate binary pipes... " >&6; }
10202if test ${lt_cv_truncate_bin+y}
10203then :
10204  printf %s "(cached) " >&6
10205else $as_nop
10206  printf 0123456789abcdef0123456789abcdef >conftest.i
10207cat conftest.i conftest.i >conftest2.i
10208lt_cv_truncate_bin=
10209if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
10210  cmp -s conftest.i conftest.out \
10211  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
10212fi
10213rm -f conftest.i conftest2.i conftest.out
10214test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
10215fi
10216{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
10217printf "%s\n" "$lt_cv_truncate_bin" >&6; }
10218
10219
10220
10221
10222
10223
10224
10225# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
10226func_cc_basename ()
10227{
10228    for cc_temp in $*""; do
10229      case $cc_temp in
10230        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
10231        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
10232        \-*) ;;
10233        *) break;;
10234      esac
10235    done
10236    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
10237}
10238
10239# Check whether --enable-libtool-lock was given.
10240if test ${enable_libtool_lock+y}
10241then :
10242  enableval=$enable_libtool_lock;
10243fi
10244
10245test no = "$enable_libtool_lock" || enable_libtool_lock=yes
10246
10247# Some flags need to be propagated to the compiler or linker for good
10248# libtool support.
10249case $host in
10250ia64-*-hpux*)
10251  # Find out what ABI is being produced by ac_compile, and set mode
10252  # options accordingly.
10253  echo 'int i;' > conftest.$ac_ext
10254  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10255  (eval $ac_compile) 2>&5
10256  ac_status=$?
10257  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10258  test $ac_status = 0; }; then
10259    case `/usr/bin/file conftest.$ac_objext` in
10260      *ELF-32*)
10261	HPUX_IA64_MODE=32
10262	;;
10263      *ELF-64*)
10264	HPUX_IA64_MODE=64
10265	;;
10266    esac
10267  fi
10268  rm -rf conftest*
10269  ;;
10270*-*-irix6*)
10271  # Find out what ABI is being produced by ac_compile, and set linker
10272  # options accordingly.
10273  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
10274  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10275  (eval $ac_compile) 2>&5
10276  ac_status=$?
10277  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10278  test $ac_status = 0; }; then
10279    if test yes = "$lt_cv_prog_gnu_ld"; then
10280      case `/usr/bin/file conftest.$ac_objext` in
10281	*32-bit*)
10282	  LD="${LD-ld} -melf32bsmip"
10283	  ;;
10284	*N32*)
10285	  LD="${LD-ld} -melf32bmipn32"
10286	  ;;
10287	*64-bit*)
10288	  LD="${LD-ld} -melf64bmip"
10289	;;
10290      esac
10291    else
10292      case `/usr/bin/file conftest.$ac_objext` in
10293	*32-bit*)
10294	  LD="${LD-ld} -32"
10295	  ;;
10296	*N32*)
10297	  LD="${LD-ld} -n32"
10298	  ;;
10299	*64-bit*)
10300	  LD="${LD-ld} -64"
10301	  ;;
10302      esac
10303    fi
10304  fi
10305  rm -rf conftest*
10306  ;;
10307
10308mips64*-*linux*)
10309  # Find out what ABI is being produced by ac_compile, and set linker
10310  # options accordingly.
10311  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
10312  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10313  (eval $ac_compile) 2>&5
10314  ac_status=$?
10315  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10316  test $ac_status = 0; }; then
10317    emul=elf
10318    case `/usr/bin/file conftest.$ac_objext` in
10319      *32-bit*)
10320	emul="${emul}32"
10321	;;
10322      *64-bit*)
10323	emul="${emul}64"
10324	;;
10325    esac
10326    case `/usr/bin/file conftest.$ac_objext` in
10327      *MSB*)
10328	emul="${emul}btsmip"
10329	;;
10330      *LSB*)
10331	emul="${emul}ltsmip"
10332	;;
10333    esac
10334    case `/usr/bin/file conftest.$ac_objext` in
10335      *N32*)
10336	emul="${emul}n32"
10337	;;
10338    esac
10339    LD="${LD-ld} -m $emul"
10340  fi
10341  rm -rf conftest*
10342  ;;
10343
10344x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
10345s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
10346  # Find out what ABI is being produced by ac_compile, and set linker
10347  # options accordingly.  Note that the listed cases only cover the
10348  # situations where additional linker options are needed (such as when
10349  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
10350  # vice versa); the common cases where no linker options are needed do
10351  # not appear in the list.
10352  echo 'int i;' > conftest.$ac_ext
10353  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10354  (eval $ac_compile) 2>&5
10355  ac_status=$?
10356  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10357  test $ac_status = 0; }; then
10358    case `/usr/bin/file conftest.o` in
10359      *32-bit*)
10360	case $host in
10361	  x86_64-*kfreebsd*-gnu)
10362	    LD="${LD-ld} -m elf_i386_fbsd"
10363	    ;;
10364	  x86_64-*linux*)
10365	    case `/usr/bin/file conftest.o` in
10366	      *x86-64*)
10367		LD="${LD-ld} -m elf32_x86_64"
10368		;;
10369	      *)
10370		LD="${LD-ld} -m elf_i386"
10371		;;
10372	    esac
10373	    ;;
10374	  powerpc64le-*linux*)
10375	    LD="${LD-ld} -m elf32lppclinux"
10376	    ;;
10377	  powerpc64-*linux*)
10378	    LD="${LD-ld} -m elf32ppclinux"
10379	    ;;
10380	  s390x-*linux*)
10381	    LD="${LD-ld} -m elf_s390"
10382	    ;;
10383	  sparc64-*linux*)
10384	    LD="${LD-ld} -m elf32_sparc"
10385	    ;;
10386	esac
10387	;;
10388      *64-bit*)
10389	case $host in
10390	  x86_64-*kfreebsd*-gnu)
10391	    LD="${LD-ld} -m elf_x86_64_fbsd"
10392	    ;;
10393	  x86_64-*linux*)
10394	    LD="${LD-ld} -m elf_x86_64"
10395	    ;;
10396	  powerpcle-*linux*)
10397	    LD="${LD-ld} -m elf64lppc"
10398	    ;;
10399	  powerpc-*linux*)
10400	    LD="${LD-ld} -m elf64ppc"
10401	    ;;
10402	  s390*-*linux*|s390*-*tpf*)
10403	    LD="${LD-ld} -m elf64_s390"
10404	    ;;
10405	  sparc*-*linux*)
10406	    LD="${LD-ld} -m elf64_sparc"
10407	    ;;
10408	esac
10409	;;
10410    esac
10411  fi
10412  rm -rf conftest*
10413  ;;
10414
10415*-*-sco3.2v5*)
10416  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
10417  SAVE_CFLAGS=$CFLAGS
10418  CFLAGS="$CFLAGS -belf"
10419  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
10420printf %s "checking whether the C compiler needs -belf... " >&6; }
10421if test ${lt_cv_cc_needs_belf+y}
10422then :
10423  printf %s "(cached) " >&6
10424else $as_nop
10425  ac_ext=c
10426ac_cpp='$CPP $CPPFLAGS'
10427ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10428ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10429ac_compiler_gnu=$ac_cv_c_compiler_gnu
10430
10431     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10432/* end confdefs.h.  */
10433
10434int
10435main (void)
10436{
10437
10438  ;
10439  return 0;
10440}
10441_ACEOF
10442if ac_fn_c_try_link "$LINENO"
10443then :
10444  lt_cv_cc_needs_belf=yes
10445else $as_nop
10446  lt_cv_cc_needs_belf=no
10447fi
10448rm -f core conftest.err conftest.$ac_objext conftest.beam \
10449    conftest$ac_exeext conftest.$ac_ext
10450     ac_ext=c
10451ac_cpp='$CPP $CPPFLAGS'
10452ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10453ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10454ac_compiler_gnu=$ac_cv_c_compiler_gnu
10455
10456fi
10457{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
10458printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
10459  if test yes != "$lt_cv_cc_needs_belf"; then
10460    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
10461    CFLAGS=$SAVE_CFLAGS
10462  fi
10463  ;;
10464*-*solaris*)
10465  # Find out what ABI is being produced by ac_compile, and set linker
10466  # options accordingly.
10467  echo 'int i;' > conftest.$ac_ext
10468  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10469  (eval $ac_compile) 2>&5
10470  ac_status=$?
10471  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10472  test $ac_status = 0; }; then
10473    case `/usr/bin/file conftest.o` in
10474    *64-bit*)
10475      case $lt_cv_prog_gnu_ld in
10476      yes*)
10477        case $host in
10478        i?86-*-solaris*|x86_64-*-solaris*)
10479          LD="${LD-ld} -m elf_x86_64"
10480          ;;
10481        sparc*-*-solaris*)
10482          LD="${LD-ld} -m elf64_sparc"
10483          ;;
10484        esac
10485        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
10486        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
10487          LD=${LD-ld}_sol2
10488        fi
10489        ;;
10490      *)
10491	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
10492	  LD="${LD-ld} -64"
10493	fi
10494	;;
10495      esac
10496      ;;
10497    esac
10498  fi
10499  rm -rf conftest*
10500  ;;
10501esac
10502
10503need_locks=$enable_libtool_lock
10504
10505if test -n "$ac_tool_prefix"; then
10506  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
10507set dummy ${ac_tool_prefix}mt; ac_word=$2
10508{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10509printf %s "checking for $ac_word... " >&6; }
10510if test ${ac_cv_prog_MANIFEST_TOOL+y}
10511then :
10512  printf %s "(cached) " >&6
10513else $as_nop
10514  if test -n "$MANIFEST_TOOL"; then
10515  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
10516else
10517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10518for as_dir in $PATH
10519do
10520  IFS=$as_save_IFS
10521  case $as_dir in #(((
10522    '') as_dir=./ ;;
10523    */) ;;
10524    *) as_dir=$as_dir/ ;;
10525  esac
10526    for ac_exec_ext in '' $ac_executable_extensions; do
10527  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10528    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
10529    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10530    break 2
10531  fi
10532done
10533  done
10534IFS=$as_save_IFS
10535
10536fi
10537fi
10538MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
10539if test -n "$MANIFEST_TOOL"; then
10540  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
10541printf "%s\n" "$MANIFEST_TOOL" >&6; }
10542else
10543  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10544printf "%s\n" "no" >&6; }
10545fi
10546
10547
10548fi
10549if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
10550  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
10551  # Extract the first word of "mt", so it can be a program name with args.
10552set dummy mt; ac_word=$2
10553{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10554printf %s "checking for $ac_word... " >&6; }
10555if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
10556then :
10557  printf %s "(cached) " >&6
10558else $as_nop
10559  if test -n "$ac_ct_MANIFEST_TOOL"; then
10560  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
10561else
10562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10563for as_dir in $PATH
10564do
10565  IFS=$as_save_IFS
10566  case $as_dir in #(((
10567    '') as_dir=./ ;;
10568    */) ;;
10569    *) as_dir=$as_dir/ ;;
10570  esac
10571    for ac_exec_ext in '' $ac_executable_extensions; do
10572  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10573    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
10574    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10575    break 2
10576  fi
10577done
10578  done
10579IFS=$as_save_IFS
10580
10581fi
10582fi
10583ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
10584if test -n "$ac_ct_MANIFEST_TOOL"; then
10585  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
10586printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
10587else
10588  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10589printf "%s\n" "no" >&6; }
10590fi
10591
10592  if test "x$ac_ct_MANIFEST_TOOL" = x; then
10593    MANIFEST_TOOL=":"
10594  else
10595    case $cross_compiling:$ac_tool_warned in
10596yes:)
10597{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10598printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10599ac_tool_warned=yes ;;
10600esac
10601    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
10602  fi
10603else
10604  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
10605fi
10606
10607test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
10608{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
10609printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
10610if test ${lt_cv_path_mainfest_tool+y}
10611then :
10612  printf %s "(cached) " >&6
10613else $as_nop
10614  lt_cv_path_mainfest_tool=no
10615  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
10616  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
10617  cat conftest.err >&5
10618  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
10619    lt_cv_path_mainfest_tool=yes
10620  fi
10621  rm -f conftest*
10622fi
10623{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
10624printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
10625if test yes != "$lt_cv_path_mainfest_tool"; then
10626  MANIFEST_TOOL=:
10627fi
10628
10629
10630
10631
10632
10633
10634  case $host_os in
10635    rhapsody* | darwin*)
10636    if test -n "$ac_tool_prefix"; then
10637  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
10638set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
10639{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10640printf %s "checking for $ac_word... " >&6; }
10641if test ${ac_cv_prog_DSYMUTIL+y}
10642then :
10643  printf %s "(cached) " >&6
10644else $as_nop
10645  if test -n "$DSYMUTIL"; then
10646  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
10647else
10648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10649for as_dir in $PATH
10650do
10651  IFS=$as_save_IFS
10652  case $as_dir in #(((
10653    '') as_dir=./ ;;
10654    */) ;;
10655    *) as_dir=$as_dir/ ;;
10656  esac
10657    for ac_exec_ext in '' $ac_executable_extensions; do
10658  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10659    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
10660    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10661    break 2
10662  fi
10663done
10664  done
10665IFS=$as_save_IFS
10666
10667fi
10668fi
10669DSYMUTIL=$ac_cv_prog_DSYMUTIL
10670if test -n "$DSYMUTIL"; then
10671  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10672printf "%s\n" "$DSYMUTIL" >&6; }
10673else
10674  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10675printf "%s\n" "no" >&6; }
10676fi
10677
10678
10679fi
10680if test -z "$ac_cv_prog_DSYMUTIL"; then
10681  ac_ct_DSYMUTIL=$DSYMUTIL
10682  # Extract the first word of "dsymutil", so it can be a program name with args.
10683set dummy dsymutil; ac_word=$2
10684{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10685printf %s "checking for $ac_word... " >&6; }
10686if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
10687then :
10688  printf %s "(cached) " >&6
10689else $as_nop
10690  if test -n "$ac_ct_DSYMUTIL"; then
10691  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
10692else
10693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10694for as_dir in $PATH
10695do
10696  IFS=$as_save_IFS
10697  case $as_dir in #(((
10698    '') as_dir=./ ;;
10699    */) ;;
10700    *) as_dir=$as_dir/ ;;
10701  esac
10702    for ac_exec_ext in '' $ac_executable_extensions; do
10703  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10704    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
10705    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10706    break 2
10707  fi
10708done
10709  done
10710IFS=$as_save_IFS
10711
10712fi
10713fi
10714ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
10715if test -n "$ac_ct_DSYMUTIL"; then
10716  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
10717printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
10718else
10719  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10720printf "%s\n" "no" >&6; }
10721fi
10722
10723  if test "x$ac_ct_DSYMUTIL" = x; then
10724    DSYMUTIL=":"
10725  else
10726    case $cross_compiling:$ac_tool_warned in
10727yes:)
10728{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10729printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10730ac_tool_warned=yes ;;
10731esac
10732    DSYMUTIL=$ac_ct_DSYMUTIL
10733  fi
10734else
10735  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
10736fi
10737
10738    if test -n "$ac_tool_prefix"; then
10739  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
10740set dummy ${ac_tool_prefix}nmedit; ac_word=$2
10741{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10742printf %s "checking for $ac_word... " >&6; }
10743if test ${ac_cv_prog_NMEDIT+y}
10744then :
10745  printf %s "(cached) " >&6
10746else $as_nop
10747  if test -n "$NMEDIT"; then
10748  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
10749else
10750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10751for as_dir in $PATH
10752do
10753  IFS=$as_save_IFS
10754  case $as_dir in #(((
10755    '') as_dir=./ ;;
10756    */) ;;
10757    *) as_dir=$as_dir/ ;;
10758  esac
10759    for ac_exec_ext in '' $ac_executable_extensions; do
10760  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10761    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
10762    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10763    break 2
10764  fi
10765done
10766  done
10767IFS=$as_save_IFS
10768
10769fi
10770fi
10771NMEDIT=$ac_cv_prog_NMEDIT
10772if test -n "$NMEDIT"; then
10773  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
10774printf "%s\n" "$NMEDIT" >&6; }
10775else
10776  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10777printf "%s\n" "no" >&6; }
10778fi
10779
10780
10781fi
10782if test -z "$ac_cv_prog_NMEDIT"; then
10783  ac_ct_NMEDIT=$NMEDIT
10784  # Extract the first word of "nmedit", so it can be a program name with args.
10785set dummy nmedit; ac_word=$2
10786{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10787printf %s "checking for $ac_word... " >&6; }
10788if test ${ac_cv_prog_ac_ct_NMEDIT+y}
10789then :
10790  printf %s "(cached) " >&6
10791else $as_nop
10792  if test -n "$ac_ct_NMEDIT"; then
10793  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
10794else
10795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10796for as_dir in $PATH
10797do
10798  IFS=$as_save_IFS
10799  case $as_dir in #(((
10800    '') as_dir=./ ;;
10801    */) ;;
10802    *) as_dir=$as_dir/ ;;
10803  esac
10804    for ac_exec_ext in '' $ac_executable_extensions; do
10805  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10806    ac_cv_prog_ac_ct_NMEDIT="nmedit"
10807    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10808    break 2
10809  fi
10810done
10811  done
10812IFS=$as_save_IFS
10813
10814fi
10815fi
10816ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
10817if test -n "$ac_ct_NMEDIT"; then
10818  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
10819printf "%s\n" "$ac_ct_NMEDIT" >&6; }
10820else
10821  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10822printf "%s\n" "no" >&6; }
10823fi
10824
10825  if test "x$ac_ct_NMEDIT" = x; then
10826    NMEDIT=":"
10827  else
10828    case $cross_compiling:$ac_tool_warned in
10829yes:)
10830{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10831printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10832ac_tool_warned=yes ;;
10833esac
10834    NMEDIT=$ac_ct_NMEDIT
10835  fi
10836else
10837  NMEDIT="$ac_cv_prog_NMEDIT"
10838fi
10839
10840    if test -n "$ac_tool_prefix"; then
10841  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
10842set dummy ${ac_tool_prefix}lipo; ac_word=$2
10843{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10844printf %s "checking for $ac_word... " >&6; }
10845if test ${ac_cv_prog_LIPO+y}
10846then :
10847  printf %s "(cached) " >&6
10848else $as_nop
10849  if test -n "$LIPO"; then
10850  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
10851else
10852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10853for as_dir in $PATH
10854do
10855  IFS=$as_save_IFS
10856  case $as_dir in #(((
10857    '') as_dir=./ ;;
10858    */) ;;
10859    *) as_dir=$as_dir/ ;;
10860  esac
10861    for ac_exec_ext in '' $ac_executable_extensions; do
10862  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10863    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
10864    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10865    break 2
10866  fi
10867done
10868  done
10869IFS=$as_save_IFS
10870
10871fi
10872fi
10873LIPO=$ac_cv_prog_LIPO
10874if test -n "$LIPO"; then
10875  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
10876printf "%s\n" "$LIPO" >&6; }
10877else
10878  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10879printf "%s\n" "no" >&6; }
10880fi
10881
10882
10883fi
10884if test -z "$ac_cv_prog_LIPO"; then
10885  ac_ct_LIPO=$LIPO
10886  # Extract the first word of "lipo", so it can be a program name with args.
10887set dummy lipo; ac_word=$2
10888{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10889printf %s "checking for $ac_word... " >&6; }
10890if test ${ac_cv_prog_ac_ct_LIPO+y}
10891then :
10892  printf %s "(cached) " >&6
10893else $as_nop
10894  if test -n "$ac_ct_LIPO"; then
10895  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
10896else
10897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10898for as_dir in $PATH
10899do
10900  IFS=$as_save_IFS
10901  case $as_dir in #(((
10902    '') as_dir=./ ;;
10903    */) ;;
10904    *) as_dir=$as_dir/ ;;
10905  esac
10906    for ac_exec_ext in '' $ac_executable_extensions; do
10907  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10908    ac_cv_prog_ac_ct_LIPO="lipo"
10909    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10910    break 2
10911  fi
10912done
10913  done
10914IFS=$as_save_IFS
10915
10916fi
10917fi
10918ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
10919if test -n "$ac_ct_LIPO"; then
10920  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
10921printf "%s\n" "$ac_ct_LIPO" >&6; }
10922else
10923  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10924printf "%s\n" "no" >&6; }
10925fi
10926
10927  if test "x$ac_ct_LIPO" = x; then
10928    LIPO=":"
10929  else
10930    case $cross_compiling:$ac_tool_warned in
10931yes:)
10932{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10933printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10934ac_tool_warned=yes ;;
10935esac
10936    LIPO=$ac_ct_LIPO
10937  fi
10938else
10939  LIPO="$ac_cv_prog_LIPO"
10940fi
10941
10942    if test -n "$ac_tool_prefix"; then
10943  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
10944set dummy ${ac_tool_prefix}otool; ac_word=$2
10945{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10946printf %s "checking for $ac_word... " >&6; }
10947if test ${ac_cv_prog_OTOOL+y}
10948then :
10949  printf %s "(cached) " >&6
10950else $as_nop
10951  if test -n "$OTOOL"; then
10952  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
10953else
10954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10955for as_dir in $PATH
10956do
10957  IFS=$as_save_IFS
10958  case $as_dir in #(((
10959    '') as_dir=./ ;;
10960    */) ;;
10961    *) as_dir=$as_dir/ ;;
10962  esac
10963    for ac_exec_ext in '' $ac_executable_extensions; do
10964  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10965    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
10966    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10967    break 2
10968  fi
10969done
10970  done
10971IFS=$as_save_IFS
10972
10973fi
10974fi
10975OTOOL=$ac_cv_prog_OTOOL
10976if test -n "$OTOOL"; then
10977  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10978printf "%s\n" "$OTOOL" >&6; }
10979else
10980  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10981printf "%s\n" "no" >&6; }
10982fi
10983
10984
10985fi
10986if test -z "$ac_cv_prog_OTOOL"; then
10987  ac_ct_OTOOL=$OTOOL
10988  # Extract the first word of "otool", so it can be a program name with args.
10989set dummy otool; ac_word=$2
10990{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10991printf %s "checking for $ac_word... " >&6; }
10992if test ${ac_cv_prog_ac_ct_OTOOL+y}
10993then :
10994  printf %s "(cached) " >&6
10995else $as_nop
10996  if test -n "$ac_ct_OTOOL"; then
10997  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
10998else
10999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11000for as_dir in $PATH
11001do
11002  IFS=$as_save_IFS
11003  case $as_dir in #(((
11004    '') as_dir=./ ;;
11005    */) ;;
11006    *) as_dir=$as_dir/ ;;
11007  esac
11008    for ac_exec_ext in '' $ac_executable_extensions; do
11009  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11010    ac_cv_prog_ac_ct_OTOOL="otool"
11011    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11012    break 2
11013  fi
11014done
11015  done
11016IFS=$as_save_IFS
11017
11018fi
11019fi
11020ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
11021if test -n "$ac_ct_OTOOL"; then
11022  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
11023printf "%s\n" "$ac_ct_OTOOL" >&6; }
11024else
11025  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11026printf "%s\n" "no" >&6; }
11027fi
11028
11029  if test "x$ac_ct_OTOOL" = x; then
11030    OTOOL=":"
11031  else
11032    case $cross_compiling:$ac_tool_warned in
11033yes:)
11034{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11035printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11036ac_tool_warned=yes ;;
11037esac
11038    OTOOL=$ac_ct_OTOOL
11039  fi
11040else
11041  OTOOL="$ac_cv_prog_OTOOL"
11042fi
11043
11044    if test -n "$ac_tool_prefix"; then
11045  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
11046set dummy ${ac_tool_prefix}otool64; ac_word=$2
11047{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11048printf %s "checking for $ac_word... " >&6; }
11049if test ${ac_cv_prog_OTOOL64+y}
11050then :
11051  printf %s "(cached) " >&6
11052else $as_nop
11053  if test -n "$OTOOL64"; then
11054  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
11055else
11056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11057for as_dir in $PATH
11058do
11059  IFS=$as_save_IFS
11060  case $as_dir in #(((
11061    '') as_dir=./ ;;
11062    */) ;;
11063    *) as_dir=$as_dir/ ;;
11064  esac
11065    for ac_exec_ext in '' $ac_executable_extensions; do
11066  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11067    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
11068    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11069    break 2
11070  fi
11071done
11072  done
11073IFS=$as_save_IFS
11074
11075fi
11076fi
11077OTOOL64=$ac_cv_prog_OTOOL64
11078if test -n "$OTOOL64"; then
11079  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
11080printf "%s\n" "$OTOOL64" >&6; }
11081else
11082  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11083printf "%s\n" "no" >&6; }
11084fi
11085
11086
11087fi
11088if test -z "$ac_cv_prog_OTOOL64"; then
11089  ac_ct_OTOOL64=$OTOOL64
11090  # Extract the first word of "otool64", so it can be a program name with args.
11091set dummy otool64; ac_word=$2
11092{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11093printf %s "checking for $ac_word... " >&6; }
11094if test ${ac_cv_prog_ac_ct_OTOOL64+y}
11095then :
11096  printf %s "(cached) " >&6
11097else $as_nop
11098  if test -n "$ac_ct_OTOOL64"; then
11099  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
11100else
11101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11102for as_dir in $PATH
11103do
11104  IFS=$as_save_IFS
11105  case $as_dir in #(((
11106    '') as_dir=./ ;;
11107    */) ;;
11108    *) as_dir=$as_dir/ ;;
11109  esac
11110    for ac_exec_ext in '' $ac_executable_extensions; do
11111  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11112    ac_cv_prog_ac_ct_OTOOL64="otool64"
11113    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11114    break 2
11115  fi
11116done
11117  done
11118IFS=$as_save_IFS
11119
11120fi
11121fi
11122ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
11123if test -n "$ac_ct_OTOOL64"; then
11124  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
11125printf "%s\n" "$ac_ct_OTOOL64" >&6; }
11126else
11127  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11128printf "%s\n" "no" >&6; }
11129fi
11130
11131  if test "x$ac_ct_OTOOL64" = x; then
11132    OTOOL64=":"
11133  else
11134    case $cross_compiling:$ac_tool_warned in
11135yes:)
11136{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11137printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11138ac_tool_warned=yes ;;
11139esac
11140    OTOOL64=$ac_ct_OTOOL64
11141  fi
11142else
11143  OTOOL64="$ac_cv_prog_OTOOL64"
11144fi
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
11173printf %s "checking for -single_module linker flag... " >&6; }
11174if test ${lt_cv_apple_cc_single_mod+y}
11175then :
11176  printf %s "(cached) " >&6
11177else $as_nop
11178  lt_cv_apple_cc_single_mod=no
11179      if test -z "$LT_MULTI_MODULE"; then
11180	# By default we will add the -single_module flag. You can override
11181	# by either setting the environment variable LT_MULTI_MODULE
11182	# non-empty at configure time, or by adding -multi_module to the
11183	# link flags.
11184	rm -rf libconftest.dylib*
11185	echo "int foo(void){return 1;}" > conftest.c
11186	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11187-dynamiclib -Wl,-single_module conftest.c" >&5
11188	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
11189	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
11190        _lt_result=$?
11191	# If there is a non-empty error log, and "single_module"
11192	# appears in it, assume the flag caused a linker warning
11193        if test -s conftest.err && $GREP single_module conftest.err; then
11194	  cat conftest.err >&5
11195	# Otherwise, if the output was created with a 0 exit code from
11196	# the compiler, it worked.
11197	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
11198	  lt_cv_apple_cc_single_mod=yes
11199	else
11200	  cat conftest.err >&5
11201	fi
11202	rm -rf libconftest.dylib*
11203	rm -f conftest.*
11204      fi
11205fi
11206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
11207printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
11208
11209    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
11210printf %s "checking for -exported_symbols_list linker flag... " >&6; }
11211if test ${lt_cv_ld_exported_symbols_list+y}
11212then :
11213  printf %s "(cached) " >&6
11214else $as_nop
11215  lt_cv_ld_exported_symbols_list=no
11216      save_LDFLAGS=$LDFLAGS
11217      echo "_main" > conftest.sym
11218      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
11219      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11220/* end confdefs.h.  */
11221
11222int
11223main (void)
11224{
11225
11226  ;
11227  return 0;
11228}
11229_ACEOF
11230if ac_fn_c_try_link "$LINENO"
11231then :
11232  lt_cv_ld_exported_symbols_list=yes
11233else $as_nop
11234  lt_cv_ld_exported_symbols_list=no
11235fi
11236rm -f core conftest.err conftest.$ac_objext conftest.beam \
11237    conftest$ac_exeext conftest.$ac_ext
11238	LDFLAGS=$save_LDFLAGS
11239
11240fi
11241{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
11242printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
11243
11244    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
11245printf %s "checking for -force_load linker flag... " >&6; }
11246if test ${lt_cv_ld_force_load+y}
11247then :
11248  printf %s "(cached) " >&6
11249else $as_nop
11250  lt_cv_ld_force_load=no
11251      cat > conftest.c << _LT_EOF
11252int forced_loaded() { return 2;}
11253_LT_EOF
11254      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
11255      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
11256      echo "$AR cru libconftest.a conftest.o" >&5
11257      $AR cru libconftest.a conftest.o 2>&5
11258      echo "$RANLIB libconftest.a" >&5
11259      $RANLIB libconftest.a 2>&5
11260      cat > conftest.c << _LT_EOF
11261int main() { return 0;}
11262_LT_EOF
11263      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
11264      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
11265      _lt_result=$?
11266      if test -s conftest.err && $GREP force_load conftest.err; then
11267	cat conftest.err >&5
11268      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
11269	lt_cv_ld_force_load=yes
11270      else
11271	cat conftest.err >&5
11272      fi
11273        rm -f conftest.err libconftest.a conftest conftest.c
11274        rm -rf conftest.dSYM
11275
11276fi
11277{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
11278printf "%s\n" "$lt_cv_ld_force_load" >&6; }
11279    case $host_os in
11280    rhapsody* | darwin1.[012])
11281      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
11282    darwin1.*)
11283      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
11284    darwin*) # darwin 5.x on
11285      # if running on 10.5 or later, the deployment target defaults
11286      # to the OS version, if on x86, and 10.4, the deployment
11287      # target defaults to 10.4. Don't you love it?
11288      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
11289	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
11290	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
11291	10.[012][,.]*)
11292	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
11293	10.*)
11294	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
11295      esac
11296    ;;
11297  esac
11298    if test yes = "$lt_cv_apple_cc_single_mod"; then
11299      _lt_dar_single_mod='$single_module'
11300    fi
11301    if test yes = "$lt_cv_ld_exported_symbols_list"; then
11302      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
11303    else
11304      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
11305    fi
11306    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
11307      _lt_dsymutil='~$DSYMUTIL $lib || :'
11308    else
11309      _lt_dsymutil=
11310    fi
11311    ;;
11312  esac
11313
11314# func_munge_path_list VARIABLE PATH
11315# -----------------------------------
11316# VARIABLE is name of variable containing _space_ separated list of
11317# directories to be munged by the contents of PATH, which is string
11318# having a format:
11319# "DIR[:DIR]:"
11320#       string "DIR[ DIR]" will be prepended to VARIABLE
11321# ":DIR[:DIR]"
11322#       string "DIR[ DIR]" will be appended to VARIABLE
11323# "DIRP[:DIRP]::[DIRA:]DIRA"
11324#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
11325#       "DIRA[ DIRA]" will be appended to VARIABLE
11326# "DIR[:DIR]"
11327#       VARIABLE will be replaced by "DIR[ DIR]"
11328func_munge_path_list ()
11329{
11330    case x$2 in
11331    x)
11332        ;;
11333    *:)
11334        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
11335        ;;
11336    x:*)
11337        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
11338        ;;
11339    *::*)
11340        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
11341        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
11342        ;;
11343    *)
11344        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
11345        ;;
11346    esac
11347}
11348
11349ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
11350"
11351if test "x$ac_cv_header_dlfcn_h" = xyes
11352then :
11353  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
11354
11355fi
11356
11357
11358
11359
11360
11361
11362
11363# Set options
11364
11365
11366
11367        enable_dlopen=no
11368
11369
11370  enable_win32_dll=no
11371
11372
11373            # Check whether --enable-shared was given.
11374if test ${enable_shared+y}
11375then :
11376  enableval=$enable_shared; p=${PACKAGE-default}
11377    case $enableval in
11378    yes) enable_shared=yes ;;
11379    no) enable_shared=no ;;
11380    *)
11381      enable_shared=no
11382      # Look at the argument we got.  We use all the common list separators.
11383      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11384      for pkg in $enableval; do
11385	IFS=$lt_save_ifs
11386	if test "X$pkg" = "X$p"; then
11387	  enable_shared=yes
11388	fi
11389      done
11390      IFS=$lt_save_ifs
11391      ;;
11392    esac
11393else $as_nop
11394  enable_shared=yes
11395fi
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405  # Check whether --enable-static was given.
11406if test ${enable_static+y}
11407then :
11408  enableval=$enable_static; p=${PACKAGE-default}
11409    case $enableval in
11410    yes) enable_static=yes ;;
11411    no) enable_static=no ;;
11412    *)
11413     enable_static=no
11414      # Look at the argument we got.  We use all the common list separators.
11415      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11416      for pkg in $enableval; do
11417	IFS=$lt_save_ifs
11418	if test "X$pkg" = "X$p"; then
11419	  enable_static=yes
11420	fi
11421      done
11422      IFS=$lt_save_ifs
11423      ;;
11424    esac
11425else $as_nop
11426  enable_static=yes
11427fi
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438# Check whether --with-pic was given.
11439if test ${with_pic+y}
11440then :
11441  withval=$with_pic; lt_p=${PACKAGE-default}
11442    case $withval in
11443    yes|no) pic_mode=$withval ;;
11444    *)
11445      pic_mode=default
11446      # Look at the argument we got.  We use all the common list separators.
11447      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11448      for lt_pkg in $withval; do
11449	IFS=$lt_save_ifs
11450	if test "X$lt_pkg" = "X$lt_p"; then
11451	  pic_mode=yes
11452	fi
11453      done
11454      IFS=$lt_save_ifs
11455      ;;
11456    esac
11457else $as_nop
11458  pic_mode=default
11459fi
11460
11461
11462
11463
11464
11465
11466
11467
11468  # Check whether --enable-fast-install was given.
11469if test ${enable_fast_install+y}
11470then :
11471  enableval=$enable_fast_install; p=${PACKAGE-default}
11472    case $enableval in
11473    yes) enable_fast_install=yes ;;
11474    no) enable_fast_install=no ;;
11475    *)
11476      enable_fast_install=no
11477      # Look at the argument we got.  We use all the common list separators.
11478      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11479      for pkg in $enableval; do
11480	IFS=$lt_save_ifs
11481	if test "X$pkg" = "X$p"; then
11482	  enable_fast_install=yes
11483	fi
11484      done
11485      IFS=$lt_save_ifs
11486      ;;
11487    esac
11488else $as_nop
11489  enable_fast_install=yes
11490fi
11491
11492
11493
11494
11495
11496
11497
11498
11499  shared_archive_member_spec=
11500case $host,$enable_shared in
11501power*-*-aix[5-9]*,yes)
11502  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
11503printf %s "checking which variant of shared library versioning to provide... " >&6; }
11504
11505# Check whether --with-aix-soname was given.
11506if test ${with_aix_soname+y}
11507then :
11508  withval=$with_aix_soname; case $withval in
11509    aix|svr4|both)
11510      ;;
11511    *)
11512      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
11513      ;;
11514    esac
11515    lt_cv_with_aix_soname=$with_aix_soname
11516else $as_nop
11517  if test ${lt_cv_with_aix_soname+y}
11518then :
11519  printf %s "(cached) " >&6
11520else $as_nop
11521  lt_cv_with_aix_soname=aix
11522fi
11523
11524    with_aix_soname=$lt_cv_with_aix_soname
11525fi
11526
11527  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
11528printf "%s\n" "$with_aix_soname" >&6; }
11529  if test aix != "$with_aix_soname"; then
11530    # For the AIX way of multilib, we name the shared archive member
11531    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
11532    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
11533    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
11534    # the AIX toolchain works better with OBJECT_MODE set (default 32).
11535    if test 64 = "${OBJECT_MODE-32}"; then
11536      shared_archive_member_spec=shr_64
11537    else
11538      shared_archive_member_spec=shr
11539    fi
11540  fi
11541  ;;
11542*)
11543  with_aix_soname=aix
11544  ;;
11545esac
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556# This can be used to rebuild libtool when needed
11557LIBTOOL_DEPS=$ltmain
11558
11559# Always use our own libtool.
11560LIBTOOL='$(SHELL) $(top_builddir)/libtool'
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591test -z "$LN_S" && LN_S="ln -s"
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606if test -n "${ZSH_VERSION+set}"; then
11607   setopt NO_GLOB_SUBST
11608fi
11609
11610{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
11611printf %s "checking for objdir... " >&6; }
11612if test ${lt_cv_objdir+y}
11613then :
11614  printf %s "(cached) " >&6
11615else $as_nop
11616  rm -f .libs 2>/dev/null
11617mkdir .libs 2>/dev/null
11618if test -d .libs; then
11619  lt_cv_objdir=.libs
11620else
11621  # MS-DOS does not allow filenames that begin with a dot.
11622  lt_cv_objdir=_libs
11623fi
11624rmdir .libs 2>/dev/null
11625fi
11626{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
11627printf "%s\n" "$lt_cv_objdir" >&6; }
11628objdir=$lt_cv_objdir
11629
11630
11631
11632
11633
11634printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
11635
11636
11637
11638
11639case $host_os in
11640aix3*)
11641  # AIX sometimes has problems with the GCC collect2 program.  For some
11642  # reason, if we set the COLLECT_NAMES environment variable, the problems
11643  # vanish in a puff of smoke.
11644  if test set != "${COLLECT_NAMES+set}"; then
11645    COLLECT_NAMES=
11646    export COLLECT_NAMES
11647  fi
11648  ;;
11649esac
11650
11651# Global variables:
11652ofile=libtool
11653can_build_shared=yes
11654
11655# All known linkers require a '.a' archive for static linking (except MSVC,
11656# which needs '.lib').
11657libext=a
11658
11659with_gnu_ld=$lt_cv_prog_gnu_ld
11660
11661old_CC=$CC
11662old_CFLAGS=$CFLAGS
11663
11664# Set sane defaults for various variables
11665test -z "$CC" && CC=cc
11666test -z "$LTCC" && LTCC=$CC
11667test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
11668test -z "$LD" && LD=ld
11669test -z "$ac_objext" && ac_objext=o
11670
11671func_cc_basename $compiler
11672cc_basename=$func_cc_basename_result
11673
11674
11675# Only perform the check for file, if the check method requires it
11676test -z "$MAGIC_CMD" && MAGIC_CMD=file
11677case $deplibs_check_method in
11678file_magic*)
11679  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
11680    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
11681printf %s "checking for ${ac_tool_prefix}file... " >&6; }
11682if test ${lt_cv_path_MAGIC_CMD+y}
11683then :
11684  printf %s "(cached) " >&6
11685else $as_nop
11686  case $MAGIC_CMD in
11687[\\/*] |  ?:[\\/]*)
11688  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
11689  ;;
11690*)
11691  lt_save_MAGIC_CMD=$MAGIC_CMD
11692  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
11693  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
11694  for ac_dir in $ac_dummy; do
11695    IFS=$lt_save_ifs
11696    test -z "$ac_dir" && ac_dir=.
11697    if test -f "$ac_dir/${ac_tool_prefix}file"; then
11698      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
11699      if test -n "$file_magic_test_file"; then
11700	case $deplibs_check_method in
11701	"file_magic "*)
11702	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
11703	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11704	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
11705	    $EGREP "$file_magic_regex" > /dev/null; then
11706	    :
11707	  else
11708	    cat <<_LT_EOF 1>&2
11709
11710*** Warning: the command libtool uses to detect shared libraries,
11711*** $file_magic_cmd, produces output that libtool cannot recognize.
11712*** The result is that libtool may fail to recognize shared libraries
11713*** as such.  This will affect the creation of libtool libraries that
11714*** depend on shared libraries, but programs linked with such libtool
11715*** libraries will work regardless of this problem.  Nevertheless, you
11716*** may want to report the problem to your system manager and/or to
11717*** bug-libtool@gnu.org
11718
11719_LT_EOF
11720	  fi ;;
11721	esac
11722      fi
11723      break
11724    fi
11725  done
11726  IFS=$lt_save_ifs
11727  MAGIC_CMD=$lt_save_MAGIC_CMD
11728  ;;
11729esac
11730fi
11731
11732MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11733if test -n "$MAGIC_CMD"; then
11734  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
11735printf "%s\n" "$MAGIC_CMD" >&6; }
11736else
11737  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11738printf "%s\n" "no" >&6; }
11739fi
11740
11741
11742
11743
11744
11745if test -z "$lt_cv_path_MAGIC_CMD"; then
11746  if test -n "$ac_tool_prefix"; then
11747    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
11748printf %s "checking for file... " >&6; }
11749if test ${lt_cv_path_MAGIC_CMD+y}
11750then :
11751  printf %s "(cached) " >&6
11752else $as_nop
11753  case $MAGIC_CMD in
11754[\\/*] |  ?:[\\/]*)
11755  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
11756  ;;
11757*)
11758  lt_save_MAGIC_CMD=$MAGIC_CMD
11759  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
11760  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
11761  for ac_dir in $ac_dummy; do
11762    IFS=$lt_save_ifs
11763    test -z "$ac_dir" && ac_dir=.
11764    if test -f "$ac_dir/file"; then
11765      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
11766      if test -n "$file_magic_test_file"; then
11767	case $deplibs_check_method in
11768	"file_magic "*)
11769	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
11770	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11771	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
11772	    $EGREP "$file_magic_regex" > /dev/null; then
11773	    :
11774	  else
11775	    cat <<_LT_EOF 1>&2
11776
11777*** Warning: the command libtool uses to detect shared libraries,
11778*** $file_magic_cmd, produces output that libtool cannot recognize.
11779*** The result is that libtool may fail to recognize shared libraries
11780*** as such.  This will affect the creation of libtool libraries that
11781*** depend on shared libraries, but programs linked with such libtool
11782*** libraries will work regardless of this problem.  Nevertheless, you
11783*** may want to report the problem to your system manager and/or to
11784*** bug-libtool@gnu.org
11785
11786_LT_EOF
11787	  fi ;;
11788	esac
11789      fi
11790      break
11791    fi
11792  done
11793  IFS=$lt_save_ifs
11794  MAGIC_CMD=$lt_save_MAGIC_CMD
11795  ;;
11796esac
11797fi
11798
11799MAGIC_CMD=$lt_cv_path_MAGIC_CMD
11800if test -n "$MAGIC_CMD"; then
11801  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
11802printf "%s\n" "$MAGIC_CMD" >&6; }
11803else
11804  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11805printf "%s\n" "no" >&6; }
11806fi
11807
11808
11809  else
11810    MAGIC_CMD=:
11811  fi
11812fi
11813
11814  fi
11815  ;;
11816esac
11817
11818# Use C for the default configuration in the libtool script
11819
11820lt_save_CC=$CC
11821ac_ext=c
11822ac_cpp='$CPP $CPPFLAGS'
11823ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11824ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11825ac_compiler_gnu=$ac_cv_c_compiler_gnu
11826
11827
11828# Source file extension for C test sources.
11829ac_ext=c
11830
11831# Object file extension for compiled C test sources.
11832objext=o
11833objext=$objext
11834
11835# Code to be used in simple compile tests
11836lt_simple_compile_test_code="int some_variable = 0;"
11837
11838# Code to be used in simple link tests
11839lt_simple_link_test_code='int main(){return(0);}'
11840
11841
11842
11843
11844
11845
11846
11847# If no C compiler was specified, use CC.
11848LTCC=${LTCC-"$CC"}
11849
11850# If no C compiler flags were specified, use CFLAGS.
11851LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
11852
11853# Allow CC to be a program name with arguments.
11854compiler=$CC
11855
11856# Save the default compiler, since it gets overwritten when the other
11857# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
11858compiler_DEFAULT=$CC
11859
11860# save warnings/boilerplate of simple test code
11861ac_outfile=conftest.$ac_objext
11862echo "$lt_simple_compile_test_code" >conftest.$ac_ext
11863eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
11864_lt_compiler_boilerplate=`cat conftest.err`
11865$RM conftest*
11866
11867ac_outfile=conftest.$ac_objext
11868echo "$lt_simple_link_test_code" >conftest.$ac_ext
11869eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
11870_lt_linker_boilerplate=`cat conftest.err`
11871$RM -r conftest*
11872
11873
11874if test -n "$compiler"; then
11875
11876lt_prog_compiler_no_builtin_flag=
11877
11878if test yes = "$GCC"; then
11879  case $cc_basename in
11880  nvcc*)
11881    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
11882  *)
11883    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
11884  esac
11885
11886  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
11887printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
11888if test ${lt_cv_prog_compiler_rtti_exceptions+y}
11889then :
11890  printf %s "(cached) " >&6
11891else $as_nop
11892  lt_cv_prog_compiler_rtti_exceptions=no
11893   ac_outfile=conftest.$ac_objext
11894   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11895   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
11896   # Insert the option either (1) after the last *FLAGS variable, or
11897   # (2) before a word containing "conftest.", or (3) at the end.
11898   # Note that $ac_compile itself does not contain backslashes and begins
11899   # with a dollar sign (not a hyphen), so the echo should work correctly.
11900   # The option is referenced via a variable to avoid confusing sed.
11901   lt_compile=`echo "$ac_compile" | $SED \
11902   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11903   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11904   -e 's:$: $lt_compiler_flag:'`
11905   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11906   (eval "$lt_compile" 2>conftest.err)
11907   ac_status=$?
11908   cat conftest.err >&5
11909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11910   if (exit $ac_status) && test -s "$ac_outfile"; then
11911     # The compiler can only warn and ignore the option if not recognized
11912     # So say no if there are warnings other than the usual output.
11913     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11914     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11915     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11916       lt_cv_prog_compiler_rtti_exceptions=yes
11917     fi
11918   fi
11919   $RM conftest*
11920
11921fi
11922{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
11923printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
11924
11925if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
11926    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
11927else
11928    :
11929fi
11930
11931fi
11932
11933
11934
11935
11936
11937
11938  lt_prog_compiler_wl=
11939lt_prog_compiler_pic=
11940lt_prog_compiler_static=
11941
11942
11943  if test yes = "$GCC"; then
11944    lt_prog_compiler_wl='-Wl,'
11945    lt_prog_compiler_static='-static'
11946
11947    case $host_os in
11948      aix*)
11949      # All AIX code is PIC.
11950      if test ia64 = "$host_cpu"; then
11951	# AIX 5 now supports IA64 processor
11952	lt_prog_compiler_static='-Bstatic'
11953      fi
11954      lt_prog_compiler_pic='-fPIC'
11955      ;;
11956
11957    amigaos*)
11958      case $host_cpu in
11959      powerpc)
11960            # see comment about AmigaOS4 .so support
11961            lt_prog_compiler_pic='-fPIC'
11962        ;;
11963      m68k)
11964            # FIXME: we need at least 68020 code to build shared libraries, but
11965            # adding the '-m68020' flag to GCC prevents building anything better,
11966            # like '-m68040'.
11967            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
11968        ;;
11969      esac
11970      ;;
11971
11972    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
11973      # PIC is the default for these OSes.
11974      ;;
11975
11976    mingw* | cygwin* | pw32* | os2* | cegcc*)
11977      # This hack is so that the source file can tell whether it is being
11978      # built for inclusion in a dll (and should export symbols for example).
11979      # Although the cygwin gcc ignores -fPIC, still need this for old-style
11980      # (--disable-auto-import) libraries
11981      lt_prog_compiler_pic='-DDLL_EXPORT'
11982      case $host_os in
11983      os2*)
11984	lt_prog_compiler_static='$wl-static'
11985	;;
11986      esac
11987      ;;
11988
11989    darwin* | rhapsody*)
11990      # PIC is the default on this platform
11991      # Common symbols not allowed in MH_DYLIB files
11992      lt_prog_compiler_pic='-fno-common'
11993      ;;
11994
11995    haiku*)
11996      # PIC is the default for Haiku.
11997      # The "-static" flag exists, but is broken.
11998      lt_prog_compiler_static=
11999      ;;
12000
12001    hpux*)
12002      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
12003      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
12004      # sets the default TLS model and affects inlining.
12005      case $host_cpu in
12006      hppa*64*)
12007	# +Z the default
12008	;;
12009      *)
12010	lt_prog_compiler_pic='-fPIC'
12011	;;
12012      esac
12013      ;;
12014
12015    interix[3-9]*)
12016      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
12017      # Instead, we relocate shared libraries at runtime.
12018      ;;
12019
12020    msdosdjgpp*)
12021      # Just because we use GCC doesn't mean we suddenly get shared libraries
12022      # on systems that don't support them.
12023      lt_prog_compiler_can_build_shared=no
12024      enable_shared=no
12025      ;;
12026
12027    *nto* | *qnx*)
12028      # QNX uses GNU C++, but need to define -shared option too, otherwise
12029      # it will coredump.
12030      lt_prog_compiler_pic='-fPIC -shared'
12031      ;;
12032
12033    sysv4*MP*)
12034      if test -d /usr/nec; then
12035	lt_prog_compiler_pic=-Kconform_pic
12036      fi
12037      ;;
12038
12039    *)
12040      lt_prog_compiler_pic='-fPIC'
12041      ;;
12042    esac
12043
12044    case $cc_basename in
12045    nvcc*) # Cuda Compiler Driver 2.2
12046      lt_prog_compiler_wl='-Xlinker '
12047      if test -n "$lt_prog_compiler_pic"; then
12048        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
12049      fi
12050      ;;
12051    esac
12052  else
12053    # PORTME Check for flag to pass linker flags through the system compiler.
12054    case $host_os in
12055    aix*)
12056      lt_prog_compiler_wl='-Wl,'
12057      if test ia64 = "$host_cpu"; then
12058	# AIX 5 now supports IA64 processor
12059	lt_prog_compiler_static='-Bstatic'
12060      else
12061	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
12062      fi
12063      ;;
12064
12065    darwin* | rhapsody*)
12066      # PIC is the default on this platform
12067      # Common symbols not allowed in MH_DYLIB files
12068      lt_prog_compiler_pic='-fno-common'
12069      case $cc_basename in
12070      nagfor*)
12071        # NAG Fortran compiler
12072        lt_prog_compiler_wl='-Wl,-Wl,,'
12073        lt_prog_compiler_pic='-PIC'
12074        lt_prog_compiler_static='-Bstatic'
12075        ;;
12076      esac
12077      ;;
12078
12079    mingw* | cygwin* | pw32* | os2* | cegcc*)
12080      # This hack is so that the source file can tell whether it is being
12081      # built for inclusion in a dll (and should export symbols for example).
12082      lt_prog_compiler_pic='-DDLL_EXPORT'
12083      case $host_os in
12084      os2*)
12085	lt_prog_compiler_static='$wl-static'
12086	;;
12087      esac
12088      ;;
12089
12090    hpux9* | hpux10* | hpux11*)
12091      lt_prog_compiler_wl='-Wl,'
12092      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
12093      # not for PA HP-UX.
12094      case $host_cpu in
12095      hppa*64*|ia64*)
12096	# +Z the default
12097	;;
12098      *)
12099	lt_prog_compiler_pic='+Z'
12100	;;
12101      esac
12102      # Is there a better lt_prog_compiler_static that works with the bundled CC?
12103      lt_prog_compiler_static='$wl-a ${wl}archive'
12104      ;;
12105
12106    irix5* | irix6* | nonstopux*)
12107      lt_prog_compiler_wl='-Wl,'
12108      # PIC (with -KPIC) is the default.
12109      lt_prog_compiler_static='-non_shared'
12110      ;;
12111
12112    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
12113      case $cc_basename in
12114      # old Intel for x86_64, which still supported -KPIC.
12115      ecc*)
12116	lt_prog_compiler_wl='-Wl,'
12117	lt_prog_compiler_pic='-KPIC'
12118	lt_prog_compiler_static='-static'
12119        ;;
12120      # icc used to be incompatible with GCC.
12121      # ICC 10 doesn't accept -KPIC any more.
12122      icc* | ifort*)
12123	lt_prog_compiler_wl='-Wl,'
12124	lt_prog_compiler_pic='-fPIC'
12125	lt_prog_compiler_static='-static'
12126        ;;
12127      # Lahey Fortran 8.1.
12128      lf95*)
12129	lt_prog_compiler_wl='-Wl,'
12130	lt_prog_compiler_pic='--shared'
12131	lt_prog_compiler_static='--static'
12132	;;
12133      nagfor*)
12134	# NAG Fortran compiler
12135	lt_prog_compiler_wl='-Wl,-Wl,,'
12136	lt_prog_compiler_pic='-PIC'
12137	lt_prog_compiler_static='-Bstatic'
12138	;;
12139      tcc*)
12140	# Fabrice Bellard et al's Tiny C Compiler
12141	lt_prog_compiler_wl='-Wl,'
12142	lt_prog_compiler_pic='-fPIC'
12143	lt_prog_compiler_static='-static'
12144	;;
12145      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
12146        # Portland Group compilers (*not* the Pentium gcc compiler,
12147	# which looks to be a dead project)
12148	lt_prog_compiler_wl='-Wl,'
12149	lt_prog_compiler_pic='-fpic'
12150	lt_prog_compiler_static='-Bstatic'
12151        ;;
12152      ccc*)
12153        lt_prog_compiler_wl='-Wl,'
12154        # All Alpha code is PIC.
12155        lt_prog_compiler_static='-non_shared'
12156        ;;
12157      xl* | bgxl* | bgf* | mpixl*)
12158	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
12159	lt_prog_compiler_wl='-Wl,'
12160	lt_prog_compiler_pic='-qpic'
12161	lt_prog_compiler_static='-qstaticlink'
12162	;;
12163      *)
12164	case `$CC -V 2>&1 | sed 5q` in
12165	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
12166	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
12167	  lt_prog_compiler_pic='-KPIC'
12168	  lt_prog_compiler_static='-Bstatic'
12169	  lt_prog_compiler_wl=''
12170	  ;;
12171	*Sun\ F* | *Sun*Fortran*)
12172	  lt_prog_compiler_pic='-KPIC'
12173	  lt_prog_compiler_static='-Bstatic'
12174	  lt_prog_compiler_wl='-Qoption ld '
12175	  ;;
12176	*Sun\ C*)
12177	  # Sun C 5.9
12178	  lt_prog_compiler_pic='-KPIC'
12179	  lt_prog_compiler_static='-Bstatic'
12180	  lt_prog_compiler_wl='-Wl,'
12181	  ;;
12182        *Intel*\ [CF]*Compiler*)
12183	  lt_prog_compiler_wl='-Wl,'
12184	  lt_prog_compiler_pic='-fPIC'
12185	  lt_prog_compiler_static='-static'
12186	  ;;
12187	*Portland\ Group*)
12188	  lt_prog_compiler_wl='-Wl,'
12189	  lt_prog_compiler_pic='-fpic'
12190	  lt_prog_compiler_static='-Bstatic'
12191	  ;;
12192	esac
12193	;;
12194      esac
12195      ;;
12196
12197    newsos6)
12198      lt_prog_compiler_pic='-KPIC'
12199      lt_prog_compiler_static='-Bstatic'
12200      ;;
12201
12202    *nto* | *qnx*)
12203      # QNX uses GNU C++, but need to define -shared option too, otherwise
12204      # it will coredump.
12205      lt_prog_compiler_pic='-fPIC -shared'
12206      ;;
12207
12208    osf3* | osf4* | osf5*)
12209      lt_prog_compiler_wl='-Wl,'
12210      # All OSF/1 code is PIC.
12211      lt_prog_compiler_static='-non_shared'
12212      ;;
12213
12214    rdos*)
12215      lt_prog_compiler_static='-non_shared'
12216      ;;
12217
12218    solaris*)
12219      lt_prog_compiler_pic='-KPIC'
12220      lt_prog_compiler_static='-Bstatic'
12221      case $cc_basename in
12222      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
12223	lt_prog_compiler_wl='-Qoption ld ';;
12224      *)
12225	lt_prog_compiler_wl='-Wl,';;
12226      esac
12227      ;;
12228
12229    sunos4*)
12230      lt_prog_compiler_wl='-Qoption ld '
12231      lt_prog_compiler_pic='-PIC'
12232      lt_prog_compiler_static='-Bstatic'
12233      ;;
12234
12235    sysv4 | sysv4.2uw2* | sysv4.3*)
12236      lt_prog_compiler_wl='-Wl,'
12237      lt_prog_compiler_pic='-KPIC'
12238      lt_prog_compiler_static='-Bstatic'
12239      ;;
12240
12241    sysv4*MP*)
12242      if test -d /usr/nec; then
12243	lt_prog_compiler_pic='-Kconform_pic'
12244	lt_prog_compiler_static='-Bstatic'
12245      fi
12246      ;;
12247
12248    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
12249      lt_prog_compiler_wl='-Wl,'
12250      lt_prog_compiler_pic='-KPIC'
12251      lt_prog_compiler_static='-Bstatic'
12252      ;;
12253
12254    unicos*)
12255      lt_prog_compiler_wl='-Wl,'
12256      lt_prog_compiler_can_build_shared=no
12257      ;;
12258
12259    uts4*)
12260      lt_prog_compiler_pic='-pic'
12261      lt_prog_compiler_static='-Bstatic'
12262      ;;
12263
12264    *)
12265      lt_prog_compiler_can_build_shared=no
12266      ;;
12267    esac
12268  fi
12269
12270case $host_os in
12271  # For platforms that do not support PIC, -DPIC is meaningless:
12272  *djgpp*)
12273    lt_prog_compiler_pic=
12274    ;;
12275  *)
12276    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
12277    ;;
12278esac
12279
12280{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
12281printf %s "checking for $compiler option to produce PIC... " >&6; }
12282if test ${lt_cv_prog_compiler_pic+y}
12283then :
12284  printf %s "(cached) " >&6
12285else $as_nop
12286  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
12287fi
12288{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
12289printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
12290lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
12291
12292#
12293# Check to make sure the PIC flag actually works.
12294#
12295if test -n "$lt_prog_compiler_pic"; then
12296  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
12297printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
12298if test ${lt_cv_prog_compiler_pic_works+y}
12299then :
12300  printf %s "(cached) " >&6
12301else $as_nop
12302  lt_cv_prog_compiler_pic_works=no
12303   ac_outfile=conftest.$ac_objext
12304   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12305   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
12306   # Insert the option either (1) after the last *FLAGS variable, or
12307   # (2) before a word containing "conftest.", or (3) at the end.
12308   # Note that $ac_compile itself does not contain backslashes and begins
12309   # with a dollar sign (not a hyphen), so the echo should work correctly.
12310   # The option is referenced via a variable to avoid confusing sed.
12311   lt_compile=`echo "$ac_compile" | $SED \
12312   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12313   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12314   -e 's:$: $lt_compiler_flag:'`
12315   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12316   (eval "$lt_compile" 2>conftest.err)
12317   ac_status=$?
12318   cat conftest.err >&5
12319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12320   if (exit $ac_status) && test -s "$ac_outfile"; then
12321     # The compiler can only warn and ignore the option if not recognized
12322     # So say no if there are warnings other than the usual output.
12323     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
12324     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12325     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
12326       lt_cv_prog_compiler_pic_works=yes
12327     fi
12328   fi
12329   $RM conftest*
12330
12331fi
12332{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
12333printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
12334
12335if test yes = "$lt_cv_prog_compiler_pic_works"; then
12336    case $lt_prog_compiler_pic in
12337     "" | " "*) ;;
12338     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
12339     esac
12340else
12341    lt_prog_compiler_pic=
12342     lt_prog_compiler_can_build_shared=no
12343fi
12344
12345fi
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357#
12358# Check to make sure the static flag actually works.
12359#
12360wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
12361{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
12362printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
12363if test ${lt_cv_prog_compiler_static_works+y}
12364then :
12365  printf %s "(cached) " >&6
12366else $as_nop
12367  lt_cv_prog_compiler_static_works=no
12368   save_LDFLAGS=$LDFLAGS
12369   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
12370   echo "$lt_simple_link_test_code" > conftest.$ac_ext
12371   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12372     # The linker can only warn and ignore the option if not recognized
12373     # So say no if there are warnings
12374     if test -s conftest.err; then
12375       # Append any errors to the config.log.
12376       cat conftest.err 1>&5
12377       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12378       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12379       if diff conftest.exp conftest.er2 >/dev/null; then
12380         lt_cv_prog_compiler_static_works=yes
12381       fi
12382     else
12383       lt_cv_prog_compiler_static_works=yes
12384     fi
12385   fi
12386   $RM -r conftest*
12387   LDFLAGS=$save_LDFLAGS
12388
12389fi
12390{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
12391printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
12392
12393if test yes = "$lt_cv_prog_compiler_static_works"; then
12394    :
12395else
12396    lt_prog_compiler_static=
12397fi
12398
12399
12400
12401
12402
12403
12404
12405  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
12406printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
12407if test ${lt_cv_prog_compiler_c_o+y}
12408then :
12409  printf %s "(cached) " >&6
12410else $as_nop
12411  lt_cv_prog_compiler_c_o=no
12412   $RM -r conftest 2>/dev/null
12413   mkdir conftest
12414   cd conftest
12415   mkdir out
12416   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12417
12418   lt_compiler_flag="-o out/conftest2.$ac_objext"
12419   # Insert the option either (1) after the last *FLAGS variable, or
12420   # (2) before a word containing "conftest.", or (3) at the end.
12421   # Note that $ac_compile itself does not contain backslashes and begins
12422   # with a dollar sign (not a hyphen), so the echo should work correctly.
12423   lt_compile=`echo "$ac_compile" | $SED \
12424   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12425   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12426   -e 's:$: $lt_compiler_flag:'`
12427   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12428   (eval "$lt_compile" 2>out/conftest.err)
12429   ac_status=$?
12430   cat out/conftest.err >&5
12431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12432   if (exit $ac_status) && test -s out/conftest2.$ac_objext
12433   then
12434     # The compiler can only warn and ignore the option if not recognized
12435     # So say no if there are warnings
12436     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
12437     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12438     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12439       lt_cv_prog_compiler_c_o=yes
12440     fi
12441   fi
12442   chmod u+w . 2>&5
12443   $RM conftest*
12444   # SGI C++ compiler will create directory out/ii_files/ for
12445   # template instantiation
12446   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
12447   $RM out/* && rmdir out
12448   cd ..
12449   $RM -r conftest
12450   $RM conftest*
12451
12452fi
12453{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
12454printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
12455
12456
12457
12458
12459
12460
12461  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
12462printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
12463if test ${lt_cv_prog_compiler_c_o+y}
12464then :
12465  printf %s "(cached) " >&6
12466else $as_nop
12467  lt_cv_prog_compiler_c_o=no
12468   $RM -r conftest 2>/dev/null
12469   mkdir conftest
12470   cd conftest
12471   mkdir out
12472   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12473
12474   lt_compiler_flag="-o out/conftest2.$ac_objext"
12475   # Insert the option either (1) after the last *FLAGS variable, or
12476   # (2) before a word containing "conftest.", or (3) at the end.
12477   # Note that $ac_compile itself does not contain backslashes and begins
12478   # with a dollar sign (not a hyphen), so the echo should work correctly.
12479   lt_compile=`echo "$ac_compile" | $SED \
12480   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12481   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12482   -e 's:$: $lt_compiler_flag:'`
12483   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
12484   (eval "$lt_compile" 2>out/conftest.err)
12485   ac_status=$?
12486   cat out/conftest.err >&5
12487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12488   if (exit $ac_status) && test -s out/conftest2.$ac_objext
12489   then
12490     # The compiler can only warn and ignore the option if not recognized
12491     # So say no if there are warnings
12492     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
12493     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12494     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12495       lt_cv_prog_compiler_c_o=yes
12496     fi
12497   fi
12498   chmod u+w . 2>&5
12499   $RM conftest*
12500   # SGI C++ compiler will create directory out/ii_files/ for
12501   # template instantiation
12502   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
12503   $RM out/* && rmdir out
12504   cd ..
12505   $RM -r conftest
12506   $RM conftest*
12507
12508fi
12509{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
12510printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
12511
12512
12513
12514
12515hard_links=nottested
12516if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
12517  # do not overwrite the value of need_locks provided by the user
12518  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
12519printf %s "checking if we can lock with hard links... " >&6; }
12520  hard_links=yes
12521  $RM conftest*
12522  ln conftest.a conftest.b 2>/dev/null && hard_links=no
12523  touch conftest.a
12524  ln conftest.a conftest.b 2>&5 || hard_links=no
12525  ln conftest.a conftest.b 2>/dev/null && hard_links=no
12526  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
12527printf "%s\n" "$hard_links" >&6; }
12528  if test no = "$hard_links"; then
12529    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
12530printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
12531    need_locks=warn
12532  fi
12533else
12534  need_locks=no
12535fi
12536
12537
12538
12539
12540
12541
12542  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
12543printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
12544
12545  runpath_var=
12546  allow_undefined_flag=
12547  always_export_symbols=no
12548  archive_cmds=
12549  archive_expsym_cmds=
12550  compiler_needs_object=no
12551  enable_shared_with_static_runtimes=no
12552  export_dynamic_flag_spec=
12553  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
12554  hardcode_automatic=no
12555  hardcode_direct=no
12556  hardcode_direct_absolute=no
12557  hardcode_libdir_flag_spec=
12558  hardcode_libdir_separator=
12559  hardcode_minus_L=no
12560  hardcode_shlibpath_var=unsupported
12561  inherit_rpath=no
12562  link_all_deplibs=unknown
12563  module_cmds=
12564  module_expsym_cmds=
12565  old_archive_from_new_cmds=
12566  old_archive_from_expsyms_cmds=
12567  thread_safe_flag_spec=
12568  whole_archive_flag_spec=
12569  # include_expsyms should be a list of space-separated symbols to be *always*
12570  # included in the symbol list
12571  include_expsyms=
12572  # exclude_expsyms can be an extended regexp of symbols to exclude
12573  # it will be wrapped by ' (' and ')$', so one must not match beginning or
12574  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
12575  # as well as any symbol that contains 'd'.
12576  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
12577  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
12578  # platforms (ab)use it in PIC code, but their linkers get confused if
12579  # the symbol is explicitly referenced.  Since portable code cannot
12580  # rely on this symbol name, it's probably fine to never include it in
12581  # preloaded symbol tables.
12582  # Exclude shared library initialization/finalization symbols.
12583  extract_expsyms_cmds=
12584
12585  case $host_os in
12586  cygwin* | mingw* | pw32* | cegcc*)
12587    # FIXME: the MSVC++ port hasn't been tested in a loooong time
12588    # When not using gcc, we currently assume that we are using
12589    # Microsoft Visual C++.
12590    if test yes != "$GCC"; then
12591      with_gnu_ld=no
12592    fi
12593    ;;
12594  interix*)
12595    # we just hope/assume this is gcc and not c89 (= MSVC++)
12596    with_gnu_ld=yes
12597    ;;
12598  openbsd* | bitrig*)
12599    with_gnu_ld=no
12600    ;;
12601  esac
12602
12603  ld_shlibs=yes
12604
12605  # On some targets, GNU ld is compatible enough with the native linker
12606  # that we're better off using the native interface for both.
12607  lt_use_gnu_ld_interface=no
12608  if test yes = "$with_gnu_ld"; then
12609    case $host_os in
12610      aix*)
12611	# The AIX port of GNU ld has always aspired to compatibility
12612	# with the native linker.  However, as the warning in the GNU ld
12613	# block says, versions before 2.19.5* couldn't really create working
12614	# shared libraries, regardless of the interface used.
12615	case `$LD -v 2>&1` in
12616	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
12617	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
12618	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
12619	  *)
12620	    lt_use_gnu_ld_interface=yes
12621	    ;;
12622	esac
12623	;;
12624      *)
12625	lt_use_gnu_ld_interface=yes
12626	;;
12627    esac
12628  fi
12629
12630  if test yes = "$lt_use_gnu_ld_interface"; then
12631    # If archive_cmds runs LD, not CC, wlarc should be empty
12632    wlarc='$wl'
12633
12634    # Set some defaults for GNU ld with shared library support. These
12635    # are reset later if shared libraries are not supported. Putting them
12636    # here allows them to be overridden if necessary.
12637    runpath_var=LD_RUN_PATH
12638    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12639    export_dynamic_flag_spec='$wl--export-dynamic'
12640    # ancient GNU ld didn't support --whole-archive et. al.
12641    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
12642      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
12643    else
12644      whole_archive_flag_spec=
12645    fi
12646    supports_anon_versioning=no
12647    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
12648      *GNU\ gold*) supports_anon_versioning=yes ;;
12649      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
12650      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
12651      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
12652      *\ 2.11.*) ;; # other 2.11 versions
12653      *) supports_anon_versioning=yes ;;
12654    esac
12655
12656    # See if GNU ld supports shared libraries.
12657    case $host_os in
12658    aix[3-9]*)
12659      # On AIX/PPC, the GNU linker is very broken
12660      if test ia64 != "$host_cpu"; then
12661	ld_shlibs=no
12662	cat <<_LT_EOF 1>&2
12663
12664*** Warning: the GNU linker, at least up to release 2.19, is reported
12665*** to be unable to reliably create shared libraries on AIX.
12666*** Therefore, libtool is disabling shared libraries support.  If you
12667*** really care for shared libraries, you may want to install binutils
12668*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
12669*** You will then need to restart the configuration process.
12670
12671_LT_EOF
12672      fi
12673      ;;
12674
12675    amigaos*)
12676      case $host_cpu in
12677      powerpc)
12678            # see comment about AmigaOS4 .so support
12679            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12680            archive_expsym_cmds=''
12681        ;;
12682      m68k)
12683            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)'
12684            hardcode_libdir_flag_spec='-L$libdir'
12685            hardcode_minus_L=yes
12686        ;;
12687      esac
12688      ;;
12689
12690    beos*)
12691      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12692	allow_undefined_flag=unsupported
12693	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
12694	# support --undefined.  This deserves some investigation.  FIXME
12695	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12696      else
12697	ld_shlibs=no
12698      fi
12699      ;;
12700
12701    cygwin* | mingw* | pw32* | cegcc*)
12702      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
12703      # as there is no search path for DLLs.
12704      hardcode_libdir_flag_spec='-L$libdir'
12705      export_dynamic_flag_spec='$wl--export-all-symbols'
12706      allow_undefined_flag=unsupported
12707      always_export_symbols=no
12708      enable_shared_with_static_runtimes=yes
12709      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'
12710      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
12711
12712      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
12713        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
12714	# If the export-symbols file already is a .def file, use it as
12715	# is; otherwise, prepend EXPORTS...
12716	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12717          cp $export_symbols $output_objdir/$soname.def;
12718        else
12719          echo EXPORTS > $output_objdir/$soname.def;
12720          cat $export_symbols >> $output_objdir/$soname.def;
12721        fi~
12722        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
12723      else
12724	ld_shlibs=no
12725      fi
12726      ;;
12727
12728    haiku*)
12729      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12730      link_all_deplibs=yes
12731      ;;
12732
12733    os2*)
12734      hardcode_libdir_flag_spec='-L$libdir'
12735      hardcode_minus_L=yes
12736      allow_undefined_flag=unsupported
12737      shrext_cmds=.dll
12738      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12739	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12740	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12741	$ECHO EXPORTS >> $output_objdir/$libname.def~
12742	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12743	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12744	emximp -o $lib $output_objdir/$libname.def'
12745      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12746	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12747	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12748	$ECHO EXPORTS >> $output_objdir/$libname.def~
12749	prefix_cmds="$SED"~
12750	if test EXPORTS = "`$SED 1q $export_symbols`"; then
12751	  prefix_cmds="$prefix_cmds -e 1d";
12752	fi~
12753	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12754	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12755	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12756	emximp -o $lib $output_objdir/$libname.def'
12757      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12758      enable_shared_with_static_runtimes=yes
12759      ;;
12760
12761    interix[3-9]*)
12762      hardcode_direct=no
12763      hardcode_shlibpath_var=no
12764      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12765      export_dynamic_flag_spec='$wl-E'
12766      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
12767      # Instead, shared libraries are loaded at an image base (0x10000000 by
12768      # default) and relocated if they conflict, which is a slow very memory
12769      # consuming and fragmenting process.  To avoid this, we pick a random,
12770      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
12771      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
12772      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
12773      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'
12774      ;;
12775
12776    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
12777      tmp_diet=no
12778      if test linux-dietlibc = "$host_os"; then
12779	case $cc_basename in
12780	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
12781	esac
12782      fi
12783      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
12784	 && test no = "$tmp_diet"
12785      then
12786	tmp_addflag=' $pic_flag'
12787	tmp_sharedflag='-shared'
12788	case $cc_basename,$host_cpu in
12789        pgcc*)				# Portland Group C compiler
12790	  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'
12791	  tmp_addflag=' $pic_flag'
12792	  ;;
12793	pgf77* | pgf90* | pgf95* | pgfortran*)
12794					# Portland Group f77 and f90 compilers
12795	  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'
12796	  tmp_addflag=' $pic_flag -Mnomain' ;;
12797	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
12798	  tmp_addflag=' -i_dynamic' ;;
12799	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
12800	  tmp_addflag=' -i_dynamic -nofor_main' ;;
12801	ifc* | ifort*)			# Intel Fortran compiler
12802	  tmp_addflag=' -nofor_main' ;;
12803	lf95*)				# Lahey Fortran 8.1
12804	  whole_archive_flag_spec=
12805	  tmp_sharedflag='--shared' ;;
12806        nagfor*)                        # NAGFOR 5.3
12807          tmp_sharedflag='-Wl,-shared' ;;
12808	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
12809	  tmp_sharedflag='-qmkshrobj'
12810	  tmp_addflag= ;;
12811	nvcc*)	# Cuda Compiler Driver 2.2
12812	  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'
12813	  compiler_needs_object=yes
12814	  ;;
12815	esac
12816	case `$CC -V 2>&1 | sed 5q` in
12817	*Sun\ C*)			# Sun C 5.9
12818	  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'
12819	  compiler_needs_object=yes
12820	  tmp_sharedflag='-G' ;;
12821	*Sun\ F*)			# Sun Fortran 8.3
12822	  tmp_sharedflag='-G' ;;
12823	esac
12824	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12825
12826        if test yes = "$supports_anon_versioning"; then
12827          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
12828            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
12829            echo "local: *; };" >> $output_objdir/$libname.ver~
12830            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
12831        fi
12832
12833	case $cc_basename in
12834	tcc*)
12835	  export_dynamic_flag_spec='-rdynamic'
12836	  ;;
12837	xlf* | bgf* | bgxlf* | mpixlf*)
12838	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
12839	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
12840	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12841	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
12842	  if test yes = "$supports_anon_versioning"; then
12843	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
12844              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
12845              echo "local: *; };" >> $output_objdir/$libname.ver~
12846              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
12847	  fi
12848	  ;;
12849	esac
12850      else
12851        ld_shlibs=no
12852      fi
12853      ;;
12854
12855    netbsd*)
12856      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12857	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
12858	wlarc=
12859      else
12860	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12861	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12862      fi
12863      ;;
12864
12865    solaris*)
12866      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
12867	ld_shlibs=no
12868	cat <<_LT_EOF 1>&2
12869
12870*** Warning: The releases 2.8.* of the GNU linker cannot reliably
12871*** create shared libraries on Solaris systems.  Therefore, libtool
12872*** is disabling shared libraries support.  We urge you to upgrade GNU
12873*** binutils to release 2.9.1 or newer.  Another option is to modify
12874*** your PATH or compiler configuration so that the native linker is
12875*** used, and then restart.
12876
12877_LT_EOF
12878      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12879	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12880	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12881      else
12882	ld_shlibs=no
12883      fi
12884      ;;
12885
12886    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
12887      case `$LD -v 2>&1` in
12888        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
12889	ld_shlibs=no
12890	cat <<_LT_EOF 1>&2
12891
12892*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
12893*** reliably create shared libraries on SCO systems.  Therefore, libtool
12894*** is disabling shared libraries support.  We urge you to upgrade GNU
12895*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
12896*** your PATH or compiler configuration so that the native linker is
12897*** used, and then restart.
12898
12899_LT_EOF
12900	;;
12901	*)
12902	  # For security reasons, it is highly recommended that you always
12903	  # use absolute paths for naming shared libraries, and exclude the
12904	  # DT_RUNPATH tag from executables and libraries.  But doing so
12905	  # requires that you compile everything twice, which is a pain.
12906	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12907	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12908	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12909	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12910	  else
12911	    ld_shlibs=no
12912	  fi
12913	;;
12914      esac
12915      ;;
12916
12917    sunos4*)
12918      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12919      wlarc=
12920      hardcode_direct=yes
12921      hardcode_shlibpath_var=no
12922      ;;
12923
12924    *)
12925      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12926	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12927	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12928      else
12929	ld_shlibs=no
12930      fi
12931      ;;
12932    esac
12933
12934    if test no = "$ld_shlibs"; then
12935      runpath_var=
12936      hardcode_libdir_flag_spec=
12937      export_dynamic_flag_spec=
12938      whole_archive_flag_spec=
12939    fi
12940  else
12941    # PORTME fill in a description of your system's linker (not GNU ld)
12942    case $host_os in
12943    aix3*)
12944      allow_undefined_flag=unsupported
12945      always_export_symbols=yes
12946      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'
12947      # Note: this linker hardcodes the directories in LIBPATH if there
12948      # are no directories specified by -L.
12949      hardcode_minus_L=yes
12950      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
12951	# Neither direct hardcoding nor static linking is supported with a
12952	# broken collect2.
12953	hardcode_direct=unsupported
12954      fi
12955      ;;
12956
12957    aix[4-9]*)
12958      if test ia64 = "$host_cpu"; then
12959	# On IA64, the linker does run time linking by default, so we don't
12960	# have to do anything special.
12961	aix_use_runtimelinking=no
12962	exp_sym_flag='-Bexport'
12963	no_entry_flag=
12964      else
12965	# If we're using GNU nm, then we don't want the "-C" option.
12966	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
12967	# Without the "-l" option, or with the "-B" option, AIX nm treats
12968	# weak defined symbols like other global defined symbols, whereas
12969	# GNU nm marks them as "W".
12970	# While the 'weak' keyword is ignored in the Export File, we need
12971	# it in the Import File for the 'aix-soname' feature, so we have
12972	# to replace the "-B" option with "-P" for AIX nm.
12973	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
12974	  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'
12975	else
12976	  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'
12977	fi
12978	aix_use_runtimelinking=no
12979
12980	# Test if we are trying to use run time linking or normal
12981	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
12982	# have runtime linking enabled, and use it for executables.
12983	# For shared libraries, we enable/disable runtime linking
12984	# depending on the kind of the shared library created -
12985	# when "with_aix_soname,aix_use_runtimelinking" is:
12986	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
12987	# "aix,yes"  lib.so          shared, rtl:yes, for executables
12988	#            lib.a           static archive
12989	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
12990	#            lib.a(lib.so.V) shared, rtl:no,  for executables
12991	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
12992	#            lib.a(lib.so.V) shared, rtl:no
12993	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
12994	#            lib.a           static archive
12995	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
12996	  for ld_flag in $LDFLAGS; do
12997	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
12998	    aix_use_runtimelinking=yes
12999	    break
13000	  fi
13001	  done
13002	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
13003	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
13004	    # so we don't have lib.a shared libs to link our executables.
13005	    # We have to force runtime linking in this case.
13006	    aix_use_runtimelinking=yes
13007	    LDFLAGS="$LDFLAGS -Wl,-brtl"
13008	  fi
13009	  ;;
13010	esac
13011
13012	exp_sym_flag='-bexport'
13013	no_entry_flag='-bnoentry'
13014      fi
13015
13016      # When large executables or shared objects are built, AIX ld can
13017      # have problems creating the table of contents.  If linking a library
13018      # or program results in "error TOC overflow" add -mminimal-toc to
13019      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
13020      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
13021
13022      archive_cmds=''
13023      hardcode_direct=yes
13024      hardcode_direct_absolute=yes
13025      hardcode_libdir_separator=':'
13026      link_all_deplibs=yes
13027      file_list_spec='$wl-f,'
13028      case $with_aix_soname,$aix_use_runtimelinking in
13029      aix,*) ;; # traditional, no import file
13030      svr4,* | *,yes) # use import file
13031	# The Import File defines what to hardcode.
13032	hardcode_direct=no
13033	hardcode_direct_absolute=no
13034	;;
13035      esac
13036
13037      if test yes = "$GCC"; then
13038	case $host_os in aix4.[012]|aix4.[012].*)
13039	# We only want to do this on AIX 4.2 and lower, the check
13040	# below for broken collect2 doesn't work under 4.3+
13041	  collect2name=`$CC -print-prog-name=collect2`
13042	  if test -f "$collect2name" &&
13043	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
13044	  then
13045	  # We have reworked collect2
13046	  :
13047	  else
13048	  # We have old collect2
13049	  hardcode_direct=unsupported
13050	  # It fails to find uninstalled libraries when the uninstalled
13051	  # path is not listed in the libpath.  Setting hardcode_minus_L
13052	  # to unsupported forces relinking
13053	  hardcode_minus_L=yes
13054	  hardcode_libdir_flag_spec='-L$libdir'
13055	  hardcode_libdir_separator=
13056	  fi
13057	  ;;
13058	esac
13059	shared_flag='-shared'
13060	if test yes = "$aix_use_runtimelinking"; then
13061	  shared_flag="$shared_flag "'$wl-G'
13062	fi
13063	# Need to ensure runtime linking is disabled for the traditional
13064	# shared library, or the linker may eventually find shared libraries
13065	# /with/ Import File - we do not want to mix them.
13066	shared_flag_aix='-shared'
13067	shared_flag_svr4='-shared $wl-G'
13068      else
13069	# not using gcc
13070	if test ia64 = "$host_cpu"; then
13071	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
13072	# chokes on -Wl,-G. The following line is correct:
13073	  shared_flag='-G'
13074	else
13075	  if test yes = "$aix_use_runtimelinking"; then
13076	    shared_flag='$wl-G'
13077	  else
13078	    shared_flag='$wl-bM:SRE'
13079	  fi
13080	  shared_flag_aix='$wl-bM:SRE'
13081	  shared_flag_svr4='$wl-G'
13082	fi
13083      fi
13084
13085      export_dynamic_flag_spec='$wl-bexpall'
13086      # It seems that -bexpall does not export symbols beginning with
13087      # underscore (_), so it is better to generate a list of symbols to export.
13088      always_export_symbols=yes
13089      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
13090	# Warning - without using the other runtime loading flags (-brtl),
13091	# -berok will link without error, but may produce a broken library.
13092	allow_undefined_flag='-berok'
13093        # Determine the default libpath from the value encoded in an
13094        # empty executable.
13095        if test set = "${lt_cv_aix_libpath+set}"; then
13096  aix_libpath=$lt_cv_aix_libpath
13097else
13098  if test ${lt_cv_aix_libpath_+y}
13099then :
13100  printf %s "(cached) " >&6
13101else $as_nop
13102  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13103/* end confdefs.h.  */
13104
13105int
13106main (void)
13107{
13108
13109  ;
13110  return 0;
13111}
13112_ACEOF
13113if ac_fn_c_try_link "$LINENO"
13114then :
13115
13116  lt_aix_libpath_sed='
13117      /Import File Strings/,/^$/ {
13118	  /^0/ {
13119	      s/^0  *\([^ ]*\) *$/\1/
13120	      p
13121	  }
13122      }'
13123  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13124  # Check for a 64-bit object if we didn't find anything.
13125  if test -z "$lt_cv_aix_libpath_"; then
13126    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13127  fi
13128fi
13129rm -f core conftest.err conftest.$ac_objext conftest.beam \
13130    conftest$ac_exeext conftest.$ac_ext
13131  if test -z "$lt_cv_aix_libpath_"; then
13132    lt_cv_aix_libpath_=/usr/lib:/lib
13133  fi
13134
13135fi
13136
13137  aix_libpath=$lt_cv_aix_libpath_
13138fi
13139
13140        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
13141        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
13142      else
13143	if test ia64 = "$host_cpu"; then
13144	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
13145	  allow_undefined_flag="-z nodefs"
13146	  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"
13147	else
13148	 # Determine the default libpath from the value encoded in an
13149	 # empty executable.
13150	 if test set = "${lt_cv_aix_libpath+set}"; then
13151  aix_libpath=$lt_cv_aix_libpath
13152else
13153  if test ${lt_cv_aix_libpath_+y}
13154then :
13155  printf %s "(cached) " >&6
13156else $as_nop
13157  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13158/* end confdefs.h.  */
13159
13160int
13161main (void)
13162{
13163
13164  ;
13165  return 0;
13166}
13167_ACEOF
13168if ac_fn_c_try_link "$LINENO"
13169then :
13170
13171  lt_aix_libpath_sed='
13172      /Import File Strings/,/^$/ {
13173	  /^0/ {
13174	      s/^0  *\([^ ]*\) *$/\1/
13175	      p
13176	  }
13177      }'
13178  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13179  # Check for a 64-bit object if we didn't find anything.
13180  if test -z "$lt_cv_aix_libpath_"; then
13181    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13182  fi
13183fi
13184rm -f core conftest.err conftest.$ac_objext conftest.beam \
13185    conftest$ac_exeext conftest.$ac_ext
13186  if test -z "$lt_cv_aix_libpath_"; then
13187    lt_cv_aix_libpath_=/usr/lib:/lib
13188  fi
13189
13190fi
13191
13192  aix_libpath=$lt_cv_aix_libpath_
13193fi
13194
13195	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
13196	  # Warning - without using the other run time loading flags,
13197	  # -berok will link without error, but may produce a broken library.
13198	  no_undefined_flag=' $wl-bernotok'
13199	  allow_undefined_flag=' $wl-berok'
13200	  if test yes = "$with_gnu_ld"; then
13201	    # We only use this code for GNU lds that support --whole-archive.
13202	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
13203	  else
13204	    # Exported symbols can be pulled into shared objects from archives
13205	    whole_archive_flag_spec='$convenience'
13206	  fi
13207	  archive_cmds_need_lc=yes
13208	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
13209	  # -brtl affects multiple linker settings, -berok does not and is overridden later
13210	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
13211	  if test svr4 != "$with_aix_soname"; then
13212	    # This is similar to how AIX traditionally builds its shared libraries.
13213	    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'
13214	  fi
13215	  if test aix != "$with_aix_soname"; then
13216	    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'
13217	  else
13218	    # used by -dlpreopen to get the symbols
13219	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
13220	  fi
13221	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
13222	fi
13223      fi
13224      ;;
13225
13226    amigaos*)
13227      case $host_cpu in
13228      powerpc)
13229            # see comment about AmigaOS4 .so support
13230            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13231            archive_expsym_cmds=''
13232        ;;
13233      m68k)
13234            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)'
13235            hardcode_libdir_flag_spec='-L$libdir'
13236            hardcode_minus_L=yes
13237        ;;
13238      esac
13239      ;;
13240
13241    bsdi[45]*)
13242      export_dynamic_flag_spec=-rdynamic
13243      ;;
13244
13245    cygwin* | mingw* | pw32* | cegcc*)
13246      # When not using gcc, we currently assume that we are using
13247      # Microsoft Visual C++.
13248      # hardcode_libdir_flag_spec is actually meaningless, as there is
13249      # no search path for DLLs.
13250      case $cc_basename in
13251      cl*)
13252	# Native MSVC
13253	hardcode_libdir_flag_spec=' '
13254	allow_undefined_flag=unsupported
13255	always_export_symbols=yes
13256	file_list_spec='@'
13257	# Tell ltmain to make .lib files, not .a files.
13258	libext=lib
13259	# Tell ltmain to make .dll files, not .so files.
13260	shrext_cmds=.dll
13261	# FIXME: Setting linknames here is a bad hack.
13262	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
13263	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
13264            cp "$export_symbols" "$output_objdir/$soname.def";
13265            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
13266          else
13267            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
13268          fi~
13269          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
13270          linknames='
13271	# The linker will not automatically build a static lib if we build a DLL.
13272	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
13273	enable_shared_with_static_runtimes=yes
13274	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
13275	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
13276	# Don't use ranlib
13277	old_postinstall_cmds='chmod 644 $oldlib'
13278	postlink_cmds='lt_outputfile="@OUTPUT@"~
13279          lt_tool_outputfile="@TOOL_OUTPUT@"~
13280          case $lt_outputfile in
13281            *.exe|*.EXE) ;;
13282            *)
13283              lt_outputfile=$lt_outputfile.exe
13284              lt_tool_outputfile=$lt_tool_outputfile.exe
13285              ;;
13286          esac~
13287          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
13288            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
13289            $RM "$lt_outputfile.manifest";
13290          fi'
13291	;;
13292      *)
13293	# Assume MSVC wrapper
13294	hardcode_libdir_flag_spec=' '
13295	allow_undefined_flag=unsupported
13296	# Tell ltmain to make .lib files, not .a files.
13297	libext=lib
13298	# Tell ltmain to make .dll files, not .so files.
13299	shrext_cmds=.dll
13300	# FIXME: Setting linknames here is a bad hack.
13301	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
13302	# The linker will automatically build a .lib file if we build a DLL.
13303	old_archive_from_new_cmds='true'
13304	# FIXME: Should let the user specify the lib program.
13305	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
13306	enable_shared_with_static_runtimes=yes
13307	;;
13308      esac
13309      ;;
13310
13311    darwin* | rhapsody*)
13312
13313
13314  archive_cmds_need_lc=no
13315  hardcode_direct=no
13316  hardcode_automatic=yes
13317  hardcode_shlibpath_var=unsupported
13318  if test yes = "$lt_cv_ld_force_load"; then
13319    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\"`'
13320
13321  else
13322    whole_archive_flag_spec=''
13323  fi
13324  link_all_deplibs=yes
13325  allow_undefined_flag=$_lt_dar_allow_undefined
13326  case $cc_basename in
13327     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
13328     *) _lt_dar_can_shared=$GCC ;;
13329  esac
13330  if test yes = "$_lt_dar_can_shared"; then
13331    output_verbose_link_cmd=func_echo_all
13332    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
13333    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
13334    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"
13335    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"
13336
13337  else
13338  ld_shlibs=no
13339  fi
13340
13341      ;;
13342
13343    dgux*)
13344      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13345      hardcode_libdir_flag_spec='-L$libdir'
13346      hardcode_shlibpath_var=no
13347      ;;
13348
13349    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13350    # support.  Future versions do this automatically, but an explicit c++rt0.o
13351    # does not break anything, and helps significantly (at the cost of a little
13352    # extra space).
13353    freebsd2.2*)
13354      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
13355      hardcode_libdir_flag_spec='-R$libdir'
13356      hardcode_direct=yes
13357      hardcode_shlibpath_var=no
13358      ;;
13359
13360    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
13361    freebsd2.*)
13362      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
13363      hardcode_direct=yes
13364      hardcode_minus_L=yes
13365      hardcode_shlibpath_var=no
13366      ;;
13367
13368    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
13369    freebsd* | dragonfly*)
13370      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13371      hardcode_libdir_flag_spec='-R$libdir'
13372      hardcode_direct=yes
13373      hardcode_shlibpath_var=no
13374      ;;
13375
13376    hpux9*)
13377      if test yes = "$GCC"; then
13378	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'
13379      else
13380	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'
13381      fi
13382      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13383      hardcode_libdir_separator=:
13384      hardcode_direct=yes
13385
13386      # hardcode_minus_L: Not really in the search PATH,
13387      # but as the default location of the library.
13388      hardcode_minus_L=yes
13389      export_dynamic_flag_spec='$wl-E'
13390      ;;
13391
13392    hpux10*)
13393      if test yes,no = "$GCC,$with_gnu_ld"; then
13394	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13395      else
13396	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
13397      fi
13398      if test no = "$with_gnu_ld"; then
13399	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13400	hardcode_libdir_separator=:
13401	hardcode_direct=yes
13402	hardcode_direct_absolute=yes
13403	export_dynamic_flag_spec='$wl-E'
13404	# hardcode_minus_L: Not really in the search PATH,
13405	# but as the default location of the library.
13406	hardcode_minus_L=yes
13407      fi
13408      ;;
13409
13410    hpux11*)
13411      if test yes,no = "$GCC,$with_gnu_ld"; then
13412	case $host_cpu in
13413	hppa*64*)
13414	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13415	  ;;
13416	ia64*)
13417	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
13418	  ;;
13419	*)
13420	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13421	  ;;
13422	esac
13423      else
13424	case $host_cpu in
13425	hppa*64*)
13426	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13427	  ;;
13428	ia64*)
13429	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
13430	  ;;
13431	*)
13432
13433	  # Older versions of the 11.00 compiler do not understand -b yet
13434	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
13435	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
13436printf %s "checking if $CC understands -b... " >&6; }
13437if test ${lt_cv_prog_compiler__b+y}
13438then :
13439  printf %s "(cached) " >&6
13440else $as_nop
13441  lt_cv_prog_compiler__b=no
13442   save_LDFLAGS=$LDFLAGS
13443   LDFLAGS="$LDFLAGS -b"
13444   echo "$lt_simple_link_test_code" > conftest.$ac_ext
13445   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
13446     # The linker can only warn and ignore the option if not recognized
13447     # So say no if there are warnings
13448     if test -s conftest.err; then
13449       # Append any errors to the config.log.
13450       cat conftest.err 1>&5
13451       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
13452       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13453       if diff conftest.exp conftest.er2 >/dev/null; then
13454         lt_cv_prog_compiler__b=yes
13455       fi
13456     else
13457       lt_cv_prog_compiler__b=yes
13458     fi
13459   fi
13460   $RM -r conftest*
13461   LDFLAGS=$save_LDFLAGS
13462
13463fi
13464{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
13465printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
13466
13467if test yes = "$lt_cv_prog_compiler__b"; then
13468    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
13469else
13470    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
13471fi
13472
13473	  ;;
13474	esac
13475      fi
13476      if test no = "$with_gnu_ld"; then
13477	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
13478	hardcode_libdir_separator=:
13479
13480	case $host_cpu in
13481	hppa*64*|ia64*)
13482	  hardcode_direct=no
13483	  hardcode_shlibpath_var=no
13484	  ;;
13485	*)
13486	  hardcode_direct=yes
13487	  hardcode_direct_absolute=yes
13488	  export_dynamic_flag_spec='$wl-E'
13489
13490	  # hardcode_minus_L: Not really in the search PATH,
13491	  # but as the default location of the library.
13492	  hardcode_minus_L=yes
13493	  ;;
13494	esac
13495      fi
13496      ;;
13497
13498    irix5* | irix6* | nonstopux*)
13499      if test yes = "$GCC"; then
13500	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'
13501	# Try to use the -exported_symbol ld option, if it does not
13502	# work, assume that -exports_file does not work either and
13503	# implicitly export all symbols.
13504	# This should be the same for all languages, so no per-tag cache variable.
13505	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
13506printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
13507if test ${lt_cv_irix_exported_symbol+y}
13508then :
13509  printf %s "(cached) " >&6
13510else $as_nop
13511  save_LDFLAGS=$LDFLAGS
13512	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
13513	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13514/* end confdefs.h.  */
13515int foo (void) { return 0; }
13516_ACEOF
13517if ac_fn_c_try_link "$LINENO"
13518then :
13519  lt_cv_irix_exported_symbol=yes
13520else $as_nop
13521  lt_cv_irix_exported_symbol=no
13522fi
13523rm -f core conftest.err conftest.$ac_objext conftest.beam \
13524    conftest$ac_exeext conftest.$ac_ext
13525           LDFLAGS=$save_LDFLAGS
13526fi
13527{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
13528printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
13529	if test yes = "$lt_cv_irix_exported_symbol"; then
13530          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'
13531	fi
13532      else
13533	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'
13534	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'
13535      fi
13536      archive_cmds_need_lc='no'
13537      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13538      hardcode_libdir_separator=:
13539      inherit_rpath=yes
13540      link_all_deplibs=yes
13541      ;;
13542
13543    linux*)
13544      case $cc_basename in
13545      tcc*)
13546	# Fabrice Bellard et al's Tiny C Compiler
13547	ld_shlibs=yes
13548	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13549	;;
13550      esac
13551      ;;
13552
13553    netbsd*)
13554      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13555	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
13556      else
13557	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
13558      fi
13559      hardcode_libdir_flag_spec='-R$libdir'
13560      hardcode_direct=yes
13561      hardcode_shlibpath_var=no
13562      ;;
13563
13564    newsos6)
13565      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13566      hardcode_direct=yes
13567      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13568      hardcode_libdir_separator=:
13569      hardcode_shlibpath_var=no
13570      ;;
13571
13572    *nto* | *qnx*)
13573      ;;
13574
13575    openbsd* | bitrig*)
13576      if test -f /usr/libexec/ld.so; then
13577	hardcode_direct=yes
13578	hardcode_shlibpath_var=no
13579	hardcode_direct_absolute=yes
13580	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13581	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13582	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
13583	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
13584	  export_dynamic_flag_spec='$wl-E'
13585	else
13586	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
13587	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
13588	fi
13589      else
13590	ld_shlibs=no
13591      fi
13592      ;;
13593
13594    os2*)
13595      hardcode_libdir_flag_spec='-L$libdir'
13596      hardcode_minus_L=yes
13597      allow_undefined_flag=unsupported
13598      shrext_cmds=.dll
13599      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13600	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13601	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13602	$ECHO EXPORTS >> $output_objdir/$libname.def~
13603	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
13604	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13605	emximp -o $lib $output_objdir/$libname.def'
13606      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13607	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13608	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13609	$ECHO EXPORTS >> $output_objdir/$libname.def~
13610	prefix_cmds="$SED"~
13611	if test EXPORTS = "`$SED 1q $export_symbols`"; then
13612	  prefix_cmds="$prefix_cmds -e 1d";
13613	fi~
13614	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
13615	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
13616	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13617	emximp -o $lib $output_objdir/$libname.def'
13618      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
13619      enable_shared_with_static_runtimes=yes
13620      ;;
13621
13622    osf3*)
13623      if test yes = "$GCC"; then
13624	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
13625	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'
13626      else
13627	allow_undefined_flag=' -expect_unresolved \*'
13628	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'
13629      fi
13630      archive_cmds_need_lc='no'
13631      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13632      hardcode_libdir_separator=:
13633      ;;
13634
13635    osf4* | osf5*)	# as osf3* with the addition of -msym flag
13636      if test yes = "$GCC"; then
13637	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
13638	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'
13639	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
13640      else
13641	allow_undefined_flag=' -expect_unresolved \*'
13642	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'
13643	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~
13644          $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'
13645
13646	# Both c and cxx compiler support -rpath directly
13647	hardcode_libdir_flag_spec='-rpath $libdir'
13648      fi
13649      archive_cmds_need_lc='no'
13650      hardcode_libdir_separator=:
13651      ;;
13652
13653    solaris*)
13654      no_undefined_flag=' -z defs'
13655      if test yes = "$GCC"; then
13656	wlarc='$wl'
13657	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
13658	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13659          $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'
13660      else
13661	case `$CC -V 2>&1` in
13662	*"Compilers 5.0"*)
13663	  wlarc=''
13664	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
13665	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13666            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
13667	  ;;
13668	*)
13669	  wlarc='$wl'
13670	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
13671	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13672            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
13673	  ;;
13674	esac
13675      fi
13676      hardcode_libdir_flag_spec='-R$libdir'
13677      hardcode_shlibpath_var=no
13678      case $host_os in
13679      solaris2.[0-5] | solaris2.[0-5].*) ;;
13680      *)
13681	# The compiler driver will combine and reorder linker options,
13682	# but understands '-z linker_flag'.  GCC discards it without '$wl',
13683	# but is careful enough not to reorder.
13684	# Supported since Solaris 2.6 (maybe 2.5.1?)
13685	if test yes = "$GCC"; then
13686	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
13687	else
13688	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
13689	fi
13690	;;
13691      esac
13692      link_all_deplibs=yes
13693      ;;
13694
13695    sunos4*)
13696      if test sequent = "$host_vendor"; then
13697	# Use $CC to link under sequent, because it throws in some extra .o
13698	# files that make .init and .fini sections work.
13699	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
13700      else
13701	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
13702      fi
13703      hardcode_libdir_flag_spec='-L$libdir'
13704      hardcode_direct=yes
13705      hardcode_minus_L=yes
13706      hardcode_shlibpath_var=no
13707      ;;
13708
13709    sysv4)
13710      case $host_vendor in
13711	sni)
13712	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13713	  hardcode_direct=yes # is this really true???
13714	;;
13715	siemens)
13716	  ## LD is ld it makes a PLAMLIB
13717	  ## CC just makes a GrossModule.
13718	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
13719	  reload_cmds='$CC -r -o $output$reload_objs'
13720	  hardcode_direct=no
13721        ;;
13722	motorola)
13723	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13724	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
13725	;;
13726      esac
13727      runpath_var='LD_RUN_PATH'
13728      hardcode_shlibpath_var=no
13729      ;;
13730
13731    sysv4.3*)
13732      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13733      hardcode_shlibpath_var=no
13734      export_dynamic_flag_spec='-Bexport'
13735      ;;
13736
13737    sysv4*MP*)
13738      if test -d /usr/nec; then
13739	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13740	hardcode_shlibpath_var=no
13741	runpath_var=LD_RUN_PATH
13742	hardcode_runpath_var=yes
13743	ld_shlibs=yes
13744      fi
13745      ;;
13746
13747    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
13748      no_undefined_flag='$wl-z,text'
13749      archive_cmds_need_lc=no
13750      hardcode_shlibpath_var=no
13751      runpath_var='LD_RUN_PATH'
13752
13753      if test yes = "$GCC"; then
13754	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13755	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13756      else
13757	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13758	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13759      fi
13760      ;;
13761
13762    sysv5* | sco3.2v5* | sco5v6*)
13763      # Note: We CANNOT use -z defs as we might desire, because we do not
13764      # link with -lc, and that would cause any symbols used from libc to
13765      # always be unresolved, which means just about no library would
13766      # ever link correctly.  If we're not using GNU ld we use -z text
13767      # though, which does catch some bad symbols but isn't as heavy-handed
13768      # as -z defs.
13769      no_undefined_flag='$wl-z,text'
13770      allow_undefined_flag='$wl-z,nodefs'
13771      archive_cmds_need_lc=no
13772      hardcode_shlibpath_var=no
13773      hardcode_libdir_flag_spec='$wl-R,$libdir'
13774      hardcode_libdir_separator=':'
13775      link_all_deplibs=yes
13776      export_dynamic_flag_spec='$wl-Bexport'
13777      runpath_var='LD_RUN_PATH'
13778
13779      if test yes = "$GCC"; then
13780	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13781	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13782      else
13783	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13784	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13785      fi
13786      ;;
13787
13788    uts4*)
13789      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
13790      hardcode_libdir_flag_spec='-L$libdir'
13791      hardcode_shlibpath_var=no
13792      ;;
13793
13794    *)
13795      ld_shlibs=no
13796      ;;
13797    esac
13798
13799    if test sni = "$host_vendor"; then
13800      case $host in
13801      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
13802	export_dynamic_flag_spec='$wl-Blargedynsym'
13803	;;
13804      esac
13805    fi
13806  fi
13807
13808{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
13809printf "%s\n" "$ld_shlibs" >&6; }
13810test no = "$ld_shlibs" && can_build_shared=no
13811
13812with_gnu_ld=$with_gnu_ld
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828#
13829# Do we need to explicitly link libc?
13830#
13831case "x$archive_cmds_need_lc" in
13832x|xyes)
13833  # Assume -lc should be added
13834  archive_cmds_need_lc=yes
13835
13836  if test yes,yes = "$GCC,$enable_shared"; then
13837    case $archive_cmds in
13838    *'~'*)
13839      # FIXME: we may have to deal with multi-command sequences.
13840      ;;
13841    '$CC '*)
13842      # Test whether the compiler implicitly links with -lc since on some
13843      # systems, -lgcc has to come before -lc. If gcc already passes -lc
13844      # to ld, don't add -lc before -lgcc.
13845      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
13846printf %s "checking whether -lc should be explicitly linked in... " >&6; }
13847if test ${lt_cv_archive_cmds_need_lc+y}
13848then :
13849  printf %s "(cached) " >&6
13850else $as_nop
13851  $RM conftest*
13852	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13853
13854	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13855  (eval $ac_compile) 2>&5
13856  ac_status=$?
13857  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13858  test $ac_status = 0; } 2>conftest.err; then
13859	  soname=conftest
13860	  lib=conftest
13861	  libobjs=conftest.$ac_objext
13862	  deplibs=
13863	  wl=$lt_prog_compiler_wl
13864	  pic_flag=$lt_prog_compiler_pic
13865	  compiler_flags=-v
13866	  linker_flags=-v
13867	  verstring=
13868	  output_objdir=.
13869	  libname=conftest
13870	  lt_save_allow_undefined_flag=$allow_undefined_flag
13871	  allow_undefined_flag=
13872	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
13873  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
13874  ac_status=$?
13875  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13876  test $ac_status = 0; }
13877	  then
13878	    lt_cv_archive_cmds_need_lc=no
13879	  else
13880	    lt_cv_archive_cmds_need_lc=yes
13881	  fi
13882	  allow_undefined_flag=$lt_save_allow_undefined_flag
13883	else
13884	  cat conftest.err 1>&5
13885	fi
13886	$RM conftest*
13887
13888fi
13889{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
13890printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
13891      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
13892      ;;
13893    esac
13894  fi
13895  ;;
13896esac
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
14050printf %s "checking dynamic linker characteristics... " >&6; }
14051
14052if test yes = "$GCC"; then
14053  case $host_os in
14054    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
14055    *) lt_awk_arg='/^libraries:/' ;;
14056  esac
14057  case $host_os in
14058    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
14059    *) lt_sed_strip_eq='s|=/|/|g' ;;
14060  esac
14061  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
14062  case $lt_search_path_spec in
14063  *\;*)
14064    # if the path contains ";" then we assume it to be the separator
14065    # otherwise default to the standard path separator (i.e. ":") - it is
14066    # assumed that no part of a normal pathname contains ";" but that should
14067    # okay in the real world where ";" in dirpaths is itself problematic.
14068    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
14069    ;;
14070  *)
14071    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
14072    ;;
14073  esac
14074  # Ok, now we have the path, separated by spaces, we can step through it
14075  # and add multilib dir if necessary...
14076  lt_tmp_lt_search_path_spec=
14077  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
14078  # ...but if some path component already ends with the multilib dir we assume
14079  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
14080  case "$lt_multi_os_dir; $lt_search_path_spec " in
14081  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
14082    lt_multi_os_dir=
14083    ;;
14084  esac
14085  for lt_sys_path in $lt_search_path_spec; do
14086    if test -d "$lt_sys_path$lt_multi_os_dir"; then
14087      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
14088    elif test -n "$lt_multi_os_dir"; then
14089      test -d "$lt_sys_path" && \
14090	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
14091    fi
14092  done
14093  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
14094BEGIN {RS = " "; FS = "/|\n";} {
14095  lt_foo = "";
14096  lt_count = 0;
14097  for (lt_i = NF; lt_i > 0; lt_i--) {
14098    if ($lt_i != "" && $lt_i != ".") {
14099      if ($lt_i == "..") {
14100        lt_count++;
14101      } else {
14102        if (lt_count == 0) {
14103          lt_foo = "/" $lt_i lt_foo;
14104        } else {
14105          lt_count--;
14106        }
14107      }
14108    }
14109  }
14110  if (lt_foo != "") { lt_freq[lt_foo]++; }
14111  if (lt_freq[lt_foo] == 1) { print lt_foo; }
14112}'`
14113  # AWK program above erroneously prepends '/' to C:/dos/paths
14114  # for these hosts.
14115  case $host_os in
14116    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
14117      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
14118  esac
14119  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
14120else
14121  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
14122fi
14123library_names_spec=
14124libname_spec='lib$name'
14125soname_spec=
14126shrext_cmds=.so
14127postinstall_cmds=
14128postuninstall_cmds=
14129finish_cmds=
14130finish_eval=
14131shlibpath_var=
14132shlibpath_overrides_runpath=unknown
14133version_type=none
14134dynamic_linker="$host_os ld.so"
14135sys_lib_dlsearch_path_spec="/lib /usr/lib"
14136need_lib_prefix=unknown
14137hardcode_into_libs=no
14138
14139# when you set need_version to no, make sure it does not cause -set_version
14140# flags to be left without arguments
14141need_version=unknown
14142
14143
14144
14145case $host_os in
14146aix3*)
14147  version_type=linux # correct to gnu/linux during the next big refactor
14148  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
14149  shlibpath_var=LIBPATH
14150
14151  # AIX 3 has no versioning support, so we append a major version to the name.
14152  soname_spec='$libname$release$shared_ext$major'
14153  ;;
14154
14155aix[4-9]*)
14156  version_type=linux # correct to gnu/linux during the next big refactor
14157  need_lib_prefix=no
14158  need_version=no
14159  hardcode_into_libs=yes
14160  if test ia64 = "$host_cpu"; then
14161    # AIX 5 supports IA64
14162    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
14163    shlibpath_var=LD_LIBRARY_PATH
14164  else
14165    # With GCC up to 2.95.x, collect2 would create an import file
14166    # for dependence libraries.  The import file would start with
14167    # the line '#! .'.  This would cause the generated library to
14168    # depend on '.', always an invalid library.  This was fixed in
14169    # development snapshots of GCC prior to 3.0.
14170    case $host_os in
14171      aix4 | aix4.[01] | aix4.[01].*)
14172      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
14173	   echo ' yes '
14174	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
14175	:
14176      else
14177	can_build_shared=no
14178      fi
14179      ;;
14180    esac
14181    # Using Import Files as archive members, it is possible to support
14182    # filename-based versioning of shared library archives on AIX. While
14183    # this would work for both with and without runtime linking, it will
14184    # prevent static linking of such archives. So we do filename-based
14185    # shared library versioning with .so extension only, which is used
14186    # when both runtime linking and shared linking is enabled.
14187    # Unfortunately, runtime linking may impact performance, so we do
14188    # not want this to be the default eventually. Also, we use the
14189    # versioned .so libs for executables only if there is the -brtl
14190    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
14191    # To allow for filename-based versioning support, we need to create
14192    # libNAME.so.V as an archive file, containing:
14193    # *) an Import File, referring to the versioned filename of the
14194    #    archive as well as the shared archive member, telling the
14195    #    bitwidth (32 or 64) of that shared object, and providing the
14196    #    list of exported symbols of that shared object, eventually
14197    #    decorated with the 'weak' keyword
14198    # *) the shared object with the F_LOADONLY flag set, to really avoid
14199    #    it being seen by the linker.
14200    # At run time we better use the real file rather than another symlink,
14201    # but for link time we create the symlink libNAME.so -> libNAME.so.V
14202
14203    case $with_aix_soname,$aix_use_runtimelinking in
14204    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
14205    # soname into executable. Probably we can add versioning support to
14206    # collect2, so additional links can be useful in future.
14207    aix,yes) # traditional libtool
14208      dynamic_linker='AIX unversionable lib.so'
14209      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
14210      # instead of lib<name>.a to let people know that these are not
14211      # typical AIX shared libraries.
14212      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14213      ;;
14214    aix,no) # traditional AIX only
14215      dynamic_linker='AIX lib.a(lib.so.V)'
14216      # We preserve .a as extension for shared libraries through AIX4.2
14217      # and later when we are not doing run time linking.
14218      library_names_spec='$libname$release.a $libname.a'
14219      soname_spec='$libname$release$shared_ext$major'
14220      ;;
14221    svr4,*) # full svr4 only
14222      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
14223      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
14224      # We do not specify a path in Import Files, so LIBPATH fires.
14225      shlibpath_overrides_runpath=yes
14226      ;;
14227    *,yes) # both, prefer svr4
14228      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
14229      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
14230      # unpreferred sharedlib libNAME.a needs extra handling
14231      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"'
14232      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"'
14233      # We do not specify a path in Import Files, so LIBPATH fires.
14234      shlibpath_overrides_runpath=yes
14235      ;;
14236    *,no) # both, prefer aix
14237      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
14238      library_names_spec='$libname$release.a $libname.a'
14239      soname_spec='$libname$release$shared_ext$major'
14240      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
14241      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)'
14242      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"'
14243      ;;
14244    esac
14245    shlibpath_var=LIBPATH
14246  fi
14247  ;;
14248
14249amigaos*)
14250  case $host_cpu in
14251  powerpc)
14252    # Since July 2007 AmigaOS4 officially supports .so libraries.
14253    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
14254    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14255    ;;
14256  m68k)
14257    library_names_spec='$libname.ixlibrary $libname.a'
14258    # Create ${libname}_ixlibrary.a entries in /sys/libs.
14259    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'
14260    ;;
14261  esac
14262  ;;
14263
14264beos*)
14265  library_names_spec='$libname$shared_ext'
14266  dynamic_linker="$host_os ld.so"
14267  shlibpath_var=LIBRARY_PATH
14268  ;;
14269
14270bsdi[45]*)
14271  version_type=linux # correct to gnu/linux during the next big refactor
14272  need_version=no
14273  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14274  soname_spec='$libname$release$shared_ext$major'
14275  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
14276  shlibpath_var=LD_LIBRARY_PATH
14277  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
14278  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
14279  # the default ld.so.conf also contains /usr/contrib/lib and
14280  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
14281  # libtool to hard-code these into programs
14282  ;;
14283
14284cygwin* | mingw* | pw32* | cegcc*)
14285  version_type=windows
14286  shrext_cmds=.dll
14287  need_version=no
14288  need_lib_prefix=no
14289
14290  case $GCC,$cc_basename in
14291  yes,*)
14292    # gcc
14293    library_names_spec='$libname.dll.a'
14294    # DLL is installed to $(libdir)/../bin by postinstall_cmds
14295    postinstall_cmds='base_file=`basename \$file`~
14296      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
14297      dldir=$destdir/`dirname \$dlpath`~
14298      test -d \$dldir || mkdir -p \$dldir~
14299      $install_prog $dir/$dlname \$dldir/$dlname~
14300      chmod a+x \$dldir/$dlname~
14301      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
14302        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
14303      fi'
14304    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14305      dlpath=$dir/\$dldll~
14306       $RM \$dlpath'
14307    shlibpath_overrides_runpath=yes
14308
14309    case $host_os in
14310    cygwin*)
14311      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
14312      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14313
14314      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
14315      ;;
14316    mingw* | cegcc*)
14317      # MinGW DLLs use traditional 'lib' prefix
14318      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14319      ;;
14320    pw32*)
14321      # pw32 DLLs use 'pw' prefix rather than 'lib'
14322      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14323      ;;
14324    esac
14325    dynamic_linker='Win32 ld.exe'
14326    ;;
14327
14328  *,cl*)
14329    # Native MSVC
14330    libname_spec='$name'
14331    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
14332    library_names_spec='$libname.dll.lib'
14333
14334    case $build_os in
14335    mingw*)
14336      sys_lib_search_path_spec=
14337      lt_save_ifs=$IFS
14338      IFS=';'
14339      for lt_path in $LIB
14340      do
14341        IFS=$lt_save_ifs
14342        # Let DOS variable expansion print the short 8.3 style file name.
14343        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
14344        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
14345      done
14346      IFS=$lt_save_ifs
14347      # Convert to MSYS style.
14348      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
14349      ;;
14350    cygwin*)
14351      # Convert to unix form, then to dos form, then back to unix form
14352      # but this time dos style (no spaces!) so that the unix form looks
14353      # like /cygdrive/c/PROGRA~1:/cygdr...
14354      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
14355      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
14356      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14357      ;;
14358    *)
14359      sys_lib_search_path_spec=$LIB
14360      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
14361        # It is most probably a Windows format PATH.
14362        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
14363      else
14364        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14365      fi
14366      # FIXME: find the short name or the path components, as spaces are
14367      # common. (e.g. "Program Files" -> "PROGRA~1")
14368      ;;
14369    esac
14370
14371    # DLL is installed to $(libdir)/../bin by postinstall_cmds
14372    postinstall_cmds='base_file=`basename \$file`~
14373      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
14374      dldir=$destdir/`dirname \$dlpath`~
14375      test -d \$dldir || mkdir -p \$dldir~
14376      $install_prog $dir/$dlname \$dldir/$dlname'
14377    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14378      dlpath=$dir/\$dldll~
14379       $RM \$dlpath'
14380    shlibpath_overrides_runpath=yes
14381    dynamic_linker='Win32 link.exe'
14382    ;;
14383
14384  *)
14385    # Assume MSVC wrapper
14386    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
14387    dynamic_linker='Win32 ld.exe'
14388    ;;
14389  esac
14390  # FIXME: first we should search . and the directory the executable is in
14391  shlibpath_var=PATH
14392  ;;
14393
14394darwin* | rhapsody*)
14395  dynamic_linker="$host_os dyld"
14396  version_type=darwin
14397  need_lib_prefix=no
14398  need_version=no
14399  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
14400  soname_spec='$libname$release$major$shared_ext'
14401  shlibpath_overrides_runpath=yes
14402  shlibpath_var=DYLD_LIBRARY_PATH
14403  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
14404
14405  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
14406  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
14407  ;;
14408
14409dgux*)
14410  version_type=linux # correct to gnu/linux during the next big refactor
14411  need_lib_prefix=no
14412  need_version=no
14413  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14414  soname_spec='$libname$release$shared_ext$major'
14415  shlibpath_var=LD_LIBRARY_PATH
14416  ;;
14417
14418freebsd* | dragonfly*)
14419  # DragonFly does not have aout.  When/if they implement a new
14420  # versioning mechanism, adjust this.
14421  if test -x /usr/bin/objformat; then
14422    objformat=`/usr/bin/objformat`
14423  else
14424    case $host_os in
14425    freebsd[23].*) objformat=aout ;;
14426    *) objformat=elf ;;
14427    esac
14428  fi
14429  version_type=freebsd-$objformat
14430  case $version_type in
14431    freebsd-elf*)
14432      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14433      soname_spec='$libname$release$shared_ext$major'
14434      need_version=no
14435      need_lib_prefix=no
14436      ;;
14437    freebsd-*)
14438      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14439      need_version=yes
14440      ;;
14441  esac
14442  shlibpath_var=LD_LIBRARY_PATH
14443  case $host_os in
14444  freebsd2.*)
14445    shlibpath_overrides_runpath=yes
14446    ;;
14447  freebsd3.[01]* | freebsdelf3.[01]*)
14448    shlibpath_overrides_runpath=yes
14449    hardcode_into_libs=yes
14450    ;;
14451  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
14452  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
14453    shlibpath_overrides_runpath=no
14454    hardcode_into_libs=yes
14455    ;;
14456  *) # from 4.6 on, and DragonFly
14457    shlibpath_overrides_runpath=yes
14458    hardcode_into_libs=yes
14459    ;;
14460  esac
14461  ;;
14462
14463haiku*)
14464  version_type=linux # correct to gnu/linux during the next big refactor
14465  need_lib_prefix=no
14466  need_version=no
14467  dynamic_linker="$host_os runtime_loader"
14468  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14469  soname_spec='$libname$release$shared_ext$major'
14470  shlibpath_var=LIBRARY_PATH
14471  shlibpath_overrides_runpath=no
14472  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
14473  hardcode_into_libs=yes
14474  ;;
14475
14476hpux9* | hpux10* | hpux11*)
14477  # Give a soname corresponding to the major version so that dld.sl refuses to
14478  # link against other versions.
14479  version_type=sunos
14480  need_lib_prefix=no
14481  need_version=no
14482  case $host_cpu in
14483  ia64*)
14484    shrext_cmds='.so'
14485    hardcode_into_libs=yes
14486    dynamic_linker="$host_os dld.so"
14487    shlibpath_var=LD_LIBRARY_PATH
14488    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14489    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14490    soname_spec='$libname$release$shared_ext$major'
14491    if test 32 = "$HPUX_IA64_MODE"; then
14492      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
14493      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
14494    else
14495      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
14496      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
14497    fi
14498    ;;
14499  hppa*64*)
14500    shrext_cmds='.sl'
14501    hardcode_into_libs=yes
14502    dynamic_linker="$host_os dld.sl"
14503    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
14504    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14505    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14506    soname_spec='$libname$release$shared_ext$major'
14507    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
14508    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14509    ;;
14510  *)
14511    shrext_cmds='.sl'
14512    dynamic_linker="$host_os dld.sl"
14513    shlibpath_var=SHLIB_PATH
14514    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
14515    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14516    soname_spec='$libname$release$shared_ext$major'
14517    ;;
14518  esac
14519  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
14520  postinstall_cmds='chmod 555 $lib'
14521  # or fails outright, so override atomically:
14522  install_override_mode=555
14523  ;;
14524
14525interix[3-9]*)
14526  version_type=linux # correct to gnu/linux during the next big refactor
14527  need_lib_prefix=no
14528  need_version=no
14529  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14530  soname_spec='$libname$release$shared_ext$major'
14531  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
14532  shlibpath_var=LD_LIBRARY_PATH
14533  shlibpath_overrides_runpath=no
14534  hardcode_into_libs=yes
14535  ;;
14536
14537irix5* | irix6* | nonstopux*)
14538  case $host_os in
14539    nonstopux*) version_type=nonstopux ;;
14540    *)
14541	if test yes = "$lt_cv_prog_gnu_ld"; then
14542		version_type=linux # correct to gnu/linux during the next big refactor
14543	else
14544		version_type=irix
14545	fi ;;
14546  esac
14547  need_lib_prefix=no
14548  need_version=no
14549  soname_spec='$libname$release$shared_ext$major'
14550  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
14551  case $host_os in
14552  irix5* | nonstopux*)
14553    libsuff= shlibsuff=
14554    ;;
14555  *)
14556    case $LD in # libtool.m4 will add one of these switches to LD
14557    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
14558      libsuff= shlibsuff= libmagic=32-bit;;
14559    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
14560      libsuff=32 shlibsuff=N32 libmagic=N32;;
14561    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
14562      libsuff=64 shlibsuff=64 libmagic=64-bit;;
14563    *) libsuff= shlibsuff= libmagic=never-match;;
14564    esac
14565    ;;
14566  esac
14567  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
14568  shlibpath_overrides_runpath=no
14569  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
14570  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
14571  hardcode_into_libs=yes
14572  ;;
14573
14574# No shared lib support for Linux oldld, aout, or coff.
14575linux*oldld* | linux*aout* | linux*coff*)
14576  dynamic_linker=no
14577  ;;
14578
14579linux*android*)
14580  version_type=none # Android doesn't support versioned libraries.
14581  need_lib_prefix=no
14582  need_version=no
14583  library_names_spec='$libname$release$shared_ext'
14584  soname_spec='$libname$release$shared_ext'
14585  finish_cmds=
14586  shlibpath_var=LD_LIBRARY_PATH
14587  shlibpath_overrides_runpath=yes
14588
14589  # This implies no fast_install, which is unacceptable.
14590  # Some rework will be needed to allow for fast_install
14591  # before this can be enabled.
14592  hardcode_into_libs=yes
14593
14594  dynamic_linker='Android linker'
14595  # Don't embed -rpath directories since the linker doesn't support them.
14596  hardcode_libdir_flag_spec='-L$libdir'
14597  ;;
14598
14599# This must be glibc/ELF.
14600linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
14601  version_type=linux # correct to gnu/linux during the next big refactor
14602  need_lib_prefix=no
14603  need_version=no
14604  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14605  soname_spec='$libname$release$shared_ext$major'
14606  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
14607  shlibpath_var=LD_LIBRARY_PATH
14608  shlibpath_overrides_runpath=no
14609
14610  # Some binutils ld are patched to set DT_RUNPATH
14611  if test ${lt_cv_shlibpath_overrides_runpath+y}
14612then :
14613  printf %s "(cached) " >&6
14614else $as_nop
14615  lt_cv_shlibpath_overrides_runpath=no
14616    save_LDFLAGS=$LDFLAGS
14617    save_libdir=$libdir
14618    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
14619	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
14620    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14621/* end confdefs.h.  */
14622
14623int
14624main (void)
14625{
14626
14627  ;
14628  return 0;
14629}
14630_ACEOF
14631if ac_fn_c_try_link "$LINENO"
14632then :
14633  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
14634then :
14635  lt_cv_shlibpath_overrides_runpath=yes
14636fi
14637fi
14638rm -f core conftest.err conftest.$ac_objext conftest.beam \
14639    conftest$ac_exeext conftest.$ac_ext
14640    LDFLAGS=$save_LDFLAGS
14641    libdir=$save_libdir
14642
14643fi
14644
14645  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
14646
14647  # This implies no fast_install, which is unacceptable.
14648  # Some rework will be needed to allow for fast_install
14649  # before this can be enabled.
14650  hardcode_into_libs=yes
14651
14652  # Add ABI-specific directories to the system library path.
14653  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
14654
14655  # Ideally, we could use ldconfig to report *all* directores which are
14656  # searched for libraries, however this is still not possible.  Aside from not
14657  # being certain /sbin/ldconfig is available, command
14658  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
14659  # even though it is searched at run-time.  Try to do the best guess by
14660  # appending ld.so.conf contents (and includes) to the search path.
14661  if test -f /etc/ld.so.conf; then
14662    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' ' '`
14663    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
14664  fi
14665
14666  # We used to test for /lib/ld.so.1 and disable shared libraries on
14667  # powerpc, because MkLinux only supported shared libraries with the
14668  # GNU dynamic linker.  Since this was broken with cross compilers,
14669  # most powerpc-linux boxes support dynamic linking these days and
14670  # people can always --disable-shared, the test was removed, and we
14671  # assume the GNU/Linux dynamic linker is in use.
14672  dynamic_linker='GNU/Linux ld.so'
14673  ;;
14674
14675netbsd*)
14676  version_type=sunos
14677  need_lib_prefix=no
14678  need_version=no
14679  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14680    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14681    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14682    dynamic_linker='NetBSD (a.out) ld.so'
14683  else
14684    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14685    soname_spec='$libname$release$shared_ext$major'
14686    dynamic_linker='NetBSD ld.elf_so'
14687  fi
14688  shlibpath_var=LD_LIBRARY_PATH
14689  shlibpath_overrides_runpath=yes
14690  hardcode_into_libs=yes
14691  ;;
14692
14693newsos6)
14694  version_type=linux # correct to gnu/linux during the next big refactor
14695  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14696  shlibpath_var=LD_LIBRARY_PATH
14697  shlibpath_overrides_runpath=yes
14698  ;;
14699
14700*nto* | *qnx*)
14701  version_type=qnx
14702  need_lib_prefix=no
14703  need_version=no
14704  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14705  soname_spec='$libname$release$shared_ext$major'
14706  shlibpath_var=LD_LIBRARY_PATH
14707  shlibpath_overrides_runpath=no
14708  hardcode_into_libs=yes
14709  dynamic_linker='ldqnx.so'
14710  ;;
14711
14712openbsd* | bitrig*)
14713  version_type=sunos
14714  sys_lib_dlsearch_path_spec=/usr/lib
14715  need_lib_prefix=no
14716  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
14717    need_version=no
14718  else
14719    need_version=yes
14720  fi
14721  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14722  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14723  shlibpath_var=LD_LIBRARY_PATH
14724  shlibpath_overrides_runpath=yes
14725  ;;
14726
14727os2*)
14728  libname_spec='$name'
14729  version_type=windows
14730  shrext_cmds=.dll
14731  need_version=no
14732  need_lib_prefix=no
14733  # OS/2 can only load a DLL with a base name of 8 characters or less.
14734  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
14735    v=$($ECHO $release$versuffix | tr -d .-);
14736    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
14737    $ECHO $n$v`$shared_ext'
14738  library_names_spec='${libname}_dll.$libext'
14739  dynamic_linker='OS/2 ld.exe'
14740  shlibpath_var=BEGINLIBPATH
14741  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
14742  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14743  postinstall_cmds='base_file=`basename \$file`~
14744    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
14745    dldir=$destdir/`dirname \$dlpath`~
14746    test -d \$dldir || mkdir -p \$dldir~
14747    $install_prog $dir/$dlname \$dldir/$dlname~
14748    chmod a+x \$dldir/$dlname~
14749    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
14750      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
14751    fi'
14752  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
14753    dlpath=$dir/\$dldll~
14754    $RM \$dlpath'
14755  ;;
14756
14757osf3* | osf4* | osf5*)
14758  version_type=osf
14759  need_lib_prefix=no
14760  need_version=no
14761  soname_spec='$libname$release$shared_ext$major'
14762  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14763  shlibpath_var=LD_LIBRARY_PATH
14764  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
14765  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14766  ;;
14767
14768rdos*)
14769  dynamic_linker=no
14770  ;;
14771
14772solaris*)
14773  version_type=linux # correct to gnu/linux during the next big refactor
14774  need_lib_prefix=no
14775  need_version=no
14776  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14777  soname_spec='$libname$release$shared_ext$major'
14778  shlibpath_var=LD_LIBRARY_PATH
14779  shlibpath_overrides_runpath=yes
14780  hardcode_into_libs=yes
14781  # ldd complains unless libraries are executable
14782  postinstall_cmds='chmod +x $lib'
14783  ;;
14784
14785sunos4*)
14786  version_type=sunos
14787  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
14788  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
14789  shlibpath_var=LD_LIBRARY_PATH
14790  shlibpath_overrides_runpath=yes
14791  if test yes = "$with_gnu_ld"; then
14792    need_lib_prefix=no
14793  fi
14794  need_version=yes
14795  ;;
14796
14797sysv4 | sysv4.3*)
14798  version_type=linux # correct to gnu/linux during the next big refactor
14799  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14800  soname_spec='$libname$release$shared_ext$major'
14801  shlibpath_var=LD_LIBRARY_PATH
14802  case $host_vendor in
14803    sni)
14804      shlibpath_overrides_runpath=no
14805      need_lib_prefix=no
14806      runpath_var=LD_RUN_PATH
14807      ;;
14808    siemens)
14809      need_lib_prefix=no
14810      ;;
14811    motorola)
14812      need_lib_prefix=no
14813      need_version=no
14814      shlibpath_overrides_runpath=no
14815      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
14816      ;;
14817  esac
14818  ;;
14819
14820sysv4*MP*)
14821  if test -d /usr/nec; then
14822    version_type=linux # correct to gnu/linux during the next big refactor
14823    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
14824    soname_spec='$libname$shared_ext.$major'
14825    shlibpath_var=LD_LIBRARY_PATH
14826  fi
14827  ;;
14828
14829sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
14830  version_type=sco
14831  need_lib_prefix=no
14832  need_version=no
14833  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
14834  soname_spec='$libname$release$shared_ext$major'
14835  shlibpath_var=LD_LIBRARY_PATH
14836  shlibpath_overrides_runpath=yes
14837  hardcode_into_libs=yes
14838  if test yes = "$with_gnu_ld"; then
14839    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
14840  else
14841    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
14842    case $host_os in
14843      sco3.2v5*)
14844        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
14845	;;
14846    esac
14847  fi
14848  sys_lib_dlsearch_path_spec='/usr/lib'
14849  ;;
14850
14851tpf*)
14852  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
14853  version_type=linux # correct to gnu/linux during the next big refactor
14854  need_lib_prefix=no
14855  need_version=no
14856  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14857  shlibpath_var=LD_LIBRARY_PATH
14858  shlibpath_overrides_runpath=no
14859  hardcode_into_libs=yes
14860  ;;
14861
14862uts4*)
14863  version_type=linux # correct to gnu/linux during the next big refactor
14864  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14865  soname_spec='$libname$release$shared_ext$major'
14866  shlibpath_var=LD_LIBRARY_PATH
14867  ;;
14868
14869*)
14870  dynamic_linker=no
14871  ;;
14872esac
14873{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
14874printf "%s\n" "$dynamic_linker" >&6; }
14875test no = "$dynamic_linker" && can_build_shared=no
14876
14877variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
14878if test yes = "$GCC"; then
14879  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
14880fi
14881
14882if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
14883  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
14884fi
14885
14886if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
14887  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
14888fi
14889
14890# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
14891configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
14892
14893# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
14894func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
14895
14896# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
14897configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
14996printf %s "checking how to hardcode library paths into programs... " >&6; }
14997hardcode_action=
14998if test -n "$hardcode_libdir_flag_spec" ||
14999   test -n "$runpath_var" ||
15000   test yes = "$hardcode_automatic"; then
15001
15002  # We can hardcode non-existent directories.
15003  if test no != "$hardcode_direct" &&
15004     # If the only mechanism to avoid hardcoding is shlibpath_var, we
15005     # have to relink, otherwise we might link with an installed library
15006     # when we should be linking with a yet-to-be-installed one
15007     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
15008     test no != "$hardcode_minus_L"; then
15009    # Linking always hardcodes the temporary library directory.
15010    hardcode_action=relink
15011  else
15012    # We can link without hardcoding, and we can hardcode nonexisting dirs.
15013    hardcode_action=immediate
15014  fi
15015else
15016  # We cannot hardcode anything, or else we can only hardcode existing
15017  # directories.
15018  hardcode_action=unsupported
15019fi
15020{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
15021printf "%s\n" "$hardcode_action" >&6; }
15022
15023if test relink = "$hardcode_action" ||
15024   test yes = "$inherit_rpath"; then
15025  # Fast installation is not supported
15026  enable_fast_install=no
15027elif test yes = "$shlibpath_overrides_runpath" ||
15028     test no = "$enable_shared"; then
15029  # Fast installation is not necessary
15030  enable_fast_install=needless
15031fi
15032
15033
15034
15035
15036
15037
15038  if test yes != "$enable_dlopen"; then
15039  enable_dlopen=unknown
15040  enable_dlopen_self=unknown
15041  enable_dlopen_self_static=unknown
15042else
15043  lt_cv_dlopen=no
15044  lt_cv_dlopen_libs=
15045
15046  case $host_os in
15047  beos*)
15048    lt_cv_dlopen=load_add_on
15049    lt_cv_dlopen_libs=
15050    lt_cv_dlopen_self=yes
15051    ;;
15052
15053  mingw* | pw32* | cegcc*)
15054    lt_cv_dlopen=LoadLibrary
15055    lt_cv_dlopen_libs=
15056    ;;
15057
15058  cygwin*)
15059    lt_cv_dlopen=dlopen
15060    lt_cv_dlopen_libs=
15061    ;;
15062
15063  darwin*)
15064    # if libdl is installed we need to link against it
15065    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15066printf %s "checking for dlopen in -ldl... " >&6; }
15067if test ${ac_cv_lib_dl_dlopen+y}
15068then :
15069  printf %s "(cached) " >&6
15070else $as_nop
15071  ac_check_lib_save_LIBS=$LIBS
15072LIBS="-ldl  $LIBS"
15073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15074/* end confdefs.h.  */
15075
15076/* Override any GCC internal prototype to avoid an error.
15077   Use char because int might match the return type of a GCC
15078   builtin and then its argument prototype would still apply.  */
15079char dlopen ();
15080int
15081main (void)
15082{
15083return dlopen ();
15084  ;
15085  return 0;
15086}
15087_ACEOF
15088if ac_fn_c_try_link "$LINENO"
15089then :
15090  ac_cv_lib_dl_dlopen=yes
15091else $as_nop
15092  ac_cv_lib_dl_dlopen=no
15093fi
15094rm -f core conftest.err conftest.$ac_objext conftest.beam \
15095    conftest$ac_exeext conftest.$ac_ext
15096LIBS=$ac_check_lib_save_LIBS
15097fi
15098{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15099printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
15100if test "x$ac_cv_lib_dl_dlopen" = xyes
15101then :
15102  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
15103else $as_nop
15104
15105    lt_cv_dlopen=dyld
15106    lt_cv_dlopen_libs=
15107    lt_cv_dlopen_self=yes
15108
15109fi
15110
15111    ;;
15112
15113  tpf*)
15114    # Don't try to run any link tests for TPF.  We know it's impossible
15115    # because TPF is a cross-compiler, and we know how we open DSOs.
15116    lt_cv_dlopen=dlopen
15117    lt_cv_dlopen_libs=
15118    lt_cv_dlopen_self=no
15119    ;;
15120
15121  *)
15122    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
15123if test "x$ac_cv_func_shl_load" = xyes
15124then :
15125  lt_cv_dlopen=shl_load
15126else $as_nop
15127  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
15128printf %s "checking for shl_load in -ldld... " >&6; }
15129if test ${ac_cv_lib_dld_shl_load+y}
15130then :
15131  printf %s "(cached) " >&6
15132else $as_nop
15133  ac_check_lib_save_LIBS=$LIBS
15134LIBS="-ldld  $LIBS"
15135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15136/* end confdefs.h.  */
15137
15138/* Override any GCC internal prototype to avoid an error.
15139   Use char because int might match the return type of a GCC
15140   builtin and then its argument prototype would still apply.  */
15141char shl_load ();
15142int
15143main (void)
15144{
15145return shl_load ();
15146  ;
15147  return 0;
15148}
15149_ACEOF
15150if ac_fn_c_try_link "$LINENO"
15151then :
15152  ac_cv_lib_dld_shl_load=yes
15153else $as_nop
15154  ac_cv_lib_dld_shl_load=no
15155fi
15156rm -f core conftest.err conftest.$ac_objext conftest.beam \
15157    conftest$ac_exeext conftest.$ac_ext
15158LIBS=$ac_check_lib_save_LIBS
15159fi
15160{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
15161printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
15162if test "x$ac_cv_lib_dld_shl_load" = xyes
15163then :
15164  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
15165else $as_nop
15166  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15167if test "x$ac_cv_func_dlopen" = xyes
15168then :
15169  lt_cv_dlopen=dlopen
15170else $as_nop
15171  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15172printf %s "checking for dlopen in -ldl... " >&6; }
15173if test ${ac_cv_lib_dl_dlopen+y}
15174then :
15175  printf %s "(cached) " >&6
15176else $as_nop
15177  ac_check_lib_save_LIBS=$LIBS
15178LIBS="-ldl  $LIBS"
15179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15180/* end confdefs.h.  */
15181
15182/* Override any GCC internal prototype to avoid an error.
15183   Use char because int might match the return type of a GCC
15184   builtin and then its argument prototype would still apply.  */
15185char dlopen ();
15186int
15187main (void)
15188{
15189return dlopen ();
15190  ;
15191  return 0;
15192}
15193_ACEOF
15194if ac_fn_c_try_link "$LINENO"
15195then :
15196  ac_cv_lib_dl_dlopen=yes
15197else $as_nop
15198  ac_cv_lib_dl_dlopen=no
15199fi
15200rm -f core conftest.err conftest.$ac_objext conftest.beam \
15201    conftest$ac_exeext conftest.$ac_ext
15202LIBS=$ac_check_lib_save_LIBS
15203fi
15204{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15205printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
15206if test "x$ac_cv_lib_dl_dlopen" = xyes
15207then :
15208  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
15209else $as_nop
15210  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
15211printf %s "checking for dlopen in -lsvld... " >&6; }
15212if test ${ac_cv_lib_svld_dlopen+y}
15213then :
15214  printf %s "(cached) " >&6
15215else $as_nop
15216  ac_check_lib_save_LIBS=$LIBS
15217LIBS="-lsvld  $LIBS"
15218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15219/* end confdefs.h.  */
15220
15221/* Override any GCC internal prototype to avoid an error.
15222   Use char because int might match the return type of a GCC
15223   builtin and then its argument prototype would still apply.  */
15224char dlopen ();
15225int
15226main (void)
15227{
15228return dlopen ();
15229  ;
15230  return 0;
15231}
15232_ACEOF
15233if ac_fn_c_try_link "$LINENO"
15234then :
15235  ac_cv_lib_svld_dlopen=yes
15236else $as_nop
15237  ac_cv_lib_svld_dlopen=no
15238fi
15239rm -f core conftest.err conftest.$ac_objext conftest.beam \
15240    conftest$ac_exeext conftest.$ac_ext
15241LIBS=$ac_check_lib_save_LIBS
15242fi
15243{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
15244printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
15245if test "x$ac_cv_lib_svld_dlopen" = xyes
15246then :
15247  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
15248else $as_nop
15249  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
15250printf %s "checking for dld_link in -ldld... " >&6; }
15251if test ${ac_cv_lib_dld_dld_link+y}
15252then :
15253  printf %s "(cached) " >&6
15254else $as_nop
15255  ac_check_lib_save_LIBS=$LIBS
15256LIBS="-ldld  $LIBS"
15257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15258/* end confdefs.h.  */
15259
15260/* Override any GCC internal prototype to avoid an error.
15261   Use char because int might match the return type of a GCC
15262   builtin and then its argument prototype would still apply.  */
15263char dld_link ();
15264int
15265main (void)
15266{
15267return dld_link ();
15268  ;
15269  return 0;
15270}
15271_ACEOF
15272if ac_fn_c_try_link "$LINENO"
15273then :
15274  ac_cv_lib_dld_dld_link=yes
15275else $as_nop
15276  ac_cv_lib_dld_dld_link=no
15277fi
15278rm -f core conftest.err conftest.$ac_objext conftest.beam \
15279    conftest$ac_exeext conftest.$ac_ext
15280LIBS=$ac_check_lib_save_LIBS
15281fi
15282{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
15283printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
15284if test "x$ac_cv_lib_dld_dld_link" = xyes
15285then :
15286  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
15287fi
15288
15289
15290fi
15291
15292
15293fi
15294
15295
15296fi
15297
15298
15299fi
15300
15301
15302fi
15303
15304    ;;
15305  esac
15306
15307  if test no = "$lt_cv_dlopen"; then
15308    enable_dlopen=no
15309  else
15310    enable_dlopen=yes
15311  fi
15312
15313  case $lt_cv_dlopen in
15314  dlopen)
15315    save_CPPFLAGS=$CPPFLAGS
15316    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
15317
15318    save_LDFLAGS=$LDFLAGS
15319    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
15320
15321    save_LIBS=$LIBS
15322    LIBS="$lt_cv_dlopen_libs $LIBS"
15323
15324    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
15325printf %s "checking whether a program can dlopen itself... " >&6; }
15326if test ${lt_cv_dlopen_self+y}
15327then :
15328  printf %s "(cached) " >&6
15329else $as_nop
15330  	  if test yes = "$cross_compiling"; then :
15331  lt_cv_dlopen_self=cross
15332else
15333  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15334  lt_status=$lt_dlunknown
15335  cat > conftest.$ac_ext <<_LT_EOF
15336#line $LINENO "configure"
15337#include "confdefs.h"
15338
15339#if HAVE_DLFCN_H
15340#include <dlfcn.h>
15341#endif
15342
15343#include <stdio.h>
15344
15345#ifdef RTLD_GLOBAL
15346#  define LT_DLGLOBAL		RTLD_GLOBAL
15347#else
15348#  ifdef DL_GLOBAL
15349#    define LT_DLGLOBAL		DL_GLOBAL
15350#  else
15351#    define LT_DLGLOBAL		0
15352#  endif
15353#endif
15354
15355/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
15356   find out it does not work in some platform. */
15357#ifndef LT_DLLAZY_OR_NOW
15358#  ifdef RTLD_LAZY
15359#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
15360#  else
15361#    ifdef DL_LAZY
15362#      define LT_DLLAZY_OR_NOW		DL_LAZY
15363#    else
15364#      ifdef RTLD_NOW
15365#        define LT_DLLAZY_OR_NOW	RTLD_NOW
15366#      else
15367#        ifdef DL_NOW
15368#          define LT_DLLAZY_OR_NOW	DL_NOW
15369#        else
15370#          define LT_DLLAZY_OR_NOW	0
15371#        endif
15372#      endif
15373#    endif
15374#  endif
15375#endif
15376
15377/* When -fvisibility=hidden is used, assume the code has been annotated
15378   correspondingly for the symbols needed.  */
15379#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
15380int fnord () __attribute__((visibility("default")));
15381#endif
15382
15383int fnord () { return 42; }
15384int main ()
15385{
15386  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
15387  int status = $lt_dlunknown;
15388
15389  if (self)
15390    {
15391      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
15392      else
15393        {
15394	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
15395          else puts (dlerror ());
15396	}
15397      /* dlclose (self); */
15398    }
15399  else
15400    puts (dlerror ());
15401
15402  return status;
15403}
15404_LT_EOF
15405  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15406  (eval $ac_link) 2>&5
15407  ac_status=$?
15408  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15409  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
15410    (./conftest; exit; ) >&5 2>/dev/null
15411    lt_status=$?
15412    case x$lt_status in
15413      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
15414      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
15415      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
15416    esac
15417  else :
15418    # compilation failed
15419    lt_cv_dlopen_self=no
15420  fi
15421fi
15422rm -fr conftest*
15423
15424
15425fi
15426{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
15427printf "%s\n" "$lt_cv_dlopen_self" >&6; }
15428
15429    if test yes = "$lt_cv_dlopen_self"; then
15430      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
15431      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
15432printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
15433if test ${lt_cv_dlopen_self_static+y}
15434then :
15435  printf %s "(cached) " >&6
15436else $as_nop
15437  	  if test yes = "$cross_compiling"; then :
15438  lt_cv_dlopen_self_static=cross
15439else
15440  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15441  lt_status=$lt_dlunknown
15442  cat > conftest.$ac_ext <<_LT_EOF
15443#line $LINENO "configure"
15444#include "confdefs.h"
15445
15446#if HAVE_DLFCN_H
15447#include <dlfcn.h>
15448#endif
15449
15450#include <stdio.h>
15451
15452#ifdef RTLD_GLOBAL
15453#  define LT_DLGLOBAL		RTLD_GLOBAL
15454#else
15455#  ifdef DL_GLOBAL
15456#    define LT_DLGLOBAL		DL_GLOBAL
15457#  else
15458#    define LT_DLGLOBAL		0
15459#  endif
15460#endif
15461
15462/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
15463   find out it does not work in some platform. */
15464#ifndef LT_DLLAZY_OR_NOW
15465#  ifdef RTLD_LAZY
15466#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
15467#  else
15468#    ifdef DL_LAZY
15469#      define LT_DLLAZY_OR_NOW		DL_LAZY
15470#    else
15471#      ifdef RTLD_NOW
15472#        define LT_DLLAZY_OR_NOW	RTLD_NOW
15473#      else
15474#        ifdef DL_NOW
15475#          define LT_DLLAZY_OR_NOW	DL_NOW
15476#        else
15477#          define LT_DLLAZY_OR_NOW	0
15478#        endif
15479#      endif
15480#    endif
15481#  endif
15482#endif
15483
15484/* When -fvisibility=hidden is used, assume the code has been annotated
15485   correspondingly for the symbols needed.  */
15486#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
15487int fnord () __attribute__((visibility("default")));
15488#endif
15489
15490int fnord () { return 42; }
15491int main ()
15492{
15493  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
15494  int status = $lt_dlunknown;
15495
15496  if (self)
15497    {
15498      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
15499      else
15500        {
15501	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
15502          else puts (dlerror ());
15503	}
15504      /* dlclose (self); */
15505    }
15506  else
15507    puts (dlerror ());
15508
15509  return status;
15510}
15511_LT_EOF
15512  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15513  (eval $ac_link) 2>&5
15514  ac_status=$?
15515  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15516  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
15517    (./conftest; exit; ) >&5 2>/dev/null
15518    lt_status=$?
15519    case x$lt_status in
15520      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
15521      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
15522      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
15523    esac
15524  else :
15525    # compilation failed
15526    lt_cv_dlopen_self_static=no
15527  fi
15528fi
15529rm -fr conftest*
15530
15531
15532fi
15533{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
15534printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
15535    fi
15536
15537    CPPFLAGS=$save_CPPFLAGS
15538    LDFLAGS=$save_LDFLAGS
15539    LIBS=$save_LIBS
15540    ;;
15541  esac
15542
15543  case $lt_cv_dlopen_self in
15544  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
15545  *) enable_dlopen_self=unknown ;;
15546  esac
15547
15548  case $lt_cv_dlopen_self_static in
15549  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
15550  *) enable_dlopen_self_static=unknown ;;
15551  esac
15552fi
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570striplib=
15571old_striplib=
15572{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
15573printf %s "checking whether stripping libraries is possible... " >&6; }
15574if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
15575  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
15576  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
15577  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15578printf "%s\n" "yes" >&6; }
15579else
15580# FIXME - insert some real tests, host_os isn't really good enough
15581  case $host_os in
15582  darwin*)
15583    if test -n "$STRIP"; then
15584      striplib="$STRIP -x"
15585      old_striplib="$STRIP -S"
15586      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15587printf "%s\n" "yes" >&6; }
15588    else
15589      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15590printf "%s\n" "no" >&6; }
15591    fi
15592    ;;
15593  *)
15594    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15595printf "%s\n" "no" >&6; }
15596    ;;
15597  esac
15598fi
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611  # Report what library types will actually be built
15612  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
15613printf %s "checking if libtool supports shared libraries... " >&6; }
15614  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
15615printf "%s\n" "$can_build_shared" >&6; }
15616
15617  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
15618printf %s "checking whether to build shared libraries... " >&6; }
15619  test no = "$can_build_shared" && enable_shared=no
15620
15621  # On AIX, shared libraries and static libraries use the same namespace, and
15622  # are all built from PIC.
15623  case $host_os in
15624  aix3*)
15625    test yes = "$enable_shared" && enable_static=no
15626    if test -n "$RANLIB"; then
15627      archive_cmds="$archive_cmds~\$RANLIB \$lib"
15628      postinstall_cmds='$RANLIB $lib'
15629    fi
15630    ;;
15631
15632  aix[4-9]*)
15633    if test ia64 != "$host_cpu"; then
15634      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
15635      yes,aix,yes) ;;			# shared object as lib.so file only
15636      yes,svr4,*) ;;			# shared object as lib.so archive member only
15637      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
15638      esac
15639    fi
15640    ;;
15641  esac
15642  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
15643printf "%s\n" "$enable_shared" >&6; }
15644
15645  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
15646printf %s "checking whether to build static libraries... " >&6; }
15647  # Make sure either enable_shared or enable_static is yes.
15648  test yes = "$enable_shared" || enable_static=yes
15649  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
15650printf "%s\n" "$enable_static" >&6; }
15651
15652
15653
15654
15655fi
15656ac_ext=c
15657ac_cpp='$CPP $CPPFLAGS'
15658ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15659ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15660ac_compiler_gnu=$ac_cv_c_compiler_gnu
15661
15662CC=$lt_save_CC
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678        ac_config_commands="$ac_config_commands libtool"
15679
15680
15681
15682
15683# Only expand once:
15684
15685
15686
15687
15688# pkg-config is only needed for these options, do not require it otherwise
15689if test "$enable_systemd" = "yes" -o "$enable_dnstap" = "yes" -o "$with_pyunbound" = "yes" -o "$with_pythonmod" = "yes"; then
15690
15691
15692
15693
15694
15695
15696
15697if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
15698	if test -n "$ac_tool_prefix"; then
15699  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15700set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15701{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15702printf %s "checking for $ac_word... " >&6; }
15703if test ${ac_cv_path_PKG_CONFIG+y}
15704then :
15705  printf %s "(cached) " >&6
15706else $as_nop
15707  case $PKG_CONFIG in
15708  [\\/]* | ?:[\\/]*)
15709  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15710  ;;
15711  *)
15712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15713for as_dir in $PATH
15714do
15715  IFS=$as_save_IFS
15716  case $as_dir in #(((
15717    '') as_dir=./ ;;
15718    */) ;;
15719    *) as_dir=$as_dir/ ;;
15720  esac
15721    for ac_exec_ext in '' $ac_executable_extensions; do
15722  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
15723    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
15724    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
15725    break 2
15726  fi
15727done
15728  done
15729IFS=$as_save_IFS
15730
15731  ;;
15732esac
15733fi
15734PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15735if test -n "$PKG_CONFIG"; then
15736  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
15737printf "%s\n" "$PKG_CONFIG" >&6; }
15738else
15739  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15740printf "%s\n" "no" >&6; }
15741fi
15742
15743
15744fi
15745if test -z "$ac_cv_path_PKG_CONFIG"; then
15746  ac_pt_PKG_CONFIG=$PKG_CONFIG
15747  # Extract the first word of "pkg-config", so it can be a program name with args.
15748set dummy pkg-config; ac_word=$2
15749{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15750printf %s "checking for $ac_word... " >&6; }
15751if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
15752then :
15753  printf %s "(cached) " >&6
15754else $as_nop
15755  case $ac_pt_PKG_CONFIG in
15756  [\\/]* | ?:[\\/]*)
15757  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15758  ;;
15759  *)
15760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15761for as_dir in $PATH
15762do
15763  IFS=$as_save_IFS
15764  case $as_dir in #(((
15765    '') as_dir=./ ;;
15766    */) ;;
15767    *) as_dir=$as_dir/ ;;
15768  esac
15769    for ac_exec_ext in '' $ac_executable_extensions; do
15770  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
15771    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
15772    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
15773    break 2
15774  fi
15775done
15776  done
15777IFS=$as_save_IFS
15778
15779  ;;
15780esac
15781fi
15782ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15783if test -n "$ac_pt_PKG_CONFIG"; then
15784  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
15785printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
15786else
15787  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15788printf "%s\n" "no" >&6; }
15789fi
15790
15791  if test "x$ac_pt_PKG_CONFIG" = x; then
15792    PKG_CONFIG=""
15793  else
15794    case $cross_compiling:$ac_tool_warned in
15795yes:)
15796{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
15797printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
15798ac_tool_warned=yes ;;
15799esac
15800    PKG_CONFIG=$ac_pt_PKG_CONFIG
15801  fi
15802else
15803  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15804fi
15805
15806fi
15807if test -n "$PKG_CONFIG"; then
15808	_pkg_min_version=0.9.0
15809	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
15810printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
15811	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
15812		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15813printf "%s\n" "yes" >&6; }
15814	else
15815		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15816printf "%s\n" "no" >&6; }
15817		PKG_CONFIG=""
15818	fi
15819fi
15820fi
15821
15822# Checks for header files.
15823ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default
15824"
15825if test "x$ac_cv_header_stdarg_h" = xyes
15826then :
15827  printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h
15828
15829fi
15830ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default
15831"
15832if test "x$ac_cv_header_stdbool_h" = xyes
15833then :
15834  printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
15835
15836fi
15837ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default
15838"
15839if test "x$ac_cv_header_netinet_in_h" = xyes
15840then :
15841  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
15842
15843fi
15844ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
15845"
15846if test "x$ac_cv_header_netinet_tcp_h" = xyes
15847then :
15848  printf "%s\n" "#define HAVE_NETINET_TCP_H 1" >>confdefs.h
15849
15850fi
15851ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default
15852"
15853if test "x$ac_cv_header_sys_param_h" = xyes
15854then :
15855  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
15856
15857fi
15858ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default
15859"
15860if test "x$ac_cv_header_sys_select_h" = xyes
15861then :
15862  printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
15863
15864fi
15865ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default
15866"
15867if test "x$ac_cv_header_sys_socket_h" = xyes
15868then :
15869  printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
15870
15871fi
15872ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default
15873"
15874if test "x$ac_cv_header_sys_un_h" = xyes
15875then :
15876  printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
15877
15878fi
15879ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default
15880"
15881if test "x$ac_cv_header_sys_uio_h" = xyes
15882then :
15883  printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
15884
15885fi
15886ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default
15887"
15888if test "x$ac_cv_header_sys_resource_h" = xyes
15889then :
15890  printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
15891
15892fi
15893ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default
15894"
15895if test "x$ac_cv_header_arpa_inet_h" = xyes
15896then :
15897  printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h
15898
15899fi
15900ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default
15901"
15902if test "x$ac_cv_header_syslog_h" = xyes
15903then :
15904  printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h
15905
15906fi
15907ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default
15908"
15909if test "x$ac_cv_header_netdb_h" = xyes
15910then :
15911  printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
15912
15913fi
15914ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default
15915"
15916if test "x$ac_cv_header_sys_wait_h" = xyes
15917then :
15918  printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
15919
15920fi
15921ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default
15922"
15923if test "x$ac_cv_header_pwd_h" = xyes
15924then :
15925  printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
15926
15927fi
15928ac_fn_c_check_header_compile "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default
15929"
15930if test "x$ac_cv_header_glob_h" = xyes
15931then :
15932  printf "%s\n" "#define HAVE_GLOB_H 1" >>confdefs.h
15933
15934fi
15935ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default
15936"
15937if test "x$ac_cv_header_grp_h" = xyes
15938then :
15939  printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h
15940
15941fi
15942ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "$ac_includes_default
15943"
15944if test "x$ac_cv_header_login_cap_h" = xyes
15945then :
15946  printf "%s\n" "#define HAVE_LOGIN_CAP_H 1" >>confdefs.h
15947
15948fi
15949ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default
15950"
15951if test "x$ac_cv_header_winsock2_h" = xyes
15952then :
15953  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
15954
15955fi
15956ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default
15957"
15958if test "x$ac_cv_header_ws2tcpip_h" = xyes
15959then :
15960  printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
15961
15962fi
15963ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default
15964"
15965if test "x$ac_cv_header_endian_h" = xyes
15966then :
15967  printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h
15968
15969fi
15970ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default
15971"
15972if test "x$ac_cv_header_sys_endian_h" = xyes
15973then :
15974  printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h
15975
15976fi
15977ac_fn_c_check_header_compile "$LINENO" "libkern/OSByteOrder.h" "ac_cv_header_libkern_OSByteOrder_h" "$ac_includes_default
15978"
15979if test "x$ac_cv_header_libkern_OSByteOrder_h" = xyes
15980then :
15981  printf "%s\n" "#define HAVE_LIBKERN_OSBYTEORDER_H 1" >>confdefs.h
15982
15983fi
15984ac_fn_c_check_header_compile "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default
15985"
15986if test "x$ac_cv_header_sys_ipc_h" = xyes
15987then :
15988  printf "%s\n" "#define HAVE_SYS_IPC_H 1" >>confdefs.h
15989
15990fi
15991ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default
15992"
15993if test "x$ac_cv_header_sys_shm_h" = xyes
15994then :
15995  printf "%s\n" "#define HAVE_SYS_SHM_H 1" >>confdefs.h
15996
15997fi
15998ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
15999"
16000if test "x$ac_cv_header_ifaddrs_h" = xyes
16001then :
16002  printf "%s\n" "#define HAVE_IFADDRS_H 1" >>confdefs.h
16003
16004fi
16005ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default
16006"
16007if test "x$ac_cv_header_poll_h" = xyes
16008then :
16009  printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
16010
16011fi
16012
16013# net/if.h portability for Darwin see:
16014# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html
16015ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
16016#include <stdio.h>
16017#ifdef STDC_HEADERS
16018# include <stdlib.h>
16019# include <stddef.h>
16020#else
16021# ifdef HAVE_STDLIB_H
16022#  include <stdlib.h>
16023# endif
16024#endif
16025#ifdef HAVE_SYS_SOCKET_H
16026# include <sys/socket.h>
16027#endif
16028
16029"
16030if test "x$ac_cv_header_net_if_h" = xyes
16031then :
16032  printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
16033
16034fi
16035
16036
16037# Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH
16038ac_fn_c_check_header_compile "$LINENO" "TargetConditionals.h" "ac_cv_header_TargetConditionals_h" "$ac_includes_default
16039"
16040if test "x$ac_cv_header_TargetConditionals_h" = xyes
16041then :
16042  printf "%s\n" "#define HAVE_TARGETCONDITIONALS_H 1" >>confdefs.h
16043
16044fi
16045
16046ac_fn_c_check_header_compile "$LINENO" "netioapi.h" "ac_cv_header_netioapi_h" "$ac_includes_default
16047#if HAVE_SYS_PARAM_H
16048#include <sys/param.h>
16049#endif
16050
16051#ifdef HAVE_SYS_SOCKET_H
16052#include <sys/socket.h>
16053#endif
16054
16055#ifdef HAVE_SYS_UIO_H
16056#include <sys/uio.h>
16057#endif
16058
16059#ifdef HAVE_NETINET_IN_H
16060#include <netinet/in.h>
16061#endif
16062
16063#ifdef HAVE_NETINET_TCP_H
16064#include <netinet/tcp.h>
16065#endif
16066
16067#ifdef HAVE_ARPA_INET_H
16068#include <arpa/inet.h>
16069#endif
16070
16071#ifdef HAVE_WINSOCK2_H
16072#include <winsock2.h>
16073#endif
16074
16075#ifdef HAVE_WS2TCPIP_H
16076#include <ws2tcpip.h>
16077#endif
16078
16079"
16080if test "x$ac_cv_header_netioapi_h" = xyes
16081then :
16082  printf "%s\n" "#define HAVE_NETIOAPI_H 1" >>confdefs.h
16083
16084fi
16085
16086
16087# Check for Linux timestamping headers
16088ac_fn_c_check_header_compile "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default
16089"
16090if test "x$ac_cv_header_linux_net_tstamp_h" = xyes
16091then :
16092  printf "%s\n" "#define HAVE_LINUX_NET_TSTAMP_H 1" >>confdefs.h
16093
16094fi
16095
16096
16097# check for types.
16098# Using own tests for int64* because autoconf builtin only give 32bit.
16099ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
16100if test "x$ac_cv_type_int8_t" = xyes
16101then :
16102
16103else $as_nop
16104
16105printf "%s\n" "#define int8_t signed char" >>confdefs.h
16106
16107fi
16108
16109ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
16110if test "x$ac_cv_type_int16_t" = xyes
16111then :
16112
16113else $as_nop
16114
16115printf "%s\n" "#define int16_t short" >>confdefs.h
16116
16117fi
16118
16119ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
16120if test "x$ac_cv_type_int32_t" = xyes
16121then :
16122
16123else $as_nop
16124
16125printf "%s\n" "#define int32_t int" >>confdefs.h
16126
16127fi
16128
16129ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
16130if test "x$ac_cv_type_int64_t" = xyes
16131then :
16132
16133else $as_nop
16134
16135printf "%s\n" "#define int64_t long long" >>confdefs.h
16136
16137fi
16138
16139ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
16140if test "x$ac_cv_type_uint8_t" = xyes
16141then :
16142
16143else $as_nop
16144
16145printf "%s\n" "#define uint8_t unsigned char" >>confdefs.h
16146
16147fi
16148
16149ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
16150if test "x$ac_cv_type_uint16_t" = xyes
16151then :
16152
16153else $as_nop
16154
16155printf "%s\n" "#define uint16_t unsigned short" >>confdefs.h
16156
16157fi
16158
16159ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
16160if test "x$ac_cv_type_uint32_t" = xyes
16161then :
16162
16163else $as_nop
16164
16165printf "%s\n" "#define uint32_t unsigned int" >>confdefs.h
16166
16167fi
16168
16169ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
16170if test "x$ac_cv_type_uint64_t" = xyes
16171then :
16172
16173else $as_nop
16174
16175printf "%s\n" "#define uint64_t unsigned long long" >>confdefs.h
16176
16177fi
16178
16179ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
16180if test "x$ac_cv_type_size_t" = xyes
16181then :
16182
16183else $as_nop
16184
16185printf "%s\n" "#define size_t unsigned int" >>confdefs.h
16186
16187fi
16188
16189ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
16190if test "x$ac_cv_type_ssize_t" = xyes
16191then :
16192
16193else $as_nop
16194
16195printf "%s\n" "#define ssize_t int" >>confdefs.h
16196
16197fi
16198
16199ac_ext=c
16200ac_cpp='$CPP $CPPFLAGS'
16201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16203ac_compiler_gnu=$ac_cv_c_compiler_gnu
16204{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
16205printf %s "checking how to run the C preprocessor... " >&6; }
16206# On Suns, sometimes $CPP names a directory.
16207if test -n "$CPP" && test -d "$CPP"; then
16208  CPP=
16209fi
16210if test -z "$CPP"; then
16211  if test ${ac_cv_prog_CPP+y}
16212then :
16213  printf %s "(cached) " >&6
16214else $as_nop
16215      # Double quotes because $CC needs to be expanded
16216    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
16217    do
16218      ac_preproc_ok=false
16219for ac_c_preproc_warn_flag in '' yes
16220do
16221  # Use a header file that comes with gcc, so configuring glibc
16222  # with a fresh cross-compiler works.
16223  # On the NeXT, cc -E runs the code through the compiler's parser,
16224  # not just through cpp. "Syntax error" is here to catch this case.
16225  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16226/* end confdefs.h.  */
16227#include <limits.h>
16228		     Syntax error
16229_ACEOF
16230if ac_fn_c_try_cpp "$LINENO"
16231then :
16232
16233else $as_nop
16234  # Broken: fails on valid input.
16235continue
16236fi
16237rm -f conftest.err conftest.i conftest.$ac_ext
16238
16239  # OK, works on sane cases.  Now check whether nonexistent headers
16240  # can be detected and how.
16241  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16242/* end confdefs.h.  */
16243#include <ac_nonexistent.h>
16244_ACEOF
16245if ac_fn_c_try_cpp "$LINENO"
16246then :
16247  # Broken: success on invalid input.
16248continue
16249else $as_nop
16250  # Passes both tests.
16251ac_preproc_ok=:
16252break
16253fi
16254rm -f conftest.err conftest.i conftest.$ac_ext
16255
16256done
16257# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16258rm -f conftest.i conftest.err conftest.$ac_ext
16259if $ac_preproc_ok
16260then :
16261  break
16262fi
16263
16264    done
16265    ac_cv_prog_CPP=$CPP
16266
16267fi
16268  CPP=$ac_cv_prog_CPP
16269else
16270  ac_cv_prog_CPP=$CPP
16271fi
16272{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
16273printf "%s\n" "$CPP" >&6; }
16274ac_preproc_ok=false
16275for ac_c_preproc_warn_flag in '' yes
16276do
16277  # Use a header file that comes with gcc, so configuring glibc
16278  # with a fresh cross-compiler works.
16279  # On the NeXT, cc -E runs the code through the compiler's parser,
16280  # not just through cpp. "Syntax error" is here to catch this case.
16281  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16282/* end confdefs.h.  */
16283#include <limits.h>
16284		     Syntax error
16285_ACEOF
16286if ac_fn_c_try_cpp "$LINENO"
16287then :
16288
16289else $as_nop
16290  # Broken: fails on valid input.
16291continue
16292fi
16293rm -f conftest.err conftest.i conftest.$ac_ext
16294
16295  # OK, works on sane cases.  Now check whether nonexistent headers
16296  # can be detected and how.
16297  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16298/* end confdefs.h.  */
16299#include <ac_nonexistent.h>
16300_ACEOF
16301if ac_fn_c_try_cpp "$LINENO"
16302then :
16303  # Broken: success on invalid input.
16304continue
16305else $as_nop
16306  # Passes both tests.
16307ac_preproc_ok=:
16308break
16309fi
16310rm -f conftest.err conftest.i conftest.$ac_ext
16311
16312done
16313# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16314rm -f conftest.i conftest.err conftest.$ac_ext
16315if $ac_preproc_ok
16316then :
16317
16318else $as_nop
16319  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16320printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16321as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
16322See \`config.log' for more details" "$LINENO" 5; }
16323fi
16324
16325ac_ext=c
16326ac_cpp='$CPP $CPPFLAGS'
16327ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16328ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16329ac_compiler_gnu=$ac_cv_c_compiler_gnu
16330
16331
16332{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
16333printf %s "checking for uid_t in sys/types.h... " >&6; }
16334if test ${ac_cv_type_uid_t+y}
16335then :
16336  printf %s "(cached) " >&6
16337else $as_nop
16338  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16339/* end confdefs.h.  */
16340#include <sys/types.h>
16341
16342_ACEOF
16343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16344  $EGREP "uid_t" >/dev/null 2>&1
16345then :
16346  ac_cv_type_uid_t=yes
16347else $as_nop
16348  ac_cv_type_uid_t=no
16349fi
16350rm -rf conftest*
16351
16352fi
16353{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
16354printf "%s\n" "$ac_cv_type_uid_t" >&6; }
16355if test $ac_cv_type_uid_t = no; then
16356
16357printf "%s\n" "#define uid_t int" >>confdefs.h
16358
16359
16360printf "%s\n" "#define gid_t int" >>confdefs.h
16361
16362fi
16363
16364
16365  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
16366"
16367if test "x$ac_cv_type_pid_t" = xyes
16368then :
16369
16370else $as_nop
16371                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16372/* end confdefs.h.  */
16373
16374          #if defined _WIN64 && !defined __CYGWIN__
16375          LLP64
16376          #endif
16377
16378int
16379main (void)
16380{
16381
16382  ;
16383  return 0;
16384}
16385
16386_ACEOF
16387if ac_fn_c_try_compile "$LINENO"
16388then :
16389  ac_pid_type='int'
16390else $as_nop
16391  ac_pid_type='__int64'
16392fi
16393rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16394
16395printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
16396
16397
16398fi
16399
16400
16401ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
16402if test "x$ac_cv_type_off_t" = xyes
16403then :
16404
16405else $as_nop
16406
16407printf "%s\n" "#define off_t long int" >>confdefs.h
16408
16409fi
16410
16411ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
16412$ac_includes_default
16413#ifdef HAVE_WINSOCK2_H
16414#  include <winsock2.h>
16415#endif
16416
16417"
16418if test "x$ac_cv_type_u_char" = xyes
16419then :
16420
16421else $as_nop
16422
16423printf "%s\n" "#define u_char unsigned char" >>confdefs.h
16424
16425fi
16426
16427ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
16428$ac_includes_default
16429#ifdef HAVE_SYS_RESOURCE_H
16430#  include <sys/resource.h>
16431#endif
16432
16433"
16434if test "x$ac_cv_type_rlim_t" = xyes
16435then :
16436
16437else $as_nop
16438
16439printf "%s\n" "#define rlim_t unsigned long" >>confdefs.h
16440
16441fi
16442
16443
16444ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
16445$ac_includes_default
16446#ifdef HAVE_SYS_SOCKET_H
16447#  include <sys/socket.h>
16448#endif
16449#ifdef HAVE_WS2TCPIP_H
16450#  include <ws2tcpip.h>
16451#endif
16452
16453"
16454if test "x$ac_cv_type_socklen_t" = xyes
16455then :
16456
16457else $as_nop
16458
16459printf "%s\n" "#define socklen_t int" >>confdefs.h
16460
16461fi
16462
16463 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
16464$ac_includes_default
16465#ifdef HAVE_SYS_TYPES_H
16466# include <sys/types.h>
16467#endif
16468#ifdef HAVE_NETINET_IN_H
16469# include <netinet/in.h>
16470#endif
16471
16472"
16473if test "x$ac_cv_type_in_addr_t" = xyes
16474then :
16475
16476else $as_nop
16477
16478printf "%s\n" "#define in_addr_t uint32_t" >>confdefs.h
16479
16480fi
16481
16482 ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
16483$ac_includes_default
16484#ifdef HAVE_SYS_TYPES_H
16485# include <sys/types.h>
16486#endif
16487#ifdef HAVE_NETINET_IN_H
16488# include <netinet/in.h>
16489#endif
16490
16491"
16492if test "x$ac_cv_type_in_port_t" = xyes
16493then :
16494
16495else $as_nop
16496
16497printf "%s\n" "#define in_port_t uint16_t" >>confdefs.h
16498
16499fi
16500
16501{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
16502printf %s "checking if memcmp compares unsigned... " >&6; }
16503if test "$cross_compiling" = yes
16504then :
16505   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
16506printf "%s\n" "cross-compile no" >&6; }
16507
16508printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
16509
16510  case " $LIBOBJS " in
16511  *" memcmp.$ac_objext "* ) ;;
16512  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
16513 ;;
16514esac
16515
16516
16517else $as_nop
16518  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16519/* end confdefs.h.  */
16520
16521#include <stdio.h>
16522#include <stdlib.h>
16523#include <string.h>
16524int main(void)
16525{
16526	char a = 255, b = 0;
16527	if(memcmp(&a, &b, 1) < 0)
16528		return 1;
16529	return 0;
16530}
16531
16532_ACEOF
16533if ac_fn_c_try_run "$LINENO"
16534then :
16535  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16536printf "%s\n" "yes" >&6; }
16537else $as_nop
16538   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16539printf "%s\n" "no" >&6; }
16540
16541printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
16542
16543  case " $LIBOBJS " in
16544  *" memcmp.$ac_objext "* ) ;;
16545  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
16546 ;;
16547esac
16548
16549
16550fi
16551rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16552  conftest.$ac_objext conftest.beam conftest.$ac_ext
16553fi
16554
16555
16556# The cast to long int works around a bug in the HP C Compiler
16557# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16558# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16559# This bug is HP SR number 8606223364.
16560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
16561printf %s "checking size of time_t... " >&6; }
16562if test ${ac_cv_sizeof_time_t+y}
16563then :
16564  printf %s "(cached) " >&6
16565else $as_nop
16566  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
16567$ac_includes_default
16568#ifdef TIME_WITH_SYS_TIME
16569# include <sys/time.h>
16570# include <time.h>
16571#else
16572# ifdef HAVE_SYS_TIME_H
16573#  include <sys/time.h>
16574# else
16575#  include <time.h>
16576# endif
16577#endif
16578
16579"
16580then :
16581
16582else $as_nop
16583  if test "$ac_cv_type_time_t" = yes; then
16584     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16585printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16586as_fn_error 77 "cannot compute sizeof (time_t)
16587See \`config.log' for more details" "$LINENO" 5; }
16588   else
16589     ac_cv_sizeof_time_t=0
16590   fi
16591fi
16592
16593fi
16594{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
16595printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
16596
16597
16598
16599printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
16600
16601
16602# The cast to long int works around a bug in the HP C Compiler
16603# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16604# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16605# This bug is HP SR number 8606223364.
16606{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16607printf %s "checking size of size_t... " >&6; }
16608if test ${ac_cv_sizeof_size_t+y}
16609then :
16610  printf %s "(cached) " >&6
16611else $as_nop
16612  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"
16613then :
16614
16615else $as_nop
16616  if test "$ac_cv_type_size_t" = yes; then
16617     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16618printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16619as_fn_error 77 "cannot compute sizeof (size_t)
16620See \`config.log' for more details" "$LINENO" 5; }
16621   else
16622     ac_cv_sizeof_size_t=0
16623   fi
16624fi
16625
16626fi
16627{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16628printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
16629
16630
16631
16632printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
16633
16634
16635
16636# add option to disable the evil rpath
16637
16638# Check whether --enable-rpath was given.
16639if test ${enable_rpath+y}
16640then :
16641  enableval=$enable_rpath; enable_rpath=$enableval
16642else $as_nop
16643  enable_rpath=yes
16644fi
16645
16646if test "x$enable_rpath" = xno; then
16647		ac_config_commands="$ac_config_commands disable-rpath"
16648
16649fi
16650
16651
16652
16653# check to see if libraries are needed for these functions.
16654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
16655printf %s "checking for library containing inet_pton... " >&6; }
16656if test ${ac_cv_search_inet_pton+y}
16657then :
16658  printf %s "(cached) " >&6
16659else $as_nop
16660  ac_func_search_save_LIBS=$LIBS
16661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16662/* end confdefs.h.  */
16663
16664/* Override any GCC internal prototype to avoid an error.
16665   Use char because int might match the return type of a GCC
16666   builtin and then its argument prototype would still apply.  */
16667char inet_pton ();
16668int
16669main (void)
16670{
16671return inet_pton ();
16672  ;
16673  return 0;
16674}
16675_ACEOF
16676for ac_lib in '' nsl
16677do
16678  if test -z "$ac_lib"; then
16679    ac_res="none required"
16680  else
16681    ac_res=-l$ac_lib
16682    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16683  fi
16684  if ac_fn_c_try_link "$LINENO"
16685then :
16686  ac_cv_search_inet_pton=$ac_res
16687fi
16688rm -f core conftest.err conftest.$ac_objext conftest.beam \
16689    conftest$ac_exeext
16690  if test ${ac_cv_search_inet_pton+y}
16691then :
16692  break
16693fi
16694done
16695if test ${ac_cv_search_inet_pton+y}
16696then :
16697
16698else $as_nop
16699  ac_cv_search_inet_pton=no
16700fi
16701rm conftest.$ac_ext
16702LIBS=$ac_func_search_save_LIBS
16703fi
16704{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
16705printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
16706ac_res=$ac_cv_search_inet_pton
16707if test "$ac_res" != no
16708then :
16709  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16710
16711fi
16712
16713{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
16714printf %s "checking for library containing socket... " >&6; }
16715if test ${ac_cv_search_socket+y}
16716then :
16717  printf %s "(cached) " >&6
16718else $as_nop
16719  ac_func_search_save_LIBS=$LIBS
16720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16721/* end confdefs.h.  */
16722
16723/* Override any GCC internal prototype to avoid an error.
16724   Use char because int might match the return type of a GCC
16725   builtin and then its argument prototype would still apply.  */
16726char socket ();
16727int
16728main (void)
16729{
16730return socket ();
16731  ;
16732  return 0;
16733}
16734_ACEOF
16735for ac_lib in '' socket
16736do
16737  if test -z "$ac_lib"; then
16738    ac_res="none required"
16739  else
16740    ac_res=-l$ac_lib
16741    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16742  fi
16743  if ac_fn_c_try_link "$LINENO"
16744then :
16745  ac_cv_search_socket=$ac_res
16746fi
16747rm -f core conftest.err conftest.$ac_objext conftest.beam \
16748    conftest$ac_exeext
16749  if test ${ac_cv_search_socket+y}
16750then :
16751  break
16752fi
16753done
16754if test ${ac_cv_search_socket+y}
16755then :
16756
16757else $as_nop
16758  ac_cv_search_socket=no
16759fi
16760rm conftest.$ac_ext
16761LIBS=$ac_func_search_save_LIBS
16762fi
16763{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
16764printf "%s\n" "$ac_cv_search_socket" >&6; }
16765ac_res=$ac_cv_search_socket
16766if test "$ac_res" != no
16767then :
16768  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16769
16770fi
16771
16772
16773# check whether strptime also works
16774
16775# check some functions of the OS before linking libs (while still runnable).
16776{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
16777printf %s "checking for working chown... " >&6; }
16778if test ${ac_cv_func_chown_works+y}
16779then :
16780  printf %s "(cached) " >&6
16781else $as_nop
16782  if test "$cross_compiling" = yes
16783then :
16784  case "$host_os" in # ((
16785			  # Guess yes on glibc systems.
16786		  *-gnu*) ac_cv_func_chown_works=yes ;;
16787			  # If we don't know, assume the worst.
16788		  *)      ac_cv_func_chown_works=no ;;
16789		esac
16790else $as_nop
16791  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16792/* end confdefs.h.  */
16793$ac_includes_default
16794#include <fcntl.h>
16795
16796int
16797main (void)
16798{
16799  char *f = "conftest.chown";
16800  struct stat before, after;
16801
16802  if (creat (f, 0600) < 0)
16803    return 1;
16804  if (stat (f, &before) < 0)
16805    return 1;
16806  if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
16807    return 1;
16808  if (stat (f, &after) < 0)
16809    return 1;
16810  return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
16811
16812  ;
16813  return 0;
16814}
16815_ACEOF
16816if ac_fn_c_try_run "$LINENO"
16817then :
16818  ac_cv_func_chown_works=yes
16819else $as_nop
16820  ac_cv_func_chown_works=no
16821fi
16822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16823  conftest.$ac_objext conftest.beam conftest.$ac_ext
16824fi
16825
16826rm -f conftest.chown
16827
16828fi
16829{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
16830printf "%s\n" "$ac_cv_func_chown_works" >&6; }
16831if test $ac_cv_func_chown_works = yes; then
16832
16833printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
16834
16835fi
16836
16837
16838ac_func=
16839for ac_item in $ac_func_c_list
16840do
16841  if test $ac_func; then
16842    ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
16843    if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
16844      echo "#define $ac_item 1" >> confdefs.h
16845    fi
16846    ac_func=
16847  else
16848    ac_func=$ac_item
16849  fi
16850done
16851
16852
16853
16854if test "x$ac_cv_func_fork" = xyes; then
16855  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
16856printf %s "checking for working fork... " >&6; }
16857if test ${ac_cv_func_fork_works+y}
16858then :
16859  printf %s "(cached) " >&6
16860else $as_nop
16861  if test "$cross_compiling" = yes
16862then :
16863  ac_cv_func_fork_works=cross
16864else $as_nop
16865  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16866/* end confdefs.h.  */
16867$ac_includes_default
16868int
16869main (void)
16870{
16871
16872	  /* By Ruediger Kuhlmann. */
16873	  return fork () < 0;
16874
16875  ;
16876  return 0;
16877}
16878_ACEOF
16879if ac_fn_c_try_run "$LINENO"
16880then :
16881  ac_cv_func_fork_works=yes
16882else $as_nop
16883  ac_cv_func_fork_works=no
16884fi
16885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16886  conftest.$ac_objext conftest.beam conftest.$ac_ext
16887fi
16888
16889fi
16890{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
16891printf "%s\n" "$ac_cv_func_fork_works" >&6; }
16892
16893else
16894  ac_cv_func_fork_works=$ac_cv_func_fork
16895fi
16896if test "x$ac_cv_func_fork_works" = xcross; then
16897  case $host in
16898    *-*-amigaos* | *-*-msdosdjgpp*)
16899      # Override, as these systems have only a dummy fork() stub
16900      ac_cv_func_fork_works=no
16901      ;;
16902    *)
16903      ac_cv_func_fork_works=yes
16904      ;;
16905  esac
16906  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
16907printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
16908fi
16909ac_cv_func_vfork_works=$ac_cv_func_vfork
16910if test "x$ac_cv_func_vfork" = xyes; then
16911  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
16912printf %s "checking for working vfork... " >&6; }
16913if test ${ac_cv_func_vfork_works+y}
16914then :
16915  printf %s "(cached) " >&6
16916else $as_nop
16917  if test "$cross_compiling" = yes
16918then :
16919  ac_cv_func_vfork_works=cross
16920else $as_nop
16921  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16922/* end confdefs.h.  */
16923/* Thanks to Paul Eggert for this test.  */
16924$ac_includes_default
16925#include <signal.h>
16926#include <sys/wait.h>
16927#ifdef HAVE_VFORK_H
16928# include <vfork.h>
16929#endif
16930
16931static void
16932do_nothing (int sig)
16933{
16934  (void) sig;
16935}
16936
16937/* On some sparc systems, changes by the child to local and incoming
16938   argument registers are propagated back to the parent.  The compiler
16939   is told about this with #include <vfork.h>, but some compilers
16940   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
16941   static variable whose address is put into a register that is
16942   clobbered by the vfork.  */
16943static void
16944sparc_address_test (int arg)
16945{
16946  static pid_t child;
16947  if (!child) {
16948    child = vfork ();
16949    if (child < 0) {
16950      perror ("vfork");
16951      _exit(2);
16952    }
16953    if (!child) {
16954      arg = getpid();
16955      write(-1, "", 0);
16956      _exit (arg);
16957    }
16958  }
16959}
16960
16961int
16962main (void)
16963{
16964  pid_t parent = getpid ();
16965  pid_t child;
16966
16967  sparc_address_test (0);
16968
16969  /* On Solaris 2.4, changes by the child to the signal handler
16970     also munge signal handlers in the parent.  To detect this,
16971     start by putting the parent's handler in a known state.  */
16972  signal (SIGTERM, SIG_DFL);
16973
16974  child = vfork ();
16975
16976  if (child == 0) {
16977    /* Here is another test for sparc vfork register problems.  This
16978       test uses lots of local variables, at least as many local
16979       variables as main has allocated so far including compiler
16980       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16981       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16982       reuse the register of parent for one of the local variables,
16983       since it will think that parent can't possibly be used any more
16984       in this routine.  Assigning to the local variable will thus
16985       munge parent in the parent process.  */
16986    pid_t
16987      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16988      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16989    /* Convince the compiler that p..p7 are live; otherwise, it might
16990       use the same hardware register for all 8 local variables.  */
16991    if (p != p1 || p != p2 || p != p3 || p != p4
16992	|| p != p5 || p != p6 || p != p7)
16993      _exit(1);
16994
16995    /* Alter the child's signal handler.  */
16996    if (signal (SIGTERM, do_nothing) != SIG_DFL)
16997      _exit(1);
16998
16999    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17000       from child file descriptors.  If the child closes a descriptor
17001       before it execs or exits, this munges the parent's descriptor
17002       as well.  Test for this by closing stdout in the child.  */
17003    _exit(close(fileno(stdout)) != 0);
17004  } else {
17005    int status;
17006    struct stat st;
17007
17008    while (wait(&status) != child)
17009      ;
17010    return (
17011	 /* Was there some problem with vforking?  */
17012	 child < 0
17013
17014	 /* Did the child munge the parent's signal handler?  */
17015	 || signal (SIGTERM, SIG_DFL) != SIG_DFL
17016
17017	 /* Did the child fail?  (This shouldn't happen.)  */
17018	 || status
17019
17020	 /* Did the vfork/compiler bug occur?  */
17021	 || parent != getpid()
17022
17023	 /* Did the file descriptor bug occur?  */
17024	 || fstat(fileno(stdout), &st) != 0
17025	 );
17026  }
17027}
17028_ACEOF
17029if ac_fn_c_try_run "$LINENO"
17030then :
17031  ac_cv_func_vfork_works=yes
17032else $as_nop
17033  ac_cv_func_vfork_works=no
17034fi
17035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17036  conftest.$ac_objext conftest.beam conftest.$ac_ext
17037fi
17038
17039fi
17040{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
17041printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
17042
17043fi;
17044if test "x$ac_cv_func_fork_works" = xcross; then
17045  ac_cv_func_vfork_works=$ac_cv_func_vfork
17046  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
17047printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
17048fi
17049
17050if test "x$ac_cv_func_vfork_works" = xyes; then
17051
17052printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
17053
17054else
17055
17056printf "%s\n" "#define vfork fork" >>confdefs.h
17057
17058fi
17059if test "x$ac_cv_func_fork_works" = xyes; then
17060
17061printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
17062
17063fi
17064
17065
17066printf "%s\n" "#define RETSIGTYPE void" >>confdefs.h
17067
17068{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
17069printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
17070if test ${ac_cv_sys_largefile_source+y}
17071then :
17072  printf %s "(cached) " >&6
17073else $as_nop
17074  while :; do
17075  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17076/* end confdefs.h.  */
17077#include <sys/types.h> /* for off_t */
17078     #include <stdio.h>
17079int
17080main (void)
17081{
17082int (*fp) (FILE *, off_t, int) = fseeko;
17083     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
17084  ;
17085  return 0;
17086}
17087_ACEOF
17088if ac_fn_c_try_link "$LINENO"
17089then :
17090  ac_cv_sys_largefile_source=no; break
17091fi
17092rm -f core conftest.err conftest.$ac_objext conftest.beam \
17093    conftest$ac_exeext conftest.$ac_ext
17094  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17095/* end confdefs.h.  */
17096#define _LARGEFILE_SOURCE 1
17097#include <sys/types.h> /* for off_t */
17098     #include <stdio.h>
17099int
17100main (void)
17101{
17102int (*fp) (FILE *, off_t, int) = fseeko;
17103     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
17104  ;
17105  return 0;
17106}
17107_ACEOF
17108if ac_fn_c_try_link "$LINENO"
17109then :
17110  ac_cv_sys_largefile_source=1; break
17111fi
17112rm -f core conftest.err conftest.$ac_objext conftest.beam \
17113    conftest$ac_exeext conftest.$ac_ext
17114  ac_cv_sys_largefile_source=unknown
17115  break
17116done
17117fi
17118{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
17119printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
17120case $ac_cv_sys_largefile_source in #(
17121  no | unknown) ;;
17122  *)
17123printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
17124;;
17125esac
17126rm -rf conftest*
17127
17128# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
17129# in glibc 2.1.3, but that breaks too many other things.
17130# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
17131if test $ac_cv_sys_largefile_source != unknown; then
17132
17133printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
17134
17135fi
17136
17137
17138# Check whether --enable-largefile was given.
17139if test ${enable_largefile+y}
17140then :
17141  enableval=$enable_largefile;
17142fi
17143
17144if test "$enable_largefile" != no; then
17145
17146  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
17147printf %s "checking for special C compiler options needed for large files... " >&6; }
17148if test ${ac_cv_sys_largefile_CC+y}
17149then :
17150  printf %s "(cached) " >&6
17151else $as_nop
17152  ac_cv_sys_largefile_CC=no
17153     if test "$GCC" != yes; then
17154       ac_save_CC=$CC
17155       while :; do
17156	 # IRIX 6.2 and later do not support large files by default,
17157	 # so use the C compiler's -n32 option if that helps.
17158	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17159/* end confdefs.h.  */
17160#include <sys/types.h>
17161 /* Check that off_t can represent 2**63 - 1 correctly.
17162    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17163    since some C++ compilers masquerading as C compilers
17164    incorrectly reject 9223372036854775807.  */
17165#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17166  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17167		       && LARGE_OFF_T % 2147483647 == 1)
17168		      ? 1 : -1];
17169int
17170main (void)
17171{
17172
17173  ;
17174  return 0;
17175}
17176_ACEOF
17177	 if ac_fn_c_try_compile "$LINENO"
17178then :
17179  break
17180fi
17181rm -f core conftest.err conftest.$ac_objext conftest.beam
17182	 CC="$CC -n32"
17183	 if ac_fn_c_try_compile "$LINENO"
17184then :
17185  ac_cv_sys_largefile_CC=' -n32'; break
17186fi
17187rm -f core conftest.err conftest.$ac_objext conftest.beam
17188	 break
17189       done
17190       CC=$ac_save_CC
17191       rm -f conftest.$ac_ext
17192    fi
17193fi
17194{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
17195printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
17196  if test "$ac_cv_sys_largefile_CC" != no; then
17197    CC=$CC$ac_cv_sys_largefile_CC
17198  fi
17199
17200  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
17201printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
17202if test ${ac_cv_sys_file_offset_bits+y}
17203then :
17204  printf %s "(cached) " >&6
17205else $as_nop
17206  while :; do
17207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17208/* end confdefs.h.  */
17209#include <sys/types.h>
17210 /* Check that off_t can represent 2**63 - 1 correctly.
17211    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17212    since some C++ compilers masquerading as C compilers
17213    incorrectly reject 9223372036854775807.  */
17214#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17215  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17216		       && LARGE_OFF_T % 2147483647 == 1)
17217		      ? 1 : -1];
17218int
17219main (void)
17220{
17221
17222  ;
17223  return 0;
17224}
17225_ACEOF
17226if ac_fn_c_try_compile "$LINENO"
17227then :
17228  ac_cv_sys_file_offset_bits=no; break
17229fi
17230rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17231  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17232/* end confdefs.h.  */
17233#define _FILE_OFFSET_BITS 64
17234#include <sys/types.h>
17235 /* Check that off_t can represent 2**63 - 1 correctly.
17236    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17237    since some C++ compilers masquerading as C compilers
17238    incorrectly reject 9223372036854775807.  */
17239#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17240  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17241		       && LARGE_OFF_T % 2147483647 == 1)
17242		      ? 1 : -1];
17243int
17244main (void)
17245{
17246
17247  ;
17248  return 0;
17249}
17250_ACEOF
17251if ac_fn_c_try_compile "$LINENO"
17252then :
17253  ac_cv_sys_file_offset_bits=64; break
17254fi
17255rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17256  ac_cv_sys_file_offset_bits=unknown
17257  break
17258done
17259fi
17260{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
17261printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
17262case $ac_cv_sys_file_offset_bits in #(
17263  no | unknown) ;;
17264  *)
17265printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
17266;;
17267esac
17268rm -rf conftest*
17269  if test $ac_cv_sys_file_offset_bits = unknown; then
17270    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
17271printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
17272if test ${ac_cv_sys_large_files+y}
17273then :
17274  printf %s "(cached) " >&6
17275else $as_nop
17276  while :; do
17277  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17278/* end confdefs.h.  */
17279#include <sys/types.h>
17280 /* Check that off_t can represent 2**63 - 1 correctly.
17281    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17282    since some C++ compilers masquerading as C compilers
17283    incorrectly reject 9223372036854775807.  */
17284#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17285  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17286		       && LARGE_OFF_T % 2147483647 == 1)
17287		      ? 1 : -1];
17288int
17289main (void)
17290{
17291
17292  ;
17293  return 0;
17294}
17295_ACEOF
17296if ac_fn_c_try_compile "$LINENO"
17297then :
17298  ac_cv_sys_large_files=no; break
17299fi
17300rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17301  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17302/* end confdefs.h.  */
17303#define _LARGE_FILES 1
17304#include <sys/types.h>
17305 /* Check that off_t can represent 2**63 - 1 correctly.
17306    We can't simply define LARGE_OFF_T to be 9223372036854775807,
17307    since some C++ compilers masquerading as C compilers
17308    incorrectly reject 9223372036854775807.  */
17309#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
17310  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17311		       && LARGE_OFF_T % 2147483647 == 1)
17312		      ? 1 : -1];
17313int
17314main (void)
17315{
17316
17317  ;
17318  return 0;
17319}
17320_ACEOF
17321if ac_fn_c_try_compile "$LINENO"
17322then :
17323  ac_cv_sys_large_files=1; break
17324fi
17325rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17326  ac_cv_sys_large_files=unknown
17327  break
17328done
17329fi
17330{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
17331printf "%s\n" "$ac_cv_sys_large_files" >&6; }
17332case $ac_cv_sys_large_files in #(
17333  no | unknown) ;;
17334  *)
17335printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
17336;;
17337esac
17338rm -rf conftest*
17339  fi
17340fi
17341
17342
17343
17344
17345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
17346printf %s "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
17347cache=_D_LARGEFILE_SOURCE_1
17348if eval test \${cv_prog_cc_flag_needed_$cache+y}
17349then :
17350  printf %s "(cached) " >&6
17351else $as_nop
17352
17353echo '
17354#include <stdio.h>
17355int test(void) {
17356        int a = fseeko(stdin, 0, 0);
17357        return a;
17358}
17359' > conftest.c
17360echo 'void f(void){}' >>conftest.c
17361if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
17362eval "cv_prog_cc_flag_needed_$cache=no"
17363else
17364
17365if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
17366eval "cv_prog_cc_flag_needed_$cache=yes"
17367else
17368eval "cv_prog_cc_flag_needed_$cache=fail"
17369#echo 'Test with flag fails too!'
17370#cat conftest.c
17371#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
17372#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
17373#exit 1
17374fi
17375
17376fi
17377rm -f conftest conftest.c conftest.o
17378
17379fi
17380
17381if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
17382{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17383printf "%s\n" "yes" >&6; }
17384:
17385CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
17386else
17387if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
17388{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17389printf "%s\n" "no" >&6; }
17390#echo 'Test with flag is no!'
17391#cat conftest.c
17392#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
17393#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
17394#exit 1
17395:
17396
17397else
17398{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
17399printf "%s\n" "failed" >&6; }
17400:
17401
17402fi
17403fi
17404
17405
17406
17407{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
17408printf %s "checking if nonblocking sockets work... " >&6; }
17409if echo $host | grep mingw >/dev/null; then
17410	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
17411printf "%s\n" "no (windows)" >&6; }
17412
17413printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
17414
17415else
17416if test "$cross_compiling" = yes
17417then :
17418
17419	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
17420printf "%s\n" "crosscompile(yes)" >&6; }
17421
17422else $as_nop
17423  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17424/* end confdefs.h.  */
17425
17426
17427#include <stdio.h>
17428#include <string.h>
17429#include <stdlib.h>
17430#include <fcntl.h>
17431#include <errno.h>
17432#ifdef HAVE_SYS_TYPES_H
17433#include <sys/types.h>
17434#endif
17435#ifdef HAVE_SYS_SELECT_H
17436#include <sys/select.h>
17437#endif
17438#ifdef HAVE_SYS_SOCKET_H
17439#include <sys/socket.h>
17440#endif
17441#ifdef HAVE_NETINET_IN_H
17442#include <netinet/in.h>
17443#endif
17444#ifdef HAVE_ARPA_INET_H
17445#include <arpa/inet.h>
17446#endif
17447#ifdef HAVE_UNISTD_H
17448#include <unistd.h>
17449#endif
17450#ifdef HAVE_TIME_H
17451#include <time.h>
17452#endif
17453
17454int main(void)
17455{
17456	int port;
17457	int sfd, cfd;
17458	int num = 10;
17459	int i, p;
17460	struct sockaddr_in a;
17461	/* test if select and nonblocking reads work well together */
17462	/* open port.
17463	   fork child to send 10 messages.
17464	   select to read.
17465	   then try to nonblocking read the 10 messages
17466	   then, nonblocking read must give EAGAIN
17467	*/
17468
17469	port = 12345 + (time(0)%32);
17470	sfd = socket(PF_INET, SOCK_DGRAM, 0);
17471	if(sfd == -1) {
17472		perror("socket");
17473		return 1;
17474	}
17475	memset(&a, 0, sizeof(a));
17476	a.sin_family = AF_INET;
17477	a.sin_port = htons(port);
17478	a.sin_addr.s_addr = inet_addr("127.0.0.1");
17479	if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
17480		perror("bind");
17481		return 1;
17482	}
17483	if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
17484		perror("fcntl");
17485		return 1;
17486	}
17487
17488	cfd = socket(PF_INET, SOCK_DGRAM, 0);
17489	if(cfd == -1) {
17490		perror("client socket");
17491		return 1;
17492	}
17493	a.sin_port = 0;
17494	if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
17495		perror("client bind");
17496		return 1;
17497	}
17498	a.sin_port = htons(port);
17499
17500	/* no handler, causes exit in 10 seconds */
17501	alarm(10);
17502
17503	/* send and receive on the socket */
17504	if((p=fork()) == 0) {
17505		for(i=0; i<num; i++) {
17506			if(sendto(cfd, &i, sizeof(i), 0,
17507				(struct sockaddr*)&a, sizeof(a)) < 0) {
17508				perror("sendto");
17509				return 1;
17510			}
17511		}
17512	} else {
17513		/* parent */
17514		fd_set rset;
17515		int x;
17516		if(p == -1) {
17517			perror("fork");
17518			return 1;
17519		}
17520		FD_ZERO(&rset);
17521		FD_SET(sfd, &rset);
17522		if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
17523			perror("select");
17524			return 1;
17525		}
17526		i = 0;
17527		while(i < num) {
17528			if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
17529				if(errno == EAGAIN)
17530					continue;
17531				perror("recv");
17532				return 1;
17533			}
17534			i++;
17535		}
17536		/* now we want to get EAGAIN: nonblocking goodness */
17537		errno = 0;
17538		recv(sfd, &x, sizeof(x), 0);
17539		if(errno != EAGAIN) {
17540			perror("trying to recv again");
17541			return 1;
17542		}
17543		/* EAGAIN encountered */
17544	}
17545
17546	close(sfd);
17547	close(cfd);
17548	return 0;
17549}
17550
17551_ACEOF
17552if ac_fn_c_try_run "$LINENO"
17553then :
17554
17555	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17556printf "%s\n" "yes" >&6; }
17557
17558else $as_nop
17559
17560	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17561printf "%s\n" "no" >&6; }
17562
17563printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
17564
17565
17566fi
17567rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17568  conftest.$ac_objext conftest.beam conftest.$ac_ext
17569fi
17570
17571fi
17572
17573
17574{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
17575printf %s "checking whether mkdir has one arg... " >&6; }
17576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17577/* end confdefs.h.  */
17578
17579#include <stdio.h>
17580#include <unistd.h>
17581#ifdef HAVE_WINSOCK2_H
17582#include <winsock2.h>
17583#endif
17584#ifdef HAVE_SYS_STAT_H
17585#include <sys/stat.h>
17586#endif
17587
17588int
17589main (void)
17590{
17591
17592	(void)mkdir("directory");
17593
17594  ;
17595  return 0;
17596}
17597_ACEOF
17598if ac_fn_c_try_compile "$LINENO"
17599then :
17600  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17601printf "%s\n" "yes" >&6; }
17602
17603printf "%s\n" "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
17604
17605
17606else $as_nop
17607  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17608printf "%s\n" "no" >&6; }
17609
17610fi
17611rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17612
17613
17614  for ac_func in strptime
17615do :
17616  ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
17617if test "x$ac_cv_func_strptime" = xyes
17618then :
17619  printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
17620
17621{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
17622printf %s "checking whether strptime works... " >&6; }
17623if test c${cross_compiling} = cno; then
17624if test "$cross_compiling" = yes
17625then :
17626  eval "ac_cv_c_strptime_works=maybe"
17627else $as_nop
17628  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17629/* end confdefs.h.  */
17630
17631#define _XOPEN_SOURCE 600
17632#include <time.h>
17633int main(void) { struct tm tm; char *res;
17634res = 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);
17635if (!res) return 2;
17636res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
17637if (!res) return 1; return 0; }
17638
17639_ACEOF
17640if ac_fn_c_try_run "$LINENO"
17641then :
17642  eval "ac_cv_c_strptime_works=yes"
17643else $as_nop
17644  eval "ac_cv_c_strptime_works=no"
17645fi
17646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17647  conftest.$ac_objext conftest.beam conftest.$ac_ext
17648fi
17649
17650else
17651eval "ac_cv_c_strptime_works=maybe"
17652fi
17653{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
17654printf "%s\n" "$ac_cv_c_strptime_works" >&6; }
17655if test $ac_cv_c_strptime_works = no; then
17656case " $LIBOBJS " in
17657  *" strptime.$ac_objext "* ) ;;
17658  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
17659 ;;
17660esac
17661
17662else
17663
17664printf "%s\n" "#define STRPTIME_WORKS 1" >>confdefs.h
17665
17666fi
17667
17668else $as_nop
17669  case " $LIBOBJS " in
17670  *" strptime.$ac_objext "* ) ;;
17671  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
17672 ;;
17673esac
17674
17675fi
17676
17677done
17678
17679# check if we can use SO_REUSEPORT
17680reuseport_default=0
17681if echo "$host" | $GREP -i -e linux >/dev/null; then reuseport_default=1; fi
17682if echo "$host" | $GREP -i -e dragonfly >/dev/null; then reuseport_default=1; fi
17683if test "$reuseport_default" = 1; then
17684
17685printf "%s\n" "#define REUSEPORT_DEFAULT 1" >>confdefs.h
17686
17687else
17688
17689printf "%s\n" "#define REUSEPORT_DEFAULT 0" >>confdefs.h
17690
17691fi
17692
17693# Include systemd.m4 - begin
17694#   macros for configuring systemd
17695#   Copyright 2015, Sami Kerola, CloudFlare.
17696#   BSD licensed.
17697# Check whether --enable-systemd was given.
17698if test ${enable_systemd+y}
17699then :
17700  enableval=$enable_systemd;
17701else $as_nop
17702  enable_systemd=no
17703fi
17704
17705have_systemd=no
17706if test "x$enable_systemd" != xno
17707then :
17708
17709    if test -n "$PKG_CONFIG"; then
17710		have_systemd=no
17711
17712pkg_failed=no
17713{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
17714printf %s "checking for SYSTEMD... " >&6; }
17715
17716if test -n "$SYSTEMD_CFLAGS"; then
17717    pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
17718 elif test -n "$PKG_CONFIG"; then
17719    if test -n "$PKG_CONFIG" && \
17720    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
17721  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
17722  ac_status=$?
17723  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17724  test $ac_status = 0; }; then
17725  pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
17726		      test "x$?" != "x0" && pkg_failed=yes
17727else
17728  pkg_failed=yes
17729fi
17730 else
17731    pkg_failed=untried
17732fi
17733if test -n "$SYSTEMD_LIBS"; then
17734    pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
17735 elif test -n "$PKG_CONFIG"; then
17736    if test -n "$PKG_CONFIG" && \
17737    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
17738  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
17739  ac_status=$?
17740  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17741  test $ac_status = 0; }; then
17742  pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
17743		      test "x$?" != "x0" && pkg_failed=yes
17744else
17745  pkg_failed=yes
17746fi
17747 else
17748    pkg_failed=untried
17749fi
17750
17751
17752
17753if test $pkg_failed = yes; then
17754   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17755printf "%s\n" "no" >&6; }
17756
17757if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
17758        _pkg_short_errors_supported=yes
17759else
17760        _pkg_short_errors_supported=no
17761fi
17762        if test $_pkg_short_errors_supported = yes; then
17763	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
17764        else
17765	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
17766        fi
17767	# Put the nasty error message in config.log where it belongs
17768	echo "$SYSTEMD_PKG_ERRORS" >&5
17769
17770	as_fn_error $? "Package requirements (libsystemd) were not met:
17771
17772$SYSTEMD_PKG_ERRORS
17773
17774Consider adjusting the PKG_CONFIG_PATH environment variable if you
17775installed software in a non-standard prefix.
17776
17777Alternatively, you may set the environment variables SYSTEMD_CFLAGS
17778and SYSTEMD_LIBS to avoid the need to call pkg-config.
17779See the pkg-config man page for more details." "$LINENO" 5
17780elif test $pkg_failed = untried; then
17781     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17782printf "%s\n" "no" >&6; }
17783	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17784printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17785as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
17786is in your PATH or set the PKG_CONFIG environment variable to the full
17787path to pkg-config.
17788
17789Alternatively, you may set the environment variables SYSTEMD_CFLAGS
17790and SYSTEMD_LIBS to avoid the need to call pkg-config.
17791See the pkg-config man page for more details.
17792
17793To get pkg-config, see <http://pkg-config.freedesktop.org/>.
17794See \`config.log' for more details" "$LINENO" 5; }
17795else
17796	SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
17797	SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
17798        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17799printf "%s\n" "yes" >&6; }
17800	have_systemd=yes
17801fi
17802		if test "x$have_systemd" != "xyes"
17803then :
17804
17805		have_systemd_daemon=no
17806
17807pkg_failed=no
17808{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
17809printf %s "checking for SYSTEMD_DAEMON... " >&6; }
17810
17811if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
17812    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
17813 elif test -n "$PKG_CONFIG"; then
17814    if test -n "$PKG_CONFIG" && \
17815    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
17816  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
17817  ac_status=$?
17818  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17819  test $ac_status = 0; }; then
17820  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
17821		      test "x$?" != "x0" && pkg_failed=yes
17822else
17823  pkg_failed=yes
17824fi
17825 else
17826    pkg_failed=untried
17827fi
17828if test -n "$SYSTEMD_DAEMON_LIBS"; then
17829    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
17830 elif test -n "$PKG_CONFIG"; then
17831    if test -n "$PKG_CONFIG" && \
17832    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
17833  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
17834  ac_status=$?
17835  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17836  test $ac_status = 0; }; then
17837  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
17838		      test "x$?" != "x0" && pkg_failed=yes
17839else
17840  pkg_failed=yes
17841fi
17842 else
17843    pkg_failed=untried
17844fi
17845
17846
17847
17848if test $pkg_failed = yes; then
17849   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17850printf "%s\n" "no" >&6; }
17851
17852if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
17853        _pkg_short_errors_supported=yes
17854else
17855        _pkg_short_errors_supported=no
17856fi
17857        if test $_pkg_short_errors_supported = yes; then
17858	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
17859        else
17860	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
17861        fi
17862	# Put the nasty error message in config.log where it belongs
17863	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
17864
17865	as_fn_error $? "Package requirements (libsystemd-daemon) were not met:
17866
17867$SYSTEMD_DAEMON_PKG_ERRORS
17868
17869Consider adjusting the PKG_CONFIG_PATH environment variable if you
17870installed software in a non-standard prefix.
17871
17872Alternatively, you may set the environment variables SYSTEMD_DAEMON_CFLAGS
17873and SYSTEMD_DAEMON_LIBS to avoid the need to call pkg-config.
17874See the pkg-config man page for more details." "$LINENO" 5
17875elif test $pkg_failed = untried; then
17876     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17877printf "%s\n" "no" >&6; }
17878	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17879printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17880as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
17881is in your PATH or set the PKG_CONFIG environment variable to the full
17882path to pkg-config.
17883
17884Alternatively, you may set the environment variables SYSTEMD_DAEMON_CFLAGS
17885and SYSTEMD_DAEMON_LIBS to avoid the need to call pkg-config.
17886See the pkg-config man page for more details.
17887
17888To get pkg-config, see <http://pkg-config.freedesktop.org/>.
17889See \`config.log' for more details" "$LINENO" 5; }
17890else
17891	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
17892	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
17893        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17894printf "%s\n" "yes" >&6; }
17895	have_systemd_daemon=yes
17896fi
17897		if test "x$have_systemd_daemon" = "xyes"
17898then :
17899  have_systemd=yes
17900fi
17901
17902fi
17903	case $enable_systemd:$have_systemd in #(
17904  yes:no) :
17905    as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
17906  *:yes) :
17907
17908printf "%s\n" "#define HAVE_SYSTEMD 1" >>confdefs.h
17909
17910		LIBS="$LIBS $SYSTEMD_LIBS"
17911
17912	 ;; #(
17913  *) :
17914     ;;
17915esac
17916    else
17917    	as_fn_error $? "systemd enabled but need pkg-config to configure for it" "$LINENO" 5
17918    fi
17919
17920fi
17921 if test "x$have_systemd" = xyes; then
17922  USE_SYSTEMD_TRUE=
17923  USE_SYSTEMD_FALSE='#'
17924else
17925  USE_SYSTEMD_TRUE='#'
17926  USE_SYSTEMD_FALSE=
17927fi
17928
17929
17930# Include systemd.m4 - end
17931
17932# set memory allocation checking if requested
17933# Check whether --enable-alloc-checks was given.
17934if test ${enable_alloc_checks+y}
17935then :
17936  enableval=$enable_alloc_checks;
17937fi
17938
17939# Check whether --enable-alloc-lite was given.
17940if test ${enable_alloc_lite+y}
17941then :
17942  enableval=$enable_alloc_lite;
17943fi
17944
17945# Check whether --enable-alloc-nonregional was given.
17946if test ${enable_alloc_nonregional+y}
17947then :
17948  enableval=$enable_alloc_nonregional;
17949fi
17950
17951if test x_$enable_alloc_nonregional = x_yes; then
17952
17953printf "%s\n" "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
17954
17955fi
17956if test x_$enable_alloc_checks = x_yes; then
17957
17958printf "%s\n" "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
17959
17960	SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo"
17961
17962	ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ="alloc.lo"
17963
17964else
17965	if test x_$enable_alloc_lite = x_yes; then
17966
17967printf "%s\n" "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
17968
17969	else
17970
17971	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
17972printf %s "checking for GNU libc compatible malloc... " >&6; }
17973	if test "$cross_compiling" = yes
17974then :
17975  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
17976printf "%s\n" "no (crosscompile)" >&6; }
17977	case " $LIBOBJS " in
17978  *" malloc.$ac_objext "* ) ;;
17979  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
17980 ;;
17981esac
17982
17983
17984printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
17985
17986else $as_nop
17987  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17988/* end confdefs.h.  */
17989#if defined STDC_HEADERS || defined HAVE_STDLIB_H
17990#include <stdlib.h>
17991#else
17992char *malloc ();
17993#endif
17994
17995int
17996main (void)
17997{
17998 if(malloc(0) != 0) return 1;
17999  ;
18000  return 0;
18001}
18002
18003_ACEOF
18004if ac_fn_c_try_run "$LINENO"
18005then :
18006  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18007printf "%s\n" "no" >&6; }
18008	case " $LIBOBJS " in
18009  *" malloc.$ac_objext "* ) ;;
18010  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
18011 ;;
18012esac
18013
18014
18015printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
18016
18017else $as_nop
18018  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18019printf "%s\n" "yes" >&6; }
18020
18021printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h
18022
18023fi
18024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18025  conftest.$ac_objext conftest.beam conftest.$ac_ext
18026fi
18027
18028
18029	fi
18030fi
18031
18032# check windows threads (we use them, not pthreads, on windows).
18033if test "$on_mingw" = "yes"; then
18034# check windows threads
18035	ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
18036"
18037if test "x$ac_cv_header_windows_h" = xyes
18038then :
18039  printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h
18040
18041fi
18042
18043	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
18044printf %s "checking for CreateThread... " >&6; }
18045	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18046/* end confdefs.h.  */
18047
18048#ifdef HAVE_WINDOWS_H
18049#include <windows.h>
18050#endif
18051
18052int
18053main (void)
18054{
18055
18056	HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
18057
18058  ;
18059  return 0;
18060}
18061_ACEOF
18062if ac_fn_c_try_compile "$LINENO"
18063then :
18064  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18065printf "%s\n" "yes" >&6; }
18066
18067printf "%s\n" "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
18068
18069
18070else $as_nop
18071  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18072printf "%s\n" "no" >&6; }
18073
18074fi
18075rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18076
18077else
18078# not on mingw, check thread libraries.
18079
18080# check for thread library.
18081# check this first, so that the pthread lib does not get linked in via
18082# libssl or libpython, and thus distorts the tests, and we end up using
18083# the non-threadsafe C libraries.
18084
18085# Check whether --with-pthreads was given.
18086if test ${with_pthreads+y}
18087then :
18088  withval=$with_pthreads;
18089else $as_nop
18090   withval="yes"
18091fi
18092
18093ub_have_pthreads=no
18094if test x_$withval != x_no; then
18095
18096
18097
18098
18099ac_ext=c
18100ac_cpp='$CPP $CPPFLAGS'
18101ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18102ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18103ac_compiler_gnu=$ac_cv_c_compiler_gnu
18104
18105ax_pthread_ok=no
18106
18107# We used to check for pthread.h first, but this fails if pthread.h
18108# requires special compiler flags (e.g. on Tru64 or Sequent).
18109# It gets checked for in the link test anyway.
18110
18111# First of all, check if the user has set any of the PTHREAD_LIBS,
18112# etcetera environment variables, and if threads linking works using
18113# them:
18114if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
18115        ax_pthread_save_CC="$CC"
18116        ax_pthread_save_CFLAGS="$CFLAGS"
18117        ax_pthread_save_LIBS="$LIBS"
18118        if test "x$PTHREAD_CC" != "x"
18119then :
18120  CC="$PTHREAD_CC"
18121fi
18122        if test "x$PTHREAD_CXX" != "x"
18123then :
18124  CXX="$PTHREAD_CXX"
18125fi
18126        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18127        LIBS="$PTHREAD_LIBS $LIBS"
18128        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
18129printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
18130        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18131/* end confdefs.h.  */
18132
18133/* Override any GCC internal prototype to avoid an error.
18134   Use char because int might match the return type of a GCC
18135   builtin and then its argument prototype would still apply.  */
18136char pthread_join ();
18137int
18138main (void)
18139{
18140return pthread_join ();
18141  ;
18142  return 0;
18143}
18144_ACEOF
18145if ac_fn_c_try_link "$LINENO"
18146then :
18147  ax_pthread_ok=yes
18148fi
18149rm -f core conftest.err conftest.$ac_objext conftest.beam \
18150    conftest$ac_exeext conftest.$ac_ext
18151        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
18152printf "%s\n" "$ax_pthread_ok" >&6; }
18153        if test "x$ax_pthread_ok" = "xno"; then
18154                PTHREAD_LIBS=""
18155                PTHREAD_CFLAGS=""
18156        fi
18157        CC="$ax_pthread_save_CC"
18158        CFLAGS="$ax_pthread_save_CFLAGS"
18159        LIBS="$ax_pthread_save_LIBS"
18160fi
18161
18162# We must check for the threads library under a number of different
18163# names; the ordering is very important because some systems
18164# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
18165# libraries is broken (non-POSIX).
18166
18167# Create a list of thread flags to try. Items with a "," contain both
18168# C compiler flags (before ",") and linker flags (after ","). Other items
18169# starting with a "-" are C compiler flags, and remaining items are
18170# library names, except for "none" which indicates that we try without
18171# any flags at all, and "pthread-config" which is a program returning
18172# the flags for the Pth emulation library.
18173
18174ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
18175
18176# The ordering *is* (sometimes) important.  Some notes on the
18177# individual items follow:
18178
18179# pthreads: AIX (must check this before -lpthread)
18180# none: in case threads are in libc; should be tried before -Kthread and
18181#       other compiler flags to prevent continual compiler warnings
18182# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
18183# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
18184#           (Note: HP C rejects this with "bad form for `-t' option")
18185# -pthreads: Solaris/gcc (Note: HP C also rejects)
18186# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
18187#      doesn't hurt to check since this sometimes defines pthreads and
18188#      -D_REENTRANT too), HP C (must be checked before -lpthread, which
18189#      is present but should not be used directly; and before -mthreads,
18190#      because the compiler interprets this as "-mt" + "-hreads")
18191# -mthreads: Mingw32/gcc, Lynx/gcc
18192# pthread: Linux, etcetera
18193# --thread-safe: KAI C++
18194# pthread-config: use pthread-config program (for GNU Pth library)
18195
18196case $host_os in
18197
18198        freebsd*)
18199
18200        # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
18201        # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
18202
18203        ax_pthread_flags="-kthread lthread $ax_pthread_flags"
18204        ;;
18205
18206        hpux*)
18207
18208        # From the cc(1) man page: "[-mt] Sets various -D flags to enable
18209        # multi-threading and also sets -lpthread."
18210
18211        ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
18212        ;;
18213
18214        openedition*)
18215
18216        # IBM z/OS requires a feature-test macro to be defined in order to
18217        # enable POSIX threads at all, so give the user a hint if this is
18218        # not set. (We don't define these ourselves, as they can affect
18219        # other portions of the system API in unpredictable ways.)
18220
18221        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18222/* end confdefs.h.  */
18223
18224#            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
18225             AX_PTHREAD_ZOS_MISSING
18226#            endif
18227
18228_ACEOF
18229if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18230  $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1
18231then :
18232  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
18233printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
18234fi
18235rm -rf conftest*
18236
18237        ;;
18238
18239        solaris*)
18240
18241        # On Solaris (at least, for some versions), libc contains stubbed
18242        # (non-functional) versions of the pthreads routines, so link-based
18243        # tests will erroneously succeed. (N.B.: The stubs are missing
18244        # pthread_cleanup_push, or rather a function called by this macro,
18245        # so we could check for that, but who knows whether they'll stub
18246        # that too in a future libc.)  So we'll check first for the
18247        # standard Solaris way of linking pthreads (-mt -lpthread).
18248
18249        ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
18250        ;;
18251esac
18252
18253# Are we compiling with Clang?
18254
18255{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
18256printf %s "checking whether $CC is Clang... " >&6; }
18257if test ${ax_cv_PTHREAD_CLANG+y}
18258then :
18259  printf %s "(cached) " >&6
18260else $as_nop
18261  ax_cv_PTHREAD_CLANG=no
18262     # Note that Autoconf sets GCC=yes for Clang as well as GCC
18263     if test "x$GCC" = "xyes"; then
18264        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18265/* end confdefs.h.  */
18266/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
18267#            if defined(__clang__) && defined(__llvm__)
18268             AX_PTHREAD_CC_IS_CLANG
18269#            endif
18270
18271_ACEOF
18272if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18273  $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1
18274then :
18275  ax_cv_PTHREAD_CLANG=yes
18276fi
18277rm -rf conftest*
18278
18279     fi
18280
18281fi
18282{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
18283printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; }
18284ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
18285
18286
18287# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
18288
18289# Note that for GCC and Clang -pthread generally implies -lpthread,
18290# except when -nostdlib is passed.
18291# This is problematic using libtool to build C++ shared libraries with pthread:
18292# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
18293# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
18294# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
18295# To solve this, first try -pthread together with -lpthread for GCC
18296
18297if test "x$GCC" = "xyes"
18298then :
18299  ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"
18300fi
18301
18302# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
18303
18304if test "x$ax_pthread_clang" = "xyes"
18305then :
18306  ax_pthread_flags="-pthread,-lpthread -pthread"
18307fi
18308
18309
18310# The presence of a feature test macro requesting re-entrant function
18311# definitions is, on some systems, a strong hint that pthreads support is
18312# correctly enabled
18313
18314case $host_os in
18315        darwin* | hpux* | linux* | osf* | solaris*)
18316        ax_pthread_check_macro="_REENTRANT"
18317        ;;
18318
18319        aix*)
18320        ax_pthread_check_macro="_THREAD_SAFE"
18321        ;;
18322
18323        *)
18324        ax_pthread_check_macro="--"
18325        ;;
18326esac
18327if test "x$ax_pthread_check_macro" = "x--"
18328then :
18329  ax_pthread_check_cond=0
18330else $as_nop
18331  ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
18332fi
18333
18334
18335if test "x$ax_pthread_ok" = "xno"; then
18336for ax_pthread_try_flag in $ax_pthread_flags; do
18337
18338        case $ax_pthread_try_flag in
18339                none)
18340                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
18341printf %s "checking whether pthreads work without any flags... " >&6; }
18342                ;;
18343
18344                *,*)
18345                PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
18346                PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
18347                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5
18348printf %s "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; }
18349                ;;
18350
18351                -*)
18352                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
18353printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
18354                PTHREAD_CFLAGS="$ax_pthread_try_flag"
18355                ;;
18356
18357                pthread-config)
18358                # Extract the first word of "pthread-config", so it can be a program name with args.
18359set dummy pthread-config; ac_word=$2
18360{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18361printf %s "checking for $ac_word... " >&6; }
18362if test ${ac_cv_prog_ax_pthread_config+y}
18363then :
18364  printf %s "(cached) " >&6
18365else $as_nop
18366  if test -n "$ax_pthread_config"; then
18367  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
18368else
18369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18370for as_dir in $PATH
18371do
18372  IFS=$as_save_IFS
18373  case $as_dir in #(((
18374    '') as_dir=./ ;;
18375    */) ;;
18376    *) as_dir=$as_dir/ ;;
18377  esac
18378    for ac_exec_ext in '' $ac_executable_extensions; do
18379  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18380    ac_cv_prog_ax_pthread_config="yes"
18381    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18382    break 2
18383  fi
18384done
18385  done
18386IFS=$as_save_IFS
18387
18388  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
18389fi
18390fi
18391ax_pthread_config=$ac_cv_prog_ax_pthread_config
18392if test -n "$ax_pthread_config"; then
18393  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
18394printf "%s\n" "$ax_pthread_config" >&6; }
18395else
18396  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18397printf "%s\n" "no" >&6; }
18398fi
18399
18400
18401                if test "x$ax_pthread_config" = "xno"
18402then :
18403  continue
18404fi
18405                PTHREAD_CFLAGS="`pthread-config --cflags`"
18406                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
18407                ;;
18408
18409                *)
18410                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
18411printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
18412                PTHREAD_LIBS="-l$ax_pthread_try_flag"
18413                ;;
18414        esac
18415
18416        ax_pthread_save_CFLAGS="$CFLAGS"
18417        ax_pthread_save_LIBS="$LIBS"
18418        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18419        LIBS="$PTHREAD_LIBS $LIBS"
18420
18421        # Check for various functions.  We must include pthread.h,
18422        # since some functions may be macros.  (On the Sequent, we
18423        # need a special flag -Kthread to make this header compile.)
18424        # We check for pthread_join because it is in -lpthread on IRIX
18425        # while pthread_create is in libc.  We check for pthread_attr_init
18426        # due to DEC craziness with -lpthreads.  We check for
18427        # pthread_cleanup_push because it is one of the few pthread
18428        # functions on Solaris that doesn't have a non-functional libc stub.
18429        # We try pthread_create on general principles.
18430
18431        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18432/* end confdefs.h.  */
18433#include <pthread.h>
18434#                       if $ax_pthread_check_cond
18435#                        error "$ax_pthread_check_macro must be defined"
18436#                       endif
18437                        static void *some_global = NULL;
18438                        static void routine(void *a)
18439                          {
18440                             /* To avoid any unused-parameter or
18441                                unused-but-set-parameter warning.  */
18442                             some_global = a;
18443                          }
18444                        static void *start_routine(void *a) { return a; }
18445int
18446main (void)
18447{
18448pthread_t th; pthread_attr_t attr;
18449                        pthread_create(&th, 0, start_routine, 0);
18450                        pthread_join(th, 0);
18451                        pthread_attr_init(&attr);
18452                        pthread_cleanup_push(routine, 0);
18453                        pthread_cleanup_pop(0) /* ; */
18454  ;
18455  return 0;
18456}
18457_ACEOF
18458if ac_fn_c_try_link "$LINENO"
18459then :
18460  ax_pthread_ok=yes
18461fi
18462rm -f core conftest.err conftest.$ac_objext conftest.beam \
18463    conftest$ac_exeext conftest.$ac_ext
18464
18465        CFLAGS="$ax_pthread_save_CFLAGS"
18466        LIBS="$ax_pthread_save_LIBS"
18467
18468        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
18469printf "%s\n" "$ax_pthread_ok" >&6; }
18470        if test "x$ax_pthread_ok" = "xyes"
18471then :
18472  break
18473fi
18474
18475        PTHREAD_LIBS=""
18476        PTHREAD_CFLAGS=""
18477done
18478fi
18479
18480
18481# Clang needs special handling, because older versions handle the -pthread
18482# option in a rather... idiosyncratic way
18483
18484if test "x$ax_pthread_clang" = "xyes"; then
18485
18486        # Clang takes -pthread; it has never supported any other flag
18487
18488        # (Note 1: This will need to be revisited if a system that Clang
18489        # supports has POSIX threads in a separate library.  This tends not
18490        # to be the way of modern systems, but it's conceivable.)
18491
18492        # (Note 2: On some systems, notably Darwin, -pthread is not needed
18493        # to get POSIX threads support; the API is always present and
18494        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
18495        # -pthread does define _REENTRANT, and while the Darwin headers
18496        # ignore this macro, third-party headers might not.)
18497
18498        # However, older versions of Clang make a point of warning the user
18499        # that, in an invocation where only linking and no compilation is
18500        # taking place, the -pthread option has no effect ("argument unused
18501        # during compilation").  They expect -pthread to be passed in only
18502        # when source code is being compiled.
18503        #
18504        # Problem is, this is at odds with the way Automake and most other
18505        # C build frameworks function, which is that the same flags used in
18506        # compilation (CFLAGS) are also used in linking.  Many systems
18507        # supported by AX_PTHREAD require exactly this for POSIX threads
18508        # support, and in fact it is often not straightforward to specify a
18509        # flag that is used only in the compilation phase and not in
18510        # linking.  Such a scenario is extremely rare in practice.
18511        #
18512        # Even though use of the -pthread flag in linking would only print
18513        # a warning, this can be a nuisance for well-run software projects
18514        # that build with -Werror.  So if the active version of Clang has
18515        # this misfeature, we search for an option to squash it.
18516
18517        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
18518printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
18519if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y}
18520then :
18521  printf %s "(cached) " >&6
18522else $as_nop
18523  ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
18524             # Create an alternate version of $ac_link that compiles and
18525             # links in two steps (.c -> .o, .o -> exe) instead of one
18526             # (.c -> exe), because the warning occurs only in the second
18527             # step
18528             ax_pthread_save_ac_link="$ac_link"
18529             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
18530             ax_pthread_link_step=`printf "%s\n" "$ac_link" | sed "$ax_pthread_sed"`
18531             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
18532             ax_pthread_save_CFLAGS="$CFLAGS"
18533             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
18534                if test "x$ax_pthread_try" = "xunknown"
18535then :
18536  break
18537fi
18538                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
18539                ac_link="$ax_pthread_save_ac_link"
18540                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18541/* end confdefs.h.  */
18542int main(void){return 0;}
18543_ACEOF
18544if ac_fn_c_try_link "$LINENO"
18545then :
18546  ac_link="$ax_pthread_2step_ac_link"
18547                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18548/* end confdefs.h.  */
18549int main(void){return 0;}
18550_ACEOF
18551if ac_fn_c_try_link "$LINENO"
18552then :
18553  break
18554fi
18555rm -f core conftest.err conftest.$ac_objext conftest.beam \
18556    conftest$ac_exeext conftest.$ac_ext
18557
18558fi
18559rm -f core conftest.err conftest.$ac_objext conftest.beam \
18560    conftest$ac_exeext conftest.$ac_ext
18561             done
18562             ac_link="$ax_pthread_save_ac_link"
18563             CFLAGS="$ax_pthread_save_CFLAGS"
18564             if test "x$ax_pthread_try" = "x"
18565then :
18566  ax_pthread_try=no
18567fi
18568             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
18569
18570fi
18571{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
18572printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
18573
18574        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
18575                no | unknown) ;;
18576                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
18577        esac
18578
18579fi # $ax_pthread_clang = yes
18580
18581
18582
18583# Various other checks:
18584if test "x$ax_pthread_ok" = "xyes"; then
18585        ax_pthread_save_CFLAGS="$CFLAGS"
18586        ax_pthread_save_LIBS="$LIBS"
18587        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18588        LIBS="$PTHREAD_LIBS $LIBS"
18589
18590        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
18591        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
18592printf %s "checking for joinable pthread attribute... " >&6; }
18593if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y}
18594then :
18595  printf %s "(cached) " >&6
18596else $as_nop
18597  ax_cv_PTHREAD_JOINABLE_ATTR=unknown
18598             for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
18599                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18600/* end confdefs.h.  */
18601#include <pthread.h>
18602int
18603main (void)
18604{
18605int attr = $ax_pthread_attr; return attr /* ; */
18606  ;
18607  return 0;
18608}
18609_ACEOF
18610if ac_fn_c_try_link "$LINENO"
18611then :
18612  ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
18613fi
18614rm -f core conftest.err conftest.$ac_objext conftest.beam \
18615    conftest$ac_exeext conftest.$ac_ext
18616             done
18617
18618fi
18619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
18620printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
18621        if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
18622               test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
18623               test "x$ax_pthread_joinable_attr_defined" != "xyes"
18624then :
18625
18626printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h
18627
18628               ax_pthread_joinable_attr_defined=yes
18629
18630fi
18631
18632        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
18633printf %s "checking whether more special flags are required for pthreads... " >&6; }
18634if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y}
18635then :
18636  printf %s "(cached) " >&6
18637else $as_nop
18638  ax_cv_PTHREAD_SPECIAL_FLAGS=no
18639             case $host_os in
18640             solaris*)
18641             ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
18642             ;;
18643             esac
18644
18645fi
18646{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
18647printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
18648        if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
18649               test "x$ax_pthread_special_flags_added" != "xyes"
18650then :
18651  PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
18652               ax_pthread_special_flags_added=yes
18653fi
18654
18655        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
18656printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; }
18657if test ${ax_cv_PTHREAD_PRIO_INHERIT+y}
18658then :
18659  printf %s "(cached) " >&6
18660else $as_nop
18661  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18662/* end confdefs.h.  */
18663#include <pthread.h>
18664int
18665main (void)
18666{
18667int i = PTHREAD_PRIO_INHERIT;
18668                                               return i;
18669  ;
18670  return 0;
18671}
18672_ACEOF
18673if ac_fn_c_try_link "$LINENO"
18674then :
18675  ax_cv_PTHREAD_PRIO_INHERIT=yes
18676else $as_nop
18677  ax_cv_PTHREAD_PRIO_INHERIT=no
18678fi
18679rm -f core conftest.err conftest.$ac_objext conftest.beam \
18680    conftest$ac_exeext conftest.$ac_ext
18681
18682fi
18683{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
18684printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
18685        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
18686               test "x$ax_pthread_prio_inherit_defined" != "xyes"
18687then :
18688
18689printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
18690
18691               ax_pthread_prio_inherit_defined=yes
18692
18693fi
18694
18695        CFLAGS="$ax_pthread_save_CFLAGS"
18696        LIBS="$ax_pthread_save_LIBS"
18697
18698        # More AIX lossage: compile with *_r variant
18699        if test "x$GCC" != "xyes"; then
18700            case $host_os in
18701                aix*)
18702                case "x/$CC" in #(
18703  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
18704    #handle absolute path differently from PATH based program lookup
18705                     case "x$CC" in #(
18706  x/*) :
18707
18708			   if as_fn_executable_p ${CC}_r
18709then :
18710  PTHREAD_CC="${CC}_r"
18711fi
18712			   if test "x${CXX}" != "x"
18713then :
18714  if as_fn_executable_p ${CXX}_r
18715then :
18716  PTHREAD_CXX="${CXX}_r"
18717fi
18718fi
18719			  ;; #(
18720  *) :
18721
18722			   for ac_prog in ${CC}_r
18723do
18724  # Extract the first word of "$ac_prog", so it can be a program name with args.
18725set dummy $ac_prog; ac_word=$2
18726{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18727printf %s "checking for $ac_word... " >&6; }
18728if test ${ac_cv_prog_PTHREAD_CC+y}
18729then :
18730  printf %s "(cached) " >&6
18731else $as_nop
18732  if test -n "$PTHREAD_CC"; then
18733  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
18734else
18735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18736for as_dir in $PATH
18737do
18738  IFS=$as_save_IFS
18739  case $as_dir in #(((
18740    '') as_dir=./ ;;
18741    */) ;;
18742    *) as_dir=$as_dir/ ;;
18743  esac
18744    for ac_exec_ext in '' $ac_executable_extensions; do
18745  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18746    ac_cv_prog_PTHREAD_CC="$ac_prog"
18747    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18748    break 2
18749  fi
18750done
18751  done
18752IFS=$as_save_IFS
18753
18754fi
18755fi
18756PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
18757if test -n "$PTHREAD_CC"; then
18758  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
18759printf "%s\n" "$PTHREAD_CC" >&6; }
18760else
18761  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18762printf "%s\n" "no" >&6; }
18763fi
18764
18765
18766  test -n "$PTHREAD_CC" && break
18767done
18768test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
18769
18770			   if test "x${CXX}" != "x"
18771then :
18772  for ac_prog in ${CXX}_r
18773do
18774  # Extract the first word of "$ac_prog", so it can be a program name with args.
18775set dummy $ac_prog; ac_word=$2
18776{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18777printf %s "checking for $ac_word... " >&6; }
18778if test ${ac_cv_prog_PTHREAD_CXX+y}
18779then :
18780  printf %s "(cached) " >&6
18781else $as_nop
18782  if test -n "$PTHREAD_CXX"; then
18783  ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test.
18784else
18785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18786for as_dir in $PATH
18787do
18788  IFS=$as_save_IFS
18789  case $as_dir in #(((
18790    '') as_dir=./ ;;
18791    */) ;;
18792    *) as_dir=$as_dir/ ;;
18793  esac
18794    for ac_exec_ext in '' $ac_executable_extensions; do
18795  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18796    ac_cv_prog_PTHREAD_CXX="$ac_prog"
18797    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18798    break 2
18799  fi
18800done
18801  done
18802IFS=$as_save_IFS
18803
18804fi
18805fi
18806PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX
18807if test -n "$PTHREAD_CXX"; then
18808  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5
18809printf "%s\n" "$PTHREAD_CXX" >&6; }
18810else
18811  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18812printf "%s\n" "no" >&6; }
18813fi
18814
18815
18816  test -n "$PTHREAD_CXX" && break
18817done
18818test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
18819
18820fi
18821
18822                      ;;
18823esac
18824                     ;; #(
18825  *) :
18826     ;;
18827esac
18828                ;;
18829            esac
18830        fi
18831fi
18832
18833test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
18834test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
18835
18836
18837
18838
18839
18840
18841# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
18842if test "x$ax_pthread_ok" = "xyes"; then
18843
18844
18845printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h
18846
18847		if test -n "$PTHREAD_LIBS"; then
18848		  LIBS="$PTHREAD_LIBS $LIBS"
18849		fi
18850		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18851		CC="$PTHREAD_CC"
18852		ub_have_pthreads=yes
18853		ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
18854"
18855if test "x$ac_cv_type_pthread_spinlock_t" = xyes
18856then :
18857
18858printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h
18859
18860
18861fi
18862ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
18863"
18864if test "x$ac_cv_type_pthread_rwlock_t" = xyes
18865then :
18866
18867printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_T 1" >>confdefs.h
18868
18869
18870fi
18871
18872		# The cast to long int works around a bug in the HP C Compiler
18873# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18874# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18875# This bug is HP SR number 8606223364.
18876{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
18877printf %s "checking size of unsigned long... " >&6; }
18878if test ${ac_cv_sizeof_unsigned_long+y}
18879then :
18880  printf %s "(cached) " >&6
18881else $as_nop
18882  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"
18883then :
18884
18885else $as_nop
18886  if test "$ac_cv_type_unsigned_long" = yes; then
18887     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18888printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18889as_fn_error 77 "cannot compute sizeof (unsigned long)
18890See \`config.log' for more details" "$LINENO" 5; }
18891   else
18892     ac_cv_sizeof_unsigned_long=0
18893   fi
18894fi
18895
18896fi
18897{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
18898printf "%s\n" "$ac_cv_sizeof_unsigned_long" >&6; }
18899
18900
18901
18902printf "%s\n" "#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long" >>confdefs.h
18903
18904
18905		# The cast to long int works around a bug in the HP C Compiler
18906# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18907# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18908# This bug is HP SR number 8606223364.
18909{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
18910printf %s "checking size of pthread_t... " >&6; }
18911if test ${ac_cv_sizeof_pthread_t+y}
18912then :
18913  printf %s "(cached) " >&6
18914else $as_nop
18915  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "$ac_includes_default"
18916then :
18917
18918else $as_nop
18919  if test "$ac_cv_type_pthread_t" = yes; then
18920     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18921printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18922as_fn_error 77 "cannot compute sizeof (pthread_t)
18923See \`config.log' for more details" "$LINENO" 5; }
18924   else
18925     ac_cv_sizeof_pthread_t=0
18926   fi
18927fi
18928
18929fi
18930{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
18931printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
18932
18933
18934
18935printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
18936
18937
18938
18939		if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
18940		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
18941printf %s "checking if -pthread unused during linking... " >&6; }
18942		# catch clang warning 'argument unused during compilation'
18943		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18944/* end confdefs.h.  */
18945$ac_includes_default
18946
18947int main(void) {return 0;}
18948
18949_ACEOF
18950		pthread_unused="yes"
18951		# first compile
18952		echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
18953		$CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
18954		if test $? = 0; then
18955			# then link
18956			echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
18957			$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
18958			if test $? -ne 0; then
18959				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18960printf "%s\n" "yes" >&6; }
18961				CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
18962				PTHREAD_CFLAGS_ONLY="-pthread"
18963
18964			else
18965				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18966printf "%s\n" "no" >&6; }
18967			fi
18968		else
18969			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18970printf "%s\n" "no" >&6; }
18971		fi # endif cc successful
18972		rm -f conftest conftest.c conftest.o
18973		fi # endif -pthread in CFLAGS
18974
18975
18976        :
18977else
18978        ax_pthread_ok=no
18979
18980fi
18981ac_ext=c
18982ac_cpp='$CPP $CPPFLAGS'
18983ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18984ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18985ac_compiler_gnu=$ac_cv_c_compiler_gnu
18986
18987
18988fi
18989
18990# check solaris thread library
18991
18992# Check whether --with-solaris-threads was given.
18993if test ${with_solaris_threads+y}
18994then :
18995  withval=$with_solaris_threads;
18996else $as_nop
18997   withval="no"
18998fi
18999
19000ub_have_sol_threads=no
19001if test x_$withval != x_no; then
19002	if test x_$ub_have_pthreads != x_no; then
19003	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
19004printf "%s\n" "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
19005	else
19006	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
19007printf %s "checking for library containing thr_create... " >&6; }
19008if test ${ac_cv_search_thr_create+y}
19009then :
19010  printf %s "(cached) " >&6
19011else $as_nop
19012  ac_func_search_save_LIBS=$LIBS
19013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19014/* end confdefs.h.  */
19015
19016/* Override any GCC internal prototype to avoid an error.
19017   Use char because int might match the return type of a GCC
19018   builtin and then its argument prototype would still apply.  */
19019char thr_create ();
19020int
19021main (void)
19022{
19023return thr_create ();
19024  ;
19025  return 0;
19026}
19027_ACEOF
19028for ac_lib in '' thread
19029do
19030  if test -z "$ac_lib"; then
19031    ac_res="none required"
19032  else
19033    ac_res=-l$ac_lib
19034    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19035  fi
19036  if ac_fn_c_try_link "$LINENO"
19037then :
19038  ac_cv_search_thr_create=$ac_res
19039fi
19040rm -f core conftest.err conftest.$ac_objext conftest.beam \
19041    conftest$ac_exeext
19042  if test ${ac_cv_search_thr_create+y}
19043then :
19044  break
19045fi
19046done
19047if test ${ac_cv_search_thr_create+y}
19048then :
19049
19050else $as_nop
19051  ac_cv_search_thr_create=no
19052fi
19053rm conftest.$ac_ext
19054LIBS=$ac_func_search_save_LIBS
19055fi
19056{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
19057printf "%s\n" "$ac_cv_search_thr_create" >&6; }
19058ac_res=$ac_cv_search_thr_create
19059if test "$ac_res" != no
19060then :
19061  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19062
19063
19064printf "%s\n" "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
19065
19066
19067
19068
19069{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
19070printf %s "checking whether $CC supports -mt... " >&6; }
19071cache=`echo mt | sed 'y%.=/+-%___p_%'`
19072if eval test \${cv_prog_cc_flag_$cache+y}
19073then :
19074  printf %s "(cached) " >&6
19075else $as_nop
19076
19077echo 'void f(void){}' >conftest.c
19078if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
19079eval "cv_prog_cc_flag_$cache=yes"
19080else
19081eval "cv_prog_cc_flag_$cache=no"
19082fi
19083rm -f conftest conftest.o conftest.c
19084
19085fi
19086
19087if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
19088{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19089printf "%s\n" "yes" >&6; }
19090:
19091CFLAGS="$CFLAGS -mt"
19092else
19093{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19094printf "%s\n" "no" >&6; }
19095:
19096CFLAGS="$CFLAGS -D_REENTRANT"
19097fi
19098
19099		ub_have_sol_threads=yes
19100
19101else $as_nop
19102
19103		as_fn_error $? "no solaris threads found." "$LINENO" 5
19104
19105fi
19106
19107	fi
19108fi
19109
19110fi # end of non-mingw check of thread libraries
19111
19112# Check for SYSLOG_FACILITY
19113
19114# Check whether --with-syslog-facility was given.
19115if test ${with_syslog_facility+y}
19116then :
19117  withval=$with_syslog_facility;  UNBOUND_SYSLOG_FACILITY="$withval"
19118fi
19119
19120case "${UNBOUND_SYSLOG_FACILITY}" in
19121
19122  LOCAL[0-7]) UNBOUND_SYSLOG_FACILITY="LOG_${UNBOUND_SYSLOG_FACILITY}" ;;
19123
19124           *) UNBOUND_SYSLOG_FACILITY="LOG_DAEMON" ;;
19125
19126esac
19127
19128printf "%s\n" "#define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY}" >>confdefs.h
19129
19130
19131# Check for dynamic library module
19132
19133# Check whether --with-dynlibmodule was given.
19134if test ${with_dynlibmodule+y}
19135then :
19136  withval=$with_dynlibmodule;
19137else $as_nop
19138   withval="no"
19139fi
19140
19141
19142if test x_$withval != x_no; then
19143
19144printf "%s\n" "#define WITH_DYNLIBMODULE 1" >>confdefs.h
19145
19146  WITH_DYNLIBMODULE=yes
19147
19148  DYNLIBMOD_OBJ="dynlibmod.lo"
19149
19150  DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
19151
19152  if test $on_mingw = "no"; then
19153    # link with -ldl if not already there, for all executables because
19154    # dlopen call is in the dynlib module.  For unbound executable, also
19155    # export symbols.
19156    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
19157printf %s "checking for library containing dlopen... " >&6; }
19158if test ${ac_cv_search_dlopen+y}
19159then :
19160  printf %s "(cached) " >&6
19161else $as_nop
19162  ac_func_search_save_LIBS=$LIBS
19163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19164/* end confdefs.h.  */
19165
19166/* Override any GCC internal prototype to avoid an error.
19167   Use char because int might match the return type of a GCC
19168   builtin and then its argument prototype would still apply.  */
19169char dlopen ();
19170int
19171main (void)
19172{
19173return dlopen ();
19174  ;
19175  return 0;
19176}
19177_ACEOF
19178for ac_lib in '' dl
19179do
19180  if test -z "$ac_lib"; then
19181    ac_res="none required"
19182  else
19183    ac_res=-l$ac_lib
19184    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19185  fi
19186  if ac_fn_c_try_link "$LINENO"
19187then :
19188  ac_cv_search_dlopen=$ac_res
19189fi
19190rm -f core conftest.err conftest.$ac_objext conftest.beam \
19191    conftest$ac_exeext
19192  if test ${ac_cv_search_dlopen+y}
19193then :
19194  break
19195fi
19196done
19197if test ${ac_cv_search_dlopen+y}
19198then :
19199
19200else $as_nop
19201  ac_cv_search_dlopen=no
19202fi
19203rm conftest.$ac_ext
19204LIBS=$ac_func_search_save_LIBS
19205fi
19206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
19207printf "%s\n" "$ac_cv_search_dlopen" >&6; }
19208ac_res=$ac_cv_search_dlopen
19209if test "$ac_res" != no
19210then :
19211  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19212
19213fi
19214
19215    DYNLIBMOD_EXTRALIBS="-export-dynamic"
19216  else
19217    DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.dll.a"
19218  fi
19219
19220fi
19221
19222# Check for PyUnbound
19223
19224# Check whether --with-pyunbound was given.
19225if test ${with_pyunbound+y}
19226then :
19227  withval=$with_pyunbound;
19228else $as_nop
19229   withval="no"
19230fi
19231
19232
19233ub_test_python=no
19234ub_with_pyunbound=no
19235if test x_$withval != x_no; then
19236   ub_with_pyunbound=yes
19237   ub_test_python=yes
19238fi
19239
19240# Check for Python module
19241
19242# Check whether --with-pythonmodule was given.
19243if test ${with_pythonmodule+y}
19244then :
19245  withval=$with_pythonmodule;
19246else $as_nop
19247   withval="no"
19248fi
19249
19250
19251ub_with_pythonmod=no
19252if test x_$withval != x_no; then
19253   ub_with_pythonmod=yes
19254   ub_test_python=yes
19255fi
19256
19257# Check for Python & SWIG only on PyUnbound or PyModule
19258if test x_$ub_test_python != x_no; then
19259
19260   # Check for Python
19261   ub_have_python=no
19262   ac_save_LIBS="$LIBS"
19263        #
19264        # Allow the use of a (user set) custom python version
19265        #
19266
19267
19268        # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
19269set dummy python$PYTHON_VERSION; ac_word=$2
19270{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19271printf %s "checking for $ac_word... " >&6; }
19272if test ${ac_cv_path_PYTHON+y}
19273then :
19274  printf %s "(cached) " >&6
19275else $as_nop
19276  case $PYTHON in
19277  [\\/]* | ?:[\\/]*)
19278  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
19279  ;;
19280  *)
19281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19282for as_dir in $PATH
19283do
19284  IFS=$as_save_IFS
19285  case $as_dir in #(((
19286    '') as_dir=./ ;;
19287    */) ;;
19288    *) as_dir=$as_dir/ ;;
19289  esac
19290    for ac_exec_ext in '' $ac_executable_extensions; do
19291  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19292    ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext"
19293    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19294    break 2
19295  fi
19296done
19297  done
19298IFS=$as_save_IFS
19299
19300  ;;
19301esac
19302fi
19303PYTHON=$ac_cv_path_PYTHON
19304if test -n "$PYTHON"; then
19305  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
19306printf "%s\n" "$PYTHON" >&6; }
19307else
19308  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19309printf "%s\n" "no" >&6; }
19310fi
19311
19312
19313        if test -z "$PYTHON"; then
19314           as_fn_error $? "Cannot find 'python$PYTHON_VERSION' in your system path. You can use the environment variable 'PYTHON_VERSION=version_number' for an explicit version." "$LINENO" 5
19315           PYTHON_VERSION=""
19316        fi
19317
19318        if test -z "$PYTHON_VERSION"; then
19319		PYTHON_VERSION=`$PYTHON -c "import sys; \
19320			print(sys.version.split()[0])"`
19321	fi
19322	# calculate the version number components.
19323
19324	v="$PYTHON_VERSION"
19325	PYTHON_VERSION_MAJOR=`echo $v | sed 's/[^0-9].*//'`
19326	if test -z "$PYTHON_VERSION_MAJOR"; then PYTHON_VERSION_MAJOR="0"; fi
19327	v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'`
19328	PYTHON_VERSION_MINOR=`echo $v | sed 's/[^0-9].*//'`
19329	if test -z "$PYTHON_VERSION_MINOR"; then PYTHON_VERSION_MINOR="0"; fi
19330	v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'`
19331	PYTHON_VERSION_PATCH=`echo $v | sed 's/[^0-9].*//'`
19332	if test -z "$PYTHON_VERSION_PATCH"; then PYTHON_VERSION_PATCH="0"; fi
19333
19334
19335	# For some systems, sysconfig exists, but has the wrong paths,
19336	# on Debian 10, for python 2.7 and 3.7. So, we check the version,
19337	# and for older versions try distutils.sysconfig first. For newer
19338	# versions>=3.10, where distutils.sysconfig is deprecated, use
19339	# sysconfig first and then attempt the other one.
19340	py_distutils_first="no"
19341	if test $PYTHON_VERSION_MAJOR -lt 3; then
19342		py_distutils_first="yes"
19343	fi
19344	if test $PYTHON_VERSION_MAJOR -eq 3 -a $PYTHON_VERSION_MINOR -lt 10; then
19345		py_distutils_first="yes"
19346	fi
19347
19348	# Check if you have the first module
19349	if test "$py_distutils_first" = "yes"; then m="distutils"; else m="sysconfig"; fi
19350	sysconfig_module=""
19351	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m Python module" >&5
19352printf %s "checking for the $m Python module... " >&6; }
19353        if ac_modulecheck_result1=`$PYTHON -c "import $m" 2>&1`; then
19354                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19355printf "%s\n" "yes" >&6; }
19356		sysconfig_module="$m"
19357	else
19358                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19359printf "%s\n" "no" >&6; }
19360	fi
19361
19362	# if not found, try the other one.
19363	if test -z "$sysconfig_module"; then
19364		if test "$py_distutils_first" = "yes"; then m2="sysconfig"; else m2="distutils"; fi
19365		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m2 Python module" >&5
19366printf %s "checking for the $m2 Python module... " >&6; }
19367		if ac_modulecheck_result2=`$PYTHON -c "import $m2" 2>&1`; then
19368			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19369printf "%s\n" "yes" >&6; }
19370			sysconfig_module="$m2"
19371		else
19372			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19373printf "%s\n" "no" >&6; }
19374			as_fn_error $? "cannot import Python module \"$m\", or \"$m2\".
19375	Please check your Python installation. The errors are:
19376	$m
19377	$ac_modulecheck_result1
19378	$m2
19379	$ac_modulecheck_result2" "$LINENO" 5
19380			PYTHON_VERSION=""
19381		fi
19382	fi
19383	if test "$sysconfig_module" = "distutils"; then sysconfig_module="distutils.sysconfig"; fi
19384
19385        #
19386        # Check for Python include path
19387        #
19388        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
19389printf %s "checking for Python include path... " >&6; }
19390        if test -z "$PYTHON_CPPFLAGS"; then
19391		if test "$sysconfig_module" = "sysconfig"; then
19392			python_path=`$PYTHON -c 'import sysconfig; \
19393				print(sysconfig.get_path("include"));'`
19394		else
19395			python_path=`$PYTHON -c "import distutils.sysconfig; \
19396				print(distutils.sysconfig.get_python_inc());"`
19397		fi
19398                if test -n "${python_path}"; then
19399                        python_path="-I$python_path"
19400                fi
19401                PYTHON_CPPFLAGS=$python_path
19402        fi
19403        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
19404printf "%s\n" "$PYTHON_CPPFLAGS" >&6; }
19405
19406
19407        #
19408        # Check for Python library path
19409        #
19410        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
19411printf %s "checking for Python library path... " >&6; }
19412        if test -z "$PYTHON_LDFLAGS"; then
19413                PYTHON_LDFLAGS=`$PYTHON -c "from $sysconfig_module import *; \
19414                        print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
19415        fi
19416        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
19417printf "%s\n" "$PYTHON_LDFLAGS" >&6; }
19418
19419
19420        if test -z "$PYTHON_LIBDIR"; then
19421                PYTHON_LIBDIR=`$PYTHON -c "from $sysconfig_module import *; \
19422                        print(get_config_var('LIBDIR'));"`
19423        fi
19424
19425        #
19426        # Check for site packages
19427        #
19428        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
19429printf %s "checking for Python site-packages path... " >&6; }
19430        if test -z "$PYTHON_SITE_PKG"; then
19431		if test "$sysconfig_module" = "sysconfig"; then
19432			PYTHON_SITE_PKG=`$PYTHON -c 'import sysconfig; \
19433				print(sysconfig.get_path("platlib"));'`
19434		else
19435			PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
19436				print(distutils.sysconfig.get_python_lib(1,0));"`
19437		fi
19438        fi
19439        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
19440printf "%s\n" "$PYTHON_SITE_PKG" >&6; }
19441
19442
19443        #
19444        # final check to see if everything compiles alright
19445        #
19446        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
19447printf %s "checking consistency of all components of python development environment... " >&6; }
19448        ac_ext=c
19449ac_cpp='$CPP $CPPFLAGS'
19450ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19451ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19452ac_compiler_gnu=$ac_cv_c_compiler_gnu
19453
19454        # save current global flags
19455        ac_save_LIBS="$LIBS"
19456        ac_save_CPPFLAGS="$CPPFLAGS"
19457
19458        LIBS="$LIBS $PYTHON_LDFLAGS"
19459        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
19460        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19461/* end confdefs.h.  */
19462
19463                #include <Python.h>
19464
19465int
19466main (void)
19467{
19468
19469                Py_Initialize();
19470
19471  ;
19472  return 0;
19473}
19474_ACEOF
19475if ac_fn_c_try_link "$LINENO"
19476then :
19477  pythonexists=yes
19478else $as_nop
19479  pythonexists=no
19480fi
19481rm -f core conftest.err conftest.$ac_objext conftest.beam \
19482    conftest$ac_exeext conftest.$ac_ext
19483
19484        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
19485printf "%s\n" "$pythonexists" >&6; }
19486
19487        if test ! "$pythonexists" = "yes"; then
19488           as_fn_error $? "
19489  Could not link test program to Python. Maybe the main Python library has been
19490  installed in some non-standard library path. If so, pass it to configure,
19491  via the LDFLAGS environment variable.
19492  Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
19493  ============================================================================
19494   ERROR!
19495   You probably have to install the development version of the Python package
19496   for your distribution.  The exact name of this package varies among them.
19497  ============================================================================
19498           " "$LINENO" 5
19499          PYTHON_VERSION=""
19500        fi
19501        ac_ext=c
19502ac_cpp='$CPP $CPPFLAGS'
19503ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19504ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19505ac_compiler_gnu=$ac_cv_c_compiler_gnu
19506
19507        # turn back to default flags
19508        CPPFLAGS="$ac_save_CPPFLAGS"
19509        LIBS="$ac_save_LIBS"
19510
19511        #
19512        # all done!
19513        #
19514
19515   if test ! -z "$PYTHON_VERSION"; then
19516	badversion="no"
19517	if test "$PYTHON_VERSION_MAJOR" -lt 2; then
19518		badversion="yes"
19519	fi
19520	if test "$PYTHON_VERSION_MAJOR" -eq 2 -a "$PYTHON_VERSION_MINOR" -lt 4; then
19521		badversion="yes"
19522	fi
19523	if test "$badversion" = "yes"; then
19524		as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
19525	fi
19526
19527      PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
19528
19529      # Have Python
19530
19531printf "%s\n" "#define HAVE_PYTHON 1" >>confdefs.h
19532
19533      if test x_$ub_with_pythonmod != x_no; then
19534        if test -n "$LIBS"; then
19535          LIBS="$PYTHON_LDFLAGS $LIBS"
19536        else
19537          LIBS="$PYTHON_LDFLAGS"
19538        fi
19539      fi
19540      PYTHON_LIBS="$PYTHON_LDFLAGS"
19541
19542      if test -n "$CPPFLAGS"; then
19543        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
19544      else
19545        CPPFLAGS="$PYTHON_CPPFLAGS"
19546      fi
19547      if test "$PYTHON_LIBDIR" != "/usr/lib" -a "$PYTHON_LIBDIR" != "" -a "$PYTHON_LIBDIR" != "/usr/lib64"; then
19548
19549	if test "x$enable_rpath" = xyes; then
19550		if echo "$PYTHON_LIBDIR" | grep "^/" >/dev/null; then
19551			RUNTIME_PATH="$RUNTIME_PATH -R$PYTHON_LIBDIR"
19552		fi
19553	fi
19554
19555      fi
19556      ub_have_python=yes
19557      if test -n "$PKG_CONFIG" && \
19558    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
19559  ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
19560  ac_status=$?
19561  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19562  test $ac_status = 0; }; then
19563  PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
19564else
19565  PC_PY_DEPENDENCY="python"
19566fi
19567
19568
19569      # Check for SWIG
19570      ub_have_swig=no
19571      # Check whether --enable-swig-version-check was given.
19572if test ${enable_swig_version_check+y}
19573then :
19574  enableval=$enable_swig_version_check;
19575fi
19576
19577      if test "$enable_swig_version_check" = "yes"; then
19578
19579        # Find path to the "swig" executable.
19580        for ac_prog in swig swig3.0 swig2.0
19581do
19582  # Extract the first word of "$ac_prog", so it can be a program name with args.
19583set dummy $ac_prog; ac_word=$2
19584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19585printf %s "checking for $ac_word... " >&6; }
19586if test ${ac_cv_path_SWIG+y}
19587then :
19588  printf %s "(cached) " >&6
19589else $as_nop
19590  case $SWIG in
19591  [\\/]* | ?:[\\/]*)
19592  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
19593  ;;
19594  *)
19595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19596for as_dir in $PATH
19597do
19598  IFS=$as_save_IFS
19599  case $as_dir in #(((
19600    '') as_dir=./ ;;
19601    */) ;;
19602    *) as_dir=$as_dir/ ;;
19603  esac
19604    for ac_exec_ext in '' $ac_executable_extensions; do
19605  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19606    ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
19607    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19608    break 2
19609  fi
19610done
19611  done
19612IFS=$as_save_IFS
19613
19614  ;;
19615esac
19616fi
19617SWIG=$ac_cv_path_SWIG
19618if test -n "$SWIG"; then
19619  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
19620printf "%s\n" "$SWIG" >&6; }
19621else
19622  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19623printf "%s\n" "no" >&6; }
19624fi
19625
19626
19627  test -n "$SWIG" && break
19628done
19629
19630        if test -z "$SWIG" ; then
19631                :
19632        elif test -z "2.0.1" ; then
19633                :
19634	else
19635                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
19636printf %s "checking SWIG version... " >&6; }
19637                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'`
19638                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
19639printf "%s\n" "$swig_version" >&6; }
19640                if test -n "$swig_version" ; then
19641                        # Calculate the required version number components
19642                        required=2.0.1
19643                        required_major=`echo $required | sed 's/[^0-9].*//'`
19644                        if test -z "$required_major" ; then
19645                                required_major=0
19646                        fi
19647                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
19648                        required_minor=`echo $required | sed 's/[^0-9].*//'`
19649                        if test -z "$required_minor" ; then
19650                                required_minor=0
19651                        fi
19652                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
19653                        required_patch=`echo $required | sed 's/[^0-9].*//'`
19654                        if test -z "$required_patch" ; then
19655                                required_patch=0
19656                        fi
19657                        # Calculate the available version number components
19658                        available=$swig_version
19659                        available_major=`echo $available | sed 's/[^0-9].*//'`
19660                        if test -z "$available_major" ; then
19661                                available_major=0
19662                        fi
19663                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
19664                        available_minor=`echo $available | sed 's/[^0-9].*//'`
19665                        if test -z "$available_minor" ; then
19666                                available_minor=0
19667                        fi
19668                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
19669                        available_patch=`echo $available | sed 's/[^0-9].*//'`
19670                        if test -z "$available_patch" ; then
19671                                available_patch=0
19672                        fi
19673                        # Convert the version tuple into a single number for easier comparison.
19674                        # Using base 100 should be safe since SWIG internally uses BCD values
19675                        # to encode its version number.
19676                        required_swig_vernum=`expr $required_major \* 10000 \
19677                            \+ $required_minor \* 100 \+ $required_patch`
19678                        available_swig_vernum=`expr $available_major \* 10000 \
19679                            \+ $available_minor \* 100 \+ $available_patch`
19680
19681                        if test $available_swig_vernum -lt $required_swig_vernum; then
19682                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version." >&5
19683printf "%s\n" "$as_me: WARNING: SWIG version >= 2.0.1 is required.  You have $swig_version." >&2;}
19684                                SWIG=''
19685
19686                        else
19687                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
19688printf %s "checking for SWIG library... " >&6; }
19689                                SWIG_LIB=`$SWIG -swiglib | tr '\r\n' '  '`
19690                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
19691printf "%s\n" "$SWIG_LIB" >&6; }
19692
19693                        fi
19694                else
19695                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
19696printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
19697                        SWIG=''
19698
19699                fi
19700        fi
19701
19702
19703      else
19704
19705        # Find path to the "swig" executable.
19706        for ac_prog in swig swig3.0 swig2.0
19707do
19708  # Extract the first word of "$ac_prog", so it can be a program name with args.
19709set dummy $ac_prog; ac_word=$2
19710{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19711printf %s "checking for $ac_word... " >&6; }
19712if test ${ac_cv_path_SWIG+y}
19713then :
19714  printf %s "(cached) " >&6
19715else $as_nop
19716  case $SWIG in
19717  [\\/]* | ?:[\\/]*)
19718  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
19719  ;;
19720  *)
19721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19722for as_dir in $PATH
19723do
19724  IFS=$as_save_IFS
19725  case $as_dir in #(((
19726    '') as_dir=./ ;;
19727    */) ;;
19728    *) as_dir=$as_dir/ ;;
19729  esac
19730    for ac_exec_ext in '' $ac_executable_extensions; do
19731  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19732    ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
19733    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19734    break 2
19735  fi
19736done
19737  done
19738IFS=$as_save_IFS
19739
19740  ;;
19741esac
19742fi
19743SWIG=$ac_cv_path_SWIG
19744if test -n "$SWIG"; then
19745  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
19746printf "%s\n" "$SWIG" >&6; }
19747else
19748  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19749printf "%s\n" "no" >&6; }
19750fi
19751
19752
19753  test -n "$SWIG" && break
19754done
19755
19756        if test -z "$SWIG" ; then
19757                :
19758        elif test -z "" ; then
19759                :
19760	else
19761                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
19762printf %s "checking SWIG version... " >&6; }
19763                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'`
19764                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
19765printf "%s\n" "$swig_version" >&6; }
19766                if test -n "$swig_version" ; then
19767                        # Calculate the required version number components
19768                        required=
19769                        required_major=`echo $required | sed 's/[^0-9].*//'`
19770                        if test -z "$required_major" ; then
19771                                required_major=0
19772                        fi
19773                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
19774                        required_minor=`echo $required | sed 's/[^0-9].*//'`
19775                        if test -z "$required_minor" ; then
19776                                required_minor=0
19777                        fi
19778                        required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
19779                        required_patch=`echo $required | sed 's/[^0-9].*//'`
19780                        if test -z "$required_patch" ; then
19781                                required_patch=0
19782                        fi
19783                        # Calculate the available version number components
19784                        available=$swig_version
19785                        available_major=`echo $available | sed 's/[^0-9].*//'`
19786                        if test -z "$available_major" ; then
19787                                available_major=0
19788                        fi
19789                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
19790                        available_minor=`echo $available | sed 's/[^0-9].*//'`
19791                        if test -z "$available_minor" ; then
19792                                available_minor=0
19793                        fi
19794                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
19795                        available_patch=`echo $available | sed 's/[^0-9].*//'`
19796                        if test -z "$available_patch" ; then
19797                                available_patch=0
19798                        fi
19799                        # Convert the version tuple into a single number for easier comparison.
19800                        # Using base 100 should be safe since SWIG internally uses BCD values
19801                        # to encode its version number.
19802                        required_swig_vernum=`expr $required_major \* 10000 \
19803                            \+ $required_minor \* 100 \+ $required_patch`
19804                        available_swig_vernum=`expr $available_major \* 10000 \
19805                            \+ $available_minor \* 100 \+ $available_patch`
19806
19807                        if test $available_swig_vernum -lt $required_swig_vernum; then
19808                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >=  is required.  You have $swig_version." >&5
19809printf "%s\n" "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version." >&2;}
19810                                SWIG=''
19811
19812                        else
19813                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
19814printf %s "checking for SWIG library... " >&6; }
19815                                SWIG_LIB=`$SWIG -swiglib | tr '\r\n' '  '`
19816                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
19817printf "%s\n" "$SWIG_LIB" >&6; }
19818
19819                        fi
19820                else
19821                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
19822printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
19823                        SWIG=''
19824
19825                fi
19826        fi
19827
19828
19829      fi
19830      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
19831printf %s "checking SWIG... " >&6; }
19832      if test ! -x "$SWIG"; then
19833         as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
19834      else
19835
19836printf "%s\n" "#define HAVE_SWIG 1" >>confdefs.h
19837
19838         swig="$SWIG"
19839
19840         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: present" >&5
19841printf "%s\n" "present" >&6; }
19842
19843         # If have Python & SWIG
19844         # Declare PythonMod
19845         if test x_$ub_with_pythonmod != x_no; then
19846
19847printf "%s\n" "#define WITH_PYTHONMODULE 1" >>confdefs.h
19848
19849            WITH_PYTHONMODULE=yes
19850
19851	    PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
19852
19853	    PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
19854
19855	    PYTHONMOD_INSTALL=pythonmod-install
19856
19857	    PYTHONMOD_UNINSTALL=pythonmod-uninstall
19858
19859         fi
19860
19861         # Declare PyUnbound
19862         if test x_$ub_with_pyunbound != x_no; then
19863
19864printf "%s\n" "#define WITH_PYUNBOUND 1" >>confdefs.h
19865
19866            WITH_PYUNBOUND=yes
19867
19868	    PYUNBOUND_OBJ="libunbound_wrap.lo"
19869
19870	    PYUNBOUND_TARGET="_unbound.la"
19871
19872	    PYUNBOUND_INSTALL=pyunbound-install
19873
19874	    PYUNBOUND_UNINSTALL=pyunbound-uninstall
19875
19876         fi
19877      fi
19878   else
19879      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
19880printf "%s\n" "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
19881      ub_with_pyunbound=no
19882      ub_with_pythonmod=no
19883   fi
19884fi
19885
19886if test "`uname`" = "NetBSD"; then
19887	NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
19888
19889fi
19890
19891if test "`uname`" = "Linux"; then
19892	# splint cannot parse modern c99 header files
19893	GCC_DOCKER_LINTFLAGS='-syntax'
19894
19895fi
19896CONFIG_DATE=`date +%Y%m%d`
19897
19898
19899# Checks for libraries.
19900
19901# libnss
19902USE_NSS="no"
19903
19904# Check whether --with-nss was given.
19905if test ${with_nss+y}
19906then :
19907  withval=$with_nss;
19908	USE_NSS="yes"
19909
19910printf "%s\n" "#define HAVE_NSS 1" >>confdefs.h
19911
19912	if test "$withval" != "" -a "$withval" != "yes"; then
19913		CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
19914		LDFLAGS="$LDFLAGS -L$withval/lib"
19915
19916	if test "x$enable_rpath" = xyes; then
19917		if echo "$withval/lib" | grep "^/" >/dev/null; then
19918			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
19919		fi
19920	fi
19921
19922		CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
19923	else
19924		CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
19925		CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
19926	fi
19927        LIBS="$LIBS -lnss3 -lnspr4"
19928	SSLLIB=""
19929	PC_CRYPTO_DEPENDENCY="nss nspr"
19930
19931
19932
19933fi
19934
19935
19936# libnettle
19937USE_NETTLE="no"
19938
19939# Check whether --with-nettle was given.
19940if test ${with_nettle+y}
19941then :
19942  withval=$with_nettle;
19943	USE_NETTLE="yes"
19944
19945printf "%s\n" "#define HAVE_NETTLE 1" >>confdefs.h
19946
19947	ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
19948"
19949if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes
19950then :
19951  printf "%s\n" "#define HAVE_NETTLE_DSA_COMPAT_H 1" >>confdefs.h
19952
19953fi
19954
19955	if test "$withval" != "" -a "$withval" != "yes"; then
19956		CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
19957		LDFLAGS="$LDFLAGS -L$withval/lib"
19958
19959	if test "x$enable_rpath" = xyes; then
19960		if echo "$withval/lib" | grep "^/" >/dev/null; then
19961			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
19962		fi
19963	fi
19964
19965	else
19966		CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
19967	fi
19968        LIBS="$LIBS -lhogweed -lnettle -lgmp"
19969	SSLLIB=""
19970	PC_CRYPTO_DEPENDENCY="hogweed nettle"
19971
19972
19973
19974fi
19975
19976
19977# openssl
19978if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
19979
19980
19981# Check whether --with-ssl was given.
19982if test ${with_ssl+y}
19983then :
19984  withval=$with_ssl;
19985
19986else $as_nop
19987
19988            withval="yes"
19989
19990fi
19991
19992    if test x_$withval = x_no; then
19993	as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
19994    fi
19995
19996    withval=$withval
19997    if test x_$withval != x_no; then
19998        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
19999printf %s "checking for SSL... " >&6; }
20000	if test -n "$withval"; then
20001										if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then
20002			ssldir="$withval"
20003			found_ssl="yes"
20004			withval=""
20005			ssldir_include="$ssldir"
20006						ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'`
20007			if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
20008				: # found here
20009			else
20010				ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'`
20011				if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
20012					: # found here
20013				else
20014					as_fn_error $? "Could not find openssl lib file, $ssldir_lib/libssl.so,a, pass like \"/usr/local\" or \"/usr/include/openssl11\"" "$LINENO" 5
20015				fi
20016			fi
20017		fi
20018	fi
20019        if test x_$withval = x_ -o x_$withval = x_yes; then
20020            withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
20021        fi
20022        for dir in $withval; do
20023            ssldir="$dir"
20024            if test -f "$dir/include/openssl/ssl.h"; then
20025                found_ssl="yes"
20026		ssldir_include="$ssldir/include"
20027		if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then
20028			ssldir_lib="$ssldir/lib64"
20029		else
20030			ssldir_lib="$ssldir/lib"
20031		fi
20032                break;
20033            fi
20034        done
20035        if test x_$found_ssl != x_yes; then
20036            as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
20037        else
20038            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
20039printf "%s\n" "found in $ssldir" >&6; }
20040
20041printf "%s\n" "#define HAVE_SSL /**/" >>confdefs.h
20042
20043            HAVE_SSL=yes
20044	                if test "$ssldir" != "/usr"; then
20045		    CPPFLAGS="$CPPFLAGS -I$ssldir_include"
20046		    LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include"
20047		    LDFLAGS="$LDFLAGS -L$ssldir_lib"
20048		    LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib"
20049
20050	if test "x$enable_rpath" = xyes; then
20051		if echo "$ssldir_lib" | grep "^/" >/dev/null; then
20052			RUNTIME_PATH="$RUNTIME_PATH -R$ssldir_lib"
20053		fi
20054	fi
20055
20056	    fi
20057
20058            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5
20059printf %s "checking for EVP_sha256 in -lcrypto... " >&6; }
20060            LIBS="$LIBS -lcrypto"
20061            LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
20062            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20063/* end confdefs.h.  */
20064
20065int
20066main (void)
20067{
20068
20069                int EVP_sha256(void);
20070                (void)EVP_sha256();
20071
20072  ;
20073  return 0;
20074}
20075_ACEOF
20076if ac_fn_c_try_link "$LINENO"
20077then :
20078
20079                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20080printf "%s\n" "yes" >&6; }
20081
20082printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20083
20084
20085else $as_nop
20086
20087                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20088printf "%s\n" "no" >&6; }
20089                # check if -lwsock32 or -lgdi32 are needed.
20090                BAKLIBS="$LIBS"
20091                BAKSSLLIBS="$LIBSSL_LIBS"
20092		LIBS="$LIBS -lgdi32 -lws2_32"
20093		LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
20094                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
20095printf %s "checking if -lcrypto needs -lgdi32... " >&6; }
20096                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20097/* end confdefs.h.  */
20098
20099int
20100main (void)
20101{
20102
20103                    int EVP_sha256(void);
20104                    (void)EVP_sha256();
20105
20106  ;
20107  return 0;
20108}
20109_ACEOF
20110if ac_fn_c_try_link "$LINENO"
20111then :
20112
20113
20114printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20115
20116                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20117printf "%s\n" "yes" >&6; }
20118
20119else $as_nop
20120
20121                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20122printf "%s\n" "no" >&6; }
20123                    LIBS="$BAKLIBS"
20124                    LIBSSL_LIBS="$BAKSSLLIBS"
20125
20126		    LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32"
20127		    LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32"
20128                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32" >&5
20129printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32... " >&6; }
20130		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20131/* end confdefs.h.  */
20132
20133int
20134main (void)
20135{
20136
20137			int EVP_sha256(void);
20138			(void)EVP_sha256();
20139
20140  ;
20141  return 0;
20142}
20143_ACEOF
20144if ac_fn_c_try_link "$LINENO"
20145then :
20146
20147
20148printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20149
20150			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20151printf "%s\n" "yes" >&6; }
20152
20153else $as_nop
20154
20155			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20156printf "%s\n" "no" >&6; }
20157			LIBS="$BAKLIBS"
20158			LIBSSL_LIBS="$BAKSSLLIBS"
20159
20160			LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
20161			LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
20162			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" >&5
20163printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a... " >&6; }
20164			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20165/* end confdefs.h.  */
20166
20167int
20168main (void)
20169{
20170
20171			    int EVP_sha256(void);
20172			    (void)EVP_sha256();
20173
20174  ;
20175  return 0;
20176}
20177_ACEOF
20178if ac_fn_c_try_link "$LINENO"
20179then :
20180
20181
20182printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20183
20184			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20185printf "%s\n" "yes" >&6; }
20186
20187else $as_nop
20188
20189			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20190printf "%s\n" "no" >&6; }
20191			    LIBS="$BAKLIBS"
20192			    LIBSSL_LIBS="$BAKSSLLIBS"
20193
20194			    LIBS="$LIBS -ldl"
20195			    LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
20196			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
20197printf %s "checking if -lcrypto needs -ldl... " >&6; }
20198			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20199/* end confdefs.h.  */
20200
20201int
20202main (void)
20203{
20204
20205				int EVP_sha256(void);
20206				(void)EVP_sha256();
20207
20208  ;
20209  return 0;
20210}
20211_ACEOF
20212if ac_fn_c_try_link "$LINENO"
20213then :
20214
20215
20216printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20217
20218				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20219printf "%s\n" "yes" >&6; }
20220
20221else $as_nop
20222
20223				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20224printf "%s\n" "no" >&6; }
20225				LIBS="$BAKLIBS"
20226				LIBSSL_LIBS="$BAKSSLLIBS"
20227				LIBS="$LIBS -ldl -pthread"
20228				LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
20229				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
20230printf %s "checking if -lcrypto needs -ldl -pthread... " >&6; }
20231				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20232/* end confdefs.h.  */
20233
20234int
20235main (void)
20236{
20237
20238				    int EVP_sha256(void);
20239				    (void)EVP_sha256();
20240
20241  ;
20242  return 0;
20243}
20244_ACEOF
20245if ac_fn_c_try_link "$LINENO"
20246then :
20247
20248
20249printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20250
20251				    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20252printf "%s\n" "yes" >&6; }
20253
20254else $as_nop
20255
20256				    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20257printf "%s\n" "no" >&6; }
20258				    as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
20259
20260fi
20261rm -f core conftest.err conftest.$ac_objext conftest.beam \
20262    conftest$ac_exeext conftest.$ac_ext
20263
20264fi
20265rm -f core conftest.err conftest.$ac_objext conftest.beam \
20266    conftest$ac_exeext conftest.$ac_ext
20267
20268fi
20269rm -f core conftest.err conftest.$ac_objext conftest.beam \
20270    conftest$ac_exeext conftest.$ac_ext
20271
20272fi
20273rm -f core conftest.err conftest.$ac_objext conftest.beam \
20274    conftest$ac_exeext conftest.$ac_ext
20275
20276fi
20277rm -f core conftest.err conftest.$ac_objext conftest.beam \
20278    conftest$ac_exeext conftest.$ac_ext
20279
20280fi
20281rm -f core conftest.err conftest.$ac_objext conftest.beam \
20282    conftest$ac_exeext conftest.$ac_ext
20283        fi
20284
20285
20286    fi
20287ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
20288"
20289if test "x$ac_cv_header_openssl_ssl_h" = xyes
20290then :
20291  printf "%s\n" "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
20292
20293fi
20294
20295ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
20296"
20297if test "x$ac_cv_header_openssl_err_h" = xyes
20298then :
20299  printf "%s\n" "#define HAVE_OPENSSL_ERR_H 1" >>confdefs.h
20300
20301fi
20302
20303ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
20304"
20305if test "x$ac_cv_header_openssl_rand_h" = xyes
20306then :
20307  printf "%s\n" "#define HAVE_OPENSSL_RAND_H 1" >>confdefs.h
20308
20309fi
20310
20311
20312
20313
20314# check if libssl needs libdl
20315BAKLIBS="$LIBS"
20316LIBS="-lssl $LIBS"
20317{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
20318printf %s "checking if libssl needs libdl... " >&6; }
20319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20320/* end confdefs.h.  */
20321
20322/* Override any GCC internal prototype to avoid an error.
20323   Use char because int might match the return type of a GCC
20324   builtin and then its argument prototype would still apply.  */
20325char SSL_CTX_new ();
20326int
20327main (void)
20328{
20329return SSL_CTX_new ();
20330  ;
20331  return 0;
20332}
20333_ACEOF
20334if ac_fn_c_try_link "$LINENO"
20335then :
20336
20337	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20338printf "%s\n" "no" >&6; }
20339	LIBS="$BAKLIBS"
20340
20341else $as_nop
20342
20343	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20344printf "%s\n" "yes" >&6; }
20345	LIBS="$BAKLIBS"
20346	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
20347printf %s "checking for library containing dlopen... " >&6; }
20348if test ${ac_cv_search_dlopen+y}
20349then :
20350  printf %s "(cached) " >&6
20351else $as_nop
20352  ac_func_search_save_LIBS=$LIBS
20353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20354/* end confdefs.h.  */
20355
20356/* Override any GCC internal prototype to avoid an error.
20357   Use char because int might match the return type of a GCC
20358   builtin and then its argument prototype would still apply.  */
20359char dlopen ();
20360int
20361main (void)
20362{
20363return dlopen ();
20364  ;
20365  return 0;
20366}
20367_ACEOF
20368for ac_lib in '' dl
20369do
20370  if test -z "$ac_lib"; then
20371    ac_res="none required"
20372  else
20373    ac_res=-l$ac_lib
20374    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20375  fi
20376  if ac_fn_c_try_link "$LINENO"
20377then :
20378  ac_cv_search_dlopen=$ac_res
20379fi
20380rm -f core conftest.err conftest.$ac_objext conftest.beam \
20381    conftest$ac_exeext
20382  if test ${ac_cv_search_dlopen+y}
20383then :
20384  break
20385fi
20386done
20387if test ${ac_cv_search_dlopen+y}
20388then :
20389
20390else $as_nop
20391  ac_cv_search_dlopen=no
20392fi
20393rm conftest.$ac_ext
20394LIBS=$ac_func_search_save_LIBS
20395fi
20396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
20397printf "%s\n" "$ac_cv_search_dlopen" >&6; }
20398ac_res=$ac_cv_search_dlopen
20399if test "$ac_res" != no
20400then :
20401  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20402
20403fi
20404
20405
20406fi
20407rm -f core conftest.err conftest.$ac_objext conftest.beam \
20408    conftest$ac_exeext conftest.$ac_ext
20409SSLLIB="-lssl"
20410
20411PC_CRYPTO_DEPENDENCY=""
20412
20413
20414# check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
20415BAKLIBS="$LIBS"
20416LIBS="-lssl $LIBS"
20417{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
20418printf %s "checking if libssl needs -lcrypt32... " >&6; }
20419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20420/* end confdefs.h.  */
20421
20422int
20423main (void)
20424{
20425
20426	int EVP_sha256(void);
20427	(void)EVP_sha256();
20428
20429  ;
20430  return 0;
20431}
20432_ACEOF
20433if ac_fn_c_try_link "$LINENO"
20434then :
20435
20436	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20437printf "%s\n" "no" >&6; }
20438	LIBS="$BAKLIBS"
20439
20440else $as_nop
20441
20442	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20443printf "%s\n" "yes" >&6; }
20444	LIBS="$BAKLIBS"
20445	LIBS="$LIBS -lcrypt32"
20446
20447fi
20448rm -f core conftest.err conftest.$ac_objext conftest.beam \
20449    conftest$ac_exeext conftest.$ac_ext
20450
20451{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
20452printf %s "checking for LibreSSL... " >&6; }
20453if grep VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
20454	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20455printf "%s\n" "yes" >&6; }
20456
20457printf "%s\n" "#define HAVE_LIBRESSL 1" >>confdefs.h
20458
20459	# libressl provides these compat functions, but they may also be
20460	# declared by the OS in libc.  See if they have been declared.
20461	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
20462printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
20463if test ${ac_cv_c_undeclared_builtin_options+y}
20464then :
20465  printf %s "(cached) " >&6
20466else $as_nop
20467  ac_save_CFLAGS=$CFLAGS
20468   ac_cv_c_undeclared_builtin_options='cannot detect'
20469   for ac_arg in '' -fno-builtin; do
20470     CFLAGS="$ac_save_CFLAGS $ac_arg"
20471     # This test program should *not* compile successfully.
20472     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20473/* end confdefs.h.  */
20474
20475int
20476main (void)
20477{
20478(void) strchr;
20479  ;
20480  return 0;
20481}
20482_ACEOF
20483if ac_fn_c_try_compile "$LINENO"
20484then :
20485
20486else $as_nop
20487  # This test program should compile successfully.
20488        # No library function is consistently available on
20489        # freestanding implementations, so test against a dummy
20490        # declaration.  Include always-available headers on the
20491        # off chance that they somehow elicit warnings.
20492        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20493/* end confdefs.h.  */
20494#include <float.h>
20495#include <limits.h>
20496#include <stdarg.h>
20497#include <stddef.h>
20498extern void ac_decl (int, char *);
20499
20500int
20501main (void)
20502{
20503(void) ac_decl (0, (char *) 0);
20504  (void) ac_decl;
20505
20506  ;
20507  return 0;
20508}
20509_ACEOF
20510if ac_fn_c_try_compile "$LINENO"
20511then :
20512  if test x"$ac_arg" = x
20513then :
20514  ac_cv_c_undeclared_builtin_options='none needed'
20515else $as_nop
20516  ac_cv_c_undeclared_builtin_options=$ac_arg
20517fi
20518          break
20519fi
20520rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20521fi
20522rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20523    done
20524    CFLAGS=$ac_save_CFLAGS
20525
20526fi
20527{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
20528printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
20529  case $ac_cv_c_undeclared_builtin_options in #(
20530  'cannot detect') :
20531    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20532printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
20533as_fn_error $? "cannot make $CC report undeclared builtins
20534See \`config.log' for more details" "$LINENO" 5; } ;; #(
20535  'none needed') :
20536    ac_c_undeclared_builtin_options='' ;; #(
20537  *) :
20538    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
20539esac
20540
20541ac_fn_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20542if test "x$ac_cv_have_decl_strlcpy" = xyes
20543then :
20544  ac_have_decl=1
20545else $as_nop
20546  ac_have_decl=0
20547fi
20548printf "%s\n" "#define HAVE_DECL_STRLCPY $ac_have_decl" >>confdefs.h
20549ac_fn_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20550if test "x$ac_cv_have_decl_strlcat" = xyes
20551then :
20552  ac_have_decl=1
20553else $as_nop
20554  ac_have_decl=0
20555fi
20556printf "%s\n" "#define HAVE_DECL_STRLCAT $ac_have_decl" >>confdefs.h
20557ac_fn_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20558if test "x$ac_cv_have_decl_arc4random" = xyes
20559then :
20560  ac_have_decl=1
20561else $as_nop
20562  ac_have_decl=0
20563fi
20564printf "%s\n" "#define HAVE_DECL_ARC4RANDOM $ac_have_decl" >>confdefs.h
20565ac_fn_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20566if test "x$ac_cv_have_decl_arc4random_uniform" = xyes
20567then :
20568  ac_have_decl=1
20569else $as_nop
20570  ac_have_decl=0
20571fi
20572printf "%s\n" "#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl" >>confdefs.h
20573
20574else
20575	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20576printf "%s\n" "no" >&6; }
20577fi
20578ac_fn_c_check_header_compile "$LINENO" "openssl/conf.h" "ac_cv_header_openssl_conf_h" "$ac_includes_default
20579"
20580if test "x$ac_cv_header_openssl_conf_h" = xyes
20581then :
20582  printf "%s\n" "#define HAVE_OPENSSL_CONF_H 1" >>confdefs.h
20583
20584fi
20585ac_fn_c_check_header_compile "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default
20586"
20587if test "x$ac_cv_header_openssl_engine_h" = xyes
20588then :
20589  printf "%s\n" "#define HAVE_OPENSSL_ENGINE_H 1" >>confdefs.h
20590
20591fi
20592ac_fn_c_check_header_compile "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default
20593"
20594if test "x$ac_cv_header_openssl_bn_h" = xyes
20595then :
20596  printf "%s\n" "#define HAVE_OPENSSL_BN_H 1" >>confdefs.h
20597
20598fi
20599ac_fn_c_check_header_compile "$LINENO" "openssl/dh.h" "ac_cv_header_openssl_dh_h" "$ac_includes_default
20600"
20601if test "x$ac_cv_header_openssl_dh_h" = xyes
20602then :
20603  printf "%s\n" "#define HAVE_OPENSSL_DH_H 1" >>confdefs.h
20604
20605fi
20606ac_fn_c_check_header_compile "$LINENO" "openssl/dsa.h" "ac_cv_header_openssl_dsa_h" "$ac_includes_default
20607"
20608if test "x$ac_cv_header_openssl_dsa_h" = xyes
20609then :
20610  printf "%s\n" "#define HAVE_OPENSSL_DSA_H 1" >>confdefs.h
20611
20612fi
20613ac_fn_c_check_header_compile "$LINENO" "openssl/rsa.h" "ac_cv_header_openssl_rsa_h" "$ac_includes_default
20614"
20615if test "x$ac_cv_header_openssl_rsa_h" = xyes
20616then :
20617  printf "%s\n" "#define HAVE_OPENSSL_RSA_H 1" >>confdefs.h
20618
20619fi
20620ac_fn_c_check_header_compile "$LINENO" "openssl/core_names.h" "ac_cv_header_openssl_core_names_h" "$ac_includes_default
20621"
20622if test "x$ac_cv_header_openssl_core_names_h" = xyes
20623then :
20624  printf "%s\n" "#define HAVE_OPENSSL_CORE_NAMES_H 1" >>confdefs.h
20625
20626fi
20627ac_fn_c_check_header_compile "$LINENO" "openssl/param_build.h" "ac_cv_header_openssl_param_build_h" "$ac_includes_default
20628"
20629if test "x$ac_cv_header_openssl_param_build_h" = xyes
20630then :
20631  printf "%s\n" "#define HAVE_OPENSSL_PARAM_BUILD_H 1" >>confdefs.h
20632
20633fi
20634
20635ac_fn_c_check_func "$LINENO" "OPENSSL_config" "ac_cv_func_OPENSSL_config"
20636if test "x$ac_cv_func_OPENSSL_config" = xyes
20637then :
20638  printf "%s\n" "#define HAVE_OPENSSL_CONFIG 1" >>confdefs.h
20639
20640fi
20641ac_fn_c_check_func "$LINENO" "EVP_sha1" "ac_cv_func_EVP_sha1"
20642if test "x$ac_cv_func_EVP_sha1" = xyes
20643then :
20644  printf "%s\n" "#define HAVE_EVP_SHA1 1" >>confdefs.h
20645
20646fi
20647ac_fn_c_check_func "$LINENO" "EVP_sha256" "ac_cv_func_EVP_sha256"
20648if test "x$ac_cv_func_EVP_sha256" = xyes
20649then :
20650  printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
20651
20652fi
20653ac_fn_c_check_func "$LINENO" "EVP_sha512" "ac_cv_func_EVP_sha512"
20654if test "x$ac_cv_func_EVP_sha512" = xyes
20655then :
20656  printf "%s\n" "#define HAVE_EVP_SHA512 1" >>confdefs.h
20657
20658fi
20659ac_fn_c_check_func "$LINENO" "FIPS_mode" "ac_cv_func_FIPS_mode"
20660if test "x$ac_cv_func_FIPS_mode" = xyes
20661then :
20662  printf "%s\n" "#define HAVE_FIPS_MODE 1" >>confdefs.h
20663
20664fi
20665ac_fn_c_check_func "$LINENO" "EVP_default_properties_is_fips_enabled" "ac_cv_func_EVP_default_properties_is_fips_enabled"
20666if test "x$ac_cv_func_EVP_default_properties_is_fips_enabled" = xyes
20667then :
20668  printf "%s\n" "#define HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED 1" >>confdefs.h
20669
20670fi
20671ac_fn_c_check_func "$LINENO" "EVP_MD_CTX_new" "ac_cv_func_EVP_MD_CTX_new"
20672if test "x$ac_cv_func_EVP_MD_CTX_new" = xyes
20673then :
20674  printf "%s\n" "#define HAVE_EVP_MD_CTX_NEW 1" >>confdefs.h
20675
20676fi
20677ac_fn_c_check_func "$LINENO" "OpenSSL_add_all_digests" "ac_cv_func_OpenSSL_add_all_digests"
20678if test "x$ac_cv_func_OpenSSL_add_all_digests" = xyes
20679then :
20680  printf "%s\n" "#define HAVE_OPENSSL_ADD_ALL_DIGESTS 1" >>confdefs.h
20681
20682fi
20683ac_fn_c_check_func "$LINENO" "OPENSSL_init_crypto" "ac_cv_func_OPENSSL_init_crypto"
20684if test "x$ac_cv_func_OPENSSL_init_crypto" = xyes
20685then :
20686  printf "%s\n" "#define HAVE_OPENSSL_INIT_CRYPTO 1" >>confdefs.h
20687
20688fi
20689ac_fn_c_check_func "$LINENO" "EVP_cleanup" "ac_cv_func_EVP_cleanup"
20690if test "x$ac_cv_func_EVP_cleanup" = xyes
20691then :
20692  printf "%s\n" "#define HAVE_EVP_CLEANUP 1" >>confdefs.h
20693
20694fi
20695ac_fn_c_check_func "$LINENO" "ENGINE_cleanup" "ac_cv_func_ENGINE_cleanup"
20696if test "x$ac_cv_func_ENGINE_cleanup" = xyes
20697then :
20698  printf "%s\n" "#define HAVE_ENGINE_CLEANUP 1" >>confdefs.h
20699
20700fi
20701ac_fn_c_check_func "$LINENO" "ERR_load_crypto_strings" "ac_cv_func_ERR_load_crypto_strings"
20702if test "x$ac_cv_func_ERR_load_crypto_strings" = xyes
20703then :
20704  printf "%s\n" "#define HAVE_ERR_LOAD_CRYPTO_STRINGS 1" >>confdefs.h
20705
20706fi
20707ac_fn_c_check_func "$LINENO" "CRYPTO_cleanup_all_ex_data" "ac_cv_func_CRYPTO_cleanup_all_ex_data"
20708if test "x$ac_cv_func_CRYPTO_cleanup_all_ex_data" = xyes
20709then :
20710  printf "%s\n" "#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1" >>confdefs.h
20711
20712fi
20713ac_fn_c_check_func "$LINENO" "ERR_free_strings" "ac_cv_func_ERR_free_strings"
20714if test "x$ac_cv_func_ERR_free_strings" = xyes
20715then :
20716  printf "%s\n" "#define HAVE_ERR_FREE_STRINGS 1" >>confdefs.h
20717
20718fi
20719ac_fn_c_check_func "$LINENO" "RAND_cleanup" "ac_cv_func_RAND_cleanup"
20720if test "x$ac_cv_func_RAND_cleanup" = xyes
20721then :
20722  printf "%s\n" "#define HAVE_RAND_CLEANUP 1" >>confdefs.h
20723
20724fi
20725ac_fn_c_check_func "$LINENO" "DSA_SIG_set0" "ac_cv_func_DSA_SIG_set0"
20726if test "x$ac_cv_func_DSA_SIG_set0" = xyes
20727then :
20728  printf "%s\n" "#define HAVE_DSA_SIG_SET0 1" >>confdefs.h
20729
20730fi
20731ac_fn_c_check_func "$LINENO" "EVP_dss1" "ac_cv_func_EVP_dss1"
20732if test "x$ac_cv_func_EVP_dss1" = xyes
20733then :
20734  printf "%s\n" "#define HAVE_EVP_DSS1 1" >>confdefs.h
20735
20736fi
20737ac_fn_c_check_func "$LINENO" "EVP_DigestVerify" "ac_cv_func_EVP_DigestVerify"
20738if test "x$ac_cv_func_EVP_DigestVerify" = xyes
20739then :
20740  printf "%s\n" "#define HAVE_EVP_DIGESTVERIFY 1" >>confdefs.h
20741
20742fi
20743ac_fn_c_check_func "$LINENO" "EVP_aes_256_cbc" "ac_cv_func_EVP_aes_256_cbc"
20744if test "x$ac_cv_func_EVP_aes_256_cbc" = xyes
20745then :
20746  printf "%s\n" "#define HAVE_EVP_AES_256_CBC 1" >>confdefs.h
20747
20748fi
20749ac_fn_c_check_func "$LINENO" "EVP_EncryptInit_ex" "ac_cv_func_EVP_EncryptInit_ex"
20750if test "x$ac_cv_func_EVP_EncryptInit_ex" = xyes
20751then :
20752  printf "%s\n" "#define HAVE_EVP_ENCRYPTINIT_EX 1" >>confdefs.h
20753
20754fi
20755ac_fn_c_check_func "$LINENO" "HMAC_Init_ex" "ac_cv_func_HMAC_Init_ex"
20756if test "x$ac_cv_func_HMAC_Init_ex" = xyes
20757then :
20758  printf "%s\n" "#define HAVE_HMAC_INIT_EX 1" >>confdefs.h
20759
20760fi
20761ac_fn_c_check_func "$LINENO" "CRYPTO_THREADID_set_callback" "ac_cv_func_CRYPTO_THREADID_set_callback"
20762if test "x$ac_cv_func_CRYPTO_THREADID_set_callback" = xyes
20763then :
20764  printf "%s\n" "#define HAVE_CRYPTO_THREADID_SET_CALLBACK 1" >>confdefs.h
20765
20766fi
20767ac_fn_c_check_func "$LINENO" "EVP_MAC_CTX_set_params" "ac_cv_func_EVP_MAC_CTX_set_params"
20768if test "x$ac_cv_func_EVP_MAC_CTX_set_params" = xyes
20769then :
20770  printf "%s\n" "#define HAVE_EVP_MAC_CTX_SET_PARAMS 1" >>confdefs.h
20771
20772fi
20773ac_fn_c_check_func "$LINENO" "OSSL_PARAM_BLD_new" "ac_cv_func_OSSL_PARAM_BLD_new"
20774if test "x$ac_cv_func_OSSL_PARAM_BLD_new" = xyes
20775then :
20776  printf "%s\n" "#define HAVE_OSSL_PARAM_BLD_NEW 1" >>confdefs.h
20777
20778fi
20779ac_fn_c_check_func "$LINENO" "BIO_set_callback_ex" "ac_cv_func_BIO_set_callback_ex"
20780if test "x$ac_cv_func_BIO_set_callback_ex" = xyes
20781then :
20782  printf "%s\n" "#define HAVE_BIO_SET_CALLBACK_EX 1" >>confdefs.h
20783
20784fi
20785ac_fn_c_check_func "$LINENO" "SSL_CTX_set_tmp_ecdh" "ac_cv_func_SSL_CTX_set_tmp_ecdh"
20786if test "x$ac_cv_func_SSL_CTX_set_tmp_ecdh" = xyes
20787then :
20788  printf "%s\n" "#define HAVE_SSL_CTX_SET_TMP_ECDH 1" >>confdefs.h
20789
20790fi
20791
20792
20793# these check_funcs need -lssl
20794BAKLIBS="$LIBS"
20795LIBS="-lssl $LIBS"
20796ac_fn_c_check_func "$LINENO" "OPENSSL_init_ssl" "ac_cv_func_OPENSSL_init_ssl"
20797if test "x$ac_cv_func_OPENSSL_init_ssl" = xyes
20798then :
20799  printf "%s\n" "#define HAVE_OPENSSL_INIT_SSL 1" >>confdefs.h
20800
20801fi
20802ac_fn_c_check_func "$LINENO" "SSL_CTX_set_security_level" "ac_cv_func_SSL_CTX_set_security_level"
20803if test "x$ac_cv_func_SSL_CTX_set_security_level" = xyes
20804then :
20805  printf "%s\n" "#define HAVE_SSL_CTX_SET_SECURITY_LEVEL 1" >>confdefs.h
20806
20807fi
20808ac_fn_c_check_func "$LINENO" "SSL_set1_host" "ac_cv_func_SSL_set1_host"
20809if test "x$ac_cv_func_SSL_set1_host" = xyes
20810then :
20811  printf "%s\n" "#define HAVE_SSL_SET1_HOST 1" >>confdefs.h
20812
20813fi
20814ac_fn_c_check_func "$LINENO" "SSL_get0_peername" "ac_cv_func_SSL_get0_peername"
20815if test "x$ac_cv_func_SSL_get0_peername" = xyes
20816then :
20817  printf "%s\n" "#define HAVE_SSL_GET0_PEERNAME 1" >>confdefs.h
20818
20819fi
20820ac_fn_c_check_func "$LINENO" "X509_VERIFY_PARAM_set1_host" "ac_cv_func_X509_VERIFY_PARAM_set1_host"
20821if test "x$ac_cv_func_X509_VERIFY_PARAM_set1_host" = xyes
20822then :
20823  printf "%s\n" "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
20824
20825fi
20826ac_fn_c_check_func "$LINENO" "SSL_CTX_set_ciphersuites" "ac_cv_func_SSL_CTX_set_ciphersuites"
20827if test "x$ac_cv_func_SSL_CTX_set_ciphersuites" = xyes
20828then :
20829  printf "%s\n" "#define HAVE_SSL_CTX_SET_CIPHERSUITES 1" >>confdefs.h
20830
20831fi
20832ac_fn_c_check_func "$LINENO" "SSL_CTX_set_tlsext_ticket_key_evp_cb" "ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb"
20833if test "x$ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb" = xyes
20834then :
20835  printf "%s\n" "#define HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB 1" >>confdefs.h
20836
20837fi
20838ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_select_cb" "ac_cv_func_SSL_CTX_set_alpn_select_cb"
20839if test "x$ac_cv_func_SSL_CTX_set_alpn_select_cb" = xyes
20840then :
20841  printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_SELECT_CB 1" >>confdefs.h
20842
20843fi
20844ac_fn_c_check_func "$LINENO" "SSL_get0_alpn_selected" "ac_cv_func_SSL_get0_alpn_selected"
20845if test "x$ac_cv_func_SSL_get0_alpn_selected" = xyes
20846then :
20847  printf "%s\n" "#define HAVE_SSL_GET0_ALPN_SELECTED 1" >>confdefs.h
20848
20849fi
20850ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_protos" "ac_cv_func_SSL_CTX_set_alpn_protos"
20851if test "x$ac_cv_func_SSL_CTX_set_alpn_protos" = xyes
20852then :
20853  printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_PROTOS 1" >>confdefs.h
20854
20855fi
20856ac_fn_c_check_func "$LINENO" "SSL_get1_peer_certificate" "ac_cv_func_SSL_get1_peer_certificate"
20857if test "x$ac_cv_func_SSL_get1_peer_certificate" = xyes
20858then :
20859  printf "%s\n" "#define HAVE_SSL_GET1_PEER_CERTIFICATE 1" >>confdefs.h
20860
20861fi
20862
20863LIBS="$BAKLIBS"
20864
20865ac_fn_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
20866$ac_includes_default
20867#ifdef HAVE_OPENSSL_ERR_H
20868#include <openssl/err.h>
20869#endif
20870
20871#ifdef HAVE_OPENSSL_RAND_H
20872#include <openssl/rand.h>
20873#endif
20874
20875#ifdef HAVE_OPENSSL_CONF_H
20876#include <openssl/conf.h>
20877#endif
20878
20879#ifdef HAVE_OPENSSL_ENGINE_H
20880#include <openssl/engine.h>
20881#endif
20882#include <openssl/ssl.h>
20883#include <openssl/evp.h>
20884
20885" "$ac_c_undeclared_builtin_options" "CFLAGS"
20886if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes
20887then :
20888  ac_have_decl=1
20889else $as_nop
20890  ac_have_decl=0
20891fi
20892printf "%s\n" "#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl" >>confdefs.h
20893ac_fn_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
20894$ac_includes_default
20895#ifdef HAVE_OPENSSL_ERR_H
20896#include <openssl/err.h>
20897#endif
20898
20899#ifdef HAVE_OPENSSL_RAND_H
20900#include <openssl/rand.h>
20901#endif
20902
20903#ifdef HAVE_OPENSSL_CONF_H
20904#include <openssl/conf.h>
20905#endif
20906
20907#ifdef HAVE_OPENSSL_ENGINE_H
20908#include <openssl/engine.h>
20909#endif
20910#include <openssl/ssl.h>
20911#include <openssl/evp.h>
20912
20913" "$ac_c_undeclared_builtin_options" "CFLAGS"
20914if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes
20915then :
20916  ac_have_decl=1
20917else $as_nop
20918  ac_have_decl=0
20919fi
20920printf "%s\n" "#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl" >>confdefs.h
20921ac_fn_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
20922$ac_includes_default
20923#ifdef HAVE_OPENSSL_ERR_H
20924#include <openssl/err.h>
20925#endif
20926
20927#ifdef HAVE_OPENSSL_RAND_H
20928#include <openssl/rand.h>
20929#endif
20930
20931#ifdef HAVE_OPENSSL_CONF_H
20932#include <openssl/conf.h>
20933#endif
20934
20935#ifdef HAVE_OPENSSL_ENGINE_H
20936#include <openssl/engine.h>
20937#endif
20938#include <openssl/ssl.h>
20939#include <openssl/evp.h>
20940
20941" "$ac_c_undeclared_builtin_options" "CFLAGS"
20942if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes
20943then :
20944  ac_have_decl=1
20945else $as_nop
20946  ac_have_decl=0
20947fi
20948printf "%s\n" "#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl" >>confdefs.h
20949
20950
20951if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then
20952# check function return type.
20953{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5
20954printf %s "checking the return type of HMAC_Init_ex... " >&6; }
20955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20956/* end confdefs.h.  */
20957
20958#ifdef HAVE_OPENSSL_ERR_H
20959#include <openssl/err.h>
20960#endif
20961
20962#ifdef HAVE_OPENSSL_RAND_H
20963#include <openssl/rand.h>
20964#endif
20965
20966#ifdef HAVE_OPENSSL_CONF_H
20967#include <openssl/conf.h>
20968#endif
20969
20970#ifdef HAVE_OPENSSL_ENGINE_H
20971#include <openssl/engine.h>
20972#endif
20973#include <openssl/ssl.h>
20974#include <openssl/evp.h>
20975
20976int
20977main (void)
20978{
20979
20980	HMAC_CTX* hmac_ctx = NULL;
20981	void* hmac_key = NULL;
20982	const EVP_MD* digest = NULL;
20983	int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);
20984	(void)x;
20985
20986  ;
20987  return 0;
20988}
20989_ACEOF
20990if ac_fn_c_try_compile "$LINENO"
20991then :
20992
20993	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: int" >&5
20994printf "%s\n" "int" >&6; }
20995
20996else $as_nop
20997
20998	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: void" >&5
20999printf "%s\n" "void" >&6; }
21000
21001printf "%s\n" "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h
21002
21003
21004fi
21005rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21006fi
21007
21008fi
21009
21010
21011# libbsd
21012
21013# Check whether --with-libbsd was given.
21014if test ${with_libbsd+y}
21015then :
21016  withval=$with_libbsd;
21017	ac_fn_c_check_header_compile "$LINENO" "bsd/string.h" "ac_cv_header_bsd_string_h" "$ac_includes_default
21018"
21019if test "x$ac_cv_header_bsd_string_h" = xyes
21020then :
21021  printf "%s\n" "#define HAVE_BSD_STRING_H 1" >>confdefs.h
21022
21023fi
21024ac_fn_c_check_header_compile "$LINENO" "bsd/stdlib.h" "ac_cv_header_bsd_stdlib_h" "$ac_includes_default
21025"
21026if test "x$ac_cv_header_bsd_stdlib_h" = xyes
21027then :
21028  printf "%s\n" "#define HAVE_BSD_STDLIB_H 1" >>confdefs.h
21029
21030fi
21031
21032	if test "x$ac_cv_header_bsd_string_h" = xyes -a "x$ac_cv_header_bsd_stdlib_h" = xyes; then
21033		for func in strlcpy strlcat arc4random arc4random_uniform reallocarray; do
21034			as_ac_Search=`printf "%s\n" "ac_cv_search_$func" | $as_tr_sh`
21035{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing $func" >&5
21036printf %s "checking for library containing $func... " >&6; }
21037if eval test \${$as_ac_Search+y}
21038then :
21039  printf %s "(cached) " >&6
21040else $as_nop
21041  ac_func_search_save_LIBS=$LIBS
21042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21043/* end confdefs.h.  */
21044
21045/* Override any GCC internal prototype to avoid an error.
21046   Use char because int might match the return type of a GCC
21047   builtin and then its argument prototype would still apply.  */
21048char $func ();
21049int
21050main (void)
21051{
21052return $func ();
21053  ;
21054  return 0;
21055}
21056_ACEOF
21057for ac_lib in '' bsd
21058do
21059  if test -z "$ac_lib"; then
21060    ac_res="none required"
21061  else
21062    ac_res=-l$ac_lib
21063    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21064  fi
21065  if ac_fn_c_try_link "$LINENO"
21066then :
21067  eval "$as_ac_Search=\$ac_res"
21068fi
21069rm -f core conftest.err conftest.$ac_objext conftest.beam \
21070    conftest$ac_exeext
21071  if eval test \${$as_ac_Search+y}
21072then :
21073  break
21074fi
21075done
21076if eval test \${$as_ac_Search+y}
21077then :
21078
21079else $as_nop
21080  eval "$as_ac_Search=no"
21081fi
21082rm conftest.$ac_ext
21083LIBS=$ac_func_search_save_LIBS
21084fi
21085eval ac_res=\$$as_ac_Search
21086	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21087printf "%s\n" "$ac_res" >&6; }
21088eval ac_res=\$$as_ac_Search
21089if test "$ac_res" != no
21090then :
21091  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21092
21093
21094printf "%s\n" "#define HAVE_LIBBSD 1" >>confdefs.h
21095
21096				PC_LIBBSD_DEPENDENCY=libbsd
21097
21098
21099fi
21100
21101		done
21102	fi
21103
21104fi
21105
21106
21107# Check whether --enable-sha1 was given.
21108if test ${enable_sha1+y}
21109then :
21110  enableval=$enable_sha1;
21111fi
21112
21113case "$enable_sha1" in
21114	no)
21115	;;
21116	yes|*)
21117
21118printf "%s\n" "#define USE_SHA1 1" >>confdefs.h
21119
21120	;;
21121esac
21122
21123
21124# Check whether --enable-sha2 was given.
21125if test ${enable_sha2+y}
21126then :
21127  enableval=$enable_sha2;
21128fi
21129
21130case "$enable_sha2" in
21131	no)
21132	;;
21133	yes|*)
21134
21135printf "%s\n" "#define USE_SHA2 1" >>confdefs.h
21136
21137	;;
21138esac
21139
21140# Check whether --enable-subnet was given.
21141if test ${enable_subnet+y}
21142then :
21143  enableval=$enable_subnet;
21144fi
21145
21146case "$enable_subnet" in
21147	yes)
21148
21149printf "%s\n" "#define CLIENT_SUBNET 1" >>confdefs.h
21150
21151	SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
21152
21153	SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
21154
21155	;;
21156	no|*)
21157	;;
21158esac
21159
21160# check whether gost also works
21161
21162# Check whether --enable-gost was given.
21163if test ${enable_gost+y}
21164then :
21165  enableval=$enable_gost;
21166fi
21167
21168use_gost="no"
21169if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21170case "$enable_gost" in
21171	no)
21172	;;
21173	*)
21174	ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
21175if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes
21176then :
21177  :
21178else $as_nop
21179  as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
21180fi
21181
21182	ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
21183if test "x$ac_cv_func_EC_KEY_new" = xyes
21184then :
21185
21186else $as_nop
21187  as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
21188fi
21189
21190
21191{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
21192printf %s "checking if GOST works... " >&6; }
21193if test c${cross_compiling} = cno; then
21194BAKCFLAGS="$CFLAGS"
21195if test -n "$ssldir"; then
21196	CFLAGS="$CFLAGS -Wl,-rpath,$ssldir_lib"
21197fi
21198if test "$cross_compiling" = yes
21199then :
21200  eval "ac_cv_c_gost_works=maybe"
21201else $as_nop
21202  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21203/* end confdefs.h.  */
21204
21205#include <string.h>
21206#include <openssl/ssl.h>
21207#include <openssl/evp.h>
21208#include <openssl/engine.h>
21209#include <openssl/conf.h>
21210/* routine to load gost (from sldns) */
21211int load_gost_id(void)
21212{
21213	static int gost_id = 0;
21214	const EVP_PKEY_ASN1_METHOD* meth;
21215	ENGINE* e;
21216
21217	if(gost_id) return gost_id;
21218
21219	/* see if configuration loaded gost implementation from other engine*/
21220	meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
21221	if(meth) {
21222		EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
21223		return gost_id;
21224	}
21225
21226	/* see if engine can be loaded already */
21227	e = ENGINE_by_id("gost");
21228	if(!e) {
21229		/* load it ourself, in case statically linked */
21230		ENGINE_load_builtin_engines();
21231		ENGINE_load_dynamic();
21232		e = ENGINE_by_id("gost");
21233	}
21234	if(!e) {
21235		/* no gost engine in openssl */
21236		return 0;
21237	}
21238	if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
21239		ENGINE_finish(e);
21240		ENGINE_free(e);
21241		return 0;
21242	}
21243
21244	meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
21245	if(!meth) {
21246		/* algo not found */
21247		ENGINE_finish(e);
21248		ENGINE_free(e);
21249		return 0;
21250	}
21251	EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
21252	return gost_id;
21253}
21254int main(void) {
21255	EVP_MD_CTX* ctx;
21256	const EVP_MD* md;
21257	unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
21258	const char* str = "Hello world";
21259	const unsigned char check[] = {
21260		0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
21261		0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
21262		0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
21263		0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
21264	};
21265	OPENSSL_config(NULL);
21266	(void)load_gost_id();
21267	md = EVP_get_digestbyname("md_gost94");
21268	if(!md) return 1;
21269	memset(digest, 0, sizeof(digest));
21270	ctx = EVP_MD_CTX_create();
21271	if(!ctx) return 2;
21272	if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
21273	if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
21274	if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
21275	/* uncomment to see the hash calculated.
21276		{int i;
21277		for(i=0; i<32; i++)
21278			printf(" %2.2x", (int)digest[i]);
21279		printf("\n");}
21280	*/
21281	if(memcmp(digest, check, sizeof(check)) != 0)
21282		return 6;
21283	return 0;
21284}
21285
21286_ACEOF
21287if ac_fn_c_try_run "$LINENO"
21288then :
21289  eval "ac_cv_c_gost_works=yes"
21290else $as_nop
21291  eval "ac_cv_c_gost_works=no"
21292fi
21293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21294  conftest.$ac_objext conftest.beam conftest.$ac_ext
21295fi
21296
21297CFLAGS="$BAKCFLAGS"
21298else
21299eval "ac_cv_c_gost_works=maybe"
21300fi
21301{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
21302printf "%s\n" "$ac_cv_c_gost_works" >&6; }
21303
21304	if test "$ac_cv_c_gost_works" != no; then
21305		use_gost="yes"
21306
21307printf "%s\n" "#define USE_GOST 1" >>confdefs.h
21308
21309	fi
21310	;;
21311esac
21312fi
21313# Check whether --enable-ecdsa was given.
21314if test ${enable_ecdsa+y}
21315then :
21316  enableval=$enable_ecdsa;
21317fi
21318
21319use_ecdsa="no"
21320case "$enable_ecdsa" in
21321    no)
21322      ;;
21323    *)
21324      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21325	      ac_fn_c_check_func "$LINENO" "EVP_PKEY_fromdata" "ac_cv_func_EVP_PKEY_fromdata"
21326if test "x$ac_cv_func_EVP_PKEY_fromdata" = xyes
21327then :
21328
21329	          # with EVP_PKEY_fromdata, check if EC is not disabled
21330	          ac_fn_check_decl "$LINENO" "OPENSSL_NO_EC" "ac_cv_have_decl_OPENSSL_NO_EC" "$ac_includes_default
21331#include <openssl/evp.h>
21332
21333" "$ac_c_undeclared_builtin_options" "CFLAGS"
21334if test "x$ac_cv_have_decl_OPENSSL_NO_EC" = xyes
21335then :
21336  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21337
21338fi
21339
21340else $as_nop
21341
21342		  # without EVP_PKEY_fromdata, older openssl, check for support
21343		  ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
21344if test "x$ac_cv_func_ECDSA_sign" = xyes
21345then :
21346
21347else $as_nop
21348  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21349fi
21350
21351		  ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
21352if test "x$ac_cv_func_SHA384_Init" = xyes
21353then :
21354
21355else $as_nop
21356  as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21357fi
21358
21359
21360fi
21361
21362	      ac_fn_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
21363#include <openssl/evp.h>
21364
21365" "$ac_c_undeclared_builtin_options" "CFLAGS"
21366if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes
21367then :
21368  ac_have_decl=1
21369else $as_nop
21370  ac_have_decl=0
21371fi
21372printf "%s\n" "#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl" >>confdefs.h
21373if test $ac_have_decl = 1
21374then :
21375
21376else $as_nop
21377  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21378fi
21379ac_fn_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
21380#include <openssl/evp.h>
21381
21382" "$ac_c_undeclared_builtin_options" "CFLAGS"
21383if test "x$ac_cv_have_decl_NID_secp384r1" = xyes
21384then :
21385  ac_have_decl=1
21386else $as_nop
21387  ac_have_decl=0
21388fi
21389printf "%s\n" "#define HAVE_DECL_NID_SECP384R1 $ac_have_decl" >>confdefs.h
21390if test $ac_have_decl = 1
21391then :
21392
21393else $as_nop
21394  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
21395fi
21396
21397	      # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
21398	      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
21399printf %s "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
21400	      if grep OPENSSL_VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
21401		if grep OPENSSL_VERSION_NUMBER $ssldir_include/openssl/opensslv.h | grep 0x0 >/dev/null; then
21402		  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21403printf "%s\n" "no" >&6; }
21404
21405printf "%s\n" "#define USE_ECDSA_EVP_WORKAROUND 1" >>confdefs.h
21406
21407		else
21408		  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21409printf "%s\n" "yes" >&6; }
21410		fi
21411	      else
21412		# not OpenSSL, thus likely LibreSSL, which supports it
21413		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21414printf "%s\n" "yes" >&6; }
21415	      fi
21416      fi
21417      # we now know we have ECDSA and the required curves.
21418
21419printf "%s\n" "#define USE_ECDSA 1" >>confdefs.h
21420
21421      use_ecdsa="yes"
21422      ;;
21423esac
21424
21425# Check whether --enable-dsa was given.
21426if test ${enable_dsa+y}
21427then :
21428  enableval=$enable_dsa;
21429fi
21430
21431use_dsa="no"
21432case "$enable_dsa" in
21433    yes)
21434      # detect if DSA is supported, and turn it off if not.
21435      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21436      ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
21437if test "x$ac_cv_func_DSA_SIG_new" = xyes
21438then :
21439
21440      as_ac_Type=`printf "%s\n" "ac_cv_type_DSA_SIG*" | $as_tr_sh`
21441ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
21442$ac_includes_default
21443#ifdef HAVE_OPENSSL_ERR_H
21444#include <openssl/err.h>
21445#endif
21446
21447#ifdef HAVE_OPENSSL_RAND_H
21448#include <openssl/rand.h>
21449#endif
21450
21451#ifdef HAVE_OPENSSL_CONF_H
21452#include <openssl/conf.h>
21453#endif
21454
21455#ifdef HAVE_OPENSSL_ENGINE_H
21456#include <openssl/engine.h>
21457#endif
21458
21459"
21460if eval test \"x\$"$as_ac_Type"\" = x"yes"
21461then :
21462
21463
21464printf "%s\n" "#define USE_DSA 1" >>confdefs.h
21465
21466
21467else $as_nop
21468  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
21469               fi
21470fi
21471
21472
21473else $as_nop
21474  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
21475               fi
21476fi
21477
21478      else
21479
21480printf "%s\n" "#define USE_DSA 1" >>confdefs.h
21481
21482      fi
21483      ;;
21484    *)
21485      # disable dsa by default, RFC 8624 section 3.1, validators MUST NOT
21486      # support DSA for DNSSEC Validation.
21487      ;;
21488esac
21489
21490
21491# Check whether --with-deprecate-rsa-1024 was given.
21492if test ${with_deprecate_rsa_1024+y}
21493then :
21494  withval=$with_deprecate_rsa_1024;
21495fi
21496
21497if test "$with_deprecate_rsa_1024" = "yes"; then
21498
21499printf "%s\n" "#define DEPRECATE_RSA_1024 1" >>confdefs.h
21500
21501fi
21502
21503# Check whether --enable-ed25519 was given.
21504if test ${enable_ed25519+y}
21505then :
21506  enableval=$enable_ed25519;
21507fi
21508
21509use_ed25519="no"
21510case "$enable_ed25519" in
21511    no)
21512      ;;
21513    *)
21514      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21515	      ac_fn_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
21516#include <openssl/evp.h>
21517
21518" "$ac_c_undeclared_builtin_options" "CFLAGS"
21519if test "x$ac_cv_have_decl_NID_ED25519" = xyes
21520then :
21521  ac_have_decl=1
21522else $as_nop
21523  ac_have_decl=0
21524fi
21525printf "%s\n" "#define HAVE_DECL_NID_ED25519 $ac_have_decl" >>confdefs.h
21526if test $ac_have_decl = 1
21527then :
21528
21529      		use_ed25519="yes"
21530
21531else $as_nop
21532   if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
21533	      	fi
21534fi
21535
21536      fi
21537      if test $USE_NETTLE = "yes"; then
21538		       for ac_header in nettle/eddsa.h
21539do :
21540  ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
21541"
21542if test "x$ac_cv_header_nettle_eddsa_h" = xyes
21543then :
21544  printf "%s\n" "#define HAVE_NETTLE_EDDSA_H 1" >>confdefs.h
21545 use_ed25519="yes"
21546fi
21547
21548done
21549      fi
21550      if test $use_ed25519 = "yes"; then
21551
21552printf "%s\n" "#define USE_ED25519 1" >>confdefs.h
21553
21554      fi
21555      ;;
21556esac
21557
21558# Check whether --enable-ed448 was given.
21559if test ${enable_ed448+y}
21560then :
21561  enableval=$enable_ed448;
21562fi
21563
21564use_ed448="no"
21565case "$enable_ed448" in
21566    no)
21567      ;;
21568    *)
21569      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
21570	      ac_fn_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
21571#include <openssl/evp.h>
21572
21573" "$ac_c_undeclared_builtin_options" "CFLAGS"
21574if test "x$ac_cv_have_decl_NID_ED448" = xyes
21575then :
21576  ac_have_decl=1
21577else $as_nop
21578  ac_have_decl=0
21579fi
21580printf "%s\n" "#define HAVE_DECL_NID_ED448 $ac_have_decl" >>confdefs.h
21581if test $ac_have_decl = 1
21582then :
21583
21584      		use_ed448="yes"
21585
21586else $as_nop
21587   if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
21588	      	fi
21589fi
21590
21591      fi
21592      if test $use_ed448 = "yes"; then
21593
21594printf "%s\n" "#define USE_ED448 1" >>confdefs.h
21595
21596      fi
21597      ;;
21598esac
21599
21600# Check whether --enable-event-api was given.
21601if test ${enable_event_api+y}
21602then :
21603  enableval=$enable_event_api;
21604fi
21605
21606case "$enable_event_api" in
21607    yes)
21608      UNBOUND_EVENT_INSTALL=unbound-event-install
21609
21610      UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
21611
21612      ;;
21613    *)
21614      ;;
21615esac
21616
21617# Check whether --enable-tfo-client was given.
21618if test ${enable_tfo_client+y}
21619then :
21620  enableval=$enable_tfo_client;
21621fi
21622
21623case "$enable_tfo_client" in
21624	yes)
21625		case "$host_os" in
21626			linux*) ac_fn_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
21627#include <netinet/tcp.h>
21628
21629" "$ac_c_undeclared_builtin_options" "CFLAGS"
21630if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes
21631then :
21632  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
21633printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
21634else $as_nop
21635  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
21636fi
21637
21638printf "%s\n" "#define USE_MSG_FASTOPEN 1" >>confdefs.h
21639
21640				;;
21641			darwin*) ac_fn_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
21642#include <sys/socket.h>
21643
21644" "$ac_c_undeclared_builtin_options" "CFLAGS"
21645if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes
21646then :
21647  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
21648printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
21649else $as_nop
21650  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
21651fi
21652
21653printf "%s\n" "#define USE_OSX_MSG_FASTOPEN 1" >>confdefs.h
21654
21655				;;
21656		esac
21657		;;
21658	no|*)
21659		;;
21660esac
21661
21662# Check whether --enable-tfo-server was given.
21663if test ${enable_tfo_server+y}
21664then :
21665  enableval=$enable_tfo_server;
21666fi
21667
21668case "$enable_tfo_server" in
21669	yes)
21670	      ac_fn_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
21671#include <netinet/tcp.h>
21672
21673" "$ac_c_undeclared_builtin_options" "CFLAGS"
21674if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes
21675then :
21676  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
21677printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
21678else $as_nop
21679  as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
21680fi
21681
21682printf "%s\n" "#define USE_TCP_FASTOPEN 1" >>confdefs.h
21683
21684		;;
21685	no|*)
21686		;;
21687esac
21688
21689# check for libevent
21690
21691# Check whether --with-libevent was given.
21692if test ${with_libevent+y}
21693then :
21694  withval=$with_libevent;
21695else $as_nop
21696   with_libevent="no"
21697fi
21698
21699if test "x_$with_libevent" != x_no; then
21700
21701printf "%s\n" "#define USE_LIBEVENT 1" >>confdefs.h
21702
21703        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
21704printf %s "checking for libevent... " >&6; }
21705        if test "x_$with_libevent" = x_ -o "x_$with_libevent" = x_yes; then
21706            with_libevent="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
21707        fi
21708        for dir in $with_libevent; do
21709            thedir="$dir"
21710            if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
21711                found_libevent="yes"
21712								if test "$thedir" != "/usr"; then
21713				    CPPFLAGS="$CPPFLAGS -I$thedir/include"
21714				fi
21715				break;
21716		    fi
21717        done
21718        if test x_$found_libevent != x_yes; then
21719		if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
21720			# libevent source directory
21721			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
21722printf "%s\n" "found in $thedir" >&6; }
21723			CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
21724			BAK_LDFLAGS_SET="1"
21725			BAK_LDFLAGS="$LDFLAGS"
21726			# remove evdns from linking
21727			mkdir build >/dev/null 2>&1
21728			mkdir build/libevent >/dev/null 2>&1
21729			mkdir build/libevent/.libs >/dev/null 2>&1
21730			ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
21731			ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
21732			ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
21733			cp $ev_files_o build/libevent
21734			cp $ev_files_lo build/libevent
21735			cp $ev_files_libso build/libevent/.libs
21736			LATE_LDFLAGS="build/libevent/*.lo -lm"
21737			LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
21738		else
21739            as_fn_error $? "Cannot find the libevent library in $with_libevent
21740You can restart ./configure --with-libevent=no to use a builtin alternative.
21741Please note that this alternative is not as capable as libevent when using
21742large outgoing port ranges.  " "$LINENO" 5
21743		fi
21744        else
21745            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
21746printf "%s\n" "found in $thedir" >&6; }
21747	    	    if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
21748		    LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
21749
21750	if test "x$enable_rpath" = xyes; then
21751		if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
21752			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
21753		fi
21754	fi
21755
21756	    else
21757		    		    if test "$thedir" != "/usr" -a "$thedir" != ""; then
21758			LDFLAGS="$LDFLAGS -L$thedir/lib"
21759
21760	if test "x$enable_rpath" = xyes; then
21761		if echo "$thedir/lib" | grep "^/" >/dev/null; then
21762			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
21763		fi
21764	fi
21765
21766		    fi
21767	    fi
21768        fi
21769	# check for library used by libevent after 1.3c
21770	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
21771printf %s "checking for library containing clock_gettime... " >&6; }
21772if test ${ac_cv_search_clock_gettime+y}
21773then :
21774  printf %s "(cached) " >&6
21775else $as_nop
21776  ac_func_search_save_LIBS=$LIBS
21777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21778/* end confdefs.h.  */
21779
21780/* Override any GCC internal prototype to avoid an error.
21781   Use char because int might match the return type of a GCC
21782   builtin and then its argument prototype would still apply.  */
21783char clock_gettime ();
21784int
21785main (void)
21786{
21787return clock_gettime ();
21788  ;
21789  return 0;
21790}
21791_ACEOF
21792for ac_lib in '' rt
21793do
21794  if test -z "$ac_lib"; then
21795    ac_res="none required"
21796  else
21797    ac_res=-l$ac_lib
21798    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21799  fi
21800  if ac_fn_c_try_link "$LINENO"
21801then :
21802  ac_cv_search_clock_gettime=$ac_res
21803fi
21804rm -f core conftest.err conftest.$ac_objext conftest.beam \
21805    conftest$ac_exeext
21806  if test ${ac_cv_search_clock_gettime+y}
21807then :
21808  break
21809fi
21810done
21811if test ${ac_cv_search_clock_gettime+y}
21812then :
21813
21814else $as_nop
21815  ac_cv_search_clock_gettime=no
21816fi
21817rm conftest.$ac_ext
21818LIBS=$ac_func_search_save_LIBS
21819fi
21820{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
21821printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
21822ac_res=$ac_cv_search_clock_gettime
21823if test "$ac_res" != no
21824then :
21825  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21826
21827fi
21828
21829
21830	# is the event.h header libev or libevent?
21831	ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
21832"
21833if test "x$ac_cv_header_event_h" = xyes
21834then :
21835  printf "%s\n" "#define HAVE_EVENT_H 1" >>confdefs.h
21836
21837fi
21838
21839	ac_fn_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
21840#include <event.h>
21841
21842" "$ac_c_undeclared_builtin_options" "CFLAGS"
21843if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes
21844then :
21845
21846		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
21847printf %s "checking for library containing event_set... " >&6; }
21848if test ${ac_cv_search_event_set+y}
21849then :
21850  printf %s "(cached) " >&6
21851else $as_nop
21852  ac_func_search_save_LIBS=$LIBS
21853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21854/* end confdefs.h.  */
21855
21856/* Override any GCC internal prototype to avoid an error.
21857   Use char because int might match the return type of a GCC
21858   builtin and then its argument prototype would still apply.  */
21859char event_set ();
21860int
21861main (void)
21862{
21863return event_set ();
21864  ;
21865  return 0;
21866}
21867_ACEOF
21868for ac_lib in '' ev
21869do
21870  if test -z "$ac_lib"; then
21871    ac_res="none required"
21872  else
21873    ac_res=-l$ac_lib
21874    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21875  fi
21876  if ac_fn_c_try_link "$LINENO"
21877then :
21878  ac_cv_search_event_set=$ac_res
21879fi
21880rm -f core conftest.err conftest.$ac_objext conftest.beam \
21881    conftest$ac_exeext
21882  if test ${ac_cv_search_event_set+y}
21883then :
21884  break
21885fi
21886done
21887if test ${ac_cv_search_event_set+y}
21888then :
21889
21890else $as_nop
21891  ac_cv_search_event_set=no
21892fi
21893rm conftest.$ac_ext
21894LIBS=$ac_func_search_save_LIBS
21895fi
21896{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
21897printf "%s\n" "$ac_cv_search_event_set" >&6; }
21898ac_res=$ac_cv_search_event_set
21899if test "$ac_res" != no
21900then :
21901  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21902
21903fi
21904
21905
21906else $as_nop
21907
21908		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
21909printf %s "checking for library containing event_set... " >&6; }
21910if test ${ac_cv_search_event_set+y}
21911then :
21912  printf %s "(cached) " >&6
21913else $as_nop
21914  ac_func_search_save_LIBS=$LIBS
21915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21916/* end confdefs.h.  */
21917
21918/* Override any GCC internal prototype to avoid an error.
21919   Use char because int might match the return type of a GCC
21920   builtin and then its argument prototype would still apply.  */
21921char event_set ();
21922int
21923main (void)
21924{
21925return event_set ();
21926  ;
21927  return 0;
21928}
21929_ACEOF
21930for ac_lib in '' event
21931do
21932  if test -z "$ac_lib"; then
21933    ac_res="none required"
21934  else
21935    ac_res=-l$ac_lib
21936    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21937  fi
21938  if ac_fn_c_try_link "$LINENO"
21939then :
21940  ac_cv_search_event_set=$ac_res
21941fi
21942rm -f core conftest.err conftest.$ac_objext conftest.beam \
21943    conftest$ac_exeext
21944  if test ${ac_cv_search_event_set+y}
21945then :
21946  break
21947fi
21948done
21949if test ${ac_cv_search_event_set+y}
21950then :
21951
21952else $as_nop
21953  ac_cv_search_event_set=no
21954fi
21955rm conftest.$ac_ext
21956LIBS=$ac_func_search_save_LIBS
21957fi
21958{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
21959printf "%s\n" "$ac_cv_search_event_set" >&6; }
21960ac_res=$ac_cv_search_event_set
21961if test "$ac_res" != no
21962then :
21963  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21964
21965fi
21966
21967
21968fi
21969	ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
21970if test "x$ac_cv_func_event_base_free" = xyes
21971then :
21972  printf "%s\n" "#define HAVE_EVENT_BASE_FREE 1" >>confdefs.h
21973
21974fi
21975 # only in libevent 1.2 and later
21976	ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
21977if test "x$ac_cv_func_event_base_once" = xyes
21978then :
21979  printf "%s\n" "#define HAVE_EVENT_BASE_ONCE 1" >>confdefs.h
21980
21981fi
21982 # only in libevent 1.4.1 and later
21983	ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
21984if test "x$ac_cv_func_event_base_new" = xyes
21985then :
21986  printf "%s\n" "#define HAVE_EVENT_BASE_NEW 1" >>confdefs.h
21987
21988fi
21989 # only in libevent 1.4.1 and later
21990	ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
21991if test "x$ac_cv_func_event_base_get_method" = xyes
21992then :
21993  printf "%s\n" "#define HAVE_EVENT_BASE_GET_METHOD 1" >>confdefs.h
21994
21995fi
21996 # only in libevent 1.4.3 and later
21997	ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
21998if test "x$ac_cv_func_ev_loop" = xyes
21999then :
22000  printf "%s\n" "#define HAVE_EV_LOOP 1" >>confdefs.h
22001
22002fi
22003 # only in libev. (tested on 3.51)
22004	ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
22005if test "x$ac_cv_func_ev_default_loop" = xyes
22006then :
22007  printf "%s\n" "#define HAVE_EV_DEFAULT_LOOP 1" >>confdefs.h
22008
22009fi
22010 # only in libev. (tested on 4.00)
22011	ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign"
22012if test "x$ac_cv_func_event_assign" = xyes
22013then :
22014  printf "%s\n" "#define HAVE_EVENT_ASSIGN 1" >>confdefs.h
22015
22016fi
22017 # in libevent, for thread-safety
22018	ac_fn_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default
22019#ifdef HAVE_EVENT_H
22020#  include <event.h>
22021#else
22022#  include \"event2/event.h\"
22023#endif
22024
22025" "$ac_c_undeclared_builtin_options" "CFLAGS"
22026if test "x$ac_cv_have_decl_evsignal_assign" = xyes
22027then :
22028  ac_have_decl=1
22029else $as_nop
22030  ac_have_decl=0
22031fi
22032printf "%s\n" "#define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl" >>confdefs.h
22033
22034        PC_LIBEVENT_DEPENDENCY="libevent"
22035
22036	if test -n "$BAK_LDFLAGS_SET"; then
22037		LDFLAGS="$BAK_LDFLAGS"
22038	fi
22039else
22040
22041printf "%s\n" "#define USE_MINI_EVENT 1" >>confdefs.h
22042
22043fi
22044
22045# check for libexpat
22046
22047# Check whether --with-libexpat was given.
22048if test ${with_libexpat+y}
22049then :
22050  withval=$with_libexpat;
22051else $as_nop
22052   withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22053fi
22054
22055{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
22056printf %s "checking for libexpat... " >&6; }
22057found_libexpat="no"
22058for dir in $withval ; do
22059            if test -f "$dir/include/expat.h"; then
22060		found_libexpat="yes"
22061				if test "$dir" != "/usr"; then
22062                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22063		    LDFLAGS="$LDFLAGS -L$dir/lib"
22064		fi
22065            	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22066printf "%s\n" "found in $dir" >&6; }
22067                break;
22068            fi
22069done
22070if test x_$found_libexpat != x_yes; then
22071	as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
22072fi
22073ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
22074"
22075if test "x$ac_cv_header_expat_h" = xyes
22076then :
22077  printf "%s\n" "#define HAVE_EXPAT_H 1" >>confdefs.h
22078
22079fi
22080
22081ac_fn_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
22082#include <expat.h>
22083
22084" "$ac_c_undeclared_builtin_options" "CFLAGS"
22085if test "x$ac_cv_have_decl_XML_StopParser" = xyes
22086then :
22087  ac_have_decl=1
22088else $as_nop
22089  ac_have_decl=0
22090fi
22091printf "%s\n" "#define HAVE_DECL_XML_STOPPARSER $ac_have_decl" >>confdefs.h
22092
22093
22094# hiredis (redis C client for cachedb)
22095
22096# Check whether --with-libhiredis was given.
22097if test ${with_libhiredis+y}
22098then :
22099  withval=$with_libhiredis;
22100else $as_nop
22101   withval="no"
22102fi
22103
22104found_libhiredis="no"
22105if test x_$withval = x_yes -o x_$withval != x_no; then
22106   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
22107printf %s "checking for libhiredis... " >&6; }
22108   if test x_$withval = x_ -o x_$withval = x_yes; then
22109            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22110   fi
22111   for dir in $withval ; do
22112            if test -f "$dir/include/hiredis/hiredis.h"; then
22113		found_libhiredis="yes"
22114				if test "$dir" != "/usr"; then
22115                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22116		    LDFLAGS="$LDFLAGS -L$dir/lib"
22117		fi
22118		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22119printf "%s\n" "found in $dir" >&6; }
22120
22121printf "%s\n" "#define USE_REDIS 1" >>confdefs.h
22122
22123		LIBS="$LIBS -lhiredis"
22124                break;
22125            fi
22126    done
22127    if test x_$found_libhiredis != x_yes; then
22128	as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
22129    fi
22130    ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
22131"
22132if test "x$ac_cv_header_hiredis_hiredis_h" = xyes
22133then :
22134  printf "%s\n" "#define HAVE_HIREDIS_HIREDIS_H 1" >>confdefs.h
22135
22136fi
22137
22138    ac_fn_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
22139    #include <hiredis/hiredis.h>
22140
22141" "$ac_c_undeclared_builtin_options" "CFLAGS"
22142if test "x$ac_cv_have_decl_redisConnect" = xyes
22143then :
22144  ac_have_decl=1
22145else $as_nop
22146  ac_have_decl=0
22147fi
22148printf "%s\n" "#define HAVE_DECL_REDISCONNECT $ac_have_decl" >>confdefs.h
22149
22150fi
22151
22152# nghttp2
22153
22154# Check whether --with-libnghttp2 was given.
22155if test ${with_libnghttp2+y}
22156then :
22157  withval=$with_libnghttp2;
22158else $as_nop
22159   withval="no"
22160fi
22161
22162found_libnghttp2="no"
22163if test x_$withval = x_yes -o x_$withval != x_no; then
22164   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5
22165printf %s "checking for libnghttp2... " >&6; }
22166   if test x_$withval = x_ -o x_$withval = x_yes; then
22167            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22168   fi
22169   for dir in $withval ; do
22170            if test -f "$dir/include/nghttp2/nghttp2.h"; then
22171		found_libnghttp2="yes"
22172				if test "$dir" != "/usr"; then
22173                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22174		    LDFLAGS="$LDFLAGS -L$dir/lib"
22175		fi
22176		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22177printf "%s\n" "found in $dir" >&6; }
22178
22179printf "%s\n" "#define HAVE_NGHTTP2 1" >>confdefs.h
22180
22181		LIBS="$LIBS -lnghttp2"
22182                break;
22183            fi
22184    done
22185    if test x_$found_libnghttp2 != x_yes; then
22186	as_fn_error $? "Could not find libnghttp2, nghttp2.h" "$LINENO" 5
22187    fi
22188    ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default
22189"
22190if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes
22191then :
22192  printf "%s\n" "#define HAVE_NGHTTP2_NGHTTP2_H 1" >>confdefs.h
22193
22194fi
22195
22196    ac_fn_check_decl "$LINENO" "nghttp2_session_server_new" "ac_cv_have_decl_nghttp2_session_server_new" "$ac_includes_default
22197    #include <nghttp2/nghttp2.h>
22198
22199" "$ac_c_undeclared_builtin_options" "CFLAGS"
22200if test "x$ac_cv_have_decl_nghttp2_session_server_new" = xyes
22201then :
22202  ac_have_decl=1
22203else $as_nop
22204  ac_have_decl=0
22205fi
22206printf "%s\n" "#define HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW $ac_have_decl" >>confdefs.h
22207
22208fi
22209
22210# ngtcp2
22211
22212# Check whether --with-libngtcp2 was given.
22213if test ${with_libngtcp2+y}
22214then :
22215  withval=$with_libngtcp2;
22216else $as_nop
22217   withval="no"
22218fi
22219
22220found_libngtcp2="no"
22221if test x_$withval = x_yes -o x_$withval != x_no; then
22222   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libngtcp2" >&5
22223printf %s "checking for libngtcp2... " >&6; }
22224   if test x_$withval = x_ -o x_$withval = x_yes; then
22225            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
22226   fi
22227   for dir in $withval ; do
22228            if test -f "$dir/include/ngtcp2/ngtcp2.h"; then
22229		found_libngtcp2="yes"
22230				if test "$dir" != "/usr"; then
22231                    CPPFLAGS="$CPPFLAGS -I$dir/include"
22232		    LDFLAGS="$LDFLAGS -L$dir/lib"
22233		fi
22234		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
22235printf "%s\n" "found in $dir" >&6; }
22236
22237printf "%s\n" "#define HAVE_NGTCP2 1" >>confdefs.h
22238
22239		LIBS="$LIBS -lngtcp2"
22240                break;
22241            fi
22242    done
22243    if test x_$found_libngtcp2 != x_yes; then
22244	as_fn_error $? "Could not find libngtcp2, ngtcp2.h" "$LINENO" 5
22245    fi
22246    ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2.h" "ac_cv_header_ngtcp2_ngtcp2_h" "$ac_includes_default
22247"
22248if test "x$ac_cv_header_ngtcp2_ngtcp2_h" = xyes
22249then :
22250  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_H 1" >>confdefs.h
22251
22252fi
22253ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2_crypto_openssl.h" "ac_cv_header_ngtcp2_ngtcp2_crypto_openssl_h" "$ac_includes_default
22254"
22255if test "x$ac_cv_header_ngtcp2_ngtcp2_crypto_openssl_h" = xyes
22256then :
22257  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_CRYPTO_OPENSSL_H 1" >>confdefs.h
22258
22259fi
22260ac_fn_c_check_header_compile "$LINENO" "ngtcp2/ngtcp2_crypto_quictls.h" "ac_cv_header_ngtcp2_ngtcp2_crypto_quictls_h" "$ac_includes_default
22261"
22262if test "x$ac_cv_header_ngtcp2_ngtcp2_crypto_quictls_h" = xyes
22263then :
22264  printf "%s\n" "#define HAVE_NGTCP2_NGTCP2_CRYPTO_QUICTLS_H 1" >>confdefs.h
22265
22266fi
22267
22268    ac_fn_check_decl "$LINENO" "ngtcp2_conn_server_new" "ac_cv_have_decl_ngtcp2_conn_server_new" "$ac_includes_default
22269    #include <ngtcp2/ngtcp2.h>
22270
22271" "$ac_c_undeclared_builtin_options" "CFLAGS"
22272if test "x$ac_cv_have_decl_ngtcp2_conn_server_new" = xyes
22273then :
22274  ac_have_decl=1
22275else $as_nop
22276  ac_have_decl=0
22277fi
22278printf "%s\n" "#define HAVE_DECL_NGTCP2_CONN_SERVER_NEW $ac_have_decl" >>confdefs.h
22279
22280    ac_fn_check_decl "$LINENO" "ngtcp2_crypto_encrypt_cb" "ac_cv_have_decl_ngtcp2_crypto_encrypt_cb" "$ac_includes_default
22281    #include <ngtcp2/ngtcp2_crypto.h>
22282
22283" "$ac_c_undeclared_builtin_options" "CFLAGS"
22284if test "x$ac_cv_have_decl_ngtcp2_crypto_encrypt_cb" = xyes
22285then :
22286  ac_have_decl=1
22287else $as_nop
22288  ac_have_decl=0
22289fi
22290printf "%s\n" "#define HAVE_DECL_NGTCP2_CRYPTO_ENCRYPT_CB $ac_have_decl" >>confdefs.h
22291
22292    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_openssl" >&5
22293printf %s "checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_openssl... " >&6; }
22294if test ${ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb+y}
22295then :
22296  printf %s "(cached) " >&6
22297else $as_nop
22298  ac_check_lib_save_LIBS=$LIBS
22299LIBS="-lngtcp2_crypto_openssl  $LIBS"
22300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22301/* end confdefs.h.  */
22302
22303/* Override any GCC internal prototype to avoid an error.
22304   Use char because int might match the return type of a GCC
22305   builtin and then its argument prototype would still apply.  */
22306char ngtcp2_crypto_encrypt_cb ();
22307int
22308main (void)
22309{
22310return ngtcp2_crypto_encrypt_cb ();
22311  ;
22312  return 0;
22313}
22314_ACEOF
22315if ac_fn_c_try_link "$LINENO"
22316then :
22317  ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb=yes
22318else $as_nop
22319  ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb=no
22320fi
22321rm -f core conftest.err conftest.$ac_objext conftest.beam \
22322    conftest$ac_exeext conftest.$ac_ext
22323LIBS=$ac_check_lib_save_LIBS
22324fi
22325{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb" >&5
22326printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb" >&6; }
22327if test "x$ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_encrypt_cb" = xyes
22328then :
22329   LIBS="$LIBS -lngtcp2_crypto_openssl"
22330fi
22331
22332    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_quictls" >&5
22333printf %s "checking for ngtcp2_crypto_encrypt_cb in -lngtcp2_crypto_quictls... " >&6; }
22334if test ${ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb+y}
22335then :
22336  printf %s "(cached) " >&6
22337else $as_nop
22338  ac_check_lib_save_LIBS=$LIBS
22339LIBS="-lngtcp2_crypto_quictls  $LIBS"
22340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22341/* end confdefs.h.  */
22342
22343/* Override any GCC internal prototype to avoid an error.
22344   Use char because int might match the return type of a GCC
22345   builtin and then its argument prototype would still apply.  */
22346char ngtcp2_crypto_encrypt_cb ();
22347int
22348main (void)
22349{
22350return ngtcp2_crypto_encrypt_cb ();
22351  ;
22352  return 0;
22353}
22354_ACEOF
22355if ac_fn_c_try_link "$LINENO"
22356then :
22357  ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb=yes
22358else $as_nop
22359  ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb=no
22360fi
22361rm -f core conftest.err conftest.$ac_objext conftest.beam \
22362    conftest$ac_exeext conftest.$ac_ext
22363LIBS=$ac_check_lib_save_LIBS
22364fi
22365{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb" >&5
22366printf "%s\n" "$ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb" >&6; }
22367if test "x$ac_cv_lib_ngtcp2_crypto_quictls_ngtcp2_crypto_encrypt_cb" = xyes
22368then :
22369   LIBS="$LIBS -lngtcp2_crypto_quictls"
22370fi
22371
22372    ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_encrypt_cb" "ac_cv_func_ngtcp2_crypto_encrypt_cb"
22373if test "x$ac_cv_func_ngtcp2_crypto_encrypt_cb" = xyes
22374then :
22375  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_ENCRYPT_CB 1" >>confdefs.h
22376
22377fi
22378ac_fn_c_check_func "$LINENO" "ngtcp2_ccerr_default" "ac_cv_func_ngtcp2_ccerr_default"
22379if test "x$ac_cv_func_ngtcp2_ccerr_default" = xyes
22380then :
22381  printf "%s\n" "#define HAVE_NGTCP2_CCERR_DEFAULT 1" >>confdefs.h
22382
22383fi
22384ac_fn_c_check_func "$LINENO" "ngtcp2_conn_in_closing_period" "ac_cv_func_ngtcp2_conn_in_closing_period"
22385if test "x$ac_cv_func_ngtcp2_conn_in_closing_period" = xyes
22386then :
22387  printf "%s\n" "#define HAVE_NGTCP2_CONN_IN_CLOSING_PERIOD 1" >>confdefs.h
22388
22389fi
22390ac_fn_c_check_func "$LINENO" "ngtcp2_conn_in_draining_period" "ac_cv_func_ngtcp2_conn_in_draining_period"
22391if test "x$ac_cv_func_ngtcp2_conn_in_draining_period" = xyes
22392then :
22393  printf "%s\n" "#define HAVE_NGTCP2_CONN_IN_DRAINING_PERIOD 1" >>confdefs.h
22394
22395fi
22396ac_fn_c_check_func "$LINENO" "ngtcp2_conn_get_max_local_streams_uni" "ac_cv_func_ngtcp2_conn_get_max_local_streams_uni"
22397if test "x$ac_cv_func_ngtcp2_conn_get_max_local_streams_uni" = xyes
22398then :
22399  printf "%s\n" "#define HAVE_NGTCP2_CONN_GET_MAX_LOCAL_STREAMS_UNI 1" >>confdefs.h
22400
22401fi
22402ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_quictls_from_ossl_encryption_level" "ac_cv_func_ngtcp2_crypto_quictls_from_ossl_encryption_level"
22403if test "x$ac_cv_func_ngtcp2_crypto_quictls_from_ossl_encryption_level" = xyes
22404then :
22405  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_QUICTLS_FROM_OSSL_ENCRYPTION_LEVEL 1" >>confdefs.h
22406
22407fi
22408ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_quictls_configure_server_context" "ac_cv_func_ngtcp2_crypto_quictls_configure_server_context"
22409if test "x$ac_cv_func_ngtcp2_crypto_quictls_configure_server_context" = xyes
22410then :
22411  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_QUICTLS_CONFIGURE_SERVER_CONTEXT 1" >>confdefs.h
22412
22413fi
22414ac_fn_c_check_func "$LINENO" "ngtcp2_crypto_quictls_configure_client_context" "ac_cv_func_ngtcp2_crypto_quictls_configure_client_context"
22415if test "x$ac_cv_func_ngtcp2_crypto_quictls_configure_client_context" = xyes
22416then :
22417  printf "%s\n" "#define HAVE_NGTCP2_CRYPTO_QUICTLS_CONFIGURE_CLIENT_CONTEXT 1" >>confdefs.h
22418
22419fi
22420ac_fn_c_check_func "$LINENO" "ngtcp2_conn_get_num_scid" "ac_cv_func_ngtcp2_conn_get_num_scid"
22421if test "x$ac_cv_func_ngtcp2_conn_get_num_scid" = xyes
22422then :
22423  printf "%s\n" "#define HAVE_NGTCP2_CONN_GET_NUM_SCID 1" >>confdefs.h
22424
22425fi
22426ac_fn_c_check_func "$LINENO" "ngtcp2_conn_tls_early_data_rejected" "ac_cv_func_ngtcp2_conn_tls_early_data_rejected"
22427if test "x$ac_cv_func_ngtcp2_conn_tls_early_data_rejected" = xyes
22428then :
22429  printf "%s\n" "#define HAVE_NGTCP2_CONN_TLS_EARLY_DATA_REJECTED 1" >>confdefs.h
22430
22431fi
22432ac_fn_c_check_func "$LINENO" "ngtcp2_conn_encode_0rtt_transport_params" "ac_cv_func_ngtcp2_conn_encode_0rtt_transport_params"
22433if test "x$ac_cv_func_ngtcp2_conn_encode_0rtt_transport_params" = xyes
22434then :
22435  printf "%s\n" "#define HAVE_NGTCP2_CONN_ENCODE_0RTT_TRANSPORT_PARAMS 1" >>confdefs.h
22436
22437fi
22438
22439
22440  for ac_func in SSL_is_quic
22441do :
22442  ac_fn_c_check_func "$LINENO" "SSL_is_quic" "ac_cv_func_SSL_is_quic"
22443if test "x$ac_cv_func_SSL_is_quic" = xyes
22444then :
22445  printf "%s\n" "#define HAVE_SSL_IS_QUIC 1" >>confdefs.h
22446
22447else $as_nop
22448  as_fn_error $? "No QUIC support detected in OpenSSL. Need OpenSSL version with QUIC support to enable DNS over QUIC with libngtcp2." "$LINENO" 5
22449fi
22450
22451done
22452    ac_fn_c_check_type "$LINENO" "struct ngtcp2_version_cid" "ac_cv_type_struct_ngtcp2_version_cid" "$ac_includes_default
22453    #include <ngtcp2/ngtcp2.h>
22454
22455"
22456if test "x$ac_cv_type_struct_ngtcp2_version_cid" = xyes
22457then :
22458
22459printf "%s\n" "#define HAVE_STRUCT_NGTCP2_VERSION_CID 1" >>confdefs.h
22460
22461
22462fi
22463ac_fn_c_check_type "$LINENO" "ngtcp2_encryption_level" "ac_cv_type_ngtcp2_encryption_level" "$ac_includes_default
22464    #include <ngtcp2/ngtcp2.h>
22465
22466"
22467if test "x$ac_cv_type_ngtcp2_encryption_level" = xyes
22468then :
22469
22470printf "%s\n" "#define HAVE_NGTCP2_ENCRYPTION_LEVEL 1" >>confdefs.h
22471
22472
22473fi
22474
22475    ac_fn_c_check_member "$LINENO" "struct ngtcp2_pkt_hd" "tokenlen" "ac_cv_member_struct_ngtcp2_pkt_hd_tokenlen" "$ac_includes_default
22476    #include <ngtcp2/ngtcp2.h>
22477
22478"
22479if test "x$ac_cv_member_struct_ngtcp2_pkt_hd_tokenlen" = xyes
22480then :
22481
22482printf "%s\n" "#define HAVE_STRUCT_NGTCP2_PKT_HD_TOKENLEN 1" >>confdefs.h
22483
22484
22485fi
22486ac_fn_c_check_member "$LINENO" "struct ngtcp2_settings" "tokenlen" "ac_cv_member_struct_ngtcp2_settings_tokenlen" "$ac_includes_default
22487    #include <ngtcp2/ngtcp2.h>
22488
22489"
22490if test "x$ac_cv_member_struct_ngtcp2_settings_tokenlen" = xyes
22491then :
22492
22493printf "%s\n" "#define HAVE_STRUCT_NGTCP2_SETTINGS_TOKENLEN 1" >>confdefs.h
22494
22495
22496fi
22497ac_fn_c_check_member "$LINENO" "struct ngtcp2_settings" "max_tx_udp_payload_size" "ac_cv_member_struct_ngtcp2_settings_max_tx_udp_payload_size" "$ac_includes_default
22498    #include <ngtcp2/ngtcp2.h>
22499
22500"
22501if test "x$ac_cv_member_struct_ngtcp2_settings_max_tx_udp_payload_size" = xyes
22502then :
22503
22504printf "%s\n" "#define HAVE_STRUCT_NGTCP2_SETTINGS_MAX_TX_UDP_PAYLOAD_SIZE 1" >>confdefs.h
22505
22506
22507fi
22508ac_fn_c_check_member "$LINENO" "struct ngtcp2_transport_params" "original_dcid_present" "ac_cv_member_struct_ngtcp2_transport_params_original_dcid_present" "$ac_includes_default
22509    #include <ngtcp2/ngtcp2.h>
22510
22511"
22512if test "x$ac_cv_member_struct_ngtcp2_transport_params_original_dcid_present" = xyes
22513then :
22514
22515printf "%s\n" "#define HAVE_STRUCT_NGTCP2_TRANSPORT_PARAMS_ORIGINAL_DCID_PRESENT 1" >>confdefs.h
22516
22517
22518fi
22519
22520
22521    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ngtcp2_conn_shutdown_stream has 4 arguments" >&5
22522printf %s "checking whether ngtcp2_conn_shutdown_stream has 4 arguments... " >&6; }
22523    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22524/* end confdefs.h.  */
22525$ac_includes_default
22526#include <ngtcp2/ngtcp2.h>
22527
22528int
22529main (void)
22530{
22531
22532	(void)ngtcp2_conn_shutdown_stream(NULL, 0, 0, 0);
22533
22534  ;
22535  return 0;
22536}
22537_ACEOF
22538if ac_fn_c_try_compile "$LINENO"
22539then :
22540
22541	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22542printf "%s\n" "yes" >&6; }
22543
22544printf "%s\n" "#define HAVE_NGTCP2_CONN_SHUTDOWN_STREAM4 1" >>confdefs.h
22545
22546
22547else $as_nop
22548
22549	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22550printf "%s\n" "no" >&6; }
22551
22552fi
22553rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22554
22555fi
22556
22557# set static linking for uninstalled libraries if requested
22558
22559staticexe=""
22560# Check whether --enable-static-exe was given.
22561if test ${enable_static_exe+y}
22562then :
22563  enableval=$enable_static_exe;
22564fi
22565
22566if test x_$enable_static_exe = x_yes; then
22567	staticexe="-static"
22568	if test "$on_mingw" = yes; then
22569		staticexe="-all-static"
22570		# for static compile, include gdi32 and zlib here.
22571		if echo "$LIBS" | grep 'lgdi32' >/dev/null; then
22572			:
22573		else
22574			LIBS="$LIBS -lgdi32"
22575		fi
22576		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
22577printf %s "checking for compress in -lz... " >&6; }
22578if test ${ac_cv_lib_z_compress+y}
22579then :
22580  printf %s "(cached) " >&6
22581else $as_nop
22582  ac_check_lib_save_LIBS=$LIBS
22583LIBS="-lz  $LIBS"
22584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22585/* end confdefs.h.  */
22586
22587/* Override any GCC internal prototype to avoid an error.
22588   Use char because int might match the return type of a GCC
22589   builtin and then its argument prototype would still apply.  */
22590char compress ();
22591int
22592main (void)
22593{
22594return compress ();
22595  ;
22596  return 0;
22597}
22598_ACEOF
22599if ac_fn_c_try_link "$LINENO"
22600then :
22601  ac_cv_lib_z_compress=yes
22602else $as_nop
22603  ac_cv_lib_z_compress=no
22604fi
22605rm -f core conftest.err conftest.$ac_objext conftest.beam \
22606    conftest$ac_exeext conftest.$ac_ext
22607LIBS=$ac_check_lib_save_LIBS
22608fi
22609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
22610printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
22611if test "x$ac_cv_lib_z_compress" = xyes
22612then :
22613   LIBS="$LIBS -lz"
22614fi
22615
22616		if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then
22617			:
22618		else
22619			LIBS="$LIBS -l:libssp.a"
22620		fi
22621	fi
22622fi
22623
22624# set full static linking if requested
22625# Check whether --enable-fully-static was given.
22626if test ${enable_fully_static+y}
22627then :
22628  enableval=$enable_fully_static;
22629fi
22630
22631if test x_$enable_fully_static = x_yes; then
22632	staticexe="-all-static"
22633	if test "$on_mingw" = yes; then
22634		# for static compile, include gdi32 and zlib here.
22635		if echo $LIBS | grep 'lgdi32' >/dev/null; then
22636			:
22637		else
22638			LIBS="$LIBS -lgdi32"
22639		fi
22640		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
22641printf %s "checking for compress in -lz... " >&6; }
22642if test ${ac_cv_lib_z_compress+y}
22643then :
22644  printf %s "(cached) " >&6
22645else $as_nop
22646  ac_check_lib_save_LIBS=$LIBS
22647LIBS="-lz  $LIBS"
22648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22649/* end confdefs.h.  */
22650
22651/* Override any GCC internal prototype to avoid an error.
22652   Use char because int might match the return type of a GCC
22653   builtin and then its argument prototype would still apply.  */
22654char compress ();
22655int
22656main (void)
22657{
22658return compress ();
22659  ;
22660  return 0;
22661}
22662_ACEOF
22663if ac_fn_c_try_link "$LINENO"
22664then :
22665  ac_cv_lib_z_compress=yes
22666else $as_nop
22667  ac_cv_lib_z_compress=no
22668fi
22669rm -f core conftest.err conftest.$ac_objext conftest.beam \
22670    conftest$ac_exeext conftest.$ac_ext
22671LIBS=$ac_check_lib_save_LIBS
22672fi
22673{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
22674printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
22675if test "x$ac_cv_lib_z_compress" = xyes
22676then :
22677   LIBS="$LIBS -lz"
22678fi
22679
22680		if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then
22681			:
22682		else
22683			LIBS="$LIBS -l:libssp.a"
22684		fi
22685	fi
22686fi
22687
22688# set lock checking if requested
22689# Check whether --enable-lock_checks was given.
22690if test ${enable_lock_checks+y}
22691then :
22692  enableval=$enable_lock_checks;
22693fi
22694
22695if test x_$enable_lock_checks = x_yes; then
22696
22697printf "%s\n" "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
22698
22699	CHECKLOCK_OBJ="checklocks.lo"
22700
22701fi
22702
22703
22704{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
22705printf %s "checking for getaddrinfo... " >&6; }
22706ac_cv_func_getaddrinfo=no
22707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22708/* end confdefs.h.  */
22709
22710#ifdef __cplusplus
22711extern "C"
22712{
22713#endif
22714char* getaddrinfo();
22715char* (*f) () = getaddrinfo;
22716#ifdef __cplusplus
22717}
22718#endif
22719int main(void) {
22720        ;
22721        return 0;
22722}
22723
22724_ACEOF
22725if ac_fn_c_try_link "$LINENO"
22726then :
22727  ac_cv_func_getaddrinfo="yes"
22728if test "$ac_cv_header_windows_h" = "yes"; then
22729
22730printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
22731
22732	USE_WINSOCK="1"
22733	if echo "$LIBS" | grep 'lws2_32' >/dev/null; then
22734		:
22735	else
22736		LIBS="$LIBS -lws2_32"
22737	fi
22738fi
22739
22740else $as_nop
22741  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22742/* end confdefs.h.  */
22743
22744#ifdef HAVE_WS2TCPIP_H
22745#include <ws2tcpip.h>
22746#endif
22747
22748int
22749main (void)
22750{
22751
22752        (void)getaddrinfo(NULL, NULL, NULL, NULL);
22753
22754
22755  ;
22756  return 0;
22757}
22758_ACEOF
22759if ac_fn_c_try_link "$LINENO"
22760then :
22761
22762ac_cv_func_getaddrinfo="yes"
22763
22764printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
22765
22766USE_WINSOCK="1"
22767
22768else $as_nop
22769  ORIGLIBS="$LIBS"
22770LIBS="$LIBS -lws2_32"
22771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22772/* end confdefs.h.  */
22773
22774#ifdef HAVE_WS2TCPIP_H
22775#include <ws2tcpip.h>
22776#endif
22777
22778int
22779main (void)
22780{
22781
22782        (void)getaddrinfo(NULL, NULL, NULL, NULL);
22783
22784
22785  ;
22786  return 0;
22787}
22788_ACEOF
22789if ac_fn_c_try_link "$LINENO"
22790then :
22791
22792ac_cv_func_getaddrinfo="yes"
22793
22794printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
22795
22796USE_WINSOCK="1"
22797
22798else $as_nop
22799
22800ac_cv_func_getaddrinfo="no"
22801LIBS="$ORIGLIBS"
22802
22803fi
22804rm -f core conftest.err conftest.$ac_objext conftest.beam \
22805    conftest$ac_exeext conftest.$ac_ext
22806
22807fi
22808rm -f core conftest.err conftest.$ac_objext conftest.beam \
22809    conftest$ac_exeext conftest.$ac_ext
22810
22811fi
22812rm -f core conftest.err conftest.$ac_objext conftest.beam \
22813    conftest$ac_exeext conftest.$ac_ext
22814
22815{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
22816printf "%s\n" "$ac_cv_func_getaddrinfo" >&6; }
22817if test $ac_cv_func_getaddrinfo = yes; then
22818
22819printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h
22820
22821fi
22822
22823if test "$USE_WINSOCK" = 1; then
22824
22825printf "%s\n" "#define UB_ON_WINDOWS 1" >>confdefs.h
22826
22827	ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
22828#include <windows.h>
22829
22830"
22831if test "x$ac_cv_header_iphlpapi_h" = xyes
22832then :
22833  printf "%s\n" "#define HAVE_IPHLPAPI_H 1" >>confdefs.h
22834
22835fi
22836
22837	if test -n "$ac_tool_prefix"; then
22838  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
22839set dummy ${ac_tool_prefix}windres; ac_word=$2
22840{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22841printf %s "checking for $ac_word... " >&6; }
22842if test ${ac_cv_prog_WINDRES+y}
22843then :
22844  printf %s "(cached) " >&6
22845else $as_nop
22846  if test -n "$WINDRES"; then
22847  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
22848else
22849as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22850for as_dir in $PATH
22851do
22852  IFS=$as_save_IFS
22853  case $as_dir in #(((
22854    '') as_dir=./ ;;
22855    */) ;;
22856    *) as_dir=$as_dir/ ;;
22857  esac
22858    for ac_exec_ext in '' $ac_executable_extensions; do
22859  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
22860    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
22861    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
22862    break 2
22863  fi
22864done
22865  done
22866IFS=$as_save_IFS
22867
22868fi
22869fi
22870WINDRES=$ac_cv_prog_WINDRES
22871if test -n "$WINDRES"; then
22872  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
22873printf "%s\n" "$WINDRES" >&6; }
22874else
22875  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22876printf "%s\n" "no" >&6; }
22877fi
22878
22879
22880fi
22881if test -z "$ac_cv_prog_WINDRES"; then
22882  ac_ct_WINDRES=$WINDRES
22883  # Extract the first word of "windres", so it can be a program name with args.
22884set dummy windres; ac_word=$2
22885{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22886printf %s "checking for $ac_word... " >&6; }
22887if test ${ac_cv_prog_ac_ct_WINDRES+y}
22888then :
22889  printf %s "(cached) " >&6
22890else $as_nop
22891  if test -n "$ac_ct_WINDRES"; then
22892  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
22893else
22894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22895for as_dir in $PATH
22896do
22897  IFS=$as_save_IFS
22898  case $as_dir in #(((
22899    '') as_dir=./ ;;
22900    */) ;;
22901    *) as_dir=$as_dir/ ;;
22902  esac
22903    for ac_exec_ext in '' $ac_executable_extensions; do
22904  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
22905    ac_cv_prog_ac_ct_WINDRES="windres"
22906    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
22907    break 2
22908  fi
22909done
22910  done
22911IFS=$as_save_IFS
22912
22913fi
22914fi
22915ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
22916if test -n "$ac_ct_WINDRES"; then
22917  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
22918printf "%s\n" "$ac_ct_WINDRES" >&6; }
22919else
22920  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22921printf "%s\n" "no" >&6; }
22922fi
22923
22924  if test "x$ac_ct_WINDRES" = x; then
22925    WINDRES=""
22926  else
22927    case $cross_compiling:$ac_tool_warned in
22928yes:)
22929{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22930printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22931ac_tool_warned=yes ;;
22932esac
22933    WINDRES=$ac_ct_WINDRES
22934  fi
22935else
22936  WINDRES="$ac_cv_prog_WINDRES"
22937fi
22938
22939	if echo "$LIBS" | grep crypt32 >/dev/null; then
22940		LIBS="$LIBS -liphlpapi"
22941	else
22942		LIBS="$LIBS -liphlpapi -lcrypt32"
22943	fi
22944	WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
22945
22946	WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
22947
22948	WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
22949
22950	WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
22951
22952	WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
22953
22954	WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
22955
22956	WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
22957
22958	WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
22959
22960
22961printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
22962
22963fi
22964if test $ac_cv_func_getaddrinfo = no; then
22965	case " $LIBOBJS " in
22966  *" fake-rfc2553.$ac_objext "* ) ;;
22967  *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
22968 ;;
22969esac
22970
22971fi
22972# check after getaddrinfo for its libraries
22973
22974# check ioctlsocket
22975{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
22976printf %s "checking for ioctlsocket... " >&6; }
22977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22978/* end confdefs.h.  */
22979
22980#ifdef HAVE_WINSOCK2_H
22981#include <winsock2.h>
22982#endif
22983
22984int
22985main (void)
22986{
22987
22988	(void)ioctlsocket(0, 0, NULL);
22989
22990  ;
22991  return 0;
22992}
22993_ACEOF
22994if ac_fn_c_try_link "$LINENO"
22995then :
22996
22997{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22998printf "%s\n" "yes" >&6; }
22999
23000printf "%s\n" "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
23001
23002
23003else $as_nop
23004  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23005printf "%s\n" "no" >&6; }
23006fi
23007rm -f core conftest.err conftest.$ac_objext conftest.beam \
23008    conftest$ac_exeext conftest.$ac_ext
23009
23010
23011# see if daemon(3) exists, and if it is deprecated.
23012ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
23013if test "x$ac_cv_func_daemon" = xyes
23014then :
23015  printf "%s\n" "#define HAVE_DAEMON 1" >>confdefs.h
23016
23017fi
23018
23019if test $ac_cv_func_daemon = yes; then
23020
23021
23022{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
23023printf %s "checking if daemon is deprecated... " >&6; }
23024cache=`echo daemon | sed 'y%.=/+-%___p_%'`
23025if eval test \${cv_cc_deprecated_$cache+y}
23026then :
23027  printf %s "(cached) " >&6
23028else $as_nop
23029
23030echo '
23031#include <stdlib.h>
23032#include <unistd.h>
23033' >conftest.c
23034echo 'void f(void){ (void)daemon(0, 0); }' >>conftest.c
23035if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then
23036eval "cv_cc_deprecated_$cache=no"
23037else
23038eval "cv_cc_deprecated_$cache=yes"
23039fi
23040rm -f conftest conftest.o conftest.c
23041
23042fi
23043
23044if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
23045{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23046printf "%s\n" "yes" >&6; }
23047
23048printf "%s\n" "#define DEPRECATED_DAEMON 1" >>confdefs.h
23049
23050:
23051
23052else
23053{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23054printf "%s\n" "no" >&6; }
23055:
23056
23057fi
23058
23059fi
23060
23061ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
23062$ac_includes_default
23063#ifdef HAVE_SYS_UN_H
23064#include <sys/un.h>
23065#endif
23066
23067"
23068if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes
23069then :
23070
23071printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1" >>confdefs.h
23072
23073
23074fi
23075
23076ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
23077$ac_includes_default
23078#if HAVE_SYS_PARAM_H
23079#include <sys/param.h>
23080#endif
23081
23082#ifdef HAVE_SYS_SOCKET_H
23083#include <sys/socket.h>
23084#endif
23085
23086#ifdef HAVE_SYS_UIO_H
23087#include <sys/uio.h>
23088#endif
23089
23090#ifdef HAVE_NETINET_IN_H
23091#include <netinet/in.h>
23092#endif
23093
23094#ifdef HAVE_NETINET_TCP_H
23095#include <netinet/tcp.h>
23096#endif
23097
23098#ifdef HAVE_ARPA_INET_H
23099#include <arpa/inet.h>
23100#endif
23101
23102#ifdef HAVE_WINSOCK2_H
23103#include <winsock2.h>
23104#endif
23105
23106#ifdef HAVE_WS2TCPIP_H
23107#include <ws2tcpip.h>
23108#endif
23109
23110"
23111if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes
23112then :
23113
23114printf "%s\n" "#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1" >>confdefs.h
23115
23116
23117fi
23118
23119
23120{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for htobe64" >&5
23121printf %s "checking for htobe64... " >&6; }
23122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23123/* end confdefs.h.  */
23124
23125#include <stdio.h>
23126#ifdef HAVE_ENDIAN_H
23127#  include <endian.h>
23128#endif
23129#ifdef HAVE_SYS_ENDIAN_H
23130#  include <sys/endian.h>
23131#endif
23132
23133int
23134main (void)
23135{
23136unsigned long long x = htobe64(0); printf("%u", (unsigned)x);
23137  ;
23138  return 0;
23139}
23140_ACEOF
23141if ac_fn_c_try_link "$LINENO"
23142then :
23143  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23144printf "%s\n" "yes" >&6; }
23145
23146printf "%s\n" "#define HAVE_HTOBE64 1" >>confdefs.h
23147
23148else $as_nop
23149  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23150printf "%s\n" "no" >&6; }
23151fi
23152rm -f core conftest.err conftest.$ac_objext conftest.beam \
23153    conftest$ac_exeext conftest.$ac_ext
23154
23155{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for be64toh" >&5
23156printf %s "checking for be64toh... " >&6; }
23157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23158/* end confdefs.h.  */
23159
23160#include <stdio.h>
23161#ifdef HAVE_ENDIAN_H
23162#  include <endian.h>
23163#endif
23164#ifdef HAVE_SYS_ENDIAN_H
23165#  include <sys/endian.h>
23166#endif
23167
23168int
23169main (void)
23170{
23171unsigned long long x = be64toh(0); printf("%u", (unsigned)x);
23172  ;
23173  return 0;
23174}
23175_ACEOF
23176if ac_fn_c_try_link "$LINENO"
23177then :
23178  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23179printf "%s\n" "yes" >&6; }
23180
23181printf "%s\n" "#define HAVE_BE64TOH 1" >>confdefs.h
23182
23183else $as_nop
23184  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23185printf "%s\n" "no" >&6; }
23186fi
23187rm -f core conftest.err conftest.$ac_objext conftest.beam \
23188    conftest$ac_exeext conftest.$ac_ext
23189
23190{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
23191printf %s "checking for library containing setusercontext... " >&6; }
23192if test ${ac_cv_search_setusercontext+y}
23193then :
23194  printf %s "(cached) " >&6
23195else $as_nop
23196  ac_func_search_save_LIBS=$LIBS
23197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23198/* end confdefs.h.  */
23199
23200/* Override any GCC internal prototype to avoid an error.
23201   Use char because int might match the return type of a GCC
23202   builtin and then its argument prototype would still apply.  */
23203char setusercontext ();
23204int
23205main (void)
23206{
23207return setusercontext ();
23208  ;
23209  return 0;
23210}
23211_ACEOF
23212for ac_lib in '' util
23213do
23214  if test -z "$ac_lib"; then
23215    ac_res="none required"
23216  else
23217    ac_res=-l$ac_lib
23218    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23219  fi
23220  if ac_fn_c_try_link "$LINENO"
23221then :
23222  ac_cv_search_setusercontext=$ac_res
23223fi
23224rm -f core conftest.err conftest.$ac_objext conftest.beam \
23225    conftest$ac_exeext
23226  if test ${ac_cv_search_setusercontext+y}
23227then :
23228  break
23229fi
23230done
23231if test ${ac_cv_search_setusercontext+y}
23232then :
23233
23234else $as_nop
23235  ac_cv_search_setusercontext=no
23236fi
23237rm conftest.$ac_ext
23238LIBS=$ac_func_search_save_LIBS
23239fi
23240{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
23241printf "%s\n" "$ac_cv_search_setusercontext" >&6; }
23242ac_res=$ac_cv_search_setusercontext
23243if test "$ac_res" != no
23244then :
23245  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23246
23247fi
23248
23249ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
23250if test "x$ac_cv_func_tzset" = xyes
23251then :
23252  printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
23253
23254fi
23255ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
23256if test "x$ac_cv_func_sigprocmask" = xyes
23257then :
23258  printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
23259
23260fi
23261ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl"
23262if test "x$ac_cv_func_fcntl" = xyes
23263then :
23264  printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h
23265
23266fi
23267ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
23268if test "x$ac_cv_func_getpwnam" = xyes
23269then :
23270  printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
23271
23272fi
23273ac_fn_c_check_func "$LINENO" "endpwent" "ac_cv_func_endpwent"
23274if test "x$ac_cv_func_endpwent" = xyes
23275then :
23276  printf "%s\n" "#define HAVE_ENDPWENT 1" >>confdefs.h
23277
23278fi
23279ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
23280if test "x$ac_cv_func_getrlimit" = xyes
23281then :
23282  printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
23283
23284fi
23285ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
23286if test "x$ac_cv_func_setrlimit" = xyes
23287then :
23288  printf "%s\n" "#define HAVE_SETRLIMIT 1" >>confdefs.h
23289
23290fi
23291ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
23292if test "x$ac_cv_func_setsid" = xyes
23293then :
23294  printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
23295
23296fi
23297ac_fn_c_check_func "$LINENO" "chroot" "ac_cv_func_chroot"
23298if test "x$ac_cv_func_chroot" = xyes
23299then :
23300  printf "%s\n" "#define HAVE_CHROOT 1" >>confdefs.h
23301
23302fi
23303ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill"
23304if test "x$ac_cv_func_kill" = xyes
23305then :
23306  printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h
23307
23308fi
23309ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown"
23310if test "x$ac_cv_func_chown" = xyes
23311then :
23312  printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
23313
23314fi
23315ac_fn_c_check_func "$LINENO" "sleep" "ac_cv_func_sleep"
23316if test "x$ac_cv_func_sleep" = xyes
23317then :
23318  printf "%s\n" "#define HAVE_SLEEP 1" >>confdefs.h
23319
23320fi
23321ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
23322if test "x$ac_cv_func_usleep" = xyes
23323then :
23324  printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
23325
23326fi
23327ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
23328if test "x$ac_cv_func_random" = xyes
23329then :
23330  printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h
23331
23332fi
23333ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
23334if test "x$ac_cv_func_srandom" = xyes
23335then :
23336  printf "%s\n" "#define HAVE_SRANDOM 1" >>confdefs.h
23337
23338fi
23339ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
23340if test "x$ac_cv_func_recvmsg" = xyes
23341then :
23342  printf "%s\n" "#define HAVE_RECVMSG 1" >>confdefs.h
23343
23344fi
23345ac_fn_c_check_func "$LINENO" "sendmsg" "ac_cv_func_sendmsg"
23346if test "x$ac_cv_func_sendmsg" = xyes
23347then :
23348  printf "%s\n" "#define HAVE_SENDMSG 1" >>confdefs.h
23349
23350fi
23351ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev"
23352if test "x$ac_cv_func_writev" = xyes
23353then :
23354  printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h
23355
23356fi
23357ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
23358if test "x$ac_cv_func_socketpair" = xyes
23359then :
23360  printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
23361
23362fi
23363ac_fn_c_check_func "$LINENO" "glob" "ac_cv_func_glob"
23364if test "x$ac_cv_func_glob" = xyes
23365then :
23366  printf "%s\n" "#define HAVE_GLOB 1" >>confdefs.h
23367
23368fi
23369ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups"
23370if test "x$ac_cv_func_initgroups" = xyes
23371then :
23372  printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h
23373
23374fi
23375ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
23376if test "x$ac_cv_func_strftime" = xyes
23377then :
23378  printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
23379
23380fi
23381ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
23382if test "x$ac_cv_func_localtime_r" = xyes
23383then :
23384  printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
23385
23386fi
23387ac_fn_c_check_func "$LINENO" "setusercontext" "ac_cv_func_setusercontext"
23388if test "x$ac_cv_func_setusercontext" = xyes
23389then :
23390  printf "%s\n" "#define HAVE_SETUSERCONTEXT 1" >>confdefs.h
23391
23392fi
23393ac_fn_c_check_func "$LINENO" "_beginthreadex" "ac_cv_func__beginthreadex"
23394if test "x$ac_cv_func__beginthreadex" = xyes
23395then :
23396  printf "%s\n" "#define HAVE__BEGINTHREADEX 1" >>confdefs.h
23397
23398fi
23399ac_fn_c_check_func "$LINENO" "endservent" "ac_cv_func_endservent"
23400if test "x$ac_cv_func_endservent" = xyes
23401then :
23402  printf "%s\n" "#define HAVE_ENDSERVENT 1" >>confdefs.h
23403
23404fi
23405ac_fn_c_check_func "$LINENO" "endprotoent" "ac_cv_func_endprotoent"
23406if test "x$ac_cv_func_endprotoent" = xyes
23407then :
23408  printf "%s\n" "#define HAVE_ENDPROTOENT 1" >>confdefs.h
23409
23410fi
23411ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
23412if test "x$ac_cv_func_fsync" = xyes
23413then :
23414  printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
23415
23416fi
23417ac_fn_c_check_func "$LINENO" "shmget" "ac_cv_func_shmget"
23418if test "x$ac_cv_func_shmget" = xyes
23419then :
23420  printf "%s\n" "#define HAVE_SHMGET 1" >>confdefs.h
23421
23422fi
23423ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4"
23424if test "x$ac_cv_func_accept4" = xyes
23425then :
23426  printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h
23427
23428fi
23429ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
23430if test "x$ac_cv_func_getifaddrs" = xyes
23431then :
23432  printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h
23433
23434fi
23435ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
23436if test "x$ac_cv_func_if_nametoindex" = xyes
23437then :
23438  printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
23439
23440fi
23441ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
23442if test "x$ac_cv_func_poll" = xyes
23443then :
23444  printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
23445
23446fi
23447ac_fn_c_check_func "$LINENO" "gettid" "ac_cv_func_gettid"
23448if test "x$ac_cv_func_gettid" = xyes
23449then :
23450  printf "%s\n" "#define HAVE_GETTID 1" >>confdefs.h
23451
23452fi
23453
23454
23455  for ac_func in setresuid
23456do :
23457  ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
23458if test "x$ac_cv_func_setresuid" = xyes
23459then :
23460  printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h
23461
23462else $as_nop
23463  ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
23464if test "x$ac_cv_func_setreuid" = xyes
23465then :
23466  printf "%s\n" "#define HAVE_SETREUID 1" >>confdefs.h
23467
23468fi
23469
23470fi
23471
23472done
23473
23474  for ac_func in setresgid
23475do :
23476  ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
23477if test "x$ac_cv_func_setresgid" = xyes
23478then :
23479  printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h
23480
23481else $as_nop
23482  ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
23483if test "x$ac_cv_func_setregid" = xyes
23484then :
23485  printf "%s\n" "#define HAVE_SETREGID 1" >>confdefs.h
23486
23487fi
23488
23489fi
23490
23491done
23492
23493# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
23494if echo $host_os | grep darwin8 > /dev/null; then
23495
23496printf "%s\n" "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
23497
23498fi
23499ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
23500$ac_includes_default
23501#ifdef HAVE_NETINET_IN_H
23502#include <netinet/in.h>
23503#endif
23504
23505#ifdef HAVE_NETINET_TCP_H
23506#include <netinet/tcp.h>
23507#endif
23508
23509#ifdef HAVE_ARPA_INET_H
23510#include <arpa/inet.h>
23511#endif
23512
23513#ifdef HAVE_WINSOCK2_H
23514#include <winsock2.h>
23515#endif
23516
23517#ifdef HAVE_WS2TCPIP_H
23518#include <ws2tcpip.h>
23519#endif
23520
23521" "$ac_c_undeclared_builtin_options" "CFLAGS"
23522if test "x$ac_cv_have_decl_inet_pton" = xyes
23523then :
23524  ac_have_decl=1
23525else $as_nop
23526  ac_have_decl=0
23527fi
23528printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
23529ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
23530$ac_includes_default
23531#ifdef HAVE_NETINET_IN_H
23532#include <netinet/in.h>
23533#endif
23534
23535#ifdef HAVE_NETINET_TCP_H
23536#include <netinet/tcp.h>
23537#endif
23538
23539#ifdef HAVE_ARPA_INET_H
23540#include <arpa/inet.h>
23541#endif
23542
23543#ifdef HAVE_WINSOCK2_H
23544#include <winsock2.h>
23545#endif
23546
23547#ifdef HAVE_WS2TCPIP_H
23548#include <ws2tcpip.h>
23549#endif
23550
23551" "$ac_c_undeclared_builtin_options" "CFLAGS"
23552if test "x$ac_cv_have_decl_inet_ntop" = xyes
23553then :
23554  ac_have_decl=1
23555else $as_nop
23556  ac_have_decl=0
23557fi
23558printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h
23559
23560ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
23561if test "x$ac_cv_func_inet_aton" = xyes
23562then :
23563  printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h
23564
23565else $as_nop
23566  case " $LIBOBJS " in
23567  *" inet_aton.$ac_objext "* ) ;;
23568  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
23569 ;;
23570esac
23571
23572fi
23573
23574ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
23575if test "x$ac_cv_func_inet_pton" = xyes
23576then :
23577  printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
23578
23579else $as_nop
23580  case " $LIBOBJS " in
23581  *" inet_pton.$ac_objext "* ) ;;
23582  *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
23583 ;;
23584esac
23585
23586fi
23587
23588ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
23589if test "x$ac_cv_func_inet_ntop" = xyes
23590then :
23591  printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
23592
23593else $as_nop
23594  case " $LIBOBJS " in
23595  *" inet_ntop.$ac_objext "* ) ;;
23596  *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
23597 ;;
23598esac
23599
23600fi
23601
23602ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
23603if test "x$ac_cv_func_snprintf" = xyes
23604then :
23605  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
23606
23607else $as_nop
23608  case " $LIBOBJS " in
23609  *" snprintf.$ac_objext "* ) ;;
23610  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
23611 ;;
23612esac
23613
23614fi
23615
23616# test if snprintf return the proper length
23617if test "x$ac_cv_func_snprintf" = xyes; then
23618    if test c${cross_compiling} = cno; then
23619	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
23620printf %s "checking for correct snprintf return value... " >&6; }
23621	if test "$cross_compiling" = yes
23622then :
23623  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
23624printf "%s\n" "maybe" >&6; }
23625else $as_nop
23626  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23627/* end confdefs.h.  */
23628$ac_includes_default
23629
23630int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
23631
23632_ACEOF
23633if ac_fn_c_try_run "$LINENO"
23634then :
23635  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23636printf "%s\n" "yes" >&6; }
23637else $as_nop
23638
23639		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23640printf "%s\n" "no" >&6; }
23641
23642printf "%s\n" "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
23643
23644		case " $LIBOBJS " in
23645  *" snprintf.$ac_objext "* ) ;;
23646  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
23647 ;;
23648esac
23649
23650
23651fi
23652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23653  conftest.$ac_objext conftest.beam conftest.$ac_ext
23654fi
23655
23656    fi
23657fi
23658ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
23659if test "x$ac_cv_func_strlcat" = xyes
23660then :
23661  printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
23662
23663else $as_nop
23664  case " $LIBOBJS " in
23665  *" strlcat.$ac_objext "* ) ;;
23666  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
23667 ;;
23668esac
23669
23670fi
23671
23672ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
23673if test "x$ac_cv_func_strlcpy" = xyes
23674then :
23675  printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
23676
23677else $as_nop
23678  case " $LIBOBJS " in
23679  *" strlcpy.$ac_objext "* ) ;;
23680  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
23681 ;;
23682esac
23683
23684fi
23685
23686ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
23687if test "x$ac_cv_func_memmove" = xyes
23688then :
23689  printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h
23690
23691else $as_nop
23692  case " $LIBOBJS " in
23693  *" memmove.$ac_objext "* ) ;;
23694  *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
23695 ;;
23696esac
23697
23698fi
23699
23700ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
23701if test "x$ac_cv_func_gmtime_r" = xyes
23702then :
23703  printf "%s\n" "#define HAVE_GMTIME_R 1" >>confdefs.h
23704
23705else $as_nop
23706  case " $LIBOBJS " in
23707  *" gmtime_r.$ac_objext "* ) ;;
23708  *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
23709 ;;
23710esac
23711
23712fi
23713
23714ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
23715if test "x$ac_cv_func_isblank" = xyes
23716then :
23717  printf "%s\n" "#define HAVE_ISBLANK 1" >>confdefs.h
23718
23719else $as_nop
23720  case " $LIBOBJS " in
23721  *" isblank.$ac_objext "* ) ;;
23722  *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
23723 ;;
23724esac
23725
23726fi
23727
23728ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
23729if test "x$ac_cv_func_explicit_bzero" = xyes
23730then :
23731  printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
23732
23733else $as_nop
23734  case " $LIBOBJS " in
23735  *" explicit_bzero.$ac_objext "* ) ;;
23736  *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
23737 ;;
23738esac
23739
23740fi
23741
23742LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
23743
23744{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
23745printf %s "checking for reallocarray... " >&6; }
23746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23747/* end confdefs.h.  */
23748$ac_includes_default
23749
23750#ifndef _OPENBSD_SOURCE
23751#define _OPENBSD_SOURCE 1
23752#endif
23753#include <stdlib.h>
23754int main(void) {
23755	void* p = reallocarray(NULL, 10, 100);
23756	free(p);
23757	return 0;
23758}
23759
23760_ACEOF
23761if ac_fn_c_try_link "$LINENO"
23762then :
23763  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23764printf "%s\n" "yes" >&6; }
23765
23766printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
23767
23768
23769else $as_nop
23770
23771	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23772printf "%s\n" "no" >&6; }
23773	case " $LIBOBJS " in
23774  *" reallocarray.$ac_objext "* ) ;;
23775  *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
23776 ;;
23777esac
23778
23779
23780fi
23781rm -f core conftest.err conftest.$ac_objext conftest.beam \
23782    conftest$ac_exeext conftest.$ac_ext
23783ac_fn_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23784if test "x$ac_cv_have_decl_reallocarray" = xyes
23785then :
23786  ac_have_decl=1
23787else $as_nop
23788  ac_have_decl=0
23789fi
23790printf "%s\n" "#define HAVE_DECL_REALLOCARRAY $ac_have_decl" >>confdefs.h
23791
23792if test "$USE_NSS" = "no"; then
23793	ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
23794if test "x$ac_cv_func_arc4random" = xyes
23795then :
23796  printf "%s\n" "#define HAVE_ARC4RANDOM 1" >>confdefs.h
23797
23798else $as_nop
23799  case " $LIBOBJS " in
23800  *" arc4random.$ac_objext "* ) ;;
23801  *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
23802 ;;
23803esac
23804
23805fi
23806
23807	ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
23808if test "x$ac_cv_func_arc4random_uniform" = xyes
23809then :
23810  printf "%s\n" "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
23811
23812else $as_nop
23813  case " $LIBOBJS " in
23814  *" arc4random_uniform.$ac_objext "* ) ;;
23815  *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
23816 ;;
23817esac
23818
23819fi
23820
23821	if test "$ac_cv_func_arc4random" = "no"; then
23822		case " $LIBOBJS " in
23823  *" arc4_lock.$ac_objext "* ) ;;
23824  *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
23825 ;;
23826esac
23827
23828
23829  for ac_func in getentropy
23830do :
23831  ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
23832if test "x$ac_cv_func_getentropy" = xyes
23833then :
23834  printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
23835
23836else $as_nop
23837
23838		    if test "$USE_WINSOCK" = 1; then
23839			case " $LIBOBJS " in
23840  *" getentropy_win.$ac_objext "* ) ;;
23841  *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
23842 ;;
23843esac
23844
23845		    else
23846			case "$host" in
23847			Darwin|*darwin*)
23848				case " $LIBOBJS " in
23849  *" getentropy_osx.$ac_objext "* ) ;;
23850  *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
23851 ;;
23852esac
23853
23854			;;
23855			*solaris*|*sunos*|SunOS)
23856				case " $LIBOBJS " in
23857  *" getentropy_solaris.$ac_objext "* ) ;;
23858  *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
23859 ;;
23860esac
23861
23862				       for ac_header in sys/sha2.h
23863do :
23864  ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
23865"
23866if test "x$ac_cv_header_sys_sha2_h" = xyes
23867then :
23868  printf "%s\n" "#define HAVE_SYS_SHA2_H 1" >>confdefs.h
23869
23870else $as_nop
23871
23872
23873  for ac_func in SHA512_Update
23874do :
23875  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
23876if test "x$ac_cv_func_SHA512_Update" = xyes
23877then :
23878  printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
23879
23880else $as_nop
23881
23882						case " $LIBOBJS " in
23883  *" sha512.$ac_objext "* ) ;;
23884  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
23885 ;;
23886esac
23887
23888
23889fi
23890
23891done
23892
23893fi
23894
23895done
23896				if test "$ac_cv_header_sys_sha2_h" = "yes"; then
23897					# this lib needed for sha2 on solaris
23898					LIBS="$LIBS -lmd"
23899				fi
23900				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
23901printf %s "checking for library containing clock_gettime... " >&6; }
23902if test ${ac_cv_search_clock_gettime+y}
23903then :
23904  printf %s "(cached) " >&6
23905else $as_nop
23906  ac_func_search_save_LIBS=$LIBS
23907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23908/* end confdefs.h.  */
23909
23910/* Override any GCC internal prototype to avoid an error.
23911   Use char because int might match the return type of a GCC
23912   builtin and then its argument prototype would still apply.  */
23913char clock_gettime ();
23914int
23915main (void)
23916{
23917return clock_gettime ();
23918  ;
23919  return 0;
23920}
23921_ACEOF
23922for ac_lib in '' rt
23923do
23924  if test -z "$ac_lib"; then
23925    ac_res="none required"
23926  else
23927    ac_res=-l$ac_lib
23928    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23929  fi
23930  if ac_fn_c_try_link "$LINENO"
23931then :
23932  ac_cv_search_clock_gettime=$ac_res
23933fi
23934rm -f core conftest.err conftest.$ac_objext conftest.beam \
23935    conftest$ac_exeext
23936  if test ${ac_cv_search_clock_gettime+y}
23937then :
23938  break
23939fi
23940done
23941if test ${ac_cv_search_clock_gettime+y}
23942then :
23943
23944else $as_nop
23945  ac_cv_search_clock_gettime=no
23946fi
23947rm conftest.$ac_ext
23948LIBS=$ac_func_search_save_LIBS
23949fi
23950{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
23951printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
23952ac_res=$ac_cv_search_clock_gettime
23953if test "$ac_res" != no
23954then :
23955  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23956
23957fi
23958
23959			;;
23960			*freebsd*|*FreeBSD)
23961				case " $LIBOBJS " in
23962  *" getentropy_freebsd.$ac_objext "* ) ;;
23963  *) LIBOBJS="$LIBOBJS getentropy_freebsd.$ac_objext"
23964 ;;
23965esac
23966
23967			;;
23968			*linux*|Linux|*)
23969				case " $LIBOBJS " in
23970  *" getentropy_linux.$ac_objext "* ) ;;
23971  *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
23972 ;;
23973esac
23974
23975
23976  for ac_func in SHA512_Update
23977do :
23978  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
23979if test "x$ac_cv_func_SHA512_Update" = xyes
23980then :
23981  printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
23982
23983else $as_nop
23984
23985
23986printf "%s\n" "#define COMPAT_SHA512 1" >>confdefs.h
23987
23988					case " $LIBOBJS " in
23989  *" sha512.$ac_objext "* ) ;;
23990  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
23991 ;;
23992esac
23993
23994
23995fi
23996
23997done
23998				ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
23999"
24000if test "x$ac_cv_header_sys_sysctl_h" = xyes
24001then :
24002  printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
24003
24004fi
24005
24006				ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
24007if test "x$ac_cv_func_getauxval" = xyes
24008then :
24009  printf "%s\n" "#define HAVE_GETAUXVAL 1" >>confdefs.h
24010
24011fi
24012
24013				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
24014printf %s "checking for library containing clock_gettime... " >&6; }
24015if test ${ac_cv_search_clock_gettime+y}
24016then :
24017  printf %s "(cached) " >&6
24018else $as_nop
24019  ac_func_search_save_LIBS=$LIBS
24020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24021/* end confdefs.h.  */
24022
24023/* Override any GCC internal prototype to avoid an error.
24024   Use char because int might match the return type of a GCC
24025   builtin and then its argument prototype would still apply.  */
24026char clock_gettime ();
24027int
24028main (void)
24029{
24030return clock_gettime ();
24031  ;
24032  return 0;
24033}
24034_ACEOF
24035for ac_lib in '' rt
24036do
24037  if test -z "$ac_lib"; then
24038    ac_res="none required"
24039  else
24040    ac_res=-l$ac_lib
24041    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24042  fi
24043  if ac_fn_c_try_link "$LINENO"
24044then :
24045  ac_cv_search_clock_gettime=$ac_res
24046fi
24047rm -f core conftest.err conftest.$ac_objext conftest.beam \
24048    conftest$ac_exeext
24049  if test ${ac_cv_search_clock_gettime+y}
24050then :
24051  break
24052fi
24053done
24054if test ${ac_cv_search_clock_gettime+y}
24055then :
24056
24057else $as_nop
24058  ac_cv_search_clock_gettime=no
24059fi
24060rm conftest.$ac_ext
24061LIBS=$ac_func_search_save_LIBS
24062fi
24063{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
24064printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
24065ac_res=$ac_cv_search_clock_gettime
24066if test "$ac_res" != no
24067then :
24068  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24069
24070fi
24071
24072			;;
24073			esac
24074		    fi
24075
24076fi
24077
24078done
24079	fi
24080fi
24081LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
24082
24083ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
24084if test "x$ac_cv_func_ctime_r" = xyes
24085then :
24086  printf "%s\n" "#define HAVE_CTIME_R 1" >>confdefs.h
24087
24088else $as_nop
24089  case " $LIBOBJS " in
24090  *" ctime_r.$ac_objext "* ) ;;
24091  *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
24092 ;;
24093esac
24094
24095fi
24096
24097ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
24098if test "x$ac_cv_func_strsep" = xyes
24099then :
24100  printf "%s\n" "#define HAVE_STRSEP 1" >>confdefs.h
24101
24102else $as_nop
24103  case " $LIBOBJS " in
24104  *" strsep.$ac_objext "* ) ;;
24105  *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
24106 ;;
24107esac
24108
24109fi
24110
24111
24112# Check whether --enable-allsymbols was given.
24113if test ${enable_allsymbols+y}
24114then :
24115  enableval=$enable_allsymbols;
24116fi
24117
24118case "$enable_allsymbols" in
24119	yes)
24120	COMMON_OBJ_ALL_SYMBOLS=""
24121	UBSYMS=""
24122	EXTRALINK="libunbound.la"
24123
24124printf "%s\n" "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
24125
24126	;;
24127	no|*)
24128	COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
24129	UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
24130	EXTRALINK=""
24131	;;
24132esac
24133
24134
24135
24136if test x_$enable_lock_checks = x_yes; then
24137	UBSYMS="-export-symbols clubsyms.def"
24138	cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
24139	echo lock_protect >> clubsyms.def
24140	echo lock_protect_place >> clubsyms.def
24141	echo lock_unprotect >> clubsyms.def
24142	echo lock_get_mem >> clubsyms.def
24143	echo checklock_start >> clubsyms.def
24144	echo checklock_stop >> clubsyms.def
24145	echo checklock_set_output_name >> clubsyms.def
24146	echo checklock_lock >> clubsyms.def
24147	echo checklock_unlock >> clubsyms.def
24148	echo checklock_init >> clubsyms.def
24149	echo checklock_thrcreate >> clubsyms.def
24150	echo checklock_thrjoin >> clubsyms.def
24151fi
24152
24153# check for dnstap if requested
24154
24155    # Check whether --enable-dnstap was given.
24156if test ${enable_dnstap+y}
24157then :
24158  enableval=$enable_dnstap; opt_dnstap=$enableval
24159else $as_nop
24160  opt_dnstap=no
24161fi
24162
24163
24164
24165# Check whether --with-dnstap-socket-path was given.
24166if test ${with_dnstap_socket_path+y}
24167then :
24168  withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
24169else $as_nop
24170  opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
24171fi
24172
24173
24174    if test "x$opt_dnstap" != "xno"; then
24175        # Extract the first word of "protoc-c", so it can be a program name with args.
24176set dummy protoc-c; ac_word=$2
24177{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24178printf %s "checking for $ac_word... " >&6; }
24179if test ${ac_cv_path_PROTOC_C+y}
24180then :
24181  printf %s "(cached) " >&6
24182else $as_nop
24183  case $PROTOC_C in
24184  [\\/]* | ?:[\\/]*)
24185  ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
24186  ;;
24187  *)
24188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24189for as_dir in $PATH
24190do
24191  IFS=$as_save_IFS
24192  case $as_dir in #(((
24193    '') as_dir=./ ;;
24194    */) ;;
24195    *) as_dir=$as_dir/ ;;
24196  esac
24197    for ac_exec_ext in '' $ac_executable_extensions; do
24198  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
24199    ac_cv_path_PROTOC_C="$as_dir$ac_word$ac_exec_ext"
24200    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
24201    break 2
24202  fi
24203done
24204  done
24205IFS=$as_save_IFS
24206
24207  ;;
24208esac
24209fi
24210PROTOC_C=$ac_cv_path_PROTOC_C
24211if test -n "$PROTOC_C"; then
24212  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
24213printf "%s\n" "$PROTOC_C" >&6; }
24214else
24215  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24216printf "%s\n" "no" >&6; }
24217fi
24218
24219
24220        if test -z "$PROTOC_C"; then
24221          as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
24222        fi
24223
24224# Check whether --with-protobuf-c was given.
24225if test ${with_protobuf_c+y}
24226then :
24227  withval=$with_protobuf_c;
24228                # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
24229                if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
24230                    CFLAGS="$CFLAGS -I$withval/include/google"
24231                else
24232                    CFLAGS="$CFLAGS -I$withval/include"
24233                fi
24234                LDFLAGS="$LDFLAGS -L$withval/lib"
24235
24236else $as_nop
24237
24238                if test -n "$PKG_CONFIG"; then
24239
24240pkg_failed=no
24241{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PROTOBUFC" >&5
24242printf %s "checking for PROTOBUFC... " >&6; }
24243
24244if test -n "$PROTOBUFC_CFLAGS"; then
24245    pkg_cv_PROTOBUFC_CFLAGS="$PROTOBUFC_CFLAGS"
24246 elif test -n "$PKG_CONFIG"; then
24247    if test -n "$PKG_CONFIG" && \
24248    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
24249  ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
24250  ac_status=$?
24251  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24252  test $ac_status = 0; }; then
24253  pkg_cv_PROTOBUFC_CFLAGS=`$PKG_CONFIG --cflags "libprotobuf-c" 2>/dev/null`
24254		      test "x$?" != "x0" && pkg_failed=yes
24255else
24256  pkg_failed=yes
24257fi
24258 else
24259    pkg_failed=untried
24260fi
24261if test -n "$PROTOBUFC_LIBS"; then
24262    pkg_cv_PROTOBUFC_LIBS="$PROTOBUFC_LIBS"
24263 elif test -n "$PKG_CONFIG"; then
24264    if test -n "$PKG_CONFIG" && \
24265    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
24266  ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
24267  ac_status=$?
24268  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24269  test $ac_status = 0; }; then
24270  pkg_cv_PROTOBUFC_LIBS=`$PKG_CONFIG --libs "libprotobuf-c" 2>/dev/null`
24271		      test "x$?" != "x0" && pkg_failed=yes
24272else
24273  pkg_failed=yes
24274fi
24275 else
24276    pkg_failed=untried
24277fi
24278
24279
24280
24281if test $pkg_failed = yes; then
24282   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24283printf "%s\n" "no" >&6; }
24284
24285if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
24286        _pkg_short_errors_supported=yes
24287else
24288        _pkg_short_errors_supported=no
24289fi
24290        if test $_pkg_short_errors_supported = yes; then
24291	        PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libprotobuf-c" 2>&1`
24292        else
24293	        PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libprotobuf-c" 2>&1`
24294        fi
24295	# Put the nasty error message in config.log where it belongs
24296	echo "$PROTOBUFC_PKG_ERRORS" >&5
24297
24298
24299                            # pkg-config failed; try falling back to known values
24300                            # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
24301                            if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
24302                                CFLAGS="$CFLAGS -I/usr/include/google"
24303                            else
24304                                if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
24305                                    CFLAGS="$CFLAGS -I/usr/local/include/google"
24306                                    LDFLAGS="$LDFLAGS -L/usr/local/lib"
24307                                else
24308                                    as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
24309                                fi
24310                            fi
24311
24312
24313elif test $pkg_failed = untried; then
24314     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24315printf "%s\n" "no" >&6; }
24316
24317                            # pkg-config failed; try falling back to known values
24318                            # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
24319                            if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
24320                                CFLAGS="$CFLAGS -I/usr/include/google"
24321                            else
24322                                if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
24323                                    CFLAGS="$CFLAGS -I/usr/local/include/google"
24324                                    LDFLAGS="$LDFLAGS -L/usr/local/lib"
24325                                else
24326                                    as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
24327                                fi
24328                            fi
24329
24330
24331else
24332	PROTOBUFC_CFLAGS=$pkg_cv_PROTOBUFC_CFLAGS
24333	PROTOBUFC_LIBS=$pkg_cv_PROTOBUFC_LIBS
24334        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24335printf "%s\n" "yes" >&6; }
24336
24337                            CFLAGS="$CFLAGS $PROTOBUFC_CFLAGS"
24338                            LIBS="$LIBS $PROTOBUFC_LIBS"
24339
24340fi
24341                else
24342                    # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
24343                    if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
24344                        CFLAGS="$CFLAGS -I/usr/include/google"
24345                    else
24346                        if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
24347                            CFLAGS="$CFLAGS -I/usr/local/include/google"
24348                            LDFLAGS="$LDFLAGS -L/usr/local/lib"
24349                        fi
24350                    fi
24351                fi
24352
24353
24354fi
24355
24356        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
24357printf %s "checking for library containing protobuf_c_message_pack... " >&6; }
24358if test ${ac_cv_search_protobuf_c_message_pack+y}
24359then :
24360  printf %s "(cached) " >&6
24361else $as_nop
24362  ac_func_search_save_LIBS=$LIBS
24363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24364/* end confdefs.h.  */
24365
24366/* Override any GCC internal prototype to avoid an error.
24367   Use char because int might match the return type of a GCC
24368   builtin and then its argument prototype would still apply.  */
24369char protobuf_c_message_pack ();
24370int
24371main (void)
24372{
24373return protobuf_c_message_pack ();
24374  ;
24375  return 0;
24376}
24377_ACEOF
24378for ac_lib in '' protobuf-c
24379do
24380  if test -z "$ac_lib"; then
24381    ac_res="none required"
24382  else
24383    ac_res=-l$ac_lib
24384    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24385  fi
24386  if ac_fn_c_try_link "$LINENO"
24387then :
24388  ac_cv_search_protobuf_c_message_pack=$ac_res
24389fi
24390rm -f core conftest.err conftest.$ac_objext conftest.beam \
24391    conftest$ac_exeext
24392  if test ${ac_cv_search_protobuf_c_message_pack+y}
24393then :
24394  break
24395fi
24396done
24397if test ${ac_cv_search_protobuf_c_message_pack+y}
24398then :
24399
24400else $as_nop
24401  ac_cv_search_protobuf_c_message_pack=no
24402fi
24403rm conftest.$ac_ext
24404LIBS=$ac_func_search_save_LIBS
24405fi
24406{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
24407printf "%s\n" "$ac_cv_search_protobuf_c_message_pack" >&6; }
24408ac_res=$ac_cv_search_protobuf_c_message_pack
24409if test "$ac_res" != no
24410then :
24411  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24412
24413else $as_nop
24414  as_fn_error $? "The protobuf-c library was not found. Please install the development libraries for protobuf-c!" "$LINENO" 5
24415fi
24416
24417
24418
24419printf "%s\n" "#define USE_DNSTAP 1" >>confdefs.h
24420
24421        ENABLE_DNSTAP=1
24422
24423
24424
24425        hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
24426
24427
24428printf "%s\n" "#define DNSTAP_SOCKET_PATH \"$hdr_dnstap_socket_path\"" >>confdefs.h
24429
24430	DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path"
24431
24432	DNSTAP_SOCKET_TESTBIN='unbound-dnstap-socket$(EXEEXT)'
24433
24434        DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"
24435
24436        DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"
24437
24438
24439    else
24440
24441        ENABLE_DNSTAP=0
24442
24443
24444
24445    fi
24446
24447
24448# check for dnscrypt if requested
24449
24450  # Check whether --enable-dnscrypt was given.
24451if test ${enable_dnscrypt+y}
24452then :
24453  enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
24454else $as_nop
24455  opt_dnscrypt=no
24456fi
24457
24458
24459  if test "x$opt_dnscrypt" != "xno"; then
24460
24461# Check whether --with-libsodium was given.
24462if test ${with_libsodium+y}
24463then :
24464  withval=$with_libsodium;
24465	CFLAGS="$CFLAGS -I$withval/include"
24466	LDFLAGS="$LDFLAGS -L$withval/lib"
24467
24468fi
24469
24470    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
24471printf %s "checking for library containing sodium_init... " >&6; }
24472if test ${ac_cv_search_sodium_init+y}
24473then :
24474  printf %s "(cached) " >&6
24475else $as_nop
24476  ac_func_search_save_LIBS=$LIBS
24477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24478/* end confdefs.h.  */
24479
24480/* Override any GCC internal prototype to avoid an error.
24481   Use char because int might match the return type of a GCC
24482   builtin and then its argument prototype would still apply.  */
24483char sodium_init ();
24484int
24485main (void)
24486{
24487return sodium_init ();
24488  ;
24489  return 0;
24490}
24491_ACEOF
24492for ac_lib in '' sodium
24493do
24494  if test -z "$ac_lib"; then
24495    ac_res="none required"
24496  else
24497    ac_res=-l$ac_lib
24498    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24499  fi
24500  if ac_fn_c_try_link "$LINENO"
24501then :
24502  ac_cv_search_sodium_init=$ac_res
24503fi
24504rm -f core conftest.err conftest.$ac_objext conftest.beam \
24505    conftest$ac_exeext
24506  if test ${ac_cv_search_sodium_init+y}
24507then :
24508  break
24509fi
24510done
24511if test ${ac_cv_search_sodium_init+y}
24512then :
24513
24514else $as_nop
24515  ac_cv_search_sodium_init=no
24516fi
24517rm conftest.$ac_ext
24518LIBS=$ac_func_search_save_LIBS
24519fi
24520{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
24521printf "%s\n" "$ac_cv_search_sodium_init" >&6; }
24522ac_res=$ac_cv_search_sodium_init
24523if test "$ac_res" != no
24524then :
24525  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24526
24527else $as_nop
24528  as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
24529fi
24530
24531    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
24532printf %s "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
24533if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
24534then :
24535  printf %s "(cached) " >&6
24536else $as_nop
24537  ac_func_search_save_LIBS=$LIBS
24538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24539/* end confdefs.h.  */
24540
24541/* Override any GCC internal prototype to avoid an error.
24542   Use char because int might match the return type of a GCC
24543   builtin and then its argument prototype would still apply.  */
24544char crypto_box_curve25519xchacha20poly1305_beforenm ();
24545int
24546main (void)
24547{
24548return crypto_box_curve25519xchacha20poly1305_beforenm ();
24549  ;
24550  return 0;
24551}
24552_ACEOF
24553for ac_lib in '' sodium
24554do
24555  if test -z "$ac_lib"; then
24556    ac_res="none required"
24557  else
24558    ac_res=-l$ac_lib
24559    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24560  fi
24561  if ac_fn_c_try_link "$LINENO"
24562then :
24563  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
24564fi
24565rm -f core conftest.err conftest.$ac_objext conftest.beam \
24566    conftest$ac_exeext
24567  if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
24568then :
24569  break
24570fi
24571done
24572if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
24573then :
24574
24575else $as_nop
24576  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
24577fi
24578rm conftest.$ac_ext
24579LIBS=$ac_func_search_save_LIBS
24580fi
24581{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
24582printf "%s\n" "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
24583ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
24584if test "$ac_res" != no
24585then :
24586  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24587
24588            ENABLE_DNSCRYPT_XCHACHA20=1
24589
24590
24591printf "%s\n" "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
24592
24593
24594else $as_nop
24595
24596            ENABLE_DNSCRYPT_XCHACHA20=0
24597
24598
24599fi
24600
24601    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
24602printf %s "checking for library containing sodium_set_misuse_handler... " >&6; }
24603if test ${ac_cv_search_sodium_set_misuse_handler+y}
24604then :
24605  printf %s "(cached) " >&6
24606else $as_nop
24607  ac_func_search_save_LIBS=$LIBS
24608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24609/* end confdefs.h.  */
24610
24611/* Override any GCC internal prototype to avoid an error.
24612   Use char because int might match the return type of a GCC
24613   builtin and then its argument prototype would still apply.  */
24614char sodium_set_misuse_handler ();
24615int
24616main (void)
24617{
24618return sodium_set_misuse_handler ();
24619  ;
24620  return 0;
24621}
24622_ACEOF
24623for ac_lib in '' sodium
24624do
24625  if test -z "$ac_lib"; then
24626    ac_res="none required"
24627  else
24628    ac_res=-l$ac_lib
24629    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24630  fi
24631  if ac_fn_c_try_link "$LINENO"
24632then :
24633  ac_cv_search_sodium_set_misuse_handler=$ac_res
24634fi
24635rm -f core conftest.err conftest.$ac_objext conftest.beam \
24636    conftest$ac_exeext
24637  if test ${ac_cv_search_sodium_set_misuse_handler+y}
24638then :
24639  break
24640fi
24641done
24642if test ${ac_cv_search_sodium_set_misuse_handler+y}
24643then :
24644
24645else $as_nop
24646  ac_cv_search_sodium_set_misuse_handler=no
24647fi
24648rm conftest.$ac_ext
24649LIBS=$ac_func_search_save_LIBS
24650fi
24651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
24652printf "%s\n" "$ac_cv_search_sodium_set_misuse_handler" >&6; }
24653ac_res=$ac_cv_search_sodium_set_misuse_handler
24654if test "$ac_res" != no
24655then :
24656  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24657
24658
24659printf "%s\n" "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
24660
24661
24662fi
24663
24664
24665
24666printf "%s\n" "#define USE_DNSCRYPT 1" >>confdefs.h
24667
24668        ENABLE_DNSCRYPT=1
24669
24670
24671        DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
24672
24673        DNSCRYPT_OBJ="dnscrypt.lo"
24674
24675
24676  else
24677    ENABLE_DNSCRYPT_XCHACHA20=0
24678
24679
24680        ENABLE_DNSCRYPT=0
24681
24682
24683
24684  fi
24685
24686
24687# check for cachedb if requested
24688# Check whether --enable-cachedb was given.
24689if test ${enable_cachedb+y}
24690then :
24691  enableval=$enable_cachedb;
24692fi
24693
24694# turn on cachedb when hiredis support is enabled.
24695if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
24696case "$enable_cachedb" in
24697    yes)
24698
24699printf "%s\n" "#define USE_CACHEDB 1" >>confdefs.h
24700
24701	CACHEDB_SRC="cachedb/cachedb.c cachedb/redis.c"
24702
24703	CACHEDB_OBJ="cachedb.lo redis.lo"
24704
24705    	;;
24706    no|*)
24707    	# nothing
24708    	;;
24709esac
24710
24711# check for ipsecmod if requested
24712# Check whether --enable-ipsecmod was given.
24713if test ${enable_ipsecmod+y}
24714then :
24715  enableval=$enable_ipsecmod;
24716fi
24717
24718case "$enable_ipsecmod" in
24719	yes)
24720
24721printf "%s\n" "#define USE_IPSECMOD 1" >>confdefs.h
24722
24723		IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
24724
24725		IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
24726
24727		;;
24728	no|*)
24729		# nothing
24730		;;
24731esac
24732
24733# check for ipset if requested
24734# Check whether --enable-ipset was given.
24735if test ${enable_ipset+y}
24736then :
24737  enableval=$enable_ipset;
24738fi
24739
24740case "$enable_ipset" in
24741    yes)
24742
24743printf "%s\n" "#define USE_IPSET 1" >>confdefs.h
24744
24745		IPSET_SRC="ipset/ipset.c"
24746
24747		IPSET_OBJ="ipset.lo"
24748
24749
24750		# BSD's pf
24751		       for ac_header in net/pfvar.h
24752do :
24753  ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "
24754		  #include <netinet/in.h>
24755		  #include <net/if.h>
24756
24757"
24758if test "x$ac_cv_header_net_pfvar_h" = xyes
24759then :
24760  printf "%s\n" "#define HAVE_NET_PFVAR_H 1" >>confdefs.h
24761
24762else $as_nop
24763
24764		    # mnl
24765
24766# Check whether --with-libmnl was given.
24767if test ${with_libmnl+y}
24768then :
24769  withval=$with_libmnl;
24770else $as_nop
24771   withval="yes"
24772fi
24773
24774		    found_libmnl="no"
24775		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
24776printf %s "checking for libmnl... " >&6; }
24777		    if test x_$withval = x_ -o x_$withval = x_yes; then
24778			withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
24779		    fi
24780		    for dir in $withval ; do
24781			if test -f "$dir/include/libmnl/libmnl.h" -o -f "$dir/include/libmnl/libmnl/libmnl.h"; then
24782				found_libmnl="yes"
24783								extralibmnl=""
24784				if test -f "$dir/include/libmnl/libmnl/libmnl.h"; then
24785					extralibmnl="/libmnl"
24786				fi
24787				if test "$dir" != "/usr" -o -n "$extralibmnl"; then
24788					CPPFLAGS="$CPPFLAGS -I$dir/include$extralibmnl"
24789				fi
24790				if test "$dir" != "/usr"; then
24791					LDFLAGS="$LDFLAGS -L$dir/lib"
24792				fi
24793				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
24794printf "%s\n" "found in $dir" >&6; }
24795				LIBS="$LIBS -lmnl"
24796				break;
24797			fi
24798		    done
24799		    if test x_$found_libmnl != x_yes; then
24800			  as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5
24801		    fi
24802
24803fi
24804
24805done
24806		;;
24807    no|*)
24808    	# nothing
24809		;;
24810esac
24811# Check whether --enable-explicit-port-randomisation was given.
24812if test ${enable_explicit_port_randomisation+y}
24813then :
24814  enableval=$enable_explicit_port_randomisation;
24815fi
24816
24817case "$enable_explicit_port_randomisation" in
24818	no)
24819
24820printf "%s\n" "#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1" >>confdefs.h
24821
24822		;;
24823	yes|*)
24824		;;
24825esac
24826
24827if echo "$host" | $GREP -i -e linux >/dev/null; then
24828	# Check whether --enable-linux-ip-local-port-range was given.
24829if test ${enable_linux_ip_local_port_range+y}
24830then :
24831  enableval=$enable_linux_ip_local_port_range;
24832fi
24833
24834	case "$enable_linux_ip_local_port_range" in
24835		yes)
24836
24837printf "%s\n" "#define USE_LINUX_IP_LOCAL_PORT_RANGE 1" >>confdefs.h
24838
24839			;;
24840		no|*)
24841			;;
24842	esac
24843fi
24844
24845
24846{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
24847printf %s "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
24848# on openBSD, the implicit rule make $< work.
24849# on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
24850# gmake works.
24851cat >conftest.make <<EOF
24852all:	conftest.lo
24853
24854conftest.lo foo.lo bla.lo:
24855	if test -f "\$<"; then touch \$@; fi
24856
24857.SUFFIXES: .lo
24858.c.lo:
24859	if test -f "\$<"; then touch \$@; fi
24860
24861conftest.lo:        conftest.dir/conftest.c
24862EOF
24863mkdir conftest.dir
24864touch conftest.dir/conftest.c
24865rm -f conftest.lo conftest.c
24866${MAKE:-make} -f conftest.make >/dev/null
24867rm -f conftest.make conftest.c conftest.dir/conftest.c
24868rm -rf conftest.dir
24869if test ! -f conftest.lo; then
24870	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24871printf "%s\n" "no" >&6; }
24872	SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
24873	SOURCEFILE='`cat .source`'
24874else
24875	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24876printf "%s\n" "yes" >&6; }
24877	SOURCEDETERMINE=':'
24878	SOURCEFILE='$<'
24879fi
24880rm -f conftest.lo
24881
24882
24883
24884# see if we want to build the library or everything
24885ALLTARGET="alltargets"
24886INSTALLTARGET="install-all"
24887
24888# Check whether --with-libunbound-only was given.
24889if test ${with_libunbound_only+y}
24890then :
24891  withval=$with_libunbound_only;
24892	if test "$withval" = "yes"; then
24893		ALLTARGET="lib"
24894		INSTALLTARGET="install-lib"
24895	fi
24896
24897fi
24898
24899if test $ALLTARGET = "alltargets"; then
24900	if test $USE_NSS = "yes"; then
24901		as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
24902	fi
24903	if test $USE_NETTLE = "yes"; then
24904		as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
24905	fi
24906fi
24907
24908
24909
24910
24911
24912  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
24913printf "%s\n" "$as_me: Stripping extension flags..." >&6;}
24914
24915  if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
24916    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
24917
24918printf "%s\n" "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
24919
24920  fi
24921
24922
24923  if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
24924    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
24925
24926printf "%s\n" "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
24927
24928  fi
24929
24930
24931  if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
24932    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
24933
24934printf "%s\n" "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
24935
24936  fi
24937
24938
24939  if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
24940    CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
24941
24942printf "%s\n" "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
24943
24944  fi
24945
24946
24947  if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
24948    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
24949
24950printf "%s\n" "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
24951
24952  fi
24953
24954
24955  if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
24956    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
24957
24958printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
24959
24960  fi
24961
24962
24963  if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
24964    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
24965
24966printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
24967
24968  fi
24969
24970
24971  if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
24972    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
24973
24974printf "%s\n" "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
24975
24976  fi
24977
24978
24979  if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
24980    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
24981
24982printf "%s\n" "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
24983
24984  fi
24985
24986
24987if test -n "$LATE_LDFLAGS"; then
24988  LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
24989fi
24990# remove start spaces
24991LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
24992LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
24993
24994
24995printf "%s\n" "#define MAXSYSLOGMSGLEN 10240" >>confdefs.h
24996
24997
24998
24999
25000version=1.22.0
25001
25002date=`date +'%b %e, %Y'`
25003
25004
25005ac_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 contrib/unbound_portable.service"
25006
25007ac_config_headers="$ac_config_headers config.h"
25008
25009cat >confcache <<\_ACEOF
25010# This file is a shell script that caches the results of configure
25011# tests run on this system so they can be shared between configure
25012# scripts and configure runs, see configure's option --config-cache.
25013# It is not useful on other systems.  If it contains results you don't
25014# want to keep, you may remove or edit it.
25015#
25016# config.status only pays attention to the cache file if you give it
25017# the --recheck option to rerun configure.
25018#
25019# `ac_cv_env_foo' variables (set or unset) will be overridden when
25020# loading this file, other *unset* `ac_cv_foo' will be assigned the
25021# following values.
25022
25023_ACEOF
25024
25025# The following way of writing the cache mishandles newlines in values,
25026# but we know of no workaround that is simple, portable, and efficient.
25027# So, we kill variables containing newlines.
25028# Ultrix sh set writes to stderr and can't be redirected directly,
25029# and sets the high bit in the cache file unless we assign to the vars.
25030(
25031  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25032    eval ac_val=\$$ac_var
25033    case $ac_val in #(
25034    *${as_nl}*)
25035      case $ac_var in #(
25036      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
25037printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
25038      esac
25039      case $ac_var in #(
25040      _ | IFS | as_nl) ;; #(
25041      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
25042      *) { eval $ac_var=; unset $ac_var;} ;;
25043      esac ;;
25044    esac
25045  done
25046
25047  (set) 2>&1 |
25048    case $as_nl`(ac_space=' '; set) 2>&1` in #(
25049    *${as_nl}ac_space=\ *)
25050      # `set' does not quote correctly, so add quotes: double-quote
25051      # substitution turns \\\\ into \\, and sed turns \\ into \.
25052      sed -n \
25053	"s/'/'\\\\''/g;
25054	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
25055      ;; #(
25056    *)
25057      # `set' quotes correctly as required by POSIX, so do not add quotes.
25058      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
25059      ;;
25060    esac |
25061    sort
25062) |
25063  sed '
25064     /^ac_cv_env_/b end
25065     t clear
25066     :clear
25067     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
25068     t end
25069     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25070     :end' >>confcache
25071if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25072  if test -w "$cache_file"; then
25073    if test "x$cache_file" != "x/dev/null"; then
25074      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
25075printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
25076      if test ! -f "$cache_file" || test -h "$cache_file"; then
25077	cat confcache >"$cache_file"
25078      else
25079        case $cache_file in #(
25080        */* | ?:*)
25081	  mv -f confcache "$cache_file"$$ &&
25082	  mv -f "$cache_file"$$ "$cache_file" ;; #(
25083        *)
25084	  mv -f confcache "$cache_file" ;;
25085	esac
25086      fi
25087    fi
25088  else
25089    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
25090printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
25091  fi
25092fi
25093rm -f confcache
25094
25095test "x$prefix" = xNONE && prefix=$ac_default_prefix
25096# Let make expand exec_prefix.
25097test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25098
25099DEFS=-DHAVE_CONFIG_H
25100
25101ac_libobjs=
25102ac_ltlibobjs=
25103U=
25104for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25105  # 1. Remove the extension, and $U if already installed.
25106  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25107  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
25108  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
25109  #    will be set to the directory where LIBOBJS objects are built.
25110  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25111  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
25112done
25113LIBOBJS=$ac_libobjs
25114
25115LTLIBOBJS=$ac_ltlibobjs
25116
25117
25118if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
25119  as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
25120Usually this means the macro was only invoked conditionally." "$LINENO" 5
25121fi
25122
25123: "${CONFIG_STATUS=./config.status}"
25124ac_write_fail=0
25125ac_clean_files_save=$ac_clean_files
25126ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25127{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
25128printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
25129as_write_fail=0
25130cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
25131#! $SHELL
25132# Generated by $as_me.
25133# Run this file to recreate the current configuration.
25134# Compiler output produced by configure, useful for debugging
25135# configure, is in config.log if it exists.
25136
25137debug=false
25138ac_cs_recheck=false
25139ac_cs_silent=false
25140
25141SHELL=\${CONFIG_SHELL-$SHELL}
25142export SHELL
25143_ASEOF
25144cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
25145## -------------------- ##
25146## M4sh Initialization. ##
25147## -------------------- ##
25148
25149# Be more Bourne compatible
25150DUALCASE=1; export DUALCASE # for MKS sh
25151as_nop=:
25152if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
25153then :
25154  emulate sh
25155  NULLCMD=:
25156  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25157  # is contrary to our usage.  Disable this feature.
25158  alias -g '${1+"$@"}'='"$@"'
25159  setopt NO_GLOB_SUBST
25160else $as_nop
25161  case `(set -o) 2>/dev/null` in #(
25162  *posix*) :
25163    set -o posix ;; #(
25164  *) :
25165     ;;
25166esac
25167fi
25168
25169
25170
25171# Reset variables that may have inherited troublesome values from
25172# the environment.
25173
25174# IFS needs to be set, to space, tab, and newline, in precisely that order.
25175# (If _AS_PATH_WALK were called with IFS unset, it would have the
25176# side effect of setting IFS to empty, thus disabling word splitting.)
25177# Quoting is to prevent editors from complaining about space-tab.
25178as_nl='
25179'
25180export as_nl
25181IFS=" ""	$as_nl"
25182
25183PS1='$ '
25184PS2='> '
25185PS4='+ '
25186
25187# Ensure predictable behavior from utilities with locale-dependent output.
25188LC_ALL=C
25189export LC_ALL
25190LANGUAGE=C
25191export LANGUAGE
25192
25193# We cannot yet rely on "unset" to work, but we need these variables
25194# to be unset--not just set to an empty or harmless value--now, to
25195# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
25196# also avoids known problems related to "unset" and subshell syntax
25197# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
25198for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
25199do eval test \${$as_var+y} \
25200  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
25201done
25202
25203# Ensure that fds 0, 1, and 2 are open.
25204if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
25205if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
25206if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
25207
25208# The user is always right.
25209if ${PATH_SEPARATOR+false} :; then
25210  PATH_SEPARATOR=:
25211  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
25212    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
25213      PATH_SEPARATOR=';'
25214  }
25215fi
25216
25217
25218# Find who we are.  Look in the path if we contain no directory separator.
25219as_myself=
25220case $0 in #((
25221  *[\\/]* ) as_myself=$0 ;;
25222  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25223for as_dir in $PATH
25224do
25225  IFS=$as_save_IFS
25226  case $as_dir in #(((
25227    '') as_dir=./ ;;
25228    */) ;;
25229    *) as_dir=$as_dir/ ;;
25230  esac
25231    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
25232  done
25233IFS=$as_save_IFS
25234
25235     ;;
25236esac
25237# We did not find ourselves, most probably we were run as `sh COMMAND'
25238# in which case we are not to be found in the path.
25239if test "x$as_myself" = x; then
25240  as_myself=$0
25241fi
25242if test ! -f "$as_myself"; then
25243  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25244  exit 1
25245fi
25246
25247
25248
25249# as_fn_error STATUS ERROR [LINENO LOG_FD]
25250# ----------------------------------------
25251# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
25252# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
25253# script with STATUS, using 1 if that was 0.
25254as_fn_error ()
25255{
25256  as_status=$1; test $as_status -eq 0 && as_status=1
25257  if test "$4"; then
25258    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
25259    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
25260  fi
25261  printf "%s\n" "$as_me: error: $2" >&2
25262  as_fn_exit $as_status
25263} # as_fn_error
25264
25265
25266
25267# as_fn_set_status STATUS
25268# -----------------------
25269# Set $? to STATUS, without forking.
25270as_fn_set_status ()
25271{
25272  return $1
25273} # as_fn_set_status
25274
25275# as_fn_exit STATUS
25276# -----------------
25277# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
25278as_fn_exit ()
25279{
25280  set +e
25281  as_fn_set_status $1
25282  exit $1
25283} # as_fn_exit
25284
25285# as_fn_unset VAR
25286# ---------------
25287# Portably unset VAR.
25288as_fn_unset ()
25289{
25290  { eval $1=; unset $1;}
25291}
25292as_unset=as_fn_unset
25293
25294# as_fn_append VAR VALUE
25295# ----------------------
25296# Append the text in VALUE to the end of the definition contained in VAR. Take
25297# advantage of any shell optimizations that allow amortized linear growth over
25298# repeated appends, instead of the typical quadratic growth present in naive
25299# implementations.
25300if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
25301then :
25302  eval 'as_fn_append ()
25303  {
25304    eval $1+=\$2
25305  }'
25306else $as_nop
25307  as_fn_append ()
25308  {
25309    eval $1=\$$1\$2
25310  }
25311fi # as_fn_append
25312
25313# as_fn_arith ARG...
25314# ------------------
25315# Perform arithmetic evaluation on the ARGs, and store the result in the
25316# global $as_val. Take advantage of shells that can avoid forks. The arguments
25317# must be portable across $(()) and expr.
25318if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
25319then :
25320  eval 'as_fn_arith ()
25321  {
25322    as_val=$(( $* ))
25323  }'
25324else $as_nop
25325  as_fn_arith ()
25326  {
25327    as_val=`expr "$@" || test $? -eq 1`
25328  }
25329fi # as_fn_arith
25330
25331
25332if expr a : '\(a\)' >/dev/null 2>&1 &&
25333   test "X`expr 00001 : '.*\(...\)'`" = X001; then
25334  as_expr=expr
25335else
25336  as_expr=false
25337fi
25338
25339if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25340  as_basename=basename
25341else
25342  as_basename=false
25343fi
25344
25345if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25346  as_dirname=dirname
25347else
25348  as_dirname=false
25349fi
25350
25351as_me=`$as_basename -- "$0" ||
25352$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25353	 X"$0" : 'X\(//\)$' \| \
25354	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25355printf "%s\n" X/"$0" |
25356    sed '/^.*\/\([^/][^/]*\)\/*$/{
25357	    s//\1/
25358	    q
25359	  }
25360	  /^X\/\(\/\/\)$/{
25361	    s//\1/
25362	    q
25363	  }
25364	  /^X\/\(\/\).*/{
25365	    s//\1/
25366	    q
25367	  }
25368	  s/.*/./; q'`
25369
25370# Avoid depending upon Character Ranges.
25371as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25372as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25373as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25374as_cr_digits='0123456789'
25375as_cr_alnum=$as_cr_Letters$as_cr_digits
25376
25377
25378# Determine whether it's possible to make 'echo' print without a newline.
25379# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
25380# for compatibility with existing Makefiles.
25381ECHO_C= ECHO_N= ECHO_T=
25382case `echo -n x` in #(((((
25383-n*)
25384  case `echo 'xy\c'` in
25385  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
25386  xy)  ECHO_C='\c';;
25387  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
25388       ECHO_T='	';;
25389  esac;;
25390*)
25391  ECHO_N='-n';;
25392esac
25393
25394# For backward compatibility with old third-party macros, we provide
25395# the shell variables $as_echo and $as_echo_n.  New code should use
25396# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
25397as_echo='printf %s\n'
25398as_echo_n='printf %s'
25399
25400rm -f conf$$ conf$$.exe conf$$.file
25401if test -d conf$$.dir; then
25402  rm -f conf$$.dir/conf$$.file
25403else
25404  rm -f conf$$.dir
25405  mkdir conf$$.dir 2>/dev/null
25406fi
25407if (echo >conf$$.file) 2>/dev/null; then
25408  if ln -s conf$$.file conf$$ 2>/dev/null; then
25409    as_ln_s='ln -s'
25410    # ... but there are two gotchas:
25411    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25412    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25413    # In both cases, we have to default to `cp -pR'.
25414    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25415      as_ln_s='cp -pR'
25416  elif ln conf$$.file conf$$ 2>/dev/null; then
25417    as_ln_s=ln
25418  else
25419    as_ln_s='cp -pR'
25420  fi
25421else
25422  as_ln_s='cp -pR'
25423fi
25424rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25425rmdir conf$$.dir 2>/dev/null
25426
25427
25428# as_fn_mkdir_p
25429# -------------
25430# Create "$as_dir" as a directory, including parents if necessary.
25431as_fn_mkdir_p ()
25432{
25433
25434  case $as_dir in #(
25435  -*) as_dir=./$as_dir;;
25436  esac
25437  test -d "$as_dir" || eval $as_mkdir_p || {
25438    as_dirs=
25439    while :; do
25440      case $as_dir in #(
25441      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
25442      *) as_qdir=$as_dir;;
25443      esac
25444      as_dirs="'$as_qdir' $as_dirs"
25445      as_dir=`$as_dirname -- "$as_dir" ||
25446$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25447	 X"$as_dir" : 'X\(//\)[^/]' \| \
25448	 X"$as_dir" : 'X\(//\)$' \| \
25449	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25450printf "%s\n" X"$as_dir" |
25451    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25452	    s//\1/
25453	    q
25454	  }
25455	  /^X\(\/\/\)[^/].*/{
25456	    s//\1/
25457	    q
25458	  }
25459	  /^X\(\/\/\)$/{
25460	    s//\1/
25461	    q
25462	  }
25463	  /^X\(\/\).*/{
25464	    s//\1/
25465	    q
25466	  }
25467	  s/.*/./; q'`
25468      test -d "$as_dir" && break
25469    done
25470    test -z "$as_dirs" || eval "mkdir $as_dirs"
25471  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
25472
25473
25474} # as_fn_mkdir_p
25475if mkdir -p . 2>/dev/null; then
25476  as_mkdir_p='mkdir -p "$as_dir"'
25477else
25478  test -d ./-p && rmdir ./-p
25479  as_mkdir_p=false
25480fi
25481
25482
25483# as_fn_executable_p FILE
25484# -----------------------
25485# Test if FILE is an executable regular file.
25486as_fn_executable_p ()
25487{
25488  test -f "$1" && test -x "$1"
25489} # as_fn_executable_p
25490as_test_x='test -x'
25491as_executable_p=as_fn_executable_p
25492
25493# Sed expression to map a string onto a valid CPP name.
25494as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25495
25496# Sed expression to map a string onto a valid variable name.
25497as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25498
25499
25500exec 6>&1
25501## ----------------------------------- ##
25502## Main body of $CONFIG_STATUS script. ##
25503## ----------------------------------- ##
25504_ASEOF
25505test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
25506
25507cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25508# Save the log message, to keep $0 and so on meaningful, and to
25509# report actual input values of CONFIG_FILES etc. instead of their
25510# values after options handling.
25511ac_log="
25512This file was extended by unbound $as_me 1.22.0, which was
25513generated by GNU Autoconf 2.71.  Invocation command line was
25514
25515  CONFIG_FILES    = $CONFIG_FILES
25516  CONFIG_HEADERS  = $CONFIG_HEADERS
25517  CONFIG_LINKS    = $CONFIG_LINKS
25518  CONFIG_COMMANDS = $CONFIG_COMMANDS
25519  $ $0 $@
25520
25521on `(hostname || uname -n) 2>/dev/null | sed 1q`
25522"
25523
25524_ACEOF
25525
25526case $ac_config_files in *"
25527"*) set x $ac_config_files; shift; ac_config_files=$*;;
25528esac
25529
25530case $ac_config_headers in *"
25531"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25532esac
25533
25534
25535cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25536# Files that config.status was made for.
25537config_files="$ac_config_files"
25538config_headers="$ac_config_headers"
25539config_commands="$ac_config_commands"
25540
25541_ACEOF
25542
25543cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25544ac_cs_usage="\
25545\`$as_me' instantiates files and other configuration actions
25546from templates according to the current configuration.  Unless the files
25547and actions are specified as TAGs, all are instantiated by default.
25548
25549Usage: $0 [OPTION]... [TAG]...
25550
25551  -h, --help       print this help, then exit
25552  -V, --version    print version number and configuration settings, then exit
25553      --config     print configuration, then exit
25554  -q, --quiet, --silent
25555                   do not print progress messages
25556  -d, --debug      don't remove temporary files
25557      --recheck    update $as_me by reconfiguring in the same conditions
25558      --file=FILE[:TEMPLATE]
25559                   instantiate the configuration file FILE
25560      --header=FILE[:TEMPLATE]
25561                   instantiate the configuration header FILE
25562
25563Configuration files:
25564$config_files
25565
25566Configuration headers:
25567$config_headers
25568
25569Configuration commands:
25570$config_commands
25571
25572Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>."
25573
25574_ACEOF
25575ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
25576ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
25577cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25578ac_cs_config='$ac_cs_config_escaped'
25579ac_cs_version="\\
25580unbound config.status 1.22.0
25581configured by $0, generated by GNU Autoconf 2.71,
25582  with options \\"\$ac_cs_config\\"
25583
25584Copyright (C) 2021 Free Software Foundation, Inc.
25585This config.status script is free software; the Free Software Foundation
25586gives unlimited permission to copy, distribute and modify it."
25587
25588ac_pwd='$ac_pwd'
25589srcdir='$srcdir'
25590AWK='$AWK'
25591test -n "\$AWK" || AWK=awk
25592_ACEOF
25593
25594cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25595# The default lists apply if the user does not specify any file.
25596ac_need_defaults=:
25597while test $# != 0
25598do
25599  case $1 in
25600  --*=?*)
25601    ac_option=`expr "X$1" : 'X\([^=]*\)='`
25602    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25603    ac_shift=:
25604    ;;
25605  --*=)
25606    ac_option=`expr "X$1" : 'X\([^=]*\)='`
25607    ac_optarg=
25608    ac_shift=:
25609    ;;
25610  *)
25611    ac_option=$1
25612    ac_optarg=$2
25613    ac_shift=shift
25614    ;;
25615  esac
25616
25617  case $ac_option in
25618  # Handling of the options.
25619  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25620    ac_cs_recheck=: ;;
25621  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25622    printf "%s\n" "$ac_cs_version"; exit ;;
25623  --config | --confi | --conf | --con | --co | --c )
25624    printf "%s\n" "$ac_cs_config"; exit ;;
25625  --debug | --debu | --deb | --de | --d | -d )
25626    debug=: ;;
25627  --file | --fil | --fi | --f )
25628    $ac_shift
25629    case $ac_optarg in
25630    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25631    '') as_fn_error $? "missing file argument" ;;
25632    esac
25633    as_fn_append CONFIG_FILES " '$ac_optarg'"
25634    ac_need_defaults=false;;
25635  --header | --heade | --head | --hea )
25636    $ac_shift
25637    case $ac_optarg in
25638    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25639    esac
25640    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
25641    ac_need_defaults=false;;
25642  --he | --h)
25643    # Conflict between --help and --header
25644    as_fn_error $? "ambiguous option: \`$1'
25645Try \`$0 --help' for more information.";;
25646  --help | --hel | -h )
25647    printf "%s\n" "$ac_cs_usage"; exit ;;
25648  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25649  | -silent | --silent | --silen | --sile | --sil | --si | --s)
25650    ac_cs_silent=: ;;
25651
25652  # This is an error.
25653  -*) as_fn_error $? "unrecognized option: \`$1'
25654Try \`$0 --help' for more information." ;;
25655
25656  *) as_fn_append ac_config_targets " $1"
25657     ac_need_defaults=false ;;
25658
25659  esac
25660  shift
25661done
25662
25663ac_configure_extra_args=
25664
25665if $ac_cs_silent; then
25666  exec 6>/dev/null
25667  ac_configure_extra_args="$ac_configure_extra_args --silent"
25668fi
25669
25670_ACEOF
25671cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25672if \$ac_cs_recheck; then
25673  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25674  shift
25675  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
25676  CONFIG_SHELL='$SHELL'
25677  export CONFIG_SHELL
25678  exec "\$@"
25679fi
25680
25681_ACEOF
25682cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25683exec 5>>config.log
25684{
25685  echo
25686  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25687## Running $as_me. ##
25688_ASBOX
25689  printf "%s\n" "$ac_log"
25690} >&5
25691
25692_ACEOF
25693cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25694#
25695# INIT-COMMANDS
25696#
25697
25698
25699# The HP-UX ksh and POSIX shell print the target directory to stdout
25700# if CDPATH is set.
25701(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
25702
25703sed_quote_subst='$sed_quote_subst'
25704double_quote_subst='$double_quote_subst'
25705delay_variable_subst='$delay_variable_subst'
25706macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
25707macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
25708enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
25709enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
25710pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
25711enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
25712shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
25713SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
25714ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
25715PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
25716host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
25717host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
25718host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
25719build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
25720build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
25721build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
25722SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
25723Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
25724GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
25725EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
25726FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
25727LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
25728NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
25729LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
25730max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
25731ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
25732exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
25733lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
25734lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
25735lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
25736lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
25737lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
25738reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
25739reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
25740OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
25741deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
25742file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
25743file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
25744want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
25745DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
25746sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
25747AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
25748AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
25749archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
25750STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
25751RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
25752old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
25753old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
25754old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
25755lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
25756CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
25757CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
25758compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
25759GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
25760lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
25761lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
25762lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
25763lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
25764lt_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"`'
25765lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
25766nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
25767lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
25768lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
25769objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
25770MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
25771lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
25772lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
25773lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
25774lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
25775lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
25776need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
25777MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
25778DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
25779NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
25780LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
25781OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
25782OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
25783libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
25784shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
25785extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
25786archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
25787enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
25788export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
25789whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
25790compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
25791old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
25792old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
25793archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
25794archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
25795module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
25796module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
25797with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
25798allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
25799no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
25800hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
25801hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
25802hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
25803hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
25804hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
25805hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
25806hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
25807inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
25808link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
25809always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
25810export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
25811exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
25812include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
25813prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
25814postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
25815file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
25816variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
25817need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
25818need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
25819version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
25820runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
25821shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
25822shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
25823libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
25824library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
25825soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
25826install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
25827postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
25828postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
25829finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
25830finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
25831hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
25832sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
25833configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
25834configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
25835hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
25836enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
25837enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
25838enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
25839old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
25840striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
25841
25842LTCC='$LTCC'
25843LTCFLAGS='$LTCFLAGS'
25844compiler='$compiler_DEFAULT'
25845
25846# A function that is used when there is no print builtin or printf.
25847func_fallback_echo ()
25848{
25849  eval 'cat <<_LTECHO_EOF
25850\$1
25851_LTECHO_EOF'
25852}
25853
25854# Quote evaled strings.
25855for var in SHELL \
25856ECHO \
25857PATH_SEPARATOR \
25858SED \
25859GREP \
25860EGREP \
25861FGREP \
25862LD \
25863NM \
25864LN_S \
25865lt_SP2NL \
25866lt_NL2SP \
25867reload_flag \
25868OBJDUMP \
25869deplibs_check_method \
25870file_magic_cmd \
25871file_magic_glob \
25872want_nocaseglob \
25873DLLTOOL \
25874sharedlib_from_linklib_cmd \
25875AR \
25876AR_FLAGS \
25877archiver_list_spec \
25878STRIP \
25879RANLIB \
25880CC \
25881CFLAGS \
25882compiler \
25883lt_cv_sys_global_symbol_pipe \
25884lt_cv_sys_global_symbol_to_cdecl \
25885lt_cv_sys_global_symbol_to_import \
25886lt_cv_sys_global_symbol_to_c_name_address \
25887lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
25888lt_cv_nm_interface \
25889nm_file_list_spec \
25890lt_cv_truncate_bin \
25891lt_prog_compiler_no_builtin_flag \
25892lt_prog_compiler_pic \
25893lt_prog_compiler_wl \
25894lt_prog_compiler_static \
25895lt_cv_prog_compiler_c_o \
25896need_locks \
25897MANIFEST_TOOL \
25898DSYMUTIL \
25899NMEDIT \
25900LIPO \
25901OTOOL \
25902OTOOL64 \
25903shrext_cmds \
25904export_dynamic_flag_spec \
25905whole_archive_flag_spec \
25906compiler_needs_object \
25907with_gnu_ld \
25908allow_undefined_flag \
25909no_undefined_flag \
25910hardcode_libdir_flag_spec \
25911hardcode_libdir_separator \
25912exclude_expsyms \
25913include_expsyms \
25914file_list_spec \
25915variables_saved_for_relink \
25916libname_spec \
25917library_names_spec \
25918soname_spec \
25919install_override_mode \
25920finish_eval \
25921old_striplib \
25922striplib; do
25923    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
25924    *[\\\\\\\`\\"\\\$]*)
25925      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
25926      ;;
25927    *)
25928      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
25929      ;;
25930    esac
25931done
25932
25933# Double-quote double-evaled strings.
25934for var in reload_cmds \
25935old_postinstall_cmds \
25936old_postuninstall_cmds \
25937old_archive_cmds \
25938extract_expsyms_cmds \
25939old_archive_from_new_cmds \
25940old_archive_from_expsyms_cmds \
25941archive_cmds \
25942archive_expsym_cmds \
25943module_cmds \
25944module_expsym_cmds \
25945export_symbols_cmds \
25946prelink_cmds \
25947postlink_cmds \
25948postinstall_cmds \
25949postuninstall_cmds \
25950finish_cmds \
25951sys_lib_search_path_spec \
25952configure_time_dlsearch_path \
25953configure_time_lt_sys_library_path; do
25954    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
25955    *[\\\\\\\`\\"\\\$]*)
25956      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
25957      ;;
25958    *)
25959      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
25960      ;;
25961    esac
25962done
25963
25964ac_aux_dir='$ac_aux_dir'
25965
25966# See if we are running on zsh, and set the options that allow our
25967# commands through without removal of \ escapes INIT.
25968if test -n "\${ZSH_VERSION+set}"; then
25969   setopt NO_GLOB_SUBST
25970fi
25971
25972
25973    PACKAGE='$PACKAGE'
25974    VERSION='$VERSION'
25975    RM='$RM'
25976    ofile='$ofile'
25977
25978
25979
25980
25981_ACEOF
25982
25983cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25984
25985# Handling of arguments.
25986for ac_config_target in $ac_config_targets
25987do
25988  case $ac_config_target in
25989    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
25990    "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
25991    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25992    "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
25993    "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
25994    "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
25995    "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
25996    "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
25997    "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
25998    "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
25999    "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
26000    "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
26001    "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
26002    "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
26003    "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
26004    "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
26005    "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
26006    "contrib/unbound_portable.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound_portable.service" ;;
26007    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
26008
26009  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
26010  esac
26011done
26012
26013
26014# If the user did not use the arguments to specify the items to instantiate,
26015# then the envvar interface is used.  Set only those that are not.
26016# We use the long form for the default assignment because of an extremely
26017# bizarre bug on SunOS 4.1.3.
26018if $ac_need_defaults; then
26019  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
26020  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
26021  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
26022fi
26023
26024# Have a temporary directory for convenience.  Make it in the build tree
26025# simply because there is no reason against having it here, and in addition,
26026# creating and moving files from /tmp can sometimes cause problems.
26027# Hook for its removal unless debugging.
26028# Note that there is a small window in which the directory will not be cleaned:
26029# after its creation but before its name has been assigned to `$tmp'.
26030$debug ||
26031{
26032  tmp= ac_tmp=
26033  trap 'exit_status=$?
26034  : "${ac_tmp:=$tmp}"
26035  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
26036' 0
26037  trap 'as_fn_exit 1' 1 2 13 15
26038}
26039# Create a (secure) tmp directory for tmp files.
26040
26041{
26042  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
26043  test -d "$tmp"
26044}  ||
26045{
26046  tmp=./conf$$-$RANDOM
26047  (umask 077 && mkdir "$tmp")
26048} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
26049ac_tmp=$tmp
26050
26051# Set up the scripts for CONFIG_FILES section.
26052# No need to generate them if there are no CONFIG_FILES.
26053# This happens for instance with `./config.status config.h'.
26054if test -n "$CONFIG_FILES"; then
26055
26056
26057ac_cr=`echo X | tr X '\015'`
26058# On cygwin, bash can eat \r inside `` if the user requested igncr.
26059# But we know of no other shell where ac_cr would be empty at this
26060# point, so we can use a bashism as a fallback.
26061if test "x$ac_cr" = x; then
26062  eval ac_cr=\$\'\\r\'
26063fi
26064ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
26065if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
26066  ac_cs_awk_cr='\\r'
26067else
26068  ac_cs_awk_cr=$ac_cr
26069fi
26070
26071echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
26072_ACEOF
26073
26074
26075{
26076  echo "cat >conf$$subs.awk <<_ACEOF" &&
26077  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
26078  echo "_ACEOF"
26079} >conf$$subs.sh ||
26080  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
26081ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
26082ac_delim='%!_!# '
26083for ac_last_try in false false false false false :; do
26084  . ./conf$$subs.sh ||
26085    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
26086
26087  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
26088  if test $ac_delim_n = $ac_delim_num; then
26089    break
26090  elif $ac_last_try; then
26091    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
26092  else
26093    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26094  fi
26095done
26096rm -f conf$$subs.sh
26097
26098cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26099cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
26100_ACEOF
26101sed -n '
26102h
26103s/^/S["/; s/!.*/"]=/
26104p
26105g
26106s/^[^!]*!//
26107:repl
26108t repl
26109s/'"$ac_delim"'$//
26110t delim
26111:nl
26112h
26113s/\(.\{148\}\)..*/\1/
26114t more1
26115s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
26116p
26117n
26118b repl
26119:more1
26120s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26121p
26122g
26123s/.\{148\}//
26124t nl
26125:delim
26126h
26127s/\(.\{148\}\)..*/\1/
26128t more2
26129s/["\\]/\\&/g; s/^/"/; s/$/"/
26130p
26131b
26132:more2
26133s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26134p
26135g
26136s/.\{148\}//
26137t delim
26138' <conf$$subs.awk | sed '
26139/^[^""]/{
26140  N
26141  s/\n//
26142}
26143' >>$CONFIG_STATUS || ac_write_fail=1
26144rm -f conf$$subs.awk
26145cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26146_ACAWK
26147cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
26148  for (key in S) S_is_set[key] = 1
26149  FS = ""
26150
26151}
26152{
26153  line = $ 0
26154  nfields = split(line, field, "@")
26155  substed = 0
26156  len = length(field[1])
26157  for (i = 2; i < nfields; i++) {
26158    key = field[i]
26159    keylen = length(key)
26160    if (S_is_set[key]) {
26161      value = S[key]
26162      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
26163      len += length(value) + length(field[++i])
26164      substed = 1
26165    } else
26166      len += 1 + keylen
26167  }
26168
26169  print line
26170}
26171
26172_ACAWK
26173_ACEOF
26174cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26175if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
26176  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
26177else
26178  cat
26179fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
26180  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
26181_ACEOF
26182
26183# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
26184# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
26185# trailing colons and then remove the whole line if VPATH becomes empty
26186# (actually we leave an empty line to preserve line numbers).
26187if test "x$srcdir" = x.; then
26188  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
26189h
26190s///
26191s/^/:/
26192s/[	 ]*$/:/
26193s/:\$(srcdir):/:/g
26194s/:\${srcdir}:/:/g
26195s/:@srcdir@:/:/g
26196s/^:*//
26197s/:*$//
26198x
26199s/\(=[	 ]*\).*/\1/
26200G
26201s/\n//
26202s/^[^=]*=[	 ]*$//
26203}'
26204fi
26205
26206cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26207fi # test -n "$CONFIG_FILES"
26208
26209# Set up the scripts for CONFIG_HEADERS section.
26210# No need to generate them if there are no CONFIG_HEADERS.
26211# This happens for instance with `./config.status Makefile'.
26212if test -n "$CONFIG_HEADERS"; then
26213cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
26214BEGIN {
26215_ACEOF
26216
26217# Transform confdefs.h into an awk script `defines.awk', embedded as
26218# here-document in config.status, that substitutes the proper values into
26219# config.h.in to produce config.h.
26220
26221# Create a delimiter string that does not exist in confdefs.h, to ease
26222# handling of long lines.
26223ac_delim='%!_!# '
26224for ac_last_try in false false :; do
26225  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
26226  if test -z "$ac_tt"; then
26227    break
26228  elif $ac_last_try; then
26229    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
26230  else
26231    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26232  fi
26233done
26234
26235# For the awk script, D is an array of macro values keyed by name,
26236# likewise P contains macro parameters if any.  Preserve backslash
26237# newline sequences.
26238
26239ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26240sed -n '
26241s/.\{148\}/&'"$ac_delim"'/g
26242t rset
26243:rset
26244s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
26245t def
26246d
26247:def
26248s/\\$//
26249t bsnl
26250s/["\\]/\\&/g
26251s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
26252D["\1"]=" \3"/p
26253s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
26254d
26255:bsnl
26256s/["\\]/\\&/g
26257s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
26258D["\1"]=" \3\\\\\\n"\\/p
26259t cont
26260s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
26261t cont
26262d
26263:cont
26264n
26265s/.\{148\}/&'"$ac_delim"'/g
26266t clear
26267:clear
26268s/\\$//
26269t bsnlc
26270s/["\\]/\\&/g; s/^/"/; s/$/"/p
26271d
26272:bsnlc
26273s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
26274b cont
26275' <confdefs.h | sed '
26276s/'"$ac_delim"'/"\\\
26277"/g' >>$CONFIG_STATUS || ac_write_fail=1
26278
26279cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26280  for (key in D) D_is_set[key] = 1
26281  FS = ""
26282}
26283/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
26284  line = \$ 0
26285  split(line, arg, " ")
26286  if (arg[1] == "#") {
26287    defundef = arg[2]
26288    mac1 = arg[3]
26289  } else {
26290    defundef = substr(arg[1], 2)
26291    mac1 = arg[2]
26292  }
26293  split(mac1, mac2, "(") #)
26294  macro = mac2[1]
26295  prefix = substr(line, 1, index(line, defundef) - 1)
26296  if (D_is_set[macro]) {
26297    # Preserve the white space surrounding the "#".
26298    print prefix "define", macro P[macro] D[macro]
26299    next
26300  } else {
26301    # Replace #undef with comments.  This is necessary, for example,
26302    # in the case of _POSIX_SOURCE, which is predefined and required
26303    # on some systems where configure will not decide to define it.
26304    if (defundef == "undef") {
26305      print "/*", prefix defundef, macro, "*/"
26306      next
26307    }
26308  }
26309}
26310{ print }
26311_ACAWK
26312_ACEOF
26313cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26314  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
26315fi # test -n "$CONFIG_HEADERS"
26316
26317
26318eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
26319shift
26320for ac_tag
26321do
26322  case $ac_tag in
26323  :[FHLC]) ac_mode=$ac_tag; continue;;
26324  esac
26325  case $ac_mode$ac_tag in
26326  :[FHL]*:*);;
26327  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
26328  :[FH]-) ac_tag=-:-;;
26329  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26330  esac
26331  ac_save_IFS=$IFS
26332  IFS=:
26333  set x $ac_tag
26334  IFS=$ac_save_IFS
26335  shift
26336  ac_file=$1
26337  shift
26338
26339  case $ac_mode in
26340  :L) ac_source=$1;;
26341  :[FH])
26342    ac_file_inputs=
26343    for ac_f
26344    do
26345      case $ac_f in
26346      -) ac_f="$ac_tmp/stdin";;
26347      *) # Look for the file first in the build tree, then in the source tree
26348	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
26349	 # because $ac_f cannot contain `:'.
26350	 test -f "$ac_f" ||
26351	   case $ac_f in
26352	   [\\/$]*) false;;
26353	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26354	   esac ||
26355	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
26356      esac
26357      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
26358      as_fn_append ac_file_inputs " '$ac_f'"
26359    done
26360
26361    # Let's still pretend it is `configure' which instantiates (i.e., don't
26362    # use $as_me), people would be surprised to read:
26363    #    /* config.h.  Generated by config.status.  */
26364    configure_input='Generated from '`
26365	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
26366	`' by configure.'
26367    if test x"$ac_file" != x-; then
26368      configure_input="$ac_file.  $configure_input"
26369      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
26370printf "%s\n" "$as_me: creating $ac_file" >&6;}
26371    fi
26372    # Neutralize special characters interpreted by sed in replacement strings.
26373    case $configure_input in #(
26374    *\&* | *\|* | *\\* )
26375       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
26376       sed 's/[\\\\&|]/\\\\&/g'`;; #(
26377    *) ac_sed_conf_input=$configure_input;;
26378    esac
26379
26380    case $ac_tag in
26381    *:-:* | *:-) cat >"$ac_tmp/stdin" \
26382      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
26383    esac
26384    ;;
26385  esac
26386
26387  ac_dir=`$as_dirname -- "$ac_file" ||
26388$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26389	 X"$ac_file" : 'X\(//\)[^/]' \| \
26390	 X"$ac_file" : 'X\(//\)$' \| \
26391	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26392printf "%s\n" X"$ac_file" |
26393    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26394	    s//\1/
26395	    q
26396	  }
26397	  /^X\(\/\/\)[^/].*/{
26398	    s//\1/
26399	    q
26400	  }
26401	  /^X\(\/\/\)$/{
26402	    s//\1/
26403	    q
26404	  }
26405	  /^X\(\/\).*/{
26406	    s//\1/
26407	    q
26408	  }
26409	  s/.*/./; q'`
26410  as_dir="$ac_dir"; as_fn_mkdir_p
26411  ac_builddir=.
26412
26413case "$ac_dir" in
26414.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26415*)
26416  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
26417  # A ".." for each directory in $ac_dir_suffix.
26418  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
26419  case $ac_top_builddir_sub in
26420  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26421  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26422  esac ;;
26423esac
26424ac_abs_top_builddir=$ac_pwd
26425ac_abs_builddir=$ac_pwd$ac_dir_suffix
26426# for backward compatibility:
26427ac_top_builddir=$ac_top_build_prefix
26428
26429case $srcdir in
26430  .)  # We are building in place.
26431    ac_srcdir=.
26432    ac_top_srcdir=$ac_top_builddir_sub
26433    ac_abs_top_srcdir=$ac_pwd ;;
26434  [\\/]* | ?:[\\/]* )  # Absolute name.
26435    ac_srcdir=$srcdir$ac_dir_suffix;
26436    ac_top_srcdir=$srcdir
26437    ac_abs_top_srcdir=$srcdir ;;
26438  *) # Relative name.
26439    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26440    ac_top_srcdir=$ac_top_build_prefix$srcdir
26441    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
26442esac
26443ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
26444
26445
26446  case $ac_mode in
26447  :F)
26448  #
26449  # CONFIG_FILE
26450  #
26451
26452_ACEOF
26453
26454cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26455# If the template does not know about datarootdir, expand it.
26456# FIXME: This hack should be removed a few years after 2.60.
26457ac_datarootdir_hack=; ac_datarootdir_seen=
26458ac_sed_dataroot='
26459/datarootdir/ {
26460  p
26461  q
26462}
26463/@datadir@/p
26464/@docdir@/p
26465/@infodir@/p
26466/@localedir@/p
26467/@mandir@/p'
26468case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
26469*datarootdir*) ac_datarootdir_seen=yes;;
26470*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26471  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26472printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26473_ACEOF
26474cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26475  ac_datarootdir_hack='
26476  s&@datadir@&$datadir&g
26477  s&@docdir@&$docdir&g
26478  s&@infodir@&$infodir&g
26479  s&@localedir@&$localedir&g
26480  s&@mandir@&$mandir&g
26481  s&\\\${datarootdir}&$datarootdir&g' ;;
26482esac
26483_ACEOF
26484
26485# Neutralize VPATH when `$srcdir' = `.'.
26486# Shell code in configure.ac might set extrasub.
26487# FIXME: do we really want to maintain this feature?
26488cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26489ac_sed_extra="$ac_vpsub
26490$extrasub
26491_ACEOF
26492cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26493:t
26494/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26495s|@configure_input@|$ac_sed_conf_input|;t t
26496s&@top_builddir@&$ac_top_builddir_sub&;t t
26497s&@top_build_prefix@&$ac_top_build_prefix&;t t
26498s&@srcdir@&$ac_srcdir&;t t
26499s&@abs_srcdir@&$ac_abs_srcdir&;t t
26500s&@top_srcdir@&$ac_top_srcdir&;t t
26501s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26502s&@builddir@&$ac_builddir&;t t
26503s&@abs_builddir@&$ac_abs_builddir&;t t
26504s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26505$ac_datarootdir_hack
26506"
26507eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
26508  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26509
26510test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26511  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
26512  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
26513      "$ac_tmp/out"`; test -z "$ac_out"; } &&
26514  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26515which seems to be undefined.  Please make sure it is defined" >&5
26516printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26517which seems to be undefined.  Please make sure it is defined" >&2;}
26518
26519  rm -f "$ac_tmp/stdin"
26520  case $ac_file in
26521  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
26522  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
26523  esac \
26524  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26525 ;;
26526  :H)
26527  #
26528  # CONFIG_HEADER
26529  #
26530  if test x"$ac_file" != x-; then
26531    {
26532      printf "%s\n" "/* $configure_input  */" >&1 \
26533      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
26534    } >"$ac_tmp/config.h" \
26535      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26536    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
26537      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26538printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
26539    else
26540      rm -f "$ac_file"
26541      mv "$ac_tmp/config.h" "$ac_file" \
26542	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
26543    fi
26544  else
26545    printf "%s\n" "/* $configure_input  */" >&1 \
26546      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
26547      || as_fn_error $? "could not create -" "$LINENO" 5
26548  fi
26549 ;;
26550
26551  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26552printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
26553 ;;
26554  esac
26555
26556
26557  case $ac_file$ac_mode in
26558    "libtool":C)
26559
26560    # See if we are running on zsh, and set the options that allow our
26561    # commands through without removal of \ escapes.
26562    if test -n "${ZSH_VERSION+set}"; then
26563      setopt NO_GLOB_SUBST
26564    fi
26565
26566    cfgfile=${ofile}T
26567    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
26568    $RM "$cfgfile"
26569
26570    cat <<_LT_EOF >> "$cfgfile"
26571#! $SHELL
26572# Generated automatically by $as_me ($PACKAGE) $VERSION
26573# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
26574# NOTE: Changes made to this file will be lost: look at ltmain.sh.
26575
26576# Provide generalized library-building support services.
26577# Written by Gordon Matzigkeit, 1996
26578
26579# Copyright (C) 2014 Free Software Foundation, Inc.
26580# This is free software; see the source for copying conditions.  There is NO
26581# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26582
26583# GNU Libtool is free software; you can redistribute it and/or modify
26584# it under the terms of the GNU General Public License as published by
26585# the Free Software Foundation; either version 2 of of the License, or
26586# (at your option) any later version.
26587#
26588# As a special exception to the GNU General Public License, if you
26589# distribute this file as part of a program or library that is built
26590# using GNU Libtool, you may include this file under the  same
26591# distribution terms that you use for the rest of that program.
26592#
26593# GNU Libtool is distributed in the hope that it will be useful, but
26594# WITHOUT ANY WARRANTY; without even the implied warranty of
26595# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26596# GNU General Public License for more details.
26597#
26598# You should have received a copy of the GNU General Public License
26599# along with this program.  If not, see <http://www.gnu.org/licenses/>.
26600
26601
26602# The names of the tagged configurations supported by this script.
26603available_tags=''
26604
26605# Configured defaults for sys_lib_dlsearch_path munging.
26606: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
26607
26608# ### BEGIN LIBTOOL CONFIG
26609
26610# Which release of libtool.m4 was used?
26611macro_version=$macro_version
26612macro_revision=$macro_revision
26613
26614# Whether or not to build shared libraries.
26615build_libtool_libs=$enable_shared
26616
26617# Whether or not to build static libraries.
26618build_old_libs=$enable_static
26619
26620# What type of objects to build.
26621pic_mode=$pic_mode
26622
26623# Whether or not to optimize for fast installation.
26624fast_install=$enable_fast_install
26625
26626# Shared archive member basename,for filename based shared library versioning on AIX.
26627shared_archive_member_spec=$shared_archive_member_spec
26628
26629# Shell to use when invoking shell scripts.
26630SHELL=$lt_SHELL
26631
26632# An echo program that protects backslashes.
26633ECHO=$lt_ECHO
26634
26635# The PATH separator for the build system.
26636PATH_SEPARATOR=$lt_PATH_SEPARATOR
26637
26638# The host system.
26639host_alias=$host_alias
26640host=$host
26641host_os=$host_os
26642
26643# The build system.
26644build_alias=$build_alias
26645build=$build
26646build_os=$build_os
26647
26648# A sed program that does not truncate output.
26649SED=$lt_SED
26650
26651# Sed that helps us avoid accidentally triggering echo(1) options like -n.
26652Xsed="\$SED -e 1s/^X//"
26653
26654# A grep program that handles long lines.
26655GREP=$lt_GREP
26656
26657# An ERE matcher.
26658EGREP=$lt_EGREP
26659
26660# A literal string matcher.
26661FGREP=$lt_FGREP
26662
26663# A BSD- or MS-compatible name lister.
26664NM=$lt_NM
26665
26666# Whether we need soft or hard links.
26667LN_S=$lt_LN_S
26668
26669# What is the maximum length of a command?
26670max_cmd_len=$max_cmd_len
26671
26672# Object file suffix (normally "o").
26673objext=$ac_objext
26674
26675# Executable file suffix (normally "").
26676exeext=$exeext
26677
26678# whether the shell understands "unset".
26679lt_unset=$lt_unset
26680
26681# turn spaces into newlines.
26682SP2NL=$lt_lt_SP2NL
26683
26684# turn newlines into spaces.
26685NL2SP=$lt_lt_NL2SP
26686
26687# convert \$build file names to \$host format.
26688to_host_file_cmd=$lt_cv_to_host_file_cmd
26689
26690# convert \$build files to toolchain format.
26691to_tool_file_cmd=$lt_cv_to_tool_file_cmd
26692
26693# An object symbol dumper.
26694OBJDUMP=$lt_OBJDUMP
26695
26696# Method to check whether dependent libraries are shared objects.
26697deplibs_check_method=$lt_deplibs_check_method
26698
26699# Command to use when deplibs_check_method = "file_magic".
26700file_magic_cmd=$lt_file_magic_cmd
26701
26702# How to find potential files when deplibs_check_method = "file_magic".
26703file_magic_glob=$lt_file_magic_glob
26704
26705# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
26706want_nocaseglob=$lt_want_nocaseglob
26707
26708# DLL creation program.
26709DLLTOOL=$lt_DLLTOOL
26710
26711# Command to associate shared and link libraries.
26712sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
26713
26714# The archiver.
26715AR=$lt_AR
26716
26717# Flags to create an archive.
26718AR_FLAGS=$lt_AR_FLAGS
26719
26720# How to feed a file listing to the archiver.
26721archiver_list_spec=$lt_archiver_list_spec
26722
26723# A symbol stripping program.
26724STRIP=$lt_STRIP
26725
26726# Commands used to install an old-style archive.
26727RANLIB=$lt_RANLIB
26728old_postinstall_cmds=$lt_old_postinstall_cmds
26729old_postuninstall_cmds=$lt_old_postuninstall_cmds
26730
26731# Whether to use a lock for old archive extraction.
26732lock_old_archive_extraction=$lock_old_archive_extraction
26733
26734# A C compiler.
26735LTCC=$lt_CC
26736
26737# LTCC compiler flags.
26738LTCFLAGS=$lt_CFLAGS
26739
26740# Take the output of nm and produce a listing of raw symbols and C names.
26741global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
26742
26743# Transform the output of nm in a proper C declaration.
26744global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
26745
26746# Transform the output of nm into a list of symbols to manually relocate.
26747global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
26748
26749# Transform the output of nm in a C name address pair.
26750global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
26751
26752# Transform the output of nm in a C name address pair when lib prefix is needed.
26753global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
26754
26755# The name lister interface.
26756nm_interface=$lt_lt_cv_nm_interface
26757
26758# Specify filename containing input files for \$NM.
26759nm_file_list_spec=$lt_nm_file_list_spec
26760
26761# The root where to search for dependent libraries,and where our libraries should be installed.
26762lt_sysroot=$lt_sysroot
26763
26764# Command to truncate a binary pipe.
26765lt_truncate_bin=$lt_lt_cv_truncate_bin
26766
26767# The name of the directory that contains temporary libtool files.
26768objdir=$objdir
26769
26770# Used to examine libraries when file_magic_cmd begins with "file".
26771MAGIC_CMD=$MAGIC_CMD
26772
26773# Must we lock files when doing compilation?
26774need_locks=$lt_need_locks
26775
26776# Manifest tool.
26777MANIFEST_TOOL=$lt_MANIFEST_TOOL
26778
26779# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
26780DSYMUTIL=$lt_DSYMUTIL
26781
26782# Tool to change global to local symbols on Mac OS X.
26783NMEDIT=$lt_NMEDIT
26784
26785# Tool to manipulate fat objects and archives on Mac OS X.
26786LIPO=$lt_LIPO
26787
26788# ldd/readelf like tool for Mach-O binaries on Mac OS X.
26789OTOOL=$lt_OTOOL
26790
26791# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
26792OTOOL64=$lt_OTOOL64
26793
26794# Old archive suffix (normally "a").
26795libext=$libext
26796
26797# Shared library suffix (normally ".so").
26798shrext_cmds=$lt_shrext_cmds
26799
26800# The commands to extract the exported symbol list from a shared archive.
26801extract_expsyms_cmds=$lt_extract_expsyms_cmds
26802
26803# Variables whose values should be saved in libtool wrapper scripts and
26804# restored at link time.
26805variables_saved_for_relink=$lt_variables_saved_for_relink
26806
26807# Do we need the "lib" prefix for modules?
26808need_lib_prefix=$need_lib_prefix
26809
26810# Do we need a version for libraries?
26811need_version=$need_version
26812
26813# Library versioning type.
26814version_type=$version_type
26815
26816# Shared library runtime path variable.
26817runpath_var=$runpath_var
26818
26819# Shared library path variable.
26820shlibpath_var=$shlibpath_var
26821
26822# Is shlibpath searched before the hard-coded library search path?
26823shlibpath_overrides_runpath=$shlibpath_overrides_runpath
26824
26825# Format of library name prefix.
26826libname_spec=$lt_libname_spec
26827
26828# List of archive names.  First name is the real one, the rest are links.
26829# The last name is the one that the linker finds with -lNAME
26830library_names_spec=$lt_library_names_spec
26831
26832# The coded name of the library, if different from the real name.
26833soname_spec=$lt_soname_spec
26834
26835# Permission mode override for installation of shared libraries.
26836install_override_mode=$lt_install_override_mode
26837
26838# Command to use after installation of a shared archive.
26839postinstall_cmds=$lt_postinstall_cmds
26840
26841# Command to use after uninstallation of a shared archive.
26842postuninstall_cmds=$lt_postuninstall_cmds
26843
26844# Commands used to finish a libtool library installation in a directory.
26845finish_cmds=$lt_finish_cmds
26846
26847# As "finish_cmds", except a single script fragment to be evaled but
26848# not shown.
26849finish_eval=$lt_finish_eval
26850
26851# Whether we should hardcode library paths into libraries.
26852hardcode_into_libs=$hardcode_into_libs
26853
26854# Compile-time system search path for libraries.
26855sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
26856
26857# Detected run-time system search path for libraries.
26858sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
26859
26860# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
26861configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
26862
26863# Whether dlopen is supported.
26864dlopen_support=$enable_dlopen
26865
26866# Whether dlopen of programs is supported.
26867dlopen_self=$enable_dlopen_self
26868
26869# Whether dlopen of statically linked programs is supported.
26870dlopen_self_static=$enable_dlopen_self_static
26871
26872# Commands to strip libraries.
26873old_striplib=$lt_old_striplib
26874striplib=$lt_striplib
26875
26876
26877# The linker used to build libraries.
26878LD=$lt_LD
26879
26880# How to create reloadable object files.
26881reload_flag=$lt_reload_flag
26882reload_cmds=$lt_reload_cmds
26883
26884# Commands used to build an old-style archive.
26885old_archive_cmds=$lt_old_archive_cmds
26886
26887# A language specific compiler.
26888CC=$lt_compiler
26889
26890# Is the compiler the GNU compiler?
26891with_gcc=$GCC
26892
26893# Compiler flag to turn off builtin functions.
26894no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
26895
26896# Additional compiler flags for building library objects.
26897pic_flag=$lt_lt_prog_compiler_pic
26898
26899# How to pass a linker flag through the compiler.
26900wl=$lt_lt_prog_compiler_wl
26901
26902# Compiler flag to prevent dynamic linking.
26903link_static_flag=$lt_lt_prog_compiler_static
26904
26905# Does compiler simultaneously support -c and -o options?
26906compiler_c_o=$lt_lt_cv_prog_compiler_c_o
26907
26908# Whether or not to add -lc for building shared libraries.
26909build_libtool_need_lc=$archive_cmds_need_lc
26910
26911# Whether or not to disallow shared libs when runtime libs are static.
26912allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
26913
26914# Compiler flag to allow reflexive dlopens.
26915export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
26916
26917# Compiler flag to generate shared objects directly from archives.
26918whole_archive_flag_spec=$lt_whole_archive_flag_spec
26919
26920# Whether the compiler copes with passing no objects directly.
26921compiler_needs_object=$lt_compiler_needs_object
26922
26923# Create an old-style archive from a shared archive.
26924old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
26925
26926# Create a temporary old-style archive to link instead of a shared archive.
26927old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
26928
26929# Commands used to build a shared archive.
26930archive_cmds=$lt_archive_cmds
26931archive_expsym_cmds=$lt_archive_expsym_cmds
26932
26933# Commands used to build a loadable module if different from building
26934# a shared archive.
26935module_cmds=$lt_module_cmds
26936module_expsym_cmds=$lt_module_expsym_cmds
26937
26938# Whether we are building with GNU ld or not.
26939with_gnu_ld=$lt_with_gnu_ld
26940
26941# Flag that allows shared libraries with undefined symbols to be built.
26942allow_undefined_flag=$lt_allow_undefined_flag
26943
26944# Flag that enforces no undefined symbols.
26945no_undefined_flag=$lt_no_undefined_flag
26946
26947# Flag to hardcode \$libdir into a binary during linking.
26948# This must work even if \$libdir does not exist
26949hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
26950
26951# Whether we need a single "-rpath" flag with a separated argument.
26952hardcode_libdir_separator=$lt_hardcode_libdir_separator
26953
26954# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
26955# DIR into the resulting binary.
26956hardcode_direct=$hardcode_direct
26957
26958# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
26959# DIR into the resulting binary and the resulting library dependency is
26960# "absolute",i.e impossible to change by setting \$shlibpath_var if the
26961# library is relocated.
26962hardcode_direct_absolute=$hardcode_direct_absolute
26963
26964# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
26965# into the resulting binary.
26966hardcode_minus_L=$hardcode_minus_L
26967
26968# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
26969# into the resulting binary.
26970hardcode_shlibpath_var=$hardcode_shlibpath_var
26971
26972# Set to "yes" if building a shared library automatically hardcodes DIR
26973# into the library and all subsequent libraries and executables linked
26974# against it.
26975hardcode_automatic=$hardcode_automatic
26976
26977# Set to yes if linker adds runtime paths of dependent libraries
26978# to runtime path list.
26979inherit_rpath=$inherit_rpath
26980
26981# Whether libtool must link a program against all its dependency libraries.
26982link_all_deplibs=$link_all_deplibs
26983
26984# Set to "yes" if exported symbols are required.
26985always_export_symbols=$always_export_symbols
26986
26987# The commands to list exported symbols.
26988export_symbols_cmds=$lt_export_symbols_cmds
26989
26990# Symbols that should not be listed in the preloaded symbols.
26991exclude_expsyms=$lt_exclude_expsyms
26992
26993# Symbols that must always be exported.
26994include_expsyms=$lt_include_expsyms
26995
26996# Commands necessary for linking programs (against libraries) with templates.
26997prelink_cmds=$lt_prelink_cmds
26998
26999# Commands necessary for finishing linking programs.
27000postlink_cmds=$lt_postlink_cmds
27001
27002# Specify filename containing input files.
27003file_list_spec=$lt_file_list_spec
27004
27005# How to hardcode a shared library path into an executable.
27006hardcode_action=$hardcode_action
27007
27008# ### END LIBTOOL CONFIG
27009
27010_LT_EOF
27011
27012    cat <<'_LT_EOF' >> "$cfgfile"
27013
27014# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
27015
27016# func_munge_path_list VARIABLE PATH
27017# -----------------------------------
27018# VARIABLE is name of variable containing _space_ separated list of
27019# directories to be munged by the contents of PATH, which is string
27020# having a format:
27021# "DIR[:DIR]:"
27022#       string "DIR[ DIR]" will be prepended to VARIABLE
27023# ":DIR[:DIR]"
27024#       string "DIR[ DIR]" will be appended to VARIABLE
27025# "DIRP[:DIRP]::[DIRA:]DIRA"
27026#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
27027#       "DIRA[ DIRA]" will be appended to VARIABLE
27028# "DIR[:DIR]"
27029#       VARIABLE will be replaced by "DIR[ DIR]"
27030func_munge_path_list ()
27031{
27032    case x$2 in
27033    x)
27034        ;;
27035    *:)
27036        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
27037        ;;
27038    x:*)
27039        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
27040        ;;
27041    *::*)
27042        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
27043        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
27044        ;;
27045    *)
27046        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
27047        ;;
27048    esac
27049}
27050
27051
27052# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
27053func_cc_basename ()
27054{
27055    for cc_temp in $*""; do
27056      case $cc_temp in
27057        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
27058        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
27059        \-*) ;;
27060        *) break;;
27061      esac
27062    done
27063    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
27064}
27065
27066
27067# ### END FUNCTIONS SHARED WITH CONFIGURE
27068
27069_LT_EOF
27070
27071  case $host_os in
27072  aix3*)
27073    cat <<\_LT_EOF >> "$cfgfile"
27074# AIX sometimes has problems with the GCC collect2 program.  For some
27075# reason, if we set the COLLECT_NAMES environment variable, the problems
27076# vanish in a puff of smoke.
27077if test set != "${COLLECT_NAMES+set}"; then
27078  COLLECT_NAMES=
27079  export COLLECT_NAMES
27080fi
27081_LT_EOF
27082    ;;
27083  esac
27084
27085
27086
27087ltmain=$ac_aux_dir/ltmain.sh
27088
27089
27090  # We use sed instead of cat because bash on DJGPP gets confused if
27091  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
27092  # text mode, it properly converts lines to CR/LF.  This bash problem
27093  # is reportedly fixed, but why not run on old versions too?
27094  sed '$q' "$ltmain" >> "$cfgfile" \
27095     || (rm -f "$cfgfile"; exit 1)
27096
27097   mv -f "$cfgfile" "$ofile" ||
27098    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
27099  chmod +x "$ofile"
27100
27101 ;;
27102    "disable-rpath":C)
27103	sed < libtool > libtool-2 \
27104	's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
27105	mv libtool-2 libtool
27106	chmod 755 libtool
27107	libtool="./libtool"
27108	 ;;
27109
27110  esac
27111done # for ac_tag
27112
27113
27114as_fn_exit 0
27115_ACEOF
27116ac_clean_files=$ac_clean_files_save
27117
27118test $ac_write_fail = 0 ||
27119  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
27120
27121
27122# configure is writing to config.log, and then calls config.status.
27123# config.status does its own redirection, appending to config.log.
27124# Unfortunately, on DOS this fails, as config.log is still kept open
27125# by configure, so config.status won't be able to write to it; its
27126# output is simply discarded.  So we exec the FD to /dev/null,
27127# effectively closing config.log, so it can be properly (re)opened and
27128# appended to by config.status.  When coming back to configure, we
27129# need to make the FD available again.
27130if test "$no_create" != yes; then
27131  ac_cs_success=:
27132  ac_config_status_args=
27133  test "$silent" = yes &&
27134    ac_config_status_args="$ac_config_status_args --quiet"
27135  exec 5>/dev/null
27136  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
27137  exec 5>>config.log
27138  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27139  # would make configure fail if this is the last instruction.
27140  $ac_cs_success || as_fn_exit 1
27141fi
27142if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
27143  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
27144printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
27145fi
27146
27147
27148